!function(){var t={1549:function(t,n,e){var r=e(2032),o=e(3862),i=e(6721),a=e(2749),c=e(5749);function u(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1}},1175:function(t,n,e){var r=e(6025);t.exports=function(t,n){var e=this.__data__,o=r(e,t);return o<0?(++this.size,e.push([t,n])):e[o][1]=n,this}},3040:function(t,n,e){var r=e(1549),o=e(79),i=e(8223);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},7670:function(t,n,e){var r=e(2651);t.exports=function(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}},289:function(t,n,e){var r=e(2651);t.exports=function(t){return r(this,t).get(t)}},4509:function(t,n,e){var r=e(2651);t.exports=function(t){return r(this,t).has(t)}},2949:function(t,n,e){var r=e(2651);t.exports=function(t,n){var e=r(this,t),o=e.size;return e.set(t,n),this.size+=e.size==o?0:1,this}},2224:function(t,n,e){var r=e(104);t.exports=function(t){var n=r(t,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}},1042:function(t,n,e){var r=e(6110)(Object,"create");t.exports=r},9350:function(t){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},9325:function(t,n,e){var r=e(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},1802:function(t,n,e){var r=e(2224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,(function(t,e,r,o){n.push(r?o.replace(i,"$1"):e||t)})),n}));t.exports=a},7797:function(t,n,e){var r=e(4394);t.exports=function(t){if("string"==typeof t||r(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7473:function(t){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},5288:function(t){t.exports=function(t,n){return t===n||t!=t&&n!=n}},8156:function(t,n,e){var r=e(7422);t.exports=function(t,n,e){var o=null==t?void 0:r(t,n);return void 0===o?e:o}},6449:function(t){var n=Array.isArray;t.exports=n},1882:function(t,n,e){var r=e(2552),o=e(3805);t.exports=function(t){if(!o(t))return!1;var n=r(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}},3805:function(t){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},346:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},4394:function(t,n,e){var r=e(2552),o=e(346);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},104:function(t,n,e){var r=e(3661);function o(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var e=function(){var r=arguments,o=n?n.apply(this,r):r[0],i=e.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return e.cache=i.set(o,a)||i,a};return e.cache=new(o.Cache||r),e}o.Cache=r,t.exports=o},3222:function(t,n,e){var r=e(7556);t.exports=function(t){return null==t?"":r(t)}},2694:function(t,n,e){"use strict";var r=e(6925);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,n,e,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function n(){return t}t.isRequired=t;var e={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:i,resetWarningCache:o};return e.PropTypes=e,e}},5556:function(t,n,e){t.exports=e(2694)()},6925:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},n={};function e(r){var o=n[r];if(void 0!==o)return o.exports;var i=n[r]={exports:{}};return t[r](i,i.exports,e),i.exports}e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},function(){"use strict";var t=React,n=e(5556),r=e.n(n),o=e(8156),i=e.n(o);const{withSelect:a,withDispatch:c}=wp.data,{PluginDocumentSettingPanel:u}=wp.editPost,{Button:s,ToggleControl:p}=wp.components;function l(n){let{allDisabled:e,onToggle:r}=n;return(0,t.createElement)(u,{name:"om-settings-panel",title:OMAPI.i18n.settings,className:"om-settings-panel"},OMAPI.customFieldsSupported?(0,t.createElement)("div",null,(0,t.createElement)(p,{label:OMAPI.i18n.disable_all,checked:!!e,onChange:r}),(0,t.createElement)("hr",null)):null,(0,t.createElement)("div",null,(0,t.createElement)(s,{href:OMAPI.templatesUri+"&type=popup",style:{display:"flex",justifyContent:"center",marginBottom:"10px",width:"100%"},target:"_blank",rel:"noopener",isPrimary:!0},OMAPI.i18n.create_new_popup),(0,t.createElement)(s,{href:OMAPI.campaignsUri,target:"_blank",rel:"noopener",isLink:!0},OMAPI.i18n.view_all," →")))}l.propTypes={allDisabled:r().bool,onToggle:r().func};const f=c((t=>({onToggle:n=>(document.body.classList.toggle("om-campaigns-disabled",!!n),t("core/editor").editPost({meta:{om_disable_all_campaigns:!!n}}))})));let v=!1;var h=f(a((t=>{const n=i()(t("core/editor").getEditedPostAttribute("meta"),"om_disable_all_campaigns",!1);return v||(v=!0,document.body.classList.toggle("om-campaigns-disabled",!!n)),{allDisabled:n}}))((n=>{let{allDisabled:e,onToggle:r}=n;return(0,t.createElement)(l,{allDisabled:e,onToggle:r})})));const{PluginDocumentSettingPanel:_}=wp.editPost;_&&wp.plugins.registerPlugin("om-global-post-settings",{render:h,icon:null,priority:999})}()}();