(()=>{"use strict";var e,o={842:()=>{const e=window.wp.blocks,o=window.wp.element,r=e=>({width:24,height:24,fill:"none",className:e&&"spectra-block-icon--colored"}),t={fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},s=(e=!0)=>(0,o.createElement)("svg",{viewBox:"0 0 24 24",...r(e)},(0,o.createElement)("path",{d:"M17.9722 7.5H5.52778C4.54594 7.5 3.75 8.29949 3.75 9.28571V18.2143C3.75 19.2005 4.54594 20 5.52778 20H17.9722C18.9541 20 19.75 19.2005 19.75 18.2143V9.28571C19.75 8.29949 18.9541 7.5 17.9722 7.5Z",...t}),(0,o.createElement)("path",{d:"M8.18726 11.625H15.3126",...t}),(0,o.createElement)("path",{d:"M9.03564 15.875H14.4645",...t}),(0,o.createElement)("path",{d:"M21.25 2.875L19.25 4.875M19.25 2.875L21.25 4.875",strokeLinecap:"round",strokeLinejoin:"round"})),a=window.wp.blockEditor,n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),p=window.ReactJSXRuntime,c=(0,o.memo)((e=>{const{attributes:r,context:{"spectra/modal/isVisible":t,"spectra/modal/modalPosition":s,"spectra/modal/openModalAs":c,"spectra/modal/appearEffect":l,"spectra/modal/closeIconPosition":i}}=e,d=uagb_blocks_info.spectra_pro_status,u=[l||"","spectra-modal-popup",!0===t?"active":"",d?`spectra-modal-type-${c}`:"",d&&"popup"===c?`spectra-modal-position-${s}`:""].filter(Boolean),{style:m,classNames:w}=((e,r=[],t=[],s={})=>(0,o.useMemo)((()=>{const o=[...t],a={...s};return r.forEach((r=>{const{key:t,cssVar:s,className:p,value:c}=r;if(null===s&&null===p)return;const l=`--spectra-${n(t)}`,i=`spectra-${n(t)}`,d=void 0!==s?s:l,u=void 0!==p?p:i,m=e[t]||"",w=void 0!==c?c:m;w&&null!==d&&(a[d]=w),w&&null!==u&&o.push(u)})),{style:a,classNames:o}}),[e,r,t,s]))(r,[{key:"backgroundColor"},{key:"backgroundGradient"}],u),h="window-top-left"!==i&&"window-top-right"!==i,k=(0,a.useBlockProps)({className:(v=w,v.filter(Boolean).join(" ")),style:m});var v;const b=(0,a.useInnerBlocksProps)(k,{template:[["spectra/modal-child-popup-close-icon"],["spectra/modal-popup-content"]],renderAppender:!1});return h?(0,p.jsx)("div",{...k,children:(0,p.jsx)(a.InnerBlocks,{className:"spectra-modal-popup-wrap",template:[["spectra/modal-child-popup-close-icon"],["spectra/modal-popup-content"]],renderAppender:!1})}):(0,p.jsx)("div",{...b})})),l=e=>{const{blockName:o,childPath:r="",pluginName:t="spectra"}=e;if(!["spectra","spectra-pro"].includes(t)||"spectra"===t&&!window?.uagb_blocks_info?.uagb_url||"spectra-pro"===t&&!window?.spectra_pro_blocks_info?.spectra_pro_url)return null;if(!o)return null;let s="";switch(t){case"spectra":s=`${window.uagb_blocks_info.uagb_url}/spectra-v3`;break;case"spectra-pro":s=`${window.spectra_pro_blocks_info.spectra_pro_url}/spectra-pro-v2`}const a=`${s}/assets/block-previews/${r?r+"/":""}${o}.webp`;return(0,p.jsx)("img",{width:"100%",src:a,alt:""})},i=JSON.parse('{"UU":"spectra/modal-popup"}');(0,e.registerBlockType)(i.UU,{icon:s(),edit:e=>{const{attributes:{isPreview:o}}=e;return o?(0,p.jsx)(l,{childPath:"modal-children",blockName:"popup"}):(0,p.jsx)(c,{...e})},save:()=>(0,p.jsx)(a.InnerBlocks.Content,{})})}},r={};function t(e){var s=r[e];if(void 0!==s)return s.exports;var a=r[e]={exports:{}};return o[e](a,a.exports,t),a.exports}t.m=o,e=[],t.O=(o,r,s,a)=>{if(!r){var n=1/0;for(i=0;i<e.length;i++){for(var[r,s,a]=e[i],p=!0,c=0;c<r.length;c++)(!1&a||n>=a)&&Object.keys(t.O).every((e=>t.O[e](r[c])))?r.splice(c--,1):(p=!1,a<n&&(n=a));if(p){e.splice(i--,1);var l=s();void 0!==l&&(o=l)}}return o}a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[r,s,a]},t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={6194:0,4662:0};t.O.j=o=>0===e[o];var o=(o,r)=>{var s,a,[n,p,c]=r,l=0;if(n.some((o=>0!==e[o]))){for(s in p)t.o(p,s)&&(t.m[s]=p[s]);if(c)var i=c(t)}for(o&&o(r);l<n.length;l++)a=n[l],t.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return t.O(i)},r=globalThis.webpackChunkspectra_v3=globalThis.webpackChunkspectra_v3||[];r.forEach(o.bind(null,0)),r.push=o.bind(null,r.push.bind(r))})();var s=t.O(void 0,[4662],(()=>t(842)));s=t.O(s)})();