WordPress/wp-includes/js/dist/notices.min.js

2 lines
2.7 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.notices=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./node_modules/@wordpress/notices/build-module/index.js")}({"./node_modules/@wordpress/notices/build-module/index.js":function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return y}));var r={};n.r(r),n.d(r,"createNotice",(function(){return d})),n.d(r,"createSuccessNotice",(function(){return a})),n.d(r,"createInfoNotice",(function(){return l})),n.d(r,"createErrorNotice",(function(){return f})),n.d(r,"createWarningNotice",(function(){return p})),n.d(r,"removeNotice",(function(){return b}));var o={};n.r(o),n.d(o,"getNotices",(function(){return m}));var i=n("@wordpress/data"),c=n("lodash");var u=(e=>t=>(n={},r)=>{const o=r[e];if(void 0===o)return n;const i=t(n[o],r);return i===n[o]?n:{...n,[o]:i}})("context")((e=[],t)=>{switch(t.type){case"CREATE_NOTICE":return[...Object(c.reject)(e,{id:t.notice.id}),t.notice];case"REMOVE_NOTICE":return Object(c.reject)(e,{id:t.id})}return e});const s="global";function d(e="info",t,n={}){const{speak:r=!0,isDismissible:o=!0,context:i=s,id:u=Object(c.uniqueId)(i),actions:d=[],type:a="default",__unstableHTML:l,icon:f=null,explicitDismiss:p=!1,onDismiss:b=null}=n;return{type:"CREATE_NOTICE",context:i,notice:{id:u,status:e,content:t=String(t),spokenMessage:r?t:null,__unstableHTML:l,isDismissible:o,actions:d,type:a,icon:f,explicitDismiss:p,onDismiss:b}}}function a(e,t){return d("success",e,t)}function l(e,t){return d("info",e,t)}function f(e,t){return d("error",e,t)}function p(e,t){return d("warning",e,t)}function b(e,t=s){return{type:"REMOVE_NOTICE",id:e,context:t}}const O=[];function m(e,t=s){return e[t]||O}const y=Object(i.createReduxStore)("core/notices",{reducer:u,actions:r,selectors:o});Object(i.register)(y)},"@wordpress/data":function(e,t){e.exports=window.wp.data},lodash:function(e,t){e.exports=window.lodash}});