2021-11-15 07:50:17 -05:00
|
|
|
this.wp=this.wp||{},this.wp.notices=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="Ko7W")}({"1ZqX":function(t,e){t.exports=window.wp.data},Ko7W:function(t,e,n){"use strict";n.r(e),n.d(e,"store",(function(){return O}));var r={};n.r(r),n.d(r,"createNotice",(function(){return l})),n.d(r,"createSuccessNotice",(function(){return f})),n.d(r,"createInfoNotice",(function(){return d})),n.d(r,"createErrorNotice",(function(){return a})),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 g}));var i=n("1ZqX"),c=n("YLtl");var u=(t=>e=>function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;const o=r[t];if(void 0===o)return n;const i=e(n[o],r);return i===n[o]?n:{...n,[o]:i}})("context")((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"CREATE_NOTICE":return[...Object(c.reject)(t,{id:e.notice.id}),e.notice];case"REMOVE_NOTICE":return Object(c.reject)(t,{id:e.id})}return t}));const s="global";function l(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"info",e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{speak:r=!0,isDismissible:o=!0,context:i=s,id:u=Object(c.uniqueId)(i),actions:l=[],type:f="default",__unstableHTML:d,icon:a=null,explicitDismiss:p=!1,onDismiss:b}=n;return e=String(e),{type:"CREATE_NOTICE",context:i,notice:{id:u,status:t,content:e,spokenMessage:r?e:null,__unstableHTML:d,isDismissible:o,actions:l,type:f,icon:a,explicitDismiss:p,onDismiss:b}}}function f(t,e){return l("success",t,e)}function d(t,e){return l("info",t,e)}function a(t,e){return l("error",t,e)}function p(t,e){return l("warning",t,e)}function b(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return{type:"REMOVE_NOTICE",id:t,context:e}}const v=[];function g(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return t[e]||v}const O=Object(i.createReduxStore)("core/notices",{reducer:u,actions:r,selectors:o});Object(i.register)(O)},YLtl:function(t,e){t.exports=window.lodash}});
|