Files
centro-de-funciones/functions/tailwindcss/js/v6.0/app.dec5a514-parche.js
T

2 lines
992 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(()=>{"use strict";var e={82256:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Xe});var s=n(36968),i=n.n(s),o=n(27361),a=n.n(o),r=n(23279),l=n.n(r),c=n(70655),d=n(20144),u=n(38085),p=n(18076),h=n(25970),g=n(67505),m=n(85450),v=n(71035);const y=1,f=3;function _(e,t,n,{enableContentEditableAndFocus:s,saveContentEditable:i}){const o=e=>{const a=[];return e.forEach((e=>{if(e.nodeType===f){const t=e.nodeValue;"%%CHILDREN%%"===t?.trim()?a.push(n()):t&&a.push(t)}else if(e.nodeType===y&&e instanceof Element){const n=e.attributes,r=e.nodeName,l={},c={},d={},u=[];let p,h;for(let t=0;t<n.length;t++){const o=n.item(t);if(o){const t=o.name;"class"===t?p=o.value:"style"===t?h=o.value:l[t]=o.value,"data-content-editable-property-path"===t&&(d.dblclick=s,d.blur=i,c.innerHTML=e.innerHTML)}}!c.innerHTML&&e.hasChildNodes()&&u.push(...o(e.childNodes)),a.push(t(r,{class:p,style:h,attrs:{...l},on:{...d},domProps:c},u))}})),a},a=new DOMParser,r=a.parseFromString(e,"text/html").body,l=(new XMLSerializer).serializeToString(r),c=l.replace(/<body.*?>/,"").replace("</body>",""),d=a.parseFromString("<root>"+c+"</root>","application/xhtml+xml");return o(d.documentElement.childNodes)}var b=n(98851),S=n(32521),C=n(63842);S.r$({globalSettingsCssFilePath:S.Z_,globalSelectorsCssFilePath:S.Z_,defaultCssForAllElementsFilePath:S.Z_});const x=S.r$({postCssFilePath:S.Z_,postDefaultsCssFilePath:S.Z_}),w=S.dt({postsGeneratedCssFilePaths:S.IM(S.Z_,x)}),I=S.jV([w,S.dt({dependencies:C.D})]),P=S.jV([S.dt({html:S.Z_}),I]);var k=n(85902),E=n(65669),T=n(31381);const D={};function A(e,t,n){let s,i=[];return async(...o)=>{if(s=o,D[n])return clearTimeout(D[n]),new Promise((o=>{i.push(o),D[n]=setTimeout((()=>{const t=e(...s);i.forEach((e=>e(t))),i=[],delete D[n]}),t)}));{const a=e(...o);return D[n]=setTimeout((()=>{if(i.length>0){const t=e(...s);i.forEach((e=>e(t))),i=[]}delete D[n]}),t),a}}}function Z(e,t,n,s){const i=(0,T.treeNodesOfType)(m.documentStore.document.tree.root,[e]),o=i.length,a=i.findIndex((e=>e.id===n)),r=()=>(0,b.D)({action:"breakdance_server_side_render",overrideAjaxUrl:(0,k.j)(),dataToPost:{properties:(0,E.J)(t),parentProperties:(0,E.J)(s),elementSlug:e,triggeringDocument:m.documentStore.document.documentMeta.id,totalMatchingElements:o,currentIndexInMatchingElements:a},decoder:P});return A(r,1e3,n)()}var O=n(30902),M=n(45974),B=n(3565),L=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-empty-columns"},[t("div",{staticClass:"breakdance-empty-columns-choices-heading"},[e._v(" "+e._s(e.__("Choose a column structure"))+" ")]),t("div",{staticClass:"breakdance-empty-columns-choices"},[t("div",{staticClass:"breakdance-empty-columns-choices-row"},[t("div",{staticClass:"breakdance-empty-columns-column-icon-wrapper",on:{click:function(t){return e.addColumns(t,2)}}},[e._m(0)]),t("div",{staticClass:"breakdance-empty-columns-column-icon-wrapper",on:{click:function(t){return e.addColumns(t,3)}}},[e._m(1)]),t("div",{staticClass:"breakdance-empty-columns-column-icon-wrapper",on:{click:function(t){return e.addColumns(t,4)}}},[e._m(2)])]),t("div",{staticClass:"breakdance-empty-columns-choices-row"},[t("div",{staticClass:"breakdance-empty-columns-column-icon-wrapper",on:{click:function(t){return e.addColumns(t,2,[35,65])}}},[e._m(3)]),t("div",{staticClass:"breakdance-empty-columns-column-icon-wrapper",on:{click:function(t){return e.addColumns(t,2,[65,35])}}},[e._m(4)])])])])},N=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-empty-columns-column-icon"},[t("div",{staticClass:"breakdance-empty-columns-column-icon-column"}),t("div",{staticClass:"breakdance-empty-columns-column-icon-column"})])},function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-empty-columns-column-icon"},[t("div",{staticClass:"breakdance-empty-columns-column-icon-column"}),t("div",{staticClass:"breakdance-empty-columns-column-icon-column"}),t("div",{staticClass:"breakdance-empty-columns-column-icon-column"})])},function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-empty-columns-column-icon"},[t("div",{staticClass:"breakdance-empty-columns-column-icon-column"}),t("div",{staticClass:"breakdance-empty-columns-column-icon-column"}),t("div",{staticClass:"breakdance-empty-columns-column-icon-column"}),t("div",{staticClass:"breakdance-empty-columns-column-icon-column"})])},function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-empty-columns-column-icon"},[t("div",{staticClass:"breakdance-empty-columns-column-icon-column",staticStyle:{width:"35%"}}),t("div",{staticClass:"breakdance-empty-columns-column-icon-column",staticStyle:{width:"65%"}})])},function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-empty-columns-column-icon"},[t("div",{staticClass:"breakdance-empty-columns-column-icon-column",staticStyle:{width:"65%"}}),t("div",{staticClass:"breakdance-empty-columns-column-icon-column",staticStyle:{width:"35%"}})])}],F=n(884),R=n(94550),V=n(95690),$=n(69137),W=n(28684),U=n(38020);let z=class extends d.ZP{addColumns(e,t,n){e.preventDefault(),e.stopPropagation();const s=[],o=n?n.map((e=>{const t=(0,U.v)(e);return i()({},F.cp,{number:t,unit:"%",style:`${t}%`})})):[];for(let i=0;i<t;i++)s.push({id:i,data:{type:R.COLUMN_SLUG,properties:n?o[i]:{}},children:[]});$.n.transaction((()=>{m.documentStore.addMultipleNodes({nodes:s,parentId:this.id}),n||(0,W.t)(this.id)}),`Set amount of columns to ${t}`),(0,V.oM)("elementproperties")}};(0,c.gn)([(0,u.fI)()],z.prototype,"id",void 0),z=(0,c.gn)([(0,u.wA)({})],z);const H=z,G=H;var K=n(1001),j=(0,K.Z)(G,L,N,!1,null,null,null);const q=j.exports;var X=n(86592),Y=n(86687),Q=n(43195),J=n(58172),ee=n(39664);const te=["jquery","wp-polyfill-js"];function ne(){const e=window.Breakdance.canvas.document,t=e.querySelectorAll("script");for(const n of t){if(te.find((e=>n.id.toLowerCase().includes(e)||n.src.toLowerCase().includes(e))))continue;const t=se(n);n.remove(),e.querySelector("body")?.appendChild(t)}}function se(e){const t=document.createElement("script");return Array.from(e.attributes).forEach((e=>{t.setAttribute(e.name,e.value)})),e.src?t.src=e.src:t.innerHTML=e.innerHTML,t}var ie=n(12721);const oe='\n<div class="breakdance-empty-ssr-message">\n This element has no content.\n\n <small>Hide this notice at <i>Preferences / UI Settings / Disable Notice For Empty SSR Elements</i></small>\n</div>',ae='\n<div class="breakdance-empty-ssr-message breakdance-empty-ssr-message-error">\n There was an error on the server when rendering this element.\n</div>',re=(e,t)=>`\n<div class="breakdance-empty-ssr-message breakdance-empty-ssr-message-error">\n The <strong>"${e}"</strong> element requires the plugins <em>"${t.join(", ")}"</em>. Please check that they are installed and activated from the Plugins page of the WP admin.\n</div>`;var le=n(98374),ce=n(13635),de=n(20210),ue=n(9950),pe=n(25001),he=n(84274),ge=n(40681),me=n(92361),ve=n(17209),ye=n(23128),fe=n(8773),_e=n(35941),be=n(16734),Se=n(54120),Ce=n(16068),xe=n(23493),we=n.n(xe);function Ie(e){return e?.parentElement?.classList?.contains("oxy-component")&&e?.children?.length?e.children[0]?.getBoundingClientRect():e?.parentElement?.getBoundingClientRect()}function Pe(e,t){return e&&t?Math.abs(e.top-t.top)<1&&Math.abs(e.left-t.left)<1&&Math.abs(e.bottom-t.bottom)<1&&Math.abs(e.right-t.right)<1&&Math.abs(e.width-t.width)<1&&Math.abs(e.height-t.height)<1:e===t}function ke(e){(0,d.Y3)((()=>{const t=Ie(e);if(!t||!m.uiStore.inlineEditingContext)return;const n=m.uiStore.inlineEditingRect;n&&Pe(t,n)||m.uiStore.setInlineEditingRect(t)}))}function Ee(e){const t=()=>ke(e),n=we()(t,16),s=window.Breakdance?.canvas?.document;s.addEventListener("scroll",n,{passive:!0});const i=new ResizeObserver(t),o=s.defaultView?.ResizeObserver,a=o?new o(t):null;return i?.observe(document.querySelector("#iframe-wrapper")),a?.observe(e.parentElement??e),t(),()=>{s.removeEventListener("scroll",n),i?.disconnect(),a?.disconnect()}}function Te(e,t,n,s){if(!n)return e;const i=new DOMParser,o=i.parseFromString(n,"text/html"),a=e=>{const t=[];let n=e.parentElement;while(n&&"body"!==n.tagName.toLowerCase())t.push({tag:n.tagName.toLowerCase(),className:n.className||""}),n=n.parentElement;return t},r=o.querySelector(s);if(!r)return e;const l=a(r),c=r.tagName.toLowerCase(),u=(0,d.h)(c,{class:r.className},[e]);return l.reverse().reduceRight(((e,t)=>{const n=t.tag.toLowerCase();return(0,d.h)(n,{class:t.className},Array.isArray(e)?e:[e])}),[u,...t])}function De(e,t){if(!e)return[];const n=new DOMParser,s=n.parseFromString(e,"text/html"),i=s.querySelectorAll(t);return i?Array.from(i).slice(1).map((e=>({tag:e.tagName.toLowerCase(),className:e.className||"",innerHTML:e.innerHTML}))):[]}function Ae(e){return e.map(((e,t)=>{const n=e.tag;return(0,d.h)(n,{key:`placeholder-${t}`,class:`breakdance-inline-editor-placeholder ${e.className}`,domProps:{innerHTML:e.innerHTML}})}))}var Ze=n(33356);let Oe=class extends u.w3{constructor(){super(...arguments),this.saving=!1,this.resizeObserver=null,this.blockId=null,this.nodes=[],this.unsubscribe=()=>{}}onElementChange(){this.context?.showBackdrop&&ke(this.$refs.container)}get context(){return m.uiStore.inlineEditingContext}get postId(){return m.documentStore.document.documentMeta.id}get selector(){return`[data-inline-editable-node="${this.postId}-${this.element.id}"]`}get ssrNodePlaceholders(){return De(this.ssrTemplate,this.selector)}async mounted(){this.context?.showBackdrop&&(this.unsubscribe=Ee(this.$refs.container)),this.context?.scrollToElementOnStart&&this.$nextTick((()=>(0,Ze.es)()))}async beforeDestroy(){this.unsubscribe&&this.unsubscribe()}render(){const e=arguments[0],t=e("div",{class:"breakdance-inline-editor__loader"},["Loading Block..."]),n=e("div",{class:"breakdance-inline-editor",ref:"container"},[this.context?.loading?t:this.$slots.default]),s=Ae(this.ssrNodePlaceholders);return this.ssrTemplate?Te(n,s,this.ssrTemplate,this.selector):n}};(0,c.gn)([(0,u.fI)()],Oe.prototype,"element",void 0),(0,c.gn)([(0,u.fI)()],Oe.prototype,"ssrTemplate",void 0),(0,c.gn)([(0,u.RL)("element",{deep:!0})],Oe.prototype,"onElementChange",null),Oe=(0,c.gn)([(0,u.wA)({components:{BuilderElement:()=>Promise.resolve().then(n.bind(n,82256))}})],Oe);const Me=Oe,Be=Me;var Le,Ne,Fe=(0,K.Z)(Be,Le,Ne,!1,null,null,null);const Re=Fe.exports;function Ve(e){return!1}var $e,We=n(87950);const Ue=l()(v.Z,500);let ze=$e=class extends d.ZP{constructor(){super(...arguments),this.isActive=!1,this.isUpdating=!1,this.currentlyDragging=!1,this.lastModifiedPropertyPath=null,this.uniqueId=(0,fe.Z)(),this.ssrInnerHtml=null,this.oldSsrParentProperties=(0,ye.Z)(this.ssrParentProperties),this.oldTwigProps=(0,ye.Z)(this.elementProps),this.dragMouseStartX=!1,this.dragMouseStartY=!1,this.easyEvent=new ie.hF,this.debouncedLoadDynamicData=l()(this.loadDynamicData,500,{leading:!0})}get isEmptyContainer(){const e=(0,ue.V9)(this.element.data.type).type,t="popup"===e||"container"===e||"container-link"===e||"section"===e;return t&&0===this.element.children.length}get isContainerTypeElement(){const e=(0,ue.V9)(this.element.data.type).type;return"popup"===e||"container"===e||"container-link"===e||"container-restricted"===e||"container-excluding-self"===e||"section"===e}get isEmptyColumns(){return this.element.data.type===R.COLUMNS_SLUG&&0===this.element.children.length}get parentProps(){const e=this.baseElement.settings&&this.baseElement.settings.sharePropsWithSSRChildren,{design:t,...n}=this.elementProps||{};return(e?n:this.ssrParentProperties)||{}}get builderMode(){return m.configStore.builderMode}get isInlineEditing(){return m.uiStore.isElementBeingEditedInline(this.element.id)}__render(e){const t=this.rootTag;if(!this.shouldShow)return!1;if(this.isEmptyColumns)return e(t,{attrs:{...this.attributes},on:{mousedown:this.activateAndMaybeStartDrag,dragstart:this.disableDefaultDrag,click:this.maybePreventDefault},class:this.classList},[e(q,{attrs:{id:this.element.id}})]);const n=(0,X.as)((0,X.as)(this.processedTemplate,{ssr:this.ssrValueOrMessage}),this.tags),s=this.isEmptyContainer?e(B.Z,{attrs:{id:this.element.id}}):this.element.children.map((t=>e($e,{key:t.id,attrs:{element:t,parentId:this.element.id,ssrParentProperties:this.parentProps}}))),i=!this.isInlineEditing&&(this.contentEditablePropertyPath||null!==this.ssrValueOrMessage&&!this.ssrValueOrMessage.includes("%%CHILDREN%%")),o={};i&&(o.innerHTML=n);const a=i?[]:_(n,e,(()=>s),{enableContentEditableAndFocus:this.enableContentEditableAndFocus,saveContentEditable:this.saveContentEditable});return e(this.rootTag,{class:this.classList,attrs:this.attributes,domProps:o,on:{mousedown:this.activateAndMaybeStartDrag,dragstart:this.disableDefaultDrag,click:this.maybePreventDefault,dblclick:this.handleDoubleClick,blur:this.contentEditablePropertyPath?this.saveContentEditable:()=>{}}},this.isInlineEditing?[e(Re,{attrs:{element:this.element,ssrTemplate:(0,X.as)(this.ssrInnerHtml||"",this.tags)}},[a])]:a)}render(e){return this.__render(e)}get processedTemplate(){if(this.isInlineEditing)return"%%CHILDREN%%";if(!this.hasRequiredPluginsAndTheyAreAvailable&&this.baseElement.settings&&this.baseElement.settings.requiredPlugins)return re(this.baseElement.name,this.baseElement.settings.requiredPlugins);const e=(0,X.yz)(this.baseElement.template,this.twigPropsAndPreset,(0,X.bb)(this.baseElement));return e?(0,X.as)(e,this.tags):""}get shouldSsr(){const e=this.processedTemplate.includes("%%SSR%%");if(!e)return!1;if(this.refreshSsr)return!0;if(null===this.lastModifiedPropertyPath)return!0;const t=this.baseElement.propertyPathsToSsrElementWhenValueChanges,n=!t;return!!n||t.some((e=>this.lastModifiedPropertyPath?.startsWith(e)))}get refreshSsr(){return!!m.uiStore.refreshSsrElementId&&m.uiStore.refreshSsrElementId===this.element.id}get hasRequiredPluginsAndTheyAreAvailable(){if(!this.baseElement.settings||!this.baseElement.settings.requiredPlugins)return!0;const e=this.baseElement.settings.requiredPlugins.filter((e=>m.configStore.availableWordpressPlugins.includes(e)));return e.length===this.baseElement.settings.requiredPlugins.length}get ssrValueOrMessage(){return""===this.ssrInnerHtml?m.uiStore.settings.disableNoticeForEmptySSRElements?"":oe:this.shouldSsr||this.ssrInnerHtml?this.isUpdating?this.ssrInnerHtml||"":this.ssrInnerHtml:null}get tags(){return{id:this.element.id,selector:this.elementSelector,uniqueSlug:this.uniqueClassName,postId:this.postId,elementName:this.baseElement.name}}async rerenderFromServeOnParentPropertyChange(){this.shouldSsr&&((0,_e.v)(this.ssrParentProperties,this.oldSsrParentProperties)||(this.oldSsrParentProperties=(0,ye.Z)(this.ssrParentProperties),await this.maybeRerenderFromServer()))}async rerenderFromServerOnRefreshSsr(){this.refreshSsr&&(await this.maybeRerenderFromServer(),m.uiStore.setRefreshSsrElementId(null),this.runActionsAfterSsr())}get presets(){return m.globalStore.presets}async maybeRerenderFromServerOnPropertyChange(){await this.$nextTick(),this.isInlineEditing||(this.shouldSsr?(0,_e.v)(this.twigProps,this.oldTwigProps)||(this.oldTwigProps=this.twigProps,await this.maybeRerenderFromServer(),this.runActionsAfterSsr()):this.processedTemplate.includes("%%SSR%%")||(null!==this.ssrInnerHtml&&(this.ssrInnerHtml=null),this.updateSsrDependenciesAndStyles()))}runActionsAfterSsr(){Y.w.run.onBeforeDeletingElement({elementId:this.element.id}),this.element._parentId&&Y.w.run.onAfterDeletedElement({deletedElementNodeType:this.element.data.type,parentIdOfDeletedElement:this.element._parentId,transactionKey:void 0}),Y.w.run.onMountedElement({elementId:this.element.id})}async maybeRerenderFromServer(){if(!this.shouldSsr)return;m.uiStore.setElementUpdatingState({elementId:this.element.id,isUpdating:!0});const e=(0,O.pipe)(await Z(this.baseElement.slug,this.elementProps,this.element.id,this.parentProps),(0,M.fold)((e=>(e.forEach((e=>{ee.Z.log.message(e.msg)})),{html:ae,postsGeneratedCssFilePaths:{},dependencies:{}})),(e=>e)));m.uiStore.setElementUpdatingState({elementId:this.element.id,isUpdating:!1}),this.ssrInnerHtml=e.html,this.updateSsrDependenciesAndStyles(e.dependencies,e.postsGeneratedCssFilePaths)}maybeRerunAllScriptsInCanvasDocumentBody(){const e=this.baseElement.settings&&this.baseElement.settings.dependsOnGlobalScripts;e&&ne()}updateSsrDependenciesAndStyles(e,t){this.maybeRerunAllScriptsInCanvasDocumentBody(),e&&(0,v.Z)((0,ce.RY)(),{dependencies:[e],addInlineScriptsAsUnique:!1,element:this.element}),(0,le.xg)((0,ce.RY)(),this.element.id,t)}get shouldShow(){return(0,g.O)("elementShouldShow",!0,this.elementProps,{currentBreakpoint:m.uiStore.currentBreakpoint})}get breakpoints(){return m.configStore.breakpoints}onBreakpointsChange(){this.generateElementsCSS()}onTwigPropsChange(){this.generateElementsCSS()}onPresetChange(){this.generateElementsCSS()}onVariablesChange(){this.generateElementsCSS()}onCssTemplateChange(){this.generateElementsCSS()}onDefaultCssChange(){this.generateElementsCSS()}onInternalDependenciesChange(){if(this.baseElement.dependencies){const e=this.baseElement.dependencies.map((e=>({...e,inlineScripts:[]})));Ue((0,ce.RY)(),{dependencies:e,tags:this.tags,element:this.element})}}get globalSettings(){return m.globalStore.globalSettings}refreshIfTypographyPresetsChange(){this.generateElementsCSS()}get elementChildrenCount(){return this.element.children.length}elementChildrenCountChanged(){this.generateElementsCSS()}generateElementsCSS(){(0,le.df)((0,ce.RY)(),this.baseElement.slug,this.baseElement.defaultCss);const e=this.presetId?(0,Se.wV)(this.baseElement):this.baseElement.cssTemplate,t=(0,p.a)(this.twigProps,this.breakpoints,e,this.tags,this.baseElement.propertyPathsToWhitelistInFlatProps,this.elementChildrenCount,(0,X.g)(this.baseElement,this.presetId));(0,le.ts)((0,ce.RY)(),this.element.id,t,this.uniqueId)}async mounted(){this.updateSsrDependenciesAndStyles(),await Promise.all([this.loadDependencies(),this.maybeRerenderFromServer()]),Y.w.run.onMountedElement({elementId:this.element.id})}destroyed(){const e=0===(0,T.countNodesOfTypeInTree)(m.documentStore.document.tree.root,this.baseElement.slug);e&&(0,le.xU)((0,ce.RY)(),this.baseElement.slug),(0,le.AC)((0,ce.RY)(),this.element.id,this.uniqueId),(0,le.SR)((0,ce.RY)(),this.element.id),this.element._parentId&&Y.w.run.onAfterDeletedElement({deletedElementNodeType:this.element.data.type,parentIdOfDeletedElement:this.element._parentId,transactionKey:`DocumentDeleteElement:ID:${this.element.id}`})}loadDependencies(){return(0,v.Z)((0,ce.RY)(),{dependencies:[...this.baseElement.dependencies||[],...m.configStore.elementsExternalAttrsDepsAndActions.dependencies||[]],element:this.element,tags:this.tags})}get elementSelector(){const e=`.${this.uniqueClassName}`,t=`.breakdance ${e}`;return"oxygen"===this.builderMode?this.element.data.type.startsWith("EssentialElements\\")?t:e:t}get rootTag(){const e=this.baseElement.htmlTag.pathToControl?a()(this.element.data.properties,this.baseElement.htmlTag.pathToControl):this.element.data.properties?.settings?.advanced?.tag;return"string"===typeof e&&e||this.baseElement.htmlTag.default}get baseElement(){return m.configStore.element(this.element.data.type)}get elementProps(){if(m.uiStore.inlineEditingElement&&m.uiStore.inlineEditingElement.data.type===R.COMPONENT_SLUG&&(0,ue.l0)(m.documentStore.document.tree,this.element,m.uiStore.inlineEditingElement)){const e=m.uiStore.inlineEditingElementPropertyOverrides,t=e[this.element.id]||{};if(Object.keys(t).length>0){const e=(0,ye.Z)(this.element.data.properties);for(const[n,s]of Object.entries(t))s&&i()(e,n,s);return e}}return this.element.data.properties}get twigProps(){if((0,J.Kn)(this.elementProps)&&0!==Object.entries(this.elementProps).length){const e=m.configStore.dynamicDataCache.data,t=(0,h.Ko)(this.elementProps,e),n=t.filter((t=>!Object.keys(e).includes((0,h.Ev)(t))));n.length&&this.debouncedLoadDynamicData(n);const s=!!m.configStore.previewedItem;return(0,J.xV)(this.elementProps,(t=>(0,Q.ro)(t)?(0,Q.Ax)(t,e,s):t))}return{}}get designPropsAndPreset(){const e=(0,ye.Z)(this.twigProps?.design),t=(0,ye.Z)(this.preset?.design);return(0,Se.lb)(t,e)}get twigPropsAndPreset(){return{...this.twigProps,design:this.designPropsAndPreset}}get postId(){return m.documentStore.document.documentMeta.id}get htmlId(){return(0,de.Cc)(this.element)}get uniqueClassName(){return(0,de.P0)(this.element,this.postId)}get baseClassName(){return(0,de.MO)(this.baseElement)}get presetId(){return this.element.data.properties?.meta?.preset}get preset(){return m.globalStore.presets.find((e=>e.id===this.presetId))}get variables(){return m.globalStore.variables}get isSectionCurrentlyRewritingWithAi(){return m.singularityStore.aiJobs.filter((e=>"elementId"in e.context&&e.context.elementId===this.element.id&&("running"===e.status||"pending"===e.status))).length>0}get classList(){const e=[this.uniqueClassName,"builder-element",this.baseClassName];this.isSectionCurrentlyRewritingWithAi&&e.push("section-currently-rewriting-with-ai"),this.isActive&&e.push("breakdance--active-element"),this.currentlyDragging&&e.push("breakdance--currently-dragging"),this.isEmptyContainer&&e.push("breakdance--empty-container"),this.isContainerTypeElement&&e.push("breakdance--container-type-element");const t=this.element.data.properties?.settings?.advanced?.classes??!1;t&&e.push(...t),this.baseElement.settings&&this.baseElement.settings.bypassPointerEvents&&e.push("breakdance-children-pointer-events-none"),this.isUpdating&&e.push("breakdance-element-is-updating"),this.presetId&&e.push(`bde-preset-${this.presetId}`);const n=(0,Ce.Xn)(this.element);return n&&e.push(...n.map((e=>e.name))),e.push(...this.additionalClasses),e}get additionalClasses(){return this.baseElement.additionalClasses?this.baseElement.additionalClasses.map((e=>{const t=(0,X.yz)(e.template,this.twigPropsAndPreset,(0,X.l0)(this.baseElement,e));if(t)return{name:e.name,include:t}})).filter(pe.$K).filter((e=>!!e.include)).map((e=>e.name)):[]}renderAttributeValue(e){return"template"in e?(0,X.yz)(e.template,this.twigPropsAndPreset,(0,X.H5)(this.baseElement,e)):"propertyPath"in e?String(a()(this.elementProps,e.propertyPath,"")):"rawValue"in e?e.rawValue:null}get attributes(){const e={},t=[...this.baseElement.attributes||[],...m.configStore.elementsExternalAttrsDepsAndActions.attributes||[]];t.forEach((t=>{const n=this.renderAttributeValue(t);n&&(e[t.name]=(0,X.as)(n,this.tags))}));const n=this.element.data.properties?.settings?.advanced?.attributes??[];n.forEach((t=>{e[t.name]=t.value})),e["data-node-id"]=`${this.element.id}`,this.htmlId&&(e["id"]=this.htmlId);const s={};return Object.keys(e).forEach((t=>{"%%OUTPUTBLANKATTRIBUTE%%"===e[t]?.trim()||null==e[t]||void 0===e[t]?s[t]="":s[t]=e[t]})),s}get contentEditablePropertyPath(){return this.attributes["data-content-editable-property-path"]}get isDragAndDropEnabled(){return m.uiStore.isSingularityMode&&m.uiStore.hasFullAccess?Ve(this.element):m.uiStore.hasFullAccess}get isPreviewMode(){return m.uiStore.isPreviewMode}get isOnboardingMode(){return window.Breakdance.isOnboarding}get lastModifiedTreeNodePropertyForWatcher(){return m.uiStore.lastModifiedElementProperty}handleLastModifiedTreeNodePropertyChange(e){e.elementId===this.element.id?this.lastModifiedPropertyPath=e.path:null!==this.lastModifiedPropertyPath&&(this.lastModifiedPropertyPath=null)}get currentlyDraggingForWatcher(){return m.uiStore.currentlyDraggingCanvasElementId===this.element.id}handleCurrentlyDraggingChange(e){this.currentlyDragging=e}get activeElementIdForWatcher(){return m.uiStore.activeElementId}handleActiveElementIdChange(e){this.isActive=e===this.element.id}get isElementUpdatingForWatcher(){return Boolean(m.uiStore.elementsThatAreUpdating[this.element.id])}handleLoadingElementIdChange(e){this.isUpdating!==e&&(this.isUpdating=e)}get behaviorModeEnabled(){const e=m.uiStore.builderBehaviorElementId;return!!e&&(0,T.isDescendant)(m.documentStore.document.tree,e,this.element.id)}activateElement(){this.behaviorModeEnabled||(m.uiStore.activateElement(this.element.id),(0,V.oM)("elementproperties"))}canDrag(e){if(!this.isDragAndDropEnabled)return!1;const t=e.target,n=["textarea","input","select"],s=t.tagName.toLowerCase();return!n.includes(s)&&!m.uiStore.elementWithContentEditable}disableDefaultDrag(e){e.preventDefault()}maybePreventDefault(e){const t=e.target,n=["a","button"],s=n.join(", "),i=n.some((e=>t.closest(e)));(t.matches(s)||i)&&e.preventDefault()}activateAndMaybeStartDrag(e){this.isPreviewMode||this.isOnboardingMode||(e.stopPropagation(),this.activateElement(),this.canDrag(e)&&(this.behaviorModeEnabled||(this.dragMouseStartX=e.clientX,this.dragMouseStartY=e.clientY,this.easyEvent.on("mousemove",this.dragging),this.easyEvent.on("mouseup",this.removeDragListeners))))}removeDragListeners(){this.easyEvent.removeAll(),this.dragMouseStartX=!1,this.dragMouseStartY=!1}dragging(e){if(this.behaviorModeEnabled)return;if(!(0,ie.Pm)(e))return;if(!1===this.dragMouseStartX||!1===this.dragMouseStartY)return;const t=e.clientX,n=e.clientY;(Math.abs(t-this.dragMouseStartX)>3||Math.abs(n-this.dragMouseStartY)>3)&&(m.uiStore.setCanvasElementDraggedId(this.element.id),this.removeDragListeners())}handleDoubleClick(e){const t=this.element.data.type,n=[R.IMAGE_SLUG,R.LEGACY_IMAGE_SLUG,R.OXY_IMAGE_SLUG];if(this.contentEditablePropertyPath)this.enableContentEditableAndFocus(e);else if(t===R.RICH_TEXT_SLUG)(0,be.of)("CMD_E");else if(n.includes(t))document.dispatchEvent(new CustomEvent("open-media-dialog",{cancelable:!0}));else if(this.isInlineEditable){const e=this.inlineBlockId;if(e){if(this.isAlreadyEditingInline)return;(0,We.B7)({elementId:this.element.id,blockId:e})}}}get isAlreadyEditingInline(){return this.isInlineEditable&&m.uiStore.isElementBeingEditedInline(this.element.id)}get isInlineEditable(){return(0,We.up)(this.baseElement)}get inlineBlockId(){const e=this.baseElement.nestingRule.inlineEditableBlockPath;return e?a()(this.twigProps,e):null}enableContentEditableAndFocus(e){const t=e.target;let n=null;if(n=t.dataset.contentEditablePropertyPath||t.dataset.nodeId?t:t.closest("[data-content-editable-property-path]"),!n)return;const s=n.dataset.contentEditablePropertyPath;if(s){const e=a()(this.twigProps,(0,Q.k2)(s)),t=!!e&&(0,Q.Tc)(e);if(t)return}const i="true"===n.getAttribute("contenteditable");if(i)return;m.uiStore.setContentEditableElementId(this.element.id);const o=t.dataset.contentEditablePropertyPath||this.contentEditablePropertyPath;o&&m.singularityStore.setTextEditorPanelState({elementId:this.element.id,contentEditablePropertyPath:o}),n.setAttribute("contenteditable","true"),n.focus(),window.Breakdance.canvas.document.addEventListener("keydown",this.handleKeydownInsideContentEditable),n.addEventListener("paste",this.pasteWithoutFormatting)}saveContentEditable(e){const t=e.target;window.Breakdance.canvas.document.removeEventListener("keydown",this.handleKeydownInsideContentEditable),t.removeEventListener("paste",this.pasteWithoutFormatting),t.setAttribute("contenteditable","false"),m.uiStore.setContentEditableElementId(null);const n=t.dataset.contentEditablePropertyPath||this.contentEditablePropertyPath;if(!n)return;t.innerHTML=t.innerHTML.trim();const s=t.childNodes[t.childNodes.length-1];s&&"BR"===s.tagName&&s.remove();const i=document.createElement("textarea");i.innerHTML=t.innerHTML;const o=i.value,r=a()(this.element.data.properties,n);r!==o&&m.documentStore.throttledPropertyChanged({elementId:this.element.id,path:n,value:o,meta:{snapshotLabel:he.AZ.forElementBasingOnChangedStorePropertyPath(this.baseElement,n,ge.P.CHANGE)}})}pasteWithoutFormatting(e){const t=e.clipboardData?.getData("text/plain");t&&(window.Breakdance.canvas.document.execCommand("insertHTML",!1,(0,ve.h)(t)),e.preventDefault())}handleKeydownInsideContentEditable(e){return"Space"===e.code?(e.preventDefault(),e.stopPropagation(),void window.Breakdance.canvas.document.execCommand("insertText",!1," ")):"Enter"===e.code?(window.Breakdance.canvas.document.execCommand("insertLineBreak"),void e.preventDefault()):"Escape"===e.code||(e.ctrlKey||e.metaKey)&&"s"===e.key?(e.preventDefault(),void this.saveContentEditable(e)):void 0}loadDynamicData(e){(0,h.y9)(e).then((e=>{m.configStore.setNewDynamicDataCacheEntries(e)}))}};(0,c.gn)([(0,u.fI)()],ze.prototype,"element",void 0),(0,c.gn)([(0,u.fI)()],ze.prototype,"parentId",void 0),(0,c.gn)([(0,u.fI)()],ze.prototype,"ssrParentProperties",void 0),(0,c.gn)([(0,u.RL)("ssrParentProperties",{deep:!0})],ze.prototype,"rerenderFromServeOnParentPropertyChange",null),(0,c.gn)([(0,u.RL)("refreshSsr")],ze.prototype,"rerenderFromServerOnRefreshSsr",null),(0,c.gn)([(0,u.RL)("twigProps")],ze.prototype,"maybeRerenderFromServerOnPropertyChange",null),(0,c.gn)([(0,u.RL)("breakpoints",{deep:!0})],ze.prototype,"onBreakpointsChange",null),(0,c.gn)([(0,u.RL)("twigProps",{deep:!0,immediate:!0})],ze.prototype,"onTwigPropsChange",null),(0,c.gn)([(0,u.RL)("preset",{deep:!0,immediate:!0})],ze.prototype,"onPresetChange",null),(0,c.gn)([(0,u.RL)("variables",{deep:!0,immediate:!0})],ze.prototype,"onVariablesChange",null),(0,c.gn)([(0,u.RL)("baseElement.cssTemplate")],ze.prototype,"onCssTemplateChange",null),(0,c.gn)([(0,u.RL)("baseElement.defaultCss")],ze.prototype,"onDefaultCssChange",null),(0,c.gn)([(0,u.RL)("baseElement.dependencies",{deep:!0})],ze.prototype,"onInternalDependenciesChange",null),(0,c.gn)([(0,u.RL)(`globalSettings.${me.r.typographyPresets}`,{deep:!0})],ze.prototype,"refreshIfTypographyPresetsChange",null),(0,c.gn)([(0,u.RL)("elementChildrenCount",{})],ze.prototype,"elementChildrenCountChanged",null),(0,c.gn)([(0,u.RL)("lastModifiedTreeNodePropertyForWatcher",{immediate:!0})],ze.prototype,"handleLastModifiedTreeNodePropertyChange",null),(0,c.gn)([(0,u.RL)("currentlyDraggingForWatcher",{immediate:!0})],ze.prototype,"handleCurrentlyDraggingChange",null),(0,c.gn)([(0,u.RL)("activeElementIdForWatcher",{immediate:!0})],ze.prototype,"handleActiveElementIdChange",null),(0,c.gn)([(0,u.RL)("isElementUpdatingForWatcher",{immediate:!0})],ze.prototype,"handleLoadingElementIdChange",null),ze=$e=(0,c.gn)([(0,u.wA)({})],ze);const He=ze,Ge=He;var Ke,je,qe=(0,K.Z)(Ge,Ke,je,!1,null,null,null);const Xe=qe.exports},3565:(e,t,n)=>{n.d(t,{Z:()=>v});var s=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-empty-container",attrs:{id:"breakdance-empty-container"}},[t("div",{staticClass:"breakdance-empty-container__add-element",class:{"breakdance-empty-container__add-element--disabled":!e.canAddElement},on:{click:e.openAddPanel}},[t("Icon",{attrs:{icon:"PlusIcon",size:"22"}})],1)])},i=[],o=n(70655),a=n(85450),r=n(20144),l=n(38085),c=n(95690),d=n(85283);let u=class extends r.ZP{get canAddElement(){return a.uiStore.hasFullAccess}openAddPanel(e){e.preventDefault(),e.stopPropagation(),this.canAddElement&&((0,c.oM)("add"),a.uiStore.activateElement(this.id))}};(0,o.gn)([(0,l.fI)({default:null})],u.prototype,"id",void 0),u=(0,o.gn)([(0,l.wA)({components:{Icon:d.Z}})],u);const p=u,h=p;var g=n(1001),m=(0,g.Z)(h,s,i,!1,null,null,null);const v=m.exports},22996:(e,t,n)=>{n.d(t,{Z:()=>P});var s=n(1387),i=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[e._v(" "+e._s(e.__("Default Children"))+" "),t("Repeater",{attrs:{value:e.value||[],"default-new-value":e.defaultValue,control:e.repeaterOptions},on:{input:function(t){return e.updateDefaultElements(t)}},scopedSlots:e._u([{key:"default",fn:function({index:n,value:i}){return[t(s.Z,{staticClass:"mb-2",attrs:{value:i.slug,items:e.elementsAvailableForThisElementNestingType,hint:e.__("Element that will be automatically added inside this current element"),"persistent-hint":"",clearable:""},on:{input:function(t){return e.updatePath(t,n,"slug")}}}),i.slug&&e.canHaveChildren(i.slug)?t("ElementStudioDefaultElements",{staticClass:"mb-2",attrs:{value:i.children,"parent-element-slug":i.slug,"allow-import":!1},on:{input:function(t){return e.updatePath(t,n,"children")}}}):e._e(),i.slug?t("ElementStudioDefaultProperties",{attrs:{value:i.defaultProperties||!1,"element-slug":i.slug},on:{input:function(t){return e.updatePath(t,n,"defaultProperties")}}}):e._e()]}}])}),e.allowImport?t("div",[t("br"),t("div",{staticClass:"mb-2"},[e._v(" "+e._s(e.__("Import all children of the currently active element"))+" ")]),t("NiceButton",{attrs:{disabled:!e.canImport},on:{click:e.importChildren}},[e._v(" "+e._s(e.__("Import Children"))+" ")])],1):e._e()],1)},o=[],a=n(70655),r=n(20144),l=n(38085),c=n(34680),d=n.n(c),u=n(31044),p=n(16888),h=n(15133),g=n(62485),m=n(23128),v=n(9950),y=n(41571),f=n(36798),_=n(79333),b=n(36055);let S=class extends r.ZP{constructor(){super(...arguments),this.defaultValue={},this.repeaterOptions={options:{repeaterOptions:{defaultTitle:(0,b.__)("Default Element"),titleTemplate:"{slug}",buttonName:(0,b.__)("Add new default element")}}}}beforeCreate(){this.$options.components.ElementStudioDefaultElements=n(22996).Z}updateDefaultElements(e){this.$emit("input",e)}canHaveChildren(e){if(!e)return!1;const t=u.PK.element(e),n=t.nestingRule.type;return!n.startsWith("final")}get canImport(){return!!u.kD.activeElement&&u.kD.activeElement.data.type===this.context.element().slug}importChildren(){if(!u.kD.activeElement)return;const e=t=>({slug:t.data.type,defaultProperties:t.data.properties,children:t.children.map(e)}),t=(0,m.Z)(u.kD.activeElement),n=t.children.map(e);this.updateDefaultElements(n)}get elementsAvailableForThisElementNestingType(){return Object.keys(u.PK.elements).filter((e=>{const t=u.PK.element(this.parentElementSlug),n=u.PK.element(e).nestingRule;return(0,v.V4)(n,t.nestingRule,t.slug)}))}updatePath(e,t,n){const s=(0,m.Z)(this.value)||{};s[t][n]=e,this.$emit("input",s)}};(0,a.gn)([(0,l.fI)()],S.prototype,"value",void 0),(0,a.gn)([(0,l.fI)()],S.prototype,"parentElementSlug",void 0),(0,a.gn)([(0,l.fI)({default:!0})],S.prototype,"allowImport",void 0),(0,a.gn)([(0,l.tB)("context")],S.prototype,"context",void 0),S=(0,a.gn)([(0,l.wA)({components:{NiceButton:_.Z,ElementStudioDefaultProperties:f.Z,TextInput:y.Z,Repeater:g.Z,Dropdown:h.Z,Accordion:p.Z,draggable:d()}})],S);const C=S,x=C;var w=n(1001),I=(0,w.Z)(x,i,o,!1,null,null,null);const P=I.exports},36798:(e,t,n)=>{n.d(t,{Z:()=>S});var s=n(37179),i=n(73385),o=n(75223),a=n(12570),r=n(55234),l=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("h3",{staticClass:"mb-1"},[e._v(e._s(e.__("Default Properties")))]),t(s.Z,{staticClass:"mr-2",attrs:{small:"",text:"",disabled:!e.canImport,outlined:""},on:{click:e.importDefaultProperties}},[e._v(" "+e._s(e.__("Import"))+" ")]),e.value?t(s.Z,{attrs:{color:"red darken-1",text:"",small:"",outlined:""},on:{click:e.clearDefaultProperties}},[e._v(" "+e._s(e.__("Clear"))+" ")]):e._e(),t("div",{staticClass:"element-studio-default-properties-instructions"},[e._v(" "+e._s(e.sprintf(e._doc("Click IMPORT to set the default properties to the properties of the currently active element. Active element must be a %s.","%s: Element slug name"),e.elementSlugBold))+" ")]),t("h5",[e._v(e._s(e.__("Current Default Properties")))]),t("pre",{staticClass:"element-studio-default-properties-preview"},[e._v(e._s(e.value))]),t(a.Z,{attrs:{"max-width":"500"},model:{value:e.dialogOpen,callback:function(t){e.dialogOpen=t},expression:"dialogOpen"}},[t(i.Z,[t(o.EB,{staticClass:"headline"},[e._v(" "+e._s(e.__("Set Default Properties"))+" ")]),t(o.ZB,[e._v(" "+e._s(e.sprintf(e._doc("Set default properties for %s to:","%s: Element name"),e.elementSlug))),t("br"),t("br"),e._v(" "+e._s(e.defaultProperties)+" ")]),t(o.h7,[t(s.Z,{attrs:{color:"red darken-1",text:""},on:{click:e.cancel}},[e._v(" "+e._s(e.__("Cancel"))+" ")]),t(r.Z),t(s.Z,{attrs:{color:"blue darken-1",text:""},on:{click:e.confirmDefaultProperties}},[e._v(" "+e._s(e.__("Confirm"))+" ")])],1)],1)],1)],1)},c=[],d=n(70655),u=n(20144),p=n(38085),h=n(85450),g=n(23128),m=n(36055);let v=class extends u.ZP{constructor(){super(...arguments),this.dialogOpen=!1,this.defaultProperties=this.value}get canImport(){return!!h.uiStore.activeElement&&h.uiStore.activeElement.data.type===this.elementSlug}get elementSlugBold(){return`<b>${this.elementSlug}</b>`}cancel(){this.dialogOpen=!1}importDefaultProperties(){if(!h.uiStore.activeElement)return;if(h.uiStore.activeElement.data.type!==this.elementSlug)return;const e=(0,g.Z)(h.uiStore.activeElement.data.properties);e&&("settings"in e&&delete e.settings,"meta"in e&&delete e.meta),this.defaultProperties=e,this.dialogOpen=!0}confirmDefaultProperties(){this.dialogOpen=!1,this.$emit("input",this.defaultProperties)}clearDefaultProperties(){confirm((0,m.__)("are you sure?"))&&this.$emit("input",!1)}};(0,d.gn)([(0,p.fI)()],v.prototype,"value",void 0),(0,d.gn)([(0,p.fI)()],v.prototype,"elementSlug",void 0),v=(0,d.gn)([(0,p.wA)({components:{}})],v);const y=v,f=y;var _=n(1001),b=(0,_.Z)(f,l,c,!1,null,null,null);const S=b.exports},71600:(e,t,n)=>{n.d(t,{Z:()=>O});var s=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"structure-node-children"},[e._l(e.nodes,(function(n){return[t("StructureNode",{key:n.id,attrs:{element:n,depth:e.depth}})]}))],2)},i=[],o=n(70655),a=n(20144),r=n(38085),l=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:{"structure-node":!0,"breakdance--currently-dragging":this.currentlyDragging,"is-opened":"oxygen"===e.builderMode&&e.shouldShowChildrenNodes},style:"oxygen"===e.builderMode?e.indentAsCssVariableStyle:null,attrs:{"data-element-id":e.element.id}},[t("div",{staticClass:"structure-node-title-wrapper"},[t("div",{staticClass:"structure-node-title",class:e.activeClass,style:e.indentStyle,on:{click:e.activateElement}},[t("div",{staticClass:"structure-node-title-real"},[t("div",{staticClass:"structure-node-toggle-wrapper"},[e.element.children.length?t("Icon",{staticClass:"structure-node-action__icon",attrs:{icon:"breakdance"===e.builderMode?"CaretDownIcon":"ChevronDownSolidIcon",size:"10",rotate:e.shouldShowChildrenNodes?void 0:"270"},on:{click:function(t){return t.stopPropagation(),e.toggleChildren.apply(null,arguments)}}}):e._e()],1),t("div",{class:{"structure-node-title-real-real":!0,"structure-panel-editing-friendly-name":e.editingFriendlyName}},[t("ElementIcon",{staticClass:"structure-node-icon",attrs:{icon:e.getElementIcon(e.element),size:"12"}}),t("div",{staticClass:"element-title-text",attrs:{title:e.getElementName(e.element)}},[e.editingFriendlyName?e._e():t("span",{staticClass:"element-title-name ellipsis-text",on:{dblclick:e.enableEditingFriendlyName}},[e._v(" "+e._s(e.getElementName(e.element))+" ")]),e.editingFriendlyName?t("input",{ref:"friendlyNameInputRef",staticClass:"element-custom-name-input",attrs:{size:e.friendlyNameInputValue,spellcheck:"false"},domProps:{value:e.friendlyNameInputValue},on:{input:function(t){return e.updateFriendlyName(t.target.value)},keyup:[function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"delete",[8,46],t.key,["Backspace","Delete","Del"]))return null;e.showElementNameFallback=!1},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.disableEditing.apply(null,arguments)}],blur:e.disableEditing,mousedown:function(t){return t.stopPropagation(),e.noop.apply(null,arguments)},contextmenu:function(t){return t.stopPropagation(),e.noop.apply(null,arguments)}}}):e._e(),e.isDraftSection&&!e.editingFriendlyName?t("span",{staticClass:"element-title__meta"},[e._v(" (Draft) ")]):e._e(),e.isShowingIdsInStructurePanel&&!e.editingFriendlyName?t("span",{staticClass:"element-title__meta"},[e._v(" #"+e._s(e.element.id)+" ")]):e._e()]),e.editingFriendlyName?e._e():t("div",{staticClass:"structure-node-actions__wrapper"},[t("Icon",{staticClass:"structure-node-action__icon mr-2",attrs:{size:"12",icon:"breakdance"===e.builderMode?"BarsIcon":"GripDotsVerticalIcon",title:"Open menu"},on:{click:e.showContextMenu}}),t("Icon",{staticClass:"structure-node-action__icon mr-2",attrs:{icon:"breakdance"===e.builderMode?"DuplicateIcon":"DuplicateSolidIcon",title:"Duplicate element"},on:{click:e.duplicate}}),t("Icon",{staticClass:"structure-node-action__icon mr-2",attrs:{size:"12",icon:"breakdance"===e.builderMode?"TrashIcon":"TrashSolidIcon",title:"Delete element"},on:{click:e.remove}})],1)],1)])]),t("div",{staticClass:"nest-deeper",style:e.nestDeeperStyle,attrs:{"data-element-id":e.element.id}}),t("div",{staticClass:"nest-shallower",style:e.nestShallowerStyle,attrs:{"data-element-id":e.element.id}}),t("div",{staticClass:"top-half",attrs:{"data-element-id":e.element.id,"data-depth":e.depth}}),t("div",{staticClass:"bottom-half",attrs:{"data-element-id":e.element.id,"data-depth":e.depth}})]),e.shouldShowChildrenNodes?t("ChildStructureNodes",{attrs:{nodes:e.element.children,depth:e.depth+1}}):e._e()],1)},c=[],d=n(27361),u=n.n(d),p=n(85450),h=n(23128),g=n(85283),m=n(78),v=n(95690),y=n(98992),f=n(94550),_=n(34676),b=n(20210),S=n(21115);const C=16;let x=class extends a.ZP{constructor(){super(...arguments),this.showElementNameFallback=!0,this.editingFriendlyName=!1}get builderMode(){return p.configStore.builderMode}get indentAsCssVariableStyle(){return{"--indent-amount":this.depth*C+"px"}}get shouldShowChildrenNodes(){return(0,y.sF)(this.element.id)}beforeCreate(){this.$options.components.ChildStructureNodes=n(71600).Z}activateElement(){p.uiStore.activateElement(this.element.id),(0,v.iN)("elementproperties")!==(0,v.iN)("structure")&&(0,v.oM)("elementproperties")}get baseElement(){return p.configStore.element(this.element.data.type)}get activeClass(){return{"breakdance--active-element":p.uiStore.activeElementId===this.element.id}}get indentStyle(){const e=this.depth*C;return{marginLeft:`${e}px`,width:`calc(100% - 1px - ${e}px`}}get nestDeeperStyle(){const e=(this.depth+1)*C;return{left:`${e}px`}}get nestShallowerStyle(){const e=this.depth*C;return{width:`${e}px`}}get elementName(){return p.configStore.element(this.element.data.type).name}get currentlyDragging(){return p.uiStore.currentlyDraggingCanvasElementId===this.element.id}get isShowingIdsInStructurePanel(){return p.uiStore.settings.showElementIdInStructurePanel}duplicate(){p.documentStore.duplicateElementAndActivateIt(this.element.id)}getElementIcon(e){return(0,b.Ff)(e)}getElementName(e){return(0,b.mH)(e)}showContextMenu(e){const t=(0,S.n)(e.clientX,e.clientY);p.uiStore.setOnStructurePanelRightClickMenuState({elementId:this.element.id,position:t})}remove(){p.documentStore.deleteElement({nodeId:this.element.id})}toggleChildren(){const e=(0,h.Z)(p.uiStore.structurePanelNodesExpandedState);e[this.element.id]=!this.shouldShowChildrenNodes,p.uiStore.setStructurePanelNodesExpandedState(e)}get isDraftSection(){return this.element.data.type===f.SECTION_SLUG&&u()(this.element.data.properties,"settings.advanced.draft")}get friendlyNameInputValue(){return void 0===this.element.data.properties?.meta?.friendlyName&&this.showElementNameFallback?(this.showElementNameFallback=!1,this.elementName):(this.editingFriendlyName&&(this.showElementNameFallback=!1),this.element.data.properties?.meta?.friendlyName&&this.element.data.properties?.meta?.friendlyName.trim())}enableEditingFriendlyName(){this.editingFriendlyName=!0,(0,_.forceNextTick)((()=>{this.$refs.friendlyNameInputRef.focus(),this.$refs.friendlyNameInputRef.select()}))}updateFriendlyName(e){p.documentStore.unthrottledPropertyChanged({elementId:this.element.id,path:"meta.friendlyName",meta:{snapshotLabel:`Updated friendly name for element "${this.elementName}"`},value:e?.trim()||void 0})}disableEditing(){this.editingFriendlyName=!1,this.showElementNameFallback=!0}noop(e){return e.stopPropagation(),{}}};(0,o.gn)([(0,r.fI)()],x.prototype,"element",void 0),(0,o.gn)([(0,r.fI)()],x.prototype,"depth",void 0),x=(0,o.gn)([(0,r.wA)({name:"StructureNode",components:{ElementIcon:m.Z,Icon:g.Z}})],x);const w=x,I=w;var P=n(1001),k=(0,P.Z)(I,l,c,!1,null,null,null);const E=k.exports;let T=class extends a.ZP{};(0,o.gn)([(0,r.fI)()],T.prototype,"nodes",void 0),(0,o.gn)([(0,r.fI)()],T.prototype,"depth",void 0),T=(0,o.gn)([(0,r.wA)({components:{StructureNode:E},name:"ChildStructureNodes"})],T);const D=T,A=D;var Z=(0,P.Z)(A,s,i,!1,null,null,null);const O=Z.exports},95324:(e,t,n)=>{n.r(t),n.d(t,{default:()=>hs});var s=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-control",class:{[`oxy-control--${e.control.type}`]:!0,[`oxy-control--${e.control.positionLabel}`]:e.control.positionLabel,["oxy-control--hide-label"]:e.control.hideLabel,["oxy-control--disabled"]:e.disabled,["is-filled"]:e.filled},style:{gridColumnStart:e.control.width?`span ${e.control.width}`:""},attrs:{"data-name":e.control.slug}},[e.showLabel?t("OxygenControlName",{attrs:{filled:e.filled,path:e.fullPath,"apply-fill-class":!1},on:{reset:e.resetControl}},[e._v(" "+e._s(e.control.name)+" ")]):e._e(),e.isVariableSupported?t("VariableBoundInput",{attrs:{name:e.control.name,"color-type":e.control.colorType,type:e.variableType,small:!0,path:e.fullPath},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}},[t(e.componentName,{tag:"component",attrs:{control:e.control,path:e.fullPath,context:e.context,placeholder:e.placeholder},on:{"update-context":function(t){return e.$emit("update-context",t)}},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1):t(e.componentName,{tag:"component",attrs:{control:e.control,path:e.fullPath,context:e.context,placeholder:e.placeholder},on:{"update-context":function(t){return e.$emit("update-context",t)}},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},i=[],o=n(70655),a=n(38085),r=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-gap-input",class:{"oxy-gap-input--expand":e.isGlobalVariable&&!e.bothSides}},[e.bothSides?[t("OxygenControl",{staticClass:"oxy-gap-input__unit",attrs:{value:e.syncedValue?.row,control:e.rowControl,path:e.path},on:{input:e.updateRow}}),t("OxygenControl",{staticClass:"oxy-gap-input__unit",attrs:{value:e.syncedValue?.column,control:e.columnControl,path:e.path},on:{input:e.updateColumn}})]:[e.isGlobalVariable?e._e():t("div",[t("Slider",{attrs:{value:e.syncedValue?.column?.number,min:0,max:100,step:1,expanded:!0},on:{input:e.updateSlider}})],1),t("OxygenControl",{staticClass:"oxy-gap-input__unit",attrs:{value:e.syncedValue?.column,control:e.allUnitControls,path:e.path},on:{input:e.updateAllSides}})],t("Icon",{staticClass:"oxy-gap-input__toggle",attrs:{icon:e.bothSides?"UnlockIcon":"LockIcon"},on:{click:function(t){e.bothSides=!e.bothSides}}})],2)},l=[],c=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-unit-input"},[t("UnitInput",{attrs:{options:e.options,"range-options":e.rangeOptions,placeholder:e.placeholder},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},d=[],u=n(56823);let p=class extends a.w3{get options(){return{defaultType:this.control.defaultType,types:this.control.types}}get rangeOptions(){return{min:this.control.min,max:this.control.max,step:this.control.step}}};(0,o.gn)([(0,a.fI)()],p.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],p.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],p.prototype,"placeholder",void 0),p=(0,o.gn)([(0,a.wA)({components:{UnitInput:u.Z}})],p);const h=p,g=h;var m=n(1001),v=(0,m.Z)(g,c,d,!1,null,null,null);const y=v.exports;var f=n(85283),_=n(22608),b=n(74799),S=n(42274),C=n(90889),x=n(37156);let w=class extends a.w3{constructor(){super(...arguments),this.bothSides=!1}get isGlobalVariable(){return(0,C.Hk)(this.syncedValue?.column)||(0,C.Hk)(this.syncedValue?.row)}beforeCreate(){this.$options.components.OxygenControl=n(95324)["default"]}onBothSidesChange(){this.bothSides&&(this.syncedValue={row:this.syncedValue?.column,column:this.syncedValue?.column})}get inheritance(){return this.context.getControlInheritanceByPrefix(this.path)}getPlaceholder(e){const t=this.inheritance?.[e];if((0,x.a0)(t))return t.value}get allUnitControls(){return{type:"unit",name:"Gap",slug:"unit",hideLabel:!0,placeholder:this.getPlaceholder("column")}}get rowControl(){return{type:"unit",name:"Row",slug:"row",positionLabel:"bottom",placeholder:this.getPlaceholder("row")}}get columnControl(){return{type:"unit",name:"Column",slug:"column",positionLabel:"bottom",placeholder:this.getPlaceholder("column")}}updateSlider(e){const t=this.syncedValue?.column?.unit||"px",n=(0,S.r)(e,t)||"",s={number:e,unit:t,style:`${n}`};this.syncedValue={column:s,row:s}}updateAllSides(e){this.syncedValue={column:e,row:e}}updateRow(e){this.syncedValue={column:this.syncedValue?.column,row:e}}updateColumn(e){this.syncedValue={row:this.syncedValue?.row,column:e}}};(0,o.gn)([(0,a.fI)()],w.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],w.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],w.prototype,"path",void 0),(0,o.gn)([(0,a.tB)({from:"oxyContext"})],w.prototype,"context",void 0),(0,o.gn)([(0,a.RL)("bothSides")],w.prototype,"onBothSidesChange",null),w=(0,o.gn)([(0,a.wA)({components:{Icon:f.Z,Slider:b.Z,IconButton:_.Z,OxygenUnitInput:y}})],w);const I=w,P=I;var k=(0,m.Z)(P,r,l,!1,null,null,null);const E=k.exports;var T=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-font-input"},[t("FontFamilyInput",{attrs:{placeholder:e.placeholder},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},D=[],A=n(40616);let Z=class extends a.w3{};(0,o.gn)([(0,a.fI)()],Z.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input",{type:String})],Z.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],Z.prototype,"placeholder",void 0),Z=(0,o.gn)([(0,a.wA)({components:{FontFamilyInput:A.Z}})],Z);const O=Z,M=O;var B=(0,m.Z)(M,T,D,!1,null,null,null);const L=B.exports;var N=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-group",style:e.style},[t("OxygenControls",{attrs:{controls:e.control.controls,path:e.path},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},F=[];let R=class extends a.w3{beforeCreate(){this.$options.components.OxygenControls=n(82078).Z}get style(){return this.control.columns?{"--controls-columns":this.control.columns}:{}}};(0,o.gn)([(0,a.fI)()],R.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],R.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],R.prototype,"path",void 0),R=(0,o.gn)([(0,a.wA)({components:{Icon:f.Z}})],R);const V=R,$=V;var W=(0,m.Z)($,N,F,!1,null,null,null);const U=W.exports;var z=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-color-input"},[t("ColorInput",{attrs:{"color-options":e.options,inline:e.control.inline,"show-input":!e.control.inline,small:!0,position:"left","show-global":!1,placeholder:e.placeholder},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},H=[],G=n(71821),K=n(74142);let j=class extends a.w3{get options(){return{type:this.control?.colorType||"solidOnly"}}};(0,o.gn)([(0,a.fI)()],j.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],j.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],j.prototype,"placeholder",void 0),j=(0,o.gn)([(0,a.wA)({components:{ColorPicker:K.Z,ColorInput:G.Z}})],j);const q=j,X=q;var Y=(0,m.Z)(X,z,H,!1,null,null,null);const Q=Y.exports;var J=n(53204),ee=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{ref:"container",staticClass:"oxy-margin-padding-input",class:{["oxy-margin-padding-input--disable-margin"]:"padding"===e.draggingType,["oxy-margin-padding-input--disable-padding"]:"margin"===e.draggingType},on:{mouseenter:e.onMouseEnter,mouseleave:e.onMouseLeave}},[t("div",{staticClass:"oxy-margin-oxy-padding-drag-bars-wrapper"},[t("div",{staticClass:"oxy-margin-drag-bars"},[t("span",{staticClass:"oxy-margin-label"},[e._v(e._s(e.__("Margin")))]),e._l(e.sides,(function(n){return t("MarginPaddingInputDragBar",{key:`margin-${n}`,attrs:{value:e.value?.margin?.[n],type:"margin",side:n,path:e.path,active:e.isSideActive("margin",n),placeholder:e.getPlaceholder("margin",n),"is-inheriting":e.isInheriting("margin",n),"is-overwritten":e.isOverwritten("margin",n)},on:{input:function(t){return e.updateProperty("margin",n,t)},mouseenter:function(t){return e.setHoveredType("margin",n)},dragging:function(t){return e.setDragging(t,"margin")}}})}))],2),t("div",{staticClass:"oxy-padding-drag-bars",on:{mouseenter:function(t){return e.setHoveredType("padding")}}},[t("span",{staticClass:"oxy-margin-label"},[e._v(e._s(e.__("Padding")))]),e._l(e.sides,(function(n){return t("MarginPaddingInputDragBar",{key:`padding-${n}`,attrs:{value:e.value?.padding?.[n],type:"padding",side:n,path:e.path,active:e.isSideActive("padding",n),placeholder:e.getPlaceholder("padding",n),"is-inheriting":e.isInheriting("padding",n),"is-overwritten":e.isOverwritten("padding",n)},on:{input:function(t){return e.updateProperty("padding",n,t)},mouseenter:function(t){return e.setHoveredType("padding",n)},dragging:function(t){return e.setDragging(t,"padding")}}})}))],2)])])},te=[],ne=n(20144),se=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Dropdown",{attrs:{"max-width":e.width,"min-width":e.width,transition:!1,absolute:!0,"position-y":e.menuPosition.y,"position-x":e.menuPosition.x,"close-on-content-click":!1,"content-class":"margin-padding-input-dropdown"},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:s}){return[t("div",{ref:"activator",class:e.classList,on:{mousedown:e.dragStart,mouseenter:function(t){return e.$emit("mouseenter",t)},dblclick:function(t){return t.stopPropagation(),e.handleDoubleClick.apply(null,arguments)}}},[t("div",e._g(e._b({staticClass:"margin-padding-input-drag-bar-click-area"},"div",s,!1),n),[t("oxygen-display-value",{staticClass:"margin-padding-input-drag-bar-value",attrs:{"is-filled":!!e.value,"is-inheriting":e.isInheriting,"is-overwritten":e.isOverwritten,"is-variable":e.isGlobalVariable}},[e._v(" "+e._s(e.displayValue)+" ")])],1)])]}}]),model:{value:e.open,callback:function(t){e.open=t},expression:"open"}},[t("div",{ref:"container",staticClass:"margin-padding-input-dropdown__content"},[t("OxygenControl",{attrs:{control:e.dropdownUnitControl,value:e.value,path:`${e.path}.${e.type}`},on:{input:function(t){return e.$emit("input",{value:t,modifierKey:e.dropdownModifierKey})}}}),t("div",{staticClass:"margin-padding-input-presets"},e._l(e.modifiers,(function(n){return t("button",{key:n.value,staticClass:"margin-padding-input-preset",class:{"margin-padding-input-preset--active":e.dropdownModifier===n.value},attrs:{type:"button"},on:{click:function(t){return e.setDropdownModifier(n.value)}}},[e._v(" "+e._s(n.label)+" ")])})),0)],1)])},ie=[],oe=n(23493),ae=n.n(oe),re=n(15133),le=n(12721),ce=n(85450),de=n(95690),ue=n(79333),pe=n(16980),he=n(36055);let ge=class extends ne.ZP{constructor(){super(...arguments),this.open=!1,this.mouseDragInfo=!1,this.numberWhenDragStarted=!1,this.dropdownModifier="",this.easyEvent=new le.hF,this.transitionKey=void 0,this.throttledDragging=ae()(this.dragging,60),this.menuPosition={x:0,y:0}}onOpenChange(){this.updateMenuPosition(),this.open?(ce.uiStore.setPanelState({...ce.uiStore.panelState,oxyPanelIsMasked:!0}),this.$nextTick((()=>{this.focusOnInput()}))):ce.uiStore.setPanelState({...ce.uiStore.panelState,oxyPanelIsMasked:!1})}onValueChange(){this.updateMenuPosition(),"center_horizontally"===this.dropdownModifier&&"auto"!==this.value?.unit&&(this.dropdownModifier="")}get dropdownUnitControl(){return{type:"unit",name:`${this.type}-${this.side}`,slug:this.side}}get displayValue(){const e=this.placeholder?this.placeholder:this.value;return this.isGlobalVariable?this.shorten(this.variableLabel):0!==e?.number&&e?"custom"===e?.unit?this.shorten(e.number):this.shorten(e?.style):"0"}get isGlobalVariable(){return(0,C.Hk)(this.value)}get variable(){return(0,C.X_)(this.value)}get overrideVariable(){return(0,C.jN)().find((e=>e.id===this.variable?.id))}get variableLabel(){return this.overrideVariable?this.overrideVariable.label:this.variable?.label}get modifiers(){const e=[{value:"apply_all",label:(0,he.__)("Apply all (=)")},{value:"apply_opposite",label:(0,he.__)("Apply opposite")},{value:"center_horizontally",label:(0,he.__)("Center horizontally"),type:"margin",sides:["left","right"]}];return e.filter((({type:e,sides:t})=>(!e||e===this.type)&&!(t&&!t.includes(this.side))))}get width(){return de.eF}get height(){return 43}get classList(){const e="left"===this.side||"right"===this.side;return{"margin-padding-input-drag-bar":!0,[`oxy-drag-cursor oxy-drag-cursor-${this.type}-${this.side}`]:!0,[`${this.type}-${this.side}-drag-bar`]:!0,"margin-padding-input-drag-bar-horizontal":e,"margin-padding-input-drag-bar--active":this.active,"margin-padding-input-drag-bar--placeholder":!!this.placeholder}}get elementId(){return ce.uiStore.activeElementId}dragCallback(e,t){if(!1===this.numberWhenDragStarted)return;const n="top"===this.side||"bottom"===this.side;let s=n?e.totalYChange:e.totalXChange;const i="padding"===this.type&&("right"===this.side||"bottom"===this.side)||"margin"===this.type&&("left"===this.side||"top"===this.side);i&&(s*=-1);const o=this.value?.unit?this.value.unit:"px";let a;["em"].includes(o)?(s/=10,a=Number(+(this.numberWhenDragStarted+s).toFixed(2))):a=+Number(this.numberWhenDragStarted+s).toFixed(0);const r={unit:o,number:a,style:`${a}${o}`};this.$emit("input",{value:r,modifierKey:t.altKey?"alt":t.shiftKey?"shift":void 0,transactionKey:this.transitionKey})}handleDoubleClick(e){this.$emit("input",{value:null,modifierKey:e.altKey?"alt":e.shiftKey?"shift":void 0})}emit(e){this.$emit("input",{value:e})}dragStart(e){e.stopPropagation(),this.transitionKey=`PropertyChange:Spacing:${this.elementId}:${Date.now()}`,this.mouseDragInfo={startX:e.clientX,startY:e.clientY,currentX:e.clientX,currentY:e.clientY,lastXChange:0,lastYChange:0,totalXChange:0,totalYChange:0},this.$emit("dragging",!0),this.easyEvent.on("mousemove",this.throttledDragging),this.easyEvent.on("mouseup",this.dragEnd),this.numberWhenDragStarted=Number.isNaN(Number(this.value?.number))?0:Number(this.value?.number),document.body.classList.add(`oxy-drag-global-cursor-${this.side}`)}dragging(e){e.preventDefault(),e.stopPropagation(),requestAnimationFrame((()=>this._draggingFunc(e)))}dragEnd(e){e.stopPropagation(),this.easyEvent.off("mousemove",this.throttledDragging),this.easyEvent.off("mouseup",this.dragEnd),this.transitionKey=void 0,this.open=!1,this.mouseDragInfo=!1,this.numberWhenDragStarted=!1;const t=this.side;document.body.classList.remove(`oxy-drag-global-cursor-${t}`),this.$emit("dragging",!1)}_draggingFunc(e){if(!this.mouseDragInfo)return;const t=e.clientX,n=e.clientY,s=t-this.mouseDragInfo.startX,i=n-this.mouseDragInfo.startY,o=1,a=Math.abs(s)>o||Math.abs(i)>o;a&&(this.mouseDragInfo={...this.mouseDragInfo,currentX:t,currentY:n,lastXChange:t-this.mouseDragInfo.currentX,lastYChange:n-this.mouseDragInfo.currentY,totalXChange:s,totalYChange:i},this.dragCallback(this.mouseDragInfo,e))}shorten(e){const t=`${e||""}`,n={margin:{top:30,bottom:30,left:5,right:5},padding:{top:6,bottom:16,left:5,right:5}},s=n[this.type][this.side],i=5,o=10;if(s<=o&&s>=i&&t.length>i)return`${t.slice(0,s)}...`;if(t.length<=s)return t;const a=Math.floor((s-3)/2),r=t.substring(0,a),l=t.substring(t.length-a);return`${r}...${l}`}updateMenuPosition(){const e=this.$refs.activator,t=e.getBoundingClientRect();this.menuPosition.x=t.x+(t.width/2-this.width/2),this.menuPosition.y=t.top+(t.height/2-this.height/2)}focusOnInput(){const e=this.$refs.container;setTimeout((()=>{const t=e.querySelector("input");t&&t.focus()}),100)}get dropdownModifierKey(){return"apply_all"===this.dropdownModifier?"shift":"apply_opposite"===this.dropdownModifier||"center_horizontally"===this.dropdownModifier?"alt":void 0}setDropdownModifier(e){if(e===this.dropdownModifier)return void(this.dropdownModifier="");this.dropdownModifier=e;const t={unit:"auto",number:"",style:"auto"},n="center_horizontally"===this.dropdownModifier?t:this.value;this.$emit("input",{value:n,modifierKey:this.dropdownModifierKey})}maybeToggleAll(e){if("="!==e.key)return;const t=this.$refs.container;t&&t.contains(document.activeElement)&&(e.preventDefault(),this.setDropdownModifier("apply_all"))}mounted(){addEventListener("keydown",this.maybeToggleAll)}beforeDestroy(){removeEventListener("keydown",this.maybeToggleAll)}};(0,o.gn)([(0,a.fI)()],ge.prototype,"value",void 0),(0,o.gn)([(0,a.fI)()],ge.prototype,"placeholder",void 0),(0,o.gn)([(0,a.fI)()],ge.prototype,"type",void 0),(0,o.gn)([(0,a.fI)()],ge.prototype,"path",void 0),(0,o.gn)([(0,a.fI)()],ge.prototype,"side",void 0),(0,o.gn)([(0,a.fI)({default:!1})],ge.prototype,"isInheriting",void 0),(0,o.gn)([(0,a.fI)({default:!1})],ge.prototype,"isOverwritten",void 0),(0,o.gn)([(0,a.fI)({default:!1})],ge.prototype,"active",void 0),(0,o.gn)([(0,a.RL)("open")],ge.prototype,"onOpenChange",null),(0,o.gn)([(0,a.RL)("value")],ge.prototype,"onValueChange",null),ge=(0,o.gn)([(0,a.wA)({components:{NiceButton:ue.Z,OxygenDisplayValue:pe.Z,OxygenControl:()=>Promise.resolve().then(n.bind(n,95324)),OxygenUnitInput:y,Dropdown:re.Z}})],ge);const me=ge,ve=me;var ye=(0,m.Z)(ve,se,ie,!1,null,null,null);const fe=ye.exports;let _e=class extends ne.ZP{constructor(){super(...arguments),this.easyEvent=new le.hF,this.modifierKey=null,this.hoveredType=null,this.hoveredSide=null,this.dragging=!1,this.draggingType=null,this.sides=["top","left","right","bottom"]}get inheritance(){return this.context.getControlInheritanceByPrefix(this.path)}updateProperty(e,t,n){let s;const i=n.value;if("padding"===e&&i&&Number(i.number)<0&&(i.number=0,i.style=`${i.number}${i.unit}`),n.modifierKey)if("alt"===n.modifierKey){const n=this.getOppositeSide(t);s={...this.value,[e]:{...this.value?.[e],[t]:i,[n]:i}}}else"shift"===n.modifierKey&&(s={...this.value,[e]:{...this.value?.[e],left:i,right:i,top:i,bottom:i}});else s={...this.value,[e]:{...this.value?.[e],[t]:i}};this.context.setControlValueAt(this.path,ce.uiStore.currentBreakpoint.id,s,n?.transactionKey)}isSideActive(e,t){if("shift"===this.modifierKey&&this.hoveredType===e)return!0;if("alt"===this.modifierKey&&this.hoveredType===e){const e=e=>"top"===e||"bottom"===e,n=e=>"left"===e||"right"===e;if(e(this.hoveredSide))return e(t);if(n(this.hoveredSide))return n(t)}return!1}setHoveredType(e,t){this.hoveredType=e,t&&(this.hoveredSide=t)}setDragging(e,t){e?(this.dragging=!0,this.draggingType=t):(this.dragging=!1,this.draggingType=null)}checkMetaKeys(e){e.altKey?this.modifierKey="alt":e.shiftKey?this.modifierKey="shift":this.modifierKey=null}onMouseEnter(e){this.checkMetaKeys(e),this.easyEvent.on("keyup",this.checkMetaKeys),this.easyEvent.on("keydown",this.checkMetaKeys)}onMouseLeave(){this.dragging||(this.hoveredType=null,this.hoveredSide=null,this.easyEvent.off("keyup",this.checkMetaKeys),this.easyEvent.off("keydown",this.checkMetaKeys))}beforeDestroy(){const e=this.$refs.container;e?.removeEventListener("mouseenter",this.onMouseEnter),e?.removeEventListener("mouseleave",this.onMouseLeave),this.easyEvent.off("keyup",this.checkMetaKeys),this.easyEvent.off("keydown",this.checkMetaKeys)}getOppositeSide(e){return"top"===e?"bottom":"left"===e?"right":"right"===e?"left":"top"}getPlaceholder(e,t){const n=`${e}.${t}`;return this.inheritance&&this.inheritance[n]&&(0,x.a0)(this.inheritance[n])?this.inheritance[n]?.value:null}isInheriting(e,t){const n=`${e}.${t}`;return!!this.inheritance&&(!!this.inheritance[n]&&(0,x.Ms)(this.inheritance[n]))}isOverwritten(e,t){const n=`${e}.${t}`;return!!this.inheritance&&(!!this.inheritance[n]&&(0,x.i7)(this.inheritance[n]))}};(0,o.gn)([(0,a.tB)({from:"oxyContext"})],_e.prototype,"context",void 0),(0,o.gn)([(0,a.fI)()],_e.prototype,"value",void 0),(0,o.gn)([(0,a.fI)()],_e.prototype,"placeholder",void 0),(0,o.gn)([(0,a.fI)()],_e.prototype,"path",void 0),_e=(0,o.gn)([(0,a.wA)({components:{MarginPaddingInputDragBar:fe}})],_e);const be=_e,Se=be;var Ce=(0,m.Z)(Se,ee,te,!1,null,null,null);const xe=Ce.exports;var we=n(70248),Ie=n(61908),Pe=n(11193),ke=n(43432),Ee=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-btn-bar"},[e._l(e.visibleItems,(function(n){return t(ke.Z,{key:n.label,attrs:{text:"Tooltip",bottom:"",disabled:!n?.hideLabel,"open-delay":500},scopedSlots:e._u([{key:"activator",fn:function({on:s,attrs:i}){return[t("button",e._g(e._b({ref:"items",refInFor:!0,staticClass:"oxy-btn-bar-item",class:{"oxy-btn-bar-item--active":n.value===e.syncedValue},on:{click:function(t){e.syncedValue=n.value}}},"button",i,!1),s),[n.iconHtml?t("span",{domProps:{innerHTML:e._s(n.iconHtml)}}):n.icon?t("Icon",{attrs:{icon:n.icon,size:12}}):e._e(),n?.hideLabel?e._e():t("span",{domProps:{innerHTML:e._s(n.shortLabel||n.label)}})],1)]}}],null,!0)},[t("span",{domProps:{innerHTML:e._s(n.label)}})])})),t("span",{staticClass:"oxy-btn-bar-indicator",class:{"oxy-btn-bar-indicator--placeholder":!e.syncedValue&&e.placeholder},style:e.styles}),e.control.hideAfter&&e.items.length>e.control.hideAfter?t("Dropdown",{attrs:{"offset-y":"","nudge-top":-8},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("button",e._g({staticClass:"oxy-btn-bar-menu"},n),[t("Icon",{attrs:{icon:"EllipsisSolidIcon",size:10}})],1)]}}],null,!1,836075016)},[t(we.Z,{attrs:{dense:""}},e._l(e.hiddenItems,(function(n,s){return t(Ie.Z,{key:s,on:{click:function(t){e.syncedValue=n.value}}},[t(Pe.V9,[e._v(e._s(n.label))])],1)})),1)],1):e._e()],2)},Te=[],De=n(16068),Ae=n(16747);let Ze=class extends a.w3{constructor(){super(...arguments),this.itemX=0,this.itemWidth=null,this.instant=!1}get displayValue(){return void 0!==this.placeholder?this.placeholder:this.syncedValue}get currentIndex(){return this.visibleItems?.findIndex((e=>e.value===this.displayValue))}onValueChange(){this.$nextTick((()=>{this.recalculateIndicator()}))}get items(){return this.control.items?.map(De.Kq)||[]}get visibleItems(){if(this.control.hideAfter){const e=this.items?.slice(0,this.control.hideAfter),t=e?.some((e=>e.value===this.displayValue)),n=this.items?.find((e=>e.value===this.displayValue));return n&&!t?e?.map(((t,s)=>s===e.length-1?{...n}:t)):e}return this.items}get hiddenItems(){const e=this.items?.slice(this.control.hideAfter-1)||[];return e.length>1&&e.push(e.shift()),e}get styles(){return{transition:this.instant?"none":"",transform:`translateX(${this.itemX}px)`,width:this.itemWidth?`${this.itemWidth}px`:"0px"}}recalculateIndicator(e=!1){this.instant=e,this.$nextTick((()=>{const e=this.$refs.items||[];if(-1===this.currentIndex||void 0==this.currentIndex)return void(this.itemWidth=null);const t=e[this.currentIndex];t&&(this.itemX=t.offsetLeft,this.itemWidth=t.offsetWidth)}))}mounted(){this.recalculateIndicator(!0),setTimeout((()=>this.recalculateIndicator(!0)),100)}};(0,o.gn)([(0,a.fI)()],Ze.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],Ze.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],Ze.prototype,"placeholder",void 0),(0,o.gn)([(0,a.RL)("syncedValue")],Ze.prototype,"onValueChange",null),Ze=(0,o.gn)([(0,a.wA)({components:{UnitDropdown:Ae.Z,Dropdown:re.Z,Icon:f.Z}})],Ze);const Oe=Ze,Me=Oe;var Be=(0,m.Z)(Me,Ee,Te,!1,null,null,null);const Le=Be.exports;var Ne=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-accordion"},[t("OxygenCopyPastContextMenu",{attrs:{name:e.control.name,path:e.path},scopedSlots:e._u([{key:"default",fn:function({openContextMenu:n}){return[t("button",{staticClass:"oxy-accordion-name",on:{click:function(t){e.open=!e.open},contextmenu:n}},[e._v(" "+e._s(e.control.name)+" "),e.filled?t("OxyIndicatorLights",{attrs:{"reset-on-click":!1}}):e._e(),t("Icon",{staticClass:"oxy-accordion-arrow",attrs:{icon:e.open?"ChevronDownIcon":"ChevronRightIcon",size:10}})],1)]}}]),model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}}),e.open?t("div",{staticClass:"oxy-accordion-content"},[t("OxygenControls",{attrs:{controls:e.filteredControls,path:e.fullPath},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}}),e.control.hideAfter?t("NiceButton",{staticClass:"mt-3",attrs:{expanded:!0,size:"small"},on:{click:function(t){e.showAll=!e.showAll}}},[e.showAll?t("Icon",{attrs:{icon:"ChevronDownSolidIcon",rotate:"180"}}):t("Icon",{attrs:{icon:"EllipsisSolidIcon"}})],1):e._e()],1):e._e()],1)},Fe=[],Re=n(47256),Ve=n(92221),$e=n(87459);let We=class extends a.w3{constructor(){super(...arguments),this.open=!1,this.showAll=!1}onControlChange(){this.open=this.control.open||!1}beforeCreate(){this.$options.components.OxygenControls=n(82078).Z}get fullPath(){return`${this.path}`}get filled(){return(0,Re.vr)(this.syncedValue)}get filteredControls(){const e=this.control.hideAfter;return e&&!this.showAll?this.control.controls?.slice(0,e):this.control.controls}};(0,o.gn)([(0,a.fI)()],We.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],We.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],We.prototype,"path",void 0),(0,o.gn)([(0,a.RL)("control",{immediate:!0,deep:!0})],We.prototype,"onControlChange",null),We=(0,o.gn)([(0,a.wA)({components:{OxygenCopyPastContextMenu:$e.Z,OxyIndicatorLights:Ve.Z,NiceButton:ue.Z,Icon:f.Z}})],We);const Ue=We,ze=Ue;var He=(0,m.Z)(ze,Ne,Fe,!1,null,null,null);const Ge=He.exports;var Ke=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-number-input"},[t("NumberInput",{attrs:{"range-options":e.rangeOptions,arrows:e.arrows,placeholder:e.placeholder},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},je=[],qe=n(23267);let Xe=class extends a.w3{get rangeOptions(){return{min:this.control.min,max:this.control.max,step:this.control.step}}get arrows(){return!1!==this.control.arrows}};(0,o.gn)([(0,a.fI)()],Xe.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input",{type:Number})],Xe.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],Xe.prototype,"placeholder",void 0),Xe=(0,o.gn)([(0,a.wA)({components:{NumberInput:qe.Z,UnitInput:u.Z}})],Xe);const Ye=Xe,Qe=Ye;var Je=(0,m.Z)(Qe,Ke,je,!1,null,null,null);const et=Je.exports;var tt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-text-input"},[t("TextInput",{attrs:{placeholder:e.placeholder},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},nt=[],st=n(41571);let it=class extends a.w3{};(0,o.gn)([(0,a.fI)()],it.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input",{type:String})],it.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],it.prototype,"placeholder",void 0),it=(0,o.gn)([(0,a.wA)({components:{TextInput:st.Z}})],it);const ot=it,at=ot;var rt=(0,m.Z)(at,tt,nt,!1,null,null,null);const lt=rt.exports;var ct=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-code-input"},[t("CodeInput",{attrs:{language:e.control.language,"autofill-on-empty":e.control.autofillOnEmpty,placeholder:e.placeholder},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},dt=[],ut=n(81252);let pt=class extends a.w3{};(0,o.gn)([(0,a.fI)()],pt.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input",{type:String})],pt.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],pt.prototype,"placeholder",void 0),pt=(0,o.gn)([(0,a.wA)({components:{CodeInput:ut.Z,TextInput:st.Z}})],pt);const ht=pt,gt=ht;var mt=(0,m.Z)(gt,ct,dt,!1,null,null,null);const vt=mt.exports;var yt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-align-input"},[t("AlignGrid",{attrs:{placeholder:e.alignPlaceholder,display:e.display,direction:e.direction},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}}),t("div",{staticClass:"oxy-align-input-controls"},[t("OxygenControl",{attrs:{control:e.primaryControl,value:e.syncedValue[e.primaryControl.slug],path:e.path},on:{input:function(t){return e.updateInnerValue(e.primaryControl.slug,t)}}}),t("OxygenControl",{attrs:{control:e.crossControl,value:e.syncedValue[e.crossControl.slug],path:e.path},on:{input:function(t){return e.updateInnerValue(e.crossControl.slug,t)}}})],1)],1)},ft=[],_t=n(36968),bt=n.n(_t),St=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-align-grid-container",class:{"oxy-align-grid--placeholder":!!e.placeholder}},[t("div",{staticClass:"oxy-align-grid"},e._l(e.gridOptions,(function([n,s],i){return t("span",{key:i,staticClass:"oxy-align-grid-point",on:{click:function(t){return e.setValue(n,s)},dblclick:function(t){return t.stopPropagation(),e.onDoubleClick(n,s)},mouseenter:function(t){return e.onDotEnter(n,s)},mouseleave:e.onDotLeave}},[e.isDotVisible(n,s)?t("span",{staticClass:"oxy-align-grid-point-dot"}):e._e()])})),0),e.internalValue.primary_axis||e.internalValue.cross_axis?t("AlignGridIndicator",{attrs:{display:e.display,direction:e.direction,x:e.internalValue.primary_axis,y:e.internalValue.cross_axis}}):e._e(),e.showHoverIndicator?t("AlignGridIndicator",{attrs:{display:e.display,direction:e.direction,x:e.hoverIndicatorX,y:e.hoverIndicatorY,hover:!0}}):e._e()],1)},Ct=[],xt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-align-grid-overlay",class:{"oxy-align-grid-overlay--hover":e.hover},style:{flexFlow:e.direction,justifyContent:e.x,alignItems:e.y}},[t("div",{staticClass:"oxy-align-grid-indicator",class:{[`oxy-align-grid-indicator--${e.display}`]:!0,[`oxy-align-grid-indicator--${e.direction}`]:!0,[`oxy-align-grid-indicator--primary-axis-${e.x}`]:!0,[`oxy-align-grid-indicator--cross-axis-${e.y}`]:!0},style:{flexFlow:e.direction,alignItems:e.y,justifyContent:e.x}},["baseline"===e.y?t("div",{staticClass:"oxy-align-grid-indicator-baseline"},[e._v(" A "),t("Icon",{attrs:{icon:"ArrowDownIcon",size:10}})],1):[t("span"),t("span"),t("span"),t("span"),t("span")]],2)])},wt=[];let It=class extends a.w3{};(0,o.gn)([(0,a.fI)()],It.prototype,"display",void 0),(0,o.gn)([(0,a.fI)()],It.prototype,"direction",void 0),(0,o.gn)([(0,a.fI)()],It.prototype,"x",void 0),(0,o.gn)([(0,a.fI)()],It.prototype,"y",void 0),(0,o.gn)([(0,a.fI)()],It.prototype,"hover",void 0),It=(0,o.gn)([(0,a.wA)({components:{Icon:f.Z}})],It);const Pt=It,kt=Pt;var Et=(0,m.Z)(kt,xt,wt,!1,null,null,null);const Tt=Et.exports;let Dt=class extends a.w3{constructor(){super(...arguments),this.shiftKey=!1,this.altKey=!1,this.columnOptions=[["start","start"],["center","start"],["end","start"],["start","center"],["center","center"],["end","center"],["start","end"],["center","end"],["end","end"]],this.rowOptions=[["start","start"],["start","center"],["start","end"],["center","start"],["center","center"],["center","end"],["end","start"],["end","center"],["end","end"]],this.hoveredValue={primary_axis:null,cross_axis:null}}get internalValue(){return this.placeholder?this.placeholder:this.syncedValue}get invert(){return["row","wrap"].includes(this.direction)}get isFlex(){return["flex","inline-flex"].includes(this.display)}get isGrid(){return["grid","inline-grid"].includes(this.display)}get gridOptions(){return this.invert?this.columnOptions:this.rowOptions}get showHoverIndicator(){const{primary_axis:e,cross_axis:t}=this.internalValue,{primary_axis:n,cross_axis:s}=this.hoveredValue;if(e===this.hoverIndicatorX&&"stretch"===this.hoverIndicatorY)return!0;if("space-between"===e&&"stretch"===t)return!1;const i=n&&s,o=this.hoverIndicatorX!==e||s!==t,a=!(this.isDistributionAlignment(e)&&s===t);return i&&o&&a}get hoverIndicatorX(){return this.isFlex&&(this.shiftKey||"space-between"===this.internalValue.primary_axis)?"space-between":this.hoveredValue.primary_axis}get hoverIndicatorY(){return this.altKey||"stretch"===this.internalValue.cross_axis?"stretch":this.hoveredValue.cross_axis}isDistributionAlignment(e){return["space-between","space-around"].includes(e)}setValue(e,t){this.shiftKey&&this.isFlex?this.syncedValue.primary_axis="space-between":this.isDistributionAlignment(this.internalValue.primary_axis)||(this.syncedValue.primary_axis=e),this.altKey?this.syncedValue.cross_axis="stretch":"stretch"!==this.internalValue.cross_axis&&(this.syncedValue.cross_axis=t),this.syncedValue={...this.syncedValue}}onDoubleClick(e,t){const n=this.isFlex?"space-between":"stretch";this.internalValue.primary_axis===n?this.syncedValue.primary_axis=e:this.internalValue.primary_axis=n,"stretch"===this.internalValue.cross_axis&&(this.syncedValue.cross_axis=t),this.syncedValue={...this.syncedValue}}onKeyDown(e){this.shiftKey=e.shiftKey,this.altKey=e.altKey}onDotEnter(e,t){this.hoveredValue={primary_axis:e,cross_axis:t}}onDotLeave(){this.hoveredValue={primary_axis:null,cross_axis:null}}resetKeysOnTabOut(){this.shiftKey=!1,this.altKey=!1}isDotVisible(e,t){const{primary_axis:n,cross_axis:s}=this.internalValue,i=this.hoveredValue.primary_axis,o=this.hoveredValue.cross_axis;return("space-between"!==n||"stretch"!==s)&&(!("space-between"===n&&t===s||"space-between"===this.hoverIndicatorX&&t===o)&&((e!==n||t!==s)&&(e!==i||t!==o)))}mounted(){window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyDown),document.addEventListener("visibilitychange",this.resetKeysOnTabOut)}beforeDestroy(){window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyDown),document.removeEventListener("visibilitychange",this.resetKeysOnTabOut)}};(0,o.gn)([(0,a.yU)("value","input",{default:()=>({primary_axis:null,cross_axis:null})})],Dt.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],Dt.prototype,"placeholder",void 0),(0,o.gn)([(0,a.fI)()],Dt.prototype,"display",void 0),(0,o.gn)([(0,a.fI)()],Dt.prototype,"direction",void 0),Dt=(0,o.gn)([(0,a.wA)({components:{AlignGridIndicator:Tt}})],Dt);const At=Dt,Zt=At;var Ot=(0,m.Z)(Zt,St,Ct,!1,null,null,null);const Mt=Ot.exports;var Bt=n(31044);let Lt=class extends a.w3{constructor(){super(...arguments),this.verticalAlignment=[{value:"start",label:(0,he.__)("Left")},{value:"center",label:(0,he.__)("Center")},{value:"end",label:(0,he.__)("Right")}],this.horizontalAlignment=[{value:"start",label:(0,he.__)("Top")},{value:"center",label:(0,he.__)("Center")},{value:"end",label:(0,he.__)("Bottom")}],this.positionAlignment=[{value:"stretch",label:(0,he.__)("Stretch")},{value:"baseline",label:(0,he.__)("Baseline")}],this.distributionAlignment=[{value:"space-between",label:(0,he.__)("Space Between")},{value:"space-around",label:(0,he.__)("Space Around")}]}beforeCreate(){this.$options.components.OxygenControl=n(95324)["default"]}get parentInheritance(){return this.context.getParentControlInheritance(this.path)}get alignPlaceholder(){const e=this.isGrid?"grid_align":"flex_align",t=this.parentInheritance?.[`${e}.primary_axis`],n=this.parentInheritance?.[`${e}.cross_axis`],s={};return(0,x.a0)(t)&&(s["primary_axis"]=t.value),(0,x.a0)(n)&&(s["cross_axis"]=n.value),0===Object.keys(s).length?null:s}get layout(){const e=this.parentInheritance;return{display:e?.display?.value,flex_direction:e?.flex_direction?.value}}get breakpoint(){return Bt.kD.currentBreakpoint.id}get display(){return this.layout?.display||"flex"}get direction(){return this.isGrid?"column":this.layout?.flex_direction||"row"}get isGrid(){return["grid","inline-grid"].includes(this.display)}get isFlex(){return["flex","inline-flex"].includes(this.display)}get isFlexRow(){return this.isFlex&&["row","wrap"].includes(this.direction)}get primaryControl(){const e=this.isFlexRow?[...this.verticalAlignment,...this.distributionAlignment]:[...this.verticalAlignment,...this.positionAlignment],t=this.isFlexRow?"primary_axis":"cross_axis",n={slug:t,name:"X",type:"select",forcePlaceholder:!0,items:e},s=(0,x.oO)(n,this.alignPlaceholder?.primary_axis),i=(0,x.oO)(n,this.alignPlaceholder?.cross_axis);return n.placeholder=this.isFlexRow?s:i,n}get crossControl(){const e=this.isFlexRow||this.isGrid,t=e?[...this.horizontalAlignment,...this.positionAlignment]:[...this.horizontalAlignment,...this.distributionAlignment],n=this.isFlexRow?"cross_axis":"primary_axis",s={slug:n,name:"Y",type:"select",forcePlaceholder:!0,items:t},i=(0,x.oO)(s,this.alignPlaceholder?.cross_axis),o=(0,x.oO)(s,this.alignPlaceholder?.primary_axis);return s.placeholder=e?i:o,s}updateInnerValue(e,t){this.syncedValue=bt()(this.syncedValue,e,t)}};(0,o.gn)([(0,a.fI)()],Lt.prototype,"control",void 0),(0,o.gn)([(0,a.fI)()],Lt.prototype,"path",void 0),(0,o.gn)([(0,a.yU)("value","input",{default:()=>({})})],Lt.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.tB)({from:"oxyContext"})],Lt.prototype,"context",void 0),Lt=(0,o.gn)([(0,a.wA)({components:{AlignGrid:Mt}})],Lt);const Nt=Lt,Ft=Nt;var Rt=(0,m.Z)(Ft,yt,ft,!1,null,null,null);const Vt=Rt.exports;var $t=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-border-input"},[t("BorderComplex",{attrs:{"accepts-variable":!0,placeholder:e.placeholder},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},Wt=[],Ut=n(50219);let zt=class extends a.w3{};(0,o.gn)([(0,a.fI)()],zt.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],zt.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],zt.prototype,"placeholder",void 0),zt=(0,o.gn)([(0,a.wA)({components:{BorderComplex:Ut.Z}})],zt);const Ht=zt,Gt=Ht;var Kt=(0,m.Z)(Gt,$t,Wt,!1,null,null,null);const jt=Kt.exports;var qt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-border-radius-input"},[t("BorderRadius",{attrs:{"accepts-variable":!0,placeholder:e.placeholder},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},Xt=[],Yt=n(41779);let Qt=class extends a.w3{};(0,o.gn)([(0,a.fI)()],Qt.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],Qt.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],Qt.prototype,"placeholder",void 0),Qt=(0,o.gn)([(0,a.wA)({components:{BorderRadius:Yt.Z,BorderComplex:Ut.Z}})],Qt);const Jt=Qt,en=Jt;var tn=(0,m.Z)(en,qt,Xt,!1,null,"07947be6",null);const nn=tn.exports;var sn=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-text-input"},[t("FocusPointInput",{attrs:{options:{gridMode:!0},placeholder:e.placeholder},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},on=[],an=n(6308);let rn=class extends a.w3{};(0,o.gn)([(0,a.fI)()],rn.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input",{type:Object})],rn.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],rn.prototype,"placeholder",void 0),rn=(0,o.gn)([(0,a.wA)({components:{FocusPointInput:an.Z,TextInput:st.Z}})],rn);const ln=rn,cn=ln;var dn=(0,m.Z)(cn,sn,on,!1,null,null,null);const un=dn.exports;var pn=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-repeater-input"},[t("Repeater",{attrs:{control:{options:{repeaterOptions:e.options}}},scopedSlots:e._u([{key:"default",fn:function({value:n,index:s}){return[t("OxygenControls",{attrs:{controls:e.getItemControls(s),value:n,path:`${e.path}[${s}]`},on:{input:function(t){return e.updateItem(t,s)}}})]}}]),model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},hn=[],gn=n(62485),mn=n(23128),vn=n(59810);let yn=class extends ne.ZP{beforeCreate(){this.$options.components.OxygenControls=n(82078).Z}get isDisabled(){return""}get options(){return{popupMode:!0,itemIcon:this.control.itemIcon,itemColorPath:this.control.itemColorPath,titleTemplate:this.control.titleTemplate,defaultTitle:this.control.defaultTitle,buttonName:this.control.buttonName,defaultNewValue:this.control.defaultNewValue,duplicateNewValue:this.control.duplicateNewValue,deleteText:this.control.deleteText,noDuplicate:this.control.noDuplicate,noDisable:this.control.noDisable,noDataMessage:this.control.noDataMessage,noExpand:this.control.noExpand}}updateItem(e,t){const n=(0,mn.Z)(this.syncedValue)||[];n[t]=e,this.$emit("input",n)}getItemControls(e){const t=this.control.controls.map((t=>{const n=(0,vn.C8)(t.conditions,e);return{...t,conditions:n}}));return t}};(0,o.gn)([(0,a.fI)()],yn.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],yn.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],yn.prototype,"path",void 0),yn=(0,o.gn)([(0,a.wA)({components:{Repeater:gn.Z}})],yn);const fn=yn,_n=fn;var bn=(0,m.Z)(_n,pn,hn,!1,null,null,null);const Sn=bn.exports;var Cn=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-media-input"},[t("WPMediaInput",{attrs:{placeholder:e.placeholder},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},xn=[],wn=n(19499);let In=class extends a.w3{};(0,o.gn)([(0,a.fI)()],In.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],In.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],In.prototype,"placeholder",void 0),In=(0,o.gn)([(0,a.wA)({components:{WPMediaInput:wn.Z,TextInput:st.Z}})],In);const Pn=In,kn=Pn;var En=(0,m.Z)(kn,Cn,xn,!1,null,null,null);const Tn=En.exports;var Dn=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("VideoInput",{attrs:{placeholder:e.placeholder},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})},An=[],Zn=n(70504);let On=class extends a.w3{};(0,o.gn)([(0,a.fI)()],On.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],On.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],On.prototype,"placeholder",void 0),On=(0,o.gn)([(0,a.wA)({components:{VideoInput:Zn.Z}})],On);const Mn=On,Bn=Mn;var Ln=(0,m.Z)(Bn,Dn,An,!1,null,"9ebe081c",null);const Nn=Ln.exports;var Fn=n(71657),Rn=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("MediaSizeInput",{attrs:{"raw-image":e.image,placeholder:e.placeholder},on:{"update-image":e.updateImage},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})},Vn=[],$n=n(61332);let Wn=class extends a.w3{get breakpoint(){return Bt.kD.currentBreakpoint.id}get background(){return this.context.getParentControlValueAt(this.path,this.breakpoint)}get image(){return this.background?.[this.imagePath]}get imagePath(){return this.control.imagePath||"image"}updateImage(e){const t=this.path.split(".").slice(0,-1).join("."),n=`${t}.${this.imagePath}`;this.context.setControlValueAt(n,this.breakpoint,e)}};(0,o.gn)([(0,a.fI)()],Wn.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],Wn.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],Wn.prototype,"placeholder",void 0),(0,o.gn)([(0,a.tB)({from:"oxyContext"})],Wn.prototype,"context",void 0),(0,o.gn)([(0,a.fI)()],Wn.prototype,"path",void 0),Wn=(0,o.gn)([(0,a.wA)({components:{MediaSizeInput:$n.Z}})],Wn);const Un=Wn,zn=Un;var Hn=(0,m.Z)(zn,Rn,Vn,!1,null,"f3e54ade",null);const Gn=Hn.exports;var Kn=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(ke.Z,{attrs:{"content-class":"oxy-tooltip",bottom:"","open-delay":500,transition:"0"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("button",e._g({staticClass:"oxy-button-input",class:{"oxy-button-input--true":e.syncedValue,"oxy-button-input--false":!e.syncedValue,"oxy-button-input--disabled":e.control.disabled},on:{click:function(t){e.syncedValue=!e.syncedValue}}},n),[e.control.icon?t("Icon",{attrs:{icon:e.control.icon}}):e._e(),e.control.hideButtonLabel?e._e():t("span",[e._v(" "+e._s(e.syncedValue?e.control.trueValue:e.control.falseValue)+" ")])],1)]}}])},[t("span",[e._v(e._s(e.control.name))])])},jn=[];let qn=class extends a.w3{};(0,o.gn)([(0,a.fI)()],qn.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input",{type:Boolean})],qn.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],qn.prototype,"placeholder",void 0),qn=(0,o.gn)([(0,a.wA)({components:{IconButton:_.Z,Icon:f.Z}})],qn);const Xn=qn,Yn=Xn;var Qn=(0,m.Z)(Yn,Kn,jn,!1,null,null,null);const Jn=Qn.exports;var es=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-variables-input"},[t("OverrideVariablesInput",{model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},ts=[],ns=n(85412);let ss=class extends a.w3{};(0,o.gn)([(0,a.fI)()],ss.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input",{type:Array})],ss.prototype,"syncedValue",void 0),ss=(0,o.gn)([(0,a.wA)({components:{OverrideVariablesInput:ns.Z}})],ss);const is=ss,os=is;var as=(0,m.Z)(os,es,ts,!1,null,null,null);const rs=as.exports;var ls=n(80115);let cs=class extends a.w3{get showLabel(){return!this.control.hideLabel&&!["accordion"].includes(this.control.type)}get filled(){return(0,Re.vr)(this.syncedValue)}get disabled(){return!!this.path&&(!!this.control.disabledConditions&&(0,vn.kq)(this.control.disabledConditions,this.context?.getInheritanceMap?.()))}get isVariableSupported(){return(0,C.lZ)(this.control)}get componentName(){return`oxygen-${this.control.type}-input`}get variableType(){return(0,C.Zp)(this.control)}get fullPath(){return this.path?`${this.path}.${this.control.slug}`:this.control.slug}get inheritance(){return this.context?.getControlInheritance(this.fullPath)}get placeholder(){const e=this.control.forcePlaceholder;if((0,x.a0)(this.inheritance)&&!e){const e=(0,x.oO)(this.control,this.inheritance.value);if(e)return e}return this.control.placeholder}resetControl(){this.syncedValue=void 0}};(0,o.gn)([(0,a.fI)()],cs.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],cs.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],cs.prototype,"path",void 0),(0,o.gn)([(0,a.tB)({from:"oxyContext"})],cs.prototype,"context",void 0),cs=(0,o.gn)([(0,a.wA)({components:{OxygenControlName:ls.Z,OxygenVariablesInput:rs,OxygenGapInput:E,OxygenTextInput:lt,OxygenUnitInput:y,OxygenCodeInput:vt,OxygenGroupInput:U,OxygenAlignInput:Vt,OxygenColorInput:Q,OxygenMediaInput:Tn,OxygenVideoInput:Nn,OxygenSelectInput:J.Z,OxygenNumberInput:et,OxygenBorderInput:jt,OxygenButtonInput:Jn,OxygenSpacingInput:xe,OxygenRepeaterInput:Sn,OxygenButtonBarInput:Le,OxygenAccordionInput:Ge,OxygenFocusPointInput:un,OxygenFontFamilyInput:L,OxygenBorderRadiusInput:nn,OxygenMediaSizeInput:Gn,VariableBoundInput:Fn.Z}})],cs);const ds=cs,us=ds;var ps=(0,m.Z)(us,s,i,!1,null,null,null);const hs=ps.exports},82078:(e,t,n)=>{n.d(t,{Z:()=>m});var s=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-controls",class:{"oxy-controls-root":e.root}},e._l(e.filteredControls,(function(n){return t("OxygenControl",{key:n.slug,attrs:{control:n,path:e.path,value:e.syncedValue?.[n.slug]},on:{input:function(t){return e.updateControlValue(n,t)}}})})),1)},i=[],o=n(70655),a=n(38085),r=n(95324),l=n(23128),c=n(59810);let d=class extends a.w3{get filteredControls(){const e=this.context?.getInheritanceMap?.()||{};return this.controls.filter((t=>(0,c.kq)(t.conditions,e)))}updateControlValue(e,t){const n=(0,l.Z)(this.syncedValue);this.$emit("input",{...n,[e.slug]:t})}updateContext(e){this.$emit("input",e)}};(0,o.gn)([(0,a.fI)({default:()=>[]})],d.prototype,"controls",void 0),(0,o.gn)([(0,a.fI)({default:!1})],d.prototype,"root",void 0),(0,o.gn)([(0,a.fI)()],d.prototype,"path",void 0),(0,o.gn)([(0,a.yU)("value","input")],d.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.tB)({from:"oxyContext",default:null})],d.prototype,"context",void 0),d=(0,o.gn)([(0,a.wA)({components:{OxygenControl:r["default"]}})],d);const u=d,p=u;var h=n(1001),g=(0,h.Z)(p,s,i,!1,null,null,null);const m=g.exports},53204:(e,t,n)=>{n.d(t,{Z:()=>m});var s=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-select-input"},[t("DropdownInput",{attrs:{items:e.items,placeholder:e.placeholder},model:{value:e.syncedValue,callback:function(t){e.syncedValue=t},expression:"syncedValue"}})],1)},i=[],o=n(70655),a=n(38085),r=n(84336),l=n(16068),c=n(85283);let d=class extends a.w3{get items(){return this.control.items?.map(l.Nd)}};(0,o.gn)([(0,a.fI)()],d.prototype,"control",void 0),(0,o.gn)([(0,a.yU)("value","input")],d.prototype,"syncedValue",void 0),(0,o.gn)([(0,a.fI)()],d.prototype,"placeholder",void 0),d=(0,o.gn)([(0,a.wA)({components:{Icon:c.Z,DropdownInput:r.Z}})],d);const u=d,p=u;var h=n(1001),g=(0,h.Z)(p,s,i,!1,null,"087c8b2a",null);const m=g.exports},87459:(e,t,n)=>{n.d(t,{Z:()=>b});var s=n(70248),i=n(61908),o=n(11193),a=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"copy-paste-context-menu"},[e._t("default",null,{openContextMenu:e.openContextMenu}),t("Dropdown",{attrs:{"position-x":e.contextMenuX,"position-y":e.contextMenuY,absolute:"","offset-y":"","close-on-click":""},model:{value:e.contextMenu,callback:function(t){e.contextMenu=t},expression:"contextMenu"}},[t(s.Z,{ref:"list"},[t(i.Z,{attrs:{dense:"",disabled:!e.canCopy},on:{click:e.copyData}},[t(o.V9,[e._v(" "+e._s(e.__("Copy"))+" "),e.name?t("em",[e._v(e._s(e.name))]):e._e()])],1),t(i.Z,{attrs:{dense:"",disabled:!e.canPaste},on:{click:e.pasteData}},[t(o.V9,[e._v(" "+e._s(e.__("Paste"))+" "),e.name?t("em",[e._v(e._s(e.name))]):e._e()])],1),t(i.Z,{attrs:{dense:"",disabled:!e.canClear},on:{click:e.clearData}},[t(o.V9,[e._v(" "+e._s(e.__("Clear"))+" "),e.name?t("em",[e._v(e._s(e.name))]):e._e()])],1)],1)],1)],2)},r=[],l=n(70655),c=n(38085),d=n(15133),u=n(3735),p=n(65669),h=n(48973),g=n(89028);let m=class extends c.w3{constructor(){super(...arguments),this.dataToPaste=null,this.contextMenu=!1,this.contextMenuX=0,this.contextMenuY=0}get canCopy(){return null!==this.syncedValue&&void 0!==this.syncedValue}get canPaste(){return!!this.dataToPaste&&(this.dataToPaste.path===this.path&&this.dataToPaste.data)}get canClear(){return null!==this.syncedValue&&void 0!==this.syncedValue}onContextMenuChange(){this.contextMenu||document.removeEventListener("mousedown",this.closeIfRightClick)}openContextMenu(e){e.preventDefault(),this.contextMenu=!1,this.contextMenuX=e.clientX,this.contextMenuY=e.clientY,this.$nextTick((()=>{this.contextMenu=!0,this.updateCanPaste(),document.addEventListener("mousedown",this.closeIfRightClick)}))}closeIfRightClick(e){2===e.button&&(this.contextMenu=!1)}copyData(){console.log("Copy data",this.syncedValue);const e={oxy:{path:this.path,data:this.syncedValue}};(0,u.zG)(e,p.J,(0,h.g_)((e=>console.error("Failed to copy",...e.map((e=>e.toString())))),(e=>(0,g.l9)(e)))),this.updateCanPaste()}pasteData(){this.dataToPaste&&(this.syncedValue=this.dataToPaste.data)}clearData(){this.syncedValue=null}async updateCanPaste(){this.dataToPaste=(await(0,g.ij)())?.oxy||null}beforeDestroy(){document.removeEventListener("mousedown",this.closeIfRightClick)}};(0,l.gn)([(0,c.yU)("value","input")],m.prototype,"syncedValue",void 0),(0,l.gn)([(0,c.fI)()],m.prototype,"name",void 0),(0,l.gn)([(0,c.fI)()],m.prototype,"path",void 0),(0,l.gn)([(0,c.RL)("contextMenu")],m.prototype,"onContextMenuChange",null),m=(0,l.gn)([(0,c.wA)({components:{Dropdown:d.Z}})],m);const v=m,y=v;var f=n(1001),_=(0,f.Z)(y,a,r,!1,null,null,null);const b=_.exports},5502:(e,t,n)=>{function s(e,t,n,s,o){function a(e,r){if(i(e)){const s={};for(const i in e){if(i===t)return e[i];if(n.includes(i))continue;const o=a(e[i],`${r?`${r}.`:""}${i}`);void 0!==o&&(s[i]=o)}return Object.keys(s).length?s:void 0}if(Array.isArray(e)){const t=[];if(e.forEach((e=>{t.push(a(e,`${r}[]`))})),0===t.filter((e=>void 0!==e)).length)return;return t.length?t:void 0}const l=r&&o?.some((e=>r.startsWith(e)));return t===s||l?e:void 0}return a(e,"")}function i(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)}n.d(t,{A:()=>s,S:()=>i})},89028:(e,t,n)=>{n.d(t,{Ku:()=>W,us:()=>U,NA:()=>N,wp:()=>L,ij:()=>B,Wm:()=>R,HR:()=>V,qb:()=>$,gR:()=>M,uV:()=>D,l9:()=>O});var s=n(27361),i=n.n(s),o=n(31381),a=n(85450),r=n(45974),l=n(30902),c=n(9950),d=n(69137),u=n(23128),p=n(65118),h=n(65669),g=n(84274),m=n(86687),v=n(8773),y=n(12721),f=n(31737),_=n(31549),b=n(75031),S=n(32521);const C=S.G0([b.NM,S.IX(b.NM)]),x=S.dt({controlSectionShapeHash:S.Z_,propertiesData:S.dt({propertiesData:S._4})}),w=S.dt({path:S.Z_,data:S._4}),I=S.r$({element:C,controlSectionPropertiesData:x,oxy:w});var P=n(39715),k=n(98949),E=n(47354);const T=new y.hF;function D(){return{register(){T.on("copy",A),T.on("cut",A),T.on("paste",A)},unbind(){T.removeAll()}}}function A(e){if((0,E.o8)())return;const t=window.Breakdance.canvas.document,n=(0,f.SD)(t)||(0,f.SD)(document);n||(e.preventDefault(),"copy"===e.type&&a.uiStore.activeElementId?N(a.uiStore.activeElementId):"cut"===e.type&&a.uiStore.activeElementId?F(a.uiStore.activeElementId):"paste"===e.type&&R(a.uiStore.activeElementId,e))}async function Z(e){const{secure:t,permission:n}=await(0,f.fn)();return e&&!window.safari?"event":t?null===n||"denied"===n.state?"localstorage":"clipboard":"localstorage"}async function O(e){try{await navigator.clipboard.writeText(e),console.debug("Writing to clipboard")}catch(t){(0,f._G)(e),console.debug("Fallback: Writing to clipboard")}(0,_.r)("breakdance_clipboard",e)}async function M(e){const t=e?.clipboardData?.getData("text"),n=await Z(e);return console.debug(`Reading clipboard from ${n}`),"event"===n?t:"localstorage"===n?(0,_.z)("breakdance_clipboard"):await navigator.clipboard.readText()}async function B(e){const t=await M(e);if(!t)return null;const n=(0,p.Z)(t,I);return(0,l.pipe)(n,(0,r.fold)((()=>null),(e=>e??null)))}function L(e){const t=[];e.forEach((e=>{const n=(0,o.findNode)(a.documentStore.document.tree,e);n&&t.push((0,o.exportNode)(n))}));const n=(0,P.G)(t);(0,l.pipe)(n,h.J,(0,r.fold)((e=>console.error("Failed to copy element",...e.map((e=>e.toString())))),(e=>{O(e)})))}function N(e){const t=(0,o.findNode)(a.documentStore.document.tree,e);if(!t)return;const n=(0,o.exportNode)(t),s=(0,P.G)(n);(0,l.pipe)(s,h.J,(0,r.fold)((e=>console.error("Failed to copy element",...e.map((e=>e.toString())))),(e=>{O(e)})))}function F(e){N(e),a.documentStore.deleteElement({nodeId:e})}async function R(e,t){if("success"!==a.configStore.elementsLoadingState)return;const n=(await B(t))?.element;n&&(Array.isArray(n)?(0,k.AE)(n,"pasting"):V(e,n))}function V(e,t){const n=(0,c.Z)(a.documentStore.document.tree,e,(0,c.kE)(t)),s=(0,v.Z)(),i=`Paste:${s}`;(0,l.pipe)(n,(0,r.fold)((()=>{}),(e=>{"TOP_LEVEL"===e?d.n.transaction((()=>{const e={nodeId:void 0};a.documentStore.addElementMutation({elementSlug:(0,c.zV)(),parentNodeId:a.documentStore.document.tree.root.id,index:!1,pointer:e}),void 0!==e.nodeId&&(a.documentStore.pasteCopiedElementMutation({element:t,placeToAddId:e.nodeId,placeToAddIndex:0}),m.w.run.onCreatedElement({elementId:t.id,transactionKey:i}))}),`Paste copied ${(0,g.JC)(t.data.type)} into a new section`,i):d.n.transaction((()=>{const n={nodeId:void 0};a.documentStore.pasteCopiedElementMutation({element:t,placeToAddId:e.place.id,placeToAddIndex:e.index||e.place.children.length,pointer:n}),n.nodeId&&m.w.run.onCreatedElement({elementId:n.nodeId,transactionKey:i})}),`Paste copied ${(0,g.JC)(t.data.type)}`,i)})))}async function $(e,t="design"){const n=(await B())?.element;if(Array.isArray(n))return;if(!n)return;const s=(0,o.findNode)(a.documentStore.document.tree,e);if(!s)return;const r=i()(n.data.properties,t,null);n.data.type===s.data.type&&a.documentStore.throttledPropertyChanged({elementId:s.id,path:t,value:(0,u.Z)(r),meta:{snapshotLabel:`Paste properties of ${(0,g.JC)(n.data.type)} to ${(0,g.JC)(s.data.type)}`}})}async function W(e){if("success"!==a.configStore.elementsLoadingState)return!1;const t=(await B())?.element;if(Array.isArray(t))return!0;if(!t)return!1;const n=(0,c.Z)(a.documentStore.document.tree,e,(0,c.kE)(t));return(0,r.isRight)(n)}async function U(e){const t=(await B())?.element;if(Array.isArray(t))return!1;if(!t)return!1;const n=(0,o.findNode)(a.documentStore.document.tree,e);return t.data.type===n?.data.type}},39715:(e,t,n)=>{function s(e){return{element:e}}n.d(t,{G:()=>s})},31737:(e,t,n)=>{async function s(){try{return await navigator.permissions.query({name:"clipboard-read",allowWithoutGesture:!1})}catch(e){return null}}async function i(){const e=await s();return{secure:window.isSecureContext,permission:e}}function o(e){const t=document.createElement("textarea");let n;t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",t.classList.add("breakdance-offscreen-input"),document.body.appendChild(t),t.focus(),t.select();try{n=document.execCommand("copy")}catch(s){n=!1}return document.body.removeChild(t),n}function a(e){return"INPUT"===e?.nodeName}function r(e){const t=["button","checkbox","hidden","file","radio","image","range","reset","submit","number","email","time"];return a(e)&&e.type&&!t.includes(e.type)||"TEXTAREA"===e.nodeName||"true"===e.contentEditable}function l(e){const t=e?.defaultView?.getSelection(),n=t?.rangeCount?t.getRangeAt(0):null;return!!n&&!n.collapsed}function c(e){const t=e.activeElement;return t&&(a(t)||r(t)||l(e))}n.d(t,{SD:()=>c,_G:()=>o,fn:()=>i})},11815:(e,t,n)=>{function s({namespace:e,phpClassName:t,uiIcon:n,tag:s,tagOptions:i,tagControlPath:o,name:a,className:r,category:l,badge:c,defaultProperties:d,defaultChildrenElements:u,designControls:p,contentControls:h,settingsControls:g,dependencies:m,settings:v,addPanelRules:y,actions:f,nestingRules:_,spacingBars:b,attributes:S,experimental:C,availableIn:x,order:w,additionalClasses:I,projectManagement:P,propertyPathsToWhitelistInFlatProps:k,propertyPathsToSsrElementWhenValueChanges:E}){return`<?php\n\nnamespace ${e};\n\nuse function Breakdance\\Elements\\c;\nuse function Breakdance\\Elements\\PresetSections\\getPresetSection;\n\n\n\\Breakdance\\ElementStudio\\registerElementForEditing(\n "${e}\\\\${t}",\n \\Breakdance\\Util\\getdirectoryPathRelativeToPluginFolder(__DIR__)\n);\n\nclass ${t} extends \\Breakdance\\Elements\\Element\n{\n static function uiIcon()\n {\n return '${n}';\n }\n\n static function tag()\n {\n return '${s}';\n }\n\n static function tagOptions()\n {\n return ${i};\n }\n\n static function tagControlPath()\n {\n return ${o};\n }\n\n static function name()\n {\n return '${a}';\n }\n\n static function className()\n {\n return '${r}';\n }\n\n static function category()\n {\n return '${l}';\n }\n\n static function badge()\n {\n return ${c};\n }\n\n static function slug()\n {\n return __CLASS__;\n }\n\n static function template()\n {\n return file_get_contents(__DIR__ . '/html.twig');\n }\n\n static function defaultCss()\n {\n return file_get_contents(__DIR__ . '/default.css');\n }\n\n static function defaultProperties()\n {\n return ${d};\n }\n\n static function defaultChildren()\n {\n return ${u};\n }\n\n static function cssTemplate()\n {\n $template = file_get_contents(__DIR__ . '/css.twig');\n return $template;\n }\n\n static function designControls()\n {\n return ${p};\n }\n\n static function contentControls()\n {\n return ${h};\n }\n\n static function settingsControls()\n {\n return ${g};\n }\n\n static function dependencies()\n {\n return ${m};\n }\n\n static function settings()\n {\n return ${v};\n }\n\n static function addPanelRules()\n {\n return ${y};\n }\n\n static public function actions()\n {\n return ${f};\n }\n\n static function nestingRule()\n {\n return ${_};\n }\n\n static function spacingBars()\n {\n return ${b};\n }\n\n static function attributes()\n {\n return ${S};\n }\n\n static function experimental()\n {\n return ${C};\n }\n\n static function availableIn()\n {\n return ${x};\n }\n\n\n static function order()\n {\n return ${w};\n }\n\n static function dynamicPropertyPaths()\n {\n return false;\n }\n\n static function additionalClasses()\n {\n return ${I};\n }\n\n static function projectManagement()\n {\n return ${P};\n }\n\n static function propertyPathsToWhitelistInFlatProps()\n {\n return ${k};\n }\n\n static function propertyPathsToSsrElementWhenValueChanges()\n {\n return ${E};\n }\n}\n`}n.d(t,{i:()=>s})},17231:(e,t,n)=>{function s(e,t,n,s){return`<?php\n\nnamespace ${n};\n\nuse function Breakdance\\Elements\\c;\nuse function Breakdance\\Elements\\PresetSections\\getPresetSection;\n\n\\Breakdance\\Elements\\PresetSections\\PresetSectionsController::getInstance()->register(\n "${e}",\n ${t},\n true,\n ${s}\n);\n\n`}n.d(t,{C:()=>s})},1073:(e,t,n)=>{n.d(t,{T:()=>h,_:()=>p});var s=n(98851),i=n(75031),o=n(30902),a=n(45974),r=n(51168),l=n(31044),c=n(32521),d=n(65669),u=n(69137);async function p(){const e=await(0,s.D)({action:"breakdance_load_global_settings",decoder:i.az});return(0,o.pipe)(e,(0,a.fold)((e=>((0,r.UE)(e.map((e=>({...e,customNotificationToShow:e.customNotificationToShow?"INTERNAL_SERVER_ERROR"===e.customNotificationToShow.type?{...e.customNotificationToShow,keepOpen:!0}:e.customNotificationToShow:void 0})))),!1)),(e=>(u.n.ignore((()=>{l.cr.setGlobalSettings(e.globalSettings),l.cr.markCurrentGlobalSettingsAsUntouched()})),!0))))}async function h(){return(0,o.pipe)(await(0,s.D)({friendlyName:"Saving global settings to WordPress",action:"breakdance_save_global_settings",dataToPost:{globalSettings:(0,d.J)(l.cr.globalSettings)},decoder:c._4}),(0,a.fold)((e=>((0,r.UE)(e),!1)),(()=>(u.n.ignore((()=>l.cr.markCurrentGlobalSettingsAsUntouched())),!0))))}},36055:(e,t,n)=>{n.d(t,{H$:()=>r,TZ:()=>a,UY:()=>d,__:()=>i,gB:()=>l,vM:()=>o});const s=window.wp.i18n;function i(e,t="breakdance"){return s.__(e,t)}function o(e,t,n,i,o="breakdance"){return s._nx(e,t,n,i,o)}function a(e,t){return s.__(e,"breakdance")}function r(e,t,n,i="breakdance"){return s._x(e,t,i)}const l=s.sprintf;function c(){if("undefined"===typeof document)return;const e=document.documentElement.getAttribute("lang");if(!e)return"en";try{return new Intl.Locale(e).toString()}catch{return e}}function d(e){if(!Array.isArray(e)||0===e.length)return"";const t=c(),n=new Intl.ListFormat(t,{style:"long",type:"conjunction"});return n.format(e)}},93709:(e,t,n)=>{function s(e=!1){const t=document.querySelector(".properties-panel-search-box-wrap input");if(t?.focus(),e){const e=document.querySelector(".properties-panel-search-box-wrap .properties-panel-search-settings-toggle");if(e){const t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)}}}function i(){const e=document.querySelector(".properties-panel-search-box-wrap .properties-panel-search-modified");if(e){const t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)}}n.d(t,{O:()=>s,p:()=>i})},21115:(e,t,n)=>{n.d(t,{e:()=>i,n:()=>o});var s=n(13635);function i(e,t){const{x:n,y:i}=(0,s.eq)(),o=document.getElementById("iframe"),r=window.Breakdance.canvas.document.querySelector(".breakdance-canvas-right-click-menu");if(!r||!o)return;const{width:l,height:c}=o.getBoundingClientRect(),{menuWidth:d,menuHeight:u}=a(r),p=e+d+15>l?e-n-d:e-n,h=t+u+15>c?t-i-u:t-i;return{x:p,y:h}}function o(e,t){const n=document.querySelector(".breakdance-canvas-right-click-menu"),{menuWidth:s,menuHeight:i}=a(n),o=window.innerWidth,r=window.innerHeight,l=Math.min(e,o-s-10),c=Math.min(t,r-i-10);return{x:l,y:c}}function a(e){e.style.display="block";const{width:t,height:n}=e.getBoundingClientRect();return{menuWidth:t,menuHeight:n}}},37982:(e,t,n)=>{n.d(t,{DQ:()=>b,Fr:()=>_,_S:()=>y,c3:()=>S,y8:()=>v,zF:()=>C});var s=n(45974),i=n(21516),o=n(98851),a=n(3735),r=n(48973),l=n(51168),c=n(31044),d=n(65669),u=n(32521),p=n(95690),h=n(69137),g=n(39664),m=n(36055);function v(e){return/^-?[.]+[_a-zA-Z]+[_a-zA-Z0-9-]*$/.test(e)}function y(e){try{document.createDocumentFragment().querySelector(e)}catch{return!1}return!0}function f(e){if("class"===e.type){if(!v(e.name))return void g.Z.log.message((0,m.gB)((0,m.TZ)("%s is not a valid CSS class name.","%s: CSS selector name"),e.name))}else if(!y(e.name))return void g.Z.log.message((0,m.gB)((0,m.TZ)("%s is not a valid CSS selector.","%s: CSS selector name"),e.name));c.cr.cssSelectors.find((t=>t.name===e.name))?g.Z.log.message((0,m.gB)((0,m.TZ)("%s is already present.","%s: CSS selector name"),e.name)):h.n.transaction((()=>c.cr.setSelectors([...c.cr.cssSelectors,e])),"Add Selector")}function _(e){f(e),(0,p.O_)("selectors")||C()}function b(e){if(!y(e))return(0,s.left)([(0,m.gB)((0,m.TZ)('"%s" is not a valid CSS selector.',"%s: CSS selector name"),e)]);const t=!!v(e);return(0,s.right)({name:e,type:t?"class":"custom",properties:{}})}async function S(){const e=await(0,o.D)({action:"breakdance_load_selectors",decoder:i.Ng});return(0,a.zG)(e,(0,r.g_)((e=>((0,l.UE)(e.map((e=>({...e,customNotificationToShow:e.customNotificationToShow?"INTERNAL_SERVER_ERROR"===e.customNotificationToShow.type?{...e.customNotificationToShow,keepOpen:!0}:e.customNotificationToShow:void 0})))),!1)),(e=>(h.n.ignore((()=>{c.cr.setSelectors(e),c.cr.markCurrentSelectorsAsUntouched()})),!0))))}async function C(){return(0,a.zG)(await(0,o.D)({friendlyName:(0,m.__)("Saving selectors to WordPress"),action:"breakdance_save_selectors",dataToPost:{selectors:(0,d.J)(c.cr.cssSelectors)},decoder:u._4}),(0,r.g_)((e=>((0,l.UE)(e),!1)),(()=>(h.n.ignore((()=>c.cr.markCurrentSelectorsAsUntouched())),!0))))}},98992:(e,t,n)=>{n.d(t,{FM:()=>a,nx:()=>r,sF:()=>l,u3:()=>o});var s=n(31381),i=n(31044);function o(e,t){return(0,s.treeNodeReduce)(((e,n)=>(n[e.id]=t,n)),e.root,{})}function a(e,t){const n=(0,s.findNode)(e,t);if(n)return(0,s.parentNodesReduce)(((e,t)=>(t[e.id]=!0,t)),e,n,{})}function r(e){return!1===i.kD.structurePanelNodesExpandedState[e]}function l(e){return void 0===i.kD.structurePanelNodesExpandedState[e]||!0===i.kD.structurePanelNodesExpandedState[e]}},23370:(e,t,n)=>{n(86702);var s=n(20144),i=n(31096),o=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(i.Z,{class:e.classList},[t("Notifications"),e.isBrowseModeEnabled?[t("BrowseMode",{key:"browser"})]:[t("Builder",{key:"builder"})]],2)},a=[],r=n(70655),l=n(38085),c=n(85450),d=n(58495),u=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-builder"},[e.errorsPresent?t("UnrecoverableErrors"):"normal"===e.interfaceState?t("BuilderLayout"):"loading"===e.interfaceState?t("Loading"):e._e()],1)},p=[],h=n(48403),g=n.n(h),m=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("AppLayout",{class:e.classList,scopedSlots:e._u([{key:"topbar",fn:function(){return[e.isPreviewMode||e.isSingularityMode?e._e():t("BuilderTopBar"),e.isPreviewMode?t("PreviewModeCloseButton"):e._e()]},proxy:!0},{key:"body",fn:function(){return[t("ClosingConfirmations"),t("DesignLibraryModal"),!e.isSingularityMode||e.isDevEnvironment&&e.debugSidebarPanelsEnabled?t("SidebarPanels",{directives:[{name:"show",rawName:"v-show",value:!e.isPreviewMode,expression:"!isPreviewMode"}],attrs:{panelState:e.leftSidebarPanelState,position:"left"}}):e._e(),t("ComponentRootTagWarning"),e.isSingularityMode?e._e():t("IframeCanvasWrapper",{on:{loaded:e.onIframeLoaded}}),e.showTemplateDialog?t("TemplateDialog",{attrs:{"template-id":e.templateId,"template-name":e.templateName,templateIsFallback:e.isTemplateFallback,templatesPageUrl:e.templatesPageUrl}}):e._e(),e.showInvalidPostDialog?t("InvalidPostDialog"):e._e(),e.preferencesModalOpen?t("PreferencesModal",{attrs:{open:e.preferencesModalOpen},on:{"update:dialog":e.updatePreferencesModal}}):e._e(),e.keyboardShortcutsHelpModalOpen?t("KeyboardShortcutsHelpModal",{attrs:{open:e.keyboardShortcutsHelpModalOpen},on:{"update:dialog":e.updateKeyboardShortcutsHelpModal}}):e._e(),!e.isSingularityMode||e.isDevEnvironment&&e.debugSidebarPanelsEnabled?t("SidebarPanels",{directives:[{name:"show",rawName:"v-show",value:!e.isPreviewMode,expression:"!isPreviewMode"}],attrs:{panelState:e.rightSidebarPanelState,position:"right"}}):e._e(),e.isSingularityMode?t("Singularity",{on:{loaded:e.onIframeLoaded}}):e._e(),e.elementStudioOpen?t("div",{staticClass:"breakdance-app-far-right-area vscroll-wrap"},[t("ElementStudio")],1):e._e()]},proxy:!0}])})},v=[],y=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"iframe-canvas-wrapper"},[t("IframeCanvas",{key:e.canvasWrapperKey,on:{loaded:function(t){return e.$emit("loaded")}}})],1)},f=[],_=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.iframeURL?t("IframeWrapper",{attrs:{"iframe-url":e.iframeURL,"iframe-preview-width":e.canvasPreviewWidth,"iframe-exited":e.iframeExited,"iframe-state":e.canvasState,"min-width":e.iframeMinWidth,"current-breakpoint":e.currentBreakpoint,"iframe-id":"iframe"},on:{previewWidthChange:e.handlePreviewWidthChange,previewWidthChangeWithAdjustmentBar:e.handlePreviewWidthChangeWithAdjustmentBar,iframeLoaded:e.mountCanvasInIframe,iframeUnloaded:e.setIframeAsExited,reloadWanted:e.reloadIframe,resetPreviewWidth:e.handleResetPreviewWidth}}):e._e()},b=[];const S='/* Copied from globals.scss, don\'t modify here directly */\n:root {\n --white: #ffffff;\n --black: #000000;\n\n --blue50: #eff6ff;\n --blue100: #dbeafe;\n --blue200: #bfdbfe;\n --blue300: #93c5fd;\n --blue400: #60a5fa;\n --blue500: #3b82f6;\n --blue600: #2563eb;\n --blue700: #1d4ed8;\n --blue800: #1e40af;\n --blue900: #1e3a8a;\n\n --neutral-50: #f9fafb;\n --neutral-100: #f4f5f7;\n --neutral-200: #e5e7eb;\n --neutral-300: #d2d6dc;\n --neutral-400: #9fa6b2;\n --neutral-500: #6b7280;\n --neutral-600: #4b5563;\n --neutral-700: #374151;\n --neutral-800: #1f2937;\n --neutral-900: #111827;\n\n --red600: #dc2626;\n\n --bde-canvas-font-family: system-ui, -apple-system, "Segoe UI", Roboto,\n Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";\n\n --bde-app-font-family: "Avenir", Helvetica, Arial, sans-serif;\n\n --bde-onboarding-app-font-family: "Inter", Helvetica, Arial, sans-serif;\n}\n\n/* everything here should be prefixed with breakdance because\nthese styles are mixed with any fuckery from their theme */\n\n#breakdance_canvas {\n position: relative;\n /* note that .breakdance { position: relative { is loaded by default on the frontend,\n therwise if the user uses absolute positioning, things could look different in the builder */\n /* this is necessary cuz our outlines, titlebars, etc. are positioned relative to this element */\n}\n\n#breakdance_canvas.dragging,\n#breakdance_canvas.dragging * {\n cursor: grabbing;\n}\n\n#iframe {\n margin: 4px;\n border: 1px solid #eee;\n background-color: white;\n width: 100%;\n padding: 2px;\n font-family: var(--bde-canvas-font-family);\n position: relative;\n}\n\n.breakdance-icon {\n display: flex;\n justify-content: center;\n}\n\n.breakdance-icon > svg {\n fill: currentColor;\n width: 100%;\n height: 100%;\n}\n\n@-moz-document url-prefix() {\n .breakdance-icon > svg {\n width: auto;\n height: auto;\n }\n}\n\n.dragTaller {\n height: 6px;\n width: 6px;\n border: 2px solid grey;\n border-radius: 50%;\n background-color: white;\n z-index: 2000;\n}\n\n.drag-dot {\n width: 11px;\n height: 11px;\n border-radius: 50%;\n background-color: rgb(32, 43, 67);\n cursor: move;\n position: absolute;\n z-index: 100000;\n pointer-events: auto;\n}\n\n.drag-dots-wrapper {\n position: absolute;\n pointer-events: none;\n}\n\n.drag-dot-top-left {\n top: -5px;\n left: -5px;\n}\n\n.drag-dot-top-middle {\n top: -5px;\n left: calc(50% - 5px);\n}\n\n.drag-dot-top-right {\n top: -5px;\n left: calc(100% - 5px);\n}\n\n.drag-dot-bottom-left {\n top: calc(100% - 5px);\n left: -5px;\n}\n\n.drag-dot-bottom-middle {\n top: calc(100% - 5px);\n left: calc(50% - 5px);\n}\n\n.drag-dot-bottom-right {\n top: calc(100% - 5px);\n left: calc(100% - 5px);\n}\n\n.drag-dot-middle-left {\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.drag-dot-middle-right {\n top: 50%;\n transform: translate(50%, -50%);\n right: 0;\n}\n\n.spacing-bar {\n background-color: rgba(0, 0, 255, 0.2);\n opacity: 0;\n position: absolute;\n transition: 0.3s ease-in-out opacity;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 10000;\n min-height: 5px;\n}\n\n.spacing-bar:hover {\n transition-delay: 0.2s;\n}\n\n.spacing-bar .spacing-bar-current-value {\n font-family: monospace;\n color: white;\n font-size: 13px;\n font-weight: 500;\n background-color: #5555aa;\n line-height: 1;\n padding: 6px;\n border-radius: 4px;\n pointer-events: none;\n}\n\n.spacing-bar-inside-top {\n min-height: 5px;\n top: 0;\n left: 0;\n right: 0;\n}\n\n/* column drag */\n.drag-dots-left-width {\n margin-right: 22px;\n}\n\n.drag-dots-column-widths-values {\n display: flex;\n flex-direction: row;\n position: absolute;\n left: -66px;\n top: -8px;\n}\n\n.drag-dots-left-width,\n.drag-dots-right-width {\n font-family: monospace;\n color: white;\n font-size: 13px;\n font-weight: 500;\n background-color: #5555aa;\n line-height: 1;\n padding: 6px;\n border-radius: 4px;\n width: 48px;\n}\n\n/* Node Chrome */\n\n.node-chrome,\n.node-titlebar-wrapper,\n.node-hover-controls {\n transition: 0.3s opacity ease;\n}\n\n.node-chrome--hide-all,\n.node-chrome--hide-titlebar .node-titlebar-wrapper,\n.node-chrome--hide-hover .node-hover-controls {\n opacity: 0;\n}\n\n/* Titlebars */\n\n.node-titlebar-wrapper {\n position: absolute;\n pointer-events: none;\n direction: ltr;\n z-index: 10000;\n outline: 1px solid rgb(32, 43, 67);\n user-select: none;\n}\n\n.node-titlebar {\n pointer-events: auto;\n\n display: flex;\n align-items: center;\n position: absolute;\n\n bottom: 100%;\n height: 28px;\n padding: 0 10px;\n border-radius: 4px 4px 0 0;\n\n font-family: var(--bde-app-font-family);\n font-size: 12px;\n font-weight: 500;\n\n letter-spacing: normal;\n font-style: normal;\n text-transform: none;\n\n background-color: rgb(32, 43, 67);\n color: white;\n z-index: 1000000;\n\n left: -1px;\n}\n\n/* Draft */\n.node-titlebar-is-offset {\n left: 0;\n}\n\n.node-titlebar-is-draft-section {\n background-color: rgb(122, 125, 133);\n}\n\n/*\n * Moving you mouse over the node titlebar or spacing bars\n * will trigger an erroneous mouseleave event on the element\n * you are dragging, when your mouse is not outside of it yet.\n */\n.dragging .spacing-bar,\n.dragging .node-titlebar {\n pointer-events: none;\n}\n\n.node-titlebar-is-dragging,\n.breakdance--currently-dragging,\n.builder-element.breakdance--currently-dragging {\n cursor: grabbing;\n}\n\n.breakdance--currently-dragging,\n.builder-element.breakdance--currently-dragging {\n opacity: 0.5;\n}\n\n.node-titlebar-is-dragging {\n /* color: rgb(32, 43, 67); */\n background-color: rgb(167, 170, 177) !important;\n}\n\n.node-titlebar-wrapper-is-dragging {\n outline: 1px solid rgb(167, 170, 177) !important;\n}\n\n.node-titlebar-wrapper .node-titlebar-button {\n color: rgba(255, 255, 255, 0.85);\n cursor: pointer;\n}\n\n.node-titlebar-button:hover {\n color: rgba(255, 255, 255, 1);\n}\n\n.node-titlebar-title {\n white-space: nowrap;\n cursor: grab;\n display: flex;\n align-items: center;\n font-style: normal;\n letter-spacing: normal;\n}\n\n.node-titlebar-title .node-titlebar-button {\n margin-right: 4px;\n margin-left: 0px;\n}\n\n.node-titlebar-title .node-titlebar-button svg {\n cursor: grab;\n}\n\n.node-titlebar-button-activate-parent {\n margin-left: 6px;\n}\n\n.node-titlebar-button.node-titlebar-button-activate-parent > svg {\n width: 10px;\n height: 10px;\n}\n\n.node-titlebar-button {\n margin-left: 9px;\n}\n\n.node-titlebar-button > svg {\n width: 13px;\n height: 13px;\n}\n\n.node-titlebar-margin-left {\n margin-left: 20px;\n}\n\n.node-titlebar--hide {\n display: none!important;\n}\n\n/* Outline Titlebar */\n.node-titlebar-wrapper--ghost {\n z-index: 9999;\n outline: none !important;\n}\n\n.node-titlebar-wrapper--ghost .node-titlebar {\n background-color: transparent;\n color: var(--blue500);\n}\n\n.node-titlebar-wrapper--ghost .node-titlebar-button {\n color: var(--blue500);\n}\n\n/* Other */\n.breakdance-drag-placeholder-wrapper {\n pointer-events: none;\n}\n\n.breakdance-drag-placeholder {\n /* this won\'t work if something other than the window has position relative on it,\n maybe we could mount the overlaid ui chrome inside the body, not in the canvas */\n\n /* some months later\n ... really? The above sounds like bullshit. I can put position relative\n on all sorts of stuff and this works fine\n so maybe we are already mounting the overlaid UI chrome in the right place?\n */\n\n position: absolute;\n /* ---- */\n background-color: var(--blue500);\n z-index: 100001;\n display: none;\n border-radius: 2px;\n}\n\n.breakdance-drag-target-outline {\n outline: 6px solid var(--blue300);\n outline-offset: -6px;\n z-index: 100000;\n display: none;\n}\n\n.breakdance-children-pointer-events-none > * {\n pointer-events: none;\n}\n\n/* global blocks */\n.breakdance-themeless-global-block {\n cursor: default;\n}\n\n.breakdance-themeless-global-block::selection {\n background-color: transparent;\n}\n\n.breakdance-themeless-global-block *::selection {\n background-color: transparent;\n}\n\n.breakdance-foreign-documents-overlay {\n font-family: var(--bde-canvas-font-family);\n position: fixed;\n z-index: 9999;\n outline: 1px solid rgb(255 182 216);\n outline-offset: -1px;\n cursor: not-allowed;\n background-color: rgba(0, 0, 0, 0.1);\n display: none;\n}\n.breakdance-foreign-documents-overlay-titlebar-wrapper {\n position: absolute;\n top: 0;\n left: 50%;\n}\n\n.breakdance-foreign-documents-overlay-titlebar {\n position: relative;\n left: -50%;\n height: 28px;\n padding: 0 10px;\n font-family: var(--bde-canvas-font-family);\n font-size: 12px;\n font-weight: 500;\n background-color: rgb(255 182 216);\n border-radius: 0px 0px 4px 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n user-select: none;\n}\n\n.breakdance-foreign-documents-overlay-titlebar a {\n cursor: pointer;\n color: black;\n text-decoration: none;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.breakdance-foreign-documents-overlay-titlebar a svg {\n margin-left: 5px;\n width: 14px;\n height: 14px;\n}\n\n.breakdance-foreign-document-wrapper:hover\n .breakdance-foreign-document-wrapper__overlay {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n\n/* node hover controls */\n.node-hover-controls {\n position: absolute;\n pointer-events: none;\n z-index: 9999;\n}\n\n.node-hover-controls--onboarding {\n pointer-events: auto;\n}\n\n.node-hover-controls--onboarding.node-hover-controls--outline {\n outline: 1px solid var(--neutral-200);\n}\n\n.node-hover-controls--outline {\n outline: 1px solid rgb(177, 202, 255);\n}\n\n.node-hover-controls-button {\n position: absolute;\n pointer-events: auto;\n flex-direction: column;\n\n border-radius: 50%;\n\n width: 40px;\n height: 40px;\n\n font-size: 20px;\n font-weight: 700;\n font-family: var(--bde-canvas-font-family);\n background-color: rgb(32, 43, 67);\n color: white;\n\n align-items: center;\n justify-content: center;\n\n cursor: pointer;\n}\n\n.node-hover-controls-bottom-button {\n top: calc(100% - 20px);\n left: calc(50% - 20px);\n}\n\n.node-hover-controls-right-button {\n top: 50%;\n left: calc(100% - 48px);\n transform: translateY(-50%);\n}\n\n.node-hover-controls-menu {\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n border-radius: 3px;\n font-family: var(--bde-canvas-font-family);\n font-size: 13px;\n font-weight: 500;\n flex-direction: column;\n background-color: white;\n color: black;\n display: none;\n position: absolute;\n top: calc(100% - 20px);\n left: 50%;\n transform: translateX(-50%);\n width: 170px;\n overflow: hidden;\n}\n\n.node-hover-controls-menu > div {\n padding: 9px 12px;\n text-align: center;\n}\n\n.node-hover-controls-menu > div:hover {\n background-color: #fafafa;\n}\n\n.node-hover-controls-menu--open {\n display: flex;\n}\n\n/* We do the outlining with JS to add some logic to it*/\n*:focus[contenteditable="true"] {\n border: none;\n outline: none;\n}\n\n.node-content-editable {\n position: absolute;\n pointer-events: none;\n z-index: 1000;\n outline: 1px solid var(--blue500);\n}\n\n/* EMPTY CONTAINER */\n\n.breakdance-empty-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n min-height: 200px;\n}\n\n.breakdance-empty-container__text {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n justify-content: center;\n font-family: var(--bde-canvas-font-family);\n}\n\n.breakdance-empty-container__text p {\n font-size: 18px;\n color: var(--neutral-500);\n margin: 0;\n}\n\n.breakdance-empty-container__add-element {\n font-family: var(--bde-canvas-font-family);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n cursor: pointer;\n\n user-select: none;\n\n background-color: var(--blue50);\n width: 42px;\n height: 42px;\n border-radius: 3px;\n margin: 10px;\n}\n\n.breakdance-empty-container__add-element {\n color: var(--blue500);\n}\n\n.breakdance-empty-container__add-element:hover {\n background-color: var(--blue100);\n}\n\n.breakdance-empty-container__add-element--disabled,\n.breakdance-empty-container__add-element--disabled:hover {\n cursor: not-allowed;\n background: var(--grey-100);\n color: var(--grey-300);\n}\n\n/* COLUMNS */\n\n.breakdance-empty-columns {\n font-family: var(--bde-canvas-font-family);\n box-sizing: border-box;\n width: 100%;\n overflow: hidden;\n background-color: white;\n border-radius: 5px;\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 0 100px rgba(0, 0, 0, 0.1);\n padding: 50px;\n}\n\n.breakdance-empty-columns-choices-heading {\n font-weight: 500;\n font-size: 16px;\n text-align: center;\n margin-bottom: 16px;\n user-select: none;\n}\n\n.breakdance-empty-columns-choices {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.breakdance-empty-columns-choices-row {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n}\n\n.breakdance-empty-columns-column-icon-wrapper {\n padding: 4px;\n margin: 16px;\n cursor: pointer;\n border-radius: 3px;\n transition: 0.3s ease-in-out filter;\n filter: grayscale(90%);\n}\n\n.breakdance-empty-columns-column-icon-wrapper:hover {\n filter: grayscale(0%);\n}\n\n.breakdance-empty-columns-column-icon {\n width: 160px;\n height: 90px;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n}\n\n.breakdance-empty-columns-column-icon-column {\n margin: 4px;\n width: 100%;\n background-color: #bfdbfe;\n border-radius: 3px;\n}\n\n.breakdance--empty-container:not(.breakdance--active-element) {\n outline: 2px solid #eee;\n outline-offset: -2px;\n}\n\n/* ELEMENT */\n\n.builder-element {\n cursor: default;\n}\n\n/* right click menu. This is duplicated in the styles.iframecss\n\nWe need it also here because this is used both in the canvas and the structure panel\n*/\n\n.breakdance-canvas-right-click-menu {\n -webkit-font-smoothing: antialiased;\n position: absolute; /* absolute when in the canvas, fixed when in the structure panel */\n z-index: 2147483647;\n font-family: var(--bde-canvas-font-family);\n background-color: var(--white-fixed, var(--white));\n box-shadow: 0px 5px 5px -3px rgb(0 0 0 / 20%),\n 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%);\n min-width: 200px;\n border-radius: 6px;\n padding: 6px 0px;\n user-select: none;\n letter-spacing: normal;\n font-style: normal;\n text-transform: none;\n}\n\n.breakdance-canvas-right-click-menu-item {\n font-size: 13px;\n font-weight: 400;\n font-size: 12px;\n min-height: 33px;\n padding: 0 18px;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n cursor: pointer;\n color: #333;\n}\n\n.breakdance-canvas-right-click-menu-item-shortcut {\n margin-left: auto;\n font-size: 12px;\n color: var(--grey-400);\n}\n\n.breakdance-canvas-right-click-menu-divider {\n height: 1px;\n background-color: #ddd;\n margin-top: 4px;\n margin-bottom: 4px;\n}\n\n.breakdance-canvas-right-click-menu-item:hover:not(\n .breakdance-canvas-right-click-menu-item-disabled\n ) {\n background-color: #eee;\n}\n\n.breakdance-canvas-right-click-menu-item-disabled {\n opacity: 0.5;\n cursor: default !important;\n}\n\n.breakdance-canvas-right-click-dropdown {\n position: relative;\n}\n\n.breakdance-canvas-right-click-submenu {\n position: absolute;\n left: 100%;\n top: -20px;\n z-index: 100000;\n pointer-events: none;\n opacity: 0;\n min-width: 100px;\n padding-top: 20px;\n transition: 0.3s opacity ease;\n}\n\n.breakdance-canvas-right-click-submenu__arrow {\n margin-left: auto;\n}\n\n.breakdance-canvas-right-click-submenu__content {\n position: static !important;\n translate: 4px 0;\n overflow: hidden;\n min-width: auto;\n}\n\n.breakdance-canvas-right-click-dropdown:hover\n .breakdance-canvas-right-click-submenu {\n opacity: 1;\n pointer-events: auto;\n}\n\n.breakdance-canvas-right-click-dropdown--disabled,\n.breakdance-canvas-right-click-dropdown--disabled:hover {\n pointer-events: none;\n}\n\n@media (prefers-color-scheme: dark) {\n .breakdance-canvas-right-click-menu {\n background-color: #1f2229;\n }\n\n .breakdance-canvas-right-click-menu-item {\n color: var(--white-fixed, var(--white));\n }\n\n .breakdance-canvas-right-click-menu-item:hover:not(\n .breakdance-canvas-right-click-menu-item-disabled\n ) {\n background-color: #2c3038;\n }\n\n .breakdance-canvas-right-click-menu-divider {\n background-color: #4d535e;\n }\n}\n\n/* Structure panel */\n.breakdance-canvas-right-click-menu--structure-panel {\n min-width: 155px;\n}\n\n.breakdance-canvas-right-click-dropdown--inverted\n .breakdance-canvas-right-click-submenu {\n left: auto;\n right: 100%;\n}\n\n.breakdance-canvas-right-click-dropdown--inverted\n .breakdance-canvas-right-click-submenu__content {\n translate: -4px 0;\n}\n\n/* Empty State */\n\n.breakdance-canvas-empty-element {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n padding: 30px;\n text-align: center;\n border: 2px dashed #c3c4c7;\n}\n\n.breakdance-canvas-empty-element__title {\n font-size: 18px;\n font-weight: normal;\n color: #646970;\n margin-bottom: 0;\n}\n\n/*** Warning ***/\n\n.bde-ssr-error {\n background: rgb(254, 242, 242);\n color: var(--red600);\n padding: 12px;\n}\n\n/*** Loading ***/\n\n.breakdance-empty-ssr-message {\n padding: 12px;\n background: rgb(242, 242, 254);\n width: 100%;\n display: flex;\n flex-direction: column;\n color: black;\n font-size: 13px;\n font-weight: 500;\n margin: 12px 0;\n}\n\n.breakdance-empty-ssr-message-error {\n background: rgb(254, 242, 242);\n}\n\n.breakdance-empty-ssr-message small {\n margin-top: 6px;\n color: black;\n font-size: 11px;\n font-weight: 400;\n}\n\n.breakdance-element-is-updating:empty {\n min-height: 80px;\n max-width: 100%;\n width: 400px;\n}\n\n.breakdance-element-is-updating {\n background: linear-gradient(\n 90deg,\n rgba(150, 150, 150, 0.1) 0%,\n rgba(150, 150, 150, 0.3) 50%,\n rgba(150, 150, 150, 0.1) 100%\n );\n\n background-size: 200% 100%;\n animation: shimmer 1.5s infinite;\n color: transparent !important;\n border-radius: 4px;\n}\n\n.breakdance-element-is-updating > * {\n opacity: 0 !important;\n}\n\n@keyframes shimmer {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n}\n\n/* Ghost Placeholder */\n\n.breakdance-drag-ghost-element {\n position: fixed;\n z-index: 999999;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 130px;\n height: 40px;\n padding-left: 5px;\n padding-right: 5px;\n\n background-color: var(--white);\n border: 1px solid var(--blue600);\n color: var(--blue600);\n outline: none;\n\n border-radius: 4px;\n opacity: 0.8;\n\n font-size: var(--text-sm);\n font-weight: 500;\n line-height: 1;\n text-align: center;\n\n pointer-events: none;\n\n transform: translateX(-50%) translateY(-10%);\n\n display: none;\n}\n\n/* Right Click Dropdown */\n\n.breakdance-canvas-right-click-dropdown {\n position: relative;\n}\n\n.breakdance-canvas-right-click-submenu {\n position: absolute;\n left: 100%;\n top: -20px;\n z-index: 100000;\n pointer-events: none;\n opacity: 0;\n min-width: 100px;\n padding-top: 20px;\n transition: 0.3s opacity ease;\n transition: 0.3s opacity ease;\n}\n\n.breakdance-canvas-right-click-submenu__arrow {\n margin-left: auto;\n}\n\n.breakdance-canvas-right-click-submenu__content {\n position: static !important;\n position: static !important;\n translate: 4px 0;\n overflow: hidden;\n min-width: auto;\n}\n\n.breakdance-canvas-right-click-dropdown:hover\n .breakdance-canvas-right-click-submenu {\n opacity: 1;\n pointer-events: auto;\n}\n\n.breakdance-canvas-right-click-dropdown--disabled,\n.breakdance-canvas-right-click-dropdown--disabled:hover {\n pointer-events: none;\n}\n\n@media (prefers-color-scheme: dark) {\n .breakdance-canvas-right-click-menu {\n background-color: #1f2229;\n }\n\n .breakdance-canvas-right-click-menu-item {\n color: var(--white);\n }\n\n .breakdance-canvas-right-click-menu-item:hover:not(\n .breakdance-canvas-right-click-menu-item-disabled\n ) {\n background-color: #2c3038;\n }\n\n .breakdance-canvas-right-click-menu-divider {\n background-color: #4d535e;\n }\n}\n\n.node-hover-onboarding-controls-buttons,\n.node-hover-onboarding-controls-add-section {\n position: relative;\n display: flex;\n flex-direction: row;\n border: 1px solid var(--neutral-200);\n border-left: 0;\n border-radius: 0 0 4px 0;\n overflow: hidden;\n}\n\n.node-hover-onboarding-controls-add-section {\n border: 1px solid var(--neutral-200);\n border-radius: 4px;\n position: absolute;\n bottom: -12px;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.node-hover-onboarding-controls-buttons__button {\n /* reset button CSS */\n background-color: transparent;\n border: none;\n color: inherit;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n padding: 0;\n margin: 0;\n text-align: left;\n text-decoration: none;\n display: flex;\n align-items: center;\n justify-content: center;\n /* styles */\n background-color: #fff;\n font-family: var(--bde-onboarding-app-font-family);\n padding: 4px 12px;\n gap: 4px;\n font-size: 14px;\n font-weight: 500;\n border-right: 1px solid var(--neutral-200);\n}\n\n.node-hover-onboarding-controls-buttons__button[disabled] {\n opacity: 0.5;\n}\n\n@keyframes spin {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.is-spinning {\n animation: spin 0.8s infinite linear;\n}\n\n.node-hover-onboarding-controls-buttons__button:hover {\n background-color: var(--neutral-100);\n}\n\n.node-hover-onboarding-controls-buttons__button:last-child {\n border-right: 0;\n}\n\n.node-onboarding-palette-button__color {\n width: 20px;\n height: 16px;\n}\n\n.node-hover-onboarding-controls-palette-buttons {\n display: flex;\n border-right: 1px solid var(--neutral-200);\n}\n\n.node-hover-onboarding-controls-buttons__colors-wrap {\n border: 1px solid var(--neutral-300);\n border-radius: 4px;\n overflow: hidden;\n display: flex;\n}\n\n/* Inline Editor */\n.breakdance-inline-editor {\n display: contents;\n}\n\n.breakdance-inline-editor__loader {\n padding: 10px;\n text-align: center;\n}\n\n.breakdance-inline-editor-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n height: 100vh;\n width: 100vw;\n background: rgba(0, 0, 0, 0.3);\n pointer-events: auto;\n z-index: 9999;\n cursor: pointer;\n}\n',C='.node-chrome--singularity {\n /* tailwind blue */\n --singularity-node-blue-50: #eff6ff;\n --singularity-node-blue-100: #dbeafe;\n --singularity-node-blue-200: #bfdbfe;\n --singularity-node-blue-300: #93c5fd;\n --singularity-node-blue-400: #60a5fa;\n --singularity-node-blue-500: #3b82f6;\n --singularity-node-blue-600: #2563eb;\n --singularity-node-blue-700: #1d4ed8;\n --singularity-node-blue-800: #1e40af;\n --singularity-node-blue-900: #1e3a8a;\n\n /* tailwind neutral */\n --singularity-node-neutral-50: #fafafa;\n --singularity-node-neutral-100: #f5f5f5;\n --singularity-node-neutral-200: #e5e7eb;\n --singularity-node-neutral-300: #d1d5db;\n --singularity-node-neutral-400: #9ca3af;\n --singularity-node-neutral-500: #6b7280;\n --singularity-node-neutral-600: #4b5563;\n --singularity-node-neutral-700: #374151;\n --singularity-node-neutral-800: #1f2937;\n --singularity-node-neutral-900: #111827;\n\n /* tailwind purple */\n --singularity-node-purple-50: #f5f3ff;\n --singularity-node-purple-100: #ede9fe;\n --singularity-node-purple-200: #ddd6fe;\n --singularity-node-purple-300: #c4b5fd;\n --singularity-node-purple-400: #a78bfa;\n --singularity-node-purple-500: #8b5cf6;\n --singularity-node-purple-600: #7c3aed;\n --singularity-node-purple-700: #6d28d9;\n --singularity-node-purple-800: #5b21b6;\n --singularity-node-purple-900: #4c1d95;\n\n /* tailwind teal */\n --singularity-node-teal-50: #f0fdfa;\n --singularity-node-teal-100: #ccfbf1;\n --singularity-node-teal-200: #99f6e4;\n --singularity-node-teal-300: #5eead4;\n --singularity-node-teal-400: #2dd4bf;\n --singularity-node-teal-500: #14b8a6;\n --singularity-node-teal-600: #0d9488;\n --singularity-node-teal-700: #0f766e;\n --singularity-node-teal-800: #115e59;\n --singularity-node-teal-900: #134e4a;\n\n /* tailwind typography sizing */\n --singularity-node-font-size-xs: 12px;\n --singularity-node-font-size-sm: 14px;\n --singularity-node-font-size-base: 16px;\n --singularity-node-font-size-lg: 18px;\n --singularity-node-font-size-xl: 20px;\n --singularity-node-font-size-2xl: 24px;\n --singularity-node-font-size-3xl: 30px;\n}\n\n.node-chrome--singularity .singularity-canvas-button {\n pointer-events: auto;\n background-color: var(--singularity-node-blue-600);\n transition: all 0.2s ease-in-out;\n border-radius: 4px;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n padding: 6px 8px;\n border-radius: 4px;\n cursor: pointer;\n font-family: var(--bde-app-font-family);\n font-size: 14px;\n}\n\n.node-chrome--singularity .singularity-canvas-button--large {\n padding: 12px 16px;\n}\n\n.node-chrome--singularity .singularity-canvas-button:hover {\n background-color: var(--singularity-node-blue-500);\n}\n\n.node-chrome--singularity .singularity-canvas-button:active {\n background-color: var(--singularity-node-blue-700);\n transform: scale(0.98);\n}\n\n.node-chrome--singularity .singularity-canvas-button__text {\n font-size: 13px;\n font-weight: 500;\n line-height: 1;\n font-family: var(--bde-app-font-family);\n flex-shrink: 0;\n}\n\n.node-chrome--singularity\n .singularity-canvas-button--large\n .singularity-canvas-button__text {\n font-size: 16px;\n}\n\n.node-chrome--singularity .singularity-canvas-button__icon {\n font-size: 16px;\n flex-shrink: 0;\n}\n\n.node-chrome--singularity .singularity-button-group {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 4px;\n border-radius: 6px;\n background-color: var(--singularity-node-blue-600);\n}\n\n.node-chrome--singularity .singularity-position-wrapper {\n position: absolute;\n}\n\n.node-chrome--singularity .singularity-position-wrapper--center {\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.node-chrome--singularity .singularity-position-wrapper--bottom-center {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n}\n\n.node-chrome--singularity .singularity-position-wrapper--right-center {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n}\n\n.node-chrome--singularity .singularity-sticky-section-edit {\n position: sticky;\n top: 0;\n left: 0;\n padding: 24px;\n z-index: 1000;\n display: inline-flex;\n}\n\n.node-chrome--singularity\n .node-singularity-hover-controls.node-hover-controls--outline {\n outline: 3px solid var(--singularity-node-blue-400);\n outline-offset: 0;\n}\n\n.node-chrome--singularity .singularity-node-titlebar-wrapper {\n outline: 3px solid var(--singularity-node-blue-600);\n outline-offset: -3px;\n}\n\n.node-chrome--singularity\n .node-singularity-hover-controls.node-hover-controls--active {\n outline: 3px solid var(--singularity-node-blue-600);\n outline-offset: 0;\n}\n\n.node-chrome--singularity .node-titlebar-wrapper {\n display: none;\n}\n\n.node-chrome--singularity .node-singularity-hover-controls {\n z-index: 1001 !important;\n}\n\n.node-chrome--singularity .singularity-node-titlebar-wrapper {\n position: absolute;\n pointer-events: none;\n direction: ltr;\n z-index: 1000;\n user-select: none;\n}\n\n.node-chrome--singularity .singularity-node-titlebar {\n pointer-events: auto;\n display: flex;\n align-items: center;\n position: absolute;\n bottom: 100%;\n padding: 4px;\n border-radius: 4px 4px 0 0;\n font-family: var(--bde-app-font-family);\n font-size: 13px;\n font-weight: 500;\n letter-spacing: normal;\n height: 32px;\n font-style: normal;\n text-transform: none;\n background-color: var(--singularity-node-blue-600);\n color: white;\n z-index: 1000000;\n min-width: 85px;\n left: 2px;\n}\n\n.node-chrome--singularity .singularity-node-titlebar.is-hidden {\n display: none;\n}\n\n.node-chrome--singularity .singularity-node-titlebar__text {\n padding: 4px 6px;\n}\n\n.node-chrome--singularity .singularity-canvas-add-another-button {\n pointer-events: auto;\n background-color: var(--singularity-node-blue-600);\n position: absolute;\n transition: all 0.2s ease-in-out;\n border-radius: 100%;\n color: #fff;\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n font-size: 20px;\n height: 40px;\n bottom: 50%;\n right: 0;\n cursor: pointer;\n transform: translate(50%, 50%);\n}\n\n.node-chrome--singularity\n .singularity-canvas-add-another-button:hover\n .singularity-canvas-add-another-button__inner {\n background-color: var(--singularity-node-blue-500);\n}\n\n.node-chrome--singularity .singularity-canvas-add-another-button__inner {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n border-radius: 100%;\n height: 100%;\n background-color: var(--singularity-node-blue-600);\n transition: background-color 0.2s ease-in-out;\n}\n\n\n.section-currently-rewriting-with-ai\n .builder-element:not(\n .breakdance--container-type-element\n ) {\n color: transparent !important;\n pointer-events: none;\n position: relative;\n border: 0 !important;\n isolation: isolate;\n}\n\n.section-currently-rewriting-with-ai\n .builder-element:not(\n .breakdance--container-type-element\n )::before {\n content: "";\n position: absolute;\n top: 0;\n left: 0;\n display: block;\n background-color: #d1d1d1;\n width: 100%;\n height: 100%;\n z-index: 1;\n animation: shimmer 3s infinite linear;\n background-image: linear-gradient(\n 90deg,\n #d1d1d1 0%,\n #f0f0f0 40%,\n #d1d1d1 80%\n );\n background-size: 200% 100%;\n}\n\n.section-currently-rewriting-with-ai .ee-gallery-item-caption,\n.section-currently-rewriting-with-ai .swiper-pagination,\n.section-currently-rewriting-with-ai .swiper-button-prev\n.section-currently-rewriting-with-ai .swiper-button-next\n{\n visibility: hidden;\n}\n\n.section-currently-rewriting-with-ai img {\n content: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"></svg>\');\n background: linear-gradient(90deg, #d1d1d1 0%, #f0f0f0 40%, #d1d1d1 80%);\n background-size: 200% 100%;\n animation: shimmer 3s infinite linear;\n}\n\n@keyframes shimmer {\n 0% {\n background-position: -200% 0;\n -webkit-mask-position: -200% 0;\n mask-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n -webkit-mask-position: 200% 0;\n mask-position: 200% 0;\n }\n}\n\n.section-currently-rewriting-with-ai .section-background-overlay {\n opacity: 1 !important;\n background-color: transparent !important;\n backdrop-filter: blur(100px) !important;\n}\n\n.node-chrome--singularity\n .breakdance-foreign-documents-overlay--singularity-mode {\n outline: 4px solid rgb(43, 105, 205);\n outline-offset: -4px;\n cursor: pointer;\n}\n\n.node-chrome--singularity\n .breakdance-foreign-documents-overlay--singularity-mode\n .breakdance-foreign-documents-overlay-titlebar {\n transform: translate(-50%, -50%);\n position: absolute;\n background-color: rgb(43, 105, 205);\n --addSectionButtonWidth: 160px;\n --addSectionButtonHeight: 60px;\n width: var(--addSectionButtonWidth);\n height: var(--addSectionButtonHeight);\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n\n.node-chrome--singularity\n .breakdance-foreign-documents-overlay--singularity-mode\n .breakdance-foreign-documents-overlay-titlebar\n a,\n.node-chrome--singularity\n .breakdance-foreign-documents-overlay--singularity-mode\n .breakdance-foreign-documents-overlay-titlebar\n a:hover {\n color: white;\n font-size: 20px;\n}\n\n.node-chrome--singularity\n .breakdance-foreign-documents-overlay--singularity-mode\n .breakdance-foreign-documents-overlay-titlebar-wrapper {\n top: 50%;\n left: 50%;\n}\n\n.node-chrome--singularity\n .breakdance-foreign-documents-overlay--singularity-mode\n .breakdance-icon {\n display: none;\n}\n\n.breakdance-empty-container-singularity {\n position: relative;\n font-family: var(--bde-app-font-family);\n}\n\n.breakdance-empty-container-singularity__title {\n font-size: var(--singularity-node-font-size-3xl);\n margin: 0;\n color: var(--singularity-node-neutral-900);\n font-family: var(--bde-app-font-family) !important;\n}\n\n.breakdance-empty-container-singularity__text {\n font-size: var(--singularity-node-font-size-base);\n margin: 0;\n color: var(--singularity-node-neutral-500);\n font-family: var(--bde-app-font-family);\n}\n\n.breakdance-empty-container-singularity__content {\n padding: 80px;\n font-family: var(--bde-app-font-family);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 100%;\n background-color: #fff;\n}\n\n.breakdance-empty-container-singularity__header {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n}\n\n.breakdance-empty-container-singularity__icon {\n color: var(--singularity-node-neutral-300);\n margin-bottom: 16px;\n}\n\n.breakdance-empty-container-singularity__option {\n display: inline-flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 24px;\n width: 100%;\n background-color: var(--singularity-node-neutral-100);\n border-radius: 8px;\n cursor: pointer;\n aspect-ratio: 1 / 1;\n min-height: 300px;\n cursor: pointer;\n user-select: none;\n}\n\n.breakdance-empty-container-singularity__options {\n display: flex;\n gap: 16px;\n flex-wrap: nowrap;\n justify-content: center;\n}\n\n.breakdance-empty-container-singularity__option-text {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.breakdance-empty-container-singularity__option-text h2 {\n margin: 0;\n font-size: var(--singularity-node-font-size-xl);\n color: var(--singularity-node-neutral-900);\n font-family: var(--bde-app-font-family);\n}\n\n.breakdance-empty-container-singularity__option-text p {\n margin: 0;\n font-size: var(--singularity-node-font-size-base);\n color: var(--singularity-node-neutral-500);\n font-family: var(--bde-app-font-family);\n}\n\n.breakdance-empty-container-singularity__option:hover {\n background-color: var(--singularity-node-blue-50);\n border-color: var(--singularity-node-blue-300);\n color: var(--singularity-node-blue-600);\n}\n\n.breakdance-empty-container-singularity__option:active {\n background-color: var(--singularity-node-blue-600);\n border-color: var(--singularity-node-blue-400);\n color: #fff;\n}\n\n.breakdance-empty-container-singularity__option:hover h2 {\n color: var(--singularity-node-blue-600);\n}\n\n.breakdance-empty-container-singularity__option:hover p {\n color: var(--singularity-node-blue-500);\n}\n\n.breakdance-empty-container-singularity__option:active h2,\n.breakdance-empty-container-singularity__option:active p {\n color: #fff;\n}\n\n/* .breakdance-empty-container-singularity__option:focus {\n outline: 2px solid var(--singularity-node-blue-600);\n outline-offset: 2px;\n} */\n',x='/* Future Layer Canvas UX Styles */\n\n:root {\n --singularity-outline-width: 3px;\n}\n\n/* Active Element Wrapper - zero sized, positioned at element top-left */\n.futurelayer-active-element-wrapper {\n position: absolute;\n z-index: 9999;\n pointer-events: auto;\n}\n\n/* Active Element Outline - darker than hover */\n.futurelayer-active-element-outline {\n position: absolute;\n border: var(--singularity-outline-width) solid\n var(--singularity-node-blue-600);\n box-sizing: border-box;\n pointer-events: none;\n}\n\n/* Hovered Element Wrapper - zero sized, positioned at element top-left */\n.futurelayer-hovered-element-wrapper {\n position: absolute;\n z-index: 9998;\n pointer-events: auto;\n}\n\n/* Hovered Element Outline - lighter than active */\n.futurelayer-hovered-element-outline {\n position: absolute;\n border: var(--singularity-outline-width) solid\n var(--singularity-node-blue-300);\n box-sizing: border-box;\n pointer-events: none;\n}\n\n/* Hovered Header/Footer Wrapper - zero sized, positioned at element top-left */\n.futurelayer-hovered-header-footer-wrapper {\n position: absolute;\n z-index: 9998;\n pointer-events: auto;\n}\n\n/* Hovered Header/Footer Outline - transparent black overlay with cursor pointer */\n.futurelayer-hovered-header-footer-outline {\n position: absolute;\n background-color: var(--singularity-node-teal-100);\n border: var(--singularity-outline-width) solid\n var(--singularity-node-teal-500);\n opacity: 0.3;\n box-sizing: border-box;\n pointer-events: none;\n cursor: pointer;\n}\n\n/* Header/Footer Controls - covers entire element with pointer events */\n.futurelayer-header-footer-controls {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: auto;\n cursor: pointer;\n}\n\n.futurelayer-header-footer-edit-button {\n padding: 8px 16px;\n font-size: 14px;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-weight: 500;\n line-height: 1;\n background-color: var(--singularity-node-teal-600);\n color: white;\n white-space: nowrap;\n font-family: var(--bde-app-font-family);\n}\n\n.futurelayer-header-footer-edit-button:hover {\n background-color: var(--singularity-node-teal-700);\n}\n\n/* Repeatable Item Wrapper - zero sized, positioned at element top-left */\n.futurelayer-repeatable-item-wrapper {\n position: absolute;\n z-index: 9997;\n pointer-events: auto;\n}\n\n/* Repeatable Item Outline - positioned relative to wrapper */\n.futurelayer-repeatable-item-outline {\n position: absolute;\n outline: var(--singularity-outline-width) solid\n var(--singularity-node-blue-100);\n outline-offset: 0px;\n box-sizing: border-box;\n pointer-events: none;\n}\n\n/* Repeatable Item Controls - positioned above the outline, aligned with right edge */\n.futurelayer-repeatable-item-controls {\n position: absolute;\n top: -32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n pointer-events: auto;\n}\n\n.futurelayer-repeatable-control-button,\n.futurelayer-link-control-button {\n padding: 4px 8px;\n font-size: 12px;\n border-radius: 4px;\n border: none;\n cursor: pointer;\n font-weight: 500;\n line-height: 1;\n color: var(--singularity-node-blue-600);\n background-color: var(--singularity-node-blue-100);\n transition: all 0.2s ease-in-out;\n white-space: nowrap;\n font-family: var(--bde-app-font-family);\n}\n\n.futurelayer-repeatable-control-button.move-left, .futurelayer-repeatable-control-button.move-right {\n padding: 4px 4px;\n}\n\n.futurelayer-repeatable-control-button:hover {\n background-color: var(--singularity-node-blue-200);\n}\n\n.futurelayer-repeatable-control-button.remove:hover {\n background-color: var(--red600);\n color: white;\n}\n\n/* Link Wrapper Components */\n.futurelayer-link-control-button {\n background-color: var(--singularity-node-blue-600);\n color: white;\n}\n\n.futurelayer-link-control-button:hover {\n background-color: var(--singularity-node-blue-700);\n}\n\n/* Link Wrapper Wrapper - zero sized, positioned at element top-left */\n.futurelayer-link-wrapper-wrapper {\n position: absolute;\n z-index: 9996;\n pointer-events: auto;\n}\n\n/* Link Wrapper Outline - positioned relative to wrapper */\n.futurelayer-link-wrapper-outline {\n position: absolute;\n border: 1px dotted #ff6b35;\n box-sizing: border-box;\n pointer-events: none;\n}\n\n/* Link Wrapper Controls - positioned below the outline, aligned with right edge */\n.futurelayer-link-wrapper-controls {\n position: absolute;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n pointer-events: auto;\n}\n\n\n/* Gallery Image Wrapper - zero sized, positioned at image top-left */\n.futurelayer-gallery-image-wrapper {\n position: absolute;\n z-index: 9997;\n pointer-events: auto;\n}\n\n/* Gallery Image Outline - positioned relative to wrapper */\n.futurelayer-gallery-image-outline {\n position: absolute;\n outline: var(--singularity-outline-width) solid\n var(--singularity-node-blue-100);\n outline-offset: 0px;\n box-sizing: border-box;\n pointer-events: none;\n}\n\n/* Add Section Controls - positioned at bottom center of section with 50% overlap */\n.futurelayer-add-section-controls {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: auto;\n}\n\n.futurelayer-add-section-button {\n padding: 8px 16px;\n font-size: 14px;\n border: none;\n font-family: var(--bde-app-font-family);\n border-radius: 4px;\n cursor: pointer;\n font-weight: 500;\n line-height: 1;\n background-color: var(--singularity-node-blue-600);\n color: white;\n white-space: nowrap;\n}\n\n.futurelayer-add-section-button:hover {\n background-color: var(--singularity-node-blue-700);\n}\n\n/* Removable Element Wrapper - zero sized, positioned at element top-left */\n.futurelayer-removable-element-wrapper {\n position: absolute;\n z-index: 9999;\n pointer-events: auto;\n}\n\n/* Removable Element Controls - positioned to the right of the element */\n.futurelayer-removable-element-controls {\n position: absolute;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n pointer-events: auto;\n}\n\n.futurelayer-removable-control-button {\n padding: 4px;\n font-size: 12px;\n border-radius: 4px;\n border: none;\n cursor: pointer;\n font-weight: 500;\n line-height: 1;\n color: var(--singularity-node-blue-600);\n background-color: var(--singularity-node-blue-100);\n transition: all 0.2s ease-in-out;\n white-space: nowrap;\n font-family: var(--bde-app-font-family);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.futurelayer-removable-control-button:hover {\n background-color: var(--singularity-node-blue-200);\n}\n\n.futurelayer-removable-control-button.delete:hover {\n background-color: var(--red600);\n color: white;\n}\n\n/* Removed Elements - use opacity instead of display: none */\n[data-futurelayer-removed="true"] {\n opacity: 0.2 !important;\n filter: grayscale(100%);\n}\n';var w=n(82256),I=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:e.classes},[e.isOnboardingMode?[t("NodeOnboardingHoverControls")]:e.isSingularityMode?[t("FutureLayerNodeChrome")]:[t("div",{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}]},[t("SpacingBars"),t("ColumnDragSizer")],1),t("NodeTitlebar"),t("NodeGhostTitlebar"),t("NodeHoverControls"),t("NodeContentEditable")]],2)},P=[],k=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"drag-dots-wrapper",style:e.dragDotsWrapperPositionStyle},[t("div",{staticClass:"drag-dot drag-dot-top-left",on:{mousedown:e.dragStart}}),t("div",{staticClass:"drag-dot drag-dot-top-middle",on:{mousedown:e.dragStart}}),t("div",{staticClass:"drag-dot drag-dot-top-right",on:{mousedown:e.dragStart}}),t("div",{staticClass:"drag-dot drag-dot-bottom-right",on:{mousedown:e.dragStart}}),t("div",{staticClass:"drag-dot drag-dot-bottom-middle",on:{mousedown:e.dragStart}}),t("div",{staticClass:"drag-dot drag-dot-bottom-left",on:{mousedown:e.dragStart}}),t("div",{staticClass:"drag-dot drag-dot-middle-left",on:{mousedown:e.dragStart}}),t("div",{staticClass:"drag-dot drag-dot-middle-right",on:{mousedown:e.dragStart}})])},E=[],T=n(13635);function D(e){return(t,n)=>{if(c.uiStore.activeElementId){const s=(e,t)=>e+t>=0?e+t:0;if("xProperty"in e&&e.xProperty){const i=e.xProperty.replace("%%CURRENTMEDIAQUERY%%",c.uiStore.currentBreakpoint.id),o=s(t.width,n.lastXChange);c.documentStore.throttledPropertyChanged({elementId:c.uiStore.activeElementId,path:i,value:{number:o,unit:"px"},meta:{snapshotLabel:"Resize element"}})}if("yProperty"in e&&e.yProperty){const i=e.yProperty.replace("%%CURRENTMEDIAQUERY%%",c.uiStore.currentBreakpoint.id),o=s(t.height,n.lastYChange);c.documentStore.throttledPropertyChanged({elementId:c.uiStore.activeElementId,path:i,value:{number:o,unit:"px"},meta:{snapshotLabel:"Resize element"}})}}}}var A=n(34676),Z=n(12721);const O={xProperty:"design.size.width.%%CURRENTMEDIAQUERY%%"};let M=class extends s.ZP{constructor(){super(...arguments),this.mouseDragInfo=!1,this.dragDotsWrapperPositionStyle={display:"none"},this.dragCallback=!1,this.unsubscribeFromStorePositionDotsWrapper=()=>{},this.easyEvent=new Z.hF}nextTickPositionDragDotsWrapper(){(0,A.forceNextTick)((()=>this.positionDragDotsWrapper()))}beforeMount(){this.positionDragDotsWrapper(),this.unsubscribeFromStorePositionDotsWrapper=this.$store.subscribe(this.nextTickPositionDragDotsWrapper),window.addEventListener("resize",this.nextTickPositionDragDotsWrapper)}beforeDestroy(){this.unsubscribeFromStorePositionDotsWrapper(),window.removeEventListener("resize",this.nextTickPositionDragDotsWrapper)}dragStart(e){e.preventDefault(),e.stopPropagation(),this.mouseDragInfo={startX:e.clientX,startY:e.clientY,currentX:e.clientX,currentY:e.clientY,lastXChange:0,lastYChange:0,totalXChange:0,totalYChange:0},this.dragCallback=D(O),this.easyEvent.on("mousemove",this.dragging),this.easyEvent.on("mouseup",this.dragEnd)}dragging(e){if((0,Z.Pm)(e)){e.preventDefault(),e.stopPropagation();const t=(0,T.nX)();if(!t||!this.mouseDragInfo)return;this.mouseDragInfo={...this.mouseDragInfo,currentX:e.clientX,currentY:e.clientY,lastXChange:e.clientX-this.mouseDragInfo.currentX,lastYChange:e.clientY-this.mouseDragInfo.currentY,totalXChange:e.clientX-this.mouseDragInfo.startX,totalYChange:e.clientY-this.mouseDragInfo.startY},this.dragCallback&&this.dragCallback(t,this.mouseDragInfo),this.positionDragDotsWrapper()}}dragEnd(e){e.preventDefault(),e.stopPropagation(),this.easyEvent.removeAll(),this.mouseDragInfo=!1,this.dragCallback=!1}positionDragDotsWrapper(){c.uiStore.activeElementId||(this.dragDotsWrapperPositionStyle={display:"none"});const e=(0,T.nX)();if(!e)return;const{x:t,y:n,width:s,height:i}=e;this.dragDotsWrapperPositionStyle={position:"absolute",top:n.toString()+"px",left:t.toString()+"px",width:s.toString()+"px",height:i.toString()+"px"}}};M=(0,r.gn)([(0,l.wA)({})],M);const B=M,L=B;var N=n(1001),F=(0,N.Z)(L,k,E,!1,null,null,null);const R=F.exports;var V=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",e._l(e.bars,(function(n,s){return t("SpacingBar",{key:s,attrs:{bar:n,isDragging:e.isDragging,isActiveBar:e.clickedHandle===n.location},on:{mousedown:function(t){return e.dragStart(t,n.location)}}})})),1)},$=[],W=n(23493),U=n.n(W);let z=class extends s.ZP{constructor(){super(...arguments),this.clickedHandle=!1,this.mouseDragInfo=!1,this.throttledDragging=U()(this.dragging,60),this.unsubscribeFromStorePositionWrapper=()=>{},this.wrapperPositionStyle={display:"none"}}dragCallback(e,t,n){console.warn("To use DragMixin you must implement dragCallback()")}dragEndCallback(){}dragStartCallback(e){}dragStart(e,t){e.stopPropagation(),"string"===typeof t?(c.uiStore.setDragMixinDragging(!0),this.clickedHandle=t,this.mouseDragInfo={startX:e.clientX,startY:e.clientY,currentX:e.clientX,currentY:e.clientY,lastXChange:0,lastYChange:0,totalXChange:0,totalYChange:0},window.Breakdance.canvas.document.addEventListener("mousemove",this.throttledDragging),window.Breakdance.canvas.document.addEventListener("mouseup",this.dragEnd),this.dragStartCallback(t)):console.warn("To use drag mixin you must specify a handle parameter (string) as the second param of your mousedown=dragStart, i.e. mousedown=dragStart($event, 'myhandle')")}dragging(e){e.preventDefault(),e.stopPropagation(),requestAnimationFrame((()=>this._draggingFunc(e)))}_draggingFunc(e){const t=(0,T.nX)();t&&this.mouseDragInfo&&(this.mouseDragInfo={...this.mouseDragInfo,currentX:e.clientX,currentY:e.clientY,lastXChange:e.clientX-this.mouseDragInfo.currentX,lastYChange:e.clientY-this.mouseDragInfo.currentY,totalXChange:e.clientX-this.mouseDragInfo.startX,totalYChange:e.clientY-this.mouseDragInfo.startY},this.clickedHandle&&this.dragCallback(t,this.mouseDragInfo,this.clickedHandle),this.positionWrapper(),(0,T.a7)())}dragEnd(e){e.preventDefault(),e.stopPropagation(),window.Breakdance.canvas.document.removeEventListener("mousemove",this.throttledDragging),window.Breakdance.canvas.document.removeEventListener("mouseup",this.dragEnd),this.mouseDragInfo=!1,this.clickedHandle=!1,c.uiStore.setDragMixinDragging(!1),this.dragEndCallback(),(0,T.a7)()}get isDragging(){return!!this.mouseDragInfo}nextTickPositionsWrapper(){(0,A.forceNextTick)(this.positionWrapper)}beforeMount(){this.positionWrapper(),this.unsubscribeFromStorePositionWrapper=this.$store.subscribe(this.nextTickPositionsWrapper),window.addEventListener("resize",this.nextTickPositionsWrapper)}beforeDestroy(){this.unsubscribeFromStorePositionWrapper(),window.removeEventListener("resize",this.nextTickPositionsWrapper)}positionWrapper(){if(!c.uiStore.activeElementId)return void(this.wrapperPositionStyle={display:"none"});const e=(0,T.nX)();if(!e)return;const{x:t,y:n,width:s,height:i}=e;this.wrapperPositionStyle={position:"absolute",top:`${n}px`,left:`${t}px`,width:`${s}px`,height:`${i}px`}}};z=(0,r.gn)([l.wA],z);var H=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"spacing-bar",class:e.classList,style:e.style,on:{mousedown:function(t){return e.$emit("mousedown",t)},mouseover:function(t){e.isHovering=!0},mouseleave:function(t){e.isHovering=!1}}},[t("div",{staticClass:"spacing-bar-current-value"},[e._v(e._s(e.value)+"px")])])},G=[],K=n(27361),j=n.n(K);function q(e,t){const n=X(e,t);return n||0}function X(e,t){if(!c.uiStore.activeElement)return!1;const n=Y(e,c.uiStore.currentBreakpoint.id);let s=parseInt(j()(c.uiStore.activeElement,`data.properties.${n}.number`));s||(s=0);let i=j()(c.uiStore.activeElement,`data.properties.${n}.unit`);if(i||(i="px"),"px"!==i&&0!==s){const e=(0,T.lx)(c.uiStore.activeElement);if(!e)return!1;const n=parseInt(e.getPropertyValue(t));return n}return s}function Y(e,t){return e.replace("%%BREAKPOINT%%",t)}var Q=n(31044);let J=class extends s.ZP{constructor(){super(...arguments),this.isHovering=!1,this.resizeObserver=new ResizeObserver(this.onActiveElementResize),this.activeElementPositionAndSize=null,this.valueAtMomentOfElementPositionAndSizeCalculation=null}get value(){return q(this.bar.affectedPropertyPath,this.bar.cssProperty)}get activeElement(){return Q.kD.activeElement}updateActiveElementPositionWhenItsPresent(){const e=this.activeElement;if(e){const t=(0,T.dq)(e);if(t)return this.activeElementPositionAndSize=(0,T.o7)(t)||null,void(this.valueAtMomentOfElementPositionAndSizeCalculation=this.value)}this.activeElementPositionAndSize=null,this.valueAtMomentOfElementPositionAndSizeCalculation=null}mounted(){this.intervalHandle=setInterval((()=>{(0,A.forceNextTick)(this.updateActiveElementPositionWhenItsPresent)}),50)}handleActiveElementChange(){this.updateActiveElementPositionWhenItsPresent(),this.resizeObserver.disconnect();const e=this.activeElement;if(e){const t=(0,T.dq)(e);t&&(this.resizeObserver.observe(t,{box:"border-box"}),t.parentElement&&this.resizeObserver.observe(t.parentElement,{box:"border-box"}))}}onActiveElementResize(){this.updateActiveElementPositionWhenItsPresent()}get classList(){return[`spacing-bar-${this.bar.location}`]}get style(){return this.isDragging&&this.isActiveBar||this.isHovering&&!this.isDragging?{...this.barStyle,opacity:1}:this.barStyle}get barStyle(){const e=this.activeElementPositionAndSize;if(!e)return{};const t=this.valueAtMomentOfElementPositionAndSizeCalculation||this.value,{width:n,height:s,y:i,x:o}=e,a=t>5?t:5;switch(this.bar.location){case"inside-top":return{width:`${n}px`,height:`${a}px`,top:`${i}px`,left:`${o}px`,cursor:"row-resize"};case"outside-top":return{width:`${n}px`,height:`${a}px`,top:`${-a+i}px`,left:`${o}px`,cursor:"row-resize"};case"inside-bottom":return{width:`${n}px`,height:`${a}px`,top:i+s-a+"px",left:`${o}px`,cursor:"row-resize"};case"outside-bottom":return{width:`${n}px`,height:`${a}px`,top:`${i+s}px`,left:`${o}px`,cursor:"row-resize"};case"inside-left":return{width:`${a}px`,top:`${i}px`,height:`${s}px`,left:`${o}px`,cursor:"col-resize"};case"outside-left":return{width:`${a}px`,top:`${i}px`,height:`${s}px`,left:o-a+"px",cursor:"col-resize"};case"inside-right":return{width:`${a}px`,top:`${i}px`,height:`${s}px`,left:o+n-a+"px",cursor:"col-resize"};case"outside-right":return{width:`${a}px`,top:`${i}px`,height:`${s}px`,left:`${o+n}px`,cursor:"col-resize"};default:return{}}}beforeDestroy(){this.resizeObserver.disconnect(),this.intervalHandle&&clearInterval(this.intervalHandle)}};(0,r.gn)([(0,l.fI)()],J.prototype,"bar",void 0),(0,r.gn)([(0,l.fI)()],J.prototype,"isDragging",void 0),(0,r.gn)([(0,l.fI)()],J.prototype,"isActiveBar",void 0),(0,r.gn)([(0,l.RL)("activeElement",{immediate:!0})],J.prototype,"handleActiveElementChange",null),J=(0,r.gn)([(0,l.wA)({})],J);const ee=J,te=ee;var ne=(0,N.Z)(te,H,G,!1,null,null,null);const se=ne.exports;var ie=n(84274),oe=n(40681),ae=n(54120);let re=class extends((0,l.Wr)(z)){constructor(){super(...arguments),this.originalValue=!1}get bars(){return this.activeElementSpacingBars?this.activeElementSpacingBars:[]}get activeElementSpacingBars(){return!!c.uiStore.activeElement&&(!(0,ae.CO)(c.uiStore.activeElement.id)&&c.configStore.element(c.uiStore.activeElement.data.type).spacingBars)}dragCallback(e,t,n){const s=this.bars.filter((e=>e.location===n)).pop();if(!c.uiStore.activeElementId||!s)return;let i=0,o=X(s.affectedPropertyPath,s.cssProperty);switch(o||(o=0),this.originalValue||(this.originalValue=o),n){case"inside-top":case"inside-bottom":case"outside-top":case"outside-bottom":i=this.originalValue+t.totalYChange;break;case"inside-left":case"inside-right":case"outside-left":case"outside-right":i=this.originalValue+t.totalXChange;break}i<0&&(i=0);const a=Y(s.affectedPropertyPath,c.uiStore.currentBreakpoint.id);c.documentStore.throttledPropertyChanged({elementId:c.uiStore.activeElementId,path:a,value:{number:i,unit:"px",style:`${i}px`},meta:{snapshotLabel:ie.AZ.forElementByTreeNodeId(c.uiStore.activeElementId,a,oe.P.CHANGE)}})}dragEndCallback(){this.originalValue=!1}};re=(0,r.gn)([(0,l.wA)({components:{SpacingBar:se}})],re);const le=re,ce=le;var de=(0,N.Z)(ce,V,$,!1,null,null,null);const ue=de.exports;var pe=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.shouldShow?t("div",{staticClass:"drag-dots-wrapper",style:e.wrapperPositionStyle},[e.isNotFarLeftColumn?t("div",{staticClass:"drag-dot drag-dot-middle-left",on:{mousedown:function(t){return e.dragStart(t,"left")}}},[e.resizedWidths&&"left"in e.resizedWidths?t("div",{staticClass:"drag-dots-column-widths-values"},[t("div",{staticClass:"drag-dots-left-width"},[e._v(" "+e._s(e.resizedWidths.left.siblingWidth)+"% ")]),t("div",{staticClass:"drag-dots-right-width"},[e._v(" "+e._s(e.resizedWidths.left.resizedWidth)+"% ")])]):e._e()]):e._e(),e.isNotFarRightColumn?t("div",{staticClass:"drag-dot drag-dot-middle-right",on:{mousedown:function(t){return e.dragStart(t,"right")}}},[e.resizedWidths&&"right"in e.resizedWidths?t("div",{staticClass:"drag-dots-column-widths-values"},[t("div",{staticClass:"drag-dots-left-width"},[e._v(" "+e._s(e.resizedWidths.right.resizedWidth)+"% ")]),t("div",{staticClass:"drag-dots-right-width"},[e._v(" "+e._s(e.resizedWidths.right.siblingWidth)+"% ")])]):e._e()]):e._e()]):e._e()},he=[],ge=n(31381),me=n(38020);function ve(e){const t=fe(e),n=_e(e);if(!t||!n)return!1;const s=(0,me.v)(t/n*100);return s||!1}function ye(e,t,n){const s=n,i=_e(e);if(!s||!i)return!1;const o=(s+t)/i*100;return(0,me.v)(o)}function fe(e){const t=(0,T.Sv)(e);return!!t&&t.width}function _e(e){const t=(0,ge.getNodeParent)(c.documentStore.document.tree,e.id);if(t){const e=(0,T.Sv)(t);if(e)return e.width}return!1}function be(e){const t=(0,T.lx)(e);if(!t)return!1;const n=parseInt(t.getPropertyValue("padding-left")),s=parseInt(t.getPropertyValue("padding-right"));if(Number.isNaN(n)||Number.isNaN(s))return!1;const i=_e(e);if(!i)return!1;const o=(n+s)/i*100;return Math.ceil(o)}var Se=n(884),Ce=n(92277);const xe=20;function we(e,t,n,s){const i="right"===s?t+1:t-1,o=e.children[i],a=e.children[t];if(!a||!o)return!1;if(t<0||i<0)return!1;const r=be(a),l=be(o);let c=xe;!1!==r&&!1!==l&&(c=Math.max(r,l));let d=100-(0,Se.IQ)(a)-(0,Se.IQ)(o),u=100-d-n;return n<c&&(n=c,u=100-d-n),u<c&&(u=c,n=100-d-u),d>100-2*c&&(n=(100-d)/2,u=(100-d)/2),n=(0,me.v)(n),u=(0,me.v)(u),d=(0,me.v)(d),n+u+d!==100&&(u=100-d-n,u=(0,me.v)(u)),(0,Ce.l)(a.id,n),(0,Ce.l)(o.id,u),(0,Se.wr)(e),{resizedWidth:n,siblingWidth:u}}var Ie=n(69137),Pe=n(57088);let ke=class extends((0,l.Wr)(z)){constructor(){super(...arguments),this.resizedWidths=!1,this.widthOnDragStart=!1}get columnsAreNotResizeableAtBaseBreakpoint(){if(!this.activeColumn)return!1;const e=(0,Se.fy)(this.activeColumn);if(!e)return!1;const t="design.layout.stack_vertically",n="design.layout.fifty_percent",s=j()(e.data.properties,t,!1),i=j()(e.data.properties,n,!1);return s===Pe.Wp||i===Pe.Wp}get shouldShow(){return c.uiStore.currentBreakpoint.id===Pe.Wp&&this.activeColumn&&!this.columnsAreNotResizeableAtBaseBreakpoint}dragStartCallback(){Ie.n.startTransaction()}dragCallback(e,t,n){if(!this.activeColumn||"left"!==n&&"right"!==n)return;const s=(0,ge.getNodeIndex)(c.documentStore.document.tree,this.activeColumn.id),i=(0,ge.getNodeParent)(c.documentStore.document.tree,this.activeColumn.id);if(!1===s||!1===i)return;let o=0;if(this.widthOnDragStart||(this.widthOnDragStart=fe(this.activeColumn)),!this.widthOnDragStart)return;o="right"===n?t.totalXChange:-1*t.totalXChange;const a=ye(this.activeColumn,o,this.widthOnDragStart);if(!a)return;const r=we(i,s,a,n);r&&(this.resizedWidths={[n]:{resizedWidth:Number(r.resizedWidth.toFixed(2)),siblingWidth:Number(r.siblingWidth.toFixed(2))}})}dragEndCallback(){this.resizedWidths=!1,this.widthOnDragStart=!1,Ie.n.endTransaction("Resizing column")}get isNotFarLeftColumn(){if(!this.activeColumn)return!1;const e=(0,ge.getNodeIndex)(c.documentStore.document.tree,this.activeColumn.id);return!1!==e&&0!==e}get isNotFarRightColumn(){if(!this.activeColumn)return!1;const e=(0,ge.getNodeIndex)(c.documentStore.document.tree,this.activeColumn.id),t=(0,ge.getNodeParent)(c.documentStore.document.tree,this.activeColumn.id);return!1!==e&&!1!==t&&e!==t.children.length-1}get activeColumn(){return!!(0,Se.cG)(c.uiStore.activeElement)&&c.uiStore.activeElement}get columnWidthInPercent(){return!!this.activeColumn&&ve(this.activeColumn)}};ke=(0,r.gn)([(0,l.wA)({})],ke);const Ee=ke,Te=Ee;var De=(0,N.Z)(Te,pe,he,!1,null,null,null);const Ae=De.exports;var Ze=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:{"node-titlebar-wrapper":!0,"node-titlebar-wrapper-is-dragging":e.isDragging},style:e.wrapperPositionStyle},[t("div",{staticClass:"node-titlebar",class:e.titlebarClasses,style:e.titlebarPositionStyle,on:{contextmenu:e.openContextMenu}},[e.isDragAndDropEnabled?t("OnCanvasDragHandle",{attrs:{node:e.node}},[t("span",{staticClass:"node-titlebar-title",attrs:{title:e.__("Drag element")}},[t("span",{staticClass:"node-titlebar-button"},[t("Icon",{attrs:{icon:"breakdance"===e.builderMode?"MaximizeIcon":"GripDotsVerticalIcon",size:"breakdance"===e.builderMode?11:12}})],1),t("span",[e._v(" "+e._s(e.elementTitle)+" ")]),e.isDraftSection?t("span",{staticStyle:{"margin-left":"4px"}},[e._v(" "+e._s(e.__("(Draft)"))+" ")]):e._e()])]):[e._v(e._s(e.elementTitle))],e.hasParent?t("span",{staticClass:"node-titlebar-button node-titlebar-button-activate-parent",attrs:{title:e.__("Select parent")},on:{click:e.activateParent}},[t("Icon",{attrs:{icon:"ChevronDownIcon",rotate:"180",size:"10"}})],1):e._e(),e.hasSSr?t("span",{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}],class:{"node-titlebar-button":!0,"node-titlebar-margin-left":!0,"breakdance-node-titlebar-loading-spinner":e.isElementUpdating},attrs:{title:e.__("Refresh element")},on:{click:e.refreshSsr}},[t("Icon",{attrs:{icon:"RotateIcon",size:"13"}})],1):e._e(),t("span",{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}],class:{"node-titlebar-button":!0,"node-titlebar-margin-left":!e.hasSSr},attrs:{title:e.__("Duplicate")},on:{click:e.duplicate}},[t("Icon",{attrs:{icon:"breakdance"===e.builderMode?"DuplicateIcon":"DuplicateSolidIcon",size:"13"}})],1),t("span",{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}],staticClass:"node-titlebar-button",attrs:{title:e.__("Remove")},on:{click:e.remove}},[t("Icon",{attrs:{icon:"breakdance"===e.builderMode?"TrashIcon":"TrashSolidIcon",size:"12"}})],1)],2)])},Oe=[],Me=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{on:{mousedown:function(t){return t.stopPropagation(),e.updateCurrentlyDraggingElementId.apply(null,arguments)}}},[e._t("default")],2)},Be=[],Le=n(7824),Ne=n(53809),Fe=n(9950);let Re=class extends l.w3{constructor(){super(...arguments),this.lastSubmittedDrag=!1,this.easyEvent=new Z.hF}get nestingPermissions(){return(0,Fe.kE)(this.node)}get canvasElementDraggedId(){return c.uiStore.currentlyDraggingCanvasElementId}watchCanvasElementDraggedId(){this.dragStart()}updateCurrentlyDraggingElementId(){c.uiStore.setCanvasElementDraggedId(this.node.id)}dragStart(){if(!c.uiStore.hasFullAccess||!this.canvasElementDraggedId)return;this.easyEvent.on("mousemove",this.dragging),this.easyEvent.on("mouseup",this.dragEnd);const e=(0,ge.getNodeParent)(c.documentStore.document.tree,this.node.id);e&&this.setCanvasDragPlaceholderPosition({nodeIndex:-1,position:"before",parentId:e.id,onlyShowTargetOutline:!0}),(0,T.a7)()}setCanvasDragPlaceholderPosition(e){c.uiStore.setCanvasDragPlaceholderPosition(e)}dragging(e){if((0,Z.Pm)(e)){e.preventDefault(),e.stopPropagation();const t=e.clientX,n=e.clientY;c.uiStore.setDragMousePosition({x:t,y:n});const s=(0,Le.Qf)(t,n);if(void 0===s)return;const i=(0,ge.findNode)(c.documentStore.document.tree,s);if(void 0===i)return;const o=(0,Fe.PN)(c.documentStore.document.tree,i,this.nestingPermissions);if(!o)return;const a=o.id;if(s===this.node.id||(0,ge.treeNodeReduce)(((e,t)=>(t||(t=e.children.find((e=>s===e.id))),t)),this.node,void 0))this.setCanvasDragPlaceholderPosition({nodeIndex:-1,position:"before",parentId:a,onlyShowTargetOutline:!0}),this.setDropPosition(!1);else if(s===a)this.handleDragWhenMouseIsOverTheDropTargetButNotOverAChildElementOfTheDropTarget(t,n,s,this.node.id,o);else if(o.children.find((e=>s===e.id)))this.handleDragWhenMouseIsOverAChildOfTheDropTarget(t,n,s,this.node.id,o);else if((0,ge.treeNodeReduce)(((e,t)=>(t||(t=e.children.find((e=>s===e.id))),t)),o,void 0)){const e=(0,Le.dD)(t,n).reduce(((e,t)=>e||o.children.find((e=>e.id===t))),void 0);e&&this.handleDragWhenMouseIsOverAChildOfTheDropTarget(t,n,e.id,this.node.id,o)}}}dragEnd(e){e.preventDefault(),e.stopPropagation(),this.easyEvent.removeAll(),this.lastSubmittedDrag&&c.documentStore.moveElement(this.lastSubmittedDrag),c.uiStore.setDragMousePosition(null),this.setCanvasDragPlaceholderPosition(null),this.lastSubmittedDrag=!1,c.uiStore.endCanvasElementDrag(),(0,T.a7)()}handleDragWhenMouseIsOverAChildOfTheDropTarget(e,t,n,s,i,o=!1){const a=(0,Le.qE)(i),r="before"===(0,Le.dv)(e,t,n,a)?"before":"after",l=i.children.map((e=>e.id)).filter((e=>e!==s)),c=i.children.map((e=>e.id)).findIndex((e=>e===n));let d=l.findIndex((e=>e===n));"after"===r&&d++,!0===o?(this.setPlaceholder({dropTargetId:i.id,dragPlaceholderIndex:c,beforeOrAfter:r}),this.setDropPosition(!1)):(this.setPlaceholder({dropTargetId:i.id,dragPlaceholderIndex:c,beforeOrAfter:r}),this.setDropPosition({draggedElementId:s,droppedOnElementId:i.id,index:d}))}handleDragWhenMouseIsOverTheDropTargetButNotOverAChildElementOfTheDropTarget(e,t,n,s,i){if(0===i.children.length)this.setPlaceholder({dropTargetId:i.id,dragPlaceholderIndex:0,beforeOrAfter:"after"}),this.setDropPosition({draggedElementId:s,droppedOnElementId:i.id,index:0});else{const n=i.children.map(((e,t)=>({positionAndSize:(0,T.Sv)(e,"absolute"),index:t,id:e.id}))).filter((e=>e.positionAndSize)).map((e=>({min:{x:e.positionAndSize.x,y:e.positionAndSize.y},max:{x:e.positionAndSize.x+e.positionAndSize.width,y:e.positionAndSize.y+e.positionAndSize.height},nodeIndex:e.index,id:e.id}))).map((n=>({...n,distance:(0,Ne.T)(n,{x:e,y:t})}))),o=n.reduce(((e,t)=>e.distance<t.distance?e:t)),a=(o.min.x+o.max.x)/2,r=(o.min.y+o.max.y)/2,l=a>e?"left":"right",c=r>t?"above":"below",d=(0,Le.qE)(i);let u;if(u="vertical"===d?"above"===c?"before":"after":"left"===l?"before":"after",o.id===s)return this.setPlaceholder({dropTargetId:i.id,dragPlaceholderIndex:o.nodeIndex,beforeOrAfter:u}),void this.setDropPosition(!1);const p=i.children.map((e=>e.id)).filter((e=>e!==s));let h=p.findIndex((e=>e===o.id));"after"===u&&h++,this.setPlaceholder({dropTargetId:i.id,dragPlaceholderIndex:o.nodeIndex,beforeOrAfter:u}),this.setDropPosition({draggedElementId:s,droppedOnElementId:i.id,index:h})}}setPlaceholder(e){(0,Fe.xJ)(c.documentStore.document.tree,this.node,e.dropTargetId)&&this.movePlaceholder(e.dropTargetId,e.dragPlaceholderIndex,e.beforeOrAfter)}setDropPosition(e){!1!==e?(0,Fe.xJ)(c.documentStore.document.tree,this.node,e.droppedOnElementId)&&(this.lastSubmittedDrag=e):this.lastSubmittedDrag=!1}movePlaceholder(e,t,n){let s=!1;const i=(0,ge.findNode)(c.documentStore.document.tree,e);if(i){const e=i.children[t],o=i.children[t-1],a=i.children[t+1];e&&e.id===this.node.id&&(s=!0),o&&o.id===this.node.id&&"before"===n&&(s=!0),a&&a.id===this.node.id&&"after"===n&&(s=!0)}if(c.uiStore.canvasDragPlaceholderPosition){const s=()=>t===c.uiStore.canvasDragPlaceholderPosition.nodeIndex+1,i=()=>t===c.uiStore.canvasDragPlaceholderPosition.nodeIndex-1;if(c.uiStore.canvasDragPlaceholderPosition.parentId===e){if(s()&&"after"===c.uiStore.canvasDragPlaceholderPosition.position&&"before"===n)return;if(i()&&"before"===c.uiStore.canvasDragPlaceholderPosition.position&&"after"===n)return}}this.setCanvasDragPlaceholderPosition({parentId:e,nodeIndex:t,position:n,onlyShowTargetOutline:s})}};(0,r.gn)([(0,l.fI)()],Re.prototype,"node",void 0),(0,r.gn)([(0,l.RL)("canvasElementDraggedId")],Re.prototype,"watchCanvasElementDraggedId",null),Re=(0,r.gn)([l.wA],Re);const Ve=Re,$e=Ve;var We=(0,N.Z)($e,Me,Be,!1,null,null,null);const Ue=We.exports;var ze=n(21115),He=n(85283),Ge=n(94550),Ke=n(16734),je=n(55735),qe=n(20210);let Xe=class extends l.w3{constructor(){super(...arguments),this.refreshRate=500,this.unsubscribeFromStorePositionWrapper=()=>{},this.titlebarPositionStyle={},this.wrapperPositionStyle={display:"none"},this.elementTitle=""}nextTickPositionsWrapper(){(0,A.forceNextTick)(this.calculateStylesAndTitle)}openContextMenu(e){e.stopPropagation(),e.preventDefault();const t=(0,ze.e)(e.clientX,e.clientY);this.elementId&&t&&c.uiStore.setOnCanvasRightClickMenuState({elementId:this.elementId,position:t})}get builderMode(){return c.configStore.builderMode}mounted(){this.calculateStylesAndTitle(),this.unsubscribeFromStorePositionWrapper=this.$store.subscribe(this.nextTickPositionsWrapper),window.addEventListener("resize",this.nextTickPositionsWrapper),this.interval=setInterval(this.nextTickPositionsWrapper,this.refreshRate),Ke.uq.register(je.r.SHIFT_ESC,(()=>{this.activateParent()}))}beforeDestroy(){this.unsubscribeFromStorePositionWrapper(),window.removeEventListener("resize",this.nextTickPositionsWrapper),clearInterval(this.interval),Ke.uq.unbind(je.r.SHIFT_ESC)}get isDraftSection(){if(!this.element)return!1;if(this.element.data.type!==Ge.SECTION_SLUG)return!1;const e=j()(this.element.data.properties,"settings.advanced.draft");return!!e}get isDragAndDropEnabled(){return c.uiStore.hasFullAccess}get isElementUpdating(){return!!this.elementId&&!!c.uiStore.elementsThatAreUpdating[this.elementId]}calculateStylesAndTitle(){!c.uiStore.elementWithContentEditable&&this.element?(this.elementTitle=this.getElementTitle(),this.wrapperPositionStyle=(0,T.Qi)((0,T.dq)(this.element)),this.titlebarPositionStyle=(0,T.A3)(this.element)):this.wrapperPositionStyle={display:"none"}}get titlebarClasses(){return{"node-titlebar-is-dragging":this.isDragging,"node-titlebar-is-draft-section":this.isDraftSection,"node-titlebar-is-offset":!!this.wrapperPositionStyle.outlineOffset}}get isDragging(){return c.uiStore.currentlyDraggingCanvasElementId===this.elementId}get element(){return c.uiStore.activeElement}get elementId(){return c.uiStore.activeElementId}getElementTitle(){return this.element?(0,qe.mH)(this.element):""}duplicate(){this.elementId&&c.documentStore.duplicateElementAndActivateIt(this.elementId)}remove(){null!==this.elementId&&c.documentStore.deleteElement({nodeId:this.elementId})}refreshSsr(){c.uiStore.setRefreshSsrElementId(this.elementId)}get hasSSr(){const e=this.element&&c.configStore.element(this.element.data.type);return e?e.template.includes("%%SSR%%"):""}get hasParent(){return this.parentElement&&"root"!==this.parentElement.data.type}get node(){return this.element||!1}activateParent(){this.parentElement&&c.uiStore.activateElement(this.parentElement.id)}get parentElement(){if(!this.element)return!1;const e=(0,ge.getNodeParent)(c.documentStore.document.tree,this.element.id);return e||!1}};Xe=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,OnCanvasDragHandle:Ue}})],Xe);const Ye=Xe,Qe=Ye;var Je=(0,N.Z)(Qe,Ze,Oe,!1,null,null,null);const et=Je.exports;var tt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"node-hover-controls",class:e.wrapperClassList,style:e.wrapperPositionStyle})},nt=[];let st=class extends l.w3{constructor(){super(...arguments),this.refreshRate=500,this.shouldShowControls=!1,this.unsubscribeFromStorePositionWrapper=()=>{},this.throttledNextTickPositionWrapper=U()((()=>(0,A.forceNextTick)((()=>this.positionWrapper()))),100),this.disableMouseHoverOnMouseLeaveCanvas=()=>{setTimeout((()=>c.uiStore.setLastHoveredOnCanvasElementId(null)),110)},this.throttledShowHoverControlsOnMouseMoveCanvas=U()(this.showHoverControlsOnMouseMoveCanvas,100),this.wrapperPositionStyle={display:"none"}}beforeMount(){this.positionWrapper(),this.unsubscribeFromStorePositionWrapper=this.$store.subscribe(this.throttledNextTickPositionWrapper),window.addEventListener("resize",this.throttledNextTickPositionWrapper)}mounted(){const e=window.Breakdance.canvas.document.getElementById("breakdance_canvas");e&&(e.addEventListener("mousemove",this.throttledShowHoverControlsOnMouseMoveCanvas),e.addEventListener("mouseleave",this.disableMouseHoverOnMouseLeaveCanvas),this.interval=setInterval(this.throttledNextTickPositionWrapper,this.refreshRate))}beforeDestroy(){const e=window.Breakdance.canvas.document.getElementById("breakdance_canvas");this.unsubscribeFromStorePositionWrapper(),window.removeEventListener("resize",this.throttledNextTickPositionWrapper),e?.removeEventListener("mousemove",this.throttledShowHoverControlsOnMouseMoveCanvas),clearInterval(this.interval)}get wrapperClassList(){return{"node-hover-controls-show":this.shouldShowControls&&this.isNotDragging,"node-hover-controls--outline":this.isNotDragging}}get isNotDragging(){return!c.uiStore.isCanvasElementBeingDragged&&!c.uiStore.isDragMixinDragging}get element(){if(!c.uiStore.lastHoveredOnCanvasElementId||c.uiStore.elementWithContentEditable)return!1;const e=(0,ge.findNode)(c.documentStore.document.tree,c.uiStore.lastHoveredOnCanvasElementId);return e||!1}setHoveredNode(e,t){const n=(0,Le.Qf)(e,t);if(void 0!==n){const e=(0,ge.findNode)(c.documentStore.document.tree,n);e&&c.uiStore.setLastHoveredOnCanvasElementId(e.id)}}showHoverControlsOnMouseMoveCanvas(e){const{clientX:t,clientY:n}=e;if(this.setHoveredNode(t,n),!1===this.element)return;const s=(0,T.Sv)(this.element,"absolute");if(!s)return;const{x:i,y:o,width:a,height:r}=s;this.shouldShowControls=t>i+a-48&&t<i+a&&n>o&&n<o+r}positionWrapper(){!c.uiStore.elementWithContentEditable&&this.element?this.wrapperPositionStyle=(0,T.Qi)((0,T.dq)(this.element)):this.wrapperPositionStyle={display:"none"}}};st=(0,r.gn)([(0,l.wA)({})],st);const it=st,ot=it;var at=(0,N.Z)(ot,tt,nt,!1,null,null,null);const rt=at.exports;var lt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"node-content-editable",style:e.wrapperStyle})},ct=[];let dt=class extends l.w3{constructor(){super(...arguments),this.unsubscribeFromStorePositionWrapper=()=>{},this.wrapperStyle={display:"none"},this.lastModifiedDomElement=null}mounted(){this.calculateWrapperStyles(),this.unsubscribeFromStorePositionWrapper=this.$store.subscribe(this.calculateWrapperStyles),window.addEventListener("resize",this.calculateWrapperStyles)}beforeDestroy(){this.unsubscribeFromStorePositionWrapper(),window.removeEventListener("resize",this.calculateWrapperStyles)}get domElement(){if(!c.uiStore.elementWithContentEditable)return null;const e=(0,ge.findNode)(c.documentStore.document.tree,c.uiStore.elementWithContentEditable);if(!e)return null;const t=(0,T.dq)(e);if("true"===t?.contentEditable)return this.lastModifiedDomElement=t,t;const n=t?.querySelector('[contenteditable="true"]');return n?(this.lastModifiedDomElement=n,n):null}calculateWrapperStyles(){(0,A.forceNextTick)((()=>{!this.domElement&&this.lastModifiedDomElement&&(this.lastModifiedDomElement.removeEventListener("input",this.calculateWrapperStyles),this.lastModifiedDomElement=null),this.wrapperStyle=(0,T.Qi)(this.domElement),this.domElement&&this.domElement.addEventListener("input",this.calculateWrapperStyles)}))}};dt=(0,r.gn)([(0,l.wA)({})],dt);const ut=dt,pt=ut;var ht=(0,N.Z)(pt,lt,ct,!1,null,null,null);const gt=ht.exports;var mt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"node-hover-controls node-hover-controls--onboarding",class:e.wrapperClassList,style:e.wrapperPositionStyle,on:{click:e.activateElement}},[t("div",{staticClass:"node-hover-onboarding-controls-actions"},[t("div",{staticClass:"node-hover-onboarding-controls-buttons"},[t("NodeOnboardingPaletteButtons",{attrs:{element:e.element}}),t("NodeOnboardingAIRewriteButton",{attrs:{element:e.element}}),t("NodeOnboardingReplaceSectionButton",{attrs:{element:e.element}})],1)]),t("NodeOnboardingAddSectionButton",{attrs:{element:e.element}})],1)},vt=[],yt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"node-hover-onboarding-controls-palette-buttons"},e._l(e.groupedGlobalColors,(function(n,s){return t("NodeOnboardingPaletteButton",{key:s,attrs:{colorGroup:n,elementId:e.element.id}})})),1)},ft=[],_t=n(6778),bt=n(36240);let St=class extends l.w3{get groupedGlobalColors(){return(0,_t.xS)(Q.cr.globalColors)}};(0,r.gn)([(0,l.fI)()],St.prototype,"element",void 0),St=(0,r.gn)([(0,l.wA)({components:{NodeOnboardingPaletteButton:bt.Z}})],St);const Ct=St,xt=Ct;var wt=(0,N.Z)(xt,yt,ft,!1,null,null,null);const It=wt.exports;var Pt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("button",{staticClass:"node-hover-onboarding-controls-buttons__button",attrs:{disabled:e.rewriteInProgress},on:{click:e.rewrite}},[e.rewriteInProgress?t("Icon",{staticClass:"is-spinning",attrs:{icon:"NotchSolidIcon",title:e.__("Importing the data"),size:"14"}}):t("Icon",{attrs:{icon:"SparklesSolidIcon",title:e.__("Success loading the data"),size:"14"}}),e._v(" "+e._s(e.__("Rewrite"))+" ")],1)},kt=[],Et=n(65913),Tt=n(47431);let Dt=class extends l.w3{constructor(){super(...arguments),this.rewriteInProgress=!1}async rewrite(){if(!this.rewriteInProgress&&this.element){this.rewriteInProgress=!0,(0,Tt.K)("Onboarding",{action:"onboarding_app_ui_interaction",type:"node_rewrite_button"});try{await(0,Et.H2)(this.element.id)}catch(e){console.error("Error during rewrite:",e)}this.rewriteInProgress=!1}}};(0,r.gn)([(0,l.fI)()],Dt.prototype,"element",void 0),Dt=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],Dt);const At=Dt,Zt=At;var Ot=(0,N.Z)(Zt,Pt,kt,!1,null,null,null);const Mt=Ot.exports;var Bt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("button",{staticClass:"node-hover-onboarding-controls-buttons__button",on:{click:e.replaceSection}},[t("Icon",{attrs:{icon:"ArrowsRotateSolidIcon",size:"14"}}),e._v(" "+e._s(e.__("Shuffle"))+" ")],1)},Lt=[],Nt=n(77622),Ft=n(36055);let Rt=class extends l.w3{replaceSection(){Q.kD.activateElement(this.element.id),(0,Nt.R4)(this.element.id),(0,Tt.K)("Onboarding",{action:"onboarding_app_ui_interaction",type:"node_shuffle_section_button"}),window.parent.postMessage({id:"",type:"RESPONSE",payload:{success:!0,payload:{message:(0,Ft.__)("Element activated"),elementId:this.element.id,tree:Q.Hb.document.tree.root.children,document:Q.Hb.document}}},"*")}};(0,r.gn)([(0,l.fI)()],Rt.prototype,"element",void 0),Rt=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],Rt);const Vt=Rt,$t=Vt;var Wt=(0,N.Z)($t,Bt,Lt,!1,null,null,null);const Ut=Wt.exports;var zt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"node-hover-onboarding-controls-add-section"},[t("button",{staticClass:"node-hover-onboarding-controls-buttons__button",on:{click:e.addSection}},[t("Icon",{attrs:{icon:"PlusIconSolid",size:"14"}}),e._v(" "+e._s(e.__("Add Section"))+" ")],1)])},Ht=[];let Gt=class extends l.w3{addSection(){(0,Tt.K)("Onboarding",{action:"onboarding_app_ui_interaction",type:"node_add_section_button"}),(0,Nt.gs)(this.element)}};(0,r.gn)([(0,l.fI)({required:!0})],Gt.prototype,"element",void 0),Gt=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],Gt);const Kt=Gt,jt=Kt;var qt=(0,N.Z)(jt,zt,Ht,!1,null,null,null);const Xt=qt.exports;let Yt=class extends l.w3{constructor(){super(...arguments),this.refreshRate=500,this.shouldShowControls=!0,this.unsubscribeFromStorePositionWrapper=()=>{},this.throttledNextTickPositionWrapper=U()((()=>(0,A.forceNextTick)((()=>this.positionWrapper()))),100),this.disableMouseHoverOnMouseLeaveCanvas=()=>{setTimeout((()=>c.uiStore.setLastHoveredOnCanvasElementId(null)),110)},this.throttledShowHoverControlsOnMouseMoveCanvas=U()(this.showHoverControlsOnMouseMoveCanvas,100),this.wrapperPositionStyle={display:"none"}}beforeMount(){this.positionWrapper(),this.unsubscribeFromStorePositionWrapper=this.$store.subscribe(this.throttledNextTickPositionWrapper),window.addEventListener("resize",this.throttledNextTickPositionWrapper)}mounted(){const e=window.Breakdance.canvas.document.getElementById("breakdance_canvas");e&&(e.addEventListener("mousemove",this.throttledShowHoverControlsOnMouseMoveCanvas),e.addEventListener("mouseleave",this.disableMouseHoverOnMouseLeaveCanvas),this.interval=setInterval(this.throttledNextTickPositionWrapper,this.refreshRate))}beforeDestroy(){const e=window.Breakdance.canvas.document.getElementById("breakdance_canvas");this.unsubscribeFromStorePositionWrapper(),window.removeEventListener("resize",this.throttledNextTickPositionWrapper),e?.removeEventListener("mousemove",this.throttledShowHoverControlsOnMouseMoveCanvas),clearInterval(this.interval)}get wrapperClassList(){return{"node-hover-controls-show":!0,"node-hover-controls--outline":this.isNotDragging}}get isNotDragging(){return!c.uiStore.isCanvasElementBeingDragged&&!c.uiStore.isDragMixinDragging}activateElement(){this.element&&(window.parent.postMessage({id:"",type:"RESPONSE",payload:{success:!0,payload:{message:"Element activated",activeElementId:this.element.id,document:c.documentStore.document}}},"*"),c.uiStore.activateElement(this.element.id))}get element(){if(!c.uiStore.lastHoveredOnCanvasElementId||c.uiStore.elementWithContentEditable)return!1;const e=(0,ge.findNode)(c.documentStore.document.tree,c.uiStore.lastHoveredOnCanvasElementId);return e||!1}setHoveredNode(e,t){const n=(0,Le.Qf)(e,t);if(void 0!==n){const e=(0,ge.findNode)(c.documentStore.document.tree,n);e&&"EssentialElements\\Section"===e.data.type&&c.uiStore.setLastHoveredOnCanvasElementId(e.id)}}showHoverControlsOnMouseMoveCanvas(e){const{clientX:t,clientY:n}=e;if(this.setHoveredNode(t,n),!1===this.element)return;const s=(0,T.Sv)(this.element,"absolute");if(!s)return;const{x:i,y:o,width:a,height:r}=s;this.shouldShowControls=t>i+a-48&&t<i+a&&n>o&&n<o+r}positionWrapper(){!c.uiStore.elementWithContentEditable&&this.element?this.wrapperPositionStyle=(0,T.Qi)((0,T.dq)(this.element)):this.wrapperPositionStyle={display:"none"}}};Yt=(0,r.gn)([(0,l.wA)({components:{NodeOnboardingPaletteButtons:It,NodeOnboardingAIRewriteButton:Mt,NodeOnboardingReplaceSectionButton:Ut,NodeOnboardingAddSectionButton:Xt}})],Yt);const Qt=Yt,Jt=Qt;var en=(0,N.Z)(Jt,mt,vt,!1,null,null,null);const tn=en.exports;var nn=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:{"node-titlebar-wrapper":!0,"node-titlebar-wrapper--ghost":!0,"node-titlebar--hide":e.isDragging},style:e.wrapperPositionStyle},[t("div",{staticClass:"node-titlebar",class:e.titlebarClasses,style:e.titlebarPositionStyle},[t("span",{staticClass:"node-titlebar-title",attrs:{title:e.__("Drag element")}},[t("span",{staticClass:"node-titlebar-button",style:{width:"breakdance"===e.builderMode?"11px":"12px"}},["oxygen"===e.builderMode?t("ElementIcon",{staticClass:"breakdance-add-panel__element-svg-icon",attrs:{icon:e.elementIcon,size:12}}):e._e()],1),t("span",[e._v(" "+e._s(e.elementTitle)+" ")]),e.isDraftSection?t("span",{staticStyle:{"margin-left":"4px"}},[e._v(" "+e._s(e.__("(Draft)"))+" ")]):e._e()])])])},sn=[],on=n(78);let an=class extends l.w3{constructor(){super(...arguments),this.refreshRate=500,this.unsubscribeFromStorePositionWrapper=()=>{},this.titlebarPositionStyle={},this.wrapperPositionStyle={display:"none"},this.elementTitle=""}nextTickPositionsWrapper(){(0,A.forceNextTick)(this.calculateStylesAndTitle)}get builderMode(){return c.configStore.builderMode}get isDragging(){return!!c.uiStore.currentlyDraggingCanvasElementId}mounted(){this.calculateStylesAndTitle(),this.unsubscribeFromStorePositionWrapper=this.$store.subscribe(this.nextTickPositionsWrapper),window.addEventListener("resize",this.nextTickPositionsWrapper),this.interval=setInterval(this.nextTickPositionsWrapper,this.refreshRate)}beforeDestroy(){this.unsubscribeFromStorePositionWrapper(),window.removeEventListener("resize",this.nextTickPositionsWrapper),clearInterval(this.interval)}get isDraftSection(){if(!this.element)return!1;if(this.element.data.type!==Ge.SECTION_SLUG)return!1;const e=j()(this.element.data.properties,"settings.advanced.draft");return!!e}calculateStylesAndTitle(){!this.element||this.activeElement&&this.activeElement.id===this.elementId?this.wrapperPositionStyle={display:"none"}:(this.elementTitle=this.getElementTitle(),this.wrapperPositionStyle=(0,T.Qi)((0,T.dq)(this.element)),this.titlebarPositionStyle=(0,T.A3)(this.element))}get titlebarClasses(){return{"node-titlebar-is-offset":!!this.wrapperPositionStyle.outlineOffset}}get activeElement(){return c.uiStore.activeElement}get element(){if(!c.uiStore.lastHoveredOnCanvasElementId)return!1;const e=(0,ge.findNode)(c.documentStore.document.tree,c.uiStore.lastHoveredOnCanvasElementId);return e||!1}get elementId(){return this.element?this.element.id:null}getElementTitle(){return this.element?(0,qe.mH)(this.element):""}get elementIcon(){return this.element?(0,qe.Ff)(this.element,!0):"MaximizeIcon"}get node(){return this.element||!1}};an=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,OnCanvasDragHandle:Ue,ElementIcon:on.Z}})],an);const rn=an,ln=rn;var cn=(0,N.Z)(ln,nn,sn,!1,null,null,null);const dn=cn.exports;var un=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:{"node-titlebar-wrapper":!0,"singularity-node-titlebar-wrapper":!0,"node-titlebar-wrapper-is-dragging":e.isDragging},style:e.wrapperPositionStyle},[t("div",{staticClass:"node-titlebar node-titlebar",class:e.titlebarClasses,style:e.titlebarPositionStyle,on:{contextmenu:e.openContextMenu}},[e.isDragAndDropEnabled?t("OnCanvasDragHandle",{attrs:{node:e.node}},[t("span",{staticClass:"node-titlebar-title",attrs:{title:"Drag element"}},[t("span",{staticClass:"node-titlebar-button"},[t("Icon",{attrs:{icon:"breakdance"===e.builderMode?"MaximizeIcon":"GripDotsVerticalIcon",size:"breakdance"===e.builderMode?11:12}})],1),t("span",[e._v(" "+e._s(e.elementTitle)+" ")]),e.isDraftSection?t("span",{staticStyle:{"margin-left":"4px"}},[e._v(" (Draft) ")]):e._e()])]):[e._v(e._s(e.elementTitle))],e.hasParent?t("span",{staticClass:"node-titlebar-button node-titlebar-button-activate-parent",attrs:{title:"Select parent"},on:{click:e.activateParent}},[t("Icon",{attrs:{icon:"ChevronDownIcon",rotate:"180",size:"10"}})],1):e._e(),e.hasSSr?t("span",{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}],class:{"node-titlebar-button":!0,"node-titlebar-margin-left":!0,"breakdance-node-titlebar-loading-spinner":e.isElementUpdating},attrs:{title:"Refresh element"},on:{click:e.refreshSsr}},[t("Icon",{attrs:{icon:"RotateIcon",size:"13"}})],1):e._e(),t("span",{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}],class:{"node-titlebar-button":!0,"node-titlebar-margin-left":!e.hasSSr},attrs:{title:"Duplicate"},on:{click:e.duplicate}},[t("Icon",{attrs:{icon:"breakdance"===e.builderMode?"DuplicateIcon":"DuplicateSolidIcon",size:"13"}})],1),t("span",{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}],staticClass:"node-titlebar-button",attrs:{title:"Remove"},on:{click:e.remove}},[t("Icon",{attrs:{icon:"breakdance"===e.builderMode?"TrashIcon":"TrashSolidIcon",size:"12"}})],1)],2)])},pn=[];let hn=class extends l.w3{constructor(){super(...arguments),this.refreshRate=500,this.unsubscribeFromStorePositionWrapper=()=>{},this.titlebarPositionStyle={},this.wrapperPositionStyle={display:"none"},this.elementTitle=""}nextTickPositionsWrapper(){(0,A.forceNextTick)(this.calculateStylesAndTitle)}openContextMenu(e){e.stopPropagation(),e.preventDefault();const t=(0,ze.e)(e.clientX,e.clientY);this.elementId&&t&&c.uiStore.setOnCanvasRightClickMenuState({elementId:this.elementId,position:t})}get builderMode(){return c.configStore.builderMode}mounted(){this.calculateStylesAndTitle(),this.unsubscribeFromStorePositionWrapper=this.$store.subscribe(this.nextTickPositionsWrapper),window.addEventListener("resize",this.nextTickPositionsWrapper),this.interval=setInterval(this.nextTickPositionsWrapper,this.refreshRate),Ke.uq.register(je.r.SHIFT_ESC,(()=>{this.activateParent()}))}beforeDestroy(){this.unsubscribeFromStorePositionWrapper(),window.removeEventListener("resize",this.nextTickPositionsWrapper),clearInterval(this.interval),Ke.uq.unbind(je.r.SHIFT_ESC)}get isDraftSection(){if(!this.element)return!1;if(this.element.data.type!==Ge.SECTION_SLUG)return!1;const e=j()(this.element.data.properties,"settings.advanced.draft");return!!e}get isDragAndDropEnabled(){return c.uiStore.hasFullAccess}get isElementUpdating(){return!!this.elementId&&!!c.uiStore.elementsThatAreUpdating[this.elementId]}calculateStylesAndTitle(){!c.uiStore.elementWithContentEditable&&this.element?(this.elementTitle=this.getElementTitle(),this.wrapperPositionStyle=(0,T.Qi)((0,T.dq)(this.element),4),this.titlebarPositionStyle=(0,T.A3)(this.element)):this.wrapperPositionStyle={display:"none"}}get titlebarClasses(){return{"node-titlebar-is-dragging":this.isDragging,"node-titlebar-is-draft-section":this.isDraftSection}}get isDragging(){return c.uiStore.currentlyDraggingCanvasElementId===this.elementId}get element(){return c.uiStore.activeElement}get elementId(){return c.uiStore.activeElementId}get elementIcon(){return this.element?(0,qe.Ff)(this.element,!0):"MaximizeIcon"}getElementTitle(){return this.element?(0,qe.mH)(this.element):""}duplicate(){this.elementId&&c.documentStore.duplicateElementAndActivateIt(this.elementId)}remove(){null!==this.elementId&&c.documentStore.deleteElement({nodeId:this.elementId})}refreshSsr(){c.uiStore.setRefreshSsrElementId(this.elementId)}get hasSSr(){const e=this.element&&c.configStore.element(this.element.data.type);return e?e.template.includes("%%SSR%%"):""}get hasParent(){return this.parentElement&&"root"!==this.parentElement.data.type}get node(){return this.element||!1}activateParent(){this.parentElement&&c.uiStore.activateElement(this.parentElement.id)}get parentElement(){if(!this.element)return!1;const e=(0,ge.getNodeParent)(c.documentStore.document.tree,this.element.id);return e||!1}};hn=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,OnCanvasDragHandle:Ue}})],hn);const gn=hn,mn=gn;var vn=(0,N.Z)(mn,un,pn,!1,null,null,null);const yn=vn.exports;var fn=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"node-hover-controls node-singularity-hover-controls",class:e.wrapperClassList,style:e.wrapperPositionStyle},[e.isSectionElement&&e.element?[e.element?t("AddSectionButton",{attrs:{sectionId:e.element.id}}):e._e(),e.element&&!e.isActiveElement?t("EditSectionButton",{attrs:{elementId:e.element.id}}):e._e()]:e._e(),e.isChildOfGrid&&e.element?[e.element?t("AddAnotherButton",{attrs:{elementId:e.element.id}}):e._e()]:e._e()],2)},_n=[],bn=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-position-wrapper singularity-position-wrapper--bottom-center"},[t("div",{staticClass:"singularity-button-group"},[t("SingularityCanvasButton",{attrs:{icon:"PlusIconSolid",text:"Section"},on:{click:e.addSection}})],1)])},Sn=[],Cn=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:e.classes,attrs:{role:"button"},on:{click:function(t){return e.$emit("click")}}},[t("Icon",{staticClass:"singularity-canvas-button__icon",attrs:{icon:e.icon,size:"14"}}),t("span",{staticClass:"singularity-canvas-button__text"},[e._v(e._s(e.text))])],1)},xn=[];let wn=class extends s.ZP{get classes(){return{"singularity-canvas-button":!0,"singularity-canvas-button--small":"small"===this.size,"singularity-canvas-button--large":"large"===this.size}}};(0,r.gn)([(0,l.fI)({type:String,required:!0})],wn.prototype,"icon",void 0),(0,r.gn)([(0,l.fI)({type:String,required:!0})],wn.prototype,"text",void 0),(0,r.gn)([(0,l.fI)({type:String,default:null})],wn.prototype,"size",void 0),wn=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],wn);const In=wn,Pn=In;var kn=(0,N.Z)(Pn,Cn,xn,!1,null,null,null);const En=kn.exports;let Tn=class extends l.w3{addSection(){c.singularityStore.setSectionAddOrSwapPanelState({mode:"add_after",sectionId:this.sectionId}),c.singularityStore.setSectionLibraryModalState(!0)}};(0,r.gn)([(0,l.fI)()],Tn.prototype,"sectionId",void 0),Tn=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,SingularityCanvasButton:En}})],Tn);const Dn=Tn,An=Dn;var Zn=(0,N.Z)(An,bn,Sn,!1,null,null,null);const On=Zn.exports;var Mn=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-canvas-add-another-button",on:{click:e.addAnother}},[t("div",{staticClass:"singularity-canvas-add-another-button__inner"},[t("Icon",{attrs:{icon:"PlusIconSolid",size:"14"}})],1)])},Bn=[];let Ln=class extends l.w3{addAnother(){c.documentStore.duplicateElement({elementId:this.elementId})}};(0,r.gn)([(0,l.fI)()],Ln.prototype,"elementId",void 0),Ln=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],Ln);const Nn=Ln,Fn=Nn;var Rn=(0,N.Z)(Fn,Mn,Bn,!1,null,null,null);const Vn=Rn.exports;var $n=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-canvas-edit-background-image-button",on:{click:e.editBackgroundImage}},[e._v("Edit Background Image")])},Wn=[];let Un=class extends l.w3{editBackgroundImage(){c.singularityStore.setBackgroundImageEditorPanelState({sectionId:this.elementId}),c.singularityStore.setSingularityLeftPanel("background_image_editor")}};(0,r.gn)([(0,l.fI)()],Un.prototype,"elementId",void 0),Un=(0,r.gn)([(0,l.wA)({components:{}})],Un);const zn=Un,Hn=zn;var Gn=(0,N.Z)(Hn,$n,Wn,!1,null,null,null);const Kn=Gn.exports;var jn=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-canvas-edit-icon-button",on:{click:e.editIcon}},[e._v(" "+e._s(e.__("Change Icon"))+" ")])},qn=[];let Xn=class extends l.w3{editIcon(){c.singularityStore.setIconEditorPanelState({iconId:this.elementId}),c.singularityStore.setSingularityLeftPanel("icon_editor")}};(0,r.gn)([(0,l.fI)()],Xn.prototype,"elementId",void 0),Xn=(0,r.gn)([(0,l.wA)({components:{}})],Xn);const Yn=Xn,Qn=Yn;var Jn=(0,N.Z)(Qn,jn,qn,!1,null,null,null);const es=Jn.exports;var ts=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-canvas-edit-link-button",on:{click:e.editLink}},[e._v(" "+e._s(e.__("Edit Link"))+" ")])},ns=[];const ss=[{elementSlug:Ge.WRAPPER_LINK_SLUG,linkPropertyPaths:["content.content.link"]},{elementSlug:Ge.LINK_SLUG,linkPropertyPaths:["content.content.link"]},{elementSlug:Ge.BUTTON_SLUG,linkPropertyPaths:["content.content.link"]},{elementSlug:"EssentialElements\\PricingTable",linkPropertyPaths:["content.content.button.link"]}];function is(e){return ss.some((t=>t.elementSlug===e))}function os(e){return ss.find((t=>t.elementSlug===e))?.linkPropertyPaths}function as(e){return(0,ge.parentNodesReduce)(((e,t)=>!!is(e.data.type)||t),c.documentStore.document.tree,e,!1)}function rs(e){return(0,ge.parentNodesReduce)(((e,t)=>is(e.data.type)?e:t),c.documentStore.document.tree,e,void 0)}let ls=class extends l.w3{editLink(){var e=(0,ge.findNode)(c.documentStore.document.tree,this.elementId);if(!e)return;if(is(e.data.type)||(e=rs(e)),!e)return;if(!is(e.data.type))return;const t=os(e.data.type);t&&(c.singularityStore.setLinkEditorPanelState({elementId:e.id,linkPropertyPaths:t}),c.singularityStore.setSingularityLeftPanel("link_editor"))}};(0,r.gn)([(0,l.fI)()],ls.prototype,"elementId",void 0),ls=(0,r.gn)([(0,l.wA)({components:{}})],ls);const cs=ls,ds=cs;var us=(0,N.Z)(ds,ts,ns,!1,null,null,null);const ps=us.exports;var hs=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-canvas-edit-content-properties-button",on:{click:e.editContentProperties}},[e._v("Edit Content Properties")])},gs=[];let ms=class extends l.w3{editContentProperties(){c.uiStore.activateElement(this.elementId),c.singularityStore.setContentPropertiesEditorPanelState(!0),c.singularityStore.setSingularityLeftPanel("content_properties_editor")}};(0,r.gn)([(0,l.fI)()],ms.prototype,"elementId",void 0),ms=(0,r.gn)([(0,l.wA)({components:{}})],ms);const vs=ms,ys=vs;var fs=(0,N.Z)(ys,hs,gs,!1,null,null,null);const _s=fs.exports;var bs=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-sticky-section-edit"},[t("div",{staticClass:"singularity-button-group"},[t("SingularityCanvasButton",{attrs:{icon:"EditSolidIcon",text:"Edit Section"},on:{click:e.activateElement}})],1)])},Ss=[];let Cs=class extends s.ZP{activateElement(){c.uiStore.activateElement(this.elementId),c.singularityStore.setSingularityLeftPanel("page_structure")}};(0,r.gn)([(0,l.fI)()],Cs.prototype,"elementId",void 0),Cs=(0,r.gn)([(0,l.wA)({components:{SingularityCanvasButton:En}})],Cs);const xs=Cs,ws=xs;var Is=(0,N.Z)(ws,bs,Ss,!1,null,null,null);const Ps=Is.exports;let ks=class extends l.w3{constructor(){super(...arguments),this.refreshRate=500,this.shouldShowControls=!0,this.unsubscribeFromStorePositionWrapper=()=>{},this.throttledNextTickPositionWrapper=U()((()=>(0,A.forceNextTick)((()=>this.positionWrapper()))),100),this.disableMouseHoverOnMouseLeaveCanvas=()=>{setTimeout((()=>c.uiStore.setLastHoveredOnCanvasElementId(null)),110)},this.throttledShowHoverControlsOnMouseMoveCanvas=U()(this.showHoverControlsOnMouseMoveCanvas,100),this.wrapperPositionStyle={display:"none"}}beforeMount(){this.positionWrapper(),this.unsubscribeFromStorePositionWrapper=this.$store.subscribe(this.throttledNextTickPositionWrapper),window.addEventListener("resize",this.throttledNextTickPositionWrapper)}mounted(){const e=window.Breakdance.canvas.document.getElementById("breakdance_canvas");e&&(e.addEventListener("mousemove",this.throttledShowHoverControlsOnMouseMoveCanvas),e.addEventListener("mouseleave",this.disableMouseHoverOnMouseLeaveCanvas),this.interval=setInterval(this.throttledNextTickPositionWrapper,this.refreshRate))}beforeDestroy(){const e=window.Breakdance.canvas.document.getElementById("breakdance_canvas");this.unsubscribeFromStorePositionWrapper(),window.removeEventListener("resize",this.throttledNextTickPositionWrapper),e?.removeEventListener("mousemove",this.throttledShowHoverControlsOnMouseMoveCanvas),clearInterval(this.interval)}get wrapperClassList(){return{"node-hover-controls-show":this.shouldShowControls&&this.isNotDragging,"node-hover-controls--outline":this.isNotDragging,"node-hover-controls--active":this.isActiveElement}}get isNotDragging(){return!c.uiStore.isCanvasElementBeingDragged&&!c.uiStore.isDragMixinDragging}get isActiveElement(){return this.element&&c.uiStore.activeElementId===this.element.id}get element(){if(!c.uiStore.lastHoveredOnCanvasElementId||c.uiStore.elementWithContentEditable)return null;const e=(0,ge.findNode)(c.documentStore.document.tree,c.uiStore.lastHoveredOnCanvasElementId);return e||null}setHoveredNode(e,t){const n=(0,Le.Qf)(e,t);if(void 0!==n){const e=(0,ge.findNode)(c.documentStore.document.tree,n);e&&c.uiStore.setLastHoveredOnCanvasElementId(e.id)}}showHoverControlsOnMouseMoveCanvas(e){const{clientX:t,clientY:n}=e;if(this.setHoveredNode(t,n),!this.element)return;const s=(0,T.Sv)(this.element,"absolute");if(!s)return;const{x:i,y:o,width:a,height:r}=s;this.shouldShowControls=t>i+a-48&&t<i+a&&n>o&&n<o+r}positionWrapper(){!c.uiStore.elementWithContentEditable&&this.element?this.wrapperPositionStyle=(0,T.Qi)((0,T.dq)(this.element),4):this.wrapperPositionStyle={display:"none"}}get isSectionElement(){return this.element&&this.element.data.type===Ge.SECTION_SLUG}get isImageElement(){return this.element&&this.element.data.type===Ge.IMAGE_SLUG}get isSectionElementWithBackgroundImage(){return this.element&&this.element.data.type===Ge.SECTION_SLUG&&"image"==j()(this.element.data.properties,"design.background.type")}get isIconElement(){return this.element&&this.element.data.type===Ge.ICON_SLUG}get isChildOfGrid(){if(!this.element)return!1;const e=(0,ge.findNode)(c.documentStore.document.tree,this.element._parentId);return!!e&&e.data.type===Ge.GRID_SLUG}get isLinkElementOrChildOfLinkElement(){return!!this.element&&(is(this.element.data.type)||as(this.element))}};ks=(0,r.gn)([(0,l.wA)({components:{AddSectionButton:On,AddAnotherButton:Vn,EditBackgroundImageButton:Kn,EditLinkButton:ps,EditIconButton:es,EditContentPropertiesButton:_s,SingularityCanvasButton:En,EditSectionButton:Ps}})],ks);const Es=ks,Ts=Es;var Ds=(0,N.Z)(Ts,fn,_n,!1,null,null,null);const As=Ds.exports;var Zs=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"node-content-editable",style:e.wrapperStyle})},Os=[];let Ms=class extends l.w3{constructor(){super(...arguments),this.unsubscribeFromStorePositionWrapper=()=>{},this.wrapperStyle={display:"none"},this.lastModifiedDomElement=null}mounted(){this.calculateWrapperStyles(),this.unsubscribeFromStorePositionWrapper=this.$store.subscribe(this.calculateWrapperStyles),window.addEventListener("resize",this.calculateWrapperStyles)}beforeDestroy(){this.unsubscribeFromStorePositionWrapper(),window.removeEventListener("resize",this.calculateWrapperStyles)}get domElement(){if(!c.uiStore.elementWithContentEditable)return null;const e=(0,ge.findNode)(c.documentStore.document.tree,c.uiStore.elementWithContentEditable);if(!e)return null;const t=(0,T.dq)(e);if("true"===t?.contentEditable)return this.lastModifiedDomElement=t,t;const n=t?.querySelector('[contenteditable="true"]');return n?(this.lastModifiedDomElement=n,n):null}calculateWrapperStyles(){(0,A.forceNextTick)((()=>{!this.domElement&&this.lastModifiedDomElement&&(this.lastModifiedDomElement.removeEventListener("input",this.calculateWrapperStyles),this.lastModifiedDomElement=null),this.wrapperStyle=(0,T.Qi)(this.domElement),this.domElement&&this.domElement.addEventListener("input",this.calculateWrapperStyles)}))}};Ms=(0,r.gn)([(0,l.wA)({})],Ms);const Bs=Ms,Ls=Bs;var Ns=(0,N.Z)(Ls,Zs,Os,!1,null,null,null);const Fs=Ns.exports;var Rs=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:{"singularity-node-titlebar-wrapper":!0},style:e.wrapperPositionStyle},[t("div",{staticClass:"singularity-node-titlebar",class:e.titlebarClasses,style:e.titlebarPositionStyle},[e.isSectionElement?t("span",{staticClass:"singularity-node-titlebar__text"},[e._v(" "+e._s(e.elementTitle))]):t("EditElementCanvasButton")],1)])},Vs=[],$s=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("SingularityCanvasButton",{attrs:{icon:"EditSolidIcon",text:`Edit ${e.elementTitle}`},on:{click:e.editElement}})},Ws=[],Us=n(88932);let zs=class extends l.w3{get element(){return c.uiStore.activeElement}get elementId(){return c.uiStore.activeElementId}getElementTitle(){return this.element?(0,qe.mH)(this.element):""}get elementTitle(){return this.getElementTitle()}get isImageElement(){return this.element&&this.element.data.type===Ge.IMAGE_SLUG}get isSectionElementWithBackgroundImage(){return this.element&&this.element.data.type===Ge.SECTION_SLUG&&"image"==j()(this.element.data.properties,"design.background.type")}get isIconElement(){return this.element&&this.element.data.type===Ge.ICON_SLUG}get isChildOfGrid(){if(!this.element)return!1;const e=(0,ge.findNode)(c.documentStore.document.tree,this.element._parentId);return!!e&&e.data.type===Ge.GRID_SLUG}get isGalleryElement(){return this.element&&this.element.data.type===Ge.GALLERY_SLUG}get isLinkElementOrChildOfLinkElement(){return!!this.element&&(is(this.element.data.type)||as(this.element))}get isHeaderElement(){return this.element&&this.element.data.type===Us.Uu}get isFooterElement(){return this.element&&this.element.data.type===Us.hO}get isHeaderOrFooterElement(){return this.isHeaderElement||this.isFooterElement}get isSiteLogoElement(){return this.element&&this.element.data.type===Us.X1}editElement(){if(this.element&&this.elementId)if(this.isSiteLogoElement)c.singularityStore.setSingularityLeftPanel("brand");else{if(!this.isHeaderOrFooterElement)return this.isImageElement?(c.singularityStore.setImageEditorPanelState({elementId:this.elementId,controlPath:"content.image.media",initialStep:"main"}),void c.singularityStore.setSingularityLeftPanel("image_editor")):this.isGalleryElement?(c.singularityStore.setImageEditorPanelState({elementId:this.elementId,controlPath:"content.content.images[].image",selectedImageIndex:0,initialStep:"main"}),void c.singularityStore.setSingularityLeftPanel("image_editor")):this.isIconElement?(c.singularityStore.setIconEditorPanelState({iconId:this.elementId}),void c.singularityStore.setSingularityLeftPanel("icon_editor")):this.isSectionElementWithBackgroundImage?(c.singularityStore.setImageEditorPanelState({elementId:this.elementId,controlPath:"design.background.image",initialStep:"main"}),void c.singularityStore.setSingularityLeftPanel("image_editor")):void(this.isLinkElementOrChildOfLinkElement?this.editLink():(c.singularityStore.setContentPropertiesEditorPanelState(!0),c.singularityStore.setSingularityLeftPanel("content_properties_editor")));c.singularityStore.setHeaderAndFooterEditorPanelState({elementId:this.elementId,elementType:this.isHeaderElement?"header":"footer"})}}editLink(){if(!this.elementId)return;let e=(0,ge.findNode)(c.documentStore.document.tree,this.elementId);if(!e)return;if(is(e.data.type)||(e=rs(e)),!e)return;if(!is(e.data.type))return;const t=os(e.data.type);t&&(c.singularityStore.setLinkEditorPanelState({elementId:e.id,linkPropertyPaths:t}),c.singularityStore.setSingularityLeftPanel("link_editor"))}};zs=(0,r.gn)([(0,l.wA)({components:{SingularityCanvasButton:En}})],zs);const Hs=zs,Gs=Hs;var Ks=(0,N.Z)(Gs,$s,Ws,!1,null,null,null);const js=Ks.exports;let qs=class extends l.w3{constructor(){super(...arguments),this.refreshRate=500,this.nonEditableElementsSlugs=[Ge.DIV_SLUG,Ge.COLUMNS_SLUG,Ge.COLUMN_SLUG],this.unsubscribeFromStorePositionWrapper=()=>{},this.titlebarPositionStyle={},this.wrapperPositionStyle={display:"none"},this.elementTitle=""}get shouldShowTitlebar(){if(!c.uiStore.activeElement)return!1;const e=c.uiStore.activeElement;return!c.uiStore.elementWithContentEditable&&!this.nonEditableElementsSlugs.includes(e.data.type)}nextTickPositionsWrapper(){(0,A.forceNextTick)(this.calculateStylesAndTitle)}mounted(){this.calculateStylesAndTitle(),this.unsubscribeFromStorePositionWrapper=this.$store.subscribe(this.nextTickPositionsWrapper),window.addEventListener("resize",this.nextTickPositionsWrapper),this.interval=setInterval(this.nextTickPositionsWrapper,this.refreshRate)}beforeDestroy(){this.unsubscribeFromStorePositionWrapper(),window.removeEventListener("resize",this.nextTickPositionsWrapper),clearInterval(this.interval)}calculateStylesAndTitle(){!c.uiStore.elementWithContentEditable&&this.element?(this.elementTitle=this.getElementTitle(),this.wrapperPositionStyle=(0,T.Qi)((0,T.dq)(this.element)),this.titlebarPositionStyle=(0,T.A3)(this.element)):this.wrapperPositionStyle={display:"none"}}get titlebarClasses(){return{"node-titlebar-is-offset":!!this.wrapperPositionStyle.outlineOffset,"is-hidden":!this.shouldShowTitlebar}}get element(){return c.uiStore.activeElement}get elementId(){return c.uiStore.activeElementId}getElementTitle(){return this.element?(0,qe.mH)(this.element):""}get isSectionElement(){return this.element&&this.element.data.type===Ge.SECTION_SLUG}get node(){return this.element||!1}};qs=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,EditElementCanvasButton:js}})],qs);const Xs=qs,Ys=Xs;var Qs=(0,N.Z)(Ys,Rs,Vs,!1,null,null,null);const Js=Qs.exports;var ei=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[e.currentHoveredData.nearestRepeatableItem?t("FutureLayerRepeatableItemOutlineAndControls",{key:`repeatable-item-${e.currentHoveredData.nearestRepeatableItem.id}`,attrs:{element:e.currentHoveredData.nearestRepeatableItem}}):e._e(),e.currentHoveredData.nearestWrapperLink?t("FutureLayerLinkWrapperOutlineAndControls",{key:`wrapper-link-${e.currentHoveredData.nearestWrapperLink.id}`,attrs:{element:e.currentHoveredData.nearestWrapperLink}}):e._e(),e.currentHoveredData.hoveredGalleryImage?t("FutureLayerGalleryImageOutline",{key:`gallery-image-${e.currentHoveredData.hoveredGalleryImage.galleryElement.id}-${e.currentHoveredData.hoveredGalleryImage.imageIndex}`,attrs:{htmlElement:e.currentHoveredData.hoveredGalleryImage.htmlElement}}):e._e(),e.isHoveredElementHeaderOrFooter&&e.currentHoveredData.nearestNodeThatCanBeActivated?t("FutureLayerHoveredHeaderOrFooter",{key:`hovered-header-footer-${e.currentHoveredData.nearestNodeThatCanBeActivated.id}`,attrs:{element:e.currentHoveredData.nearestNodeThatCanBeActivated}}):e.currentHoveredData.nearestNodeThatCanBeActivated?t("FutureLayerHoveredElementOutline",{key:`hovered-${e.currentHoveredData.nearestNodeThatCanBeActivated.id}`,attrs:{element:e.currentHoveredData.nearestNodeThatCanBeActivated}}):e._e(),e.activeElement?t("FutureLayerActiveElementOutline",{key:`active-${e.activeElement.id}`,attrs:{element:e.activeElement}}):e._e(),e.activeElementSupportsRemoval?t("FutureLayerRemovableElementControls",{key:`removable-${e.activeElement.id}`,attrs:{element:e.activeElement}}):e._e()],1)},ti=[],ni=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"futurelayer-active-element-wrapper",style:e.cssStyleForWrapper,attrs:{"data-futurelayer-element-id":e.element.id}},[t("div",{staticClass:"futurelayer-active-element-outline",style:e.cssStyleForOutline}),e.isSection&&!e.isInlineEditing?t("AddAnotherSectionButton",{attrs:{element:e.element,elementPositionOnCanvas:e.elementPositionOnCanvas}}):e._e()],1)},si=[];function ii(e){const t=e.getBoundingClientRect(),n=window.Breakdance.canvas.document.documentElement.scrollLeft,s=window.Breakdance.canvas.document.documentElement.scrollTop;return{left:`${t.left+n}px`,top:`${t.top+s}px`,width:`${t.width}px`,height:`${t.height}px`}}function oi(e){const t=(0,T.dq)(e);return!!t&&ii(t)}function ai(e,t){const n=()=>{(0,A.forceNextTick)((()=>{t(ii(e))}))},s=setInterval(n,500);return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n),clearInterval(s)}}function ri(e,t){const n=()=>{(0,A.forceNextTick)((()=>{t(oi(e))}))},s=c["default"].subscribe(n),i=setInterval(n,500);return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n),s(),clearInterval(i)}}function li(e){return e?{left:e.left,top:e.top,width:"0px",height:"0px"}:{display:"none"}}function ci(e){return e?{left:"0px",top:"0px",width:e.width,height:e.height}:{display:"none"}}var di=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[e.isFirstChildInRootAfterHeaderAndHasFutureLayerPreferOverlayHeaderClass?e._e():t("div",{staticClass:"futurelayer-add-section-controls",style:e.cssStyleForAddSectionTop},[t("button",{staticClass:"futurelayer-add-section-button futurelayer-add-section-button-top",on:{click:e.handleAddSectionBefore}},[e._v(" "+e._s(e.__("Add Section"))+" ")])]),t("div",{staticClass:"futurelayer-add-section-controls",style:e.cssStyleForAddSectionBottom},[t("button",{staticClass:"futurelayer-add-section-button futurelayer-add-section-button-bottom",on:{click:e.handleAddSectionAfter}},[e._v(" "+e._s(e.__("Add Section"))+" ")])])])},ui=[],pi=n(46118);let hi=class extends l.w3{constructor(){super(...arguments),this.mouseY=0}mounted(){window.Breakdance.canvas.document.addEventListener("mousemove",this.handleMouseMove)}beforeDestroy(){window.Breakdance.canvas.document.removeEventListener("mousemove",this.handleMouseMove)}handleMouseMove(e){this.mouseY=e.clientY}isMouseNearButton(e){const t=50;return Math.abs(this.mouseY-e)<=t}get isFirstChildInRootAfterHeaderAndHasFutureLayerPreferOverlayHeaderClass(){return(0,pi.nx)(this.element.id)&&(0,pi.hx)(this.element)}get cssStyleForAddSectionTop(){if(!this.elementPositionOnCanvas)return{display:"none"};const e=parseFloat(this.elementPositionOnCanvas.top.replace("px","")),t=window.Breakdance.canvas.document.documentElement.scrollTop,n=e-t;return this.isMouseNearButton(n)?{left:`calc(${this.elementPositionOnCanvas.width} * 0.5)`,top:"0px",transform:"translate(-50%, -50%)"}:{display:"none"}}get cssStyleForAddSectionBottom(){if(!this.elementPositionOnCanvas)return{display:"none"};const e=parseFloat(this.elementPositionOnCanvas.top.replace("px","")),t=parseFloat(this.elementPositionOnCanvas.height.replace("px","")),n=window.Breakdance.canvas.document.documentElement.scrollTop,s=e+t-n;return this.isMouseNearButton(s)?{left:`calc(${this.elementPositionOnCanvas.width} * 0.5)`,top:this.elementPositionOnCanvas.height,transform:"translate(-50%, -50%)"}:{display:"none"}}handleAddSectionBefore(){c.singularityStore.setSectionAddOrSwapPanelState({mode:"add_before",sectionId:this.element.id}),c.singularityStore.setSectionLibraryModalState(!0)}handleAddSectionAfter(){c.singularityStore.setSectionAddOrSwapPanelState({mode:"add_after",sectionId:this.element.id}),c.singularityStore.setSectionLibraryModalState(!0)}};(0,r.gn)([(0,l.fI)()],hi.prototype,"element",void 0),(0,r.gn)([(0,l.fI)()],hi.prototype,"elementPositionOnCanvas",void 0),hi=(0,r.gn)([l.wA],hi);const gi=hi,mi=gi;var vi=(0,N.Z)(mi,di,ui,!1,null,null,null);const yi=vi.exports;let fi=class extends l.w3{constructor(){super(...arguments),this.elementPositionOnCanvas=!1,this.cleanupListeners=()=>{}}mounted(){this.elementPositionOnCanvas=oi(this.element),this.cleanupListeners=ri(this.element,(e=>{this.elementPositionOnCanvas=e}))}beforeDestroy(){this.cleanupListeners()}get cssStyleForWrapper(){return li(this.elementPositionOnCanvas)}get cssStyleForOutline(){return ci(this.elementPositionOnCanvas)}get isSection(){return this.element.data.type===Ge.SECTION_SLUG}get isInlineEditing(){return Q.kD.isInlineEditing}};(0,r.gn)([(0,l.fI)()],fi.prototype,"element",void 0),fi=(0,r.gn)([(0,l.wA)({components:{AddAnotherSectionButton:yi}})],fi);const _i=fi,bi=_i;var Si=(0,N.Z)(bi,ni,si,!1,null,null,null);const Ci=Si.exports;var xi=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"futurelayer-hovered-element-wrapper",style:e.cssStyleForWrapper,attrs:{"data-futurelayer-element-id":e.element.id}},[t("div",{staticClass:"futurelayer-hovered-element-outline",style:e.cssStyleForOutline}),e.isSection&&!e.isInlineEditing?t("AddAnotherSectionButton",{attrs:{element:e.element,elementPositionOnCanvas:e.elementPositionOnCanvas}}):e._e()],1)},wi=[],Ii=n(20398);let Pi=class extends l.w3{constructor(){super(...arguments),this.elementPositionOnCanvas=!1,this.cleanupListeners=()=>{}}mounted(){this.elementPositionOnCanvas=oi(this.element),this.cleanupListeners=ri(this.element,(e=>{this.elementPositionOnCanvas=e}))}beforeDestroy(){this.cleanupListeners()}get canActivate(){return(0,Ii.Dn)(this.element.data.type).canActivate}get cssStyleForWrapper(){return this.canActivate?li(this.elementPositionOnCanvas):{display:"none"}}get cssStyleForOutline(){return this.canActivate?ci(this.elementPositionOnCanvas):{display:"none"}}get isSection(){return this.element.data.type===Ge.SECTION_SLUG}get isInlineEditing(){return Q.kD.isInlineEditing}};(0,r.gn)([(0,l.fI)()],Pi.prototype,"element",void 0),Pi=(0,r.gn)([(0,l.wA)({components:{AddAnotherSectionButton:yi}})],Pi);const ki=Pi,Ei=ki;var Ti=(0,N.Z)(Ei,xi,wi,!1,null,null,null);const Di=Ti.exports;var Ai=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"futurelayer-hovered-header-footer-wrapper",style:e.cssStyleForWrapper,attrs:{"data-futurelayer-element-id":e.element.id}},[t("div",{staticClass:"futurelayer-hovered-header-footer-outline",style:e.cssStyleForOutline}),t("div",{staticClass:"futurelayer-header-footer-controls",style:e.cssStyleForControls,on:{click:e.startEditing}},[e.loading?t("div",[e._v("loading")]):t("button",{staticClass:"futurelayer-header-footer-edit-button"},[e._v(" Edit Website "+e._s(e.isHeader?"Header":"Footer")+" ")])])])},Zi=[];let Oi=class extends l.w3{constructor(){super(...arguments),this.elementPositionOnCanvas=!1,this.cleanupListeners=()=>{},this.loading=!1}mounted(){this.elementPositionOnCanvas=oi(this.element),this.cleanupListeners=ri(this.element,(e=>{this.elementPositionOnCanvas=e}))}beforeDestroy(){this.cleanupListeners()}get cssStyleForWrapper(){return li(this.elementPositionOnCanvas)}get cssStyleForOutline(){return ci(this.elementPositionOnCanvas)}get cssStyleForControls(){return this.elementPositionOnCanvas?{left:"0px",top:"0px",width:this.elementPositionOnCanvas.width,height:this.elementPositionOnCanvas.height}:{display:"none"}}get isHeader(){return this.element.data.type===Us.Uu}async startEditing(){this.loading=!0,await(0,Us.IA)(this.element.id),this.loading=!1}};(0,r.gn)([(0,l.fI)()],Oi.prototype,"element",void 0),Oi=(0,r.gn)([l.wA],Oi);const Mi=Oi,Bi=Mi;var Li=(0,N.Z)(Bi,Ai,Zi,!1,null,null,null);const Ni=Li.exports;var Fi=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"futurelayer-repeatable-item-wrapper",style:e.cssStyleForWrapper,attrs:{"data-futurelayer-element-id":e.element.id}},[t("div",{staticClass:"futurelayer-repeatable-item-outline",style:e.cssStyleForOutline}),t("div",{staticClass:"futurelayer-repeatable-item-controls",style:e.cssStyleForControls},[e.isFirstChild?e._e():t("button",{staticClass:"futurelayer-repeatable-control-button move-left",attrs:{title:"Move previous"},on:{click:e.handleMoveLeft}},[t("Icon",{attrs:{icon:"ChevronLeftIcon",size:10}})],1),e.isLastChild?e._e():t("button",{staticClass:"futurelayer-repeatable-control-button move-right",attrs:{title:"Move next"},on:{click:e.handleMoveRight}},[t("Icon",{attrs:{icon:"ChevronRightIcon",size:10}})],1),e.isRepeatableChildButNotOnlyChild?t("button",{staticClass:"futurelayer-repeatable-control-button remove",on:{click:e.handleRemove}},[e._v(" Remove ")]):e._e(),t("button",{staticClass:"futurelayer-repeatable-control-button add",on:{click:e.handleAddAnother}},[e._v(" Add Another ")])])])},Ri=[],Vi=n(45164);let $i=class extends l.w3{constructor(){super(...arguments),this.elementPositionOnCanvas=!1,this.cleanupListeners=()=>{}}mounted(){this.elementPositionOnCanvas=oi(this.element),this.cleanupListeners=ri(this.element,(e=>{this.elementPositionOnCanvas=e}))}beforeDestroy(){this.cleanupListeners()}get cssStyleForWrapper(){return li(this.elementPositionOnCanvas)}get cssStyleForOutline(){return ci(this.elementPositionOnCanvas)}get cssStyleForControls(){return this.elementPositionOnCanvas?{left:`calc(${this.elementPositionOnCanvas.width} + 2px)`,transform:"translateX(-100%)"}:{display:"none"}}handleRemove(){c.documentStore.deleteElement({nodeId:this.element.id})}handleAddAnother(){(0,Vi.D8)(this.element)}handleMoveLeft(){(0,Vi.cP)(this.element)}handleMoveRight(){(0,Vi.Z6)(this.element)}get parent(){return(0,ge.findNode)(c.documentStore.document.tree,this.element._parentId)}get isRepeatableChildButNotOnlyChild(){const e=this.parent;return!!e&&(!!this.isRepeatableParent(e)&&1!==e.children.length)}get isFirstChild(){const e=this.parent;return!!e&&(!!this.isRepeatableParent(e)&&e.children[0]?.id===this.element.id)}get isLastChild(){const e=this.parent;return!!e&&(!!this.isRepeatableParent(e)&&e.children[e.children.length-1]?.id===this.element.id)}isRepeatableParent(e){return(0,Vi.Nx)(e)}};(0,r.gn)([(0,l.fI)()],$i.prototype,"element",void 0),$i=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],$i);const Wi=$i,Ui=Wi;var zi=(0,N.Z)(Ui,Fi,Ri,!1,null,null,null);const Hi=zi.exports;var Gi=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"futurelayer-link-wrapper-wrapper",style:e.cssStyleForWrapper,attrs:{"data-futurelayer-element-id":e.element.id}},[t("div",{staticClass:"futurelayer-link-wrapper-outline",style:e.cssStyleForOutline}),t("div",{staticClass:"futurelayer-link-wrapper-controls",style:e.cssStyleForControls},[t("button",{staticClass:"futurelayer-link-control-button edit",on:{click:e.handleEditLink}},[e._v(" Edit Link ")])])])},Ki=[];let ji=class extends l.w3{constructor(){super(...arguments),this.elementPositionOnCanvas=!1,this.cleanupListeners=()=>{}}mounted(){this.elementPositionOnCanvas=oi(this.element),this.cleanupListeners=ri(this.element,(e=>{this.elementPositionOnCanvas=e}))}beforeDestroy(){this.cleanupListeners()}get cssStyleForWrapper(){return li(this.elementPositionOnCanvas)}get cssStyleForOutline(){return ci(this.elementPositionOnCanvas)}get cssStyleForControls(){return this.elementPositionOnCanvas?{left:"0",top:"0px",transform:"translateY(-100%)"}:{display:"none"}}handleEditLink(){const e=os(this.element.data.type);e&&(c.singularityStore.setLinkEditorPanelState({elementId:this.element.id,linkPropertyPaths:e}),c.singularityStore.setSingularityLeftPanel("link_editor"))}};(0,r.gn)([(0,l.fI)()],ji.prototype,"element",void 0),ji=(0,r.gn)([l.wA],ji);const qi=ji,Xi=qi;var Yi=(0,N.Z)(Xi,Gi,Ki,!1,null,null,null);const Qi=Yi.exports;var Ji=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"futurelayer-gallery-image-wrapper",style:e.cssStyleForWrapper},[t("div",{staticClass:"futurelayer-gallery-image-outline",style:e.cssStyleForOutline})])},eo=[];let to=class extends l.w3{constructor(){super(...arguments),this.elementPositionOnCanvas=!1,this.cleanupListeners=()=>{}}mounted(){this.elementPositionOnCanvas=ii(this.htmlElement),this.cleanupListeners=ai(this.htmlElement,(e=>{this.elementPositionOnCanvas=e}))}beforeDestroy(){this.cleanupListeners()}get cssStyleForWrapper(){return li(this.elementPositionOnCanvas)}get cssStyleForOutline(){return ci(this.elementPositionOnCanvas)}};(0,r.gn)([(0,l.fI)()],to.prototype,"htmlElement",void 0),to=(0,r.gn)([(0,l.wA)({})],to);const no=to,so=no;var io=(0,N.Z)(so,Ji,eo,!1,null,null,null);const oo=io.exports;var ao=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"futurelayer-removable-element-wrapper",style:e.cssStyleForWrapper,attrs:{"data-futurelayer-element-id":e.element.id}},[t("div",{staticClass:"futurelayer-removable-element-controls",style:e.cssStyleForControls},[t("button",{staticClass:"futurelayer-removable-control-button",attrs:{title:e.isRemoved?"Show element":"Hide element"},on:{click:e.toggleRemoved}},[t("Icon",{attrs:{icon:e.isRemoved?"EyeIcon":"EyeSlashIcon",size:10}})],1),e.isRemoved?t("button",{staticClass:"futurelayer-removable-control-button delete",attrs:{title:"Remove permanently"},on:{click:e.handleRemovePermanently}},[t("Icon",{attrs:{icon:"TrashIcon",size:10}})],1):e._e()])])},ro=[];function lo(e){c.documentStore.unthrottledPropertyChanged({elementId:e,path:"settings.futurelayer.removed",value:!0,meta:{snapshotLabel:"Disable Optional Element"}})}function co(e){c.documentStore.unthrottledPropertyChanged({elementId:e,path:"settings.futurelayer.removed",value:!1,meta:{snapshotLabel:"Enable Optional Element"}})}function uo(e){c.documentStore.deleteElement({nodeId:e})}let po=class extends l.w3{constructor(){super(...arguments),this.elementPositionOnCanvas=!1,this.cleanupListeners=()=>{}}mounted(){this.elementPositionOnCanvas=oi(this.element),this.cleanupListeners=ri(this.element,(e=>{this.elementPositionOnCanvas=e}))}beforeDestroy(){this.cleanupListeners()}get cssStyleForWrapper(){return li(this.elementPositionOnCanvas)}get cssStyleForControls(){return this.elementPositionOnCanvas?{left:`calc(${this.elementPositionOnCanvas.width} + 4px)`,top:`calc(${this.elementPositionOnCanvas.height} / 2)`,transform:"translateY(-50%)"}:{display:"none"}}get isRemoved(){return!0===this.element.data.properties?.settings?.futurelayer?.removed}toggleRemoved(){this.isRemoved?co(this.element.id):lo(this.element.id)}handleRemovePermanently(){uo(this.element.id)}};(0,r.gn)([(0,l.fI)()],po.prototype,"element",void 0),po=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],po);const ho=po,go=ho;var mo=(0,N.Z)(go,ao,ro,!1,null,null,null);const vo=mo.exports;var yo=n(80897),fo=n(31839);class _o{constructor(e){this.hoveredElementData={nearestNodeThatCanBeActivated:null,nearestRepeatableItem:null,nearestWrapperLink:null,hoveredGalleryImage:null},this.callback=e,this.startListening()}destroy(){this.stopListening()}updateHoveredElementData(e){e.nearestNodeThatCanBeActivated===this.hoveredElementData.nearestNodeThatCanBeActivated&&e.nearestRepeatableItem===this.hoveredElementData.nearestRepeatableItem&&e.nearestWrapperLink===this.hoveredElementData.nearestWrapperLink&&e.hoveredGalleryImage===this.hoveredElementData.hoveredGalleryImage||(this.hoveredElementData=e,this.callback(e))}startListening(){const e=window.Breakdance.canvas.document,t=e=>{const t=e.target,n=(0,yo.G)(t),s=(0,fo.M)(t,n);this.updateHoveredElementData({nearestNodeThatCanBeActivated:n?(0,Ii.fj)(n):null,nearestRepeatableItem:n?(0,Vi.pO)(n):null,nearestWrapperLink:n?(0,Vi.Fl)(n):null,hoveredGalleryImage:s})},n=()=>{this.updateHoveredElementData({nearestNodeThatCanBeActivated:null,nearestRepeatableItem:null,nearestWrapperLink:null,hoveredGalleryImage:null})};e.addEventListener("mousemove",t),e.addEventListener("mouseleave",n),this.cleanup=()=>{e.removeEventListener("mousemove",t),e.removeEventListener("mouseleave",n)}}stopListening(){this.cleanup(),this.hoveredElementData={nearestNodeThatCanBeActivated:null,nearestRepeatableItem:null,nearestWrapperLink:null,hoveredGalleryImage:null}}}let bo,So=class extends l.w3{constructor(){super(...arguments),this.currentHoveredData={nearestNodeThatCanBeActivated:null,nearestRepeatableItem:null,nearestWrapperLink:null,hoveredGalleryImage:null}}mounted(){bo=new _o((e=>{this.currentHoveredData=e}))}beforeDestroy(){bo.destroy()}get activeElement(){return Q.kD.activeElement}get isHoveredElementHeaderOrFooter(){const e=this.currentHoveredData.nearestNodeThatCanBeActivated;return!!e&&(!Q.kD.inlineEditingContext?.elementId&&(e.data.type===Us.Uu||e.data.type===Us.hO))}get activeElementSupportsRemoval(){return!!this.activeElement&&!0===this.activeElement.data.properties?.settings?.futurelayer?.allow_removal}};So=(0,r.gn)([(0,l.wA)({components:{FutureLayerActiveElementOutline:Ci,FutureLayerHoveredElementOutline:Di,FutureLayerHoveredHeaderOrFooter:Ni,FutureLayerRepeatableItemOutlineAndControls:Hi,FutureLayerLinkWrapperOutlineAndControls:Qi,FutureLayerGalleryImageOutline:oo,FutureLayerRemovableElementControls:vo}})],So);const Co=So,xo=Co;var wo=(0,N.Z)(xo,ei,ti,!1,null,null,null);const Io=wo.exports;let Po=class extends s.ZP{constructor(){super(...arguments),this.hideTitleBar=!1,this.hideHoverControls=!1}get isSingularityMode(){return Q.kD.isSingularityMode}get isSingularityPreviewMode(){return Q.fz.previewMode}get isOnboardingMode(){return window.Breakdance.isOnboarding}get element(){return Q.kD.activeElement||!1}get activeElement(){return Q.kD.activeElement}get hoveredElement(){return!!Q.kD.lastHoveredOnCanvasElementId&&(0,ge.findNode)(Q.Hb.document.tree,Q.kD.lastHoveredOnCanvasElementId)}get classes(){let e=null;return this.hideTitleBar&&this.hideHoverControls?e="all":this.hideHoverControls?e="hover":this.hideTitleBar&&(e="titlebar"),{"node-chrome":!0,[`node-chrome--hide-${e}`]:e,"node-chrome--singularity":this.isSingularityMode}}onElementSelected(){this.observer?.disconnect(),this.element&&(this.observer=this.observePositionChange(this.element,(e=>{this.hideTitleBar=(0,T.p1)(e)})))}onHoveredElementSelected(){this.hoverObserver?.disconnect(),this.hoveredElement&&(this.hoverObserver=this.observePositionChange(this.hoveredElement,(e=>{this.hideHoverControls=(0,T.p1)(e)})))}beforeDestroy(){this.destroyObserver()}observePositionChange(e,t){if(!e)return;const n=(0,T.dq)(e);if(!n)return;const s=e=>{e.forEach((e=>{const n=e.target;t(n)}))},i=new MutationObserver(s),o={attributes:!0,attributeFilter:["class"]};return i.observe(n,o),i}destroyObserver(){this.observer?.disconnect(),this.hoverObserver?.disconnect()}};(0,r.gn)([(0,l.RL)("element")],Po.prototype,"onElementSelected",null),(0,r.gn)([(0,l.RL)("hoveredElement")],Po.prototype,"onHoveredElementSelected",null),Po=(0,r.gn)([(0,l.wA)({components:{NodeContentEditable:gt,DragDots:R,SpacingBars:ue,ColumnDragSizer:Ae,NodeTitlebar:et,NodeGhostTitlebar:dn,NodeHoverControls:rt,NodeOnboardingHoverControls:tn,NodeSingularityHover:As,NodeSingularityActive:yn,NodeSingularityContentEditable:Fs,NodeSingularityTitlebar:Js,FutureLayerNodeChrome:Io}})],Po);const ko=Po,Eo=ko;var To=(0,N.Z)(Eo,I,P,!1,null,null,null);const Do=To.exports;var Ao=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("DragPlaceholder"),t("RightClickMenu",{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}]})],1)},Zo=[],Oo=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-drag-placeholder-wrapper"},[t("div",{staticClass:"breakdance-drag-placeholder",style:e.dragPlaceholderPositionStyle}),t("div",{staticClass:"breakdance-drag-target-outline",style:e.dragTargetOutlineStyle})])},Mo=[];let Bo=class extends s.ZP{get canvasDragPlaceholderPosition(){return c.uiStore.canvasDragPlaceholderPosition}get parentNode(){if(!this.canvasDragPlaceholderPosition)return!1;const e=(0,ge.findNode)(c.documentStore.document.tree,this.canvasDragPlaceholderPosition.parentId);return e||!1}get stackingStyle(){return this.canvasDragPlaceholderPosition&&this.parentNode?(0,Le.qE)(this.parentNode):{}}get dragPlaceholderPositionStyle(){if(!this.canvasDragPlaceholderPosition||!0===this.canvasDragPlaceholderPosition.onlyShowTargetOutline)return{};const e=(0,ge.findNode)(c.documentStore.document.tree,this.canvasDragPlaceholderPosition.parentId);if(!e)return{};const t=8,n=`${t}px`;if(0===e.children.length){const s=e.id===ge.ROOT_ELEMENT_ID?(0,T.j3)():(0,T.Sv)(e);if(!s)return{};let{x:i,y:o,width:a,height:r}=s;return a-40>100&&(i+=20,a-=40),{display:"block",top:o+r/2-t/2+"px",left:`${i}px`,width:`${a}px`,height:n}}{const s=e.children[this.canvasDragPlaceholderPosition.nodeIndex],i=(0,T.Sv)(s),o=(0,Le.qE)(e);if(!i)return{};const{x:a,y:r,width:l,height:c}=i;if("vertical"===o){if("before"===this.canvasDragPlaceholderPosition.position)return{display:"block",top:r-(t/2-1)+"px",left:`${a}px`,width:`${l}px`,height:n};if("after"===this.canvasDragPlaceholderPosition.position)return{display:"block",top:c+r-(t/2+1)+"px",left:`${a}px`,width:`${l}px`,height:n}}else if("horizontal"===o){if("before"===this.canvasDragPlaceholderPosition.position)return{display:"block",top:`${r}px`,left:a-t/2+"px",height:`${c}px`,width:n};if("after"===this.canvasDragPlaceholderPosition.position)return{display:"block",left:l+a-t/2+"px",top:`${r}px`,height:`${c}px`,width:n}}}return{}}get dragTargetOutlineStyle(){if(!this.parentNode)return{};const e=this.parentNode.id===ge.ROOT_ELEMENT_ID&&0===c.documentStore.document.tree.root.children.length?(0,T.j3)():(0,T.Sv)(this.parentNode);if(!e)return{};const{x:t,y:n,width:s,height:i}=e;return{display:"block",position:"absolute",top:`${n}px`,left:`${t}px`,width:`${s}px`,height:`${i}px`}}};Bo=(0,r.gn)([(0,l.wA)({components:{}})],Bo);const Lo=Bo,No=Lo;var Fo=(0,N.Z)(No,Oo,Mo,!1,null,null,null);const Ro=Fo.exports;var Vo=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("div",{directives:[{name:"show",rawName:"v-show",value:e.shouldShow,expression:"shouldShow"}],staticClass:"breakdance-canvas-right-click-menu",class:{"breakdance-canvas-right-click-menu--structure-panel":"structure-panel"===e.context},style:e.wrapperPositionStyle},[t("RightClickMenuItem",{attrs:{disabled:!e.elementIdPresent,shortcut:["⌘ C","Ctrl C"]},on:{click:e.copyElement}},[e._v(" "+e._s(e.__("Copy"))+" ")]),t("RightClickMenuItem",{attrs:{disabled:!e.canPasteElement,shortcut:["⌘ V","Ctrl V"]},on:{click:e.pasteElement}},[e._v(" "+e._s(e.__("Paste"))+" ")]),"breakdance"===e.builderMode?t("RightClickMenuItem",{attrs:{disabled:!e.canPasteElementProperties},on:{click:function(t){return e.pasteElementProperties("design")}}},[e._v(" "+e._s(e.__("Paste Design"))+" ")]):e._e(),"breakdance"===e.builderMode?t("RightClickMenuItem",{attrs:{disabled:!e.canPasteElementProperties},on:{click:function(t){return e.pasteElementProperties("settings")}}},[e._v(" "+e._s(e.__("Paste Settings"))+" ")]):e._e(),t("RightClickWrapMenu",{attrs:{context:e.context},on:{close:e.close}}),t("div",{staticClass:"breakdance-canvas-right-click-menu-divider"}),t("RightClickMenuItem",{attrs:{disabled:!e.elementIdPresent,shortcut:["⌫","Del"]},on:{click:e.deleteElement}},[e._v(" "+e._s(e.__("Delete"))+" ")]),t("div",{staticClass:"breakdance-canvas-right-click-menu-divider"}),t("RightClickMenuItem",{attrs:{disabled:!e.canSaveAsGlobalBlock},on:{click:e.openSaveGlobalBlockDialog}},[e._v(" "+e._s(e.sprintf(e._doc("Save as %s","%s: Global block label"),e.$bdox("global_block")))+" ")]),"breakdance"===e.builderMode?t("RightClickMenuItem",{attrs:{disabled:!e.canSaveAsPreset},on:{click:e.openSavePresetDialog}},[e._v(" "+e._s(e.__("Create Design Preset"))+" ")]):e._e()],1),t("GlobalBlockDialog",{attrs:{open:e.saveGlobalBlockDialog,"element-id":e.elementIdToSaveAsGlobalBlock},on:{close:e.closeGlobalBlockDialog}}),t("PresetDialog",{attrs:{open:e.savePresetDialog,"element-id":e.elementIdToSaveAsPreset},on:{close:e.closePresetDialog}}),t("ClipboardDialog",{model:{value:e.clipboardDialog,callback:function(t){e.clipboardDialog=t},expression:"clipboardDialog"}})],1)},$o=[],Wo=n(89028),Uo=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:{"breakdance-canvas-right-click-menu-item":!0,"breakdance-canvas-right-click-menu-item-disabled":e.disabled},on:{click:function(t){e.disabled||e.$emit("click",t)}}},[e._t("default"),e.shortcut?t("div",{staticClass:"breakdance-canvas-right-click-menu-item-shortcut"},[e._v(" "+e._s(e.isMac?e.shortcut[0]:e.shortcut[1])+" ")]):e._e()],2)},zo=[],Ho=n(11859);let Go=class extends s.ZP{get isMac(){const e=(0,Ho.X)().toLowerCase();return/mac/.test(e)}};(0,r.gn)([(0,l.fI)({default:!1})],Go.prototype,"disabled",void 0),(0,r.gn)([(0,l.fI)({default:""})],Go.prototype,"shortcut",void 0),(0,r.gn)([(0,l.fI)({default:()=>[]})],Go.prototype,"subItems",void 0),Go=(0,r.gn)([(0,l.wA)({components:{}})],Go);const Ko=Go,jo=Ko;var qo=(0,N.Z)(jo,Uo,zo,!1,null,null,null);const Xo=qo.exports;var Yo=n(87615),Qo=n(37179),Jo=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Dialog",{attrs:{value:e.open},on:{close:function(t){return e.$emit("close")},"click:outside":function(t){return e.$emit("close")},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("close")}},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.sprintf(e._doc("Save as %s","%s: Global block label"),e.$bdox("global_block"))))]},proxy:!0},{key:"text",fn:function(){return[t("TextInput",{attrs:{size:"md",placeholder:e.$bdox("global_block"),autofocus:e.open},on:{keypress:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.saveAsGlobalBlock.apply(null,arguments)}},model:{value:e.globalBlockName,callback:function(t){e.globalBlockName=t},expression:"globalBlockName"}})]},proxy:!0},{key:"actions",fn:function(){return[t(Qo.Z,{attrs:{text:""},on:{click:function(t){return e.$emit("close")}}},[e._v(e._s(e.__("Cancel")))]),t(Qo.Z,{attrs:{color:"blue",dark:"",disabled:!e.globalBlockName},on:{click:e.saveAsGlobalBlock}},[e._v(" "+e._s(e.__("Save"))+" ")])]},proxy:!0}])})},ea=[],ta=n(89137),na=n(41571);let sa=class extends s.ZP{constructor(){super(...arguments),this.globalBlockName=""}async saveAsGlobalBlock(e){e.preventDefault(),this.globalBlockName&&(this.elementId&&await(0,Yo.AM)(this.elementId,this.globalBlockName),this.globalBlockName="",this.$emit("close"))}};(0,r.gn)([(0,l.fI)({default:!1})],sa.prototype,"open",void 0),(0,r.gn)([(0,l.fI)({required:!0})],sa.prototype,"elementId",void 0),sa=(0,r.gn)([(0,l.wA)({components:{Dialog:ta.Z,TextInput:na.Z}})],sa);const ia=sa,oa=ia;var aa=(0,N.Z)(oa,Jo,ea,!1,null,null,null);const ra=aa.exports;var la=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Dialog",{attrs:{value:e.value,width:500,closeable:!0},on:{input:function(t){return e.$emit("input",t)}},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.__("Enable Paste")))]},proxy:!0},{key:"text",fn:function(){return[e.status&&!e.status.secure?t("p",[e._v(" "+e._s(e.__("To paste using the Edit menu, your website needs to be served with HTTPS."))+" ")]):e.status&&!e.permissionGranted?t("p",[e._v(" "+e._s(e.__("To paste using the Edit menu, please allow access to your clipboard."))+" ")]):e._e(),t("p",[e._v(e._s(e.__("Alternatively, you can use your keyboard shortcuts:")))]),t("ul",{staticClass:"clipboard-dialog-shortcuts"},[t("li",{staticClass:"clipboard-dialog-shortcut"},[t("span",{staticClass:"clipboard-dialog-shortcut__key"},[e._v(e._s(e.metaKey)+" C")]),t("span",{staticClass:"clipboard-dialog-shortcut__label"},[e._v(e._s(e.__("copy")))])]),t("li",{staticClass:"clipboard-dialog-shortcut"},[t("span",{staticClass:"clipboard-dialog-shortcut__key"},[e._v(e._s(e.metaKey)+" X")]),t("span",{staticClass:"clipboard-dialog-shortcut__label"},[e._v(e._s(e.__("cut")))])]),t("li",{staticClass:"clipboard-dialog-shortcut"},[t("span",{staticClass:"clipboard-dialog-shortcut__key"},[e._v(e._s(e.metaKey)+" V")]),t("span",{staticClass:"clipboard-dialog-shortcut__label"},[e._v(e._s(e.__("paste")))])])])]},proxy:!0}])})},ca=[],da=n(31737);let ua=class extends s.ZP{constructor(){super(...arguments),this.status=null}async onChange(){this.status=await(0,da.fn)(),this.status?.permission&&(this.status.permission.onchange=()=>{this.$emit("input",!1)})}get permissionGranted(){return"granted"===this.status?.permission?.state}get metaKey(){return this.isAppleDevice?"⌘":"Ctrl + "}get isAppleDevice(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}close(){this.$emit("input",!1)}};(0,r.gn)([(0,l.fI)()],ua.prototype,"value",void 0),(0,r.gn)([(0,l.RL)("value",{immediate:!0})],ua.prototype,"onChange",null),ua=(0,r.gn)([(0,l.wA)({components:{Dialog:ta.Z}})],ua);const pa=ua,ha=pa;var ga=(0,N.Z)(ha,la,ca,!1,null,null,null);const ma=ga.exports;var va=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Dialog",{attrs:{value:e.open},on:{close:function(t){return e.$emit("close")},"click:outside":function(t){return e.$emit("close")},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("close")}},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(" "+e._s(e.__("Create Design Preset"))+" ")]},proxy:!0},{key:"text",fn:function(){return[t("TextInput",{ref:"input",attrs:{size:"md",placeholder:e.__("Preset Name"),autofocus:e.open},on:{keypress:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save.apply(null,arguments)}},model:{value:e.presetName,callback:function(t){e.presetName=t},expression:"presetName"}})]},proxy:!0},{key:"actions",fn:function(){return[t(Qo.Z,{attrs:{text:""},on:{click:function(t){return e.$emit("close")}}},[e._v(" "+e._s(e.__("Cancel"))+" ")]),t(Qo.Z,{attrs:{color:"blue",dark:"",disabled:!e.presetName},on:{click:e.save}},[e._v(" "+e._s(e.__("Save"))+" ")])]},proxy:!0}])})},ya=[],fa=n(91669);let _a=class extends s.ZP{constructor(){super(...arguments),this.presetName=null}get isPresetsOverridesEnabled(){return c.configStore.isExperimentEnabled("design-presets-overrides")}get element(){return this.elementId?(0,ge.findNode)(c.documentStore.document.tree,this.elementId):null}onOpenChange(){this.open&&(this.presetName=this.getDefaultName(),this.$nextTick((()=>this.focusAndSelectInput())))}getDefaultName(){if(!this.element)return"";if(this.defaultName)return this.defaultName;const e=this.element.data.type,t=c.configStore.element(e).name;return`${t} ${(0,fa.z)()}`}focusAndSelectInput(){const e=this.$refs.input,t=e.$el.querySelector("input");t?.focus(),t?.select()}async save(e){if(e.preventDefault(),!this.presetName||!this.elementId||!this.element)return;const t=this.element.data.type,n=(0,ae.Lr)(this.presetName,t,this.element.data.properties.design);(0,ae.xk)(n),(0,ae.I8)(n.id,this.elementId),this.presetName="",this.$emit("close")}};(0,r.gn)([(0,l.fI)({required:!0})],_a.prototype,"elementId",void 0),(0,r.gn)([(0,l.fI)({default:!1})],_a.prototype,"open",void 0),(0,r.gn)([(0,l.fI)({default:""})],_a.prototype,"defaultName",void 0),(0,r.gn)([(0,l.RL)("open")],_a.prototype,"onOpenChange",null),_a=(0,r.gn)([(0,l.wA)({components:{Dialog:ta.Z,TextInput:na.Z}})],_a);const ba=_a,Sa=ba;var Ca=(0,N.Z)(Sa,va,ya,!1,null,null,null);const xa=Ca.exports;var wa=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-canvas-right-click-dropdown",class:{"breakdance-canvas-right-click-dropdown--disabled":!e.canWrap,"breakdance-canvas-right-click-dropdown--inverted":e.isInverted},on:{mouseenter:e.checkOverflow}},[t("RightClickMenuItem",{attrs:{disabled:!e.canWrap}},[e._v(" "+e._s(e.__("Wrap In"))+" "),t("Icon",{staticClass:"breakdance-canvas-right-click-submenu__arrow",attrs:{icon:"ChevronRightIcon",size:10}})],1),t("div",{ref:"submenu",staticClass:"breakdance-canvas-right-click-submenu"},[t("div",{staticClass:"breakdance-canvas-right-click-submenu__content breakdance-canvas-right-click-menu"},e._l(e.wrapItems,(function(n){return t("RightClickMenuItem",{key:n.label,on:{click:function(t){return e.wrapIn(n)}}},[e._v(" "+e._s(n.label)+" ")])})),1)])],1)},Ia=[];let Pa=class extends l.w3{constructor(){super(...arguments),this.isInverted=!1}get builderMode(){return Q.PK.builderMode}get wrapItems(){return"oxygen"===this.builderMode?[{label:(0,Ft.__)("Container"),elementSlug:"OxygenElements\\Container"},{label:(0,Ft.__)("Link"),elementSlug:"OxygenElements\\ContainerLink"}]:[{label:(0,Ft.__)("Div"),elementSlug:"EssentialElements\\Div"},{label:(0,Ft.__)("Link"),elementSlug:"EssentialElements\\WrapperLink"}]}get element(){return Q.kD.activeElement}get canWrap(){if(!this.element)return!1;const e=Q.PK.element(this.element.data.type),t=e.nestingRule.type;return!["section","root","popup"].includes(t)}wrapIn({elementSlug:e}){this.element&&(Q.Hb.wrapElement({wrapperElementSlug:e,elementId:this.element.id}),this.$emit("close"))}getViewportWidth(){return"canvas"===this.context?window.Breakdance.canvas.document?.defaultView?.innerWidth:window.innerWidth}checkOverflow(){this.isInverted=!1,this.$nextTick((()=>{const e=this.$refs.submenu;if(!e)return;const t=e.getBoundingClientRect(),n=this.getViewportWidth();if(!n)return;const s=t.right-n,i=.1*t.width;this.isInverted=s>i}))}};(0,r.gn)([(0,l.fI)({default:"canvas"})],Pa.prototype,"context",void 0),Pa=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,RightClickMenuItem:Xo}})],Pa);const ka=Pa,Ea=ka;var Ta=(0,N.Z)(Ea,wa,Ia,!1,null,"fba78680",null);const Da=Ta.exports;var Aa=n(47354);let Za=class extends s.ZP{constructor(){super(...arguments),this.clipboardDialog=!1,this.canPasteElement=!1,this.canPasteElementProperties=!1,this.elementIdToSaveAsGlobalBlock=null,this.saveGlobalBlockDialog=!1,this.elementIdToSaveAsPreset=null,this.savePresetDialog=!1}async mounted(){window.Breakdance.canvas.document.addEventListener("contextmenu",this.handleRightClickInCanvas),window.Breakdance.canvas.document.addEventListener("click",this.closeRightClickMenuIfClickHappensOutsideRightClickMenu,{capture:!0}),window.addEventListener("click",this.closeRightClickMenuIfClickHappensOutsideRightClickMenu,{capture:!0})}beforeDestroy(){window.Breakdance.canvas.document.removeEventListener("contextmenu",this.handleRightClickInCanvas),window.Breakdance.canvas.document.removeEventListener("click",this.closeRightClickMenuIfClickHappensOutsideRightClickMenu,{capture:!0}),window.removeEventListener("click",this.closeRightClickMenuIfClickHappensOutsideRightClickMenu,{capture:!0})}get menuState(){return"structure-panel"===this.context?"closed"!==c.uiStore.onStructurePanelRightClickMenuState?c.uiStore.onStructurePanelRightClickMenuState:null:"closed"!==c.uiStore.onCanvasRightClickMenuState?c.uiStore.onCanvasRightClickMenuState:null}get shouldShow(){const e="structure-panel"===this.context?"closed"!==c.uiStore.onStructurePanelRightClickMenuState:"closed"!==c.uiStore.onCanvasRightClickMenuState;return e&&!this.saveGlobalBlockDialog}get builderMode(){return c.configStore.builderMode}handleRightClickInCanvas(e){if(e.preventDefault(),(0,Aa.o8)())return;const t=(0,Le.Qf)(e.clientX,e.clientY),n=(0,ze.e)(e.clientX,e.clientY);n&&c.uiStore.setOnCanvasRightClickMenuState({elementId:t,position:n})}closeRightClickMenuIfClickHappensOutsideRightClickMenu(e){if(this.saveGlobalBlockDialog)return;const t=e.target.closest(".breakdance-canvas-right-click-menu");t||this.close()}get wrapperPositionStyle(){return this.menuState?{left:`${this.menuState.position.x}px`,top:`${this.menuState.position.y}px`}:{}}get elementIdPresent(){return this.menuState?.elementId}async onStateChange(){const{permission:e}=await(0,da.fn)();if(this.permission=e?.state,"prompt"===this.permission)return this.canPasteElement=!0,void(this.canPasteElementProperties=!0);this.canPasteElement=await(0,Wo.Ku)(this.menuState?.elementId?this.menuState.elementId:c.documentStore.document.tree.root.id),this.canPasteElementProperties=!!this.menuState?.elementId&&await(0,Wo.us)(this.menuState.elementId)}copyElement(){this.menuState?.elementId&&(0,Wo.NA)(this.menuState.elementId),this.close()}pasteElement(){"prompt"===this.permission&&(this.clipboardDialog=!0),this.menuState?.elementId?(0,Wo.Wm)(this.menuState.elementId):(0,Wo.Wm)(c.documentStore.document.tree.root.id),this.close()}pasteElementProperties(e){"prompt"===this.permission&&(this.clipboardDialog=!0),this.menuState?.elementId&&(0,Wo.qb)(this.menuState.elementId,e),this.close()}deleteElement(){this.menuState?.elementId&&(c.documentStore.deleteElement({nodeId:this.menuState?.elementId}),this.close())}openSaveGlobalBlockDialog(){this.menuState?.elementId&&(this.elementIdToSaveAsGlobalBlock=this.menuState.elementId,this.saveGlobalBlockDialog=!0)}closeGlobalBlockDialog(){this.saveGlobalBlockDialog=!1,this.elementIdToSaveAsGlobalBlock=null,this.close()}get canSaveAsGlobalBlock(){return this.menuState?.elementId&&(0,Yo.VQ)(this.menuState.elementId)}openSavePresetDialog(){this.menuState?.elementId&&(this.elementIdToSaveAsPreset=this.menuState.elementId,this.savePresetDialog=!0)}closePresetDialog(){this.savePresetDialog=!1,this.elementIdToSaveAsPreset=null,this.close()}get canSaveAsPreset(){return!(0,ae.CO)(this.menuState?.elementId)}close(){c.uiStore.setOnCanvasRightClickMenuState("closed"),c.uiStore.setOnStructurePanelRightClickMenuState("closed")}};(0,r.gn)([(0,l.fI)({default:"canvas"})],Za.prototype,"context",void 0),(0,r.gn)([(0,l.RL)("menuState")],Za.prototype,"onStateChange",null),Za=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,PresetDialog:xa,ClipboardDialog:ma,GlobalBlockDialog:ra,RightClickMenuItem:Xo,RightClickWrapMenu:Da}})],Za);const Oa=Za,Ma=Oa;var Ba=(0,N.Z)(Ma,Vo,$o,!1,null,null,null);const La=Ba.exports;let Na=class extends s.ZP{};Na=(0,r.gn)([(0,l.wA)({components:{DragPlaceholder:Ro,RightClickMenu:La}})],Na);const Fa=Na,Ra=Fa;var Va=(0,N.Z)(Ra,Ao,Zo,!1,null,null,null);const $a=Va.exports;var Wa=n(3565),Ua=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-empty-container node-chrome--singularity breakdance-empty-container-singularity",attrs:{id:"breakdance-empty-container"}},[t("div",{staticClass:"breakdance-empty-container-singularity__content"},[t("div",{staticClass:"breakdance-empty-container-singularity__options"},[t("SingularityCanvasOption",{attrs:{icon:"Grid2Icon",title:"Add from Library",description:"Browse and add pre-designed sections from the library."},on:{click:e.openSectionLibraryModal}}),t("SingularityCanvasOption",{attrs:{icon:"SparklesIcon",title:"Build with AI",description:"Generate a custom section using AI based on your description."},on:{click:e.openAddNewSectionAI}})],1)])])},za=[],Ha=n(12570),Ga=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(Ha.Z,{attrs:{value:"true","content-class":"singularity-section-library-modal"},on:{input:e.closeDialog}},[t("div",{staticClass:"singularity-section-library-modal__header"},[t("h2",{staticClass:"singularity-section-library-modal__title"},[e._v(e._s(e.modalTitle))]),t("div",{staticClass:"singularity-section-library-modal__actions"},[t("div",{staticClass:"singularity-section-library-modal__sections-actions"},[t("IconButton",{staticClass:"singularity-icon-button",attrs:{icon:"SquareIcon",small:"",size:"14",active:1===e.columnLayout},on:{click:function(t){return e.setColumnLayout(1)}}}),t("IconButton",{staticClass:"singularity-icon-button",attrs:{icon:"Grid2Icon",size:"14",active:2===e.columnLayout},on:{click:function(t){return e.setColumnLayout(2)}}}),t("IconButton",{staticClass:"singularity-icon-button",attrs:{icon:"GridIcon",size:"14",active:3===e.columnLayout},on:{click:function(t){return e.setColumnLayout(3)}}})],1),t("IconButton",{staticClass:"singularity-icon-button",attrs:{size:"20",icon:"CloseSolidIcon"},on:{click:e.closeDialog}})],1)]),t("div",{staticClass:"singularity-section-library-modal__content",class:{"is-editing-header-or-footer":e.isEditingHeaderOrFooter,"is-selecting-section":"selected"===e.gridView}},[t("div",{staticClass:"singularity-section-library-modal__sections-list"},[t("div",{staticClass:"singularity-section-library-modal__sections-wrapper"},[t("div",{staticClass:"singularity-section-library-modal__search-sections"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.searchCategory,expression:"searchCategory"}],staticClass:"singularity-section-library-modal__sections-search",attrs:{type:"text",placeholder:"Search sections..."},domProps:{value:e.searchCategory},on:{input:function(t){t.target.composing||(e.searchCategory=t.target.value)}}}),t("Icon",{attrs:{icon:"SearchIcon",size:"16"}})],1),t("ul",{staticClass:"singularity-section-library-modal__categories"},e._l(e.sectionsCategories,(function(n){return t("li",{key:n.type,staticClass:"singularity-section-library-modal__section-category"},[t("button",{class:{"singularity-section-library-modal__category-button":!0,"is-active":e.activeCategoryType===n.type},on:{click:function(t){return e.setSelectCategory(n.type)}}},[e._v(" "+e._s(n.type)+" ")])])})),0)])]),"all"===e.gridView?t("div",{staticClass:"singularity-section-library-modal__sections"},[t("transition-group",{key:e.activeCategoryType,class:e.gridClass,attrs:{name:"fade",tag:"div"}},e._l(e.activeCategory,(function(n,s){return t("SectionCard",{key:`${n.type}-${s}`,attrs:{currentSection:e.currentSectionIsSame(s,n.type),value:n,layout:"detailed"},nativeOn:{click:function(t){return e.setSelectedSection(n,s)}}})})),1)],1):e._e(),"selected"===e.gridView?t("div",{staticClass:"singularity-section-library-modal__selected"},[t("div",{staticClass:"singularity-section-library-modal__selected-content"},[t("div",{staticClass:"singularity-section-library-modal__selected-actions"},[e.selectedSection?t("SectionCard",{staticClass:"section-card-no-hover-effect",staticStyle:{width:"450px","max-width":"100%"},attrs:{value:e.selectedSection,layout:"detailed","max-height":"550px"}}):e._e()],1),t("div",{staticClass:"singularity-section-library-modal__selected-options"},[e.isReplacingSection?[t("SingularityOption",{attrs:{title:"Replace section & write content",icon:"SparklesIcon"},on:{click:function(t){return e.handleSection(!0)}}}),t("SingularityOption",{attrs:{title:"Replace section with default content",icon:"EditIcon"},on:{click:function(t){return e.handleSection(!1)}}})]:[t("SingularityOption",{attrs:{title:"Insert section & write content",icon:"SparklesIcon"},on:{click:function(t){return e.handleSection(!0)}}}),t("SingularityOption",{attrs:{title:"Insert section with default content",icon:"EditIcon"},on:{click:function(t){return e.handleSection(!1)}}})],t("NiceButton",{attrs:{color:"gray-ghost",expanded:"true",size:"large"},on:{click:e.setGridViewToAll}},[e._v("back to all sections ")])],2)])]):e._e()])])},Ka=[],ja=n(23279),qa=n.n(ja),Xa=n(22608),Ya=n(18332),Qa=n(98949),Ja=(n(98374),n(51617)),er=n(42665),tr=n(60719),nr=n(48299),sr=n(15167),ir=n(45335);const or="https://breakdance-design-library-section-screenshots-ap-production.up.railway.app/screenshots/barebones";function ar(){const e=(0,Ya.Jb)();return Object.entries(e).flatMap((([e,t])=>t.map(((t,n)=>({label:`${e} ${n}`,index:n,node:t,type:e,screenshotUrl:dr(e,String(t.id))})))))}function rr(){const e=(0,Ya.Jb)();return Object.entries(e).map((([e,t])=>{const n=t[0];return{label:`${e} 0`,index:0,node:n,type:e,screenshotUrl:dr(e,String(n.id))}})).filter(Boolean)}function lr(){const e=c.documentStore.document.tree.root.children.find((e=>e.data.type===Us.Uu));return e?1:0}function cr(e,t){let n,s;if(-1===t)n=c.documentStore.document.tree.root.id,s=lr();else{const e=(0,ge.getNodeParent)(c.documentStore.document.tree,t);if(!1===e)return null;n=e.id;const i=(0,ge.getNodeIndex)(c.documentStore.document.tree,t);s=!1!==i?i+1:0}const i={nodeId:void 0};return(0,Qa.AE)([e],"inserting",i),i.nodeId&&c.documentStore.moveElement({draggedElementId:i.nodeId,droppedOnElementId:n,index:s}),i.nodeId??null}function dr(e,t){const n=e.toLowerCase().replace(/[^a-z0-9]/g,""),s=`${n}-${t}.jpg`;return`${or}/${n}/${s}`}function ur(e,t,n,s,i){let o;if("swap"===s){const e=(0,ge.findNode)(c.documentStore.document.tree,n);e&&(o=(0,ir.p2)(e))}const a={type:e.type,sectionFriendlyName:`${e.type}`,description:""},r=(0,Ja.gq)(e.node,a,t,!1),l=(0,Ja.ML)(r,a.sectionFriendlyName),d=cr(l,n);if(d){const e=d,t=(0,ge.findNode)(c.documentStore.document.tree,e),n=(0,ge.getNodeIndex)(c.documentStore.document.tree,e);if(!t)return;"add_before"===s&&c.documentStore.moveElement({draggedElementId:d,droppedOnElementId:c.documentStore.document.tree.root.id,index:n?Math.max(0,n-1):0}),i&&er.P.addJob((async n=>{await(0,tr.H2)(e,n,!0,o),await(0,nr.q)(t,n)}),{jobType:"section_rewrite",documentId:c.documentStore.document.documentMeta.id,elementId:e,description:`Rewrite and image population for new section in document "${c.documentStore.document.documentMeta.titleLabel}" - section ${e}`,priority:"critical",snapshotLabel:"Rewrite section with AI"})}"swap"===s&&c.documentStore.deleteElement({nodeId:n}),(0,A.forceNextTick)((()=>{c.uiStore.activateElement(d)}))}function pr(e){const t=(0,sr.E)((0,ge.findNode)(c.documentStore.document.tree,e));if(!t.singularity||!t.singularity.sectionData.type||!t.singularity.sectionData.index)return null;const n=t.singularity.sectionData.type,s=t.singularity.sectionData.index;return ar().find((e=>e.type===n&&e.index===s))||null}var hr=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"section-card",class:{"section-card--current":e.currentSection}},["default"===e.layout?[t("div",{staticClass:"section-card-preview"},[e.showLabel||e.currentSection?t("div",{staticClass:"section-card-tag"},[t("SingularityBadge",{attrs:{value:e.showLabel?e.value.label:"Selected",color:e.isGlobal?"teal":"default"}})],1):e._e(),t("img",{style:e.imageStyles,attrs:{src:e.value.screenshotUrl,alt:"Section Preview"}})])]:"detailed"===e.layout?[t("div",{staticClass:"section-card-title"},[t("span",[e._v(e._s(e.value.label))]),e.currentSection?t("SingularityBadge",{attrs:{value:"Selected"}}):e._e()],1),t("div",{staticClass:"section-card-preview"},[t("img",{style:e.imageStyles,attrs:{src:e.value.screenshotUrl,alt:"Section Preview"}})])]:e._e()],2)},gr=[],mr=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-badge",class:`singularity-badge--${e.color}`},[t("span",{staticClass:"singularity-badge__text"},[e._v(e._s(e.value))])])},vr=[];let yr=class extends s.ZP{};(0,r.gn)([(0,l.fI)({required:!0})],yr.prototype,"value",void 0),(0,r.gn)([(0,l.fI)({default:"default"})],yr.prototype,"color",void 0),yr=(0,r.gn)([(0,l.wA)({})],yr);const fr=yr,_r=fr;var br=(0,N.Z)(_r,mr,vr,!1,null,null,null);const Sr=br.exports;let Cr=class extends s.ZP{get imageStyles(){return{maxHeight:"number"===typeof this.maxHeight?`${this.maxHeight}px`:this.maxHeight}}};(0,r.gn)([(0,l.fI)()],Cr.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],Cr.prototype,"currentSection",void 0),(0,r.gn)([(0,l.fI)()],Cr.prototype,"showLabel",void 0),(0,r.gn)([(0,l.fI)({default:!1})],Cr.prototype,"isGlobal",void 0),(0,r.gn)([(0,l.fI)({default:"default"})],Cr.prototype,"layout",void 0),(0,r.gn)([(0,l.fI)({default:"auto"})],Cr.prototype,"maxHeight",void 0),Cr=(0,r.gn)([(0,l.wA)({components:{SingularityBadge:Sr}})],Cr);const xr=Cr,wr=xr;var Ir=(0,N.Z)(wr,hr,gr,!1,null,null,null);const Pr=Ir.exports;var kr=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-option",on:{click:function(t){return e.$emit("click")}}},[t("Icon",{attrs:{icon:e.icon,size:"16"}}),t("div",{staticClass:"singularity-option__content"},[t("h4",[e._v(e._s(e.title))]),e.description?t("p",[e._v(e._s(e.description))]):e._e(),e._t("content")],2),t("div",{staticClass:"singularity-option__icon-chevron"},[t("Icon",{attrs:{icon:"ChevronRightIcon",size:"16"}})],1)],1)},Er=[];let Tr=class extends s.ZP{};(0,r.gn)([(0,l.fI)()],Tr.prototype,"title",void 0),(0,r.gn)([(0,l.fI)()],Tr.prototype,"description",void 0),(0,r.gn)([(0,l.fI)({default:"SparklesIcon"})],Tr.prototype,"icon",void 0),Tr=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],Tr);const Dr=Tr,Ar=Dr;var Zr=(0,N.Z)(Ar,kr,Er,!1,null,null,null);const Or=Zr.exports;var Mr,Br=n(79333);(function(e){e["showAll"]="all",e["selected"]="selected"})(Mr||(Mr={}));let Lr=class extends s.ZP{constructor(){super(...arguments),this.searchCategory="",this.columnLayout=2,this.gridView=Mr.showAll,this.selectedSectionIndex=null,this.selectedSection=null,this.selectedCategoryType=null,this.debouncedLogSearchFn=qa()((e=>{(0,Tt.K)("FutureLayer Section Search",{searchTerm:e})}),1e3)}setGridView(e){this.gridView=e}setGridViewToAll(){this.selectedSection=null,this.selectedSectionIndex=null,this.gridView=Mr.showAll}get modalTitle(){if(this.isEditingHeaderOrFooter){if("header"===this.headerAndFooterEditorPanelState?.elementType)return"Add Header";if("footer"===this.headerAndFooterEditorPanelState?.elementType)return"Add Footer"}return this.gridView===Mr.selected?"Insert Section":"Add Section"}closeDialog(){this.$emit("close")}get sectionToSwapData(){if(!this.sectionAddOrSwapPanelState.sectionId)return null;const e=(0,ge.findNode)(c.documentStore.document.tree,this.sectionAddOrSwapPanelState.sectionId);return e?(0,sr.E)(e).singularity.sectionData:null}currentSectionIsSame(e,t){return this.sectionToSwapData?.type===t&&this.sectionToSwapData?.index===e}get gridClass(){return`singularity-section-library-modal__sections-masonry singularity-section-library-modal__sections-masonry--${this.columnLayout}`}setColumnLayout(e){this.columnLayout=e}get sections(){return ar()}setSelectedSection(e,t){this.setGridView(Mr.selected),this.selectedSectionIndex=t,this.selectedSection=e}get isReplacingSection(){return"swap"===this.mode}handleSection(e){this.selectedSection&&null!==this.selectedSectionIndex&&void 0!==this.selectedSectionIndex&&((0,Tt.K)("FutureLayer Section Chosen",{sectionType:this.selectedSection.type,sectionIndex:this.selectedSectionIndex,mode:this.mode,isRewriteActive:e}),ur(this.selectedSection,this.selectedSectionIndex,this.sectionAddSectionId,this.mode,e),this.closeDialog())}get sectionAddOrSwapPanelState(){return c.singularityStore.sectionAddOrSwapPanelState}get sectionAddSectionId(){return this.sectionAddOrSwapPanelState.sectionId??-1}get mode(){return this.sectionAddOrSwapPanelState.mode}get headerAndFooterEditorPanelState(){return c.singularityStore.headerAndFooterEditorPanelState}get isEditingHeaderOrFooter(){return null!==this.headerAndFooterEditorPanelState}get filteredSections(){return this.isEditingHeaderOrFooter?["Headers","Footer","Index"]:["Index"]}get activeCategory(){return this.sections.filter((e=>e.type===this.activeCategoryType))}get sectionsCategories(){const e=rr().filter((e=>"Index"!==e.type));return this.isEditingHeaderOrFooter?"header"===this.headerAndFooterEditorPanelState?.elementType?e.filter((e=>"Headers"===e.type)).filter((e=>e.type.toLowerCase().includes(this.searchCategory.toLowerCase().trim()))):"footer"===this.headerAndFooterEditorPanelState?.elementType?e.filter((e=>"Footers"===e.type)).filter((e=>e.type.toLowerCase().includes(this.searchCategory.toLowerCase().trim()))):e.filter((e=>["Headers","Footers"].includes(e.type))).filter((e=>e.type.toLowerCase().includes(this.searchCategory.toLowerCase().trim()))):e.filter((e=>!["Headers","Footers"].includes(e.type))).filter((e=>e.type.toLowerCase().includes(this.searchCategory.toLowerCase().trim())))}get activeCategoryType(){return!this.selectedCategoryType&&this.sectionToSwapData?.type&&(this.selectedCategoryType=this.sectionToSwapData.type),this.selectedCategoryType||"Features"}setSelectCategory(e){this.selectedCategoryType=e,(0,Tt.K)("FutureLayer Section Category Selected",{categoryType:e})}onSearchCategoryChange(e){""!==e&&this.debouncedLogSearchFn(e)}};(0,r.gn)([(0,l.RL)("searchCategory")],Lr.prototype,"onSearchCategoryChange",null),Lr=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z,Icon:He.Z,SectionCard:Pr,SingularityOption:Or,NiceButton:Br.Z}})],Lr);const Nr=Lr,Fr=Nr;var Rr=(0,N.Z)(Fr,Ga,Ka,!1,null,null,null);const Vr=Rr.exports;var $r=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-empty-container-singularity__option",attrs:{role:"button"},on:{click:function(t){return e.$emit("click")}}},[t("Icon",{staticClass:"breakdance-empty-container-singularity__option-icon",attrs:{icon:e.icon,size:"32"}}),t("div",{staticClass:"breakdance-empty-container-singularity__option-text"},[t("h2",{staticClass:"breakdance-empty-container-singularity__option-title"},[e._v(" "+e._s(e.title)+" ")]),t("p",{staticClass:"breakdance-empty-container-singularity__option-description"},[e._v(" "+e._s(e.description)+" ")])])],1)},Wr=[];let Ur=class extends s.ZP{};(0,r.gn)([(0,l.fI)()],Ur.prototype,"title",void 0),(0,r.gn)([(0,l.fI)()],Ur.prototype,"description",void 0),(0,r.gn)([(0,l.fI)({default:"SparklesSolidIcon"})],Ur.prototype,"icon",void 0),Ur=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],Ur);const zr=Ur,Hr=zr;var Gr=(0,N.Z)(Hr,$r,Wr,!1,null,null,null);const Kr=Gr.exports;let jr=class extends s.ZP{constructor(){super(...arguments),this.isModalOpen=!1}get canAddElement(){return c.uiStore.hasFullAccess}openSectionLibraryModal(){c.singularityStore.setSectionLibraryModalState(!0)}openPagesManager(){c.singularityStore.setSingularityLeftPanel("page_manager"),c.singularityStore.highlightSingularityLeftPanel()}openAddNewSectionAI(){c.singularityStore.setAddNewSectionPanelState({mode:"breakdance_ai"}),c.singularityStore.highlightSingularityLeftPanel()}};(0,r.gn)([(0,l.fI)({default:null})],jr.prototype,"id",void 0),jr=(0,r.gn)([(0,l.wA)({components:{SingularityCanvasButton:En,SingularitySectionLibraryModal:Vr,Icon:He.Z,SingularityCanvasOption:Kr}})],jr);const qr=jr,Xr=qr;var Yr=(0,N.Z)(Xr,Ua,za,!1,null,null,null);const Qr=Yr.exports;var Jr=n(79298),el=n(660),tl=n(16068),nl=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.shouldShowBackdrop?t("span",{staticClass:"breakdance-inline-editor-backdrop",style:e.style,on:{click:e.onBackdropClick}}):e._e()},sl=[],il=n(87950);let ol=class extends l.w3{get style(){return this.rect?{clipPath:`polygon(\n 0% 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%,\n 0% ${this.rect?.y}px,\n ${this.rect?.x}px ${this.rect?.y}px,\n ${this.rect?.x}px ${this.rect?.bottom}px,\n ${this.rect?.right}px ${this.rect?.bottom}px,\n ${this.rect?.right}px ${this.rect?.y}px,\n 0% ${this.rect?.y}px\n )`}:null}get shouldShowBackdrop(){return Q.kD.isInlineEditing&&Q.kD.inlineEditingContext?.showBackdrop}get rect(){return Q.kD.inlineEditingRect}onBackdropClick(){(0,il.Uw)()}};ol=(0,r.gn)([l.wA],ol);const al=ol,rl=al;var ll=(0,N.Z)(rl,nl,sl,!1,null,null,null);const cl=ll.exports;var dl=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.draggedElement&&e.dragPosition?t("div",{staticClass:"breakdance-drag-ghost-element",style:{top:e.dragPosition?.y?e.dragPosition.y+"px":"0",left:e.dragPosition?.x?e.dragPosition.x+"px":"0"}},[e._v(" "+e._s(e.elementName)+" ")]):e._e()},ul=[];let pl=class extends l.w3{constructor(){super(...arguments),this.scrollInterval=null,this.maxScrollSpeed=30,this.edgeThreshold=100}onDragElementSet(){this.draggedElement?this.scrollInterval=setInterval(this.startAutoScroll,20):this.stopAutoScroll()}get dragPosition(){return Q.kD.dragMousePosition}get draggedElement(){const e=Q.kD.currentlyDraggingAddElementSlug,t=Q.kD.currentlyDraggingCanvasElementId;if(e)return e;if(t){const e=this.draggedNode;if(e)return e.data.type}return null}get draggedNode(){return Q.kD.currentlyDraggingCanvasElementId?(0,ge.findNode)(Q.Hb.document.tree,Q.kD.currentlyDraggingCanvasElementId):null}get elementName(){if(!this.draggedElement)return"";const e=this.draggedNode?.data?.properties?.meta?.friendlyName;if(e)return e;const t=Q.PK.element(this.draggedElement);return t.name}calculateScrollSpeed(e){return Math.max(0,this.maxScrollSpeed*(1-e/this.edgeThreshold))}startAutoScroll(){if(!this.dragPosition)return;const e=window.Breakdance.canvas.document,t=e.defaultView;if(e.documentElement.style.scrollBehavior="auto",!t)return;const n=t.innerHeight,s=this.dragPosition.y;let i=0;s<this.edgeThreshold?i=-this.calculateScrollSpeed(s):s>n-this.edgeThreshold&&(i=this.calculateScrollSpeed(n-s)),0!==i&&t.scrollBy({top:i,behavior:"auto"})}stopAutoScroll(){const e=window.Breakdance.canvas.document;e.documentElement.style.scrollBehavior="",this.scrollInterval&&(clearInterval(this.scrollInterval),this.scrollInterval=null)}};(0,r.gn)([(0,l.RL)("draggedElement")],pl.prototype,"onDragElementSet",null),pl=(0,r.gn)([(0,l.wA)({})],pl);const hl=pl,gl=hl;var ml=(0,N.Z)(gl,dl,ul,!1,null,null,null);const vl=ml.exports;let yl=class extends s.ZP{render(){const e=arguments[0],t=()=>this.canvasIsEmpty&&!this.isFutureLayerMode?e(Wa.Z):this.isFutureLayerMode?this.elementsForCanvasInFutureLayerMode.map((t=>"empty-container"===t.type?e(Qr,{key:"empty-container"}):e(w["default"],{key:t.element.id,attrs:{parentId:this.rootElement.id,element:t.element}}))):this.rootElement.children.map((t=>e(w["default"],{key:t.id,attrs:{parentId:this.rootElement.id,element:t}})));return e("div",{key:this.canvasKey,class:this.classList,attrs:{id:"breakdance_canvas"},style:this.style},[t(),!this.isPreviewMode&&e(Do),(!this.isPreviewMode&&!this.isOnboardingMode)??e($a),!this.isPreviewMode&&e($a),!this.isPreviewMode&&e(cl),!this.isPreviewMode&&e(vl),this.previewSettings.backgroundColor&&this.previewGlobalStyle()])}mounted(){c.uiStore.setCanvasState("normal"),addEventListener("storage",this.onStorage)}beforeDestroy(){removeEventListener("storage",this.onStorage)}onStorage(e){"oxy_selectors"===e.key&&(0,tl.z3)(e)}get isFutureLayerMode(){return(0,Aa.o8)()}get canvasKey(){return c.uiStore.canvasKey}get builderMode(){return c.configStore.builderMode||"breakdance"}get isPreviewMode(){return c.uiStore.isPreviewMode}get isOnboardingMode(){return window.Breakdance.isOnboarding}get classList(){return{[this.builderMode]:!0,canvas:!0,dragging:c.uiStore.isCanvasElementBeingDragged||c.uiStore.isAddElementBeingDragged}}get rootElement(){return c.documentStore.document.tree.root}get canvasIsEmpty(){return this.isFutureLayerMode?(0,Us.vN)(c.documentStore.document.tree):0===this.rootElement.children.length}get elementsForCanvasInFutureLayerMode(){const e=this.rootElement.children.map((e=>({type:"element",element:e})));if(this.isFutureLayerMode&&this.canvasIsEmpty){const t=e.findIndex((e=>e.element?.data.type===Us.Uu)),n=t>=0?t+1:0;e.splice(n,0,{type:"empty-container"})}return e}get globalProperties(){return c.globalStore.globalProperties}get selectors(){return c.globalStore.cssSelectors}get presets(){return c.globalStore.presets}get oxySelectors(){return c.globalStore.oxySelectors}get variables(){return c.globalStore.variables}get previewSettings(){const{preview:e}=c.documentStore.document.documentMeta.blockSettings||{preview:{}};return{width:e.width,height:e.height,backgroundColor:e.backgroundColor,isCentered:e.isCentered}}get style(){const{height:e,width:t,isCentered:n}=this.previewSettings,s={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"};return{maxWidth:t?"100%":void 0,width:t?`${t}px`:void 0,height:e?`${e}px`:void 0,margin:t||e?"0 auto":void 0,...n?s:{}}}previewGlobalStyle(){const e=this.$createElement,{backgroundColor:t}=this.previewSettings,n="oxygen"===this.builderMode?"background-color":"--bde-background-color";return e("style",[`\n :root,\n body {\n ${n}: ${t};\n }\n `])}onGlobalSettingsChanged(){(0,Jr.TK)((0,T.RY)())}onSelectorsChanged(){(0,Jr.EO)((0,T.RY)())}onPresetsChanged(){(0,Jr.aL)((0,T.RY)())}onOxySelectorsChanged(){(0,el.V)((0,T.RY)())}onVariablesChanged(){(0,Jr.Vq)((0,T.RY)()),(0,el.V)((0,T.RY)())}};(0,r.gn)([(0,l.RL)("globalProperties",{deep:!0,immediate:!0})],yl.prototype,"onGlobalSettingsChanged",null),(0,r.gn)([(0,l.RL)("selectors",{deep:!0,immediate:!0})],yl.prototype,"onSelectorsChanged",null),(0,r.gn)([(0,l.RL)("presets",{deep:!0,immediate:!0})],yl.prototype,"onPresetsChanged",null),(0,r.gn)([(0,l.RL)("oxySelectors",{deep:!0,immediate:!0})],yl.prototype,"onOxySelectorsChanged",null),(0,r.gn)([(0,l.RL)("variables",{deep:!0,immediate:!0})],yl.prototype,"onVariablesChanged",null),yl=(0,r.gn)([(0,l.wA)({components:{DragGhostElement:vl,EmptyContainer:Wa.Z,BuilderElement:w["default"],NodeChrome:Do,CanvasChrome:$a}})],yl);const fl=yl,_l=fl;var bl,Sl,Cl=(0,N.Z)(_l,bl,Sl,!1,null,null,null);const xl=Cl.exports;var wl=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:e.classes,style:e.style},[t("div",{staticClass:"breakdance-preview-width-adjustment-handle align-center",on:{mousedown:e.dragStart,dblclick:e.resetPreviewWidth}},[t("Icon",{staticClass:"breakdance-preview-width-adjustment-handle__icon",attrs:{icon:"EllipsisStrokeVerticalIcon",size:"6",heightAuto:!0}})],1),e.isDragging||e.currentPreviewWidthIsSetByUser?t("div",{staticClass:"breakdance-px-amount"},[e._v(" "+e._s(e.pxAmount)+" "),t("Icon",{staticClass:"px-amount-reset-icon",attrs:{icon:"CloseCircleIcon",size:"11"},on:{click:e.resetPreviewWidth}})],1):e._e(),e.currentMediaQueryStr?t("div",{staticClass:"breakdance-preview-width-adjustment-handle-preview"},[t("span",{staticClass:"breakdance-preview-width-adjustment-handle-preview__amount"},[e._v(" "+e._s(e.currentBreakpoint.maxWidth)+" ")]),e._v(" "+e._s(e.currentMediaQueryStr)+" ")]):e._e()])},Il=[];let Pl=class extends s.ZP{constructor(){super(...arguments),this.mouseXChange=0,this.lastMouseX=0,this.isDragging=!1,this.easyEvent=new Z.hF}get currentPreviewWidthIsSetByUser(){return"100%"===this.currentBreakpoint.defaultPreviewWidth?"100%"!==this.previewWidth.width:this.previewWidth.width!==this.currentBreakpoint.defaultPreviewWidth}get currentMediaQueryStr(){return(0,Pe.Mc)(this.currentBreakpoint.minWidth,this.currentBreakpoint.maxWidth)}get builderMode(){return c.configStore.builderMode}get style(){return{left:`${this.iframeWrapperPosition.x+this.iframeWrapperPosition.width}px`,height:`${this.iframeWrapperPosition.height}px`}}get pxAmount(){return"100%"===this.previewWidth.width?"100%":`${this.previewWidth.width}px`}get alreadyAtMaximumWidth(){return"100%"===this.previewWidth.width||this.previewWidth.width>=this.previewWidth.availableCanvasSize.width}dragStart(e){e.preventDefault(),e.stopPropagation(),this.easyEvent.on("mousemove",this.dragging),this.easyEvent.on("mouseup",this.dragEnd),this.lastMouseX=e.clientX,this.iframe&&(this.iframe.style.pointerEvents="none"),this.mainWrapper&&(this.mainWrapper.style.cursor="col-resize",this.mainWrapper.classList.add("is-dragging-adjustment-handle"))}dragging(e){(0,Z.Pm)(e)||(this.isDragging=!0,e.preventDefault(),e.stopPropagation(),this.mouseXChange=e.clientX-this.lastMouseX,this.adjustPreviewWidth(2*this.mouseXChange),this.lastMouseX=e.clientX)}dragEnd(e){e.preventDefault(),e.stopPropagation(),this.easyEvent.removeAll(),this.iframe&&(this.iframe.style.pointerEvents="auto"),this.mainWrapper&&(this.mainWrapper.style.cursor="auto",this.mainWrapper.classList.remove("is-dragging-adjustment-handle")),this.isDragging=!1}adjustPreviewWidth(e){let t;const n=this.previewWidth.width;if(this.alreadyAtMaximumWidth&&e>0&&(e=0),"100%"===this.previewWidth.width){if(!this.iframe)return void console.warn("iframe element is missing");t=this.iframe.offsetWidth-e}else t=this.previewWidth.width+e;"100%"!==n&&t>n&&t>this.previewWidth.availableCanvasSize.width&&(t=this.previewWidth.availableCanvasSize.width),this.$emit("previewWidthChangeWithAdjustmentBar",t)}resetPreviewWidth(){this.$emit("resetPreviewWidth")}get classes(){return{"breakdance-preview-width-bar":!0,"breakdance-preview-width-bar-is-dragging":this.isDragging}}};(0,r.gn)([(0,l.fI)()],Pl.prototype,"iframeWrapperPosition",void 0),(0,r.gn)([(0,l.fI)()],Pl.prototype,"previewWidth",void 0),(0,r.gn)([(0,l.fI)()],Pl.prototype,"currentBreakpoint",void 0),(0,r.gn)([(0,l.fI)()],Pl.prototype,"mainWrapper",void 0),(0,r.gn)([(0,l.fI)()],Pl.prototype,"iframe",void 0),Pl=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],Pl);const kl=Pl,El=kl;var Tl=(0,N.Z)(El,wl,Il,!1,null,null,null);const Dl=Tl.exports;var Al=n(86687),Zl=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(Qo.Z,e._g({class:e.classList,attrs:{elevation:"0",loading:e.loading,height:"breakdance"===e.builderMode?37:32,minWidth:e.minWidth,outlined:"breakdance"===e.builderMode,"data-test-id":e.testId}},e.$listeners),[e._t("default")],2)},Ol=[];let Ml=class extends s.ZP{get classList(){return{"breakdance-toolbar-button":"breakdance"===this.builderMode,"breakdance-toolbar-button--active":this.active,"button-oxygen":"oxygen"===this.builderMode}}get builderMode(){return Q.PK.builderMode}};(0,r.gn)([(0,l.fI)({default:!1})],Ml.prototype,"loading",void 0),(0,r.gn)([(0,l.fI)({default:!1})],Ml.prototype,"active",void 0),(0,r.gn)([(0,l.fI)({default:"auto"})],Ml.prototype,"minWidth",void 0),(0,r.gn)([(0,l.fI)()],Ml.prototype,"testId",void 0),Ml=(0,r.gn)([(0,l.wA)({components:{}})],Ml);const Bl=Ml,Ll=Bl;var Nl=(0,N.Z)(Ll,Zl,Ol,!1,null,null,null);const Fl=Nl.exports;var Rl=n(49026),Vl=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.showOverlay?t("div",{class:e.classes,style:e.overlayStyles,on:{mouseleave:e.handleOverlayMouseLeave,click:e.openInCanvasInSingularityMode}},[t("div",{staticClass:"breakdance-foreign-documents-overlay-titlebar-wrapper"},[t("div",{staticClass:"breakdance-foreign-documents-overlay-titlebar"},[e.isSingularityMode?[t("a",[e._v(e._s(e.sprintf(e._xdoc("Edit %s","Document","%s: Document title"),e.foreignDocumentTitle)))])]:[t("a",{attrs:{href:e.foreignDocumentBuilderUrl},on:{click:e.openBuilderUrl}},[e._v(" "+e._s(e.sprintf(e._xdoc("Edit %s","Document","%s: Document title"),e.foreignDocumentTitle))+" "),t("Icon",{attrs:{icon:"EditIcon"}})],1)]],2)])]):e._e()},$l=[];const Wl=e=>`${e}px`;var Ul,zl=n(94543),Hl=n(63085);(function(e){e["breakdance_header"]="header",e["oxygen_header"]="header",e["breakdance_footer"]="footer",e["oxygen_footer"]="footer"})(Ul||(Ul={}));let Gl=class extends s.ZP{constructor(){super(...arguments),this.hoveredForeignDocumentDomElement=null,this.hoveredForeignDocumentDomElementCoords=null,this.isScrolling=!1,this.isScrollingCleanupTimerId=null,this.throttledHandleIframeScroll=U()(this.handleIframeScroll,120),this.throttledHandleWatchedElementMouseMove=U()(this.handleWatchedElementMouseMove,60),this.openingInProgress=!1}get showOverlay(){return c.uiStore.hasFullAccess}get foreignDocumentBuilderUrl(){return this.hoveredForeignDocumentDomElement?.dataset.breakdanceForeignDocumentBuilderUrl}get foreignDocumentTypeLabel(){const e=this.hoveredForeignDocumentDomElement?.dataset.breakdanceForeignDocumentType;return e?Ul[e]??"":""}get foreignDocumentTitle(){const e=this.hoveredForeignDocumentDomElement?.dataset.breakdanceForeignDocumentTitle;return e||(0,Ft.__)("Unknown Document")}get overlayStyles(){if(!this.isThereHoveredElementAndItsCoords())return;const{top:e,left:t,height:n,width:s}=this.hoveredForeignDocumentDomElementCoords;return{display:"flex",top:Wl(e),left:Wl(t),height:Wl(n),width:Wl(s)}}mounted(){this.addEventListenersToIframeDocument(),this.addEventListenersToWatchedElements()}beforeDestroy(){this.removeEventListenersFromIframeDocument(),this.removeEventListenersFromWatchedElements()}addEventListenersToIframeDocument(){this.iframeDocument.addEventListener("scroll",this.throttledHandleIframeScroll)}removeEventListenersFromIframeDocument(){this.iframeDocument.removeEventListener("scroll",this.throttledHandleIframeScroll)}addEventListenersToWatchedElements(){this.elementsToWatch.forEach((e=>{e.addEventListener("mousemove",this.throttledHandleWatchedElementMouseMove),e.addEventListener("mouseleave",this.handleWatchedElementMouseLeave)}))}removeEventListenersFromWatchedElements(){this.elementsToWatch.forEach((e=>{e.removeEventListener("mousemove",this.throttledHandleWatchedElementMouseMove),e.removeEventListener("mouseleave",this.handleWatchedElementMouseLeave)}))}isThereHoveredElementAndItsCoords(){return null!==this.hoveredForeignDocumentDomElement&&null!==this.hoveredForeignDocumentDomElementCoords}setHoveredForeignDocumentDomElement(e){this.hoveredForeignDocumentDomElement=e,this.hoveredForeignDocumentDomElementCoords=this.getCoords()}getCoords(){const e=this.hoveredForeignDocumentDomElement;if(1===e?.childElementCount){const t=e.firstElementChild;return t.getBoundingClientRect()}return e?.getBoundingClientRect()??null}setIsScrolling(e){e?(this.hoveredForeignDocumentDomElement=null,this.hoveredForeignDocumentDomElementCoords=null,this.removeEventListenersFromWatchedElements()):this.addEventListenersToWatchedElements(),this.isScrolling=e}handleIframeScroll(){this.setIsScrolling(!0),this.isScrollingCleanupTimerId&&clearTimeout(this.isScrollingCleanupTimerId),this.isScrollingCleanupTimerId=setTimeout((()=>this.setIsScrolling(!1)),120)}handleOverlayMouseLeave(){this.setHoveredForeignDocumentDomElement(null)}handleWatchedElementMouseMove(e){e.currentTarget&&this.setHoveredForeignDocumentDomElement(e.currentTarget)}handleWatchedElementMouseLeave(e){this.$el.contains(e.relatedTarget)?null!==this.hoveredForeignDocumentDomElement&&(this.hoveredForeignDocumentDomElementCoords=this.getCoords()):this.setHoveredForeignDocumentDomElement(null)}openBuilderUrl(){const e=this.foreignDocumentBuilderUrl;e&&this.$emit("openDocument",{builderUrl:e,title:this.foreignDocumentTitle})}get isSingularityMode(){return c.uiStore.isSingularityMode}get classes(){return{"breakdance-foreign-documents-overlay":!0,"breakdance-foreign-documents-overlay--singularity-mode":this.isSingularityMode}}async openInCanvasInSingularityMode(){if(!this.isSingularityMode)return;if(console.log(this.foreignDocumentBuilderUrl),!this.foreignDocumentBuilderUrl)return;const e=this.getDocIdFromBuilderUrl(this.foreignDocumentBuilderUrl);console.log(e),e&&(this.openingInProgress=!0,await(0,zl.$)(),await(0,Hl.rI)(e),c.singularityStore.setSingularityLeftPanel("page_structure"),this.openingInProgress=!1)}getDocIdFromBuilderUrl(e){const t=new URL(e),n=t.searchParams.get("id");return n?parseInt(n):null}};(0,r.gn)([(0,l.fI)()],Gl.prototype,"canvasElement",void 0),(0,r.gn)([(0,l.fI)()],Gl.prototype,"iframeDocument",void 0),(0,r.gn)([(0,l.fI)()],Gl.prototype,"elementsToWatch",void 0),Gl=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],Gl);const Kl=Gl,jl=Kl;var ql=(0,N.Z)(jl,Vl,$l,!1,null,null,null);const Xl=ql.exports;var Yl=n(713),Ql=n(11529),Jl=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{ref:"mainWrapper",staticClass:"breakdance-iframe-main-wrapper",style:e.mainWrapperStyle,attrs:{id:"canvas-area"}},[t("PreviewWidthAdjustmentHandle",{attrs:{"iframe-wrapper-position":e.iframeWrapperPosition,"preview-width":e.iframePreviewWidth,"current-breakpoint":e.currentBreakpoint,iframe:e.iframe,"main-wrapper":e.mainWrapper},on:{resetPreviewWidth:()=>this.$emit("resetPreviewWidth"),previewWidthChangeWithAdjustmentBar:e=>this.$emit("previewWidthChangeWithAdjustmentBar",e)}}),e.iframeExited?t("div",{staticClass:"iframe-reloaded-warning-block"},[e._v(" Something navigated you away from the page you are editing. "),t("StandardButton",{staticClass:"mt-4",attrs:{minWidth:"80"},on:{click:e.handleReloadWanted}},[e._v(" Continue Editing ")])],1):t("div",{ref:"iframeWrapper",staticClass:"breakdance-iframe-inner-wrapper",style:e.iframeWrapperStyles,attrs:{id:"iframe-wrapper"}},[e.iframeIsLoading?t("Loading",{attrs:{absolute:""}}):e._e(),t("iframe",{key:e.iframeUrl,ref:"iframe",staticClass:"breakdance-iframe",style:e.iframeStyle,attrs:{id:e.iframeId,name:e.iframeId,src:e.iframeUrl},on:{load:e.handleIframeLoaded}})],1)],1)},ec=[];let tc=class extends s.ZP{constructor(){super(...arguments),this.iframeWrapperPosition={x:0,y:0,width:0,height:0}}get canvasPadding(){if((0,Aa.o8)())return 0;const e="oxygen"===c.configStore.builderMode?4:8;return this.isPreviewMode?0:e}get mainWrapperStyle(){return{padding:`${this.canvasPadding}px`}}get iframeWrapperStyles(){return{width:"100%"===this.iframePreviewWidth.width?"100%":`${this.iframePreviewWidth.width}px`,overflow:"SCALED_TO_FIT"===c.uiStore.settings.scaleToFit?"hidden":"auto"}}get iframeStyle(){const e=e=>{const t=Math.min(1,this.iframePreviewWidth.availableCanvasSize.width/e);return{width:`${e}px`,transform:`scale(${t})`,height:this.iframePreviewWidth.availableCanvasSize.height*(1/t)+"px"}};return"ACTUAL_SIZE"===c.uiStore.settings.scaleToFit?"100%"===this.iframePreviewWidth.width?{width:"100%",minWidth:`${this.minWidth}px`}:{width:`${this.iframePreviewWidth.width}px`}:"100%"===this.iframePreviewWidth.width?this.iframePreviewWidth.availableCanvasSize.width<this.minWidth?e(this.minWidth):{width:"100%",minWidth:`${this.minWidth}px`}:e(this.iframePreviewWidth.width)}get iframeIsLoading(){return"loading"===this.iframeState}get isPreviewMode(){return c.uiStore.isPreviewMode}handleIframeLoaded(){this.iframe?.contentWindow&&(this.iframe.contentWindow.onunload=()=>{this.$emit("iframeUnloaded")}),this.$emit("iframeLoaded",this.iframe)}handleReloadWanted(){this.$emit("reloadWanted")}mounted(){this.mainWrapper?new ResizeObserver(this.setAvailableCanvasSize).observe(this.mainWrapper):c.uiStore.logError("No canvas element."),this.iframeWrapper?new ResizeObserver(this.setIframeWrapperPosition).observe(this.iframeWrapper):c.uiStore.logError("No iframe wrapper element."),this.setAvailableCanvasSize()}setAvailableCanvasSize(){if(this.mainWrapper){const e=this.mainWrapper.getBoundingClientRect(),t={...this.iframePreviewWidth,availableCanvasSize:{width:e.width-2*this.canvasPadding,height:e.height-2*this.canvasPadding}};this.$emit("previewWidthChange",t)}this.setIframeWrapperPosition()}setIframeWrapperPosition(){if(this.iframeWrapper){const e=this.iframeWrapper.getBoundingClientRect();this.iframeWrapperPosition={x:e.x,y:e.y,width:e.width,height:e.height}}}};(0,r.gn)([(0,l.fI)()],tc.prototype,"iframeState",void 0),(0,r.gn)([(0,l.fI)()],tc.prototype,"iframePreviewWidth",void 0),(0,r.gn)([(0,l.fI)()],tc.prototype,"iframeUrl",void 0),(0,r.gn)([(0,l.fI)()],tc.prototype,"iframeId",void 0),(0,r.gn)([(0,l.fI)()],tc.prototype,"minWidth",void 0),(0,r.gn)([(0,l.fI)()],tc.prototype,"iframeExited",void 0),(0,r.gn)([(0,l.fI)()],tc.prototype,"currentBreakpoint",void 0),(0,r.gn)([(0,l.Rl)()],tc.prototype,"mainWrapper",void 0),(0,r.gn)([(0,l.Rl)()],tc.prototype,"iframeWrapper",void 0),(0,r.gn)([(0,l.Rl)()],tc.prototype,"iframe",void 0),tc=(0,r.gn)([(0,l.wA)({components:{StandardButton:Fl,Loading:Ql.Z,PreviewWidthAdjustmentHandle:Dl}})],tc);const nc=tc,sc=nc;var ic=(0,N.Z)(sc,Jl,ec,!1,null,null,null);const oc=ic.exports;let ac=class extends s.ZP{constructor(){super(...arguments),this.iframeExited=!1,this.foreignDocumentsOverlayVueApp=null,this.canvasApp=null}handlePreviewWidthChange(e){c.uiStore.changePreviewWidthMutation(e)}handlePreviewWidthChangeWithAdjustmentBar(e){c.uiStore.changePreviewWidthWithAdjustmentBar(e)}handleResetPreviewWidth(){c.uiStore.selectBaseBreakpoint()}setIframeAsExited(){c.configStore.leavingIframeOnPurpose?c.configStore.setLeavingIframeOnPurpose(!1):this.iframeExited=!0}reloadIframe(){this.iframeExited=!1,setTimeout((()=>{window.frames["iframe"].location.reload()}),0)}get iframeMinWidth(){return(0,Pe.GV)(c.globalStore)}get canvasPreviewWidth(){return c.uiStore.canvasPreviewWidth}get canvasState(){return c.uiStore.canvasState}get currentBreakpoint(){return c.uiStore.currentBreakpoint}get iframeURL(){if(c.configStore.documentSpecificNeededUrls&&-1!==c.documentStore.document.documentMeta.id){const e=new URL(c.configStore.documentSpecificNeededUrls.iframeUrl);return e.searchParams.append("breakdance_iframe","true"),e.searchParams.append("breakdance_open_document",`${c.documentStore.document.documentMeta.id}`),e.toString()}return null}mountForeignDocumentsOverlayVueAppInIframe(e,t){const n=e.createElement("div");n.classList.add("breakdance-foreign-documents-overlay-mountpoint"),e.body.appendChild(n),this.foreignDocumentsOverlayVueApp=new s.ZP({el:n,store:c["default"],vuetify:Rl.Z,render(n){return n(Xl,{props:{elementsToWatch:e.querySelectorAll("[data-breakdance-foreign-document]"),canvasElement:t,iframeDocument:e},on:{openDocument:e=>{confirm(`Edit ${e.title}?`)&&window.open(e.builderUrl,"_top")}}})}})}mountCanvasInIframe(e){if(!e.contentDocument)throw"Unable to mount canvas in iframe because its document is missing";(0,T.hm)(e.contentDocument),(0,Ke.B6)(document,window.Breakdance.canvas.document),Al.w.registerAllStoreActions();const t=window.Breakdance.canvas.document.querySelector("#breakdance-canvas-wrapper");this.canvasApp=new s.ZP({store:c["default"],vuetify:Rl.Z,render:e=>e(xl)}).$mount(t),this.mountForeignDocumentsOverlayVueAppInIframe(window.Breakdance.canvas.document,this.canvasApp.$el),(0,T.sy)().appendChild((0,Yl.ok)(document,S,"iframe-styles")),(0,T.sy)().appendChild((0,Yl.ok)(document,C,"iframe-singularity-styles")),(0,T.sy)().appendChild((0,Yl.ok)(document,x,"iframe-futurelayer-styles")),this.unbindClickEventOnInnerIframeLinks(),this.$emit("loaded")}unbindClickEventOnInnerIframeLinks(){const e=[...window.Breakdance.canvas.document.querySelectorAll("a:not([force-allow-clicks])")],t=[...window.Breakdance.canvas.document.querySelectorAll("#breakdance_canvas a")],n=e.filter((e=>!t.includes(e)));n.forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault()}))}))}destroyed(){this.canvasApp&&this.canvasApp.$destroy(),this.foreignDocumentsOverlayVueApp&&this.foreignDocumentsOverlayVueApp.$destroy()}};ac=(0,r.gn)([(0,l.wA)({components:{IframeWrapper:oc,Loading:Ql.Z,Canvas:xl,ForeignDocumentsOverlay:Xl,PreviewWidthAdjustmentHandle:Dl,StandardButton:Fl}})],ac);const rc=ac,lc=rc;var cc=(0,N.Z)(lc,_,b,!1,null,null,null);const dc=cc.exports;let uc=class extends s.ZP{get isSingularityMode(){return c.uiStore.isSingularityMode}get canvasWrapperKey(){return c.uiStore.canvasWrapperKey}};uc=(0,r.gn)([(0,l.wA)({components:{IframeCanvas:dc}})],uc);const pc=uc,hc=pc;var gc=(0,N.Z)(hc,y,f,!1,null,null,null);const mc=gc.exports;var vc=n(55234),yc=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("TopBar",["oxygen"===e.builderMode?[t("TopBarSection",[t("OxygenMenuDropdown"),t("AddButton",{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}]}),t("IconButton",{staticClass:"open-structure-toolbar-button",attrs:{active:e.isStructurePanelOpen,icon:"LayersIconSolid",size:"14",tooltip:"Structure"},on:{click:e.toggleStructurePanel}}),e.isInlineEditing?t("InlineEditorTopbarIndicator"):t("DocumentChooser"),t("PreviewSize"),t("PreviewContentChooserDialog"),t("BreakpointsSelection",{model:{value:e.currentBreakpoint,callback:function(t){e.currentBreakpoint=t},expression:"currentBreakpoint"}})],1),t("TopBarSection",[e.shouldShowUpgradeToProButton?t("UpgradeToPro"):e._e(),e.isAiEnabled?t("IconButton",{staticClass:"open-ai-assistant-button",attrs:{active:e.isAiPanelOpen,icon:"SparklesIconSolid",size:"14",tooltip:"AI Assistant"},on:{click:e.toggleAiPanel}}):e._e(),t("UndoRedo"),t("SettingsDropdown"),t("IconButton",{attrs:{active:e.isOxySelectorsPanelOpen,icon:"BracketsSolidIcon",size:"14",tooltip:"Selectors"},on:{click:e.toggleOxySelectorsPanel}}),t("IconButton",{attrs:{active:e.isVariablesPanelOpen,icon:"DollarSolidIcon",size:"14",tooltip:"Variables"},on:{click:e.toggleVariablesPanel}}),t("IconButton",{attrs:{active:e.isPreviewMode,icon:"PlaySolidIcon",size:"14",tooltip:"Preview"},on:{click:e.togglePreviewMode}}),t("Save"),t("Exit")],1)]:e._e(),"breakdance"===e.builderMode?[t("AddButton",{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}]}),t("TopBarSection",{attrs:{"border-right":!0}},[t("IconButton",{staticClass:"open-properties-toolbar-button",attrs:{active:e.isElementPropertiesOpen,icon:"EditIcon",size:"18"},on:{click:e.toggleElementProperties}})],1),t(vc.Z,{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}]}),e.isInlineEditing?t("InlineEditorTopbarIndicator"):t("DocumentChooser"),t("PreviewContentChooserDialog"),t("TopBarSection",{attrs:{borderRight:!0}},[t("BreakpointsSelection",{model:{value:e.currentBreakpoint,callback:function(t){e.currentBreakpoint=t},expression:"currentBreakpoint"}})],1),t("TopBarSection",[t("PreviewSize")],1),t(vc.Z),e.shouldShowUpgradeToProButton?[t("TopBarSection",[t("UpgradeToPro")],1)]:e._e(),e.isAiEnabled?t("TopBarSection",{attrs:{borderLeft:!0}},[t("IconButton",{staticClass:"open-ai-assistant-button",attrs:{active:e.isAiPanelOpen,icon:"SparklesIcon",size:"18"},on:{click:e.toggleAiPanel}})],1):e._e(),t("UndoRedo"),t("TopBarSection",{staticClass:"top-bar-settings-and-structure-section",attrs:{"border-left":!0}},[t("IconButton",{staticClass:"open-structure-toolbar-button",attrs:{active:e.isStructurePanelOpen,icon:"LayersIcon",size:"18"},on:{click:e.toggleStructurePanel}}),t("SettingsDropdown"),t("IconButton",{staticClass:"open-preview-toolbar-button",attrs:{active:e.isPreviewMode,icon:"PlayIcon",size:"18"},on:{click:e.togglePreviewMode}})],1),t("TopBarSection",{attrs:{borderLeft:!0}},[t("Save")],1),t("Exit")]:e._e()],2)},fc=[],_c=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",["breakdance"===e.builderMode?t("StandardButton",{staticStyle:{"margin-left":"3px","margin-right":"3px"},attrs:{loading:e.saveInProgress,minWidth:"80",testId:"main-save-button"},on:{click:e.save}},[e._v(" "+e._s(e.__("Save"))+" ")]):e._e(),"oxygen"===e.builderMode?t("button",{class:{"button-save-oxygen":!0,"button-save-oxygen-loading":e.saveInProgress,"button-save-oxygen-unsaved":e.unsavedChangesPresent},on:{click:e.save}},[e.saveInProgress?t("Icon",{staticClass:"animate-spin",attrs:{icon:"CircleNotchSolidIcon",size:"14"}}):t("span",[e._v(e._s(e.__("Save")))]),e.unsavedChangesPresent?t("span",{staticClass:"button-save-oxygen-indicator"}):e._e()],1):e._e()],1)},bc=[],Sc=n(7892),Cc=n(68077);let xc=class extends s.ZP{constructor(){super(...arguments),this.unsubscribe=null}get saveInProgress(){return c.uiStore.saveInProgress}get unsavedChangesPresent(){return c.uiStore.unsavedChangesPresent}async save(){document.dispatchEvent(new Event("breakdanceSaveButtonClicked")),(0,Cc.V)(),c.uiStore.inlineEditingContext?.elementId&&await(0,il.Uw)(),await(0,zl.$)()}mounted(){Ke.uq.unbind(je.r.CMD_S),Ke.uq.register(je.r.CMD_S,this.save),this.unsubscribe=this.$store.subscribe((e=>{Ie.n.shouldMutationBeIgnored(e)||c.uiStore.setUnsavedChangesPresent(!0)})),this.warnIfUnsavedFunction=(0,Sc.$)((()=>c.uiStore.unsavedChangesPresent))}beforeDestroy(){Ke.uq.unbind(je.r.CMD_S),this.unsubscribe&&this.unsubscribe(),(0,Sc.e)(this.warnIfUnsavedFunction)}get builderMode(){return c.configStore.builderMode}};xc=(0,r.gn)([(0,l.wA)({components:{StandardButton:Fl,IconButton:Xa.Z,Icon:He.Z}})],xc);const wc=xc,Ic=wc;var Pc=(0,N.Z)(Ic,_c,bc,!1,null,null,null);const kc=Pc.exports;var Ec=n(70248),Tc=n(61908),Dc=n(11193),Ac=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Dropdown",{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return["breakdance"===e.builderMode?t("IconButton",e._g({staticStyle:{"margin-right":"0"},attrs:{active:!e.isBase,icon:e.getDeviceIcon(e.currentBreakpoint.id),rotate:e.getDeviceIconRotation(e.currentBreakpoint.id),size:18}},n)):e._e(),"oxygen"==e.builderMode?t("button",e._g({staticClass:"breakpoint-selection-oxygen"},n),[t("Icon",{attrs:{icon:e.getDeviceIcon(e.currentBreakpoint.id),rotate:e.getDeviceIconRotation(e.currentBreakpoint.id),size:14}}),e._v(e._s(e.currentBreakpoint.label)+" ")],1):e._e()]}}])},[t(Ec.Z,e._l(e.breakpoints,(function(n){return t(Tc.Z,{key:n.id,class:e.activeClass(n.id),attrs:{"two-line":"",dense:""},on:{click:function(t){return e.changeBreakpoint(n)}}},[t("div",{staticClass:"device-icon-wrapper"},[t("Icon",{attrs:{icon:e.getDeviceIcon(n.id),rotate:e.getDeviceIconRotation(n.id),size:"breakdance"===e.builderMode?"18":"14"}})],1),t(Dc.km,{staticClass:"ml-4"},[t(Dc.V9,[e._v(e._s(n.label))]),t(Dc.oZ,["Desktop"===n.label?[e._v(" "+e._s(e.__("All device widths"))+" ")]:e._e(),n.maxWidth&&!n.minWidth?[e._v(" "+e._s(e.sprintf(e._doc("%spx and below","%s: Breakpoint maximum width"),n.maxWidth))+" ")]:e._e(),!n.maxWidth&&n.minWidth?[e._v(" "+e._s(e.sprintf(e._doc("%spx and above","%s: Breakpoint minimum width"),n.minWidth))+" ")]:e._e(),n.maxWidth&&n.minWidth?[e._v(" "+e._s(e.sprintf(e._t("Between %spx and %spx","1: Breakpoint minimum width, 2: Breakpoint maximum width"),n.minWidth,n.maxWidth))+" ")]:e._e()],2)],1)],1)})),1)],1)},Zc=[],Oc=n(15133);let Mc=class extends s.ZP{getDeviceIcon(e){return Pe.b8[e]?.icon||Pe.nR}getDeviceIconRotation(e){return Pe.b8[e]?.rotate}get isBase(){return this.currentBreakpoint.id===Pe.Wp}get breakpoints(){return c.configStore.breakpoints}get currentBreakpoint(){return this.value}get builderMode(){return c.configStore.builderMode}activeClass(e){return this.currentBreakpoint.id===e&&"breakpoint-active"}changeBreakpoint(e){this.$emit("input",e)}onBreakpointsChanged(){this.breakpoints.find((e=>e.id===this.currentBreakpoint.id))||c.uiStore.selectBaseBreakpoint()}};(0,r.gn)([(0,l.fI)()],Mc.prototype,"value",void 0),(0,r.gn)([(0,l.RL)("breakpoints",{deep:!0,immediate:!0})],Mc.prototype,"onBreakpointsChanged",null),Mc=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,Dropdown:Oc.Z,IconButton:Xa.Z}})],Mc);const Bc=Mc,Lc=Bc;var Nc=(0,N.Z)(Lc,Ac,Zc,!1,null,null,null);const Fc=Nc.exports;var Rc=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("TopBarSection",{staticClass:"undo-redo-top-bar-section",attrs:{"border-left":!0}},[t("IconButton",{attrs:{disabled:!e.canUndo,icon:"oxygen"==e.builderMode?"UndoIconSolid":"UndoIcon",size:"oxygen"==e.builderMode?14:18,tooltip:e.canUndo?e.__("Undo changes"):""},on:{click:e.undo}}),t("IconButton",{attrs:{disabled:!e.canRedo,icon:"oxygen"==e.builderMode?"RedoIconSolid":"RedoIcon",size:"oxygen"==e.builderMode?14:18,tooltip:e.canRedo?e.__("Redo changes"):""},on:{click:e.redo}})],1)},Vc=[],$c=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:e.classList},[e._t("default")],2)},Wc=[];let Uc=class extends s.ZP{get classList(){const e=["topbar-section"];return this.borderLeft&&e.push("topbar-section-bl"),this.borderRight&&e.push("topbar-section-br"),e}};(0,r.gn)([(0,l.fI)({default:!1})],Uc.prototype,"borderLeft",void 0),(0,r.gn)([(0,l.fI)({default:!1})],Uc.prototype,"borderRight",void 0),Uc=(0,r.gn)([(0,l.wA)({components:{}})],Uc);const zc=Uc,Hc=zc;var Gc=(0,N.Z)(Hc,$c,Wc,!1,null,null,null);const Kc=Gc.exports;let jc=class extends s.ZP{mounted(){Ke.uq.register(je.r.CMD_Z,this.undo),Ke.uq.register(je.r.CMD_SHIFT_Z,this.redo)}get canUndo(){return c.snapshotStore.canUndo}get canRedo(){return c.snapshotStore.canRedo}undo(){this.canUndo&&Ie.n.undo()}redo(){this.canRedo&&Ie.n.redo()}beforeDestroy(){Ke.uq.unbind(je.r.CMD_Z),Ke.uq.unbind(je.r.CMD_SHIFT_Z)}get builderMode(){return c.configStore.builderMode}};jc=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z,TopBarSection:Kc}})],jc);const qc=jc,Xc=qc;var Yc=(0,N.Z)(Xc,Rc,Vc,!1,null,null,null);const Qc=Yc.exports;var Jc=n(73385),ed=n(77859),td=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.previews?t("div",[t("TopBarSection",{attrs:{"border-right":!0}},[t("Dropdown",{attrs:{"offset-y":"","nudge-top":"oxygen"===e.builderMode?"-16px":0,"close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("div",e._g({staticClass:"document-chooser",class:{"document-chooser-zero-case":e.nothingToPreview}},n),[t("PreviewChooserText",{attrs:{"preview-item":e.currentPreviewedItem,"nothing-to-preview":e.nothingToPreview}}),"breakdance"==e.builderMode?t("div",{staticClass:"document-chooser-dropdown-icon"},[t("Icon",{attrs:{size:"11",icon:"CaretDownIcon"}})],1):e._e(),"oxygen"!=e.builderMode||e.nothingToPreview?e._e():t("div",{staticClass:"document-chooser-dropdown-icon"},[t("Icon",{attrs:{size:"11",icon:"CaretDownSolidIcon"}})],1)],1)]}}],null,!1,3899795736),model:{value:e.open,callback:function(t){e.open=t},expression:"open"}},[e.settingsOpen?t("PreviewChooserSettings",{on:{back:function(t){e.settingsOpen=!1}}}):t(Jc.Z,{staticClass:"vscroll-scroll vscroll-wrap",attrs:{width:"450",height:e.nothingToPreview?void 0:350,loading:e.isLoading}},[e.nothingToPreview?e._e():t("div",{staticClass:"preview-content-chooser-dialog-search-form-wrapper"},[t(ed.Z,{staticClass:"preview-content-chooser-dialog-search-box breakdance-dense-input",attrs:{value:e.search,label:e.__("Search..."),clearable:"",solo:"",flat:"",dense:"","full-width":"","single-line":"","background-color":"var(--gray150)",autofocus:""},on:{input:e.handleSearch}}),e.isGlobalBlock?t("IconButton",{staticStyle:{"margin-right":"-5px"},attrs:{icon:"GearIcon",small:!0},on:{click:e.toggleSettings}}):e._e()],1),t(Ec.Z,{staticClass:"vscroll-scroll",attrs:{dense:""}},[e._l(e.previews,(function(n,s){return t("PreviewChooserItem",{key:s,attrs:{item:n,selected:n.url===e.currentPreviewedItem?.url},on:{select:e.setPreviewedItem}})})),e.nothingToPreview?t("PreviewChooserNoResults"):0===e.previews.length?t("div",{staticClass:"previewable-items-zero-case align-center text-center"},[t("h4",[e._v(e._s(e.__("No results apply to this template")))])]):e._e()],2)],1)],1)],1)],1):e._e()},nd=[],sd=n(25970),id=n(30902),od=n(45974),ad=n(98851),rd=n(23777);async function ld({id:e,search:t=""}){return(0,ad.D)({action:"breakdance_get_template_previewable_items_with_search",dataToPost:{search:t,id:e},decoder:rd.NC,resultKey:"data"})}var cd=n(39664),dd=function(){var e=this,t=e._self._c;e._self._setupProxy;return"breakdance"===e.builderMode?t("div",{staticClass:"document-chooser-text"},[e.previewItem?[t("h2",[e._v(e._s(e.previewItem.type))]),t("span",{staticClass:"ellipsis-text"},[e.previewItem.label?[e._v(" "+e._s(e.previewItem.label)+" ")]:e.previewItem.id?[e._v(" "+e._s(e.sprintf(e._doc("ID %s","%s: ID number"),e.previewItem.id))+" ")]:[e._v(e._s(e.__("(no title)")))]],2)]:e.nothingToPreview?[t("h2",[e._v(e._s(e.__("Nothing to preview")))]),t("span",{staticClass:"ellipsis-text"},[e._v(" "+e._s(e.__("No match found"))+" ")])]:[t("h2",[e._v(e._s(e.__("Previewing")))]),t("span",{staticClass:"ellipsis-text"},[e._v(" "+e._s(e.__("choose"))+" ")])]],2):"oxygen"===e.builderMode?t("div",{staticClass:"document-chooser-text"},[e.previewItem?[t("span",{staticClass:"document-chooser-type-label"},[e._v(" "+e._s(e.sprintf(e._doc("Preview %s:","%s: Item type"),e.previewItem.type))+" ")]),t("span",{staticClass:"ellipsis-text"},[e._v(" "+e._s(e.previewLabel)+" ")])]:e.nothingToPreview?[t("span",{staticClass:"document-chooser-type-label"},[e._v(" "+e._s(e.__("Nothing to preview"))+" ")])]:[t("span",{staticClass:"document-chooser-type-label"},[e._v(" "+e._s(e.__("Previewing:"))+" ")]),t("span",{staticClass:"ellipsis-text"},[e._v(e._s(e.__("choose")))])]],2):e._e()},ud=[];let pd=class extends l.w3{get builderMode(){return c.configStore.builderMode}get previewLabel(){return this.previewItem?.label||(0,Ft.gB)((0,Ft.TZ)("ID %s","%s: ID number"),this.previewItem?.id||(0,Ft.__)("(no title)"))}};(0,r.gn)([(0,l.fI)()],pd.prototype,"previewItem",void 0),(0,r.gn)([(0,l.fI)()],pd.prototype,"nothingToPreview",void 0),pd=(0,r.gn)([l.wA],pd);const hd=pd,gd=hd;var md=(0,N.Z)(gd,dd,ud,!1,null,"f61717d2",null);const vd=md.exports;var yd=n(75223),fd=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(Jc.Z,{staticClass:"vscroll-scroll vscroll-wrap preview-chooser-settings",attrs:{width:"350"}},[t(yd.EB,{staticClass:"preview-chooser-settings-header"},[t("IconButton",{staticStyle:{"margin-left":"-9px"},attrs:{icon:"ArrowLeftIcon",small:!0,size:14},on:{click:function(t){return e.$emit("back")}}}),t("h4",{staticClass:"preview-chooser-settings__title"},[e._v(" "+e._s(e.__("Settings"))+" ")])],1),t("div",[t(yd.ZB,[t("h6",{staticClass:"preview-chooser-settings__subtitle"},[e._v(" "+e._s(e.__("Preview"))+" ")]),t("div",{staticClass:"my-3"},[t("span",{staticClass:"breakdance-control-wrapper-control-label"},[e._v(" "+e._s(e.__("ACF Flexible Content"))+" ")]),t("DropdownInput",{attrs:{value:e.blockSettings.preview.acfFlexibleField,placeholder:e.__("Select a field to preview"),autocomplete:!0,"dropdown-options":e.dropdownOptions,clearable:!0},on:{input:e.setFlexibleField}})],1),t("div",{staticClass:"my-3"},[t("span",{staticClass:"breakdance-control-wrapper-control-label"},[e._v(" "+e._s(e.__("Row Index"))+" ")]),t("NumberInput",{attrs:{value:e.blockSettings.preview.acfFlexibleFieldRow},on:{input:e.setRowIndex}})],1)])],1)],1)},_d=[],bd=n(36968),Sd=n.n(bd),Cd=n(84336),xd=n(23267),wd=n(23128);let Id=class extends l.w3{constructor(){super(...arguments),this.dropdownOptions={populate:{path:"",text:"",value:"",fetchDataAction:"breakdance_fetch_flexible_content_fields",fetchContextPath:"",refetchPaths:[]}}}get postId(){return Q.Hb.document.documentMeta.id}get blockSettings(){const e=Q.Hb.document.documentMeta.blockSettings;return e||{preview:{acfFlexibleField:"",acfFlexibleFieldRow:void 0}}}async saveSettings(){await(0,Yo.fv)(this.postId,this.blockSettings),Q.PK.flushDynamicDataCache()}setFlexibleField(e){const t=(0,wd.Z)(Q.Hb.document.documentMeta);Sd()(t,"blockSettings.preview.acfFlexibleField",e),Ie.n.ignore((()=>{Q.Hb.setDocumentMeta(t),this.saveSettings()}))}setRowIndex(e){const t=(0,wd.Z)(Q.Hb.document.documentMeta);Sd()(t,"blockSettings.preview.acfFlexibleFieldRow",e),Ie.n.ignore((()=>{Q.Hb.setDocumentMeta(t),this.saveSettings()}))}};Id=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,IconButton:Xa.Z,NumberInput:xd.Z,DropdownInput:Cd.Z}})],Id);const Pd=Id,kd=Pd;var Ed=(0,N.Z)(kd,fd,_d,!1,null,null,null);const Td=Ed.exports;var Dd=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"previewable-items-zero-case previewable-items-zero-case-error"},[t("h4",[e._v(e._s(e.__("Nothing to preview")))]),t("p",[e._v(e._s(e.__("Your template settings don't match any content. You can:")))]),t("ul",[t("li",[e._v(e._s(e.__("Edit the template anyway - this is not an error.")))]),t("li",[e._v(" "+e._s(e.__("Update your template settings in the WP admin at"))+" "),t("b",[e._v(e._s(e.__("Breakdance > Templates > Edit Template")))])]),t("li",[e._v(" "+e._s(e.__("Add some content to your site that matches the template settings."))+" ")])])])},Ad=[];let Zd=class extends l.w3{};Zd=(0,r.gn)([(0,l.wA)({})],Zd);const Od=Zd,Md=Od;var Bd=(0,N.Z)(Md,Dd,Ad,!1,null,"fcc94d60",null);const Ld=Bd.exports;var Nd=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(Tc.Z,{class:{"document-chooser-item-selected":e.selected},attrs:{link:""},on:{click:function(t){return e.$emit("select",e.item)}}},[t(Dc.V9,{staticClass:"previewable-item-list-item"},[t("div",{staticClass:"previewable-item-label previewable-item-label-stop-text-from-overflowing"},[e._v(" "+e._s(e.item.label||e.item.url)+" ")]),t("div",{staticClass:"previewable-item-type"},[e._v(e._s(e.item.type))])])],1)},Fd=[];let Rd=class extends l.w3{};(0,r.gn)([(0,l.fI)()],Rd.prototype,"item",void 0),(0,r.gn)([(0,l.fI)()],Rd.prototype,"selected",void 0),Rd=(0,r.gn)([l.wA],Rd);const Vd=Rd,$d=Vd;var Wd=(0,N.Z)($d,Nd,Fd,!1,null,"02fdc782",null);const Ud=Wd.exports;var zd=n(20918);let Hd=class extends s.ZP{constructor(){super(...arguments),this.open=!1,this.search="",this.isLoading=!1,this.settingsOpen=!1,this.debouncedSearchContentInWp=qa()(this.searchContentInWp,300)}get previews(){return c.configStore.templatePreview&&c.configStore.templatePreview.previewableItems}get currentPreviewedItem(){return c.configStore.previewedItem}get builderMode(){return c.configStore.builderMode}get nothingToPreview(){return(!this.previews||!this.previews.length)&&!this.search&&!this.isLoading}get isGlobalBlock(){return c.documentStore.document.documentMeta.postType===(0,zd.$M)()}async setPreviewedItem(e){this.open=!1,c.uiStore.setLastModifiedElementProperty({elementId:null,path:null}),c.configStore.setPreviewedItem(e),c.configStore.flushDynamicDataCache(),await(0,sd.Kd)(),(0,Hl.Ft)(e)}async handleSearch(e){this.search=e,this.isLoading=!0,this.debouncedSearchContentInWp()}async searchContentInWp(){this.isLoading=!0,(0,id.pipe)(await ld({search:this.search,id:c.documentStore.document.documentMeta.id}),(0,od.fold)((e=>{this.isLoading=!1,e.forEach((e=>cd.Z.log.message(e.msg)))}),(e=>{c.configStore.setTemplatePreview({...c.configStore.templatePreview,previewableItems:e}),this.isLoading=!1})))}toggleSettings(){this.settingsOpen=!this.settingsOpen}};Hd=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,Dropdown:Oc.Z,IconButton:Xa.Z,TopBarSection:Kc,PreviewChooserText:vd,PreviewChooserItem:Ud,PreviewChooserSettings:Td,PreviewChooserNoResults:Ld}})],Hd);const Gd=Hd,Kd=Gd;var jd=(0,N.Z)(Kd,td,nd,!1,null,null,null);const qd=jd.exports;var Xd=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("TopBarSection",{staticClass:"document-chooser-section",attrs:{borderLeft:!0,borderRight:!0}},[t("Dropdown",{attrs:{"offset-y":"","nudge-top":"oxygen"===e.builderMode?"-16px":0,"close-on-content-click":!1,"close-on-click":!e.createOpen},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("div",e._g({staticClass:"document-chooser"},n),[t("div",{staticClass:"document-chooser-text"},["breakdance"===e.builderMode?t("h2",[e._v(" "+e._s(e.sprintf(e._xdoc("Editing %s","Document","%s: Document type label"),e.currentDocument.documentMeta.typeLabel))+" ")]):e._e(),"oxygen"===e.builderMode?t("span",{staticClass:"document-chooser-type-label"},[t("span",[e._v(e._s(e.currentDocument.documentMeta.typeLabel)+":")])]):e._e(),-1!==e.currentDocument.documentMeta.id?t("span",{staticClass:"ellipsis-text"},[e._v(" "+e._s(e.documentTitle)+" ")]):t("span",{staticClass:"ellipsis-text"},[e._v(" "+e._s(e.__("choose a document to edit"))+" ")])]),"breakdance"===e.builderMode?t("div",{staticClass:"document-chooser-dropdown-icon"},[t("Icon",{attrs:{size:"11",icon:"CaretDownIcon"}})],1):e._e()])]}}]),model:{value:e.open,callback:function(t){e.open=t},expression:"open"}},[t(Jc.Z,{staticClass:"vscroll-scroll vscroll-wrap",attrs:{width:"450",height:"350",loading:e.isLoading}},[t("div",{staticClass:"document-chooser-search"},[t("div",{staticClass:"document-chooser-search__input"},[t(ed.Z,{staticClass:"preview-content-chooser-dialog-search-box breakdance-dense-input",attrs:{value:e.search,label:e.__("Search..."),clearable:"",solo:"",flat:"",dense:"","full-width":"","single-line":"","background-color":"var(--gray150)",autofocus:e.open},on:{input:e.handleSearch,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchContentInWp.apply(null,arguments)}}}),"breakdance"===e.builderMode?t("Icon",{staticClass:"document-chooser-search__create",attrs:{size:"13",icon:"PlusIcon"},on:{click:function(t){e.createOpen=!0}}}):e._e(),"oxygen"===e.builderMode&&0===e.search?.length?t("Icon",{staticClass:"document-chooser-search__search-icon",attrs:{size:"12",icon:"SearchIcon"}}):e._e()],1),"oxygen"===e.builderMode?t("IconButton",{staticClass:"breakdance-toolbar-icon-button document-chooser-search__icon-button",attrs:{size:"14",icon:"PlusIcon"},on:{click:function(t){e.createOpen=!0}}}):e._e()],1),t("DocumentChooserFilters",{attrs:{"sort-by":e.sortBy,"post-type":e.postType},on:{"update:sort-by":function(t){e.sortBy=t},"update:post-type":function(t){e.postType=t}}}),t(Ec.Z,{ref:"scrollable",staticClass:"vscroll-scroll",attrs:{dense:""}},[e._l(e.availableDocuments,(function(n){return t("DocumentChooserItem",{key:n.id,attrs:{item:n,highlight:e.postToShowFirstId===n.id},on:{click:function(t){e.open=!1},update:e.updateTitleInPlace}})})),0===e.availableDocuments.length?t("div",{staticClass:"previewable-items-zero-case-search"},[t("svg",{staticClass:"previewable-items-zero-case-icon",attrs:{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"}},[t("path",{attrs:{d:"M46.875 71.875a25 25 0 1 0 50 0 25 25 0 1 0-50 0ZM81.25 62.5 62.5 81.25M62.5 62.5l18.75 18.75","stroke-width":"6.250005"}}),t("path",{attrs:{d:"M34.375 84.375h-25a6.25 6.25 0 0 1-6.25-6.25V9.375a6.25 6.25 0 0 1 6.25-6.25h44.288a6.25 6.25 0 0 1 4.416 1.83L70.046 16.92a6.25 6.25 0 0 1 1.829 4.417v13.037","stroke-width":"6.250005"}})])]),t("h5",[e._v(e._s(e.__("No items found")))]),t("p",[e._v(" "+e._s(e.__("Try adjusting your search to find what you are looking for."))+" ")])]):e._e()],2)],1)],1),t("DocumentChooserCreateDialog",{attrs:{open:e.createOpen},on:{close:function(t){e.createOpen=!1},created:e.afterCreation}})],1)},Yd=[],Qd=n(38537);async function Jd({search:e="",postType:t="",sortBy:n=""}){return(0,ad.D)({action:"breakdance_get_available_documents_with_search",dataToPost:{search:e,postType:t,sortBy:n},decoder:Qd.gu,resultKey:"data"})}var eu=n(38562),tu=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Dialog",{staticClass:"document-chooser-create",attrs:{value:e.open},on:{close:function(t){return e.$emit("close")},"click:outside":function(t){return e.$emit("close")},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("close")}},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.__("Create Post")))]},proxy:!0},{key:"text",fn:function(){return[t("div",{staticClass:"document-chooser-create-fields"},[t("TextInput",{staticClass:"flex-grow-1 flex-shrink-1",attrs:{placeholder:e.__("Post Title"),autofocus:e.autofocus},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.create.apply(null,arguments)}},model:{value:e.postTitle,callback:function(t){e.postTitle=t},expression:"postTitle"}}),t("DropdownInput",{staticClass:"flex-grow-1 flex-shrink-1",attrs:{placeholder:e.__("Post Type"),autocomplete:!0,"dropdown-options":e.dropdownOptions},model:{value:e.postType,callback:function(t){e.postType=t},expression:"postType"}})],1)]},proxy:!0},{key:"actions",fn:function(){return[t(Qo.Z,{attrs:{text:""},on:{click:function(t){return e.$emit("close")}}},[e._v(e._s(e.__("Cancel")))]),t(Qo.Z,{attrs:{color:"blue",dark:"",loading:e.loading},on:{click:e.create}},[e._v(e._s(e.__("Save")))])]},proxy:!0}])})},nu=[],su=n(3735),iu=n(32521),ou=n(48973);let au=class extends l.w3{constructor(){super(...arguments),this.autofocus=!1,this.postTitle="",this.postType="",this.loading=!1,this.dropdownOptions={populate:{path:"",text:"",value:"",fetchDataAction:"breakdance_get_editable_post_types",fetchContextPath:"",refetchPaths:[]}}}onOpenChange(){this.open?(this.postTitle="",this.postType="",setTimeout((()=>{this.autofocus=!0}),100)):this.autofocus=!1}async create(){if(!this.postTitle||!this.postType)return;this.loading=!0;const e=(0,su.zG)(await(0,ad.D)({action:"breakdance_insert_post",friendlyName:"Insert Post",dataToPost:{postTitle:this.postTitle,postType:this.postType},decoder:iu.dt({postId:iu.pk})}),(0,ou.g_)((()=>{}),(e=>e)));this.loading=!1,this.$emit("close"),this.$emit("created",{postId:e?.postId,postTitle:this.postTitle,postType:this.postType}),(0,zd._T)(this.postType)&&(0,Yo.DQ)()}};(0,r.gn)([(0,l.fI)()],au.prototype,"open",void 0),(0,r.gn)([(0,l.RL)("open")],au.prototype,"onOpenChange",null),au=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,Dialog:ta.Z,DropdownInput:Cd.Z}})],au);const ru=au,lu=ru;var cu=(0,N.Z)(lu,tu,nu,!1,null,null,null);const du=cu.exports;var uu=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(Tc.Z,{class:{"document-chooser-item-selected":e.item.id===e.currentDocument.documentMeta.id,"document-chooser-item-highlighted":e.highlight},attrs:{link:"",href:e.documentUrl},on:{click:e.replaceCurrentBuilderPage}},[t(Dc.V9,{staticClass:"previewable-item-list-item"},[t("div",{staticClass:"previewable-item-label previewable-item-label-stop-text-from-overflowing"},[e._v(" "+e._s(e.title)+" ")]),e.isBreakdancePostType?t("span",{staticClass:"previewable-item-action",on:{click:function(t){t.stopPropagation(),t.preventDefault(),e.isGlobalBlockTemplate?e.editGlobalBlock():e.editTemplate()}}},[e._v(" "+e._s(e.loadingData?e.__("Loading..."):e.__("Edit Settings"))+" ")]):e._e(),t("div",{staticClass:"previewable-item-type"},[e._v(e._s(e.item.typeLabel))])]),e.modalData&&e.isGlobalBlockTemplate?t("EditGlobalBlockModal",{attrs:{value:e.modalData.data,mode:e.modalData.type,globalBlocks:[]},on:{input:function(t){return e.$emit("update",t)},close:function(t){e.modalData=!1}}}):e.modalData?t("EditTemplateModal",{attrs:{value:e.modalData.data,templatesManagementData:e.templatesManagementData,postType:e.item.postType,templateParents:e.templateParentsWithoutTrashed,templates:e.templatesByStatus,mode:e.modalData.type,skipWarning:!0,canDisable:!0},on:{input:function(t){return e.$emit("update",t)},close:function(t){e.modalData=!1}}}):e._e()],1)},pu=[],hu=n(19930),gu=n(67132),mu=n(90703);let vu=class extends l.w3{constructor(){super(...arguments),this.templates=[],this.modalData=!1,this.loadingData=!1,this.templatesManagementData={conditions:[],dynamicFields:[],templateTypeCategories:[],popupTriggers:null}}get globalBlocks(){return c.configStore.globalBlocks}get title(){return this.item.titleLabel?(0,Yl.aV)(this.item.titleLabel):`ID: ${this.item.id}`}get currentDocument(){return c.documentStore.document}get templateParentsWithoutTrashed(){return[]}get templatesByStatus(){return[]}get documentUrl(){return(0,Hl.UH)(this.item.id)}get isBreakdancePostType(){return this.item.postType.startsWith(`${c.configStore.builderMode}_`)&&!this.item.postType.endsWith(`${c.configStore.builderMode}_part`)}get currentTemplate(){return this.templates.find((e=>e.id===this.item.id))}get currentGlobalBlock(){return this.globalBlocks.find((e=>e.id===this.item.id))}get isGlobalBlockTemplate(){return this.item.postType===(0,zd.$M)()}async editGlobalBlock(){this.loadingData=!0,await this.loadGlobalBlocks(),this.currentGlobalBlock?(this.modalData={type:"edit",data:this.currentGlobalBlock},this.loadingData=!1):cd.Z.log.message((0,Ft.__)("Couldn't load Global Blocks data"))}async editTemplate(){this.loadingData=!0,await this.loadTemplates(),this.currentTemplate?(this.modalData={type:"edit",data:this.currentTemplate},this.loadingData=!1):cd.Z.log.message((0,Ft.__)("Couldn't load templates data"))}async loadGlobalBlocks(){return(0,Yo.DQ)()}async loadTemplates(){const e=this.item.postType;(0,su.zG)(await(0,gu.rf)(e),(0,ou.g_)((()=>{cd.Z.log.message((0,Ft.__)("Couldn't load templates data"))}),(e=>{this.templates=e.templates,this.templatesManagementData=e.templatesManagementData,c.configStore.setDynamicFields(e.templatesManagementData.dynamicFields),c.configStore.setConditions(e.templatesManagementData.conditions),c.configStore.setEnvironment(e.environment)})))}async replaceCurrentBuilderPage(e){e.ctrlKey||e.metaKey||"builder"===window.Breakdance.initialMode&&(e.preventDefault(),this.$emit("click"),this.item.id!==c.documentStore.document.documentMeta.id&&(0,Hl.rI)(this.item.id))}};(0,r.gn)([(0,l.fI)()],vu.prototype,"item",void 0),(0,r.gn)([(0,l.fI)({default:!1})],vu.prototype,"highlight",void 0),vu=(0,r.gn)([(0,l.wA)({components:{EditGlobalBlockModal:mu.Z,EditTemplateModal:hu.Z,Icon:He.Z}})],vu);const yu=vu,fu=yu;var _u=(0,N.Z)(fu,uu,pu,!1,null,"3795f131",null);const bu=_u.exports;var Su=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"document-chooser-filters",class:{"document-chooser-filters--with-sort":e.sortBy}},[t("DropdownInput",{attrs:{"dropdown-options":e.postTypeOptions,size:"small",placeholder:e.__("Post Type"),value:e.postType,clearable:!0},on:{input:function(t){return e.$emit("update:post-type",t)}}}),t("DropdownInput",{attrs:{items:e.sortItems,size:"small",placeholder:e.__("Sort By"),value:e.sortBy,clearable:!0},on:{input:function(t){return e.$emit("update:sort-by",t)}}})],1)},Cu=[];let xu=class extends l.w3{constructor(){super(...arguments),this.sortItems=[{text:(0,Ft.__)("Last edited: Newest first"),value:"modified_desc"},{text:(0,Ft.__)("Last edited: Oldest first"),value:"modified_asc"},{text:(0,Ft.__)("Created: Newest first"),value:"created_desc"},{text:(0,Ft.__)("Created: Oldest first"),value:"created_asc"}],this.postTypeOptions={populate:{path:"",text:"",value:"",fetchDataAction:"breakdance_get_editable_post_types",fetchContextPath:"",refetchPaths:[]}}}};(0,r.gn)([(0,l.fI)()],xu.prototype,"sortBy",void 0),(0,r.gn)([(0,l.fI)()],xu.prototype,"postType",void 0),xu=(0,r.gn)([(0,l.wA)({components:{DropdownInput:Cd.Z}})],xu);const wu=xu,Iu=wu;var Pu=(0,N.Z)(Iu,Su,Cu,!1,null,null,null);const ku=Pu.exports;let Eu=class extends s.ZP{constructor(){super(...arguments),this.search="",this.open=!1,this.createOpen=!1,this.isLoading=!1,this.postToShowFirstId=null,this.sortBy="",this.postType="",this.debouncedSearchContentInWp=qa()(this.searchContentInWp,200)}onOpenChange(){this.postToShowFirstId=null}onSortChange(){this.searchContentInWp()}onPostTypeChange(){this.searchContentInWp()}get documentTitle(){return this.currentDocument.documentMeta.titleLabel?(0,Yl.aV)(this.currentDocument.documentMeta.titleLabel):`ID: ${this.currentDocument.documentMeta.id}`}get unsavedChangesPresent(){return c.uiStore.unsavedChangesPresent}get availableDocuments(){const e=[...c.configStore.availableDocuments];return null===this.postToShowFirstId?e:e.sort(((e,t)=>e.id===this.postToShowFirstId?-1:t.id===this.postToShowFirstId?1:0))}get builderMode(){return c.configStore.builderMode}get currentDocument(){return c.documentStore.document}handleSearch(e){this.postToShowFirstId=null,this.search=e,this.debouncedSearchContentInWp()}async searchContentInWp(){this.isLoading=!0,(0,id.pipe)(await Jd({search:this.search||"",postType:this.postType,sortBy:this.sortBy}),(0,od.fold)((e=>{this.isLoading=!1,e.forEach((e=>cd.Z.log.message(e.msg)))}),(e=>{c.configStore.setAvailableDocuments(e),this.isLoading=!1}))),this.scrollToTop()}afterCreation(e){this.search="",this.postToShowFirstId=e.postId,this.postType&&this.postType!==e.postType?this.postType="":this.searchContentInWp()}scrollToTop(){const e=this.$refs.scrollable;this.$nextTick((()=>{e.$el.scrollTop=0}))}updateTitleInPlace(e){const t=this.availableDocuments.findIndex((t=>t.id===e.id)),n=this.availableDocuments[t];if(-1===t)return;const s=(0,wd.Z)(this.availableDocuments);s[t]={...n,titleLabel:e.title||e.label||""},c.configStore.setAvailableDocuments(s)}};(0,r.gn)([(0,l.RL)("open")],Eu.prototype,"onOpenChange",null),(0,r.gn)([(0,l.RL)("sortBy")],Eu.prototype,"onSortChange",null),(0,r.gn)([(0,l.RL)("postType")],Eu.prototype,"onPostTypeChange",null),Eu=(0,r.gn)([(0,l.wA)({components:{DocumentChooserFilters:ku,NiceButton:Br.Z,DropdownInput:Cd.Z,TextInput:na.Z,Dialog:ta.Z,Icon:He.Z,Dropdown:Oc.Z,SearchInput:eu.Z,TopBarSection:Kc,DocumentChooserItem:bu,DocumentChooserCreateDialog:du,IconButton:Xa.Z}})],Eu);const Tu=Eu,Du=Tu;var Au=(0,N.Z)(Du,Xd,Yd,!1,null,null,null);const Zu=Au.exports;var Ou=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Dropdown",{staticClass:"open-settings-toolbar-button",attrs:{"offset-y":"","nudge-top":e.nudgeTop},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("IconButton",e._g({attrs:{active:e.anySettingsPanelsOpen,testId:"open-settings-menu",size:"breakdance"===e.builderMode?18:16,icon:"breakdance"===e.builderMode?"EllipsisStrokeIcon":"EllipsisSolidIcon",tooltip:e.isOpen?"":e.__("Settings")}},n))]}}]),model:{value:e.isOpen,callback:function(t){e.isOpen=t},expression:"isOpen"}},[t(Ec.Z,[e.globalSettingsAvailableForEditing?t(Tc.Z,{attrs:{dense:""},on:{click:e.openGlobalSettingsPanel}},[t(Dc.V9,{attrs:{"data-test-id":"toggle-global-settings"}},[e._v(" "+e._s(e.__("Global Settings"))+" ")])],1):e._e(),"breakdance"==e.builderMode?t(Tc.Z,{attrs:{dense:""},on:{click:e.openSelectorsPanel}},[t(Dc.V9,{attrs:{"data-test-id":"toggle-site-classes-selectors"}},[e._v(" "+e._s(e.__("Selectors"))+" ")])],1):e._e(),"breakdance"==e.builderMode?t(Tc.Z,{attrs:{dense:""},on:{click:e.openPresetsPanel}},[t(Dc.V9,{attrs:{"data-test-id":"toggle-site-presets"}},[e._v(" "+e._s(e.__("Design Presets"))+" ")])],1):e._e(),t(Tc.Z,{attrs:{dense:""},on:{click:e.openHistoryAndRevisionsPanel}},[t(Dc.V9,[e._v(e._s(e.__("History")))])],1),"breakdance"==e.builderMode?t(Tc.Z,{staticClass:"breakdance-menu-open-preferences",attrs:{dense:""},on:{click:e.openPreferencesModal}},[t(Dc.V9,{attrs:{"data-test-id":"breakdance-menu-open-preferences"}},[e._v(" "+e._s(e.__("Preferences"))+" ")])],1):e._e(),t(Tc.Z,{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}],attrs:{"data-test-id":"toggle-element-studio",dense:"",disabled:"success"!==e.elementsLoadingState},on:{click:e.toggleElementStudio}},[t(Dc.V9,{attrs:{"data-test-id":"breakdance-menu-open-element-studio"}},[t("div",{staticClass:"d-flex align-center"},[e._v(e._s(e.__("Element Studio")))])])],1),e.aiSiteCreationExperienceAvailable?t(Tc.Z,{directives:[{name:"permission",rawName:"v-permission",value:"full",expression:"'full'"}],attrs:{dense:""},on:{click:e.toggleAiSiteCreationExperience}},[t(Dc.V9,[t("div",{staticClass:"d-flex align-center"},[e._v(e._s(e.__("AI Site Creation Experience")))])])],1):e._e()],1)],1)},Mu=[],Bu=n(95690);let Lu=class extends s.ZP{constructor(){super(...arguments),this.isOpen=!1}get builderMode(){return c.configStore.builderMode}get nudgeTop(){return"oxygen"===this.builderMode?-16:0}openPreferencesModal(){c.uiStore.setPreferencesModalOpen(!0)}toggleElementStudio(){c.uiStore.toggleElementStudio()}openGlobalSettingsPanel(){(0,Bu.oM)("globalSettings")}openSelectorsPanel(){c.uiStore.setActiveSelectorName(null),(0,Bu.oM)("selectors")}openPresetsPanel(){c.uiStore.setActivePresetId(null),(0,Bu.oM)("presets")}get elementsLoadingState(){return c.configStore.elementsLoadingState}get anySettingsPanelsOpen(){return(0,Bu.O_)("selectors")||(0,Bu.O_)("history")||(0,Bu.O_)("globalSettings")||c.uiStore.panelState.elementStudioOpen||c.uiStore.panelState.preferencesModalOpen}openHistoryAndRevisionsPanel(){(0,Bu.oM)("history")}get globalSettingsAvailableForEditing(){return c.configStore.globalSettingsControlsAndTemplate.controls.length>0}toggleAiSiteCreationExperience(){(0,Aa.V6)()}get aiSiteCreationExperienceAvailable(){return!!window.Breakdance?.singularity}};Lu=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,StandardButton:Fl,Dropdown:Oc.Z,IconButton:Xa.Z}})],Lu);const Nu=Lu,Fu=Nu;var Ru=(0,N.Z)(Fu,Ou,Mu,!1,null,null,null);const Vu=Ru.exports;var $u=n(59760),Wu=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.backToAdmin||e.backToFrontend?t("TopBarSection",{attrs:{borderLeft:!0}},[t("Dropdown",{attrs:{"offset-y":"","nudge-top":e.nudgeTop,"nudge-left":e.nudgeLeft},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("IconButton",e._g({attrs:{icon:"oxygen"===e.builderMode?"XmarkSolidIcon":"XmarkIcon",size:"oxygen"===e.builderMode?14:18,tooltip:e.isOpen?"":e.__("Exit")}},n))]}}],null,!1,773573831),model:{value:e.isOpen,callback:function(t){e.isOpen=t},expression:"isOpen"}},[t(Ec.Z,[e.backToFrontend?t(Tc.Z,{attrs:{dense:"",href:e.backToFrontend}},[t("div",{staticClass:"breakdance-menu-icon-wrapper"},[t("Icon",{attrs:{icon:"BrowserIcon"}})],1),t(Dc.km,{staticClass:"ml-4"},[t(Dc.V9,[e._v(e._s(e.__("Exit to Frontend")))])],1)],1):e._e(),t(Tc.Z,{attrs:{dense:"",href:e.backToAdmin}},[t("div",{staticClass:"breakdance-menu-icon-wrapper"},[t("Icon",{attrs:{icon:"WordPressIcon"}})],1),t(Dc.km,{staticClass:"ml-4"},[t(Dc.V9,[e._v(e._s(e.__("Exit to WordPress")))])],1)],1),t(Tc.Z,{attrs:{dense:""},on:{click:e.copyFrontEndLinkToClipboard}},[t("div",{staticClass:"breakdance-menu-icon-wrapper"},[t("Icon",{attrs:{icon:"CopyIcon"}})],1),t(Dc.km,{staticClass:"ml-4"},[t(Dc.V9,[e._v(e._s(e.__("Copy URL")))])],1)],1)],1)],1)],1):e._e()},Uu=[],zu=n(85902),Hu=n(66485),Gu=n.n(Hu);let Ku=class extends s.ZP{constructor(){super(...arguments),this.isOpen=!1}get backToAdmin(){return Q.PK.documentSpecificNeededUrls?Q.PK.documentSpecificNeededUrls.backToWordPressUrl:""}get backToFrontend(){return(0,zu.j)()}get builderMode(){return Q.PK.builderMode}get nudgeTop(){return"oxygen"===this.builderMode?-16:0}get nudgeLeft(){return"oxygen"===this.builderMode?7:0}copyFrontEndLinkToClipboard(){this.backToFrontend&&Gu()(this.backToFrontend)}};Ku=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,Dropdown:Oc.Z,IconButton:Xa.Z,TopBarSection:Kc}})],Ku);const ju=Ku,qu=ju;var Xu=(0,N.Z)(qu,Wu,Uu,!1,null,null,null);const Yu=Xu.exports;var Qu=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("TopBarSection",{attrs:{borderRight:!0}},["breakdance"===e.builderMode?t("StandardButton",{staticClass:"open-elements-toolbar-button",attrs:{active:e.isAddSectionOpen,size:"22",minWidth:"80",testId:"open-elements-toolbar-button"},on:{click:e.toggleAdd}},[e._v(" "+e._s(e.__("Add"))+" ")]):e._e(),"oxygen"===e.builderMode?t("IconButton",{attrs:{active:e.isAddSectionOpen,icon:"PlusIconSolid",size:"14",tooltip:e.__("Add Element")},on:{click:e.toggleAdd}}):e._e()],1)},Ju=[];let ep=class extends s.ZP{mounted(){c.uiStore.hasFullAccess&&Ke.uq.register(je.r.CMD_A,this.toggleAdd)}toggleAdd(){(0,Bu._y)("add")}get isAddSectionOpen(){return(0,Bu.O_)("add")}beforeDestroy(){Ke.uq.unbind(je.r.CMD_A)}get builderMode(){return c.configStore.builderMode}};ep=(0,r.gn)([(0,l.wA)({components:{StandardButton:Fl,TopBarSection:Kc,IconButton:Xa.Z}})],ep);const tp=ep,np=tp;var sp=(0,N.Z)(np,Qu,Ju,!1,null,null,null);const ip=sp.exports;var op=n(78549),ap=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(op.Z,{staticClass:"pa-0 breakdance-topbar d-flex flex-row",attrs:{short:"",color:"var(--white)",height:"auto",width:"100%",flat:""}},[e._t("default")],2)},rp=[];let lp=class extends s.ZP{};lp=(0,r.gn)([l.wA],lp);const cp=lp,dp=cp;var up=(0,N.Z)(dp,ap,rp,!1,null,null,null);const pp=up.exports;var hp=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",["breakdance"===e.builderMode?t("NiceButton",{attrs:{"right-icon":"StarsIcon",size:"18",color:"flat"},on:{click:e.toggleDialog}},[e._v(e._s(e.__("Try Breakdance Pro")))]):e._e(),"oxygen"===e.builderMode?t("button",{staticClass:"button-upgrade-oxygen-pro",on:{click:e.toggleDialog}},[t("span",{staticClass:"shining-text"},[e._v(e._s(e.__("Try Oxygen Pro")))])]):e._e(),t(Ha.Z,{attrs:{"max-width":"1120"},model:{value:e.dialogOpen,callback:function(t){e.dialogOpen=t},expression:"dialogOpen"}},[t("div",{staticClass:"upgrade-to-pro-modal-content"},[t("iframe",{attrs:{src:e.$bdox("website_link_upgrade_to_pro_iframe")}})])])],1)},gp=[];let mp=class extends s.ZP{constructor(){super(...arguments),this.dialogOpen=!1}toggleDialog(){this.dialogOpen=!this.dialogOpen,(0,Tt.K)("Upgrade To Pro Modal Toggled",{open:this.dialogOpen})}get builderMode(){return c.configStore.builderMode}};mp=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,NiceButton:Br.Z}})],mp);const vp=mp,yp=vp;var fp=(0,N.Z)(yp,hp,gp,!1,null,null,null);const _p=fp.exports;var bp=n(84192),Sp=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Dropdown",{attrs:{"offset-y":"","nudge-top":"-16px","nudge-left":"7","max-width":300},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("IconButton",e._g({staticClass:"open-main-dropdown-toolbar-button",attrs:{icon:"OxygenLogoIcon",size:"14",tooltip:e.isOpen?"":e.__("Menu")}},n))]}}]),model:{value:e.isOpen,callback:function(t){e.isOpen=t},expression:"isOpen"}},[t(Ec.Z,[t(Tc.Z,{attrs:{dense:"",href:e.backToDashboard}},[t("div",{staticClass:"breakdance-menu-icon-wrapper"},[t("Icon",{attrs:{icon:"WordPressIcon",size:"12"}})],1),t(Dc.km,{staticClass:"ml-2"},[t(Dc.V9,[e._v(e._s(e.__("Dashboard")))])],1)],1),t(Tc.Z,{attrs:{dense:""},on:{click:e.openPreferencesModal}},[t("div",{staticClass:"breakdance-menu-icon-wrapper"},[t("Icon",{attrs:{icon:"SlidersSolidIcon",size:"12"}})],1),t(Dc.km,{staticClass:"ml-2"},[t(Dc.V9,[e._v(e._s(e.__("Preferences")))])],1)],1),t(Tc.Z,{attrs:{dense:"",href:e.settingsUrl}},[t("div",{staticClass:"breakdance-menu-icon-wrapper"},[t("Icon",{attrs:{icon:"OxygenLogoIcon",size:"12"}})],1),t(Dc.km,{staticClass:"ml-2"},[t(Dc.V9,[e._v(e._s(e.__("Plugin Settings")))])],1)],1),t(bp.Z),t(Tc.Z,{attrs:{dense:"",href:"https://oxygenbuilder.com/learn",target:"_blank"}},[t("div",{staticClass:"breakdance-menu-icon-wrapper"},[t("Icon",{attrs:{icon:"VideoSolidIcon",size:"12"}})],1),t(Dc.km,{staticClass:"ml-2"},[t(Dc.V9,[e._v(e._s(e.__("Tutorials")))])],1)],1),t(Tc.Z,{attrs:{dense:"",href:"https://oxygenbuilder.com/documentation",target:"_blank"}},[t("div",{staticClass:"breakdance-menu-icon-wrapper"},[t("Icon",{attrs:{icon:"AlignLeftIcon",size:"12"}})],1),t(Dc.km,{staticClass:"ml-2"},[t(Dc.V9,[e._v(e._s(e.__("Documentation")))])],1)],1)],1)],1)},Cp=[];let xp=class extends s.ZP{constructor(){super(...arguments),this.isOpen=!1}get backToDashboard(){return Q.PK.neededData?.adminUrl}get settingsUrl(){return Q.PK.neededData?.breakdanceSettingsUrl}openDesignLibrary(){Q.kD.setDesignLibraryModalState(!0)}openPreferencesModal(){Q.kD.setPreferencesModalOpen(!0)}};xp=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,Dropdown:Oc.Z,IconButton:Xa.Z}})],xp);const wp=xp,Ip=wp;var Pp=(0,N.Z)(Ip,Sp,Cp,!1,null,null,null);const kp=Pp.exports;var Ep=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.isGlobalBlock?t("Dropdown",{attrs:{"offset-y":"","nudge-top":-3,"max-width":300,"close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[e.isOxygen?t("button",e._g({staticClass:"oxygen-button-primary"},n),[t("Icon",{attrs:{icon:"ExpandExpandIcon",size:"14"}}),e.preview.width&&e.preview.height?t("span",{staticClass:"d-flex flex-row align-center"},[t("span",[e._v(e._s(e.preview.width))]),t("Icon",{attrs:{icon:"XmarkSolidIcon",size:"10"}}),t("span",[e._v(e._s(e.preview.height))])],1):e._e()],1):t("NiceButton",e._g({staticClass:"preview-size-button",attrs:{size:"small"}},n),[e.preview.width&&e.preview.height?[e._v(" "+e._s(e.preview.width)+"x"+e._s(e.preview.height)+" ")]:[e._v(e._s(e.__("Preview Size")))]],2)]}}],null,!1,1394520429)},[t("div",{staticClass:"preview-size-content"},[t("h4",{staticClass:"preview-size__title mb-2"},[e._v(" "+e._s(e.__("Constrain Preview Size"))+" ")]),t("div",{staticClass:"breakdance-control-wrapper"},[t("div",{staticClass:"breakdance-control-wrapper-label-and-stuff"},[t("span",{staticClass:"breakdance-control-wrapper-control-label"},[e._v(" "+e._s(e.__("Dimensions"))+" ")])]),t("div",{staticClass:"breakdance-control-wrapper-input-wrapper preview-size-inputs"},[t("UnitInput",{attrs:{type:"text",placeholder:e.__("Width"),value:{number:e.preview.width},options:{types:["px"],defaultType:"px"}},on:{input:e.changeWidth}}),t("Icon",{attrs:{icon:"CloseIcon"}}),t("UnitInput",{attrs:{type:"text",placeholder:e.__("Height"),value:{number:e.preview.height},options:{types:["px"],defaultType:"px"}},on:{input:e.changeHeight}})],1)]),t("div",{staticClass:"breakdance-control-wrapper breakdance-control-wrapper-inline"},[t("div",{staticClass:"breakdance-control-wrapper-label-and-stuff"},[t("span",{staticClass:"breakdance-control-wrapper-control-label"},[e._v(" "+e._s(e.__("Background Color"))+" ")])]),t("div",{staticClass:"breakdance-control-wrapper-input-wrapper"},[t("ColorInput",{attrs:{value:e.preview.backgroundColor},on:{input:e.changeBackgroundColor}})],1)]),t("div",{staticClass:"breakdance-control-wrapper breakdance-control-wrapper-inline"},[t("div",{staticClass:"breakdance-control-wrapper-label-and-stuff"},[t("span",{staticClass:"breakdance-control-wrapper-control-label"},[e._v(" "+e._s(e.__("Vertically Center"))+" ")])]),t("div",{staticClass:"breakdance-control-wrapper-input-wrapper"},[t("ToggleInput",{attrs:{value:e.preview.isCentered},on:{input:e.changeIsCentered}})],1)])])]):e._e()},Tp=[],Dp=n(56823),Ap=n(71821),Zp=n(72252);let Op=class extends s.ZP{get isGlobalBlock(){return(0,zd._T)(c.documentStore.document.documentMeta.postType)}get postId(){return c.documentStore.document.documentMeta.id}get blockSettings(){const e=c.documentStore.document.documentMeta.blockSettings;return e||{preview:this.getEmptyPreview()}}get preview(){return this.blockSettings.preview}get isOxygen(){return"oxygen"===c.configStore.builderMode}getEmptyPreview(){return{width:void 0,height:void 0,backgroundColor:"",isCentered:!1}}changeWidth(e){this.updateProp("width",e?.number)}changeHeight(e){this.updateProp("height",e?.number)}changeBackgroundColor(e){this.updateProp("backgroundColor",e)}changeIsCentered(e){this.updateProp("isCentered",e)}updateProp(e,t){const n=(0,wd.Z)(c.documentStore.document.documentMeta);if(Sd()(n,`blockSettings.preview.${e}`,t),!1!==n.blockSettings){const e=Object.values(n.blockSettings.preview).every((e=>void 0===e));e&&Sd()(n,"blockSettings.preview",this.getEmptyPreview())}Ie.n.ignore((async()=>{c.documentStore.setDocumentMeta(n),await(0,Yo.fv)(this.postId,this.blockSettings)}))}};Op=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,ToggleInput:Zp.Z,ColorInput:Ap.Z,UnitInput:Dp.Z,NumberInput:xd.Z,NiceButton:Br.Z,TextInput:na.Z,Dropdown:Oc.Z}})],Op);const Mp=Op,Bp=Mp;var Lp=(0,N.Z)(Bp,Ep,Tp,!1,null,null,null);const Np=Lp.exports;var Fp=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("TopBarSection",{attrs:{borderLeft:!0,borderRight:!0}},[t("div",{staticClass:"inline-editor-topbar-indicator",on:{click:e.closeEditor}},[t("Icon",{staticClass:"inline-editor-topbar-indicator__icon",attrs:{icon:"ArrowLeftIcon"}}),t("span",{staticClass:"inline-editor-topbar-indicator__title truncate"},[e._v(" "+e._s(e.block?.label)+" ")]),t("Icon",{staticClass:"inline-editor-topbar-indicator__icon",attrs:{icon:"GlobeIcon"}})],1)])},Rp=[];let Vp=class extends l.w3{get block(){return c.configStore.globalBlocks.find((e=>c.uiStore.inlineEditingContext?.blockId===e.id))}closeEditor(){(0,il.Uw)()}};Vp=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,TopBarSection:Kc}})],Vp);const $p=Vp,Wp=$p;var Up=(0,N.Z)(Wp,Fp,Rp,!1,null,null,null);const zp=Up.exports;let Hp=class extends s.ZP{get shouldShowUpgradeToProButton(){return"free"===c.configStore.subscriptionMode}get isPreviewMode(){return c.uiStore.isPreviewMode}togglePreviewMode(){c.uiStore.togglePreviewMode()}toggleElementProperties(){(0,Bu._y)("elementproperties")}get isElementPropertiesOpen(){return(0,Bu.O_)("elementproperties")}get isOxySelectorsPanelOpen(){return(0,Bu.O_)("oxySelectors")}get isVariablesPanelOpen(){return(0,Bu.O_)("variables")}toggleStructurePanel(){(0,Bu._y)("structure")}toggleOxySelectorsPanel(){(0,Bu._y)("oxySelectors")}toggleVariablesPanel(){(0,Bu._y)("variables")}get isStructurePanelOpen(){return(0,Bu.O_)("structure")}get isAiEnabled(){return c.configStore.ai?.enabled}get isAiPanelOpen(){return(0,Bu.O_)("ai")}toggleAiPanel(){(0,Bu._y)("ai")}get activeElementId(){return c.uiStore.activeElementId}get isInlineEditing(){return c.uiStore.isInlineEditing}get currentBreakpoint(){return c.uiStore.currentBreakpoint}set currentBreakpoint(e){c.uiStore.changeBreakpoint(e)}mounted(){Ke.uq.register(je.r.CMD_SHIFT_S,(()=>(0,$u.b0)("SCALED_TO_FIT"!==c.uiStore.settings.scaleToFit)))}beforeDestroy(){Ke.uq.unbind(je.r.CMD_SHIFT_S)}get builderMode(){return c.configStore.builderMode}};Hp=(0,r.gn)([(0,l.wA)({components:{InlineEditorTopbarIndicator:zp,PreviewSize:Np,TopBar:pp,Exit:Yu,AddButton:ip,TopBarSection:Kc,SettingsDropdown:Vu,BreakpointsSelection:Fc,Save:kc,UndoRedo:Qc,PreviewContentChooserDialog:qd,DocumentChooser:Zu,IconButton:Xa.Z,UpgradeToPro:_p,OxygenMenuDropdown:kp}})],Hp);const Gp=Hp,Kp=Gp;var jp=(0,N.Z)(Kp,yc,fc,!1,null,null,null);const qp=jp.exports;var Xp=n(56275),Yp=n(53333),Qp=n(77671),Jp=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t(Ha.Z,{attrs:{"content-class":"preferences-modal-dialog",value:e.open,"max-width":"780",persistent:""},on:{input:function(t){return e.$emit("update:dialog",!1)},"click:outside":e.handleClickOutside}},[t(Jc.Z,{staticClass:"d-flex flex-column",attrs:{height:"100%"}},[!0===e.saveInProgress?[t("div",{staticClass:"flex-grow-1 d-flex justify-center align-center mt-auto mb-auto"},[t(Xp.Z,{attrs:{size:100,indeterminate:"",color:"var(--gray300)"}})],1)]:[t("div",{staticClass:"flex-grow-1 d-flex flex-row",staticStyle:{overflow:"auto"}},[t("div",{staticClass:"preferences-tab-area"},[t("h2",{staticClass:"preferences-modal-title-text"},[e._v(e._s(e.__("Preferences")))]),t(Qp.Z,{staticClass:"breakdance-tabs",attrs:{vertical:""},on:{change:e.handleChangeTab},model:{value:e.tab,callback:function(t){e.tab=t},expression:"tab"}},[t(Yp.Z,{staticClass:"breakdance-tabs__tab"},[t("Icon",{staticClass:"ml-1 mr-3",attrs:{icon:"SlidersIcon",size:"16"}}),e._v(" "+e._s(e.__("UI Settings"))+" ")],1),t(Yp.Z,{staticClass:"breakdance-tabs__tab"},[t("Icon",{staticClass:"ml-1 mr-3",attrs:{icon:"FontIcon",size:"16"}}),e._v(" "+e._s(e.__("Custom Fonts"))+" ")],1),t(Yp.Z,{staticClass:"breakdance-tabs__tab"},[t("Icon",{staticClass:"ml-1 mr-3",attrs:{size:"16",icon:"BreakpointsIcon"}}),e._v(" "+e._s(e.__("Breakpoints"))+" ")],1)],1)],1),t("button",{staticClass:"preferences-close-button",on:{click:e.handleClickOutside}},[t("Icon",{attrs:{size:"20",icon:"CloseIcon"}})],1),t("div",{staticClass:"flex-grow-1 preferences-content-area"},[e.currentTab===e.fontFamiliesTab?t("CustomFontFamilies",{ref:"customFontFamiliesPanel",attrs:{value:e.customFontFamilies},on:{input:e.updateCustomFontFamilies}}):e._e(),e.currentTab===e.customBreakpointsTab?t("CustomBreakpointsPanel",{ref:"customBreakpointsPanel",attrs:{value:e.customBreakpoints},on:{input:e.updateBreakpoints}}):e._e(),e.currentTab===e.uiSettingsTab?t("CustomUiSettings"):e._e()],1)])]],2)],1)],1)},eh=[],th=n(51168),nh=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("PreferencesPanel",{attrs:{save:{text:e.__("Save Breakpoints"),function:e.applyChanges,inProgress:!1,disabled:!e.unsavedChangesPresent}},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.__("Breakpoints")))]},proxy:!0},{key:"content",fn:function(){return[t("EditBreakpoints",{attrs:{value:e.internalValue},on:{input:e.breakpointsEdited}})]},proxy:!0}])})},sh=[],ih=n(18446),oh=n.n(ih),ah=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[e._l(e.value,(function(n){return t("EditBreakpoint",{key:n.id,attrs:{value:n,isEditing:n.id===e.editingBreakpointId},on:{input:e.updateOrAddBreakpoint,delete:function(t){return e.deleteBreakpoint(n.id)},edit:e.edit}})})),!e.showAddForm&&e.value.length>0?t(Qo.Z,{attrs:{outlined:""},on:{click:e.openAddBreakpointForm}},[e._v(" "+e._s(e.__("Add Breakpoint"))+" ")]):e._e(),t("div",[e.showAddForm?[t("div",{staticClass:"add-breakpoint-form-content-wrapper"},[t("div",{staticClass:"add-breakpoint-heading-box"},[t("h4",{staticClass:"add-breakpoint-heading"},[e._v(e._s(e.__("Add New Breakpoint")))]),t("IconButton",{staticClass:"add-breakpoint-close-button",attrs:{icon:"CloseIcon",size:"18"},on:{click:e.toggleAddBreakpointForm}})],1),t("TextInput",{attrs:{placeholder:e.__("Breakpoint name, ie. iPhone X or tablet"),size:"md","validation-function-name":"validateNoQuotes"},model:{value:e.newBreakpointLabel,callback:function(t){e.newBreakpointLabel=t},expression:"newBreakpointLabel"}}),t(Qo.Z,{attrs:{disabled:!e.newBreakpointLabel,text:""},on:{click:e.addBreakpoint}},[t("Icon",{staticClass:"mr-2",attrs:{icon:"PlusIcon"}}),e._v(" "+e._s(e.__("Add"))+" ")],1)],1)]:e._e(),e.showAddForm||0!=e.value.length?e._e():t("EmptyStatePreferences",[t("p",[e._v(e._s(e.__("Add your first breakpoint by clicking the button below.")))]),t(Qo.Z,{attrs:{outlined:""},on:{click:e.openAddBreakpointForm}},[e._v(" "+e._s(e.__("Add Breakpoint"))+" ")])],1)],2)],2)},rh=[],lh=n(82202),ch=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("div",{ref:"form",staticClass:"mx-n2 pa-2 py-3 breakpoint-edit"},[t("h3",{staticClass:"font-weight-medium breakpoint-title text-capitalize mb-2"},[e._v(" "+e._s(e.value.label)+" ")]),t("div",{staticClass:"d-flex align-center justify-space-between"},[t("div",{staticClass:"media-query-box"},[e.isEditing?t("div",{staticClass:"media-query-box-items"},[t("div",{staticClass:"media-query-input-wrapper"},[t("div",{staticClass:"d-flex flex-column"},[t("label",{staticClass:"breakdance-text-input__label"},[e._v(e._s(e.__("Maximum width (px)")))]),t("NumberInput",{model:{value:e.internalValue.maxWidth,callback:function(t){e.$set(e.internalValue,"maxWidth",t)},expression:"internalValue.maxWidth"}})],1)]),t("div",{staticClass:"media-query-input-wrapper"},[t("div",{staticClass:"d-flex flex-column"},[t("label",{staticClass:"breakdance-text-input__label"},[e._v(e._s(e.__("Minimum width (px)")))]),t("NumberInput",{model:{value:e.internalValue.minWidth,callback:function(t){e.$set(e.internalValue,"minWidth",t)},expression:"internalValue.minWidth"}})],1)]),t("div",{staticClass:"media-query-input-wrapper"},[t("div",{staticClass:"d-flex flex-column"},[t("label",{staticClass:"media-query-box-label"},[e._v(e._s(e.__("Default Preview Width")))]),t("DropdownInput",{staticClass:"breakdance-dense-select breakdance-dense-select--md",attrs:{label:e.__("Default Preview Width"),value:"100%"===e.internalValue.defaultPreviewWidth?"100%":"custom",items:["100%","custom"],dense:"",solo:"",flat:"",filled:"",clearable:""},on:{input:e.setDefaultPreviewWidth}})],1)]),t("div",{staticClass:"media-query-input-wrapper"},["100%"!==e.internalValue.defaultPreviewWidth?[t("div",{staticClass:"d-flex flex-column"},[t("label",{staticClass:"breakdance-text-input__label"},[e._v(e._s(e.__("Custom width (px)")))]),t("NumberInput",{model:{value:e.internalValue.defaultPreviewWidth,callback:function(t){e.$set(e.internalValue,"defaultPreviewWidth",t)},expression:"internalValue.defaultPreviewWidth"}})],1)]:e._e()],2),t("div",{staticClass:"d-flex justify-end align-center"},[t(Qo.Z,{staticClass:"mr-3",attrs:{text:"",color:"red darken-1"},on:{click:e.cancel}},[e._v(e._s(e.__("Cancel")))]),t("NiceButton",{attrs:{disabled:!e.internalValue.maxWidth&&!e.internalValue.minWidth},on:{click:e.save}},[e._v(e._s(e.__("Save")))])],1)]):t("div",{on:{click:e.enableEditing}},[this.mediaQueryString?[t("div",{staticClass:"media-query-string"},[e._v(e._s(this.mediaQueryString))])]:[t(lh.Z,{staticClass:"mt-4",attrs:{dense:"",text:"",color:"orange"}},[e._v(" "+e._s(e.__("Click to set min and max widths."))+" ")])]],2)]),e.isEditing?e._e():t("div",{staticClass:"breakpoint-edit__actions"},[t("IconButton",{staticClass:"mr-1",attrs:{icon:"EditIcon",size:"18"},on:{click:e.enableEditing}}),t("IconButton",{attrs:{icon:"TrashIcon",size:"18"},on:{click:function(t){t.stopPropagation(),e.deleteDialog=!0}}})],1)])]),t("ConfirmDialog",{attrs:{show:e.deleteDialog,type:"error","action-text":"Delete","discard-text":"Cancel","save-is-enabled":!0,"discard-is-enabled":!0},on:{discard:function(t){e.deleteDialog=!1},save:e.deleteBreakpoint},scopedSlots:e._u([{key:"title",fn:function(){return[e._v("Delete breakpoint?")]},proxy:!0},{key:"text",fn:function(){return[e._v("{If you delete the "+e._s(e.value.label||`${e.value.defaultPreviewWidth}px`)+" breakpoint, you will lose all design changes it applies.")]},proxy:!0}])})],1)},dh=[],uh=n(99969);let ph=class extends s.ZP{constructor(){super(...arguments),this.deleteDialog=!1,this.internalValue=(0,wd.Z)(this.value)}setDefaultPreviewWidth(e){const t=this.internalValue.maxWidth??this.internalValue.minWidth??250;this.internalValue.defaultPreviewWidth="100%"===e?"100%":t}enableEditing(){this.$emit("edit",this.value.id)}get breakpoints(){return c.configStore.breakpoints}get previewWidthUnit(){return"px"}deleteBreakpoint(){this.$emit("delete"),this.deleteDialog=!1}get mediaQueryString(){const e=this.internalValue.minWidth||void 0,t=this.internalValue.maxWidth||void 0;return(0,Pe.Mc)(e,t)}cancel(){this.internalValue=(0,wd.Z)(this.value),this.$emit("edit","")}save(){const e=(0,wd.Z)(this.internalValue);(0,id.pipe)((0,Pe.cb)(e),(0,od.fold)((e=>{e.forEach((e=>cd.Z.log.message(e.msg)))}),(e=>{this.$emit("input",e),this.$emit("edit","")})))}};(0,r.gn)([(0,l.fI)()],ph.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],ph.prototype,"isEditing",void 0),ph=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z,TextInput:na.Z,NumberInput:xd.Z,DropdownInput:Cd.Z,NiceButton:Br.Z,ConfirmDialog:uh.Z},directives:{focus:{inserted:function(e){e.focus()}}}})],ph);const hh=ph,gh=hh;var mh=(0,N.Z)(gh,ch,dh,!1,null,null,null);const vh=mh.exports;var yh=function(){var e=this,t=e._self._c;return t("div",{staticClass:"preferences-empty-state"},[e._t("default")],2)},fh=[],_h={},bh=(0,N.Z)(_h,yh,fh,!1,null,null,null);const Sh=bh.exports;let Ch=class extends s.ZP{constructor(){super(...arguments),this.editingBreakpointId="",this.showAddForm=!1,this.newBreakpointLabel=""}edit(e){this.editingBreakpointId=e,this.showAddForm=!1}openAddBreakpointForm(){this.showAddForm=!0,this.editingBreakpointId=""}toggleAddBreakpointForm(){this.showAddForm=!this.showAddForm}addBreakpoint(){if(!this.newBreakpointLabel)return;const e=this.newBreakpointLabel.toLowerCase().replace(/[- ]/g,"_"),t=`custom_breakpoint_${e}`;this.updateOrAddBreakpoint({id:t,label:this.newBreakpointLabel,minWidth:void 0,maxWidth:void 0,defaultPreviewWidth:"100%"})}deleteBreakpoint(e){const t=(0,wd.Z)(this.value),n=t.findIndex((t=>t.id===e));t.splice(n,1),this.$emit("input",t)}updateOrAddBreakpoint(e){const t=(0,Pe.lx)(this.value,e);this.$emit("input",t),!0===this.showAddForm&&(this.showAddForm=!1),this.newBreakpointLabel=""}};(0,r.gn)([(0,l.fI)()],Ch.prototype,"value",void 0),Ch=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,EditBreakpoint:vh,EmptyStatePreferences:Sh,TextInput:na.Z,IconButton:Xa.Z}})],Ch);const xh=Ch,wh=xh;var Ih=(0,N.Z)(wh,ah,rh,!1,null,null,null);const Ph=Ih.exports;var kh=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("div",{staticClass:"preferences-panel-topbar"},[t("div",{staticClass:"preferences-panel-heading"},[e._t("title")],2),e._t("aftertitle"),t(vc.Z)],2),t("div",{staticClass:"preferences-panel-content-area"},[e._t("content")],2),t("div",{staticClass:"preferences-bottom-panel"},[e.hideSaveButton?e._e():t(Qo.Z,{attrs:{loading:e.save.inProgress,disabled:e.save.disabled,color:"blue",dark:""},on:{click:e.save.function}},[e._v(e._s(e.save.text)+" ")])],1)])},Eh=[];let Th=class extends s.ZP{};(0,r.gn)([(0,l.fI)()],Th.prototype,"save",void 0),(0,r.gn)([(0,l.fI)({default:!1})],Th.prototype,"hideSaveButton",void 0),Th=(0,r.gn)([(0,l.wA)({})],Th);const Dh=Th,Ah=Dh;var Zh=(0,N.Z)(Ah,kh,Eh,!1,null,null,null);const Oh=Zh.exports;let Mh=class extends s.ZP{constructor(){super(...arguments),this.internalValue=(0,wd.Z)(this.value)}get unsavedChangesPresent(){return!oh()((0,wd.Z)(this.internalValue),(0,wd.Z)(this.value))}applyChanges(){this.$emit("input",this.internalValue)}breakpointsEdited(e){this.internalValue=e}};(0,r.gn)([(0,l.fI)()],Mh.prototype,"value",void 0),Mh=(0,r.gn)([(0,l.wA)({components:{EditBreakpoints:Ph,PreferencesPanel:Oh}})],Mh);const Bh=Mh,Lh=Bh;var Nh=(0,N.Z)(Lh,nh,sh,!1,null,null,null);const Fh=Nh.exports;var Rh=n(56904),Vh=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("PreferencesPanel",{attrs:{save:{text:e.__("Save Fonts"),function:e.applyChanges,inProgress:e.saveInProgress,disabled:!e.unsavedChangesPresent||e.isFreeMode}},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.__("Custom Fonts")))]},proxy:!0},{key:"content",fn:function(){return[t("ProOnlyAlertBox",{staticClass:"mb-5",attrs:{options:{content:e.sprintf(e._doc("Managing custom fonts is only available in %s Pro","%s: Plugin name"),e.$bdox("plugin_name")),feature:"custom-fonts"}}}),e._l(e.internalValue,(function(n,s){return t("FontFamily",{key:n.family,attrs:{value:n,isOpen:s===e.openedFontIndex},on:{open:function(t){return e.openFont(t?s:-1)},delete:function(t){return e.deleteFontFamily(s)},input:function(t){return e.updateFontFamily(t,s)}}})})),e.internalValue.length?[t("div",{staticClass:"mt-12"})]:e._e(),t("h4",{staticClass:"mb-4 font-weight-medium"},[e._v(" "+e._s(e.__("Add Font"))+" ")]),e.showAddForm||0!=e.internalValue.length?e._e():t("EmptyStatePreferences",[t("p",[e._v(" "+e._s(e.sprintf(e._doc("Add a font family to %s's font family dropdowns, and optionally upload associated .woff/.woff2 files.","%s: Plugin name"),e.$bdox("plugin_name")))+" ")]),t(Qo.Z,{attrs:{outlined:"",disabled:e.isFreeMode},on:{click:e.toggleAddForm}},[e._v(" "+e._s(e.__("Add Font"))+" ")])],1),e.showAddForm?t("div",[t(Rh.Z,{ref:"form",on:{submit:function(t){return t.preventDefault(),e.saveNewFontFamily.apply(null,arguments)}},model:{value:e.validForm,callback:function(t){e.validForm=t},expression:"validForm"}},[t("div",{staticClass:"add-font-family-form-content-wrapper"},[t("div",{staticClass:"add-font-heading-box"},[t("h4",{staticClass:"add-font-heading"},[e._v(" "+e._s(e.__("Add New Font"))+" ")]),t("IconButton",{staticClass:"add-font-cloe-button",attrs:{icon:"CloseIcon",size:"18"},on:{click:e.toggleAddForm}})],1),t("TextInput",{attrs:{placeholder:e.__("Custom font name, ie. Helvetica"),outlined:"",dense:"",solo:"",flat:"","single-line":"",size:"md","validation-function-name":"validateAlphanumericHyphenUnderscore"},model:{value:e.fontFamily,callback:function(t){e.fontFamily=t},expression:"fontFamily"}}),t(Qo.Z,{attrs:{disabled:!e.fontFamily||!0!==e.validFontFamily,type:"submit",text:""}},[t("Icon",{staticClass:"mr-2",attrs:{icon:"PlusIcon"}}),e._v(" "+e._s(e.__("Add"))+" ")],1)],1)])],1):e._e(),e.internalValue.length>0&&!e.showAddForm?t(Qo.Z,{attrs:{outlined:"",disabled:e.isFreeMode},on:{click:e.toggleAddForm}},[e._v(" "+e._s(e.__("Add Font"))+" ")]):e._e(),t("h4",{staticClass:"my-4 font-weight-medium mt-12"},[e._v(" "+e._s(e.__("Use Fonts In External CSS"))+" ")]),e.showCssForm||0!=e.internalValue.length?e._e():t("EmptyStatePreferences",[t("p",[e._v(" "+e._s(e.__("Use hosted fonts from providers like Adobe Fonts."))+" ")]),t(Qo.Z,{attrs:{outlined:"",disabled:e.isFreeMode},on:{click:e.toggleCssForm}},[e._v(" "+e._s(e.__("Add External CSS"))+" ")])],1),e.showCssForm?t("div",[t(Rh.Z,{ref:"cssForm",on:{submit:function(t){return t.preventDefault(),e.saveCssUrl.apply(null,arguments)}},model:{value:e.validCssForm,callback:function(t){e.validCssForm=t},expression:"validCssForm"}},[t("div",{staticClass:"add-font-family-form-content-wrapper mb-4"},[t("div",{staticClass:"add-font-heading-box"},[t("h4",{staticClass:"add-font-heading"},[e._v(" "+e._s(e.__("CSS URL"))+" ")]),t("IconButton",{staticClass:"add-font-cloe-button",attrs:{icon:"CloseIcon",size:"18"},on:{click:e.toggleCssForm}})],1),t("TextInput",{attrs:{rules:[t=>!!t||e.__("Please enter a value"),t=>e.isValidUrl(t)||e.__("Please enter a valid URL")],placeholder:e.__("URL to CSS file containing Font Face definitions"),outlined:"",dense:"",solo:"",flat:"","single-line":"",size:"md"},model:{value:e.cssUrl,callback:function(t){e.cssUrl=t},expression:"cssUrl"}}),t(Qo.Z,{attrs:{disabled:e.saveInProgress,type:"submit",text:""}},[t("Icon",{staticClass:"mr-2",attrs:{icon:"PlusIcon"}}),e._v(" "+e._s(e.__("Add"))+" ")],1)],1)])],1):e._e(),e.internalValue.length>0&&!e.showCssForm?t(Qo.Z,{attrs:{outlined:"",disabled:e.isFreeMode},on:{click:e.toggleCssForm}},[e._v(" "+e._s(e.__("Add CSS URL"))+" ")]):e._e()]},proxy:!0}])})},$h=[],Wh=n(88667),Uh=n(65669);async function zh(e){return await(0,ad.D)({action:"breakdance_save_font_file",dataToPost:{file:e},decoder:Wh.zM})}async function Hh(e){return await(0,ad.D)({action:"breakdance_get_font_families_from_css_file",dataToPost:{cssUrl:e},decoder:Wh.lU})}async function Gh(e){return await(0,ad.D)({action:"breakdance_save_font_families",dataToPost:{customFontFamilies:(0,Uh.J)(e)},decoder:Wh.lU})}const Kh=e=>{const t=(0,wd.Z)(Q.PK.fonts),n=t.findIndex((t=>t.slug===e.slug));-1===n?t.unshift(e):t[n]=e,Q.PK.setFonts(t)},jh=e=>{const t=(0,wd.Z)(Q.PK.fonts),n=t.findIndex((t=>t.slug===e));n>-1&&t.splice(n,1),Q.PK.setFonts(t)};var qh=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"custom-font-family"},[t("div",{staticClass:"custom-font-family-titlebar",on:{click:e.toggleFaces}},[t("div",{staticClass:"custom-font-family-title"},[e._v(" "+e._s(e.value.family)+" ")]),t(Qo.Z,{attrs:{icon:""},on:{click:function(t){return t.stopPropagation(),e.deleteFontFamily.apply(null,arguments)}}},[t("Icon",{attrs:{icon:"TrashIcon"}})],1)],1),e.isOpen?t("div",{staticClass:"custom-font-family-edit"},[e.value.hasExternalCssUrl?e._e():t("div",[t("FontFaces",{attrs:{value:e.value.faces},on:{input:e.editFontFamily}}),t("TextField",{attrs:{placeholder:"CSS Fallback String (separate font families with commas)",value:e.value.fallbackString,size:"md"},on:{input:e.editFallbackString}}),e.fallbackStringHasBeenEdited?[t(lh.Z,{staticClass:"mt-4",attrs:{dense:"",border:"left",text:"",type:"warning"}},[e._v(" Changes to the CSS fallback string will take effect after "),t("strong",[e._v("saving and refreshing")]),e._v(". ")])]:e._e()],2),e.value.hasExternalCssUrl?t("div",[t("span",{staticStyle:{"font-size":"var(--text-sm)","font-weight":"500"}},[e._v("Sourced from "+e._s(e.value.cssUrl))]),t("TextField",{staticClass:"mt-4",attrs:{placeholder:"CSS Fallback String (separate font families with commas)",value:e.value.fallbackString,size:"md"},on:{input:e.editFallbackString}})],1):e._e()]):e._e()])},Xh=[],Yh=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"custom-font-family-font-faces"},[e._l(e.value,(function(n,s){return t("UpdateFontFace",{key:n.id,attrs:{value:n,existingFontFaces:e.existingFontFaces(s)},on:{input:function(t){return e.updateFontFace(t,s)},delete:function(t){return e.deleteFontFace(s)}}})})),t("FontFileUpload",{on:{save:e.newFontFileSuccessfullyUploaded}})],2)},Qh=[],Jh=n(9207),eg=n(42564),tg=n(25135),ng=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"custom-font-family-font-face"},[t(Rh.Z,{ref:"form",model:{value:e.isFontFaceUnique,callback:function(t){e.isFontFaceUnique=t},expression:"isFontFaceUnique"}},[t("div",{staticClass:"custom-font-family-font-face-titlebar"},[t("div",{staticClass:"custom-font-family-font-face-titlebar-title"},e._l(e.value.files,(function(n){return t("div",{key:n.fileUrl,staticClass:"mr-3"},[e._v(" "+e._s(n.fileName)+" ")])})),0),t(Qo.Z,{attrs:{icon:""},on:{click:e.deleteFontFace}},[t("Icon",{attrs:{icon:"TrashIcon"}})],1)],1),t("div",{staticClass:"custom-font-family-font-face-controls"},[t("div",{staticClass:"custom-font-family-font-face-controls-control"},[t(tg.Z,{staticClass:"mr-4",attrs:{dense:"",outlined:"",value:e.value.weight,items:e.weights,rules:[e.validateWeight],label:e.__("Font Weight")},on:{input:e.updateWeight}})],1),t("div",{staticClass:"custom-font-family-font-face-controls-control"},[t(eg.Z,{staticClass:"pt-0 mt-0 mr-4",attrs:{value:e.value.style,rules:[e.validateStyle],row:"",dense:""},on:{change:e.updateStyle}},[t(Jh.Z,{attrs:{label:e.__("Normal"),value:"normal"}}),t(Jh.Z,{attrs:{label:e.__("Italic"),value:"italic"}})],1)],1)])])],1)},sg=[],ig=n(52343);let og=class extends s.ZP{constructor(){super(...arguments),this.isFontFaceUnique=!0}validateWeight(e){return e?!this.existingFontFaces.find((t=>t.weight===e&&t.style===this.value.style))?.files.find((e=>this.valueFormats.includes(e.format)))||(0,Ft.__)("This font weight already exists with this style, and format"):(0,Ft.__)("A weight is required")}validateStyle(e){return!this.existingFontFaces.find((t=>t.weight===this.value.weight&&t.style===e))?.files.find((e=>this.valueFormats.includes(e.format)))||(0,Ft.__)("This font style already exists with this weight, and format")}get valueFormats(){return this.value.files.map((e=>e.format))}revalidateOnValueChange(){this.form.validate()}updateWeight(e){const t={...this.value,weight:e};this.$emit("input",t)}updateStyle(e){const t={...this.value,style:e};this.$emit("input",t)}deleteFontFace(){this.$emit("delete")}get weights(){return ig.I}get currentWeight(){return ig.I.find((e=>e.value===this.value.weight))}};(0,r.gn)([(0,l.Rl)()],og.prototype,"form",void 0),(0,r.gn)([(0,l.fI)()],og.prototype,"value",void 0),(0,r.gn)([(0,l.fI)({default:[]})],og.prototype,"existingFontFaces",void 0),(0,r.gn)([(0,l.RL)("value")],og.prototype,"revalidateOnValueChange",null),og=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],og);const ag=og,rg=ag;var lg=(0,N.Z)(rg,ng,sg,!1,null,null,null);const cg=lg.exports;var dg=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-font-file-uploader"},[t("FileUpload",{attrs:{height:"150px",accept:".woff,.woff2",saveInProgress:e.saveInProgress},on:{input:e.handleFiles}},[e._v(" "+e._s(e.__("drag .woff or .woff2 files or"))+" "),t("span",{staticClass:"breakdance-font-file-uploader-choose-link"},[e._v(e._s(e.__("browse...")))])])],1)},ug=[],pg=n(30895);let hg=class extends s.ZP{constructor(){super(...arguments),this.saveInProgress=!1}handleFiles(e){Array.from(e).forEach((e=>{const t=new FileReader;t.onloadend=async t=>{if(!t?.target)return;const n=new Uint8Array(t.target.result).subarray(0,4);let s="";n.forEach((e=>s+=e.toString(16)));const i=e.name.split(".").pop(),o="774f4646"===s&&"woff"===i,a="774f4632"===s&&"woff2"===i;o||a?(this.saveInProgress=!0,(0,id.pipe)(await zh(e),(0,od.fold)((e=>{(0,th.UE)(e)}),(e=>{this.$emit("save",{fileUrl:e.fileUrl,format:o?"woff":"woff2",fileName:e.fileName})}))),this.saveInProgress=!1):cd.Z.log.message((0,Ft.__)('Only ".woff" and ".woff2" files are supported'))},t.readAsArrayBuffer(e)}))}};hg=(0,r.gn)([(0,l.wA)({components:{FileUpload:pg.Z}})],hg);const gg=hg,mg=gg;var vg=(0,N.Z)(mg,dg,ug,!1,null,null,null);const yg=vg.exports;var fg=n(8773);let _g=class extends s.ZP{newFontFileSuccessfullyUploaded(e){const t=Sg(e),n=[...this.value,t];this.$emit("input",n)}updateFontFace(e,t){const n=[...this.value],s=e.files.map((e=>e.format)),i=n.findIndex((t=>t.weight===e.weight&&t.style===e.style&&!t.files.find((e=>s.includes(e.format)))));-1===i?n[t]=e:(n[i].files=[...n[i].files,...e.files],n.splice(t,1)),this.$emit("input",n)}deleteFontFace(e){const t=[...this.value];t.splice(e,1),this.$emit("input",t)}existingFontFaces(e){return this.value.filter(((t,n)=>n!==e))}};(0,r.gn)([(0,l.fI)()],_g.prototype,"value",void 0),_g=(0,r.gn)([(0,l.wA)({components:{FontFileUpload:yg,UpdateFontFace:cg}})],_g);const bg=_g;function Sg(e){return{id:(0,fg.Z)(),files:[e],style:"normal",weight:0}}const Cg=bg;var xg=(0,N.Z)(Cg,Yh,Qh,!1,null,null,null);const wg=xg.exports;let Ig=class extends s.ZP{constructor(){super(...arguments),this.fallbackStringHasBeenEdited=!1}toggleFaces(){this.$emit("open",!this.isOpen)}deleteFontFamily(){this.$emit("delete")}editFallbackString(e){this.fallbackStringHasBeenEdited=!0,this.$emit("input",{...this.value,fallbackString:e})}editFontFamily(e){this.$emit("input",{...this.value,faces:e})}editCssUrl(e){this.$emit("input",{...this.value,cssUrl:e})}};(0,r.gn)([(0,l.fI)()],Ig.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],Ig.prototype,"isOpen",void 0),Ig=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,FontFaces:wg,TextField:na.Z}})],Ig);const Pg=Ig,kg=Pg;var Eg=(0,N.Z)(kg,qh,Xh,!1,null,null,null);const Tg=Eg.exports;var Dg=n(13997),Ag=n(2028),Zg=n(4998);let Og=class extends s.ZP{constructor(){super(...arguments),this.internalValue=(0,wd.Z)(this.value),this.fontFamily="",this.cssUrl="",this.validForm=!0,this.validCssForm=!0,this.saveInProgress=!1,this.openedFontIndex=-1,this.showAddForm=!1,this.showCssForm=!1}get unsavedChangesPresent(){return!oh()((0,wd.Z)(this.internalValue),(0,wd.Z)(this.value))}get validFontFamily(){return(0,Dg.q3)(this.fontFamily)}toggleAddForm(){this.showAddForm=!this.showAddForm}toggleCssForm(){this.showCssForm=!this.showCssForm}async applyChanges(){this.saveInProgress=!0,(0,id.pipe)(await Gh(this.internalValue),(0,od.fold)((e=>{(0,th.UE)(e)}),(e=>{e.forEach((e=>{const t=this.internalValue.findIndex((t=>t.id===e.fontId));this.internalValue[t].cssUrl=e.cssUrl,this.internalValue[t].cssName=e.fontRegistrationData.cssName,Kh(e.fontRegistrationData)})),this.$emit("input",this.internalValue)}))),this.saveInProgress=!1}openFont(e){this.isFreeMode||(this.openedFontIndex=e)}updateFontFamily(e,t){const n=(0,wd.Z)(this.internalValue);n[t]=e,this.internalValue=n}deleteFontFamily(e){if(this.isFreeMode)return;const t=(0,wd.Z)(this.internalValue);t.splice(e,1),jh(this.internalValue[e].id),this.internalValue=t}saveNewFontFamily(){this.form.validate()&&this.fontFamily&&(this.internalValue.push({id:"custom_font_"+this.fontFamily.toLowerCase().replace(/ /g,"_"),family:this.fontFamily,fallbackString:"",cssUrl:"",hasExternalCssUrl:!1,cssName:this.fontFamily,faces:[]}),this.openedFontIndex=this.internalValue.length-1,this.fontFamily="",this.form.reset(),this.showAddForm=!1)}async saveCssUrl(){this.cssForm.validate()&&this.cssUrl&&(this.saveInProgress=!0,(0,id.pipe)(await Hh(this.cssUrl),(0,od.fold)((e=>{(0,th.UE)(e)}),(e=>{e.forEach((e=>{const t=this.internalValue.findIndex((t=>t.id===e.fontId))>-1;t||this.internalValue.unshift({id:e.fontId,family:e.fontRegistrationData.label,fallbackString:e.fontRegistrationData.fallbackString,cssUrl:e.cssUrl,hasExternalCssUrl:!0,cssName:e.fontRegistrationData.cssName,faces:[]})}))}))),this.saveInProgress=!1,this.cssUrl="",this.showCssForm=!1)}isValidUrl(e){let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol}get isFreeMode(){return"free"===Q.PK.subscriptionMode}};(0,r.gn)([(0,l.Rl)()],Og.prototype,"form",void 0),(0,r.gn)([(0,l.Rl)()],Og.prototype,"cssForm",void 0),(0,r.gn)([(0,l.fI)()],Og.prototype,"value",void 0),Og=(0,r.gn)([(0,l.wA)({components:{ProOnlyAlertBox:Zg.Z,AlertBox:Ag.Z,FontFamily:Tg,PreferencesPanel:Oh,EmptyStatePreferences:Sh,Icon:He.Z,TextInput:na.Z,IconButton:Xa.Z}})],Og);const Mg=Og,Bg=Mg;var Lg=(0,N.Z)(Bg,Vh,$h,!1,null,null,null);const Ng=Lg.exports;var Fg=n(76660),Rg=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("PreferencesPanel",{attrs:{"hide-save-button":!0},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.__("UI Settings")))]},proxy:!0},{key:"content",fn:function(){return[t("h4",{staticClass:"mb-4 font-weight-medium"},[e._v(" "+e._s(e.__("Settings"))+" ")]),t("div",{staticClass:"ui-setting"},[t(Fg.Z,{attrs:{"input-value":e.autoScrollEnabled,inset:"",label:e.__("Auto-scroll to active element"),color:"oxygen"===e.builderMode?"var(--oxygen-primary-500)":null},on:{change:e.setAutoScrollEnabled}})],1),t("div",{staticClass:"ui-setting"},[t(Fg.Z,{attrs:{"input-value":e.isScaledToFit,label:e.__("Scale content to fit the screen (zoom)"),color:"oxygen"===e.builderMode?"var(--oxygen-primary-500)":null,inset:""},on:{change:e.setScaleToFit}})],1),"breakdance"===e.builderMode?t("div",{staticClass:"ui-setting"},[t(Fg.Z,{attrs:{"input-value":e.isDarkMode,label:e.__("Dark Mode"),inset:""},on:{change:e.toggleTheme}})],1):e._e(),e.displayShowExperimentalElementsSetting?t("div",{staticClass:"ui-setting"},[t(Fg.Z,{attrs:{"input-value":e.showExperimentalElements,label:e.__("Show Experimental Elements"),color:"oxygen"===e.builderMode?"var(--oxygen-primary-500)":null,inset:""},on:{change:e.setShowExperimentalElements}})],1):e._e(),t("div",{staticClass:"ui-setting"},[t(Fg.Z,{attrs:{"input-value":e.disableNoticeForEmptySSRElements,label:e.__("Disable Message For Empty SSR Elements"),color:"oxygen"===e.builderMode?"var(--oxygen-primary-500)":null,inset:""},on:{change:e.setDisableNoticeForEmptySSRElements}})],1),t("div",{staticClass:"ui-setting"},[t(Fg.Z,{attrs:{"input-value":e.isShowingIdsInStructurePanel,label:e.__("Show elements ID in the Structure Panel"),color:"oxygen"===e.builderMode?"var(--oxygen-primary-500)":null,inset:""},on:{change:e.setIsShowingIdsInStructurePanel}})],1),t("div",{staticClass:"ui-setting"},[t(Fg.Z,{attrs:{"input-value":e.disableCodeMirrorLineWrapping,label:e.__("Disable Code Editor Line Wrapping"),color:"oxygen"===e.builderMode?"var(--oxygen-primary-500)":null,inset:""},on:{change:e.setDisableCodeMirrorLineWrapping}})],1),t("div",{staticClass:"ui-setting"},[t(Fg.Z,{attrs:{"input-value":e.isTinyMcePreferredForRichText,label:e.__("Prefer TinyMCE For Rich Text"),color:"oxygen"===e.builderMode?"var(--oxygen-primary-500)":null,inset:""},on:{change:e.setIsTinyMcePreferredForRichText}})],1),t("div",{staticClass:"ui-setting"},[t(Fg.Z,{attrs:{"input-value":e.includeCustomBreakpointsInBreakpointsDropdown,label:e.__("Include Custom Breakpoints in Breakpoint Dropdowns"),color:"oxygen"===e.builderMode?"var(--oxygen-primary-500)":null,inset:""},on:{change:e.setIncludeCustomBreakpointsInBreakpointsDropdown}})],1),e.includeCustomBreakpointsInBreakpointsDropdown?[t("AlertBox",{staticClass:"mb-5",attrs:{options:{style:"info",content:`<a target='_blank' href='${e.customBreakpointsDocUrl}'>Limitations May Apply</a>`}}})]:e._e(),"breakdance"===e.builderMode?t("div",{staticClass:"ui-setting"},[t(Fg.Z,{attrs:{"input-value":e.showPreviousBreakpointValueAsPlaceholder,label:e.__("Experimental: Show Previous Breakpoint Value As Placeholder"),inset:""},on:{change:e.setShowPreviousBreakpointValueAsPlaceholder}})],1):e._e(),t("div",{staticClass:"ui-setting"},[t(Fg.Z,{attrs:{"input-value":e.disableCustomUnitDropdown,label:e.__("Disable Custom Unit Dropdown"),inset:""},on:{change:e.updatedisableCustomUnitDropdown}})],1),t("div",{staticClass:"ui-setting"},[t("div",{staticClass:"ui-panel-title"},[e._v(" "+e._s(e.__("Default Unit Type"))+" ")]),t("DropdownInput",{attrs:{items:e.unitTypes,value:e.defaultUnitType,placeholder:"px",clearable:!0},on:{input:e.setDefaultUnitType}})],1),t("div",{staticClass:"mt-4"},[t("h4",{staticClass:"mb-4 font-weight-medium"},[e._v(" "+e._s(e.__("Panel Positions"))+" ")]),e._l(e.panelsState,(function(n,s){return[t("div",{key:s,staticClass:"d-flex align-center justify-space-between mb-3 panel-positions"},[t("div",{staticClass:"ui-panel-title"},[e._v(e._s(n.label))]),t("ButtonBarInput",{attrs:{value:n.value,items:e.panelPositionsAsItems,options:{mandatory:!0}},on:{input:function(t){return e.setPanelPosition(n.id,t)}}})],1)]})),t("div",{staticClass:"d-flex align-center justify-space-between mb-3 panel-positions"},[t("div",{staticClass:"ui-panel-title"},[e._v(" "+e._s(e.__("Popout Position"))+" ")]),t("ButtonBarInput",{attrs:{value:e.popoutPosition,items:e.popoutPositionItems,options:{mandatory:!0}},on:{input:e.setPopoutPosition}})],1),t("div",{staticClass:"d-flex justify-end mt-4"},[t("NiceButton",{attrs:{disabled:e.arePanelPositionsDefault},on:{click:e.resetUiPanelPositionsToDefault}},[e._v(e._s(e.__("Reset to defaults")))])],1)],2)]},proxy:!0}])})},Vg=[],$g=n(44762),Wg=n(6613),Ug=n(31549),zg=n(82436),Hg=n(16795);let Gg=class extends s.ZP{constructor(){super(...arguments),this.panelsState=this.getPanelsInitialState()}getPanelsInitialState(){const e=[{id:"add",label:(0,Ft.__)("Add")},{id:"elementproperties",label:(0,Ft.__)("Element Properties")},{id:"structure",label:(0,Ft.__)("Structure")},{id:"history",label:(0,Ft.__)("History & Revisions")}];return"breakdance"===c.configStore.builderMode&&(e.push({id:"globalSettings",label:(0,Ft.__)("Global Settings")}),e.push({id:"selectors",label:(0,Ft.__)("Selectors")})),"oxygen"===c.configStore.builderMode&&(e.push({id:"variables",label:(0,Ft.__)("Variables")}),e.push({id:"oxySelectors",label:(0,Ft.__)("Selectors")})),e.map((e=>({...e,value:(0,Bu.pL)(e.id)})))}get builderMode(){return c.configStore.builderMode}setPanelPosition(e,t){const n=this.panelsState.findIndex((t=>t.id===e));this.panelsState[n].value=t,(0,Bu.hy)(e,t),(0,Bu.ug)(),(0,Bu.oM)(e)}resetUiPanelPositionsToDefault(){(0,Bu.qH)(),this.panelsState=this.getPanelsInitialState()}get arePanelPositionsDefault(){return oh()(Bu.c$,this.panelsState.reduce(((e,t)=>(e[t.id]=t.value,e)),{}))}get panelPositionsAsItems(){return[{text:(0,Ft.__)("left"),value:"left"},{text:(0,Ft.__)("right"),value:"right"}]}get popoutPositionItems(){return[{text:(0,Ft.__)("Stacked"),value:"STACKED"},{text:(0,Ft.__)("Stacked (First Visible)"),value:"STACKED_FIRST_VISIBLE"},{text:(0,Ft.__)("Side By Side"),value:"SIDE_BY_SIDE"}]}get displayShowExperimentalElementsSetting(){return(0,zg.y)()}get isDarkMode(){return"dark"===c.uiStore.settings.theme}get isScaledToFit(){return"SCALED_TO_FIT"===c.uiStore.settings.scaleToFit}get includeCustomBreakpointsInBreakpointsDropdown(){return c.uiStore.settings.includeCustomBreakpointsInBreakpointsDropdown}get isShowingIdsInStructurePanel(){return c.uiStore.settings.showElementIdInStructurePanel}get isTinyMcePreferredForRichText(){return c.uiStore.settings.isTinyMcePreferredForRichText}get customBreakpointsDocUrl(){return"oxygen"===c.configStore.builderMode?"https://oxygenbuilder.com/documentation/settings/preferences/custom-breakpoints/breakpoint-dropdown-limitations/":"https://breakdance.com/documentation/settings/preferences/custom-breakpoints/breakpoint-dropdown-limitations/"}get unitTypes(){return Hg.LF}setScaleToFit(e){this.setUiSettings((0,$u.b0)(e))}toggleTheme(){const e=(0,wd.Z)(c.uiStore.settings);e.theme=this.isDarkMode?"light":"dark",this.setUiSettings(e)}setDisableNoticeForEmptySSRElements(e){const t=(0,wd.Z)(c.uiStore.settings);t.disableNoticeForEmptySSRElements=e,this.setUiSettings(t)}get disableNoticeForEmptySSRElements(){return c.uiStore.settings.disableNoticeForEmptySSRElements}get showExperimentalElements(){return c.uiStore.settings.showExperimentalElements}setShowExperimentalElements(e){const t=(0,wd.Z)(c.uiStore.settings);t.showExperimentalElements=e,this.setUiSettings(t)}setIsShowingIdsInStructurePanel(e){const t=(0,wd.Z)(c.uiStore.settings);t.showElementIdInStructurePanel=e,this.setUiSettings(t)}setIncludeCustomBreakpointsInBreakpointsDropdown(e){const t=(0,wd.Z)(c.uiStore.settings);t.includeCustomBreakpointsInBreakpointsDropdown=e,this.setUiSettings(t)}get defaultUnitType(){return c.uiStore.settings.defaultUnitType}setDefaultUnitType(e){const t=(0,wd.Z)(c.uiStore.settings);t.defaultUnitType=e,this.setUiSettings(t)}get disableCustomUnitDropdown(){return c.uiStore.settings.disableCustomUnitDropdown}updatedisableCustomUnitDropdown(e){const t=(0,wd.Z)(c.uiStore.settings);t.disableCustomUnitDropdown=e,this.setUiSettings(t)}get showPreviousBreakpointValueAsPlaceholder(){return c.uiStore.settings.showPreviousBreakpointValueAsPlaceholder}setShowPreviousBreakpointValueAsPlaceholder(e){const t=(0,wd.Z)(c.uiStore.settings);t.showPreviousBreakpointValueAsPlaceholder=e,this.setUiSettings(t)}get disableCodeMirrorLineWrapping(){return c.uiStore.settings.disableCodeMirrorLineWrapping}setDisableCodeMirrorLineWrapping(e){const t=(0,wd.Z)(c.uiStore.settings);t.disableCodeMirrorLineWrapping=e,this.setUiSettings(t)}setIsTinyMcePreferredForRichText(e){const t=(0,wd.Z)(c.uiStore.settings);t.isTinyMcePreferredForRichText=e,this.setUiSettings(t)}get autoScrollEnabled(){return c.uiStore.settings.autoScrollEnabled}get popoutPosition(){return c.uiStore.settings.popoutPosition}setAutoScrollEnabled(e){const t=(0,wd.Z)(c.uiStore.settings);t.autoScrollEnabled=e,this.setUiSettings(t)}setPopoutPosition(e){const t=(0,wd.Z)(c.uiStore.settings);t.popoutPosition=e,this.setUiSettings(t)}setUiSettings(e){const t=(0,Wg.g)({...$u.OC,...e});t&&(0,Ug.r)($u.rZ,t),c.uiStore.setSettings(e)}};Gg=(0,r.gn)([(0,l.wA)({components:{DropdownInput:Cd.Z,NiceButton:Br.Z,PreferencesPanel:Oh,ButtonBarInput:$g.Z,ToggleInput:Zp.Z,AlertBox:Ag.Z}})],Gg);const Kg=Gg,jg=Kg;var qg=(0,N.Z)(jg,Rg,Vg,!1,null,null,null);const Xg=qg.exports;let Yg=class extends s.ZP{constructor(){super(...arguments),this.tab=0,this.currentTab=0,this.uiSettingsTab=0,this.fontFamiliesTab=1,this.customBreakpointsTab=2,this.saveInProgress=!1,this.hasUnsavedChanges=!1}get preferences(){return c.configStore.preferences}get customBreakpoints(){return this.preferences.customBreakpoints}get customFontFamilies(){return c.configStore.preferences.customFonts}updateBreakpoints(e){const t=(0,wd.Z)(this.preferences);t.customBreakpoints=e,this.save(t)}updateCustomFontFamilies(e){const t=(0,wd.Z)(this.preferences);t.customFonts=e,this.save(t)}handleClickOutside(){if(this.checkForUnsavedChanges(),!this.hasUnsavedChanges)return this.$emit("update:dialog",!1);const e=confirm("Exit without saving?");return e?this.$emit("update:dialog",!1):this}async handleChangeTab(){if(this.checkForUnsavedChanges(),this.hasUnsavedChanges){const e=confirm("Exit without saving?");if(!e)return await this.$nextTick(),this.tab=this.currentTab,!0}return this.currentTab=this.tab,!1}async save(e){this.saveInProgress=!0,(0,id.pipe)(await th.HR("preferences",e),(0,od.fold)((e=>{(0,th.UE)(e)}),(()=>{c.configStore.setPreferences(e)}))),this.saveInProgress=!1,this.checkForUnsavedChanges()}checkForUnsavedChanges(){return this.currentTab===this.fontFamiliesTab?(this.hasUnsavedChanges=this.customFontFamiliesPanel.unsavedChangesPresent,this.hasUnsavedChanges):this.currentTab===this.customBreakpointsTab?(this.hasUnsavedChanges=this.customBreakpointsPanel.unsavedChangesPresent,this.hasUnsavedChanges):this.hasUnsavedChanges=!1}};(0,r.gn)([(0,l.fI)()],Yg.prototype,"open",void 0),(0,r.gn)([(0,l.Rl)()],Yg.prototype,"customFontFamiliesPanel",void 0),(0,r.gn)([(0,l.Rl)()],Yg.prototype,"customBreakpointsPanel",void 0),Yg=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,CustomUiSettings:Xg,CustomFontFamilies:Ng,CustomBreakpointsPanel:Fh,Loading:Ql.Z}})],Yg);const Qg=Yg,Jg=Qg;var em=(0,N.Z)(Jg,Jp,eh,!1,null,null,null);const tm=em.exports;var nm=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t(Ha.Z,{attrs:{"content-class":"keyboard-shortcuts-help-modal",value:e.open,"max-width":"850"},on:{input:function(t){return e.$emit("update:dialog",!1)}}},[t(Jc.Z,{staticClass:"d-flex flex-column",attrs:{height:"100%"}},[t(yd.ZB,[t("table",{staticClass:"styled-table"},[t("thead",[t("tr",[t("th",[e._v(e._s(e.__("Shortcut")))]),t("th",[e._v(e._s(e.__("Description")))])])]),t("tbody",e._l(e.filteredShortcuts,(function(n,s){return t("tr",{key:s},[t("td",{domProps:{innerHTML:e._s(n.shortcut)}}),t("td",[e._v(e._s(n.description))])])})),0)])])],1)],1)],1)},sm=[];let im=class extends s.ZP{constructor(){super(...arguments),this.shortcuts=[{shortcut:["CMD_A"],description:(0,Ft.__)("Open add elements panel"),availableIn:["breakdance","oxygen"]},{shortcut:["CMD_B"],description:(0,Ft.__)("Open design sets modal"),availableIn:["breakdance"]},{shortcut:["CMD_SHIFT_E"],description:(0,Ft.__)("Open structure panel"),availableIn:["oxygen"]},{shortcut:["CMD_SHIFT_V"],description:(0,Ft.__)("Open variables panel"),availableIn:["oxygen"]},{shortcut:["CMD_SHIFT_G"],description:(0,Ft.__)("Open selectors panel"),availableIn:["oxygen"]},{shortcut:["CMD_S"],description:(0,Ft.__)("Save"),availableIn:["breakdance","oxygen"]},{shortcut:["CMD_Z"],description:(0,Ft.__)("Undo"),availableIn:["breakdance","oxygen"]},{shortcut:["CMD_SHIFT_Z"],description:(0,Ft.__)("Redo"),availableIn:["breakdance","oxygen"]},{shortcut:["CMD_C"],description:(0,Ft.__)("Copy the active element"),availableIn:["breakdance","oxygen"]},{shortcut:["CMD_V"],description:(0,Ft.__)("Paste copied element"),availableIn:["breakdance","oxygen"]},{shortcut:["CMD_D"],description:(0,Ft.__)("Duplicate the active element"),availableIn:["breakdance","oxygen"]},{shortcut:["ESC"],description:(0,Ft.__)("De-activate the active element or close modal"),availableIn:["breakdance","oxygen"]},{shortcut:["SHIFT_ESC"],description:(0,Ft.__)("Go to the parent of the active element"),availableIn:["breakdance","oxygen"]},{shortcut:["BACKSPACE","DELETE"],description:(0,Ft.__)("Delete active element"),availableIn:["breakdance","oxygen"]},{shortcut:["CMD_OPTION_R"],description:(0,Ft.__)("Cycle to the next breakpoint"),availableIn:["breakdance","oxygen"]},{shortcut:["CMD_SHIFT_SLASH","CMD_QUESTION"],description:(0,Ft.__)("Show keyboard shortcuts help modal"),availableIn:["breakdance","oxygen"]},{shortcut:["CMD_SHIFT_S"],description:(0,Ft.__)("Switch between 'scale to fit' and 'actual size' content"),availableIn:["breakdance","oxygen"]},{shortcut:["CMD_E"],description:(0,Ft.__)("Open the rich text editor modal. Only when the Rich Text element is selected"),availableIn:["breakdance","oxygen"]},{shortcut:["C_S_S"],description:(0,Ft.__)("Open the active element's Advanced → Custom CSS and focus it."),availableIn:["breakdance"]},{shortcut:["C_L_A"],description:(0,Ft.__)("Open the active element's Advanced → Classes autocomplete and focus it."),availableIn:["breakdance"]},{shortcut:["F"],description:(0,Ft.__)("Focus the properties search box."),availableIn:["breakdance"]},{shortcut:["SHIFT_F"],description:(0,Ft.__)("Focus the properties search box and toggle the option to search advanced settings (element properties panel only)."),availableIn:["breakdance"]},{shortcut:["CMD_I"],description:(0,Ft.__)("Toggle the modified option in the properties search box."),availableIn:["breakdance"]},{shortcut:["OPTION_P"],description:(0,Ft.__)("Toggle the preview mode."),availableIn:["breakdance","oxygen"]}]}get builderMode(){return c.configStore.builderMode||"breakdance"}get filteredShortcuts(){return this.shortcuts.filter((e=>e.availableIn.includes(this.builderMode))).map((e=>{const t=e.shortcut.map(this.getKeyboardShortcutValue).join("<br />");return{...e,shortcut:t}}))}getKeyboardShortcutValue(e){const t=je.r[e],n=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);let s=t?t[0]:"";return n||2!=t.length||(s=t[1]),s.toUpperCase().split("+").join(" + ")}};(0,r.gn)([(0,l.fI)()],im.prototype,"open",void 0),im=(0,r.gn)([(0,l.wA)({components:{}})],im);const om=im,am=om;var rm=(0,N.Z)(am,nm,sm,!1,null,null,null);const lm=rm.exports;var cm=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio",style:e.styles},[t("ElementStudioWidthAdjustmentBar",{on:{change:e.adjustWidth}}),t("div",{staticClass:"element-studio-wrapper",attrs:{"data-test-id":"element-studio-wrapper"}},[e.activeItemType&&"element"!==e.activeItemType?e._e():t("ElementStudioElements",{attrs:{value:e.data,width:e.width},on:{input:e.updateData,width:e.updateWidth,active:e.updateActiveItemType}}),e.activeItemType&&"macro"!==e.activeItemType?e._e():t("ElementStudioMacros",{attrs:{value:e.data},on:{input:e.updateData,active:e.updateActiveItemType}}),e.activeItemType&&"preset"!==e.activeItemType?e._e():t("ElementStudioPresets",{attrs:{value:e.data},on:{input:e.updateData,active:e.updateActiveItemType}}),e.activeItemType?e._e():t("div",{staticClass:"d-flex flex-column align-center justify-center pa-6"},[t("h4",[e._v(e._s(e.__("Element Studio is for developers and is provided as-is.")))]),t("p",[t("small",[e._v(" "+e._s(e.__("No support is provided. Please read the"))+" "),t("a",{attrs:{href:e.$bdox("docs_link_element_studio"),target:"_blank"}},[e._v(e._s(e.__("documentation")))]),e._v(" "+e._s(e.__("before use."))+" ")])])])],1)],1)},dm=[],um=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("ElementStudioWidthAdjustmentBarAdjustmentHandle",{staticClass:"element-studio-width-adjustment-bar",attrs:{"on-dragging":e.dragging}})},pm=[],hm=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",e._g(e._b({staticClass:"breakdance-element-studio-adjustment-handle",on:{mousedown:e.dragStart}},"div",e.$attrs,!1),e.$listeners),[e._t("default")],2)},gm=[];let mm=class extends s.ZP{constructor(){super(...arguments),this.lastMouseX=0}draggingFunc(e){e.preventDefault(),this.onDragging(e,this.lastMouseX),this.lastMouseX=e.clientX}dragStart(e){e.preventDefault(),e.stopPropagation(),document.addEventListener("mousemove",this.draggingFunc),document.addEventListener("mouseup",this.dragEnd),this.lastMouseX=e.clientX,document.getElementById("iframe").style.pointerEvents="none"}dragEnd(e){e.preventDefault(),document.removeEventListener("mousemove",this.draggingFunc),document.removeEventListener("mouseup",this.dragEnd),document.getElementById("iframe").style.pointerEvents="auto"}};(0,r.gn)([(0,l.fI)()],mm.prototype,"onDragging",void 0),mm=(0,r.gn)([(0,l.wA)({})],mm);const vm=mm,ym=vm;var fm=(0,N.Z)(ym,hm,gm,!1,null,null,null);const _m=fm.exports;let bm=class extends s.ZP{dragging(e,t){this.$emit("change",-1*(e.clientX-t))}};bm=(0,r.gn)([(0,l.wA)({components:{ElementStudioWidthAdjustmentBarAdjustmentHandle:_m}})],bm);const Sm=bm,Cm=Sm;var xm=(0,N.Z)(Cm,um,pm,!1,null,null,null);const wm=xm.exports;var Im=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:{"element-studio-wrapper":e.currentlyEditingElement}},[t("ElementStudioTopbar",{attrs:{"save-locations":e.value.saveLocations,"items-slug":e.elementsSlug,value:e.currentlyEditingElement,itemType:"element","item-name":e.currentlyEditingElement?e.currentlyEditingElement.element.name:"",hasUnsavedChanges:e.hasUnsavedChanges,saveInProgress:e.saveInProgress},on:{open:e.openElement,switchMode:e.switchMode,delete:e.deleteElement,saveOverride:e.saveOverride,saveAs:e.saveAs,saveNew:e.saveNewItem,discardChanges:e.discardChanges,reset:e.resetCurrentlyEditingElement}}),e.currentlyEditingElement?t("div",{staticClass:"element-studio-content"},["split-vertical"===e.mode?[t("div",{staticClass:"panel-50 panel-50-top-panel vscroll-scroll"},[t("ElementStudioTabsAndPanels",{attrs:{available:e.value,element:e.currentlyEditingElement.element},on:{input:e.updateElement,update:e.updateData}})],1),t("div",{staticClass:"panel-50 vscroll-scroll"},[t("ElementStudioTabsAndPanels",{attrs:{available:e.value,element:e.currentlyEditingElement.element,type:"secondary"},on:{input:e.updateElement,update:e.updateData}})],1)]:"split-horizontal"===e.mode?[t("div",{staticClass:"d-flex flex-row",staticStyle:{height:"100%"}},[t("div",{staticClass:"panel-50-h panel-50-h-first-panel vscroll-scroll"},[t("ElementStudioTabsAndPanels",{attrs:{available:e.value,element:e.currentlyEditingElement.element},on:{input:e.updateElement,update:e.updateData}})],1),t("div",{staticClass:"panel-50-h vscroll-scroll"},[t("ElementStudioTabsAndPanels",{attrs:{available:e.value,element:e.currentlyEditingElement.element,type:"secondary"},on:{input:e.updateElement,update:e.updateData}})],1)])]:[t("div",{staticClass:"panel-100 vscroll-scroll"},[t("ElementStudioTabsAndPanels",{attrs:{available:e.value,element:e.currentlyEditingElement.element},on:{input:e.updateElement,update:e.updateData}})],1)]],2):e._e()],1)},Pm=[],km=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-top-bar d-flex"},[e.showNewItemDialog?t("ElementStudioSaveNewDialog",{attrs:{"save-locations":e.saveLocations,"item-type":e.itemType},on:{input:e.saveNewItem,close:function(t){e.showNewItemDialog=!1}}}):e._e(),t("div",{staticClass:"d-flex ml-4"},[e.value?e._e():[t("Dropdown",{attrs:{"offset-y":"","close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:s}){return[t(Qo.Z,e._g(e._b({attrs:{text:"",disabled:0===e.itemsSlug.length,"data-test-id":"element-studio-open-element"}},"v-btn",s,!1),n),[t("Icon",{staticClass:"mr-2",attrs:{icon:"OpenFolderIcon",size:"18"}}),e._v(" "+e._s(e.sprintf(e._xdoc("Open %s","Element Studio Item Type","Element Studio. %s: Item type (element, macro, preset)"),e.itemType))+" ")],1)]}}],null,!1,1479620286)},[t(Ec.Z,{staticStyle:{"max-height":"500px",overflow:"auto"}},[t(ed.Z,{staticClass:"breakdance-element-studio-searchbar",staticStyle:{padding:"12px 16px","margin-bottom":"24px"},attrs:{label:e.sprintf(e._doc("Search %ss","Element Studio. %s: Item type (element, macro, preset)"),e.itemType),flat:"",autofocus:""},model:{value:e.availableItemsSearch,callback:function(t){e.availableItemsSearch=t},expression:"availableItemsSearch"}}),e._l(e.availableItemsBySearch,(function(n,s){return t(Tc.Z,{key:s,attrs:{dense:""},on:{click:function(t){return e.openItem(n)}}},[t(Dc.V9,[e._v(" "+e._s(n)+" ")])],1)}))],2)],1),t(Qo.Z,{staticClass:"ml-2",attrs:{text:"","data-test-id":"element-studio-new-element-button"},on:{click:e.handleNewItem}},[t("Icon",{staticClass:"mr-2",attrs:{icon:"AddFileIcon"}}),e._v(" "+e._s(e.sprintf(e._xdoc("New %s","Element Studio","Element Studio. %s: Item type (element, macro, preset)"),e.itemType))+" ")],1)],e.value?[t("div",{staticClass:"d-flex align-center flex-wrap"},[t("div",{staticClass:"mr-2 element-studio-element-name"},[e._v(" "+e._s(e.itemName)+" ")]),t("Dropdown",{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:s}){return[t("div",[e.value.directoryPath&&e.canSaveOrIsAdvancedUser?t("NiceButton",e._b({staticClass:"ma-2",attrs:{loading:e.saveInProgress,"data-test-id":"element-studio-save-button",title:e.__("Save element"),"left-icon":"SaveIcon"},on:{contextmenu:function(e){return e.preventDefault(),n.click.apply(null,arguments)},click:function(t){e.saveOverwrite(!1)}}},"NiceButton",s,!1),[e._v(" "+e._s(e.__("Save"))+" ")]):!e.value.directoryPath||e.value.onlyForAdvancedUsers?t("NiceButton",e._g(e._b({staticClass:"ma-2",attrs:{loading:e.saveInProgress,"data-test-id":"element-studio-save-button",title:e.__("Save element"),"left-icon":"SaveIcon"},on:{contextmenu:function(e){return e.preventDefault(),n.click.apply(null,arguments)}}},"NiceButton",s,!1),n),[e._v(" "+e._s(e.__("Save"))+" ")]):e._e()],1)]}}],null,!1,1066801973)},[t(Ec.Z,[e.value.directoryPath?[e.showAdvancedFeatures?t(Tc.Z,{attrs:{dense:""},on:{click:function(t){return e.saveOverwrite(!0)}}},[t(Dc.V9,[t("h3",[e._v(e._s(e.__("Save & Bypass Psalm...")))])])],1):e.canSaveOrIsAdvancedUser?t(Tc.Z,{attrs:{dense:""},on:{click:function(t){return e.saveOverwrite(!0)}}},[t(Dc.V9,[t("h3",[e._v(e._s(e.__("Save")))])])],1):e._e()]:e._e(),t(Tc.Z,{attrs:{dense:""}},[t(Dc.V9,[e.availableSaveLocations.length?t("h3",[e._v(" "+e._s(e.__("Save A Copy In:"))+" ")]):t("div",[e._v(" Enable saving elements by "),t("a",{attrs:{href:"https://github.com/soflyy/breakdance-custom-elements/",target:"_blank"}},[e._v("adding a save location.")])])])],1),e._l(e.availableSaveLocations,(function(n,s){return[t(Tc.Z,{key:s,attrs:{dense:""},on:{click:function(t){return e.saveAs(n)}}},[t(Dc.V9,[e._v(" "+e._s(n.label)+" » ")])],1)]}))],2)],1),e.canDeleteElement?t(Ha.Z,{attrs:{"max-width":"360"},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:s}){return[t("NiceButton",e._g(e._b({staticClass:"mr-2",attrs:{elevation:"0","data-test-id":"element-studio-delete-button",title:"Delete element","left-icon":"TrashIcon"}},"NiceButton",s,!1),n),[e._v(" "+e._s(e.__("Delete"))+" ")])]}}],null,!1,3006448231),model:{value:e.deleteDialog,callback:function(t){e.deleteDialog=t},expression:"deleteDialog"}},[t(Jc.Z,[t(yd.EB,{staticClass:"subtitle-1"},[e._v(' Delete "'+e._s(e.itemName)+'" '+e._s(e.itemType)+"? ")]),t(yd.ZB,[e._v(e._s(e.__("This action cannot be undone.")))]),t(yd.h7,[t(vc.Z),t(Qo.Z,{attrs:{text:""},on:{click:function(t){e.deleteDialog=!1}}},[e._v(" "+e._s(e.__("Cancel"))+" ")]),t(Qo.Z,{attrs:{color:"red darken-1",text:""},on:{click:e.deleteItem}},[e._v(" "+e._s(e.__("Delete"))+" ")])],1)],1)],1):e._e(),t(Qo.Z,{attrs:{icon:"","data-test-id":"element-studio-close-element",title:e.sprintf(e.__("Close %s"),e.itemType)},on:{click:e.closeItem}},[t("Icon",{attrs:{icon:"CloseSquareIcon"}})],1)],1)]:e._e()],2),t(vc.Z),e.value?t(Qo.Z,{staticClass:"mr-1 element-studio-switch-mode",attrs:{icon:"",title:e.__("Switch mode"),"data-test-id":"element-studio-topbar-switch-mode"},on:{click:e.switchMode}},[t("Icon",{attrs:{icon:"TableColumnIcon",size:"18"}})],1):e._e(),t(Qo.Z,{staticClass:"mr-4 element-studio-close-panel",attrs:{icon:"",title:e.__("Close Element Studio Panel")},on:{click:e.closePanel}},[t("Icon",{attrs:{icon:"CloseCircleIcon",size:"18"}})],1),t(Ha.Z,{attrs:{value:e.closeItemOrPanelDialog,persistent:"","max-width":"400"}},[t(Jc.Z,[t(yd.EB,{staticClass:"headline"},[e._v(" "+e._s(e.__("You have unsaved changes"))+" ")]),t(yd.ZB,[e._v(" "+e._s(e.sprintf(e._doc("Please save your changes before closing this %s, or discard your changes.","%s: Item type (element, macro, preset)"),e.itemType))+" ")]),t(yd.h7,[t(vc.Z),t(Qo.Z,{attrs:{color:"red darken-1",text:""},on:{click:e.discardChanges}},[e._v(" "+e._s(e.__("Discard my changes"))+" ")]),t(Qo.Z,{attrs:{color:"blue darken-1",text:""},on:{click:function(t){e.closeItemOrPanelDialog=!1}}},[e._v(" "+e._s(e.__("I'll save them"))+" ")])],1)],1)],1)],1)},Em=[],Tm=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(Ha.Z,{attrs:{value:!0,"max-width":"400",persistent:""}},[t(Jc.Z,[t(yd.EB,{staticClass:"headline"},[e._v(e._s(e.sprintf(e._doc("Create new %s","%s: Item type (element, macro, preset)"),e.itemType)))]),t(yd.ZB,{staticClass:"pb-1"},[t("div",[e._v(" "+e._s(e.sprintf(e._doc("Please enter the %s's name.","%s: Item type (element, macro, preset)"),e.itemType))+" ")])]),t(yd.ZB,[t(ed.Z,{attrs:{rules:[e.nameIsValid],label:e.__("Name")},model:{value:e.newItemName,callback:function(t){e.newItemName=t},expression:"newItemName"}}),e.saveLocations.length?t(eg.Z,{attrs:{mandatory:""},scopedSlots:e._u([{key:"label",fn:function(){return[e._v(e._s(e.__("Select a saving location")))]},proxy:!0}]),model:{value:e.newItemSaveLocation,callback:function(t){e.newItemSaveLocation=t},expression:"newItemSaveLocation"}},[e._l(e.saveLocations,(function(n){return[e.showSaveLocation(n)?t(Jh.Z,{key:n.directoryPath,attrs:{label:n.label,value:n}}):e._e()]}))],2):[t("b",{domProps:{innerHTML:e._s(e.noSaveLocationMessage)}})]],2),t(yd.h7,[t(vc.Z),t(Qo.Z,{attrs:{color:"green darken-1",text:""},on:{click:e.closeNewItemDialog}},[e._v(" "+e._s(e.__("Cancel"))+" ")]),t(Qo.Z,{attrs:{color:"blue darken-1",text:"",disabled:!0!==e.nameIsValid(e.newItemName)||!e.newItemSaveLocation},on:{click:e.saveNewItem}},[e._v(" "+e._s(e.__("Create"))+" ")])],1)],1)],1)},Dm=[],Am=n(91362);let Zm=class extends s.ZP{constructor(){super(...arguments),this.newItemDialog=!1,this.newItemName="",this.newItemSaveLocation=!1}nameIsValid(e){return(0,Am.nQ)(e)}get showAdvancedFeatures(){return(0,zg.y)()||Q.PK.isElementStudioPowerUser}escapeHtml(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}get customElementsLink(){const e=this.escapeHtml((0,Ft.__)("Custom Elements"));return`<a href="https://github.com/soflyy/breakdance-custom-elements">${e}</a>`}get noSaveLocationMessage(){return(0,Ft.gB)((0,Ft.__)("Error: no registered saving locations. Using the %s plugin will automatically register a saving location."),this.customElementsLink)}showSaveLocation(e){return e.type===this.itemType&&(!e.onlyForAdvancedUsers||this.showAdvancedFeatures)}saveNewItem(){this.$emit("input",{...this.newItemSaveLocation,name:this.newItemName}),this.closeNewItemDialog()}closeNewItemDialog(){this.newItemDialog=!1,this.newItemName="",this.newItemSaveLocation=!1,this.$emit("close")}};(0,r.gn)([(0,l.fI)()],Zm.prototype,"saveLocations",void 0),(0,r.gn)([(0,l.fI)()],Zm.prototype,"itemType",void 0),Zm=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],Zm);const Om=Zm,Mm=Om;var Bm=(0,N.Z)(Mm,Tm,Dm,!1,null,null,null);const Lm=Bm.exports;let Nm=class extends s.ZP{constructor(){super(...arguments),this.deleteDialog=!1,this.availableItemsSearch="",this.closeItemOrPanelDialog=!1,this.showNewItemDialog=!1}mounted(){document.addEventListener("breakdanceSaveButtonClicked",this.mainAppSaveButtonClicked),this.warnIfUnsavedFunction=(0,Sc.$)((()=>this.hasUnsavedChanges))}destroyed(){document.removeEventListener("breakdanceSaveButtonClicked",this.mainAppSaveButtonClicked)}beforeDestroy(){(0,Sc.e)(this.warnIfUnsavedFunction)}handleNewItem(){this.showNewItemDialog=!0}get availableSaveLocations(){return this.saveLocations.filter((e=>this.showSaveLocation(e)))}get availableItemsBySearch(){return this.itemsSlug.filter((e=>e.toLowerCase().includes(this.availableItemsSearch.toLowerCase().replace(/ /g,""))))}get canDeleteElement(){return!!this.value&&this.availableSaveLocations.find((e=>this.value&&this.value.directoryPath&&this.value.directoryPath.startsWith(e.directoryPath)))}discardChanges(){"panel"===this.closeItemOrPanelDialog&&c.uiStore.toggleElementStudio(),this.closeItemOrPanelDialog=!1,this.$emit("discardChanges")}mainAppSaveButtonClicked(){this.hasUnsavedChanges&&confirm(`Also save your Element Studio ${this.itemType}?`)&&this.saveOverwrite(!1)}openItem(e){this.availableItemsSearch="",this.$emit("open",e)}closeItem(){this.hasUnsavedChanges?this.closeItemOrPanelDialog="item":this.$emit("reset")}closePanel(){this.hasUnsavedChanges?this.closeItemOrPanelDialog="panel":c.uiStore.toggleElementStudio()}saveNewItem(e){this.$emit("saveNew",e)}saveAs(e){this.$emit("saveAs",e)}saveOverwrite(e){this.value&&this.value.directoryPath&&this.canSaveOrIsAdvancedUser&&this.$emit("saveOverride",e)}showSaveLocation(e){return e.type===this.itemType&&(!e.onlyForAdvancedUsers||this.showAdvancedFeatures)}get showAdvancedFeatures(){return(0,zg.y)()||c.configStore.isElementStudioPowerUser}get canSaveOrIsAdvancedUser(){return this.value&&(!this.value.onlyForAdvancedUsers||this.showAdvancedFeatures)}deleteItem(){this.deleteDialog=!1,this.$emit("delete")}switchMode(){this.$emit("switchMode")}};(0,r.gn)([(0,l.fI)()],Nm.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],Nm.prototype,"saveLocations",void 0),(0,r.gn)([(0,l.fI)()],Nm.prototype,"hasUnsavedChanges",void 0),(0,r.gn)([(0,l.fI)()],Nm.prototype,"itemType",void 0),(0,r.gn)([(0,l.fI)()],Nm.prototype,"itemName",void 0),(0,r.gn)([(0,l.fI)()],Nm.prototype,"saveInProgress",void 0),(0,r.gn)([(0,l.fI)()],Nm.prototype,"itemsSlug",void 0),Nm=(0,r.gn)([(0,l.wA)({components:{ElementStudioSaveNewDialog:Lm,NiceButton:Br.Z,Icon:He.Z,Dropdown:Oc.Z}})],Nm);const Fm=Nm,Rm=Fm;var Vm=(0,N.Z)(Rm,km,Em,!1,null,null,null);const $m=Vm.exports;var Wm=n(1387),Um=n(46072),zm=n(197),Hm=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-tabs-panel d-flex flex-column",staticStyle:{height:"100%"}},[e.showNewMacroDialog?t("ElementStudioSaveNewDialog",{attrs:{"save-locations":e.available.saveLocations,"item-type":"macro"},on:{input:e.saveNewMacro,close:function(t){e.showNewMacroDialog=!1}}}):e._e(),t("Dropdown",{attrs:{value:!!e.contextMenu,absolute:!0,"position-x":e.contextMenu.x,"position-y":e.contextMenu.y,transition:!1},on:{input:function(t){e.contextMenu=!1}},scopedSlots:e._u([{key:"activator",fn:function(){return[e._t("default")]},proxy:!0}],null,!0)},[t(Ec.Z,{attrs:{dense:""}},[t(Tc.Z,{attrs:{link:!0},nativeOn:{click:function(t){return e.handleCreateMacro.apply(null,arguments)}}},[t(Dc.V9,[e._v(e._s(e.__("Make into a macro")))])],1)],1)],1),t("div",{staticClass:"element-studio-tabs"},[t(Qp.Z,{attrs:{value:e.tab},on:{change:e.updateTab}},[t(Yp.Z,{attrs:{href:"#content",title:e.__("Content"),"data-test-id":"element-studio-content-tab"}},[t("Icon",{attrs:{icon:"PenIcon",size:"16"}})],1),t(Yp.Z,{attrs:{href:"#design",title:e.__("Design"),"data-test-id":"element-studio-design-tab"}},[t("Icon",{attrs:{icon:"PaletteIcon",size:"16"}})],1),t(Yp.Z,{attrs:{href:"#html",title:e.__("HTML"),"data-test-id":"element-studio-html-tab"}},[t("Icon",{attrs:{icon:"CodeIcon",size:"16"}})],1),t(Yp.Z,{attrs:{href:"#css",title:e.__("CSS"),"data-test-id":"element-studio-css-tab"}},[t("Icon",{attrs:{icon:"Css3Icon",size:"16"}})],1),t(Yp.Z,{attrs:{href:"#defaultCss",title:e.__("Default CSS"),"data-test-id":"element-studio-default-css-tab"}},[t("Icon",{attrs:{icon:"CssIcon",size:"16"}})],1),e.nestingRuleTypeIsContainer?t(Yp.Z,{attrs:{href:"#default-elements",title:e.__("Default Elements"),"data-test-id":"element-studio-default-elements"}},[t("Icon",{attrs:{icon:"BoxIcon",size:"16"}})],1):e._e(),t(Yp.Z,{attrs:{href:"#attributes",title:e.__("HTML Attributes"),"data-test-id":"element-studio-attributes"}},[t("Icon",{attrs:{icon:"AttributesIcon",size:"16"}})],1),t(Yp.Z,{attrs:{href:"#prop-paths",title:e.__("Property Paths"),"data-test-id":"element-studio-property-paths"}},[t("Icon",{attrs:{icon:"SlidersSimpleIcon",size:"16"}})],1),t(Yp.Z,{attrs:{href:"#dependencies",title:e.__("Dependencies"),"data-test-id":"element-studio-dependencies-tab"}},[t("Icon",{attrs:{icon:"DownloadFileIcon",size:"16"}})],1),t(Yp.Z,{attrs:{href:"#actions",title:e.__("Actions"),"data-test-id":"element-studio-actions-tab"}},[t("Icon",{attrs:{icon:"ActionsIcon",size:"16"}})],1),t(Yp.Z,{attrs:{href:"#settings",title:e.__("Settings"),"data-test-id":"element-studio-settings-tab"}},[t("Icon",{attrs:{icon:"CogsIcon",size:"16"}})],1)],1)],1),t("div",{staticClass:"element-studio-tabs-items vscroll-scroll"},["settings"===e.tab?t("div",[t(Tc.Z,{attrs:{"two-line":""}},[t(Dc.km,[t(Dc.V9,{staticClass:"font-weight-bold"},[e._v(e._s(e.__("Slug")))]),t(Dc.oZ,[e._v(" "+e._s(e.element.slug))])],1)],1),t("div",{staticClass:"px-4 pt-2"},[t("div",{staticClass:"d-flex align-center"},[t(ed.Z,{attrs:{label:e.__("Name"),value:e.element.name,"data-test-id":"element-studio-name-input",rules:[e.isValidItemName]},on:{input:e.updateElementName}}),e.nameHasChanged?t(Qo.Z,{staticClass:"ml-3",attrs:{outlined:"",small:""},on:{click:e.updateSlug}},[e._v(" "+e._s(e.__("Update slug"))+" ")]):e._e()],1),t(ed.Z,{staticClass:"mb-4",attrs:{label:e.__("Class Name"),placeholder:e.__("the_best_class"),value:e.element.className||"","data-test-id":"element-studio-classname-input","persistent-hint":"",hint:e.__("Updating the Class Name will make the previous class obsolete. You'll need to update your CSS"),rules:[e.htmlClassNameRule]},on:{input:e.updateClassName}}),t(tg.Z,{attrs:{items:e.elementCategories,label:e.__("Category"),value:e.cleanElement.category},on:{input:function(t){return e.updateElementValue("category",t)}}}),t("div",{staticClass:"breakdance-element-studio-element-badges"},[t(Wm.Z,{attrs:{clearable:"",items:e.badgeColors,value:!!e.cleanElement.badge&&e.cleanElement.badge.backgroundColor,label:e.__("Badge Background")},on:{input:function(t){return e.updateElementValue("badge.backgroundColor",t)}}}),t(Wm.Z,{attrs:{clearable:"",items:e.badgeColors,value:!!e.cleanElement.badge&&e.cleanElement.badge.textColor,label:e.__("Badge Text")},on:{input:function(t){return e.updateElementValue("badge.textColor",t)}}}),t(ed.Z,{attrs:{label:e.__("Badge Label"),value:!!e.cleanElement.badge&&e.cleanElement.badge.label},on:{input:function(t){return e.updateElementValue("badge.label",t)}}}),t(Qo.Z,{attrs:{outlined:"",small:""},on:{click:function(t){return e.updateElementValue("badge",!1)}}},[e._v(e._s(e.__("Clear Badge")))])],1),t("h3",[e._v(e._s(e.__("HTML Tag options")))]),t("div",{staticClass:"breakdance-element-studio__html-tags"},[t(Wm.Z,{attrs:{label:e.__("Default Tag"),value:e.cleanElement.htmlTag.default,hint:e.__("Tag of the root element"),clearable:"",items:e.defaultTag},on:{input:function(t){return e.updateElementValue("htmlTag.default",t)}}}),t(Wm.Z,{attrs:{label:e.__("Tag Options"),value:e.cleanElement.htmlTag.options,items:e.htmlTags,multiple:!0,clearable:""},on:{input:function(t){return e.updateElementValue("htmlTag.options",t)}}}),t(Wm.Z,{attrs:{label:e.__("Get the Tag from a Control's path"),value:e.cleanElement.htmlTag.pathToControl||"",items:e.pathsToAllControls,hint:e.__("This will disable the 'Settings -> Html -> Tag' control"),clearable:""},on:{input:function(t){return e.updateElementValue("htmlTag.pathToControl",t)}}})],1),t("h3",[e._v(e._s(e.__("UI Icon")))]),t("div",{staticClass:"mb-5 d-flex align-center"},[e.showAdvancedFeatures?[t("ToggleInput",{attrs:{value:e.useLocalIcon},on:{input:e.updateUseLocalIcon}}),t("span",{staticClass:"mr-4"},[e._v(e._s(e.__("Local")))])]:e._e(),t("div",{staticClass:"d-flex align-center"},[t("ElementIcon",{staticClass:"mr-2",attrs:{icon:e.cleanElement.uiIcon||"SquareIcon",size:"16"}}),e.useLocalIcon&&e.showAdvancedFeatures?t("ElementStudioIconsAutocomplete",{attrs:{value:e.cleanElement.uiIcon||"SquareIcon"},on:{input:e.updateUiIcon}}):t(ed.Z,{attrs:{label:e.__("SVG code for icon"),value:e.cleanElement.uiIcon,"data-test-id":"element-studio-ui-icon-input"},on:{input:e.updateUiIcon}})],1)],2),t(ed.Z,{attrs:{label:e.__("UI Order (number)"),value:e.cleanElement.order},on:{input:e.updateUiOrder}}),t("h3",[e._v(e._s(e.__("Nesting rules")))]),t(Wm.Z,{attrs:{items:e.containerRestrictedElements,label:e.__("Element to be a direct child of"),hint:e.__("This element will only be allowed as a direct child of the selected elements"),"persistent-hint":"",value:e.cleanElement.nestingRule.restrictedToBeADirectChildOf,multiple:""},on:{input:function(t){e.updateElementValue("nestingRule.restrictedToBeADirectChildOf",Array.isArray(t)&&0===t.length?void 0:t)}}}),t(Wm.Z,{staticClass:"mt-4",attrs:{items:e.elementsThisElementIsAllowedToBeInsideOf,label:e.__("Element to be a descendant of"),hint:e.__("This element will only be allowed inside the selected elements"),"persistent-hint":"",value:e.cleanElement.nestingRule.restrictedToBeADescendantOf,multiple:""},on:{input:function(t){e.updateElementValue("nestingRule.restrictedToBeADescendantOf",Array.isArray(t)&&0===t.length?void 0:t)}}}),t(Wm.Z,{staticClass:"mt-4",attrs:{items:e.allElementSlugs,label:e.__("Disallow if others are present"),hint:e.__("This element will not be allowed on a page if one of the following elements is already present on the page"),"persistent-hint":"",value:e.cleanElement.nestingRule.notAllowedWhenNodeTypeIsPresentInTree,multiple:""},on:{input:function(t){e.updateElementValue("nestingRule.notAllowedWhenNodeTypeIsPresentInTree",Array.isArray(t)&&0===t.length?void 0:t)}}}),t(Um.Z,{attrs:{label:e.__("Inline Editable"),hint:e.__("This element contains a Global Block that can be edited inline. Requires a Global Block Chooser control to be present."),"persistent-hint":"","input-value":e.cleanElement.nestingRule.inlineEditable},on:{change:function(t){return e.updateElementValue("nestingRule.inlineEditable",!!t)}}}),t(Wm.Z,{staticClass:"mt-4",attrs:{items:e.pathsToAllControls,label:e.__("Inline Editable Block Path"),value:e.cleanElement.nestingRule.inlineEditableBlockPath},on:{input:function(t){return e.updateElementValue("nestingRule.inlineEditableBlockPath",t)}}}),t("h3",[e._v(e._s(e.__("Misc options")))]),t(tg.Z,{attrs:{items:e.elementType,label:e.__("Element Type"),value:e.cleanElement.nestingRule.type,hint:e.__("Only change to create complex elements"),"persistent-hint":""},on:{input:function(t){return e.updateElementValue("nestingRule.type",t)}}}),t(zm.Z,{staticClass:"mt-3",attrs:{label:e.__("Required plugins"),items:e.requiredPluginItems,"hide-details":"",value:e.cleanElement.settings?e.cleanElement.settings.requiredPlugins:[],multiple:!0},on:{input:function(t){return e.updateElementValue("settings.requiredPlugins",t&&t.length?t:void 0)}}}),t(Um.Z,{attrs:{label:e.__("Is Pro Only"),"input-value":e.cleanElement.settings&&e.cleanElement.settings.proOnly,"hide-details":""},on:{change:function(t){return e.updateElementValue("settings.proOnly",!!t)}}}),t(Um.Z,{attrs:{label:e.__("Element depends on global scripts to work"),"input-value":e.cleanElement.settings&&e.cleanElement.settings.dependsOnGlobalScripts,"hide-details":""},on:{change:function(t){return e.updateElementValue("settings.dependsOnGlobalScripts",!!t)}}}),t(Um.Z,{attrs:{label:e.__("Experimental Element?"),"input-value":e.cleanElement.experimental,"hide-details":""},on:{change:function(t){return e.updateElementValue("experimental",!!t)}}}),t(Um.Z,{attrs:{label:e.__("Bypass Pointer Events"),hint:e.__("Use this if clicking on the element doesn't active it, but instead clicks something inside of it"),"persistent-hint":"","input-value":e.cleanElement.settings&&e.cleanElement.settings.bypassPointerEvents},on:{change:function(t){return e.updateElementValue("settings.bypassPointerEvents",!!t)}}}),t(Um.Z,{attrs:{label:e.__("Disable AI"),hint:e.__("Use this if you want to disable the AI for this element"),"persistent-hint":"","input-value":e.cleanElement.settings&&e.cleanElement.settings.disableAI},on:{change:function(t){return e.updateElementValue("settings.disableAI",!!t)}}}),t(Um.Z,{attrs:{label:e.__("Share props with SSR children"),hint:e.__("Use this if you need to access the properties data from this element in a child SSR element."),"persistent-hint":"","input-value":e.cleanElement.settings&&e.cleanElement.settings.sharePropsWithSSRChildren},on:{change:function(t){return e.updateElementValue("settings.shareStateWithChildSSR",!!t)}}}),t(Um.Z,{attrs:{label:e.__("Disable Wrapper HTML Tag (frontend-only)"),hint:e.__("Note: This breaks JavaScript functionality that relies on the tag being present (Ex: %%SELECTOR%%)"),"persistent-hint":"","input-value":e.cleanElement.settings&&e.cleanElement.settings.disableWrapperHtmlTag},on:{change:function(t){return e.updateElementValue("settings.disableRootHtmlTag",!!t)}}}),t(Um.Z,{attrs:{label:e.__("Builder Only"),hint:e.__("Use this if the element should only be visible in the builder"),"persistent-hint":"","input-value":e.cleanElement.settings&&e.cleanElement.settings.builderOnly},on:{change:function(t){return e.updateElementValue("settings.builderOnly",!!t)}}}),t("div",{staticClass:"pt-4"},[t("h3",[e._v(e._s(e.__("Add panel rules")))]),t(Um.Z,{attrs:{label:e.__("Always hide element from the Add Panel"),"input-value":e.cleanElement.addPanelRules&&e.cleanElement.addPanelRules.alwaysHide,"hide-details":""},on:{change:function(t){return e.updateElementValue("addPanelRules.alwaysHide",!!t)}}}),e.cleanElement.addPanelRules&&e.cleanElement.addPanelRules.alwaysHide?e._e():[t(zm.Z,{attrs:{label:e.__("Allowed post type"),items:["breakdance_template"],"hide-details":"",value:e.cleanElement.addPanelRules?e.cleanElement.addPanelRules.allowedPostTypes:[],multiple:!0},on:{input:function(t){return e.updateElementValue("addPanelRules.allowedPostTypes",t&&t.length?t:void 0)}}})]],2),t("ElementStudioDefaultProperties",{staticClass:"my-8",attrs:{elementSlug:e.cleanElement.slug,value:e.cleanElement.defaultProperties},on:{input:function(t){return e.updateElementValue("defaultProperties",t)}}}),e.showAdvancedFeatures?[t("h3",[e._v(e._s(e.__("Available In")))]),t("div",{staticClass:"breakdance-element-studio__available-in"},[t(Wm.Z,{attrs:{label:e.__("Available In"),value:e.cleanElement.availableIn,items:["breakdance","oxygen"],multiple:!0,clearable:""},on:{input:function(t){return e.updateElementValue("availableIn",t)}}})],1)]:e._e()],2)],1):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:"design"===e.tab,expression:"tab === 'design'"}]},[t("ElementStudioControls",{attrs:{value:e.cleanElement.controls,section:"design"}})],1),t("div",{directives:[{name:"show",rawName:"v-show",value:"content"===e.tab,expression:"tab === 'content'"}]},[t("ElementStudioControls",{attrs:{value:e.cleanElement.controls,section:"content"}})],1),"html"===e.tab?t("div",[t("CodeInput",{attrs:{value:e.cleanElement.template,tags:e.tags,"twig-variables":e.pathsToAllControls,language:"twig/html"},on:{input:function(t){return e.updateElementValue("template",t||"")}}})],1):e._e(),"css"===e.tab?t("div",[t("CodeInput",{attrs:{value:e.cleanElement.cssTemplate,tags:e.tags,"twig-variables":e.pathsToAllControls,language:"twig/css"},on:{input:function(t){return e.updateElementValue("cssTemplate",t||"")}}})],1):e._e(),"defaultCss"===e.tab?t("div",[t("div",{staticClass:"px-4 py-2"},[e._v(" "+e._s(e.__("Element's class:"))+" "),t("span",{staticClass:"font-weight-bold mr-2"},[e._v(e._s(e.elementClass))]),t("CopyButton",{attrs:{"value-to-copy":e.elementClassToCopy}})],1),t("CodeInput",{attrs:{value:e.cleanElement.defaultCss,language:"css"},on:{input:function(t){return e.updateElementValue("defaultCss",t||"")}}})],1):e._e(),e.nestingRuleTypeIsContainer?t("div",{directives:[{name:"show",rawName:"v-show",value:"default-elements"===e.tab,expression:"tab === 'default-elements'"}],staticClass:"studio-default-elements-panel"},[t("ElementStudioDefaultElements",{attrs:{value:e.cleanElement.defaultChildren,"parent-element-slug":e.cleanElement.slug},on:{input:function(t){return e.updateElementValue("defaultChildren",t||"")}}})],1):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:"attributes"===e.tab,expression:"tab === 'attributes'"}],staticClass:"studio-dependencies-panel"},[e._v(" "+e._s(e.__("Attributes are added to the container of the element"))+" "),t("ElementStudioAttributes",{attrs:{value:e.cleanElement.attributes},on:{input:function(t){return e.updateElementValue("attributes",t)}}}),t("br"),e._v(" "+e._s(e.__("Classes are added to the container of the element"))+" "),t("ElementStudioAdditionalClasses",{attrs:{value:e.cleanElement.additionalClasses||[]},on:{input:function(t){return e.updateElementValue("additionalClasses",t)}}})],1),t("div",{directives:[{name:"show",rawName:"v-show",value:"prop-paths"===e.tab,expression:"tab === 'prop-paths'"}]},[t("ElementStudioManagePropertyPaths",{attrs:{value:e.cleanElement}})],1),t("div",{directives:[{name:"show",rawName:"v-show",value:"dependencies"===e.tab,expression:"tab === 'dependencies'"}],staticClass:"studio-dependencies-panel"},[t("ElementStudioDependencies",{attrs:{value:e.cleanElement.dependencies}})],1),t("div",{directives:[{name:"show",rawName:"v-show",value:"actions"===e.tab,expression:"tab === 'actions'"}]},[t("ElementStudioAction",{attrs:{"action-key":"onPropertyChange",value:e.cleanElement.actions,"accordion-state":e.actionsAccordionState},on:{toggle:e.toggleActionAccordion},scopedSlots:e._u([{key:"action-description",fn:function(){return[e._v(" "+e._s(e.__("Runs after one of this element's property changes (a value in a control)"))+" ")]},proxy:!0},{key:"dependency-description-title",fn:function(){return[e._v(" "+e._s(e.__("Based on the control's path."))+" ")]},proxy:!0},{key:"dependency-description",fn:function(){return[t("code",[e._v("design.background.color")]),e._v(": "+e._s(e.__("Action will only run for the specified path."))+" "),t("code",[e._v("design.background.*")]),e._v(": "+e._s(e.__("Action will run for any control below 'background'."))+" ")]},proxy:!0}])}),t("ElementStudioAction",{attrs:{"action-key":"onMovedElement",value:e.cleanElement.actions,"accordion-state":e.actionsAccordionState},on:{toggle:e.toggleActionAccordion},scopedSlots:e._u([{key:"action-description",fn:function(){return[e._v(" "+e._s(e.__("Runs after this element is moved in the canvas."))+" ")]},proxy:!0},{key:"dependency-description-title",fn:function(){return[e._v(" "+e._s(e.__("Based on the element's and moved-on element's type."))+" ")]},proxy:!0},{key:"dependency-description",fn:function(){return[t("code",[e._v("EssentialElements\\Text")]),e._v(": "+e._s(e.__("Action will only run if element being moved is of that type, OR if the element was moved onto an element with that type."))+" ")]},proxy:!0}])}),t("ElementStudioAction",{attrs:{"action-key":"onAfterDeletedElement",value:e.cleanElement.actions,"accordion-state":e.actionsAccordionState},on:{toggle:e.toggleActionAccordion},scopedSlots:e._u([{key:"action-description",fn:function(){return[e._v(" "+e._s(e.__("Runs AFTER this element was deleted"))+" "),t("br")]},proxy:!0},{key:"dependency-description-title",fn:function(){return[e._v(" "+e._s(e.__("Based on the deleted element's parent type."))+" ")]},proxy:!0},{key:"dependency-description",fn:function(){return[t("code",[e._v("EssentialElements\\Section")]),e._v(": "+e._s(e.__("Action will only run if the deleted element was inside a Section element."))+" ")]},proxy:!0}])}),t("ElementStudioAction",{attrs:{"action-key":"onBeforeDeletingElement",value:e.cleanElement.actions,"accordion-state":e.actionsAccordionState,"with-dependencies":!1},on:{toggle:e.toggleActionAccordion},scopedSlots:e._u([{key:"action-description",fn:function(){return[e._v(" "+e._s(e.__("Runs BEFORE this element is deleted"))+" ")]},proxy:!0}])}),t("ElementStudioAction",{attrs:{"action-key":"onMountedElement",value:e.cleanElement.actions,"accordion-state":e.actionsAccordionState,"with-dependencies":!1},on:{toggle:e.toggleActionAccordion},scopedSlots:e._u([{key:"action-description",fn:function(){return[e._v(" "+e._s(e.__("Runs after this element renders in the canvas"))+" ")]},proxy:!0}])}),t("ElementStudioAction",{attrs:{"action-key":"onCreatedElement",value:e.cleanElement.actions,"accordion-state":e.actionsAccordionState,"with-dependencies":!1},on:{toggle:e.toggleActionAccordion},scopedSlots:e._u([{key:"action-description",fn:function(){return[e._v(" "+e._s(e.__("Runs after adding this element to the canvas for the first time"))+" ")]},proxy:!0}])}),t("ElementStudioAction",{attrs:{"action-key":"onActivatedElement",value:e.cleanElement.actions,"accordion-state":e.actionsAccordionState,"with-dependencies":!1},on:{toggle:e.toggleActionAccordion},scopedSlots:e._u([{key:"action-description",fn:function(){return[e._v(" "+e._s(e.__("Runs after the element is activated (selected)"))+" ")]},proxy:!0}])})],1)])],1)},Gm=[],Km=n(63842),jm=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("draggable",{attrs:{value:e.value[this.sectionName]},on:{input:e.handleDrag}},e._l(e.value[this.sectionName],(function(n,s){return t("ControlSectionOrControl",{key:n.slug,attrs:{value:n,index:s,path:`${e.sectionName}[${s}]`,parentPath:e.sectionName,twigParentPath:e.section}})})),1),t("div",{staticClass:"text-center py-4"},[t(Qo.Z,{attrs:{tile:"",text:"","data-test-id":"element-studio-add-control-section"},on:{click:e.addSection}},[e._v(" "+e._s(e.__("Add Control Section"))+" ")]),t(Qo.Z,{attrs:{tile:"",text:""},on:{click:e.addPreset}},[e._v(" "+e._s(e.__("Add Preset"))+" ")]),e.canPaste?t(Qo.Z,{attrs:{tile:"",text:""},on:{click:e.handlePaste}},[e._v(" "+e._s(e.__("Paste"))+" ")]):e._e()],1)],1)},qm=[],Xm=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[e.showNewPresetDialog?t("ElementStudioSaveNewDialog",{attrs:{"item-type":"preset","save-locations":e.elementStudioData.saveLocations},on:{input:e.saveNewPreset,close:function(t){e.showNewPresetDialog=!1}}}):e._e(),t("div",{class:e.classList},[t("Accordion",{attrs:{expanded:e.accordionState[e.index],disableToggle:e.isPresetSection},on:{toggle:function(t){return e.toggleAccordion(e.index)}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"d-flex flex-row justify-space-between align-center",attrs:{"data-test-id":"element-studio-control-accordion"}},["section"!==e.value.options.type||e.isPresetSection?t("Dropdown",{attrs:{"offset-y":"","close-on-content-click":!1,"max-width":"400","max-height":"450"},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:s}){return[t(Qo.Z,e._g(e._b({staticClass:"mr-2",attrs:{small:"",icon:"",title:e.__("Open Twig Code Helper")}},"v-btn",s,!1),n),[t("Icon",{attrs:{icon:"BracketsIcon"}})],1)]}}],null,!1,4222967914),model:{value:e.codeHelpOpen,callback:function(t){e.codeHelpOpen=t},expression:"codeHelpOpen"}},[t(Jc.Z,{staticClass:"element-studio-poppy-card",staticStyle:{width:"400px",height:"300px"}},[t("TwigCodeHelper",{key:e.keyToRerenderCodeHelp,attrs:{control:e.value,twigParentPath:e.twigParentPath,inRepeater:e.isParentARepeater},on:{close:function(t){e.codeHelpOpen=!1}}})],1)],1):e._e(),t("input",{staticClass:"element-studio-control-label-input",attrs:{placeholder:e.__("Label")},domProps:{value:e.value.label},on:{click:function(e){e.stopPropagation()},focusout:e.updateLabelAndSlugOnFocusOut}}),e.isPresetSection?t(Wm.Z,{staticClass:"element-studio-control-type-dropdown mr-2",attrs:{value:e.presetSectionSlug,items:e.availablePresetSections,dense:"","hide-details":"","data-test-id":"element-studio-control-type-dropdown"},on:{input:e.updatePresetSectionSlug}}):e._e(),"section"!==e.value.options.type?t(Wm.Z,{staticClass:"element-studio-control-type-dropdown mr-2",attrs:{value:e.value.options.type,items:e.controlTypes,dense:"","hide-details":"","data-test-id":"element-studio-control-type-dropdown"},on:{input:e.updateControlType}}):e._e(),e.isSection?e._e():t("Dropdown",{attrs:{"offset-y":"","close-on-content-click":!1,"max-height":"450"},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:s}){return[t(Qo.Z,e._g(e._b({attrs:{small:"",icon:"",title:e.__("Open options"),"data-test-id":"element-studio-control-open-options"}},"v-btn",s,!1),n),[t("Icon",{attrs:{icon:"SlidersIcon",size:"12"}})],1)]}}],null,!1,3838845841)},[t(Jc.Z,{staticClass:"element-studio-poppy-card",attrs:{"data-test-id":"element-studio-control-options-card"}},[t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{label:e.__("Make this control's value available in all breakpoints"),"input-value":!!e.shouldControlValueBeAddedInAllBreakpoints,"hide-details":""},on:{change:e.updatePropertyPathsToWhitelistInFlatProps}}),e.autofocusSupported?t(Fg.Z,{attrs:{label:e.__("Autofocus"),value:e.value.options.autofocus},on:{change:function(t){return e.updateOptions(t,"autofocus")}}}):e._e(),e.hasSsr?t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{label:e.__("Make the element SSR when this control's value changes"),"input-value":!!e.shouldControlValueCauseSsr,"hide-details":""},on:{change:e.updatePropertyPathsToSsrElementWhenValueChanges}}):e._e(),"alert_box"===e.value.options.type||"pro_only_alert_box"===e.value.options.type?[t("ElementStudioAlertBoxOptions",{attrs:{value:e.value.options.alertBoxOptions},on:{input:function(t){return e.updateOptions(t,"alertBoxOptions")}}})]:e._e(),"date_picker"===e.value.options.type?[t("h3",{staticClass:"mb-3"},[e._v(e._s(e.__("Date picker options")))]),t("DropdownInput",{attrs:{value:e.value.options.datePickerOptions?Object.keys(e.value.options.datePickerOptions)[0]:"",items:e.datePickerOptions,clearable:""},on:{input:function(t){return e.updateOptions({[t]:t},"datePickerOptions")}}})]:e._e(),"multiselect"===e.value.options.type||"dropdown"===e.value.options.type||"button_bar"===e.value.options.type?[t("ElementStudioDropdownOptions",{attrs:{path:e.path,control:e.value,value:e.value.options.dropdownOptions},on:{input:function(t){return e.updateOptions(t,"dropdownOptions")},updateDropdownItems:e.updateDropdownItems,updateDropdownItem:e.updateDropdownItem}})]:e._e(),"button_bar"===e.value.options.type?[t(Fg.Z,{attrs:{label:e.__("Big Button Bar"),value:e.value.options.buttonBarOptions&&"big"===e.value.options.buttonBarOptions.size&&"default"===e.value.options.buttonBarOptions.layout,"hide-details":""},on:{change:e.updateButtonBarOptionsSize}}),t(Fg.Z,{attrs:{label:e.__("Multiline Bar"),value:e.value.options.buttonBarOptions&&"multiline"===e.value.options.buttonBarOptions.layout&&"small"===e.value.options.buttonBarOptions.size,"hide-details":""},on:{change:e.updateButtonBarOptionsLayout}})]:e._e(),"trigger_action_button"===e.value.options.type?[t("h3",{staticClass:"mb-3"},[e._v(" "+e._s(e.__("Trigger action button options"))+" ")]),t("TextInput",{staticClass:"mr-3 d-inline-block",attrs:{label:e.__("Button Text"),value:e.value.options.triggerActionsButtonOptions&&e.value.options.triggerActionsButtonOptions.text},on:{input:function(t){return e.updateOptions({...e.value.options.triggerActionsButtonOptions,text:t||""},"triggerActionsButtonOptions")}}}),t("ElementStudioIconsAutocomplete",{staticClass:"d-inline-block",attrs:{value:e.value.options.triggerActionsButtonOptions&&e.value.options.triggerActionsButtonOptions.icon},on:{input:function(t){return e.updateOptions({...e.value.options.triggerActionsButtonOptions,icon:t},"triggerActionsButtonOptions")}}})]:e._e(),e.isRepeater?[t("ElementStudioRepeaterOptions",{attrs:{control:e.value,value:e.value.options.repeaterOptions},on:{input:function(t){return e.updateOptions(t,"repeaterOptions")}}})]:e._e(),"unit"===e.value.options.type?[t("ElementStudioUnitOptions",{attrs:{value:e.value.options.unitOptions},on:{input:function(t){return e.updateOptions(t,"unitOptions")}}})]:e._e(),"wpmedia"===e.value.options.type?[t("ElementStudioMediaOptions",{attrs:{value:e.value.options.mediaOptions},on:{input:function(t){return e.updateOptions(t,"mediaOptions")}}})]:e._e(),"video"===e.value.options.type?[t("ElementStudioVideoOptions",{attrs:{value:e.value.options.videoOptions},on:{input:function(t){return e.updateOptions(t,"videoOptions")}}})]:e._e(),"unit"===e.value.options.type||"number"===e.value.options.type||"slider"===e.value.options.type?[t("ElementStudioRangeOptions",{attrs:{value:e.value.options.rangeOptions},on:{input:function(t){return e.updateOptions(t,"rangeOptions")}}})]:e._e(),"shadow"===e.value.options.type?[e._v(" "+e._s(e.__("Shadow Type"))+" "),t(tg.Z,{staticClass:"pt-3",attrs:{dense:"",items:e.shadowTypes,value:e.value.options.shadowOptions&&e.value.options.shadowOptions.type||"box"},on:{input:e.updateShadowType}})]:e._e(),"breakpoint_dropdown"===e.value.options.type?[t("ElementStudioBreakpointOptions",{attrs:{value:e.value.options.breakpointOptions},on:{input:function(t){return e.updateOptions(t,"breakpointOptions")}}})]:e._e(),"text"===e.value.options.type?[t("h3",{staticClass:"mb-2"},[e._v(e._s(e.__("Text")))]),t(Fg.Z,{attrs:{label:e.__("Multiline"),value:e.value.options.textOptions&&e.value.options.textOptions.multiline,"hide-details":""},on:{change:e.updateTextOptionsMultiline}}),t("h3",{staticClass:"mb-2"},[e._v(e._s(e.__("Text Format")))]),t("DropdownInput",{attrs:{value:e.value.options.textOptions&&e.value.options.textOptions.format,items:[{text:e.__("HTML"),value:"html"},{text:e.__("Plain Text"),value:"plain"}]},on:{input:e.updateTextOptionsFormat}})]:e._e(),"focus_point"===e.value.options.type?[t("ElementStudioFocusPointOptions",{attrs:{value:e.value.options.focusPointOptions,control:e.value},on:{input:function(t){return e.updateOptions(t,"focusPointOptions")}}})]:e._e(),"media_size_dropdown"===e.value.options.type?[t("ElementStudioMediaSizeOptions",{attrs:{value:e.value.options.mediaSizeOptions,control:e.value},on:{input:function(t){return e.updateOptions(t,"mediaSizeOptions")}}})]:e._e(),"post_chooser"===e.value.options.type?[t("ElementStudioPostChooserOptions",{attrs:{value:e.value.options.postChooserOptions,control:e.value},on:{input:function(t){return e.updateOptions(t,"postChooserOptions")}}})]:e._e(),"icon"===e.value.options.type?[t("ElementStudioIconOptions",{attrs:{value:e.value.options.iconOptions},on:{input:function(t){return e.updateOptions(t,"iconOptions")}}})]:e._e(),"color"===e.value.options.type?[t("h3",{staticClass:"mb-2"},[e._v(e._s(e.__("Color Type")))]),t("DropdownInput",{attrs:{value:e.value.options.colorOptions&&e.value.options.colorOptions.type||"solidOnly",items:[{text:e.__("Solid Only"),value:"solidOnly"},{text:e.__("Solid and Gradient"),value:"solidAndGradient"},{text:e.__("Gradient Only"),value:"gradientOnly"}]},on:{input:e.updateColorType}})]:e._e(),e.isSection?e._e():[t("h3",[e._v(e._s(e.__("Dynamic Property")))]),t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{label:e.__("Enable dynamic property"),"input-value":!!e.value?.dynamic,"hide-details":""},on:{change:e.updateDynamic}}),e.value?.dynamic?[t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{label:e.__("Make dynamic data Pro only"),"input-value":e.value.dynamic.proOnly,"hide-details":""},on:{change:function(t){return e.updateDynamic(!0,e.value?.dynamic?.accepts,t)}}}),t("h4",{staticClass:"mb-1"},[e._v(e._s(e.__("Dynamic Property Type")))]),t("DropdownInput",{attrs:{items:e.dynamicPathAcceptsItems,value:e.value?.dynamic?.accepts},on:{input:function(t){return e.updateDynamic(!0,t,e.value?.dynamic?.proOnly)}}})]:e._e()],"add_registered_children"===e.value.options.type?[t("h3",[e._v(" "+e._s(e.__("Registered Children options: add extra elements"))+" ")]),e.availableDescendantElements.length?t("div",{staticClass:"d-flex align-center"},[t(Wm.Z,{staticClass:"element-studio-control-type-dropdown mr-4 mt-2",attrs:{items:e.availableDescendantElements,value:e.value.options.addRegisteredChildrenOptions&&e.value.options.addRegisteredChildrenOptions.addExtraElementsBySlug,dense:"","hide-details":"","data-test-id":"element-studio-control-type-dropdown",multiple:""},on:{input:e.updateAddExtraElementsBySlug}}),t("IconButton",{attrs:{icon:"TrashIcon"},on:{click:function(t){return e.updateAddExtraElementsBySlug([])}}})],1):t("div",[e._v(" "+e._s(e.__("No available extra elements."))+" ")])]:e._e(),"code"===e.value.options.type?[t("h3",[e._v(e._s(e.__("Code input options")))]),t("DropdownInput",{staticClass:"pt-3",attrs:{items:e.codeTypes,value:e.value.options.codeOptions&&e.value.options.codeOptions.language},on:{input:e.updateCodeType}})]:e._e(),"text"===e.value.options.type||"richtext"===e.value.options.type?[t("ElementStudioVariableOptions",{attrs:{path:e.path,control:e.value,value:e.value.options.variableOptions},on:{input:function(t){return e.updateOptions(t,"variableOptions")},updateVariableItems:e.updateVariableItems,updateVariableItem:e.updateVariableItem}})]:e._e(),t("h3",[e._v(e._s(e.__("Misc Options")))]),e.isBreakdanceDevelopmentEnvironment?t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{label:e.__("Disable In FutureLayer"),"input-value":e.value.options.disabledInFutureLayer,"hide-details":""},on:{change:e.updateDisabledInFutureLayer}}):e._e(),e.isInContentTab?[t(Um.Z,{attrs:{label:e.__("See content editable code"),"hide-details":""},model:{value:e.showContentEditableCode,callback:function(t){e.showContentEditableCode=t},expression:"showContentEditableCode"}}),e.showContentEditableCode?[t("Copyable",{staticClass:"element-studio-inline-helper-code",attrs:{shouldCopy:!1}},[e._v(" "+e._s(e.contentEditableHelperCode)+" ")])]:e._e()]:e._e(),t("div",[e.isInContentTab?e._e():[t("div",{staticClass:"d-flex flex-row"},[t(Um.Z,{attrs:{disabled:e.canHaveMediaQueries,label:e.__("Enable Media Queries"),"input-value":e.value.enableMediaQueries,"hide-details":""},on:{change:function(t){return e.updateControlBoolean(t,"enableMediaQueries")}}})],1)],t("div",{staticClass:"d-flex flex-row"},[t(Um.Z,{attrs:{label:e.__("Enable Hover"),"input-value":e.value.enableHover,"hide-details":""},on:{change:function(t){return e.updateControlBoolean(t,"enableHover")}}})],1),t("div",{staticClass:"d-flex flex-row"},[t(Um.Z,{attrs:{label:e.__("Enable Variables"),"input-value":e.value.enableVariables,"hide-details":""},on:{change:function(t){return e.updateControlBoolean(t,"enableVariables")}}})],1),t("h3",[e._v(e._s(e.__("Layout")))]),t("DropdownInput",{staticClass:"pt-3",attrs:{items:e.controlLayouts,value:e.value.options.layout},on:{input:e.updateControlLayout}}),"text"===e.value.options.type||"dropdown"===e.value.options.type||"multiselect"===e.value.options.type?[t("h3",[e._v(e._s(e.__("Placeholder")))]),t("TextInput",{attrs:{value:e.value.options.placeholder},on:{input:e.updatePlaceholder}})]:e._e(),t("h3",[e._v(e._s(e.__("Keywords")))]),t("TextInput",{attrs:{value:e.keywordsValue},on:{input:e.updateKeywords}}),t("h3",[e._v(e._s(e.__("Slug")))]),t("input",{staticClass:"breakdance-white-gray-outlined-input breakdance-simple-input breakdance-simple-input--text breakdance-simple-input--base",attrs:{placeholder:e.__("Slug")},domProps:{value:e.value.slug},on:{click:function(e){e.stopPropagation()},focusout:e.updateSlugOnFocusOut}}),t("ElementStudioConditionInput",{attrs:{value:e.value.options.condition},on:{input:e.updateConditions}}),t("ElementStudioHideControlInput",{attrs:{value:e.value.options.hideForElements},on:{input:e.updateHideForElements,remove:e.deleteHideForElements}})],2)],2)],1),e.isSection?t("Dropdown",{attrs:{"offset-y":"","close-on-content-click":!1,"max-height":"450"},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:s}){return[t(Qo.Z,e._g(e._b({attrs:{small:"",icon:"",title:e.__("Open options"),"data-test-id":"element-studio-control-open-options"}},"v-btn",s,!1),n),[t("Icon",{attrs:{icon:"SlidersIcon",size:"12"}})],1)]}}],null,!1,3838845841)},[t(Jc.Z,{staticClass:"element-studio-poppy-card",attrs:{"data-test-id":"element-studio-control-options-card"}},[e.isPresetSection?e._e():t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{label:e.__("Make all control values in this section available in all breakpoints"),"input-value":!!e.shouldControlValueBeAddedInAllBreakpoints,"hide-details":""},on:{change:e.updatePropertyPathsToWhitelistInFlatProps}}),e.hasSsr?t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{label:e.__("Make the element SSR when any child control value changes"),"input-value":!!e.shouldControlValueCauseSsr,"hide-details":""},on:{change:e.updatePropertyPathsToSsrElementWhenValueChanges}}):e._e(),t("h3",[e._v(e._s(e.__("Section Layout")))]),t(tg.Z,{staticClass:"pt-3",attrs:{dense:"",items:e.sectionLayouts,value:e.value.options.sectionOptions&&e.value.options.sectionOptions.type},on:{input:e.updateSectionLayoutType}}),t("h3",[e._v(e._s(e.__("Slug")))]),t("input",{staticClass:"breakdance-white-gray-outlined-input breakdance-simple-input breakdance-simple-input--text breakdance-simple-input--base",attrs:{placeholder:e.__("Slug")},domProps:{value:e.value.slug},on:{click:function(e){e.stopPropagation()},focusout:e.updateSlugOnFocusOut}}),t("ElementStudioConditionInput",{attrs:{value:e.value.options.condition},on:{input:e.updateConditions}}),t("ElementStudioHideControlInput",{attrs:{value:e.value.options.hideForElements},on:{input:e.updateHideForElements,remove:e.deleteHideForElements}}),e.isBreakdanceDevelopmentEnvironment?t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{label:e.__("Disable In FutureLayer"),"input-value":e.value.options.disabledInFutureLayer,"hide-details":""},on:{change:e.updateDisabledInFutureLayer}}):e._e(),e.spacingBarPresetSlug?[t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{label:e.__("Enable spacing bars"),"input-value":e.isSpacingBarEnabled(),"hide-details":""},on:{change:e.updateSpacingBar}})]:e._e()],2)],1):e._e(),t(vc.Z),t("Dropdown",{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t(Qo.Z,e._g({staticClass:"mr-1",attrs:{icon:"",small:""}},n),[t("Icon",{attrs:{icon:"EllipsisIcon",size:"18"}})],1)]}}])},[t(Ec.Z,[t(Tc.Z,{attrs:{dense:""},on:{click:e.copy}},[t(Dc.V9,[e._v(" "+e._s(e.__("Copy"))+" ")])],1),e.canPaste?t(Tc.Z,{attrs:{dense:""},on:{click:e.handlePaste}},[t(Dc.V9,[e._v(" "+e._s(e.__("Paste As Child"))+" ")])],1):e._e(),e.canReplace?t(Tc.Z,{attrs:{dense:""},on:{click:e.handleReplace}},[t(Dc.V9,[e._v(" "+e._s(e.__("Replace"))+" ")])],1):e._e(),e.isSection?t(Tc.Z,{attrs:{dense:""},on:{click:e.handleMakePreset}},[t(Dc.V9,[e._v(" "+e._s(e.__("Make into a Preset"))+" ")])],1):e._e()],1)],1),t(Qo.Z,{staticClass:"mr-3",attrs:{icon:"",small:""},on:{click:function(t){return t.stopPropagation(),e.deleteControl.apply(null,arguments)}}},[t("Icon",{attrs:{icon:"TrashIcon",size:"12"}})],1)],1)]},proxy:!0},{key:"content",fn:function(){return[t("draggable",{attrs:{value:e.value.children},on:{input:e.handleDrag}},e._l(e.value.children,(function(n,s){return t("ControlSectionOrControl",{key:n.slug,attrs:{value:n,path:`${e.path}.children[${s}]`,index:s,parentPath:e.path,twigParentPath:`${e.twigParentPath}${e.isParentARepeater?`[${s}]`:""}.${e.value.slug}`,parentControl:e.value}})})),1),e.controlAcceptsChildren?t(Qo.Z,{staticClass:"mt-2",attrs:{tile:"",text:"","data-test-id":"element-studio-add-control"},on:{click:e.addControl}},[e._v(" "+e._s(e.__("Add Control"))+" ")]):e._e(),e.controlAcceptsChildren?t(Qo.Z,{staticClass:"mt-2",attrs:{tile:"",text:"","data-test-id":"element-studio-add-preset"},on:{click:e.addPreset}},[e._v(" "+e._s(e.__("Add Preset"))+" ")]):e._e()]},proxy:!0}])})],1)],1)},Ym=[],Qm=n(89754),Jm=n(34680),ev=n.n(Jm),tv=n(16888),nv=n(62485),sv=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"d-flex"},[t(ed.Z,e._b({staticClass:"breakdance-dense-input",attrs:{value:e.value,rules:e.rules,clearable:e.clearable,solo:"",flat:"",dense:"","full-width":"","single-line":"","background-color":"var(--gray150)","data-test-id":e.testId},on:{input:e.edit,blur:function(t){return e.$emit("blur",t)}}},"v-text-field",e.inputOptions,!1))],1)},iv=[];let ov=class extends s.ZP{get isNumber(){return"number"===this.inputOptions?.type}edit(e){this.isNumber&&e?this.$emit("input",parseFloat(e)):this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],ov.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],ov.prototype,"inputOptions",void 0),(0,r.gn)([(0,l.fI)()],ov.prototype,"rules",void 0),(0,r.gn)([(0,l.fI)()],ov.prototype,"testId",void 0),(0,r.gn)([(0,l.fI)({default:!0})],ov.prototype,"clearable",void 0),ov=(0,r.gn)([l.wA],ov);const av=ov,rv=av;var lv=(0,N.Z)(rv,sv,iv,!1,null,null,null);const cv=lv.exports;var dv=n(14567),uv=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-element-studio-twig-code-helper"},[e.codeForControl?t("Copyable",{on:{onCopy:e.close}},[e._v(e._s(e.codeForControl))]):[e._v(" "+e._s(e.sprintf(e._doc("No code help available for %s control type","%s: Control type name"),e.controlTypeCode))+" ")]],2)},pv=[],hv=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-element-studio-copyable"},[t("textarea",{ref:"input",attrs:{readonly:""},domProps:{value:e.textToCopy}}),e.shouldCopy?t(Qo.Z,{attrs:{small:""},on:{click:e.copy}},[e._v(e._s(e.__("Copy")))]):e._e()],1)},gv=[];let mv=class extends s.ZP{mounted(){this.shouldCopy&&(0,A.forceNextTick)((()=>{this.$refs.input.select(),document.execCommand("copy")}))}get textToCopy(){return this.$slots?.default[0]?.text||""}copy(){this.$refs.input.select(),document.execCommand("copy"),this.$emit("onCopy")}};(0,r.gn)([(0,l.fI)({default:!0})],mv.prototype,"shouldCopy",void 0),mv=(0,r.gn)([(0,l.wA)({})],mv);const vv=mv,yv=vv;var fv=(0,N.Z)(yv,hv,gv,!1,null,null,null);const _v=fv.exports,bv=({twigPath:e})=>"{{ "+e+" }}",Sv=({twigPath:e})=>`{% if ${e} %}\ntoggle is on\n{% else %}\ntoggle is off\n{% endif %}`,Cv=({control:e,twigPath:t})=>e.options.items?e.options.items.map(((e,n)=>{const s=n?"elseif":"if";return`{% ${s} ${t} == '${e.value}' %}\n CSS or HTML here\n`})).join("")+"\n{% endif %}":"no items yo",xv=({control:e,twigPath:t})=>e.options.items?e.options.items.map(((e,n)=>{const s=n?"elseif":"if";return`{% ${s} '${e.value}' in ${t} %}\n CSS or HTML here\n`})).join("")+"\n{% endif %}":"no items yo",wv=({control:e,twigPath:t})=>{const n="text"===e?.options?.shadowOptions?.type,s=n?"text-shadow":"box-shadow";return`${s}: {{ ${t}.style }};`},Iv=({twigPath:e})=>`\n<style>\n/* put this in your default CSS */\n.some-class-to-wrap-the-icon-svg { /* prefix with element classname, i.e. .element-classname .some-class-to-wrap-the-icon */\n display: flex;\n font-size: 24px;\n}\n\n.some-class-to-wrap-the-icon-svg > svg { /* also, prefix with element classname */\n font-size: inherit;\n width: 1em;\n height: 1em;\n stroke-width: 0;\n stroke: currentColor;\n fill: currentColor;\n}\n\n/* put this in your twig CSS */\n%%SELECTOR%% .some-class-to-wrap-the-icon-svg {\n color: #ff0000;\n font-size: 30px;\n}\n</style>\n<div class="some-class-to-wrap-the-icon-svg">\n{{ ${e}.svgCode }}\n</div>\n`,Pv=({twigPath:e})=>`\n {% for item in ${e} %}\n <div>\n repeated\n </div>\n {% endfor %}\n `,kv=({twigPath:e})=>`\n /* could be used for transforms */\n transform-origin: {{ ${e}.x }}% {{ ${e}.y }}%;\n\n /* or positioning a background */\n background-position: {{ ${e}.x }}% {{ ${e}.y }}%;\n `,Ev=["layout_basic_flex","layout","borders","background","css","size","grid",...Ge.spacingBarsPresetSlug],Tv=({control:e,twigPath:t})=>{const n=e.options.sectionOptions?.preset?.slug?.replace("EssentialElements\\","");return n?Ev.includes(n)?`{{ macros.${n}(${t}) }}`:"effects"===n?`\n {{ macros.effects(${t}, '%%SELECTOR%%') }}\n {{ macros.effectsHover(${t}, '%%SELECTOR%%:hover') }}\n `:"effects_no_hover"===n?`{{ macros.effects(${t}, '%%SELECTOR%%') }}`:"filter"===n?`{{ macros.filters(${t}) }}`:"typography"===n||"typography_with_nothing"===n||"typography_with_align"===n||"typography_with_effects"===n||"typography_with_effects_and_align"===n?`{{ macros.typography(${t}, globalSettings) }}`:"simpleLayout"===n?`{{ macros.simpleLayout(${t}, breakpoint) }}`:"fancy_background"===n?`\n {{ macros.fancyBackgroundHtml(${t}) }}\n {{ macros.fancyBackgroundCss('%%SELECTOR%%', ${t}, breakpoint) }}\n `:"typography_with_hoverable_color"===n||"typography_with_align_with_hoverable_color"===n||"typography_with_effects_with_hoverable_color_and_effects"===n||"typography_with_effects_and_align_with_hoverable_color_and_effects"===n?`\n %%SELECTOR%% {\n {{ macros.typography(${t}, globalSettings) }}\n }\n\n %%SELECTOR%%:hover {\n {{ macros.typographyWithHoverableColorAndEffects(${t}) }}\n }\n `:"typography_with_hoverable_everything"===n||"typography_with_align_with_hoverable_everything"===n||"typography_with_effects_with_hoverable_everything"===n||"typography_with_effects_and_align_with_hoverable_everything"===n?`\n %%SELECTOR%% {\n {{ macros.typography(${t}, globalSettings) }}\n }\n\n %%SELECTOR%%:hover {\n {{ macros.typographyWithHoverableEverything(${t}) }}\n }\n `:"AtomV1ButtonContent"===n?`\n \x3c!-- In order to set default styles for your buttons, use the following macros: --\x3e\n \x3c!-- You can overwrite these settings using design options --\x3e\n\n \x3c!-- Button (Primary) --\x3e\n {{ macros.atomV1ButtonHtml(${t}, 'my-button-custom-class', path.to.button_design_preset_section, '${t}.text') }}\n\n \x3c!-- Button (Secondary) --\x3e\n {{ macros.atomV1ButtonHtml(${t}, 'my-button-custom-class', path.to.button_design_preset_section, 'secondary', '${t}.text') }}\n\n \x3c!-- Button (Custom) --\x3e\n {{ macros.atomV1ButtonHtml(${t}, 'my-button-custom-class', path.to.button_design_preset_section, 'custom', '${t}.text') }}\n\n \x3c!-- Button (Text) --\x3e\n {{ macros.atomV1ButtonHtml(${t}, 'my-button-custom-class', path.to.button_design_preset_section, 'text', '${t}.text') }}\n\n \x3c!-- Form Button (Submit) --\x3e\n {{ macros.atomV1ButtonHtmlManual('Submit', false, '%%SELECTOR%% .my-button-custom-class', path.to.button_design_preset_section, 'primary/secondary/custom/text', 'custom-button-id', true, '${t}.text') }}\n\n \x3c!-- SSR Button --\x3e\n echo /Breakdance/Elements/AtomV1Button/render($propertiesData['content']['button'], 'my-button-custom-class', $propertiesData['design']['button'], 'primary/secondary/custom/text');\n\n \x3c!-- SSR Form Button --\x3e\n echo /Breakdance/Elements/AtomV1Button/renderFormButton($propertiesData['content']['submit_button']['text'], 'my-button-custom-class', $propertiesData['design']['form_button'], 'primary/secondary/custom/text', 'custom-button-id');\n\n\n`:"AtomV1ButtonDesign"===n?`\n {{ macros.atomV1ButtonCss(${t}, 'my-button-custom-class', '%%SELECTOR%%', breakpoint, globalSettings) }}\n `:"AtomV1CustomButtonDesign"===n?`\n\n {{ macros.atomV1ButtonButton(${t}, '%%SELECTOR%% .my-button-custom-class', 'primary/secondary/custom', breakpoint, globalSettings) }}\n\n\n `:"AtomV1IconDesignWithHover"===n?`\n HTML:\n {{ macros.atomV1IconHtml('my-icon-class', path.to.icon, path.to.rotate (number between 1 and 360) or false, path.to.link (link control) or false, ${t}) }}\n\n CSS:\n {{ macros.atomV1IconCss(${t}, 'my-icon-class', '%%SELECTOR%%', true) }}`:"AtomV1IconDesign"===n?`\n HTML:\n {{ macros.atomV1IconHtml('my-icon-class', path.to.icon, path.to.rotate (number between 1 and 360) or false, path.to.link (link control) or false, ${t}) }}\n\n CSS:\n {{ macros.atomV1IconCss(${t}, 'my-icon-class', '%%SELECTOR%%') }}`:"AtomV1FormDesign"===n?`{{ macros.atomV1FormCss(${t}, '%%SELECTOR%%') }}`:"tabs_design"===n?`{{ macros.atomV1TabsCss('%%SELECTOR%%', ${t}, breakpoint, globalSettings) }}`:"WooGlobalStylerOverride"===n?`{{ macros.wooGlobalStyler(${t}, '%%SELECTOR%%', breakpoint, globalSettings) }}`:"pagination"===n?`{{ macros.pagination(${t}, '%%SELECTOR%%', listSelector, activeSelector, dotsSelector) }}`:"wooPresetInputsDesign"===n||"wooPresetInputsDesignNoSelect2"===n?`\n %%SELECTOR%% {\n {{ macros.wooPresetInputsDesign(${t}) }}\n }`:"wooProductsListElements"===n?`\n {{ macros.wooPresetProductsListElementsDesign('%%SELECTOR%%', ${t}) }}\n `:"wooProductsListLayout"===n?`\n {{ macros.wooPresetProductsListLayoutDesign('%%SELECTOR%%', ${t}) }}\n `:"wooProductWrapperDesign"===n?`\n {{ macros.wooPresetProductWrapperDesign('%%SELECTOR%%', ${t}) }}\n `:["lightbox_design","lightbox_single_design"].includes(n)?`{{ macros.atomV1LightboxCss(${t}) }}`:"AtomV1SwiperSettings"===n?`\nHTML:\n\n<div class="breakdance-swiper-wrapper" data-swiper-id="%%ID%%">\n <div class="swiper">\n <div class="swiper-wrapper">\n %%CHILDREN%%\n </div>\n </div>\n \n {{ macros.AtomV1SwiperPaginationAndArrowsHtml(design.slider) }}\n</div>\n\n----\n\nCSS:\n{{ macros.AtomV1SwiperCss(${t}, '%%SELECTOR%%', globalSettings, isBaseBreakpoint) }}\n`:"borders_without_shadows"===n?`\n {{ macros.borders_without_shadows(${t}) }}\n `:`no code help for preset section type of ${n}`:"undefined preset type"},Dv={trigger_action_button:void 0,border_complex:({twigPath:e})=>`{{ macros.border_complex(${e}) }}`,border_radius:({twigPath:e})=>`{{ macros.border_radius(${e}) }}`,breakpoint_dropdown:({twigPath:e})=>`\n {% if breakpoint == ${e} %}\n %%SELECTOR%% {\n /** some css that will apply to the selected breakpoint */\n }\n {% endif %}\n `,button_bar:Cv,dropdown:Cv,code:bv,color:({control:e,twigPath:t})=>"solidAndGradient"===e.options.colorOptions?.type?`\n /* Background Color */\n {{ macros.backgroundColor(${t}) }}\n \n /* Or */\n \n /* Text Color */\n {{ macros.textColor(${t}) }}\n \n /* Or */\n \n /* Border Color */\n {{ macros.borderColor(${t}) }}\n `:`background-color: {{ ${t} }}`,gradient:({twigPath:e})=>`background-image: {{ ${e}.style }}`,shadow:wv,icon:Iv,number:bv,repeater:Pv,inline_repeater:Pv,richtext:bv,toggle:Sv,spacing_complex:({twigPath:e})=>`{{ macros.spacing_complex(${e}, 'margin') }}`,text:bv,url:bv,unit:({twigPath:e})=>`font-size: {{ ${e}.style }};`,wpmedia:({control:e,twigPath:t})=>e.options?.mediaOptions?.multiple?`\n {% for item in ${t} %}\n {{ macros.getMedia(item, content.content.size, content.content.lazyLoad) }}\n {% endfor %}\n `:`\n This macro might return an img, video, or iframe tag, depending on the media type.\n {{ macros.getMedia(${t}, content.content.size, content.content.lazyLoad) }}\n \n Or you can render only images\n {{ macros.image(${t}, content.content.size, alt, lazyLoad) }}\n `,video:({twigPath:e})=>`\n {{ macros.video(${e}) }}\n `,focus_point:kv,section:Tv,multiselect:xv,condition:void 0,font_family:void 0,class:void 0,global_colors:void 0,override_variables:void 0,global_block_chooser:void 0,component_chooser:void 0,typography:void 0,custom_typography:void 0,typography_preset:void 0,button_preset:void 0,message:void 0,post_chooser:void 0,element_screenshot:void 0,slider:void 0,add_registered_children:void 0,builder_behavior:void 0,alert_box:void 0,pro_only_alert_box:void 0,date_picker:({twigPath:e})=>`{{ ${e} }}`,time_picker:({twigPath:e})=>`{{ ${e} }}`,api_key_input:void 0,link:({twigPath:e})=>`\n {{ macros.linkStart(${e}) }}\n Link Text\n {{ macros.linkEnd() }}\n `,media_size_dropdown:({twigPath:e})=>`{{ ${e} }}`,wp_query:()=>"Use this control in your SSR.php file. For example:\n \\Breakdance\\WpQueryControl\\getWpQueryArgumentsFromWpQueryControlProperties($propertiesData['content']['wp_query']['query']);",conditional_form_field:void 0,interactions:void 0},Av=(e,t)=>{let n="";if(Array.isArray(e))n=e.reduce(((e,t)=>{const n=t.reduce(((e,{path:t,value:n})=>e?`${e} and ${t} == "${n}"`:`${t} == "${n}"`),"");return e?`${e} or (${n})`:`(${n})`}),"");else{const{path:t,value:s}=e;n=`${t} == "${s}"`}return`\n {% if ${n} %}\n ${t}\n TODO - examples of not equals, is one of, is set, is not set\n {% elseif %}\n ...\n {% else %}\n ...\n {% endif %}\n `};var Zv=n(70802);let Ov=class extends s.ZP{get twigPath(){return this.inRepeater?`item.${this.control.slug}`:`${this.twigParentPath}.${this.control.slug}`}get controlTypeCode(){return`<code>${this.control.options.type}</code>`}get codeForControl(){const e=Dv[this.control.options.type],t=this.control.options.sectionOptions?.preset?.codeHelp?.replace("%%TWIG_PATH%%",this.twigPath);let n=t||e&&e({control:this.control,twigPath:this.twigPath});if(!n)return!1;if(this.control.options.condition&&(n=Av(this.control.options.condition,n)),this.control.enableHover){const e=n.replace(new RegExp(this.twigPath,"g"),(0,Zv.sg)(this.twigPath));n+="\n\n.some-selector:hover {\n"+e+"\n}\n"}return n}close(){this.$emit("close")}};(0,r.gn)([(0,l.fI)()],Ov.prototype,"control",void 0),(0,r.gn)([(0,l.fI)()],Ov.prototype,"twigParentPath",void 0),(0,r.gn)([(0,l.fI)()],Ov.prototype,"inRepeater",void 0),Ov=(0,r.gn)([(0,l.wA)({components:{Copyable:_v}})],Ov);const Mv=Ov,Bv=Mv;var Lv=(0,N.Z)(Bv,uv,pv,!1,null,null,null);const Nv=Lv.exports;var Fv=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("h3",[e._v(e._s(e.label))]),t("Repeater",{attrs:{value:this.internalValue,control:{options:{repeaterOptions:{defaultNewValue:[e.getBlankCondition()],titleTemplate:e.__("OR"),buttonName:e.__("Add new OR condition"),forceDontProcessDefaultNewValueWhenAddingItemsHack:!0}}}},on:{input:e.emit},scopedSlots:e._u([{key:"default",fn:function({index:n}){return[t("Repeater",{attrs:{value:e.internalValue[n],control:{options:{repeaterOptions:{defaultNewValue:e.getBlankCondition(),forceDontProcessDefaultNewValueWhenAddingItemsHack:!0,titleTemplate:e.sprintf(e._doc("(AND) %s for '{path}'","%s: Condition title"),e.title),buttonName:e.sprintf(e._doc("Add new (AND) %s","Element Studio. %s: Condition title"),e.title)}}}},on:{input:function(t){return e.updateOrCondition(t,n)}},scopedSlots:e._u([{key:"default",fn:function({index:s,value:i}){return[t("div",{staticClass:"element-studio-condition-input"},[i?t("div",{staticClass:"element-studio-condition-input-row"},[i.external?t("span",[e._v(" "+e._s(e.__("External conditions can't be edited"))+" ")]):e._e(),t(zm.Z,{attrs:{label:e.__("Path"),items:e.paths,value:i.path,disabled:i.external},on:{input:function(t){return e.updatePath(t,n,s)}}}),t(tg.Z,{attrs:{label:e.__("Operand"),"no-data-text":e.__("No data. Select a path first"),value:i.operand,items:e.getOperands(i),disabled:i.external},on:{input:function(t){return e.updateOperand(t,n,s)}}}),"is set"!==i.operand&&"is not set"!==i.operand?["is one of"!==i.operand&&"is none of"!==i.operand?[t(zm.Z,{attrs:{label:e.__("Value"),items:e.getPossibleValues(i),value:i.value,disabled:i.external},on:{input:function(t){return e.updateValue(t,n,s)}}})]:[t(zm.Z,{attrs:{multiple:"",label:e.__("Values"),items:e.getPossibleValues(i),value:e.hasMultipleValues(i),disabled:i.external},on:{input:function(t){return e.updateValue(t,n,s)}}})]]:e._e()],2):e._e()])]}}],null,!0)})]}}])})],1)},Rv=[];let Vv=class extends s.ZP{mounted(){this.value&&!Array.isArray(this.value)&&this.emit([[this.value]])}getBlankCondition(){return{path:"",operand:"equals",value:""}}getOperands(e){const t=e.path;if(!t)return[];const n=this.getControl(t);let s=["equals","not equals","is one of","is none of","is set","is not set","contains","does not contain"];return"multiselect"===n?.options.type&&(s=["includes"]),"toggle"===n?.options.type&&(s=["is set","is not set"]),s.map((e=>({text:e,value:e})))}hasMultipleValues(e){return Array.isArray(e.value)?e.value:[]}get internalValue(){return this.value?Array.isArray(this.value)?this.value:[[this.value]]:[]}get paths(){const e=this.context.getPathsToAllControls().filter((e=>!e.includes("settings.animations")));return this.pathStartsWith?e.filter((e=>e.startsWith(this.pathStartsWith))).map((e=>e.replace(this.pathStartsWith,""))):e}getPossibleValues(e){const t=e.path;if(!t)return[];const n=this.getControl(t);if(!n)return[];const s=n.options.items?.map((e=>String(e.value)));return s||[]}getControl(e){return(0,qe.AP)(this.context.element(),e)}updatePath(e,t,n){const s=(0,wd.Z)(this.internalValue);s[t][n].path=e,this.emit(s)}updateOperand(e,t,n){const s=(0,wd.Z)(this.internalValue);s[t][n].operand=e,this.emit(s)}updateValue(e,t,n){const s=(0,wd.Z)(this.internalValue);s[t][n].value=e,this.emit(s)}updateOrCondition(e,t){const n=(0,wd.Z)(this.internalValue);n[t]=e,this.emit(n)}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],Vv.prototype,"value",void 0),(0,r.gn)([(0,l.fI)({default:"Condition"})],Vv.prototype,"title",void 0),(0,r.gn)([(0,l.fI)({default:"Only Show Control When Condition Is Met"})],Vv.prototype,"label",void 0),(0,r.gn)([(0,l.fI)()],Vv.prototype,"pathStartsWith",void 0),(0,r.gn)([(0,l.tB)("context")],Vv.prototype,"context",void 0),Vv=(0,r.gn)([(0,l.wA)({components:{Repeater:nv.Z}})],Vv);const $v=Vv,Wv=$v;var Uv=(0,N.Z)(Wv,Fv,Rv,!1,null,null,null);const zv=Uv.exports;var Hv=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-unit-options"},[t("h2",{staticClass:"mb-2"},[e._v(e._s(e.__("Unit Options")))]),t("h3",[e._v(e._s(e.__("Allowed types")))]),t(Wm.Z,{attrs:{label:e.__("Types"),value:e.value&&e.value.types,items:e.availableTypes,multiple:!0,"hide-details":""},on:{input:e.updateTypes}}),t("h3",{staticClass:"mb-1"},[e._v(e._s(e.__("Default Type")))]),t("DropdownInput",{attrs:{label:e.__("Default Type"),items:e.value&&e.value.types||[],value:e.value&&e.value.defaultType},on:{input:e.updateDefaultType}}),t(Um.Z,{attrs:{label:e.__("Disable Custom Unit Dropdown"),value:e.value?.disableCustomUnitDropdown},on:{change:e.updateDisableCustomUnitDropdown}})],1)},Gv=[];let Kv=class extends s.ZP{constructor(){super(...arguments),this.control={options:{repeaterOptions:{titleTemplate:"Type",buttonName:"Add type"}}}}get internalValue(){return this.value||{}}get availableTypes(){return Hg.qc}updateTypes(e){const t=(0,wd.Z)(this.internalValue);this.emit({...t,types:e})}updateDefaultType(e){const t=(0,wd.Z)(this.internalValue);this.emit({...t,defaultType:e})}updateDisableCustomUnitDropdown(e){const t=(0,wd.Z)(this.internalValue);this.emit({...t,disableCustomUnitDropdown:e})}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],Kv.prototype,"value",void 0),(0,r.gn)([(0,l.tB)("context")],Kv.prototype,"context",void 0),Kv=(0,r.gn)([(0,l.wA)({components:{Repeater:nv.Z,DropdownInput:Cd.Z}})],Kv);const jv=Kv,qv=jv;var Xv=(0,N.Z)(qv,Hv,Gv,!1,null,null,null);const Yv=Xv.exports;var Qv=n(62231),Jv=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-range-options"},[t("h3",{staticClass:"mb-2"},[e._v(e._s(e.__("Range Options")))]),t("div",{staticClass:"d-flex align-end"},[t("div",{staticClass:"flex-grow-1 flex-column"},[e._v(" "+e._s(e.__("Step (fixed to 2 decimals)"))+" "),t("input",{class:e.inputClass,attrs:{type:"number"},domProps:{value:e.internalValue.step},on:{input:function(t){return e.updateStep(t.target.value)}}})]),t("div",{staticClass:"flex-grow-1 mx-1 flex-column"},[e._v(" "+e._s(e.__("Min (Integer)"))+" "),t("input",{class:e.inputClass,attrs:{type:"number"},domProps:{value:e.internalValue.min},on:{input:function(t){return e.updateMin(t.target.value)}}})]),t("div",{staticClass:"flex-grow-1 flex-column"},[e._v(" "+e._s(e.__("Max (Integer)"))+" "),t("input",{class:e.inputClass,attrs:{type:"number"},domProps:{value:e.internalValue.max},on:{input:function(t){return e.updateMax(t.target.value)}}})])])])},ey=[];let ty=class extends s.ZP{get internalValue(){return this.value||{min:void 0,max:void 0,step:void 0}}get inputClass(){return"d-flex breakdance-white-gray-outlined-input breakdance-simple-input breakdance-simple-input--text breakdance-simple-input--base"}updateStep(e){this.emit({...this.internalValue,step:e?(0,me.v)(e):void 0})}updateMin(e){this.emit({...this.internalValue,min:e?parseInt(e):void 0})}updateMax(e){this.emit({...this.internalValue,max:e?parseInt(e):void 0})}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],ty.prototype,"value",void 0),(0,r.gn)([(0,l.tB)("context")],ty.prototype,"context",void 0),ty=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z}})],ty);const ny=ty,sy=ny;var iy=(0,N.Z)(sy,Jv,ey,!1,null,null,null);const oy=iy.exports;var ay=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-repeater-options"},[t("h3",{staticClass:"mb-2"},[e._v(e._s(e.__("Repeater Options")))]),t("div",[e._v(" "+e._s(e.__("Title Template"))+" "),t("TextInput",{attrs:{value:e.internalValue.titleTemplate},on:{input:function(t){return e.update(t,"titleTemplate")}}}),e.controlSlugs.length?t("div",{staticClass:"element-studio-repeater-options-variables"},[e._v(" "+e._s(e.__("Available variables:"))+" "),e._l(e.controlSlugs,(function(n){return t("span",{staticClass:"element-studio-repeater-options-variable",on:{click:function(t){return e.appendVariableToTitle(n)}}},[t("span",[e._v("{")]),e._v(e._s(n)),t("span",[e._v("}")])])}))],2):e._e()],1),t("div",{staticClass:"my-2"},[e._v(" "+e._s(e.__("Default Title"))+" "),t("TextInput",{attrs:{value:e.internalValue.defaultTitle},on:{input:function(t){return e.update(t,"defaultTitle")}}}),e._v(" "+e._s(e.__("Used as a fallback when the title template is blank."))+" ")],1),t("div",[e._v(" "+e._s(e.__("Button Name"))+" "),t("TextInput",{attrs:{value:e.internalValue.buttonName},on:{input:function(t){return e.update(t,"buttonName")}}}),e._v(" "+e._s(e.__('Defaults to "Add Item".'))+" ")],1),t("div",[t(Um.Z,{staticClass:"mb-3",attrs:{label:e.__("Enable gallery mode"),"hide-details":"","input-value":e.internalValue.galleryMode},on:{change:e.updateGalleryMode}}),e.internalValue.galleryMode?[t("h3",{staticClass:"mb-3"},[e._v(e._s(e.__("Gallery Media Path")))]),t("DropdownInput",{attrs:{value:e.internalValue.galleryMediaPath,items:e.mediaControlSlugs},on:{input:function(t){return e.update(t,"galleryMediaPath")}}})]:e._e()],2)])},ry=[];const ly={titleTemplate:"",defaultTitle:"",buttonName:""};let cy=class extends s.ZP{get internalValue(){return this.value||ly}get controlSlugs(){return this.control.children.map((e=>e.slug))}get mediaControlSlugs(){return this.control.children.filter((e=>"wpmedia"===e.options.type)).map((e=>e.slug))}appendVariableToTitle(e){const t=this.internalValue.titleTemplate,n=t.includes(`{${e}}`);if(n)return;const s=`${t} {${e}}`.trim();this.update(s,"titleTemplate")}update(e,t){this.emit({...this.internalValue,[t]:e??""})}updateGalleryMode(e){this.emit({...this.internalValue,galleryMode:e})}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],cy.prototype,"value",void 0),(0,r.gn)([(0,l.tB)("context")],cy.prototype,"context",void 0),(0,r.gn)([(0,l.fI)()],cy.prototype,"control",void 0),cy=(0,r.gn)([(0,l.wA)({components:{DropdownInput:Cd.Z,TextInput:na.Z}})],cy);const dy=cy,uy=dy;var py=(0,N.Z)(uy,ay,ry,!1,null,null,null);const hy=py.exports;var gy=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-dropdown-options"},[t("h2",{staticClass:"mb-2"},[e._v(e._s(e.__("Dropdown options")))]),"dropdown"===e.control.options.type?[this.element.htmlTag.options.length>0?t("NiceButton",{on:{click:e.populateWithHtmlTagOptions}},[e._v(e._s(e.__("Populate with HTML Tag Options")))]):e._e(),t(Um.Z,{attrs:{"input-value":!!e.internalValue.populate,label:e.__("Populate dropdown dynamically"),"hide-details":""},on:{change:e.updateEnablePopulate}}),e.internalValue.populate?[t(bp.Z,{staticClass:"my-3"}),t("h3",{staticClass:"mb-2"},[e._v(e._s(e.__("Populate from a Repeater's Input")))]),e.internalValue.populate.fetchDataAction?t("div",[e._v(" "+e._s(e.__("Populating from server data. To use items instead, clear those fields below."))+" ")]):e.repeaterPaths.length?t("div",[t(zm.Z,{attrs:{label:e.__("Path"),items:e.repeaterPaths,value:e.internalValue.populate.path,"hide-details":"",clearable:""},on:{input:function(t){return e.updatePopulateValue("path",t)}}}),t(zm.Z,{attrs:{label:e.__("Label"),items:e.possibleValues,value:e.internalValue.populate.text,"hide-details":"",clearable:""},on:{input:function(t){return e.updatePopulateValue("text",t)}}}),t(zm.Z,{attrs:{label:e.__("Value"),items:e.possibleValues,value:e.internalValue.populate.value,"hide-details":"",clearable:""},on:{input:function(t){return e.updatePopulateValue("value",t)}}})],1):t("div",[t("h4",[e._v(e._s(e.__("No repeaters present")))])]),t(bp.Z,{staticClass:"my-3"}),t("h3",{staticClass:"mb-2"},[e._v(e._s(e.__("Populate from server data")))]),t(ed.Z,{attrs:{label:e.__("Fetch data action route name"),value:e.internalValue.populate.fetchDataAction,clearable:"","hide-details":""},on:{input:function(t){return e.updatePopulateValue("fetchDataAction",t)}}}),t(zm.Z,{attrs:{label:e.__("Fetch context path"),items:e.controlPaths,value:e.internalValue.populate.fetchContextPath,clearable:"","hide-details":""},on:{input:function(t){return e.updatePopulateValue("fetchContextPath",t)}}}),t("h3",[e._v(e._s(e.__("Refetch data if a control's value changes (specify path)")))]),t("Repeater",{attrs:{value:e.internalValue.populate.refetchPaths},on:{input:e.updateRefetchPaths},scopedSlots:e._u([{key:"default",fn:function({index:n}){return[t(zm.Z,{staticClass:"mb-2",attrs:{items:e.controlPaths,value:e.internalValue.populate.refetchPaths[n],"hide-details":""},on:{input:function(t){return e.updateRefetchPath(n,t)}}})]}}],null,!1,3001308231)}),t(bp.Z,{staticClass:"my-3"}),t("ElementStudioConditionInput",{attrs:{title:e.__("Filtering"),label:e.__("Show items in the dropdown only if a condition is met"),"path-starts-with":`${e.internalValue.populate.path}.`,value:e.internalValue.populate.condition},on:{input:e.updateCondition}})]:e._e()]:e._e(),e.internalValue.populate?e._e():[t("h3",{staticClass:"mb-2"},[e._v(e._s(e.__("Dropdown items")))]),t("Repeater",{attrs:{path:e.path,value:e.dropdownItems,control:e.control},on:{input:e.updateDropdownItems},scopedSlots:e._u([{key:"default",fn:function({index:n}){return[e._v(" "+e._s(e.__("Label"))+" "),t("TextInput",{staticClass:"mb-2",attrs:{value:e.dropdownItems[n].text,testId:"element-studio-control-dropdown-label-input"},on:{input:function(t){return e.updateDropdownItem({...e.dropdownItems[n],text:t||""},n)}}}),e._v(" "+e._s(e.__("Value"))+" "),t("TextInput",{attrs:{value:e.dropdownItems[n].value,testId:"element-studio-control-dropdown-value-input"},on:{input:function(t){return e.updateDropdownItem({...e.dropdownItems[n],value:t||""},n)}}}),"button_bar"===e.control.options.type?t("div",{staticClass:"breakdance-dropdown-input d-flex mt-2"},[e.dropdownItems[n].icon?t("div",{staticClass:"mr-2 d-flex align-center"},[t("Icon",{attrs:{icon:e.dropdownItems[n].icon,size:"18"}})],1):e._e(),t("ElementStudioIconsAutocomplete",{attrs:{value:e.dropdownItems[n].icon},on:{input:function(t){return e.updateDropdownItem({...e.dropdownItems[n],icon:t},n)}}})],1):e._e()]}}],null,!1,3909409893)})]],2)},my=[],vy=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(Wm.Z,{staticClass:"breakdance-dense-select breakdance-white-gray-outlined-input",attrs:{label:e.__("Icon"),dense:"",solo:"",flat:"",filled:"","hide-details":"",clearable:"",placeholder:e.__("CloseIcon"),items:e.iconNames,value:e.value},on:{input:function(t){return e.$emit("input",t)}}})},yy=[],fy=n(97657);let _y=class extends s.ZP{get iconNames(){return fy.iconNames}};(0,r.gn)([(0,l.fI)()],_y.prototype,"value",void 0),_y=(0,r.gn)([(0,l.wA)({})],_y);const by=_y,Sy=by;var Cy=(0,N.Z)(Sy,vy,yy,!1,null,null,null);const xy=Cy.exports,wy={path:"",text:"",value:"",condition:void 0,fetchDataAction:"",fetchContextPath:"",refetchPaths:[]};let Iy=class extends s.ZP{get internalValue(){return this.value||{}}get repeaterPaths(){return this.context.getPathsToAllControls(["repeater"])}get controlPaths(){return this.context.getPathsToAllControls()}get possibleValues(){const e=this.internalValue?.populate?.path;if(!e)return[];const t=this.getControl(e);if(!t)return[];const n=t.children.map((e=>e.slug));return n||[]}getControl(e){return(0,qe.AP)(this.element,e)}get populate(){return this.internalValue.populate||wy}get dropdownItems(){return this.control.options.items||[{value:"value",text:"Label"}]}get element(){return this.context.element()}updateDropdownItems(e){this.$emit("updateDropdownItems",e)}updateDropdownItem(e,t){this.$emit("updateDropdownItem",{newItem:e,index:t})}updateEnablePopulate(e){e?this.emit({populate:wy}):this.emit(void 0)}updateCondition(e){const t=(0,wd.Z)(this.populate);Array.isArray(e)&&!e.length?delete t.condition:t.condition=e,this.emit({populate:t})}updatePopulateValue(e,t){const n=(0,wd.Z)(this.populate);n[e]=t,this.emit({populate:n})}updateRefetchPaths(e){const t=(0,wd.Z)(this.populate);t.refetchPaths=e.map((e=>"string"===typeof e?e:"")),this.emit({populate:t})}updateRefetchPath(e,t){const n=(0,wd.Z)(this.populate);n.refetchPaths&&(n.refetchPaths[e]=t,this.emit({populate:n}))}populateWithHtmlTagOptions(){if(!this.element.htmlTag.options)return;const e=this.element.htmlTag.options.map((e=>({text:e,value:e})));this.updateDropdownItems(e)}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],Iy.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],Iy.prototype,"control",void 0),(0,r.gn)([(0,l.fI)()],Iy.prototype,"path",void 0),(0,r.gn)([(0,l.tB)("context")],Iy.prototype,"context",void 0),Iy=(0,r.gn)([(0,l.wA)({components:{NiceButton:Br.Z,ElementStudioIconsAutocomplete:xy,Icon:He.Z,DropdownInput:Cd.Z,Dropdown:Oc.Z,ElementStudioConditionInput:zv,Repeater:nv.Z,TextInput:na.Z}})],Iy);const Py=Iy,ky=Py;var Ey=(0,N.Z)(ky,gy,my,!1,null,null,null);const Ty=Ey.exports;var Dy=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-dropdown-options"},[t("h2",{staticClass:"mb-2"},[e._v(e._s(e.__("Breakpoint options")))]),e._v(" "+e._s(e.__("Support Multiple"))+" "),t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{label:e.__("Support Multiple"),"input-value":e.value&&!!e.value.multiple,"hide-details":""},on:{change:e.updateMultiple}}),e._v(" "+e._s(e.__("Enable Never"))+" "),t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{label:e.__("Enable Never"),"input-value":e.value&&!!e.value.enableNever,"hide-details":""},on:{change:e.updateEnableNever}})],1)},Ay=[];let Zy=class extends s.ZP{updateMultiple(e){const t={...this.value,multiple:e};this.emit(t)}updateEnableNever(e){const t={...this.value,enableNever:e};this.emit(t)}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],Zy.prototype,"value",void 0),Zy=(0,r.gn)([(0,l.wA)({components:{}})],Zy);const Oy=Zy,My=Oy;var By=(0,N.Z)(My,Dy,Ay,!1,null,null,null);const Ly=By.exports;var Ny=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-variable-options"},[t("h3",[e._v(e._s(e.__("Variables")))]),t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{label:e.__("Enable variables"),"input-value":e.internalValue.enabled,"hide-details":""},on:{change:e.toggleEnabled}}),e.internalValue.enabled?[t("Repeater",{attrs:{path:e.path,value:e.variables,control:e.control},on:{input:e.updateVariableItems},scopedSlots:e._u([{key:"default",fn:function({index:n}){return[e._v(" "+e._s(e.__("Label"))+" "),t("TextInput",{staticClass:"mb-2",attrs:{value:e.variables[n].label,testId:"element-studio-control-variable-label-input"},on:{input:function(t){return e.updateVariableItem({...e.variables[n],label:t},n)}}}),e._v(" "+e._s(e.__("Value"))+" "),t("TextInput",{attrs:{value:e.variables[n].value,testId:"element-studio-control-variable-value-input"},on:{input:function(t){return e.updateVariableItem({...e.variables[n],value:t},n)}}})]}}],null,!1,1421230148)}),t(Um.Z,{attrs:{"input-value":!!e.internalValue.populate,label:e.__("Populate variables based on a Repeater Input")},on:{change:e.updateEnablePopulate}}),e.internalValue.populate?t("div",[t("div",[t(zm.Z,{attrs:{label:e.__("Path"),items:e.paths,value:e.internalValue.populate.path},on:{input:function(t){return e.updatePopulateValue("path",t)}}}),t(zm.Z,{attrs:{label:e.__("Label"),items:e.possibleValues,value:e.internalValue.populate.text},on:{input:function(t){return e.updatePopulateValue("text",t)}}}),t(zm.Z,{attrs:{label:e.__("Value"),items:e.possibleValues,value:e.internalValue.populate.value},on:{input:function(t){return e.updatePopulateValue("value",t)}}})],1),t("ElementStudioConditionInput",{attrs:{title:e.__("Filtering"),label:e.__("Show items in the variable only if a condition is met"),"path-starts-with":`${e.internalValue.populate.path}.`,value:e.internalValue.populate.condition},on:{input:e.updateCondition}}),t(bp.Z)],1):e._e()]:e._e()],2)},Fy=[];const Ry={path:"",text:"",value:"",condition:void 0};let Vy=class extends s.ZP{constructor(){super(...arguments),this.enabled=!1}get internalValue(){return this.value||{}}get paths(){return this.context.getPathsToAllControls(["repeater"])}get possibleValues(){const e=this.internalValue?.populate?.path;if(!e)return[];const t=this.getControl(e);if(!t)return[];const n=t.children.map((e=>e.slug));return n||[]}getControl(e){return(0,qe.AP)(this.element,e)}get populate(){return this.internalValue.populate||Ry}get variables(){return this.control.options.variableItems||[{value:"value",text:"Label"}]}get element(){return this.context.element()}updateVariableItems(e){this.$emit("updateVariableItems",e)}updateVariableItem(e,t){this.$emit("updateVariableItem",{newItem:e,index:t})}updateEnablePopulate(e){e?this.emit({populate:Ry}):this.emit({populate:void 0})}updateCondition(e){const t=(0,wd.Z)(this.populate);Array.isArray(e)&&!e.length?delete t.condition:t.condition=e,this.emit({populate:t})}updatePopulateValue(e,t){const n=(0,wd.Z)(this.populate);n[e]=t,this.emit({populate:n})}toggleEnabled(e){this.emit({enabled:e})}emit(e){this.$emit("input",{...this.internalValue,...e})}};(0,r.gn)([(0,l.fI)()],Vy.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],Vy.prototype,"control",void 0),(0,r.gn)([(0,l.fI)()],Vy.prototype,"path",void 0),(0,r.gn)([(0,l.tB)("context")],Vy.prototype,"context",void 0),Vy=(0,r.gn)([(0,l.wA)({components:{NiceButton:Br.Z,ElementStudioIconsAutocomplete:xy,Icon:He.Z,ElementStudioConditionInput:zv,Repeater:nv.Z,TextInput:na.Z}})],Vy);const $y=Vy,Wy=$y;var Uy=(0,N.Z)(Wy,Ny,Fy,!1,null,null,null);const zy=Uy.exports;var Hy=n(43195),Gy=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-media-options"},[t("div",{staticClass:"mb-3"},[t("h2",{staticClass:"mb-2"},[e._v(e._s(e.__("WP Media Options")))]),t(Um.Z,{attrs:{label:e.__("Enable gallery mode"),"input-value":e.internalValue.multiple,"hide-details":""},on:{change:e.updateMultiple}})],1),t(Um.Z,{attrs:{label:e.__("Allow only certain file types"),"input-value":e.fileTypesEnabled,"hide-details":""},on:{change:e.updateEnableFileTypes}}),e.fileTypesEnabled?t(Wm.Z,{staticClass:"mt-2",attrs:{label:e.__("Accepted File Types"),value:e.internalValue.acceptedFileTypes,items:e.types,multiple:!0,hint:e.__("All file types are allowed by default.")},on:{input:e.updateType}}):e._e()],1)},Ky=[],jy=n(665);const qy={acceptedFileTypes:void 0,multiple:!1};let Xy=class extends s.ZP{get fileTypesEnabled(){return Array.isArray(this.internalValue.acceptedFileTypes)}get types(){return jy.n_.types.map((e=>e.value))}get internalValue(){return this.value||qy}updateType(e){this.emit({...this.internalValue,acceptedFileTypes:e})}updateMultiple(e){this.emit({...this.internalValue,multiple:e})}updateEnableFileTypes(e){e?this.updateType([]):this.updateType(void 0)}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],Xy.prototype,"value",void 0),Xy=(0,r.gn)([(0,l.wA)({components:{DropdownInput:Cd.Z,Repeater:nv.Z}})],Xy);const Yy=Xy,Qy=Yy;var Jy=(0,N.Z)(Qy,Gy,Ky,!1,null,null,null);const ef=Jy.exports;var tf=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-media-size-options"},[t("div",{staticClass:"mb-3"},[t("h3",{staticClass:"mb-2"},[e._v(e._s(e.__("Media Size Options")))]),t(zm.Z,{attrs:{label:e.__("Image Path"),value:e.internalValue.imagePropertyPath,items:e.paths,hint:e.__("Will only show an image's available sizes. Use [] when inside a repeater."),"persistent-hint":"",clearable:""},on:{input:e.updatePath}}),e.internalValue.imagePropertyPath?t(Um.Z,{staticClass:"mb-3 mt-2",attrs:{"input-value":e.internalValue.disableSrcset,label:e.__("Don't add srcset attribute to the Image object"),"persistent-hint":"","hide-details":""},on:{change:e.toggleSrcset}}):e._e()],1)])},nf=[];let sf=class extends s.ZP{get internalValue(){return this.value||{}}get paths(){return this.context.getPathsToAllControls(["wpmedia"])}updatePath(e){this.emit({...this.internalValue,imagePropertyPath:e||""})}toggleSrcset(e){this.emit({...this.internalValue,disableSrcset:e})}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.tB)("context")],sf.prototype,"context",void 0),(0,r.gn)([(0,l.fI)()],sf.prototype,"value",void 0),sf=(0,r.gn)([(0,l.wA)({components:{DropdownInput:Cd.Z,Repeater:nv.Z}})],sf);const of=sf,af=of;var rf=(0,N.Z)(af,tf,nf,!1,null,null,null);const lf=rf.exports;var cf=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-icon-options"},[t("div",{staticClass:"mb-3"},[t("h3",{staticClass:"mb-2"},[e._v(e._s(e.__("Icon Options")))]),t(zm.Z,{attrs:{clearable:"",multiple:"",value:e.internalValue.suggestions,label:e.__("Suggestions")},on:{input:e.updateSuggestions}})],1)])},df=[];let uf=class extends s.ZP{get internalValue(){return this.value||{}}updateSuggestions(e){this.emit({...this.internalValue,suggestions:e})}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],uf.prototype,"value",void 0),uf=(0,r.gn)([(0,l.wA)({components:{DropdownInput:Cd.Z,Repeater:nv.Z}})],uf);const pf=uf,hf=pf;var gf=(0,N.Z)(hf,cf,df,!1,null,null,null);const mf=gf.exports;function vf(e,t){function n(e,n,s,i){let o="";return o="control"===i?`${t}.${n}_${s}.%%BREAKPOINT%%`:"complex"===i?`${t}.${n}.%%BREAKPOINT%%.${s}`:`${t}.${n}.${s}`,{location:`${e}-${s}`,cssProperty:`${n}-${s}`,affectedPropertyPath:o}}const s=[n("outside","margin","top","complex"),n("outside","margin","bottom","complex"),n("outside","margin","right","complex"),n("outside","margin","left","complex")],i=[n("inside","padding","top","complex"),n("inside","padding","bottom","complex"),n("inside","padding","right","complex"),n("inside","padding","left","complex")],o=[n("outside","margin","top","control"),n("outside","margin","bottom","control")],a=[n("outside","margin","right","control"),n("outside","margin","left","control")],r=[n("inside","padding","top","control"),n("inside","padding","bottom","control")],l=[n("inside","padding","right","control"),n("inside","padding","left","control")],c=[n("outside","margin","top","not_responsive"),n("outside","margin","bottom","not_responsive"),n("outside","margin","right","not_responsive"),n("outside","margin","left","not_responsive"),n("inside","padding","top","not_responsive"),n("inside","padding","bottom","not_responsive"),n("inside","padding","right","not_responsive"),n("inside","padding","left","not_responsive")];switch(e){case"spacing_all":return[...s,...i];case"spacing_all_y":return[...o,...r];case"spacing_all_x":return[...a,...l];case"spacing_margin_all":return s;case"spacing_margin_y":return o;case"spacing_margin_x":return a;case"spacing_padding_all":return i;case"spacing_padding_y":return r;case"spacing_padding_x":return l;case"spacing_all_not_responsive":return c}}var yf=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-post-chooser-options"},[t("div",{staticClass:"mb-3"},[t("h2",{staticClass:"mb-2"},[e._v(e._s(e.__("Post Chooser Options")))]),t("div",{staticClass:"mt-2"},[t("h4",{staticClass:"mb-1"},[e._v(e._s(e.__("Post Type")))]),t("TextInput",{attrs:{value:e.internalValue.postType},on:{input:function(t){return e.update("postType",t)}}})],1),t(Um.Z,{attrs:{label:e.__("Multiple"),"input-value":e.internalValue.multiple,"hide-details":""},on:{change:function(t){return e.update("multiple",t)}}}),t(Um.Z,{attrs:{label:e.__("Show Thumbnails"),"input-value":e.internalValue.showThumbnails,"hide-details":""},on:{change:function(t){return e.update("showThumbnails",t)}}})],1)])},ff=[];const _f={multiple:!1,showThumbnails:!1,postType:"post"};let bf=class extends s.ZP{get internalValue(){return this.value||_f}updateMultiple(e){this.emit({...this.internalValue,multiple:e})}update(e,t){this.emit({...this.internalValue,[e]:t??""})}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],bf.prototype,"value",void 0),bf=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,DropdownInput:Cd.Z,Repeater:nv.Z}})],bf);const Sf=bf,Cf=Sf;var xf=(0,N.Z)(Cf,yf,ff,!1,null,null,null);const wf=xf.exports;var If=n(99926),Pf=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-media-options mb-3"},[t("h2",{staticClass:"mb-2"},[e._v(e._s(e.__("Video Options")))]),t(Wm.Z,{attrs:{label:e.__("Providers"),value:e.internalValue.providers,items:e.types,multiple:!0,hint:e.__("All providers are allowed by default.")},on:{input:e.updateProviders}})],1)},kf=[];const Ef={providers:[]};let Tf=class extends s.ZP{get types(){return Qm.Ru.types.map((e=>e.value))}get internalValue(){return this.value||Ef}updateProviders(e){this.emit({...this.internalValue,providers:e})}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],Tf.prototype,"value",void 0),Tf=(0,r.gn)([(0,l.wA)({components:{DropdownInput:Cd.Z,Repeater:nv.Z}})],Tf);const Df=Tf,Af=Df;var Zf=(0,N.Z)(Af,Pf,kf,!1,null,null,null);const Of=Zf.exports;var Mf=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-media-options mb-3"},[t("h3",{staticClass:"mb-2"},[e._v("Alert Box Options")]),t("DropdownInput",{staticClass:"mb-4",attrs:{placeholder:"Style",items:e.styles,value:e.internalValue.style},on:{input:e.updateStyle}}),t("TipTapWrapper",{attrs:{value:e.internalValue.content},on:{input:e.updateContent}})],1)},Bf=[],Lf=n(7094);const Nf={style:"default",content:""};let Ff=class extends s.ZP{get internalValue(){return this.value||Nf}get styles(){return Qm.wu.types.map((e=>e.value))}updateStyle(e){this.emit({...this.internalValue,style:e})}updateContent(e){this.emit({...this.internalValue,content:e??""})}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],Ff.prototype,"value",void 0),Ff=(0,r.gn)([(0,l.wA)({components:{DropdownInput:Cd.Z,TipTapWrapper:Lf.Z}})],Ff);const Rf=Ff,Vf=Rf;var $f=(0,N.Z)(Vf,Mf,Bf,!1,null,null,null);const Wf=$f.exports;var Uf=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-focus-point-options mb-3"},[t("h2",{staticClass:"mb-2"},[e._v(e._s(e.__("Focus Point Options")))]),t(Um.Z,{staticClass:"mb-3",attrs:{label:e.__("Enable Grid Mode"),"hide-details":"","input-value":e.internalValue.gridMode},on:{change:e.updateGridMode}}),t(Wm.Z,{staticClass:"mb-2",attrs:{label:e.__("Image Path"),value:e.internalValue.imagePropertyPath,items:e.paths,"persistent-hint":"",hint:e.__("Shows an image as background of this input"),clearable:"",disabled:e.internalValue.gridMode},on:{input:e.updatePath}}),e.internalValue.gridMode?t("AlertBox",{attrs:{options:{type:"info",content:e.__("Not available when grid mode is enabled.")}}}):e._e()],1)},zf=[];let Hf=class extends s.ZP{get internalValue(){return this.value||{}}get paths(){return this.context.getPathsToAllControls(["wpmedia"])}updatePath(e){this.emit({...this.internalValue,imagePropertyPath:e||""})}updateGridMode(e){this.emit({...this.internalValue,gridMode:e})}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.tB)("context")],Hf.prototype,"context",void 0),(0,r.gn)([(0,l.fI)()],Hf.prototype,"value",void 0),Hf=(0,r.gn)([(0,l.wA)({components:{AlertBox:Ag.Z,DropdownInput:Cd.Z,Repeater:nv.Z}})],Hf);const Gf=Hf,Kf=Gf;var jf=(0,N.Z)(Kf,Uf,zf,!1,null,null,null);const qf=jf.exports;var Xf=n(78143),Yf=n(31304),Qf=n.n(Yf);async function Jf(e,t,n,s){return await(0,ad.D)({action:"breakdance_save_preset",dataToPost:{directoryPath:t,filename:n,preset:(0,Xf.Tb)((0,Xf.HE)(s),e.section,(0,Am.$_)(s))},decoder:iu._4})}function e_(e,t){return`${e}\\${Qf()(t)}`}var t_=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"element-studio-hide-control-input"},[t(Um.Z,{attrs:{"input-value":!!e.value,label:e.__("Hide Control From Specific Elements"),"hide-details":""},on:{change:e.toggleControl}}),e.value?t(zm.Z,{attrs:{label:e.__("Elements"),items:e.items,value:e.value,multiple:""},on:{input:e.updateValue}}):e._e()],1)},n_=[];let s_=class extends s.ZP{get items(){return Object.keys(Q.PK.elements)}toggleControl(e){e?this.$emit("input",[]):this.$emit("remove")}updateValue(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],s_.prototype,"value",void 0),(0,r.gn)([(0,l.tB)("context")],s_.prototype,"context",void 0),s_=(0,r.gn)([(0,l.wA)({})],s_);const i_=s_,o_=i_;var a_=(0,N.Z)(o_,t_,n_,!1,null,null,null);const r_=a_.exports;let l_=class extends s.ZP{constructor(){super(...arguments),this.codeHelpOpen=!1,this.showContentEditableCode=!1,this.showNewPresetDialog=!1,this.accordionState=[!1]}get canHaveMediaQueries(){return!!this.parentControl?.enableMediaQueries}get parentType(){return this.parentControl?.options.type}get keyToRerenderCodeHelp(){const e=(0,Wg.g)(this.value);return(0,Qv.X)(`${e}`)}get isPresetSection(){return!!this.presetSectionSlug}get presetSectionSlug(){return this.value.options.sectionOptions?.preset?.slug}get isSection(){return"section"===this.value.options.type}get isRepeater(){return(0,qe.W5)(this.value.options.type)}get isParentARepeater(){return(0,qe.W5)(this.parentType)}get controlAcceptsChildren(){return(0,qe.v4)(this.value.options.type)}get isInContentTab(){return this.path.startsWith("contentSections")}get spacingBarPresetSlug(){if(this.isSection)return Ge.spacingBarsPresetSlug.find((e=>e===this.value.options?.sectionOptions?.preset?.slug))}get classList(){return{"element-studio-control-or-control-section":!0,"element-studio-control-section":!0,"element-studio-control":!this.controlAcceptsChildren}}get twigPathWithoutRepeaterIndex(){return(0,Hy.rg)(`${this.twigParentPath}${this.isParentARepeater?"[]":""}.${this.value.slug}`)}get dynamicPathAcceptsItems(){return(0,Hy.cS)()}get contentEditableHelperCode(){return`// Add to the control value's wrapper HTML to make it ContentEditable\n\n ${this.twigPathForContentEditable}\n `}get twigPathForContentEditable(){return this.isRepeater||this.isParentARepeater?`{{ dataContentEditablePropertyPath('${this.twigParentPath}['~ loop.index0 ~ '].your_control') }}`:`{{ dataContentEditablePropertyPath('${this.twigPathWithoutRepeaterIndex}') }}`}get datePickerOptions(){return Object.keys(Qm.Fl.props)}get elementStudioData(){return this.context.getElementStudioData()}async saveNewPreset(e){if(!this.isSection)return;const t=Qf()(e.name),n=e_(e.namespace,t);if(this.elementStudioData.presets.find((e=>e.slug===n)))return void(0,Am.O6)(this.elementStudioData.saveLocations,e,"preset");const s=this.value;s.options.sectionOptions={...s.options.sectionOptions,preset:{slug:n}},(0,su.zG)(await Jf({slug:n,section:s},e.directoryPath,t,n),(0,ou.g_)((e=>{console.error(e),cd.Z.log.message((0,Ft.__)("Failed to save element, check console"))}),(()=>{const t=(0,wd.Z)(this.elementStudioData);t.presets.push({slug:n,directoryPath:e.directoryPath}),t.presetSections.push({slug:n,section:s}),this.context.updateElementStudioData(t),this.context.updateControl(this.parentPath,this.index,s)})))}toggleAccordion(e){s.ZP.set(this.accordionState,e,!this.accordionState[e])}handleDrag(e){this.context.replaceControls(`${this.path}.children`,e)}get canPaste(){return this.controlAcceptsChildren&&!this.isPresetSection&&c.uiStore.elementStudioClipboard.copiedControl}get canReplace(){if(!c.uiStore.elementStudioClipboard.copiedControl)return!1;const e=c.uiStore.elementStudioClipboard.copiedControl;return!this.isSection||"section"===e.options.type}handlePaste(){if(!this.controlAcceptsChildren)return;if(!c.uiStore.elementStudioClipboard.copiedControl)return;const e=c.uiStore.elementStudioClipboard.copiedControl;e&&this.context.pasteControl(`${this.path}.children`,e)}handleReplace(){if(!c.uiStore.elementStudioClipboard.copiedControl)return;const e=c.uiStore.elementStudioClipboard.copiedControl;e&&this.context.updateControl(this.parentPath,this.index,e)}handleMakePreset(){this.showNewPresetDialog=!0}get controlTypes(){const e=e=>e.charAt(0).toUpperCase()+e.slice(1),t=[];return Qm.F4.sort().filter(this.removeDisallowedControlTypes).map((t=>({text:e(t),value:t}))).map((e=>this.isInContentTab&&t.includes(e.value)?{...e,disabled:!0}:e))}copy(){const e=(0,wd.Z)(this.value);c.uiStore.copyElementStudioControl(e)}get availablePresetSections(){return this.context.getPresetSections().map((e=>({text:e.slug,value:e.slug})))}updatePresetSectionSlug(e){const t=(0,wd.Z)(this.context.getPresetSection(e));void 0!==t&&(t.section.options.sectionOptions={...t.section.options.sectionOptions,type:"popout"},this.context.updateControl(this.parentPath,this.index,t.section),this.turnRelativePropPathsToWhitelistInFlatPropsIntoAbsolutePathsAndUpdateElement(t.section.options.sectionOptions,t.section.slug),this.turnRelativeDynamicPropPathsIntoAbsoluteAndUpdateElement(t.section.options.sectionOptions,t.section.slug))}turnRelativePropPathsToWhitelistInFlatPropsIntoAbsolutePathsAndUpdateElement(e,t){if(!e||!e.preset?.relativePropertyPathsToWhitelistInFlatProps)return;const n=t||(0,Xf.HE)(t);let s=(0,wd.Z)(this.context.element().propertyPathsToWhitelistInFlatProps);const i=e.preset.relativePropertyPathsToWhitelistInFlatProps.map((e=>`${this.twigParentPath}.${n}.${e}`)),o=e.preset.relativePropertyPathsToWhitelistInFlatProps.map((e=>`${this.twigParentPath}.${this.value.slug}.${e}`));s?(s=s.filter((e=>!i.includes(e)&&!o.includes(e))),s=[...s,...i]):s=i,(0,A.forceNextTick)((()=>this.context.updateElementValue("propertyPathsToWhitelistInFlatProps",s)))}turnRelativeDynamicPropPathsIntoAbsoluteAndUpdateElement(e,t){if(!e||!e.preset?.relativeDynamicPropertyPaths)return;const n=t||(0,Xf.HE)(t);let s=(0,wd.Z)(this.context.element().dynamicPropertyPaths);const i=e.preset.relativeDynamicPropertyPaths.map((e=>({...e,path:`${this.twigParentPath}.${n}.${e.path}`}))),o=e.preset.relativeDynamicPropertyPaths.map((e=>({...e,path:`${this.twigParentPath}.${this.value.slug}.${e.path}`})));s?(s=s.filter((e=>!i.some((t=>t.path===e.path))&&!o.some((t=>t.path===e.path)))),s=[...s,...i]):s=i,(0,A.forceNextTick)((()=>this.context.updateElementValue("dynamicPropertyPaths",s)))}removeDisallowedControlTypes(e){const t=["class","font_family","global_colors","message"];return!t.includes(e)}addControl(){this.context.addControl(this.path)}deleteControl(){this.context.deleteControl(this.parentPath,this.index)}updateControlType(e){const t=(0,wd.Z)(this.value);if(t.options.type=e,!this.isInContentTab){const n=["code","repeater","inline_repeater","spacing_complex","border_complex","gradient","icon","richtext","shadow","wpmedia","text","focus_point","url"];n.includes(e)?t.options.layout="vertical":t.options.layout="inline"}this.context.updateControl(this.parentPath,this.index,t)}updateVariableItems(e){const t=(0,wd.Z)(this.value);t.options.variableItems=e,this.context.updateControl(this.parentPath,this.index,t)}updateVariableItem({newItem:e,index:t}){const n=(0,wd.Z)(this.value);n.options.variableItems||(n.options.variableItems=[]),n.options.variableItems[t]=e,this.context.updateControl(this.parentPath,this.index,n)}updateDropdownItems(e){const t=(0,wd.Z)(this.value);t.options.items=e,this.context.updateControl(this.parentPath,this.index,t)}updateDropdownItem({newItem:e,index:t}){const n=(0,wd.Z)(this.value);n.options.items||(n.options.items=[]),n.options.items[t]=e,this.context.updateControl(this.parentPath,this.index,n)}updateOptions(e,t){const n=(0,wd.Z)(this.value),s=`options.${t}`;Sd()(n,s,e),this.context.updateControl(this.parentPath,this.index,n)}get availableDescendantElements(){return Object.values(c.configStore.elements).filter((e=>!!e&&(!e.nestingRule.restrictedToBeADirectChildOf&&(0,Fe.V4)(e.nestingRule,this.context.element().nestingRule,this.context.element().slug)))).map((e=>e?.slug))}updateAddExtraElementsBySlug(e){const t=(0,wd.Z)(this.value);t.options.addRegisteredChildrenOptions={...t.options.addRegisteredChildrenOptions,addExtraElementsBySlug:e},this.context.updateControl(this.parentPath,this.index,t)}get autofocusSupported(){switch(this.value.options.type){case"text":return!0;case"video":return!0;default:return!1}}get codeTypes(){return["css","html","javascript","x-php"]}updateCodeType(e){const t=(0,wd.Z)(this.value);t.options.codeOptions={...t.options.codeOptions,language:e},this.context.updateControl(this.parentPath,this.index,t)}get shadowTypes(){return Qm.bB.props.type.types.map((e=>e.value))}updateShadowType(e){const t=(0,wd.Z)(this.value);t.options.shadowOptions={...t.options.shadowOptions,type:e},this.context.updateControl(this.parentPath,this.index,t)}updateTextOptionsMultiline(e){const t=(0,wd.Z)(this.value);t.options.textOptions={...t.options.textOptions,multiline:e},this.context.updateControl(this.parentPath,this.index,t)}updateTextOptionsFormat(e){const t=(0,wd.Z)(this.value);t.options.textOptions={...t.options.textOptions,format:e},this.context.updateControl(this.parentPath,this.index,t)}updateButtonBarOptionsSize(e){const t=(0,wd.Z)(this.value);t.options.buttonBarOptions={...t.options.buttonBarOptions,size:e?"big":"small",layout:"default"},this.context.updateControl(this.parentPath,this.index,t)}updateButtonBarOptionsLayout(e){const t=(0,wd.Z)(this.value);t.options.buttonBarOptions={...t.options.buttonBarOptions,layout:e?"multiline":"default",size:"small"},this.context.updateControl(this.parentPath,this.index,t)}addPreset(){this.context.addPreset(this.path)}get controlLayouts(){return["inline","vertical"]}updateControlLayout(e){const t=(0,wd.Z)(this.value);t.options.layout=e,this.context.updateControl(this.parentPath,this.index,t)}updateKeywords(e){const t=(0,wd.Z)(this.value);t.keywords=null===e?void 0:e.split(","),this.context.updateControl(this.parentPath,this.index,t)}get keywordsValue(){return this.value.keywords?this.value.keywords.join(","):""}updatePlaceholder(e){const t=(0,wd.Z)(this.value);t.options.placeholder=e??void 0,this.context.updateControl(this.parentPath,this.index,t)}updateColorType(e){const t=(0,wd.Z)(this.value);t.options.colorOptions={...t.options.colorOptions,type:e},this.context.updateControl(this.parentPath,this.index,t)}updateConditions(e){const t=(0,wd.Z)(this.value);Array.isArray(e)&&!e.length?delete t.options.condition:t.options.condition=e,this.context.updateControl(this.parentPath,this.index,t)}updateHideForElements(e){const t=(0,wd.Z)(this.value);t.options.hideForElements=e,this.context.updateControl(this.parentPath,this.index,t)}deleteHideForElements(){const e=(0,wd.Z)(this.value);delete e.options.hideForElements,this.context.updateControl(this.parentPath,this.index,e)}updateDisabledInFutureLayer(e){const t=(0,wd.Z)(this.value);t.options.disabledInFutureLayer=e,this.context.updateControl(this.parentPath,this.index,t)}get isBreakdanceDevelopmentEnvironment(){return(0,zg.y)()}get sectionLayouts(){return Qm.Pk}updateSectionLayoutType(e="accordion"){const t=(0,wd.Z)(this.value);t.options.sectionOptions={...t.options.sectionOptions,type:e},this.context.updateControl(this.parentPath,this.index,t)}updateLabelAndSlugOnFocusOut(e){const t=e.target.value,n=(0,wd.Z)(this.value);n.label=t,n.slug=t.replace(/[^a-z0-9]+/gi,"_").toLowerCase(),/^\d/.test(n.slug)&&(n.slug=`slug_cant_start_with_number_${n.slug}`),this.context.updateControl(this.parentPath,this.index,n),this.updateElementPropertiesNotTiedToControl(n)}updateSlugOnFocusOut(e){const t=e.target.value?e.target.value:"",n=(0,wd.Z)(this.value);n.slug=t.replace(/[^a-z0-9]+/gi,"_").toLowerCase(),/^\d/.test(n.slug)&&(n.slug=`slug_cant_start_with_number_${n.slug}`),this.context.updateControl(this.parentPath,this.index,n),this.updateElementPropertiesNotTiedToControl(n)}updateControlBoolean(e,t){const n=(0,wd.Z)(this.value);n[t]=e,this.context.updateControl(this.parentPath,this.index,n)}updateDynamic(e,t="string",n=!1){const s=(0,wd.Z)(this.value);e?s.dynamic={accepts:t,proOnly:n}:delete s.dynamic,this.context.updateControl(this.parentPath,this.index,s)}isSpacingBarEnabled(){const e=this.context.element().spacingBars;if(!e||!e.length)return!1;if(!this.spacingBarPresetSlug)return!1;const t=vf(this.spacingBarPresetSlug,this.twigPathWithoutRepeaterIndex).map((e=>e.affectedPropertyPath)),n=e.find((e=>t.includes(e.affectedPropertyPath)));return!!n}updateSpacingBar(e){if(!this.spacingBarPresetSlug)return;let t=(0,wd.Z)(this.context.element().spacingBars);const n=vf(this.spacingBarPresetSlug,this.twigPathWithoutRepeaterIndex);if(e)t||(t=[]),t=[...t,...n];else if(t){const e=n.map((e=>e.affectedPropertyPath));t=t.filter((t=>!e.includes(t.affectedPropertyPath)))}this.context.updateElementValue("spacingBars",t)}updateElementPropertiesNotTiedToControl(e){(0,A.forceNextTick)((()=>this.updateSpacingBar(!1))),(0,A.forceNextTick)((()=>this.updatePropertyPathsToWhitelistInFlatProps(!1))),(0,A.forceNextTick)((()=>this.updatePropertyPathsToSsrElementWhenValueChanges(!1))),this.turnRelativePropPathsToWhitelistInFlatPropsIntoAbsolutePathsAndUpdateElement(e.options.sectionOptions,e.slug),this.turnRelativeDynamicPropPathsIntoAbsoluteAndUpdateElement(e.options.sectionOptions,e.slug)}get shouldControlValueBeAddedInAllBreakpoints(){const e=this.context.element().propertyPathsToWhitelistInFlatProps;return e&&e.includes(this.twigPathWithoutRepeaterIndex)}updatePropertyPathsToWhitelistInFlatProps(e){let t=(0,wd.Z)(this.context.element().propertyPathsToWhitelistInFlatProps);if(e)t||(t=[]),t.push(this.twigPathWithoutRepeaterIndex);else if(t){const e=t.findIndex((e=>e===this.twigPathWithoutRepeaterIndex));e>-1&&t.splice(e,1)}this.context.updateElementValue("propertyPathsToWhitelistInFlatProps",t)}get hasSsr(){return this.context.element().template.includes("%%SSR%%")}get shouldControlValueCauseSsr(){const e=this.context.element().propertyPathsToSsrElementWhenValueChanges;return e&&e.includes(this.twigPathWithoutRepeaterIndex)}updatePropertyPathsToSsrElementWhenValueChanges(e){let t=(0,wd.Z)(this.context.element().propertyPathsToSsrElementWhenValueChanges);e?(t||(t=[]),t.push(this.twigPathWithoutRepeaterIndex)):t&&(t=t.filter((e=>e!==this.twigPathWithoutRepeaterIndex))),this.context.updateElementValue("propertyPathsToSsrElementWhenValueChanges",t)}};(0,r.gn)([(0,l.fI)()],l_.prototype,"path",void 0),(0,r.gn)([(0,l.fI)()],l_.prototype,"parentPath",void 0),(0,r.gn)([(0,l.fI)()],l_.prototype,"index",void 0),(0,r.gn)([(0,l.fI)()],l_.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],l_.prototype,"twigParentPath",void 0),(0,r.gn)([(0,l.fI)()],l_.prototype,"parentControl",void 0),(0,r.gn)([(0,l.tB)("context")],l_.prototype,"context",void 0),l_=(0,r.gn)([(0,l.wA)({name:"ControlSectionOrControl",components:{ElementStudioHideControlInput:r_,ElementStudioSaveNewDialog:Lm,ElementStudioFocusPointOptions:qf,ElementStudioVideoOptions:Of,ElementStudioIconsAutocomplete:xy,IconButton:Xa.Z,InlineRepeater:If.Z,ElementStudioBreakpointOptions:Ly,Icon:He.Z,ElementStudioIconOptions:mf,ElementStudioMediaSizeOptions:lf,ElementStudioMediaOptions:ef,ElementStudioPostChooserOptions:wf,TextInput:na.Z,Copyable:_v,ElementStudioDropdownOptions:Ty,ElementStudioVariableOptions:zy,DropdownInput:Cd.Z,ElementStudioRepeaterOptions:hy,ElementStudioRangeOptions:oy,Dropdown:Oc.Z,CopyButton:dv.Z,ShittyTextInput:cv,Repeater:nv.Z,ControlSectionOrControl:l_,draggable:ev(),Accordion:tv.Z,TwigCodeHelper:Nv,ElementStudioConditionInput:zv,ElementStudioUnitOptions:Yv,ElementStudioAlertBoxOptions:Wf}})],l_);const c_=l_,d_=c_;var u_=(0,N.Z)(d_,Xm,Ym,!1,null,null,null);const p_=u_.exports;let h_=class extends s.ZP{get sectionName(){return`${this.section}Sections`}handleDrag(e){this.context.replaceControls(this.sectionName,e)}get canPaste(){return Q.kD.elementStudioClipboard.copiedControl}handlePaste(){if(!Q.kD.elementStudioClipboard.copiedControl)return;const e=Q.kD.elementStudioClipboard.copiedControl;e&&this.context.pasteControl(this.sectionName,e)}addSection(){this.context.addControl(this.sectionName,"section")}addPreset(){this.context.addPreset(this.sectionName)}};(0,r.gn)([(0,l.fI)()],h_.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],h_.prototype,"section",void 0),(0,r.gn)([(0,l.tB)("context")],h_.prototype,"context",void 0),h_=(0,r.gn)([(0,l.wA)({components:{ControlSectionOrControl:p_,draggable:ev()}})],h_);const g_=h_,m_=g_;var v_=(0,N.Z)(m_,jm,qm,!1,null,null,null);const y_=v_.exports;var f_=n(81252),__=n(85256),b_=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[e._v(" "+e._s(e.__("Dependencies"))+" "),t("Repeater",{attrs:{value:e.value||[],control:{options:{repeaterOptions:{titleTemplate:"{title}",defaultTitle:e.__("Dependency")}}}},on:{input:function(t){return e.updateDependenciesRoot(t)}},scopedSlots:e._u([{key:"default",fn:function({index:n,value:s}){return[t(ed.Z,{attrs:{label:e.__("Title"),value:s.title},on:{input:function(t){return e.updateDependency(t,`[${n}].title`)}}}),t("Accordion",{attrs:{expanded:"scripts"===e.accordionState},on:{toggle:function(t){return e.toggleAccordion("scripts")}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"pa-4"},[e._v(" "+e._s(e.sprintf(e._doc("Scripts (%s)","%s: Number of scripts"),s.scripts?s.scripts.length:0))+" ")])]},proxy:!0},{key:"content",fn:function(){return[t("Repeater",{attrs:{value:s.scripts,control:{options:{repeaterOptions:{titleTemplate:e.__("URL to script")}}}},on:{input:function(t){return e.updateDependencies(t,`[${n}].scripts`)}},scopedSlots:e._u([{key:"default",fn:function({index:s,value:i}){return[t(Wm.Z,{attrs:{placeholder:e.__("Script"),value:i,items:e.jsLocalDependencies},on:{input:function(t){return e.updateDependency(t,`[${n}].scripts[${s}]`)}}}),!i||e.dependencyIsNotLocal(i,e.jsLocalDependencies)?t("div",[t("div",i?[e._v(" "+e._s(e.__("The dependency is a hardcoded value:"))+" ")]:[e._v(e._s(e.__("Hardcode a value:")))]),t("div",[e._v(" "+e._s(e.__("Remember to use"))+" "),t("pre",[e._v("%%BREAKDANCE_ELEMENTS_PLUGIN_URL%%")])]),t("ShittyTextInput",{attrs:{value:i},on:{input:function(t){return e.updateDependency(t,`[${n}].scripts[${s}]`)}}})],1):e._e(),t(Qo.Z,{attrs:{outlined:"",small:""},on:{click:e.getLocalDependenciesFilesFromWordpress}},[e._v(" "+e._s(e.__("Reload dependencies files"))+" ")])]}}],null,!0)})]},proxy:!0}],null,!0)}),t("Accordion",{attrs:{expanded:"inlineScripts"===e.accordionState},on:{toggle:function(t){return e.toggleAccordion("inlineScripts")}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"pa-4"},[e._v(" "+e._s(e.sprintf(e._doc("Inline Scripts (%s)","%s: Number of inline scripts"),s.inlineScripts?s.inlineScripts.length:0))+" ")])]},proxy:!0},{key:"content",fn:function(){return[t("Repeater",{attrs:{value:s.inlineScripts,control:{options:{repeaterOptions:{titleTemplate:e.__("JavaScript")}}}},on:{input:function(t){return e.updateDependencies(t,`[${n}].inlineScripts`)}},scopedSlots:e._u([{key:"default",fn:function({index:s,value:i}){return[t("div",{staticClass:"element-studio__execute-inline-script-dependencies"},[t(Qo.Z,{attrs:{small:"",outlined:""},on:{click:function(t){return e.executeInlineScript(`[${n}].inlineScripts[${s}]`)}}},[e._v(" "+e._s(e.__("Execute code"))+" ")])],1),t("CodeInput",{attrs:{value:i,language:"javascript","twig-variables":e.twigVariables,tags:e.tags},on:{input:function(t){return e.updateDependency(t||"",`[${n}].inlineScripts[${s}]`)}}})]}}],null,!0)})]},proxy:!0}],null,!0)}),t("Accordion",{attrs:{expanded:"styles"===e.accordionState},on:{toggle:function(t){return e.toggleAccordion("styles")}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"pa-4"},[e._v(" "+e._s(e.sprintf(e._doc("Styles (%s)","%s: Number of styles"),s.styles?s.styles.length:0))+" ")])]},proxy:!0},{key:"content",fn:function(){return[t("Repeater",{attrs:{value:s.styles,control:{options:{repeaterOptions:{titleTemplate:e.__("URL to style")}}}},on:{input:function(t){return e.updateDependencies(t,`[${n}].styles`)}},scopedSlots:e._u([{key:"default",fn:function({index:s,value:i}){return[t(Wm.Z,{attrs:{placeholder:e.__("Style"),value:i,items:e.cssLocalDependencies},on:{input:function(t){return e.updateDependency(t,`[${n}].styles[${s}]`)}}}),!i||e.dependencyIsNotLocal(i,e.cssLocalDependencies)?t("div",[t("div",i?[e._v(" "+e._s(e.__("The dependency is a hardcoded value:"))+" ")]:[e._v(e._s(e.__("Hardcode a value:")))]),t("div",[e._v(" "+e._s(e.__("Remember to use"))+" "),t("pre",[e._v("%%BREAKDANCE_ELEMENTS_PLUGIN_URL%%")])]),t("ShittyTextInput",{attrs:{value:i},on:{input:function(t){return e.updateDependency(t,`[${n}].styles[${s}]`)}}})],1):e._e(),t(Qo.Z,{attrs:{outlined:"",small:""},on:{click:e.getLocalDependenciesFilesFromWordpress}},[e._v(" "+e._s(e.__("Reload dependencies files"))+" ")])]}}],null,!0)})]},proxy:!0}],null,!0)}),t("Accordion",{attrs:{expanded:"inlineStyles"===e.accordionState},on:{toggle:function(t){return e.toggleAccordion("inlineStyles")}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"pa-4"},[e._v(" "+e._s(e.sprintf(e._doc("Inline Styles (%s)","%s: Number of inline styles"),s.inlineStyles?s.inlineStyles.length:0))+" ")])]},proxy:!0},{key:"content",fn:function(){return[t("Repeater",{attrs:{path:"inlineStyles",value:s.inlineStyles,control:{options:{repeaterOptions:{titleTemplate:e.__("CSS")}}}},on:{input:function(t){return e.updateDependencies(t,`[${n}].inlineStyles`)}},scopedSlots:e._u([{key:"default",fn:function({index:s,value:i}){return[t("CodeInput",{attrs:{value:i,language:"css","twig-variables":e.twigVariables,tags:e.tags},on:{input:function(t){return e.updateDependency(t||"",`[${n}].inlineStyles[${s}]`)}}})]}}],null,!0)})]},proxy:!0}],null,!0)}),t("div",{staticClass:"element-studio-dependencies-separator"}),t("Accordion",{attrs:{expanded:"builderCondition"===e.accordionState},on:{toggle:function(t){return e.toggleAccordion("builderCondition")}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"pa-4"},[s.builderCondition?[e._v(" "+e._s(e.__("Builder Condition (present)"))+" ")]:[e._v(" "+e._s(e.__("Builder Condition (empty)"))+" ")]],2)]},proxy:!0},{key:"content",fn:function(){return[t("CodeInput",{attrs:{value:s.builderCondition,language:"javascript","twig-variables":e.twigVariables},on:{input:function(t){return e.updateDependency(t||"",`[${n}].builderCondition`)}}}),t("div",{class:{"element-studio-action-info":!0,"element-studio-action-info__open":e.conditionInfoOpen},on:{click:function(t){e.conditionInfoOpen=!e.conditionInfoOpen}}},[t("TextWithChevron",{attrs:{open:e.conditionInfoOpen}},[e._t("default",(function(){return[e._v(" "+e._s(e.__("Decides if the dependencies are added to the builder"))+" ")]}))],2),t("div",{staticClass:"mt-2"},[e._v(" "+e._s(e.__("Can run Twig and JS code."))+" ")]),t("div",[e._v(" "+e._s(e.__("When left empty the dependencies will always be added."))+" ")]),t("div",[e._v(" "+e._s(e.sprintf(e._doc("If any code is present and the result returns a %s value the dependencies will be added.","%s: Code value 'true'"),e.codeTrue))+" ")]),t("div",[e._v(" "+e._s(e.sprintf(e._doc("If it returns %s no dependencies are added.","%s: Code value 'false'"),e.codeFalse))+" ")])],1)]},proxy:!0}],null,!0)}),t("Accordion",{attrs:{expanded:"frontendCondition"===e.accordionState},on:{toggle:function(t){return e.toggleAccordion("frontendCondition")}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"pa-4"},[s.frontendCondition?[e._v(" "+e._s(e.__("Frontend Condition (present)"))+" ")]:[e._v(" "+e._s(e.__("Frontend Condition (empty)"))+" ")]],2)]},proxy:!0},{key:"content",fn:function(){return[t("CodeInput",{attrs:{value:s.frontendCondition,language:"x-php","twig-variables":e.twigVariables},on:{input:function(t){return e.updateDependency(t||"",`[${n}].frontendCondition`)}}}),t("div",{class:{"element-studio-action-info":!0,"element-studio-action-info__open":e.conditionInfoOpen},on:{click:function(t){e.conditionInfoOpen=!e.conditionInfoOpen}}},[t("TextWithChevron",{attrs:{open:e.conditionInfoOpen}},[e._t("default",(function(){return[e._v(" "+e._s(e.__("Decides if the dependencies are added to the frontend"))+" ")]}))],2),t("div",{staticClass:"mt-2"},[e._v(" "+e._s(e.__("Can run Twig and PHP code."))+" ")]),t("div",[e._v(" "+e._s(e.__("When left empty the dependencies will always be added."))+" ")]),t("div",[e._v(" "+e._s(e.sprintf(e._doc("If any code is present and the result returns a %s value the dependencies will be added.","%s: Code value 'true'"),e.codeTrue))+" ")]),t("div",[e._v(" "+e._s(e.sprintf(e._doc("If it returns %s no dependencies are added.","%s: Code value 'false'"),e.codeFalse))+" ")])],1)]},proxy:!0}],null,!0)})]}}])})],1)},S_=[],C_=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"d-flex align-center"},[t("Icon",{staticClass:"mr-2",attrs:{icon:"ChevronDownIcon",rotate:e.open?"90":void 0,size:"12"}}),t("b",[e._t("default")],2)],1)},x_=[];let w_=class extends s.ZP{};(0,r.gn)([(0,l.fI)()],w_.prototype,"open",void 0),w_=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],w_);const I_=w_,P_=I_;var k_=(0,N.Z)(P_,C_,x_,!1,null,null,null);const E_=k_.exports;var T_=n(36300);const D_=iu.G0([iu.i0("id"),iu.i0("parentId"),iu.i0("selector"),iu.i0("parent_selector"),iu.i0("postId"),iu.i0("ssr"),iu.i0("children")]),A_=D_.types.map((({value:e})=>e));let Z_=class extends s.ZP{constructor(){super(...arguments),this.accordionState="",this.index=0,this.conditionInfoOpen=!1}get tags(){return A_}get twigVariables(){return this.context.getPathsToAllControls()}get codeTrue(){return"<code>true</code>"}get codeFalse(){return"<code>false</code>"}async mounted(){Q.PK.localDependenciesFiles.length||await this.getLocalDependenciesFilesFromWordpress()}async getLocalDependenciesFilesFromWordpress(){(0,id.pipe)(await(0,ad.D)({action:"breakdance_get_local_dependency_files",decoder:iu.IX(Km.xY),resultKey:"localDependencyFiles"}),(0,od.fold)((e=>e.forEach((e=>cd.Z.log.message(e.msg)))),(e=>{Q.PK.setLocalDependenciesFiles(e)})))}updateDependenciesRoot(e){this.context.updateDependency(e)}updateDependencies(e,t){const n=(0,wd.Z)(this.value)||[];Sd()(n,t,e.map((e=>"string"===typeof e?e:""))),this.context.updateDependency(n)}updateDependency(e,t){const n=(0,wd.Z)(this.value)||[];Sd()(n,t,e),this.context.updateDependency(n)}toggleAccordion(e){this.accordionState=this.accordionState===e?"":e}executeInlineScript(e){const t=j()(this.value,e);t&&(0,T_.Oz)((0,T.RY)(),{code:t,origin:"Executed inline script from Element Studio"})}dependencyIsNotLocal(e,t){return!t.find((t=>"value"in t&&t.value===e))}get jsLocalDependencies(){return this.localDependenciesAsVuetifySelectShape("js")}get cssLocalDependencies(){return this.localDependenciesAsVuetifySelectShape("css")}localDependenciesAsVuetifySelectShape(e){const t=[];return Q.PK.localDependenciesFiles.forEach((n=>{n.files[e].length&&(t.push({header:n.name}),n.files[e].forEach((e=>{t.push({text:e.name,value:e.url})})))})),t}};(0,r.gn)([(0,l.fI)()],Z_.prototype,"value",void 0),(0,r.gn)([(0,l.tB)("context")],Z_.prototype,"context",void 0),Z_=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,TextWithChevron:E_,CodeInput:f_.Z,Accordion:tv.Z,ShittyTextInput:cv,Repeater:nv.Z}})],Z_);const O_=Z_,M_=O_;var B_=(0,N.Z)(M_,b_,S_,!1,null,null,null);const L_=B_.exports,N_=e=>{const t=(0,wd.Z)(e),n=F_(t);return n.controls.settingsSections=[],n.cssTemplate=n.cssTemplate.split("\n{#%---")[0],n.dynamicPropertyPaths&&(n.dynamicPropertyPaths=n.dynamicPropertyPaths.filter((e=>!e.path.startsWith("settings.")))),n.propertyPathsToWhitelistInFlatProps&&(n.propertyPathsToWhitelistInFlatProps=n.propertyPathsToWhitelistInFlatProps.filter((e=>!e.startsWith("settings.")))),n};function F_(e){const t=(0,wd.Z)(e);return(0,__.f)(t.controls).forEach((e=>{t.controls[e]=t.controls[e].filter((e=>!e.options.isExternal))})),t}var R_=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("Accordion",{attrs:{expanded:e.accordionState===e.actionKey},on:{toggle:e.toggleAccordion},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"pa-4"},[e._v(" "+e._s(e.actionName)+" ("+e._s(e.value&&e.value[e.actionKey]?e.value[e.actionKey].length:0)+") ")])]},proxy:!0},{key:"content",fn:function(){return[t("b",[e._t("action-description")],2),t("Repeater",{attrs:{value:e.value[e.actionKey],control:{options:{repeaterOptions:{titleTemplate:e.__("Script"),buttonName:e.__("Add script")}}},"default-new-value":{script:""}},on:{input:function(t){return e.updateActions(t)}},scopedSlots:e._u([{key:"default",fn:function({index:n,value:s}){return[t("CodeInput",{attrs:{language:"javascript",value:s.script,"twig-variables":e.twigVariables,tags:e.tags},on:{input:function(t){return e.updateAction(t||"",`${e.actionKey}[${n}].script`)}}}),t("div",{class:{"element-studio-action-info":!0,"element-studio-action-info__open":e.actionInfoOpen},on:{click:function(t){e.actionInfoOpen=!e.actionInfoOpen}}},[t("TextWithChevron",{attrs:{open:e.actionInfoOpen}},[e._t("default",(function(){return[e._v(" "+e._s(e.__("Available within the action's code:"))+" ")]}))],2),"onAfterDeletedElement"===e.actionKey?[t("div",{staticClass:"mt-3"},[e._v(" "+e._s(e.sprintf(e._doc("Tags: %s and %s are available.","1: tag name, 2: tag name"),e.parentSelectorCode,e.parentIdCode))+" ")])]:[t("div",{staticClass:"mt-3"},[e._v(" "+e._s(e.__("You can use Twig to access the element properties. eg."))+" "),t("br"),t("code",{pre:!0},[e._v(" {{ design.background.color }} ")]),e._v(". ")]),t("div",{staticClass:"mt-3"},[e._v(" "+e._s(e.sprintf(e._doc("%s are also available.","%s: Tag names (SELECTOR and ID)"),e.selectorAndIdCode))+" ")])]],2),e.withDependencies?t("Repeater",{attrs:{value:s.dependencies,control:{options:{repeaterOptions:{titleTemplate:e.__("Dependency"),buttonName:e.__("Add dependency")}}}},on:{input:function(t){return e.updateDependencies(t,n)}},scopedSlots:e._u([{key:"default",fn:function({index:s,value:i}){return[t(zm.Z,{attrs:{items:e.pathsToAllControls,value:i},on:{input:function(t){return e.updateDependency(t,`${e.actionKey}[${n}].dependencies[${s}]`)}}}),t("div",{class:{"element-studio-action-info":!0,"element-studio-action-info__open":e.dependencyInfoOpen},on:{click:function(t){e.dependencyInfoOpen=!e.dependencyInfoOpen}}},[t("TextWithChevron",{attrs:{open:e.dependencyInfoOpen}},[e._t("default",(function(){return[e._t("dependency-description-title")]}))],2),t("div",{staticClass:"mt-2"},[e._t("dependency-description")],2)],1)]}}],null,!0)}):e._e(),t(Um.Z,{attrs:{"input-value":s.runForAllChildren,label:e.__("Run for all children"),hint:e.__("beware that the Twig code running in the action will be with the child's data, including tags"),"persistent-hint":""},on:{change:function(t){return e.updateAction(t,`${e.actionKey}[${n}].runForAllChildren`)}}})]}}],null,!0)})]},proxy:!0}],null,!0)})],1)},V_=[],$_=n(45021),W_=n.n($_);let U_=class extends s.ZP{constructor(){super(...arguments),this.index=0,this.actionInfoOpen=!1,this.dependencyInfoOpen=!1}get actionName(){return W_()(this.actionKey)}get tags(){return A_}get twigVariables(){return this.context.getPathsToAllControls()}get parentSelectorCode(){return"<code>%%PARENT_SELECTOR%%</code>"}get parentIdCode(){return"<code>%%PARENT_ID%%</code>"}get selectorAndIdCode(){return"<code>%%SELECTOR%%, %%ID%%</code>"}toggleAccordion(){this.$emit("toggle",this.accordionState===this.actionKey?"":this.actionKey)}getValueOrDefault(e){let t=(0,wd.Z)(this.value);return t?t[e]||(t[e]=[{script:""}]):t={[e]:[{script:""}]},t}updateActions(e){const t=this.getValueOrDefault(this.actionKey);t[this.actionKey]=e,this.context.updateActions(t)}updateAction(e,t){const n=(0,wd.Z)(this.value);Sd()(n,t,e),this.context.updateActions(n)}updateDependencies(e,t){const n=this.getValueOrDefault(this.actionKey);let s=n[this.actionKey];s||(s=[]),s[t].dependencies=e.map((e=>"string"===typeof e?e:"")),n[this.actionKey]=s,this.context.updateActions(n)}get pathsToAllControls(){const e=this.context.element().controls;return[e.designSections.length?"design":null,e.contentSections.length?"content":null,...this.context.getPathsToAllControls([],[])].filter(Boolean)}updateDependency(e,t){const n=(0,wd.Z)(this.value);Sd()(n,t,e),this.context.updateActions(n)}};(0,r.gn)([(0,l.fI)()],U_.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],U_.prototype,"actionKey",void 0),(0,r.gn)([(0,l.fI)()],U_.prototype,"accordionState",void 0),(0,r.gn)([(0,l.fI)({default:!0})],U_.prototype,"withDependencies",void 0),(0,r.gn)([(0,l.tB)("context")],U_.prototype,"context",void 0),U_=(0,r.gn)([(0,l.wA)({components:{TextWithChevron:E_,CodeInput:f_.Z,ShittyTextInput:cv,Repeater:nv.Z,Accordion:tv.Z}})],U_);const z_=U_,H_=z_;var G_=(0,N.Z)(H_,R_,V_,!1,null,null,null);const K_=G_.exports;var j_=n(22996),q_=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Repeater",{attrs:{value:e.value||[],control:{options:{repeaterOptions:{defaultNewValue:{name:"",template:""},defaultTitle:e.__("HTML Attribute"),titleTemplate:"{name}",buttonName:e.__("Add new HTML attribute")}}}},on:{input:function(t){return e.updateAttributes(t)}},scopedSlots:e._u([{key:"default",fn:function({index:n,value:s}){return[t("b",[e._v(e._s(e.__("Attribute Name")))]),t(ed.Z,{attrs:{value:s.name,rules:[e.htmlAttributeNameRule]},on:{input:function(t){return e.updateName(n,t)}}}),t("b",[e._v(e._s(e.__("Attribute Value")))]),"template"in s?t("CodeInput",{attrs:{value:s.template,language:"html"},on:{input:function(t){return e.updateTemplateValue(n,t)}}}):"propertyPath"in s?t(ed.Z,{attrs:{value:s.template},on:{input:function(t){return e.updatePropertyPathValue(n,t)}}}):"rawValue"in s?t(ed.Z,{attrs:{value:s.template},on:{input:function(t){return e.updateRawValue(n,t)}}}):e._e()]}}])})},X_=[];let Y_=class extends s.ZP{updateAttributes(e){this.$emit("input",e)}updateName(e,t){const n=(0,wd.Z)(this.value);!0===this.htmlAttributeNameRule(t)&&(n[e].name=t.trim(),this.$emit("input",n))}updateTemplateValue(e,t){const n=(0,wd.Z)(this.value);n[e].template=t??"",this.$emit("input",n)}updatePropertyPathValue(e,t){const n=(0,wd.Z)(this.value);n[e].propertyPath=t,this.$emit("input",n)}updateRawValue(e,t){const n=(0,wd.Z)(this.value);n[e].rawValue=t,this.$emit("input",n)}htmlAttributeNameRule(e){return Dg.hB.validateHtmlAttributeName(e)}};(0,r.gn)([(0,l.fI)({default:()=>[]})],Y_.prototype,"value",void 0),(0,r.gn)([(0,l.tB)("context")],Y_.prototype,"context",void 0),Y_=(0,r.gn)([(0,l.wA)({components:{CodeInput:f_.Z,Repeater:nv.Z,Dropdown:Oc.Z,Accordion:tv.Z,draggable:ev()}})],Y_);const Q_=Y_,J_=Q_;var eb=(0,N.Z)(J_,q_,X_,!1,null,null,null);const tb=eb.exports;var nb=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Repeater",{attrs:{value:e.value||[],control:{options:{repeaterOptions:{titleTemplate:e.sprintf(e._doc("Class %s","%s: Class name"),".{name}"),buttonName:e.__("Add Class"),defaultNewValue:{name:"my-class",template:"yes"}}}}},on:{input:function(t){return e.updateClasses(t)}},scopedSlots:e._u([{key:"default",fn:function({index:n,value:s}){return[t("b",[e._v(e._s(e.__("Class Name")))]),t(ed.Z,{attrs:{value:s.name,rules:[e.htmlClassNameRule]},on:{input:function(t){return e.updateName(n,t)}}}),t("b",[e._v(e._s(e.__("Class Condition Twig Template")))]),t("CodeInput",{attrs:{value:s.template,language:"html"},on:{input:function(t){return e.updateValue(n,t)}}}),t("div",{staticClass:"mt-2"},[e._v(" "+e._s(e.__("The template can run Twig code. Properties like design.something.whatever are available. If the template returns a blank string, the class will not be added. If the template returns anything, the class will be added."))+" ")]),t("div",[e._v(" "+e._s(e.__("(the returned value is trimmed for spaces and newlines)"))+" ")])]}}])})},sb=[];let ib=class extends s.ZP{updateClasses(e){this.$emit("input",e)}updateName(e,t){const n=(0,wd.Z)(this.value);!0===this.htmlClassNameRule(t)&&(n[e].name=t.trim(),this.$emit("input",n))}updateValue(e,t){const n=(0,wd.Z)(this.value);n[e].template=t??"",this.$emit("input",n)}htmlClassNameRule(e){return Dg.hB.validateHtmlClassName(e)}};(0,r.gn)([(0,l.fI)({default:[]})],ib.prototype,"value",void 0),(0,r.gn)([(0,l.tB)("context")],ib.prototype,"context",void 0),ib=(0,r.gn)([(0,l.wA)({components:{CodeInput:f_.Z,Repeater:nv.Z,Dropdown:Oc.Z,Accordion:tv.Z,draggable:ev()}})],ib);const ob=ib,ab=ob;var rb=(0,N.Z)(ab,nb,sb,!1,null,null,null);const lb=rb.exports;var cb=n(36798),db=n(75617),ub=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(Jc.Z,[t(yd.ZB,[e._v(" "+e._s(e.__("Looks Good"))+" "),t("DropdownInput",{attrs:{items:e.dropdownItems,value:e.value.looksGood,clearable:""},on:{input:function(t){return e.updateValueForKey("looksGood",t)}}}),t("br"),e._v(" "+e._s(e.__("Options Are Good"))+" "),t("DropdownInput",{attrs:{items:e.dropdownItems,value:e.value.optionsGood,clearable:""},on:{input:function(t){return e.updateValueForKey("optionsGood",t)}}}),t("br"),e._v(" "+e._s(e.__("Options Work"))+" "),t("DropdownInput",{attrs:{items:e.dropdownItems,value:e.value.optionsWork,clearable:""},on:{input:function(t){return e.updateValueForKey("optionsWork",t)}}}),t("br"),e._v(" "+e._s(e.__("Dynamic Behavior Works"))+" "),t("DropdownInput",{attrs:{items:e.dropdownItems,value:e.value.dynamicBehaviorWorks,clearable:""},on:{input:function(t){return e.updateValueForKey("dynamicBehaviorWorks",t)}}}),t("br"),t("br"),t(db.Z,{staticStyle:{border:"1px solid var(--gray500)"},attrs:{filled:"",value:e.value.notes},on:{input:e.updateNotes}}),t("br")],1)],1)},pb=[];let hb=class extends s.ZP{get dropdownItems(){return["yes","no","unknown","sort of"]}updateValueForKey(e,t){const n=(0,wd.Z)(this.value);n[e]=t,this.emit(n)}updateNotes(e){const t=(0,wd.Z)(this.value);t.notes="string"===typeof e?e:"",this.emit(t)}emit(e){this.$emit("input",e)}};(0,r.gn)([(0,l.fI)()],hb.prototype,"value",void 0),hb=(0,r.gn)([(0,l.wA)({components:{DropdownInput:Cd.Z}})],hb);const gb=hb,mb=gb;var vb=(0,N.Z)(mb,ub,pb,!1,null,null,null);const yb=vb.exports;var fb=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("InlineRepeater",{attrs:{value:e.value||[]},on:{input:function(t){return e.updateElementValue(t)}},scopedSlots:e._u([{key:"default",fn:function({index:n,value:s}){return[t(zm.Z,{attrs:{value:s,hint:e.__('To describe a repeater, use "[]". e.g: "content.list.my_repeater[].url"'),rules:[e.pathRules],items:e.allPaths},on:{input:function(t){return e.updatePropertyPathByIndex(n,t)}}})]}}])})},_b=[];let bb=class extends s.ZP{updateElementValue(e){const t=e.map((e=>"string"===typeof e?e:""));this.$emit("input",t)}updatePropertyPathByIndex(e,t){const n=(0,wd.Z)(this.value);t&&this.pathRules(t)&&(n[e]=t.trim(),this.updateElementValue(n))}pathRules(e){return(0,qe.qj)(e)}};(0,r.gn)([(0,l.fI)({default:()=>[]})],bb.prototype,"value",void 0),(0,r.gn)([(0,l.fI)({default:()=>[]})],bb.prototype,"allPaths",void 0),bb=(0,r.gn)([(0,l.wA)({components:{InlineRepeater:If.Z,Repeater:nv.Z,DropdownInput:Cd.Z,CodeInput:f_.Z,Dropdown:Oc.Z,Accordion:tv.Z,draggable:ev()}})],bb);const Sb=bb,Cb=Sb;var xb=(0,N.Z)(Cb,fb,_b,!1,null,null,null);const wb=xb.exports;var Ib=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[e.value.dynamicPropertyPaths&&e.value.dynamicPropertyPaths.length?t("Accordion",{attrs:{expanded:"dynamicPropertyPaths"===e.accordionState},on:{toggle:function(t){return e.toggleAccordion("dynamicPropertyPaths")}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"pa-4"},[e._v(" "+e._s(e.__("Dynamic Property Paths (deprecated)"))+" ")])]},proxy:!0},{key:"content",fn:function(){return[t("ElementStudioDynPropPaths",{attrs:{value:e.value.dynamicPropertyPaths,"all-paths":e.allPaths},on:{input:function(t){return e.updateElementValuePropPath(t,"dynamicPropertyPaths")}}})]},proxy:!0}],null,!1,445526283)}):e._e(),t("Accordion",{attrs:{expanded:"propertyPathsToWhitelistInFlatProps"===e.accordionState},on:{toggle:function(t){return e.toggleAccordion("propertyPathsToWhitelistInFlatProps")}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"pa-4"},[e._v(" "+e._s(e.__("Property paths to whitelist in flat props"))+" ")])]},proxy:!0},{key:"content",fn:function(){return[t("ElementStudioPropertyPaths",{attrs:{value:e.value.propertyPathsToWhitelistInFlatProps,"all-paths":e.allPathsWithDesignAndContent},on:{input:function(t){return e.updateElementValuePropPath(t,"propertyPathsToWhitelistInFlatProps")}}})]},proxy:!0}])}),t("Accordion",{attrs:{expanded:"dynamic-prop-paths"===e.accordionState},on:{toggle:function(t){return e.toggleAccordion("dynamic-prop-paths")}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"pa-4"},[e._v(" "+e._s(e.__("Property paths to SSR the element when value changes"))+" ")])]},proxy:!0},{key:"content",fn:function(){return[t("ElementStudioPropertyPaths",{attrs:{value:e.value.propertyPathsToSsrElementWhenValueChanges,"all-paths":e.allPathsWithDesignAndContent},on:{input:function(t){return e.updateElementValuePropPath(t,"propertyPathsToSsrElementWhenValueChanges")}}})]},proxy:!0}])}),t("Accordion",{attrs:{expanded:"spacing-bars"===e.accordionState},on:{toggle:function(t){return e.toggleAccordion("spacing-bars")}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"pa-4"},[e._v(e._s(e.__("Spacing Bars")))])]},proxy:!0},{key:"content",fn:function(){return[t("ElementStudioSpacingBars",{attrs:{value:e.value.spacingBars}})]},proxy:!0}])})],1)},Pb=[],kb=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Repeater",{attrs:{value:e.value||[],control:{options:{repeaterOptions:{titleTemplate:"{path} - {accepts}",buttonName:e.__("Add new Dynamic Property Path"),defaultNewValue:{accepts:"string",path:""}}}}},on:{input:function(t){return e.updateElementValue(t)}},scopedSlots:e._u([{key:"default",fn:function({index:n,value:s}){return[t("b",[e._v(e._s(e.__("Dynamic Property Path")))]),t(zm.Z,{attrs:{value:s.path,hint:e.__('To describe a repeater, use "[]". e.g: "content.list.my_repeater[].url"'),rules:[e.pathRules],items:e.allPaths},on:{input:function(t){return e.updateDynamicPropertyPath(n,t)}}}),t("b",{staticClass:"d-block pt-2"},[e._v(e._s(e.__("Accepts:")))]),t("DropdownInput",{attrs:{items:e.getDynamicPathAcceptsItems,value:s.accepts},on:{input:function(t){return e.updateValue(n,t)}}})]}}])})},Eb=[];let Tb=class extends s.ZP{updateElementValue(e){this.$emit("input",e)}updateDynamicPropertyPath(e,t){const n=(0,wd.Z)(this.value);this.pathRules(t)&&(n[e].path=t.trim(),this.updateElementValue(n))}pathRules(e){return(0,qe.qj)(e)}get getDynamicPathAcceptsItems(){return(0,Hy.cS)()}updateValue(e,t){const n=(0,wd.Z)(this.value);n[e].accepts=t,this.updateElementValue(n)}};(0,r.gn)([(0,l.fI)({default:()=>[]})],Tb.prototype,"value",void 0),(0,r.gn)([(0,l.fI)({default:()=>[]})],Tb.prototype,"allPaths",void 0),Tb=(0,r.gn)([(0,l.wA)({components:{Repeater:nv.Z,DropdownInput:Cd.Z,CodeInput:f_.Z,Dropdown:Oc.Z,Accordion:tv.Z,draggable:ev()}})],Tb);const Db=Tb,Ab=Db;var Zb=(0,N.Z)(Ab,kb,Eb,!1,null,null,null);const Ob=Zb.exports;var Mb=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Repeater",{attrs:{value:e.value||[],control:{options:{repeaterOptions:{titleTemplate:e.__("Spacing bar"),buttonName:e.__("Add new spacing bar")}}}},on:{input:function(t){return e.updateSpaceBars(t)}},scopedSlots:e._u([{key:"default",fn:function({value:n,index:s}){return[t("ElementStudioSpacingBar",{attrs:{value:n},on:{input:function(t){return e.updateSpaceBar(t,s)}}})]}}])})},Bb=[],Lb=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("div",{staticClass:"mt-4"},[e._v(e._s(e.__("Location")))]),t("DropdownInput",{attrs:{items:e.cssProperties,value:e.newSpaceBar.cssProperty},on:{input:e.updateLocationAndProperty}}),t("div",{staticClass:"mt-4"},[e._v(e._s(e.__("Affected property path")))]),t(zm.Z,{attrs:{items:e.pathsToAllControls,placeholder:"design.spacing.%%BREAKPOINT%%.top"},model:{value:e.newSpaceBar.affectedPropertyPath,callback:function(t){e.$set(e.newSpaceBar,"affectedPropertyPath",t)},expression:"newSpaceBar.affectedPropertyPath"}}),t("NiceButton",{on:{click:e.saveNewSpaceBar}},[e._v(e._s(e.__("Save")))])],1)},Nb=[],Fb=n(16442);let Rb=class extends s.ZP{constructor(){super(...arguments),this.newSpaceBar=this.value||{}}get pathsToAllControls(){return this.context.getPathsToAllControls()}get propertiesLocationsKeyPair(){const e=Km.g3.types.map((e=>e.value)),t=Km.U$.types.map((e=>e.value));return t.reduce(((t,n,s)=>({...t,[n]:e[s]})),{})}get cssProperties(){return Object.keys(this.propertiesLocationsKeyPair)}updateLocationAndProperty(e){this.newSpaceBar.cssProperty=e,this.newSpaceBar.location=this.propertiesLocationsKeyPair[e]}saveNewSpaceBar(){(0,su.zG)(Km.pG.decode(this.newSpaceBar),(0,ou.g_)((e=>{cd.Z.log.message((0,Ft.__)("Error saving new space bar, please fill out all fields")),(0,Fb.H)(e)}),(()=>{this.$emit("input",this.newSpaceBar)})))}};(0,r.gn)([(0,l.fI)()],Rb.prototype,"value",void 0),(0,r.gn)([(0,l.tB)("context")],Rb.prototype,"context",void 0),Rb=(0,r.gn)([(0,l.wA)({components:{NiceButton:Br.Z,DropdownInput:Cd.Z}})],Rb);const Vb=Rb,$b=Vb;var Wb=(0,N.Z)($b,Lb,Nb,!1,null,null,null);const Ub=Wb.exports;let zb=class extends s.ZP{updateSpaceBar(e,t){const n=(0,wd.Z)(this.value);n[t]=e,this.updateSpaceBars(n)}updateSpaceBars(e){this.context.updateElementValue("spacingBars",e)}};(0,r.gn)([(0,l.fI)({default:[]})],zb.prototype,"value",void 0),(0,r.gn)([(0,l.tB)("context")],zb.prototype,"context",void 0),zb=(0,r.gn)([(0,l.wA)({components:{ElementStudioSpacingBar:Ub,NiceButton:Br.Z,TextInput:na.Z,InlineRepeater:If.Z,Repeater:nv.Z,DropdownInput:Cd.Z,CodeInput:f_.Z,Dropdown:Oc.Z,Accordion:tv.Z,draggable:ev()}})],zb);const Hb=zb,Gb=Hb;var Kb=(0,N.Z)(Gb,Mb,Bb,!1,null,null,null);const jb=Kb.exports;let qb=class extends s.ZP{constructor(){super(...arguments),this.accordionState=""}toggleAccordion(e){this.accordionState=this.accordionState===e?"":e}get allPathsWithDesignAndContent(){return[this.context.element().controls.designSections.length?"design":null,this.context.element().controls.contentSections.length?"content":null,...this.context.getPathsToAllControls([],[])].filter(Boolean)}get allPaths(){return this.context.getPathsToAllControls()}updateElementValuePropPath(e,t){this.context.updateElementValue(t,e)}};(0,r.gn)([(0,l.fI)()],qb.prototype,"value",void 0),(0,r.gn)([(0,l.tB)("context")],qb.prototype,"context",void 0),qb=(0,r.gn)([(0,l.wA)({components:{ElementStudioSpacingBars:jb,ElementStudioPropertyPaths:wb,ElementStudioDynPropPaths:Ob,Accordion:tv.Z}})],qb);const Xb=qb,Yb=Xb;var Qb=(0,N.Z)(Yb,Ib,Pb,!1,null,null,null);const Jb=Qb.exports;var eS=n(46368),tS=n(86592);function nS(e){Q.PK.setTwigMacros(e),(0,tS.J6)((0,tS.GJ)(e),tS.rf),Q.kD.forceUpdateEntireCanvas()}const sS=qa()(Al.w.registerAllStoreActions,500);let iS=class extends s.ZP{constructor(){super(...arguments),this.tab=(0,Ug.z)(`element-studio-tab-${this.type}`)||"content",this.actionsAccordionState="",this.nameHasChanged=!1,this.useLocalIcon=!!fy.iconNames.find((e=>e===this.element.uiIcon))||!this.element.uiIcon||!1,this.contextMenu=!1,this.showNewMacroDialog=!1,this.savedCssSelection="",this.elementStudioContext={replaceControls:(e,t)=>{const n=(0,wd.Z)(this.element);Sd()(n.controls,e,t),this.emit(n)},pasteControl:(e,t)=>{const n=(0,wd.Z)(this.element),s=j()(n.controls,e);s.push(t),Sd()(n.controls,e,s),this.emit(n)},addControl:(e,t="text")=>{const n=(0,wd.Z)(this.element),s={slug:"section"===t?"new_section":"new_control",label:"section"===t?(0,Ft.__)("New Section"):(0,Ft.__)("New Control"),keywords:[],options:{type:t},enableMediaQueries:!1,enableHover:!1,enableVariables:!1,children:[]};(e.startsWith("contentSections")||"text"===t||"number"===t)&&(s.options.layout="vertical");const i=this.cleanElement.controls,o=j()(i,e);Array.isArray(o)?o.push(s):o.children.push(s),Sd()(i,e,o),n.controls=this.mergeElementControlsWithExternalControls(i),this.emit(n)},addPreset:e=>{const t=(0,wd.Z)(this.element),n=(0,wd.Z)(this.elementStudioContext.getPresetSection("EssentialElements\\typography"));if(!n)return;n.section.options.sectionOptions={...n.section.options.sectionOptions,type:"popout"};const s=this.cleanElement.controls,i=j()(s,e);Array.isArray(i)?i.push(n.section):i.children.push(n.section),Sd()(s,e,i),t.controls=this.mergeElementControlsWithExternalControls(s),this.emit(t)},deleteControl:(e,t)=>{const n=(0,wd.Z)(this.element),s=this.parentControls(e);Array.isArray(s)?s.splice(t,1):s.children.splice(t,1),Sd()(n.controls,e,s),this.emit(n)},updateControl:(e,t,n)=>{const s=(0,wd.Z)(this.element),i=this.parentControls(e);Array.isArray(i)?i.splice(t,1,n):i.children.splice(t,1,n),Sd()(s.controls,e,i),this.emit(s)},updateDependency:e=>{this.updateElementValue("dependencies",e)},updateActions:e=>{this.updateElementValue("actions",e),sS()},getPresetSection:e=>this.available.presetSections.find((t=>t.slug===e)),getPresetSections:()=>this.available.presetSections,getPathsToAllControls:(e=[],t=["section"])=>{const n=(0,Am.eH)(this.element.controls.contentSections,e,t,"content"),s=(0,Am.eH)(this.element.controls.designSections,e,t,"design");return[...n,...s]},element:()=>this.element,updateElementValue:this.updateElementValue,getElementStudioData:()=>this.available,updateElementStudioData:e=>{this.update(e)}}}async mounted(){document.addEventListener("contextmenu",this.handleRightClickInCodeInput)}beforeDestroy(){document.removeEventListener("contextmenu",this.handleRightClickInCodeInput)}onElementSlugChange(){this.nameHasChanged=!0}handleRightClickInCodeInput(e){const t=window.getSelection()?.toString();!t||"css"!==this.tab&&"html"!==this.tab||(e.preventDefault(),this.contextMenu={x:e.clientX,y:e.clientY})}handleCreateMacro(){this.savedCssSelection=window.getSelection()?.toString()||"",this.showNewMacroDialog=!0}async saveNewMacro(e){if(!this.savedCssSelection)return;this.contextMenu=!1;const t=this.savedCssSelection?.toString(),n=(0,Xf.dZ)(e.namespace,e.name),s=(0,tS.as)(t,{selector:"{{ selector }}",id:"{{ id }}",postId:"{{ postId }}"}).replace("macros.","_self."),i=`{% macro ${n}() %}\n\n${s} \n\n{% endmacro %}`,o=Qf()(e.name),a=e_(e.namespace,e.name);this.available.macros.find((e=>e.slug===a))?(0,Am.O6)(this.available.saveLocations,e,"macro"):(0,su.zG)(await(0,ad.D)({action:"breakdance_save_macro",dataToPost:{directoryPath:e.directoryPath,filename:o,macro:i},decoder:iu._4}),(0,ou.g_)((e=>{console.error(e),cd.Z.log.message((0,Ft.__)("Failed to save element, check console"))}),(()=>{const t=`{{ macros.${n}() }}`;cd.Z.log.message((0,Ft.gB)((0,Ft.__)("New macro created: %s. "),t)),Gu()(t);const s=(0,wd.Z)(this.available);s.macros.push({slug:a,directoryPath:e.directoryPath}),this.elementStudioContext.updateElementStudioData(s);const o=(0,wd.Z)(Q.PK.twigMacros);o.push({macro:i,slug:a}),nS(o)})))}updateSlug(){if(!window.confirm((0,Ft.gB)((0,Ft.__)("Changing the slug of an existing element will make it obsolete in all pages, everywhere. Continue anyway?"))))return;const e=(0,Am.kK)((0,Am.$_)(this.element.slug),this.element.name);this.updateElementValue("slug",e)}updateUiOrder(e){const t=Number(e);Number.isNaN(t)?this.updateElementValue("order",0):this.updateElementValue("order",t)}updateUiIcon(e="SquareIcon"){this.updateElementValue("uiIcon",e)}updateUseLocalIcon(e){this.useLocalIcon=e,e||this.updateUiIcon("")}updateClassName(e){!0===this.htmlClassNameRule(e)&&this.updateElementValue("className",e||!1)}htmlClassNameRule(e){return!e||Dg.hB.validateHtmlClassName(e)}isValidItemName(e){return(0,Am.nQ)(e)}updateElementName(e){if(!0!==(0,Am.nQ)(e))return;const t=(0,wd.Z)(this.element);t.name=e,this.emit(t)}updateElementValue(e,t){const n=(0,wd.Z)(this.element),s=(0,Zv.lX)(t);Sd()(n,e,s),this.emit(n)}emit(e){this.$emit("input",e)}updateTab(e){(0,Ug.r)(`element-studio-tab-${this.type}`,e),this.tab=e}mergeElementControlsWithExternalControls(e){const t=(0,wd.Z)(e);return(0,__.f)(this.element.controls).forEach((e=>{this.element.controls[e].forEach((n=>{n.options.isExternal&&t[e].push(n)}))})),t}get showAdvancedFeatures(){return(0,zg.y)()||Q.PK.isElementStudioPowerUser}get requiredPluginItems(){return Km.ws.types.map((e=>e.value))}get tags(){return A_}get pathsToAllControls(){return this.elementStudioContext.getPathsToAllControls()}get nestingRuleTypeIsContainer(){return(0,Fe.ZC)(this.cleanElement.nestingRule.type).length>0||"container-restricted"===this.cleanElement.nestingRule.type}get cleanElement(){return N_(this.element)}get elementCategories(){return Q.PK.builderElementCategories.map((e=>({text:e.label,value:e.slug})))}get badgeColors(){return Object.entries(eS.Z).map((([e])=>{const t=e.replace(/brand_/g,"brand").replace(/_dark|_light|breakdance_/g,"");return{text:t,value:`var(--${t})`}}))}get elementType(){return Km.iQ.types.map((e=>e.value))}get containerRestrictedElements(){return Object.values(Q.PK.elements).filter((e=>"container-restricted"===e?.nestingRule.type&&e?.slug!==Ge.COLUMNS_SLUG)).map((e=>e?.slug))}get elementsThisElementIsAllowedToBeInsideOf(){return Object.values(Q.PK.elements).filter((e=>e&&(0,Fe.V4)(this.element.nestingRule,e.nestingRule,e.slug))).map((e=>e?.slug))}get allElementSlugs(){return Object.values(Q.PK.elements).map((e=>e?.slug))}get elementClass(){return`.${(0,qe.MO)(this.element)}`}get elementClassToCopy(){return"oxygen"===Q.PK.builderMode?this.elementClass:`.breakdance ${this.elementClass}`}parentControls(e){return(0,wd.Z)(j()(this.element.controls,e))}update(e){this.$emit("update",e)}toggleActionAccordion(e){this.actionsAccordionState=e}get htmlTags(){return["section","div","span","p","h1","h2","h3","h4","h5","h6","footer","header","nav","aside","figure","figcaption","ul","ol","li","a","article","main","details","summary","img","video"].filter((e=>e!==this.cleanElement.htmlTag.default))}get defaultTag(){return[...this.htmlTags,this.cleanElement.htmlTag.default]}};(0,r.gn)([(0,l.fI)()],iS.prototype,"element",void 0),(0,r.gn)([(0,l.fI)({default:"primary"})],iS.prototype,"type",void 0),(0,r.gn)([(0,l.fI)()],iS.prototype,"available",void 0),(0,r.gn)([(0,l.RL)("element.name")],iS.prototype,"onElementSlugChange",null),(0,r.gn)([(0,l.DF)("context")],iS.prototype,"elementStudioContext",void 0),iS=(0,r.gn)([(0,l.wA)({components:{Dropdown:Oc.Z,ElementStudioSaveNewDialog:Lm,TextInput:na.Z,ElementStudioIconsAutocomplete:xy,ElementStudioManagePropertyPaths:Jb,ElementStudioPropertyPaths:wb,Accordion:tv.Z,ElementIcon:on.Z,ToggleInput:Zp.Z,Icon:He.Z,ElementStudioAttributes:tb,ElementStudioAdditionalClasses:lb,ElementStudioDefaultElements:j_.Z,CopyButton:dv.Z,ElementStudioAction:K_,ElementStudioDependencies:L_,ElementStudioControls:y_,CodeInput:f_.Z,ElementStudioDefaultProperties:cb.Z,ElementStudioProjectManagement:yb}})],iS);const oS=iS,aS=oS;var rS=(0,N.Z)(aS,Hm,Gm,!1,null,null,null);const lS=rS.exports;function cS(){const e=Q.PK.builderMode||"breakdance";return{className:!1,uiIcon:!1,category:"other",badge:!1,htmlTag:{default:"div",options:[],pathToControl:!1},template:"Blank Element",attributes:!1,cssTemplate:"%%SELECTOR%% { }",defaultCss:" ",defaultProperties:!1,defaultChildren:!1,controls:{contentSections:[],designSections:[],settingsSections:[]},dependencies:!1,actions:!1,nestingRule:{type:"final"},spacingBars:!1,dynamicPropertyPaths:!1,settings:!1,addPanelRules:!1,experimental:!1,availableIn:[e],order:0,additionalClasses:!1,projectManagement:!1,propertyPathsToWhitelistInFlatProps:!1,propertyPathsToSsrElementWhenValueChanges:!1}}let dS=class extends s.ZP{constructor(){super(...arguments),this.lastSavedElement=!1,this.currentlyEditingElement=!1,this.saveInProgress=!1,this.throttledUpdateElement=U()(qe.Cf,500),this.mode=(0,Ug.z)("element-studio-mode")||"normal"}get elementsSlug(){return this.value.elements.map((e=>e.slug))}updateCurrentlyEditingElement(e){this.currentlyEditingElement=(0,wd.Z)(e),!1===this.lastSavedElement&&(this.lastSavedElement=(0,wd.Z)(e))}updateAvailableElementsAndStore(e){const t=e.element.slug;this.lastSavedElement&&t!==this.lastSavedElement.element.slug&&(0,Am.$_)(t)===(0,Am.$_)(this.lastSavedElement.element.slug)&&this.deleteElementFromServer(this.lastSavedElement);const n=!!this.value.elements.find((e=>e.slug===t));if(!n&&e.directoryPath){const n=(0,wd.Z)(this.value);n.elements.push({slug:t,directoryPath:e.directoryPath}),this.$emit("input",n)}this.lastSavedElement=e}get hasUnsavedChanges(){return!(!this.currentlyEditingElement||!this.lastSavedElement)&&!oh()(this.lastSavedElement.element,this.currentlyEditingElement.element)}updateData(e){this.$emit("input",e)}updateElement(e){if(!this.currentlyEditingElement||!this.lastSavedElement||!this.lastSavedElement.element)return;const t=e.slug!==this.lastSavedElement.element.slug;let n=this.currentlyEditingElement.directoryPath;t&&this.currentlyEditingElement.directoryPath&&(n=(0,Xf.Lg)({directoryPath:(0,Xf.HT)(this.currentlyEditingElement.directoryPath),elementName:this.currentlyEditingElement.element.name})),this.currentlyEditingElement={directoryPath:n,element:e,onlyForAdvancedUsers:this.currentlyEditingElement.onlyForAdvancedUsers},this.throttledUpdateElement(e)}deleteElementFromStore(e){const t=this.value.elements.findIndex((t=>t.slug===e));c.configStore.deleteElement(e),-1!==t&&this.value.elements.splice(t,1)}deleteElement(){this.currentlyEditingElement&&this.deleteElementFromServer(this.currentlyEditingElement,(()=>{this.currentlyEditingElement=!1}))}async deleteElementFromServer(e,t=(()=>{})){e.element&&(0,id.pipe)(await(0,ad.D)({action:"breakdance_delete_element",dataToPost:{directoryPath:e.directoryPath},decoder:iu.i0("success"),resultKey:"data"}),(0,od.fold)((()=>{cd.Z.log.message("Failed to delete element")}),(()=>{e.element?(this.deleteElementFromStore(e.element.slug),t()):cd.Z.log.message("Failed to delete element")})))}discardChanges(){this.lastSavedElement&&this.lastSavedElement.element&&this.updateElement(this.lastSavedElement.element),this.resetCurrentlyEditingElement()}resetCurrentlyEditingElement(){this.currentlyEditingElement=!1,this.lastSavedElement=!1,this.$emit("active",null)}switchMode(){switch(this.mode){case"split-vertical":this.mode="split-horizontal",this.$emit("width",750);break;case"split-horizontal":this.$emit("width",600),this.mode="normal";break;case"normal":this.$emit("width",600),this.mode="split-vertical";break}(0,Ug.r)("element-studio-mode",this.mode)}openElement(e){const t=(0,wd.Z)(c.configStore.element(e)),n=this.value.elements.find((t=>t.slug===e));if(!n)return;const s=this.value.saveLocations.find((e=>n.directoryPath.startsWith(e.directoryPath))),i=!!s?.onlyForAdvancedUsers;this.updateCurrentlyEditingElement({element:t,directoryPath:n.directoryPath,onlyForAdvancedUsers:i}),this.$emit("active","element")}saveAs(e){if(!this.currentlyEditingElement)return;const{namespace:t,directoryPath:n,onlyForAdvancedUsers:s}=e,i=(0,wd.Z)(this.currentlyEditingElement.element);this.currentlyEditingElement.directoryPath!==n&&(i.slug=""),this.saveToServer(i,(0,Xf.Lg)({directoryPath:n,elementName:this.currentlyEditingElement.element.name}),t,!1,s)}saveNewItem(e){const t=(0,Am.kK)(e.namespace,e.name);if(this.value.elements.find((e=>e.slug===t)))return void(0,Am.O6)(this.value.saveLocations,e,"element");const n={...cS(),slug:t,name:e.name};this.saveToServer(n,(0,Xf.Lg)({directoryPath:e.directoryPath,elementName:e.name}),e.namespace,!1,e.onlyForAdvancedUsers),this.$emit("active","element")}saveOverride(e){this.currentlyEditingElement&&this.currentlyEditingElement.directoryPath&&this.saveToServer(this.currentlyEditingElement.element,this.currentlyEditingElement.directoryPath,(0,Am.$_)(this.currentlyEditingElement.element.slug),e,this.currentlyEditingElement.onlyForAdvancedUsers)}async saveToServer(e,t,n,s=!1,i){this.saveInProgress=!0;const o=n||(0,Am.$_)(e.slug),a=N_(e),r=e.slug||(0,Am.kK)(o,e.name);(0,id.pipe)(await(0,ad.D)({action:"breakdance_save_element",dataToPost:{...(0,Xf.x)(a,o),directoryPath:t,bypassPsalm:s?"yes":"no"},decoder:iu._4}),(0,od.fold)((e=>{console.error(e),cd.Z.log.message("Failed to save element, check console")}),(()=>{const n={element:{...(0,wd.Z)(e),slug:r,name:e.name.split(" ").map((e=>e.charAt(0).toUpperCase()+e.substring(1))).join(" ")},directoryPath:t,onlyForAdvancedUsers:i};this.updateCurrentlyEditingElement(n),this.updateAvailableElementsAndStore(n),(0,qe.Cf)(n.element)}))),this.saveInProgress=!1}};(0,r.gn)([(0,l.fI)()],dS.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],dS.prototype,"width",void 0),dS=(0,r.gn)([(0,l.wA)({components:{ElementStudioTabsAndPanels:lS,ElementStudioWidthAdjustmentBar:wm,ElementStudioTopbar:$m}})],dS);const uS=dS,pS=uS;var hS=(0,N.Z)(pS,Im,Pm,!1,null,null,null);const gS=hS.exports,mS=iu.dt({slug:iu.Z_,directoryPath:iu.Z_}),vS=iu.G0([iu.i0("element"),iu.i0("macro"),iu.i0("preset")]),yS=iu.dt({directoryPath:iu.Z_,namespace:iu.Z_,type:vS,label:iu.Z_,onlyForAdvancedUsers:iu.O7}),fS=iu.dt({slug:iu.Z_,section:Qm.ur}),_S=iu.dt({elements:iu.IX(mS),macros:iu.IX(mS),presets:iu.IX(mS),saveLocations:iu.IX(yS),presetSections:iu.IX(fS)});var bS=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:{"element-studio-wrapper":e.currentlyEditingMacro,"element-studio__hide-the-close-button":!e.currentlyEditingMacro,"element-studio__hide-the-switch-mode-button":!0}},[t("ElementStudioTopbar",{attrs:{"save-locations":e.value.saveLocations,"items-slug":e.macrosSlug,value:e.currentlyEditingMacro,itemType:"macro","item-name":e.currentMacroName,hasUnsavedChanges:e.hasUnsavedChanges,saveInProgress:e.saveInProgress},on:{open:e.openMacro,delete:e.deleteMacro,saveOverride:e.saveOverride,saveAs:e.saveAs,saveNew:e.saveNewItem,discardChanges:e.discardChanges,reset:e.resetCurrentlyEditingMacro}}),e.currentlyEditingMacro?t("div",{staticClass:"element-studio-content"},[t("div",{staticClass:"panel-100 vscroll-scroll"},[t("div",{staticClass:"element-studio-tabs-panel d-flex flex-column"},[t("div",{staticClass:"element-studio-tabs"},[t(Qp.Z,{attrs:{value:e.activeTab},on:{change:e.updateTab}},[t(Yp.Z,{attrs:{href:"#macro",title:e.__("Macro")}},[t("Icon",{attrs:{icon:"PenIcon",size:"16"}})],1),t(Yp.Z,{attrs:{href:"#settings",title:e.__("Settings")}},[t("Icon",{attrs:{icon:"GearIcon",size:"16"}})],1)],1)],1)]),t("div",{staticClass:"element-studio-tabs-items vscroll-scroll"},[t("CodeInput",{directives:[{name:"show",rawName:"v-show",value:"macro"===e.activeTab,expression:"activeTab === 'macro'"}],attrs:{value:e.currentlyEditingMacro.macroData.macro,language:"twig"},on:{input:e.updateMacroValue}}),"settings"===e.activeTab?t("div",{staticClass:"pa-4"},[t(ed.Z,{attrs:{value:e.currentMacroName,label:e.__("Name"),rules:[e.isValidItemName]},on:{input:e.updateMacroName}}),t("ToggleInput",{attrs:{value:e.autoRefresh},on:{input:e.updateAutoRefresh}}),t("label",{staticClass:"ml-2"},[e._v(e._s(e.__("Live preview changes")))])],1):e._e()],1)])]):e._e()],1)},SS=[];let CS=class extends s.ZP{constructor(){super(...arguments),this.lastSavedMacro=!1,this.currentlyEditingMacro=!1,this.saveInProgress=!1,this.autoRefresh=!0,this.activeTab="macro",this.throttledUpdateElement=qa()(this.updateMacroAndRecompileTwigTemplates,1e3)}get macrosSlug(){return this.value.macros.map((e=>e.slug))}isValidItemName(e){return(0,Am.nQ)(e)}updateCurrentlyEditingMacro(e){this.currentlyEditingMacro=(0,wd.Z)(e),!1===this.lastSavedMacro&&(this.lastSavedMacro=(0,wd.Z)(e))}updateTab(e){this.activeTab=e}updateMacroName(e){this.currentlyEditingMacro&&(this.currentlyEditingMacro.macroData.slug=e_((0,Am.$_)(this.currentlyEditingMacro.macroData.slug),e))}updateAutoRefresh(e){this.autoRefresh=e,e&&this.currentlyEditingMacro&&this.updateMacroAndRecompileTwigTemplates(this.currentlyEditingMacro.macroData)}updateMacroAndRecompileTwigTemplates(e){const t=(0,wd.Z)(c.configStore.twigMacros),n=t.findIndex((t=>t.slug===e.slug));if(-1===n){t.push(e);const n=(0,wd.Z)(this.value);n.macros.push(e),this.$emit("input",n)}else t[n].macro=e.macro;this.lastSavedMacro&&this.lastSavedMacro.directoryPath&&e.slug!==this.lastSavedMacro.macroData.slug&&e.directoryPath===this.lastSavedMacro.directoryPath&&this.deleteMacroFromServer(this.lastSavedMacro),this.autoRefresh&&nS(t)}deleteMacroAndRecompileTwigTemplates(e){const t=(0,wd.Z)(c.configStore.twigMacros),n=t.findIndex((t=>t.slug===e)),s=this.value.macros.findIndex((t=>t.slug===e));if(-1!==n&&t.splice(n,1),-1!==s){const e=(0,wd.Z)(this.value);e.macros.splice(s,1),this.$emit("input",e)}nS(t)}get currentMacroName(){return this.currentlyEditingMacro?(0,Am.iC)(this.currentlyEditingMacro.macroData.slug):""}get hasUnsavedChanges(){return!(!this.currentlyEditingMacro||!this.lastSavedMacro)&&!oh()(this.lastSavedMacro.macroData,this.currentlyEditingMacro.macroData)}updateMacroValue(e){this.currentlyEditingMacro&&(this.currentlyEditingMacro.macroData.macro=e,this.throttledUpdateElement(this.currentlyEditingMacro.macroData))}deleteMacro(){this.currentlyEditingMacro&&this.deleteMacroFromServer(this.currentlyEditingMacro,(()=>{this.currentlyEditingMacro=!1}))}async deleteMacroFromServer(e,t=(()=>{})){(0,id.pipe)(await(0,ad.D)({action:"breakdance_delete_macro",dataToPost:{directoryPath:e.directoryPath,filename:(0,Am.iC)(e.macroData.slug)},decoder:iu.i0("success"),resultKey:"data"}),(0,od.fold)((()=>{cd.Z.log.message((0,Ft.__)("Failed to delete element"))}),(()=>{t(),this.deleteMacroAndRecompileTwigTemplates(e.macroData.slug)})))}discardChanges(){this.lastSavedMacro&&this.lastSavedMacro.macroData&&this.updateMacroAndRecompileTwigTemplates(this.lastSavedMacro.macroData),this.resetCurrentlyEditingMacro()}resetCurrentlyEditingMacro(){this.currentlyEditingMacro=!1,this.lastSavedMacro=!1,this.$emit("active",null)}openMacro(e){const t=(0,wd.Z)(this.value.macros.find((t=>t.slug===e)));if(!t)return;const n=c.configStore.twigMacros.find((t=>t.slug===e))?.macro;if(!n)return;const s=this.value.saveLocations.find((e=>t.directoryPath.startsWith(e.directoryPath))),i=!!s?.onlyForAdvancedUsers;this.updateCurrentlyEditingMacro({macroData:{...t,macro:n},directoryPath:t.directoryPath,onlyForAdvancedUsers:i}),this.$emit("active","macro")}saveAs(e){if(!this.currentlyEditingMacro)return;const t=(0,Am.iC)(this.currentlyEditingMacro.macroData.slug);this.saveToServer(this.currentlyEditingMacro.macroData.macro,e.directoryPath,t,e_(e.namespace,t),e.onlyForAdvancedUsers)}saveNewItem(e){const t=(0,Xf.dZ)(e.namespace,e.name),n=Qf()(e.name),s=e_(e.namespace,e.name);this.value.macros.find((e=>e.slug===s))?(0,Am.O6)(this.value.saveLocations,e,"macro"):(this.saveToServer(`{% macro ${t}() %}\n {# Your code here #} \n{% endmacro %}`,e.directoryPath,n,s,e.onlyForAdvancedUsers),this.$emit("active","macro"))}saveOverride(){this.currentlyEditingMacro&&this.currentlyEditingMacro.directoryPath&&this.saveToServer(this.currentlyEditingMacro.macroData.macro,this.currentlyEditingMacro.directoryPath,(0,Am.iC)(this.currentlyEditingMacro.macroData.slug),this.currentlyEditingMacro.macroData.slug,this.currentlyEditingMacro.onlyForAdvancedUsers)}async saveToServer(e,t,n,s,i){this.saveInProgress=!0,(0,id.pipe)(await(0,ad.D)({action:"breakdance_save_macro",dataToPost:{directoryPath:t,filename:n,macro:e},decoder:iu._4}),(0,od.fold)((e=>{console.error(e),cd.Z.log.message("Failed to save element, check console")}),(()=>{const n={macroData:{macro:e,slug:s,directoryPath:t},directoryPath:t,onlyForAdvancedUsers:i};this.updateCurrentlyEditingMacro(n),this.updateMacroAndRecompileTwigTemplates(n.macroData),this.lastSavedMacro=n}))),this.saveInProgress=!1}};(0,r.gn)([(0,l.fI)()],CS.prototype,"value",void 0),CS=(0,r.gn)([(0,l.wA)({components:{ToggleInput:Zp.Z,TextInput:na.Z,Icon:He.Z,CodeInput:f_.Z,ElementStudioTabsAndPanels:lS,ElementStudioWidthAdjustmentBar:wm,ElementStudioTopbar:$m}})],CS);const xS=CS,wS=xS;var IS=(0,N.Z)(wS,bS,SS,!1,null,null,null);const PS=IS.exports;var kS=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:{"element-studio-wrapper":e.currentlyEditingPreset,"element-studio__hide-the-close-button":!e.currentlyEditingPreset,"element-studio__hide-the-switch-mode-button":!0}},[t("ElementStudioTopbar",{attrs:{"save-locations":e.value.saveLocations,"items-slug":e.presetsSlug,value:e.currentlyEditingPreset,itemType:"preset","item-name":e.currentPresetName,hasUnsavedChanges:e.hasUnsavedChanges,saveInProgress:e.saveInProgress},on:{open:e.openPreset,delete:e.deletePreset,saveOverride:e.saveOverride,saveAs:e.saveAs,saveNew:e.saveNewItem,discardChanges:e.discardChanges,reset:e.resetCurrentlyEditingPreset}}),e.currentlyEditingPreset?t("div",{staticClass:"element-studio-content"},[t("div",{staticClass:"panel-100 vscroll-scroll"},[t("div",{staticClass:"element-studio-tabs-panel d-flex flex-column"},[t("div",{staticClass:"element-studio-tabs"},[t(Qp.Z,{attrs:{value:e.activeTab},on:{change:e.updateTab}},[t(Yp.Z,{attrs:{href:"#preset",title:e.__("Preset")}},[t("Icon",{attrs:{icon:"PenIcon",size:"16"}})],1),t(Yp.Z,{attrs:{href:"#code-help",title:e.__("Code Help")}},[t("Icon",{attrs:{icon:"CodeIcon",size:"16"}})],1),t(Yp.Z,{attrs:{href:"#prop-paths",title:e.__("Property Paths")}},[t("Icon",{attrs:{icon:"SlidersSimpleIcon",size:"16"}})],1),t(Yp.Z,{attrs:{href:"#settings",title:e.__("Settings")}},[t("Icon",{attrs:{icon:"GearIcon",size:"16"}})],1)],1)],1)]),t("div",{staticClass:"element-studio-tabs-items vscroll-scroll"},[t("ControlSectionOrControl",{directives:[{name:"show",rawName:"v-show",value:"preset"===e.activeTab,expression:"activeTab === 'preset'"}],attrs:{value:e.currentPresetWithoutPresetSlug?e.currentPresetWithoutPresetSlug.presetData.preset.section:[],index:0,path:"control",parentPath:"presetSection",twigParentPath:""}}),t("div",{directives:[{name:"show",rawName:"v-show",value:"code-help"===e.activeTab,expression:"activeTab === 'code-help'"}]},[t("div",{staticClass:"element-studio__presets-code-help"},[t("div",[t("b",[e._v(e._s(e.__("Code Help")))])]),t("pre",[e._v("%%TWIG_PATH%%")]),e._v(" "+e._s(e.__("will be replaced with the correct path in the element."))+" ")]),t("CodeInput",{attrs:{language:"twig",value:e.codeHelpValue,placeholder:e.codeHelpPlaceholder},on:{input:e.updateCodeHelp}})],1),t("div",{directives:[{name:"show",rawName:"v-show",value:"prop-paths"===e.activeTab,expression:"activeTab === 'prop-paths'"}]},[t("Accordion",{attrs:{expanded:"relativePropertyPathsToWhitelistInFlatProps"===e.accordionState},on:{toggle:function(t){return e.toggleAccordion("relativePropertyPathsToWhitelistInFlatProps")}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"pa-4"},[e._v(" "+e._s(e.__("Relative Property Paths To Whitetlist In Flatprops"))+" ")])]},proxy:!0},{key:"content",fn:function(){return[t("ElementStudioPropertyPaths",{attrs:{value:e.presetRelativePropertyPathsToWhitelistInFlatProps,"all-paths":e.allPaths},on:{input:function(t){return e.updateElementValuePropPath(t,"relativePropertyPathsToWhitelistInFlatProps")}}})]},proxy:!0}],null,!1,1950830981)})],1),"settings"===e.activeTab?t("div",{staticClass:"pa-4"},[t(ed.Z,{attrs:{value:e.currentPresetName,label:e.__("Name"),rules:[e.isValidItemName]},on:{input:e.updatePresetSlug}}),t("ToggleInput",{attrs:{value:e.autoRefresh},on:{input:e.updateAutoRefresh}}),t("label",{staticClass:"ml-2"},[e._v(e._s(e.__("Live preview changes")))])],1):e._e()],1)])]):e._e()],1)},ES=[];let TS=class extends s.ZP{constructor(){super(...arguments),this.lastSavedPreset=!1,this.currentlyEditingPreset=!1,this.saveInProgress=!1,this.activeTab="preset",this.accordionState="",this.autoRefresh=!0,this.elementStudioContext=this.reactiveContext()}toggleAccordion(e){this.accordionState=this.accordionState===e?"":e}reactiveContext(){return{replaceControls:(e,t)=>{if(!this.currentlyEditingPreset)return;const n=(0,wd.Z)(this.currentlyEditingPreset),s=this.getCorrectPathForPresetFromContextPath(e);Sd()(n.presetData.preset,s,t),this.updateCurrentlyEditingPreset(n)},pasteControl:(e,t)=>{if(!this.currentlyEditingPreset)return;const n=(0,wd.Z)(this.currentlyEditingPreset),s=this.getCorrectPathForPresetFromContextPath(e),i=j()(n.presetData.preset,s);i.push(t),Sd()(n.presetData.preset,s,i),this.updateCurrentlyEditingPreset(n)},addControl:e=>{if(!this.currentlyEditingPreset)return;const t=(0,wd.Z)(this.currentlyEditingPreset),n=this.getCorrectPathForPresetFromContextPath(e),s=this.getParentControlOrControls(n);s&&(Array.isArray(s)?s.push((0,Zv._n)()):s.children.push((0,Zv._n)()),Sd()(t.presetData.preset,n,s),this.updateCurrentlyEditingPreset(t))},addPreset:e=>{if(!this.currentlyEditingPreset)return;const t=(0,wd.Z)(this.elementStudioContext.getPresetSection("EssentialElements\\typography"));if(!t)return;t.section.options.sectionOptions={...t.section.options.sectionOptions,type:"popout"};const n=(0,wd.Z)(this.currentlyEditingPreset),s=this.getCorrectPathForPresetFromContextPath(e),i=this.getParentControlOrControls(s);i&&(Array.isArray(i)?i.push(t.section):i.children.push(t.section),Sd()(n.presetData.preset,s,i),this.updateCurrentlyEditingPreset(n))},deleteControl:(e,t)=>{if(!this.currentlyEditingPreset)return;const n=(0,wd.Z)(this.currentlyEditingPreset),s=this.getCorrectPathForPresetFromContextPath(e),i=this.getParentControlOrControls(s);i&&(Array.isArray(i)?i.splice(t,1):i.children.splice(t,1),Sd()(n.presetData.preset,s,i),this.updateCurrentlyEditingPreset(n))},updateControl:(e,t,n)=>{if(!this.currentlyEditingPreset)return;const s=(0,wd.Z)(this.currentlyEditingPreset);if("presetSection"===e)s.presetData.preset.section=n;else{const i=this.getCorrectPathForPresetFromContextPath(e),o=this.getParentControlOrControls(i);if(!o)return;Array.isArray(o)?o.splice(t,1,n):o.children.splice(t,1,n),Sd()(s.presetData.preset,i,o)}this.updateCurrentlyEditingPreset(s)},getPresetSection:e=>this.value.presetSections.find((t=>t.slug===e)),getPresetSections:()=>this.value.presetSections,getPathsToAllControls:(e=[],t=["section"])=>{if(this.currentlyEditingPreset)return(0,Am.eH)(this.currentlyEditingPreset.presetData.preset.section.children,e,t,"")},element:qe.BQ,updateDependency:()=>{},updateActions:()=>{},updateElementValue:()=>{},getElementStudioData:()=>this.value,updateElementStudioData:e=>{this.$emit("input",e)}}}updateAutoRefresh(e){this.autoRefresh=e,e&&this.currentlyEditingPreset&&this.updateCurrentlyEditingPreset(this.currentlyEditingPreset)}getCorrectPathForPresetFromContextPath(e){return e.replace("control","section")}getParentControlOrControls(e){if(this.currentlyEditingPreset)return(0,wd.Z)(j()(this.currentlyEditingPreset.presetData.preset,e))}get codeHelpValue(){return this.currentlyEditingPreset&&this.currentlyEditingPreset.presetData.preset.section.options.sectionOptions?.preset?.codeHelp||""}get codeHelpPlaceholder(){if(!this.currentlyEditingPreset)return"";const e=(0,Xf.dZ)((0,Am.$_)(this.currentlyEditingPreset.presetData.slug),this.currentPresetName);return`{{ macros.${e}(%%TWIG_PATH%%) }}`}updateCodeHelp(e){if(!this.currentlyEditingPreset)return;const t=(0,wd.Z)(this.currentlyEditingPreset);Sd()(t,"presetData.preset.section.options.sectionOptions.preset.codeHelp",e),this.updateCurrentlyEditingPreset(t)}get presetsSlug(){return this.value.presets.map((e=>e.slug))}get allPaths(){return this.reactiveContext().getPathsToAllControls([],[])}get presetRelativePropertyPathsToWhitelistInFlatProps(){return this.currentlyEditingPreset?this.currentlyEditingPreset.presetData.preset.section.options.sectionOptions?.preset?.relativePropertyPathsToWhitelistInFlatProps:[]}updateElementValuePropPath(e,t){if(!this.currentlyEditingPreset)return;const n=(0,wd.Z)(this.currentlyEditingPreset);Sd()(n,`presetData.preset.section.options.sectionOptions.preset[${t}]`,e),this.currentlyEditingPreset=n}isValidItemName(e){return(0,Am.nQ)(e)}updateCurrentlyEditingPreset(e){if(e.presetData.preset=this.getPresetWithRestoredSectionSlug(e.presetData.preset),this.currentlyEditingPreset=(0,wd.Z)(e),!1===this.lastSavedPreset&&(this.lastSavedPreset=(0,wd.Z)(e)),!this.autoRefresh)return;const t=Object.values(Q.PK.elements).map((e=>e?(e.controls.designSections=e.controls.designSections.map(this.updateSectionWithCurrentPresetSection),e.controls.contentSections=e.controls.contentSections.map(this.updateSectionWithCurrentPresetSection),e.controls.settingsSections=e.controls.settingsSections.map(this.updateSectionWithCurrentPresetSection),e):e)).filter((e=>void 0!==e));Q.PK.addElements(t)}get currentPresetWithoutPresetSlug(){if(!this.currentlyEditingPreset)return!1;const e=(0,wd.Z)(this.currentlyEditingPreset);return e.presetData.preset.section.options.sectionOptions?.preset?.slug&&(e.presetData.preset.section.options.sectionOptions.preset.slug=void 0),e}updateSectionWithCurrentPresetSection(e){if(e.options.sectionOptions?.preset?.slug&&this.currentlyEditingPreset&&e.options.sectionOptions.preset.slug===this.currentlyEditingPreset.presetData.slug)return(0,wd.Z)(this.currentlyEditingPreset.presetData.preset.section);if(e.children.length){const t=(0,wd.Z)(e);return t.children=t.children.map(this.updateSectionWithCurrentPresetSection),t}return e}filterOutCurrentSection(e,t){if(!e.options.sectionOptions?.preset?.slug||e.options.sectionOptions.preset.slug!==t){if(e.children.length){const n=(0,wd.Z)(e);return n.children=n.children.map((e=>this.filterOutCurrentSection(e,t))).filter((e=>!!e)),n}return e}}getPresetWithRestoredSectionSlug(e){return this.currentlyEditingPreset?(Sd()(e,"section.options.sectionOptions.preset.slug",this.currentlyEditingPreset.presetData.slug),e):e}updateTab(e){this.activeTab=e}updatePresetSlug(e){if(!this.currentlyEditingPreset)return;const t=(0,wd.Z)(this.currentlyEditingPreset);t.presetData.slug=e_((0,Am.$_)(this.currentlyEditingPreset.presetData.slug),e),this.updateCurrentlyEditingPreset(t)}updatePreset(e){const t=(0,wd.Z)(e),n=this.value.presets.findIndex((e=>e.slug===t.slug)),s=this.value.presetSections.findIndex((e=>e.slug===t.preset.slug)),i=(0,wd.Z)(this.value);-1===n&&-1===s?(i.presets.push(t),i.presetSections.push(t.preset)):(i.presets[n]=t,i.presetSections[s].section=t.preset.section),this.$emit("input",i),this.lastSavedPreset&&this.lastSavedPreset.directoryPath&&t.slug!==this.lastSavedPreset.presetData.slug&&t.directoryPath===this.lastSavedPreset.directoryPath&&this.deletePresetFromServer(this.lastSavedPreset)}deletePresetAndRecompileTwigTemplates(e){const t=(0,Am.iC)(e),n=(0,wd.Z)(this.value.presetSections),s=n.findIndex((e=>e.slug===t)),i=this.value.presets.findIndex((t=>t.slug===e));if(-1!==s&&n.splice(s,1),-1!==i){const e=(0,wd.Z)(this.value);e.presets.splice(i,1),this.$emit("input",e)}if(!this.autoRefresh)return;const o=Object.values(Q.PK.elements).map((t=>t?(t.controls.designSections=t.controls.designSections.map((t=>this.filterOutCurrentSection(t,e))).filter((e=>!!e)),t.controls.contentSections=t.controls.contentSections.map((t=>this.filterOutCurrentSection(t,e))).filter((e=>!!e)),t.controls.settingsSections=t.controls.settingsSections.map((t=>this.filterOutCurrentSection(t,e))).filter((e=>!!e)),t):t)).filter((e=>void 0!==e));Q.PK.addElements(o)}get currentPresetName(){return this.currentlyEditingPreset?(0,Am.iC)(this.currentlyEditingPreset.presetData.slug):""}get hasUnsavedChanges(){return!(!this.currentlyEditingPreset||!this.lastSavedPreset)&&!oh()(this.lastSavedPreset.presetData,this.currentlyEditingPreset.presetData)}deletePreset(){this.currentlyEditingPreset&&this.deletePresetFromServer(this.currentlyEditingPreset,(()=>{this.currentlyEditingPreset=!1}))}async deletePresetFromServer(e,t=(()=>{})){(0,id.pipe)(await(0,ad.D)({action:"breakdance_delete_preset",dataToPost:{directoryPath:e.directoryPath,filename:(0,Am.iC)(e.presetData.slug)},decoder:iu.i0("success"),resultKey:"data"}),(0,od.fold)((()=>{cd.Z.log.message((0,Ft.__)("Failed to delete element"))}),(()=>{t(),this.deletePresetAndRecompileTwigTemplates(e.presetData.slug)})))}discardChanges(){this.lastSavedPreset&&this.lastSavedPreset.presetData&&(this.updateCurrentlyEditingPreset(this.lastSavedPreset),this.updatePreset(this.lastSavedPreset.presetData)),this.resetCurrentlyEditingPreset()}resetCurrentlyEditingPreset(){this.currentlyEditingPreset=!1,this.lastSavedPreset=!1,this.$emit("active",null)}openPreset(e){const t=(0,wd.Z)(this.value.presets.find((t=>t.slug===e)));if(!t)return;const n=this.value.presetSections.find((t=>t.slug===e));if(!n)return void cd.Z.log.message((0,Ft.gB)((0,Ft.__)("%s couldn't be found"),e));const s=this.value.saveLocations.find((e=>t.directoryPath.startsWith(e.directoryPath))),i=!!s?.onlyForAdvancedUsers;this.updateCurrentlyEditingPreset({presetData:{...t,preset:n},directoryPath:t.directoryPath,onlyForAdvancedUsers:i}),this.$emit("active","preset")}saveAs(e){this.currentlyEditingPreset&&this.saveToServer(this.currentlyEditingPreset.presetData.preset,e.directoryPath,this.currentPresetName,e_(e.namespace,this.currentPresetName),e.onlyForAdvancedUsers)}saveNewItem(e){const t=Qf()(e.name),n=e_(e.namespace,e.name);this.value.presets.find((e=>e.slug===n))?(0,Am.O6)(this.value.saveLocations,e,"preset"):(this.saveToServer({slug:n,section:(0,Zv.tr)()},e.directoryPath,t,n,e.onlyForAdvancedUsers),this.$emit("active","preset"))}saveOverride(){this.currentlyEditingPreset&&this.currentlyEditingPreset.directoryPath&&this.saveToServer(this.currentlyEditingPreset.presetData.preset,this.currentlyEditingPreset.directoryPath,this.currentPresetName,this.currentlyEditingPreset.presetData.slug,this.currentlyEditingPreset.onlyForAdvancedUsers)}async saveToServer(e,t,n,s,i){this.saveInProgress=!0,(0,id.pipe)(await Jf(e,t,n,s),(0,od.fold)((e=>{console.error(e),cd.Z.log.message((0,Ft.__)("Failed to save element, check console"))}),(()=>{const n={presetData:{preset:(0,wd.Z)(e),slug:s,directoryPath:t},directoryPath:t,onlyForAdvancedUsers:i};this.updateCurrentlyEditingPreset(n),this.updatePreset(n.presetData),this.lastSavedPreset=n}))),this.saveInProgress=!1}};(0,r.gn)([(0,l.fI)()],TS.prototype,"value",void 0),(0,r.gn)([(0,l.DF)("context")],TS.prototype,"elementStudioContext",void 0),TS=(0,r.gn)([(0,l.wA)({components:{ToggleInput:Zp.Z,ElementStudioDynPropPaths:Ob,ElementStudioPropertyPaths:wb,Accordion:tv.Z,ControlSectionOrControl:p_,TextInput:na.Z,Icon:He.Z,CodeInput:f_.Z,ElementStudioTabsAndPanels:lS,ElementStudioWidthAdjustmentBar:wm,ElementStudioTopbar:$m}})],TS);const DS=TS,AS=DS;var ZS=(0,N.Z)(AS,kS,ES,!1,null,null,null);const OS=ZS.exports;let MS=class extends s.ZP{constructor(){super(...arguments),this.data={elements:[],macros:[],presets:[],saveLocations:[],presetSections:[]},this.width=600,this.activeItemType=null}async mounted(){(0,su.zG)(await(0,ad.D)({action:"breakdance_load_element_studio",decoder:_S}),(0,ou.g_)((e=>e.forEach((e=>cd.Z.log.message(e.msg)))),(e=>{this.data=e})))}updateData(e){this.data=(0,wd.Z)(e)}updateActiveItemType(e){this.activeItemType=e}updateWidth(e){this.width=e}adjustWidth(e){this.width+=e}get styles(){return{width:`${this.width}px`}}};MS=(0,r.gn)([(0,l.wA)({components:{ElementStudioPresets:OS,ElementStudioMacros:PS,ElementStudioElements:gS,ElementStudioWidthAdjustmentBar:wm}})],MS);const BS=MS,LS=BS;var NS=(0,N.Z)(LS,cm,dm,!1,null,null,null);const FS=NS.exports;var RS=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("AppLayoutBodyPanelArea",{attrs:{"panel-state":e.panelState,position:e.position}},[t("Add",{directives:[{name:"show",rawName:"v-show",value:"add"===e.panelState,expression:"panelState === 'add'"}]}),"selectors"===e.panelState?t("SelectorsPanel"):"oxySelectors"===e.panelState?t("OxySelectorsPanel"):"presets"===e.panelState?t("PresetsPanel"):"structure"===e.panelState?t("StructurePanel"):e._e(),"elementproperties"===e.panelState?["breakdance"==e.builderMode?t("ElementPropertiesPanel",{key:e.activeElementId}):"oxygen"==e.builderMode?t("OxygenElementPropertiesPanel",{key:e.activeElementId}):e._e()]:"ai"===e.panelState?t("AIPanel"):"history"===e.panelState?t("HistoryAndRevisionsPanel"):"globalSettings"===e.panelState?t("GlobalSettingsPanel"):"variables"===e.panelState?t("VariablesPanel"):e._e()],2)},VS=[],$S=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-element-properties-panel vscroll-wrap vscroll-scroll",attrs:{"data-test-id":"element-properties-panel"}},[e.elementIsActive?[t("Titlebar"),t("TabsAndControls")]:[t("BlankSidebarContent")]],2)},WS=[],US=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"properties-panel-titlebar",class:`properties-panel-titlebar--${e.size}`},[t("div",{staticClass:"properties-panel-titlebar-title truncate"},[e._v(" "+e._s(e.elementTitle)+" ")]),"breakdance"===e.builderMode?e._l(e.elementBadges,(function(e,n){return t("ElementBadge",{key:n,staticClass:"ml-1",attrs:{value:e}})})):e._e(),t(vc.Z),"breakdance"===e.builderMode?[t("IconButton",{staticClass:"properties-panel-duplicate-button",attrs:{icon:"DuplicateIcon",size:"small"===e.size?"14":"16",small:!0},on:{click:e.duplicateElement}}),t("IconButton",{staticClass:"properties-panel-delete-button",attrs:{icon:"TrashIcon",size:"small"===e.size?"14":"16",small:!0},on:{click:e.remove}})]:e._e(),"oxygen"!==e.builderMode||e.isComponent?e._e():[t("OxygenTagChooser")]],2)},zS=[],HS=n(26687),GS=n(13960),KS=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-tag-chooser",class:{"oxy-tag-chooser--disabled":1===e.tags?.length}},[t(zm.Z,{ref:"input",attrs:{value:e.value,items:e.tags,dense:"",flat:"",solo:"","hide-details":"","no-data-text":"","search-input":e.searchQuery,disabled:1===e.tags.length,"menu-props":{maxHeight:350,minWidth:145,closeOnContentClick:!0}},on:{input:e.setValue,"update:searchInput":function(t){e.searchQuery=t},"update:search-input":function(t){e.searchQuery=t}},scopedSlots:e._u([{key:"append",fn:function(){return[t("span",{staticClass:"oxy-tag-chooser__bracket-1"},[e._v("<")]),t("span",{staticClass:"oxy-tag-chooser__bracket-2"},[e._v(">")]),e.tags?.length>1?t("Icon",{staticClass:"oxy-tag-chooser__tag-icon",attrs:{icon:"ChevronDownIcon",size:10}}):e._e()]},proxy:!0},{key:"append-item",fn:function(){return[!e.doesQueryMatchAnyTag&&e.isValidHtmlTagName(e.searchQuery)?t(Tc.Z,{attrs:{dense:""},on:{click:function(t){return e.setValue(e.searchQuery)}}},[t(Dc.V9,[e._v(" "+e._s(e.sprintf(e._doc("Custom: %s","%s: Custom HTML tag name"),e.searchQuery))+" ")])],1):e._e()]},proxy:!0},{key:"no-data",fn:function(){return[t("div")]},proxy:!0}])})],1)},jS=[],qS=n(53204),XS=n(95324);let YS=class extends l.w3{constructor(){super(...arguments),this.open=!1,this.searchQuery=""}onValueChange(){this.$nextTick((()=>{this.$refs.input.isMenuActive=!1,this.$refs.input.blur()}))}get control(){return{type:"select",name:(0,Ft.__)("Tag"),slug:"tag",items:this.tags,disableVariable:!0}}get element(){return c.uiStore.activeElement}get builderElement(){return this.element?c.configStore.element(this.element.data.type):null}get htmlTag(){return this.element?this.builderElement?.htmlTag:null}get tags(){if(!this.element)return[];const e=[...this.htmlTag?.options||[]];return this.defaultTag?[this.defaultTag,...e]:e}get defaultTag(){return this.htmlTag?.default}get value(){return j()(c.uiStore.activeElement,"data.properties.settings.advanced.tag")||this.defaultTag}setValue(e){c.uiStore.activeElementId&&(this.isValidHtmlTagName(e)?(0,qe.Q$)(c.uiStore.activeElementId,e):this.handleInvalidTag())}handleInvalidTag(){this.$nextTick((()=>{this.defaultTag&&(this.searchQuery=this.defaultTag)}))}isValidHtmlTagName(e){const t=/^[a-zA-Z][a-zA-Z0-9-]*$/;return t.test(e)}get doesQueryMatchAnyTag(){return this.tags?.some((e=>e===this.searchQuery))}};(0,r.gn)([(0,l.RL)("value")],YS.prototype,"onValueChange",null),YS=(0,r.gn)([(0,l.wA)({components:{Dropdown:Oc.Z,Icon:He.Z,OxygenControl:XS["default"],OxygenSelectInput:qS.Z,DropdownInput:Cd.Z}})],YS);const QS=YS,JS=QS;var eC=(0,N.Z)(JS,KS,jS,!1,null,null,null);const tC=eC.exports;let nC=class extends s.ZP{get element(){return c.uiStore.activeElement}get elementId(){return c.uiStore.activeElementId}get elementTitle(){return this.element?c.configStore.element(this.element.data.type).name:(0,Ft.__)("No Active Element")}get elementBadges(){if(!this.element)return[];const e=c.configStore.element(this.element.data.type),t=e.badge?[e.badge]:[];return e.settings&&e.settings.proOnly&&"free"===c.configStore.subscriptionMode&&t.push((0,GS.ur)()),t}get isComponent(){return!!this.element&&this.element?.data?.type===Ge.COMPONENT_SLUG}get builderMode(){return c.configStore.builderMode}duplicateElement(){this.elementId&&c.documentStore.duplicateElementAndActivateIt(this.elementId)}remove(){null!==this.elementId&&c.documentStore.deleteElement({nodeId:this.elementId})}};(0,r.gn)([(0,l.fI)()],nC.prototype,"size",void 0),nC=(0,r.gn)([(0,l.wA)({components:{Dropdown:Oc.Z,IconButton:Xa.Z,ElementBadge:HS.Z,OxygenTagChooser:tC}})],nC);const sC=nC,iC=sC;var oC=(0,N.Z)(iC,US,zS,!1,null,null,null);const aC=oC.exports;var rC=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"pa-7 d-flex align-center justify-center flex-column",staticStyle:{height:"100%"}},[t("div",{staticClass:"blank-sidebar-text"},[t("p",[e._v(" "+e._s(e.__("Add an element to your page or click an existing element to edit it."))+" ")])]),t("StandardButton",{staticClass:"open-elements-toolbar-button",attrs:{size:"22",testId:"open-elements-toolbar-button"},on:{click:e.toggleAdd}},[e._v(" "+e._s(e.__("Add"))+" ")])],1)},lC=[];let cC=class extends s.ZP{toggleAdd(){(0,Bu._y)("add")}};cC=(0,r.gn)([(0,l.wA)({components:{StandardButton:Fl}})],cC);const dC=cC,uC=dC;var pC=(0,N.Z)(uC,rC,lC,!1,null,null,null);const hC=pC.exports;var gC=n(99868),mC=n(96878),vC=n(47233),yC=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vscroll-wrap vscroll-scroll"},[e.hasSearchParameters?e._e():t("DesignContentSettingsTabs",{attrs:{value:e.tab,controls:e.controls},on:{input:e.updateTab}}),t("div",{staticClass:"vscroll-scroll"},["design"===e.tab?t("ElementPresetChooser",{attrs:{element:e.element}}):e._e(),e.searchDisabled&&!e.isPresetsOverridesEnabled?t("p",{staticClass:"preset-selected-message"},[t("Icon",{attrs:{icon:"PaintbrushFineIcon",size:"24"}}),e._v(" "+e._s(e.__("A preset is currently selected for this element."))+" ")],1):e.hasSearchParameters&&!e.noSearchResults?t(gC.Z,[""!==e.searchBoxState.query?t("div",{staticClass:"control-tree-search-term"},[t("span",[e._v(" "+e._s(e.sprintf(e._xdoc('Search results for "%s"',"Element Properties","%s: Search query"),e.searchBoxState.query))+" ")]),t("div",{staticClass:"control-tree-search-clear",on:{click:e.clearQuery}},[t("Icon",{attrs:{icon:"CloseIcon",size:"14"}})],1)]):e._e(),t("ControlsTree",{attrs:{controls:e.controlsFilteredBySearchParams.contentSections,path:"content",linear:!0}}),t("ControlsTree",{attrs:{controls:e.controlsFilteredBySearchParams.designSections,path:"design",linear:!0}}),t("ControlsTree",{attrs:{controls:e.controlsFilteredBySearchParams.settingsSections,path:"settings",linear:!0}})],1):e.hasSearchParameters&&e.noSearchResults?t(gC.Z,{staticClass:"d-flex justify-center align-center flex-column",attrs:{height:"100%"}},[t("SearchBoxEmptyState",{attrs:{label:"controls"},on:{input:e.clearQuery}})],1):t(vC.Z,{model:{value:e.tab,callback:function(t){e.tab=t},expression:"tab"}},[e.hasContentControls?t(mC.Z,{attrs:{value:"content",transition:!1,"reverse-transition":!1}},[t("ControlsTree",{attrs:{controls:e.contentSections,path:"content",forceFirstSectionOpen:!0}})],1):e._e(),e.hasDesignControls?t(mC.Z,{attrs:{value:"design",transition:!1,"reverse-transition":!1}},[t("DesignTabContent",{attrs:{controls:e.designSections,path:"design"}})],1):e._e(),e.hasSettingsControls?t(mC.Z,{attrs:{value:"settings",transition:!1,"reverse-transition":!1}},[t("ControlsTree",{attrs:{controls:e.settingsSections,path:"settings"}})],1):e._e()],1)],1),t("SearchBox",{attrs:{value:e.searchBoxState,location:"element","include-settings-toggle":!0,disabled:e.searchDisabled},on:{input:e.updateSearchBoxState}})],1)},fC=[],_C=n(20951),bC=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"properties-panel-search-box-wrap",class:{"properties-panel-search-box-wrap--disabled":e.disabled}},[t("div",{staticClass:"properties-panel-search-box-inner-wrap"},[t("Icon",{staticClass:"properties-panel-search-icon",attrs:{icon:"SearchIcon",size:"13"}}),t("TextInput",{staticClass:"properties-panel-search-text-input",attrs:{value:e.value.query,placeholder:e.placeholder,"data-test-id":"elements-panel-search"},on:{input:e.editQuery}}),t("div",{staticClass:"properties-panel-search-actions"},[e.value.query?t("div",{staticClass:"properties-panel-search-extra-button",on:{click:e.clearQuery}},[t("Icon",{attrs:{icon:"CloseIcon",size:"12"}})],1):e._e(),t("SearchFilter",{staticClass:"properties-panel-search-modified",attrs:{value:e.value.modifiedOnly},on:{input:e.editModified}},[e._v(e._s(e.__("Modified")))]),e.includeSettingsToggle?t("SearchFilter",{staticClass:"properties-panel-search-settings-toggle",attrs:{value:e.value.includeSettings,title:e.__("Include Settings")},on:{input:e.editSettings}},[t("Icon",{attrs:{icon:"GearIcon",size:"12"}}),t("Icon",{attrs:{icon:"PlusIcon",size:"10"}})],1):e._e()],1)],1)])},SC=[],CC=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:{"properties-panel-search-extra-button":!0,"properties-panel-search-extra-button-on":this.value},on:{click:e.toggle}},[e._t("default")],2)},xC=[];let wC=class extends s.ZP{toggle(){this.$emit("input",!this.value)}};(0,r.gn)([(0,l.fI)()],wC.prototype,"value",void 0),wC=(0,r.gn)([l.wA],wC);const IC=wC,PC=IC;var kC=(0,N.Z)(PC,CC,xC,!1,null,null,null);const EC=kC.exports;let TC=class extends s.ZP{emit(e){this.$emit("input",e)}editQuery(e){"string"===typeof e?this.emit({...this.value,query:e.trim().toLowerCase()}):this.emit({...this.value,query:""})}clearQuery(){this.emit({...this.value,query:"",modifiedOnly:!1})}editModified(e){this.emit({...this.value,modifiedOnly:e})}editSettings(e){this.emit({...this.value,includeSettings:e})}get placeholder(){return(0,Ft.__)("Search")}};(0,r.gn)([(0,l.fI)()],TC.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],TC.prototype,"includeSettingsToggle",void 0),(0,r.gn)([(0,l.fI)()],TC.prototype,"disabled",void 0),(0,r.gn)([(0,l.fI)()],TC.prototype,"location",void 0),TC=(0,r.gn)([(0,l.wA)({components:{SearchFilter:EC,TextInput:na.Z,Icon:He.Z}})],TC);const DC=TC,AC=DC;var ZC=(0,N.Z)(AC,bC,SC,!1,null,null,null);const OC=ZC.exports;var MC=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("TabsRow",[e.hasContentControls?t("Tab",{staticClass:"properties-panel-tab",attrs:{value:e.value,id:"content","data-test-id":"element-properties-tab-content"},on:{input:e.setTab},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Icon",{attrs:{icon:"PenIcon",size:"18"}})]},proxy:!0},{key:"contextmenu",fn:function(){return[t(Ec.Z,[t(Tc.Z,{attrs:{dense:""},on:{click:function(t){return e.resetToDefault("content")}}},[t(Dc.V9,[e._v(e._s(e.__("Reset Content")))])],1)],1)]},proxy:!0}],null,!1,698677076)}):e._e(),e.hasDesignControls?t("Tab",{staticClass:"properties-panel-tab",attrs:{value:e.value,id:"design","data-test-id":"element-properties-tab-design"},on:{input:e.setTab},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Icon",{attrs:{icon:"PaletteIcon",size:"18"}})]},proxy:!0},{key:"contextmenu",fn:function(){return[t(Ec.Z,[t(Tc.Z,{attrs:{dense:""},on:{click:function(t){return e.resetToDefault("design")}}},[t(Dc.V9,[e._v(e._s(e.__("Reset Design")))])],1)],1)]},proxy:!0}],null,!1,1679543218)}):e._e(),e.hasSettingsControls?t("Tab",{staticClass:"properties-panel-tab",attrs:{value:e.value,id:"settings","data-test-id":"element-properties-tab-settings"},on:{input:e.setTab},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Icon",{attrs:{icon:"GearIcon",size:"18"}})]},proxy:!0},{key:"contextmenu",fn:function(){return[t(Ec.Z,[t(Tc.Z,{attrs:{dense:""},on:{click:function(t){return e.resetToDefault("settings")}}},[t(Dc.V9,[e._v(e._s(e.__("Reset Settings")))])],1)],1)]},proxy:!0}],null,!1,924921406)}):e._e()],1)},BC=[],LC=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:e.classList,on:{click:function(t){return e.$emit("input",e.id)},contextmenu:e.openContextMenu}},[e.hasIconSlot?t("div",{staticClass:"breakdance-tab__icon"},[e._t("icon")],2):e._e(),e.hasIconSlot?e._e():t("div",{staticClass:"breakdance-tab__label"},[e._t("default")],2),e.hasContextMenuSlot?t("div",{staticClass:"breakdance-tab__context-menu"},[t("Dropdown",{attrs:{"position-x":e.contextMenuX,"position-y":e.contextMenuY,absolute:"","offset-y":""},model:{value:e.contextMenu,callback:function(t){e.contextMenu=t},expression:"contextMenu"}},[e._t("contextmenu")],2)],1):e._e()])},NC=[];let FC=class extends s.ZP{constructor(){super(...arguments),this.contextMenu=!1,this.contextMenuX=0,this.contextMenuY=0}get classList(){return{"breakdance-tab":!0,[`breakdance-tab--id-${this.id}`]:!0,"breakdance-tab--active":this.value===this.id}}get hasContextMenuSlot(){return!!this.$slots.contextmenu}get hasIconSlot(){return!!this.$slots.icon}openContextMenu(e){this.hasContextMenuSlot&&(e.preventDefault(),this.contextMenu=!1,this.contextMenuX=e.clientX,this.contextMenuY=e.clientY,this.$nextTick((()=>{this.contextMenu=!0})))}};(0,r.gn)([(0,l.fI)()],FC.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],FC.prototype,"id",void 0),FC=(0,r.gn)([(0,l.wA)({components:{Dropdown:Oc.Z}})],FC);const RC=FC,VC=RC;var $C=(0,N.Z)(VC,LC,NC,!1,null,null,null);const WC=$C.exports;var UC=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-tabs-row"},[e._t("default")],2)},zC=[];let HC=class extends s.ZP{};HC=(0,r.gn)([(0,l.wA)({})],HC);const GC=HC,KC=GC;var jC=(0,N.Z)(KC,UC,zC,!1,null,null,null);const qC=jC.exports;var XC=n(47256);let YC=class extends s.ZP{setTab(e){this.$emit("input",e)}get hasContentControls(){return this.controls.contentSections.length>0}get hasDesignControls(){return this.controls.designSections.length>0}get hasSettingsControls(){return this.controls.settingsSections.length>0}resetToDefault(e){!1!==c.uiStore.activeElement&&JC(c.uiStore.activeElement.id,e)}};(0,r.gn)([(0,l.fI)({default:"content"})],YC.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],YC.prototype,"controls",void 0),(0,r.gn)([(0,l.tB)("context")],YC.prototype,"context",void 0),YC=(0,r.gn)([(0,l.wA)({components:{TabsRow:qC,Tab:WC,Icon:He.Z}})],YC);const QC=YC;function JC(e,t){const n=(0,ge.findNode)(c.documentStore.document.tree,e);if(!n)return;const s=c.configStore.element(n.data.type).defaultProperties,i=j()(s,t,XC.Bz);c.documentStore.throttledPropertyChanged({elementId:n.id,path:t,value:(0,wd.Z)(i),meta:{snapshotLabel:`Reset ${(0,ie.JC)(n.data.type)} ${g()(t)}`}})}const ex=QC;var tx=(0,N.Z)(ex,MC,BC,!1,null,null,null);const nx=tx.exports;var sx=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("ControlsTree",{attrs:{controls:e.controls,path:e.path}})],1)},ix=[];let ox=class extends s.ZP{};(0,r.gn)([(0,l.fI)()],ox.prototype,"controls",void 0),(0,r.gn)([(0,l.fI)()],ox.prototype,"path",void 0),ox=(0,r.gn)([(0,l.wA)({components:{ControlsTree:_C["default"]}})],ox);const ax=ox,rx=ax;var lx=(0,N.Z)(rx,sx,ix,!1,null,null,null);const cx=lx.exports;var dx=n(78574);function ux(e,t,n,s){const i=new RegExp(n.trim().replace(" ","|"),"si"),o=(e,n)=>!(i&&!`${e.label}`.match(i)&&!`${e.slug}`.match(i)&&!`${e.keywords}`.match(i))&&!(t&&!(0,XC.Ed)(n,e,s));return{contentSections:hx(e.contentSections,o,"content",t),designSections:hx(e.designSections,o,"design",t),settingsSections:hx(e.settingsSections,o,"settings",t)}}function px(e,t,n,s,i){const o=new RegExp(n.trim().replace(" ","|"),"si"),a=(e,n)=>!(o&&!`${e.label}`.match(o)&&!`${e.slug}`.match(o)&&!`${e.keywords}`.match(o))&&!(t&&!(0,XC.Ed)(n,e,s));return hx(e,a,i,t)}function hx(e,t,n,s){const i=(0,wd.Z)(e);return i.filter((e=>{const i=t(e,`${n}.${e.slug}`);return"section"===e.options.type?!(!i||s)||(e.children=hx(e.children,t,`${n}.${e.slug}`,s),e.children.length>0):i}))}const gx=(e,t)=>(e.forEach((e=>{t=gx(e.children,t+("section"===e.options.type?0:1))})),t);var mx=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"properties-panel-search-empty-state"},[t("svg",{staticClass:"properties-panel-search-empty-state-icon",attrs:{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"}},[t("path",{attrs:{d:"M90.667 34.388v-25a6.25 6.25 0 0 0-6.25-6.25h-75a6.25 6.25 0 0 0-6.25 6.25v68.75a6.25 6.25 0 0 0 6.25 6.25h25M3.167 21.888h87.5","stroke-width":"6.250005"}}),t("path",{attrs:{d:"M46.917 71.888a25 25 0 1 0 50 0 25 25 0 1 0-50 0ZM81.292 62.513l-18.75 18.75M62.542 62.513l18.75 18.75","stroke-width":"6.250005"}})])]),t("h5",[e._v(" "+e._s(e.sprintf(e._xdoc("No %s found.","Search","%s: Item type being searched"),e.label))+" ")]),t(Qo.Z,{staticClass:"mt-4",attrs:{text:"",outlined:"",small:""},on:{click:e.clearSearch}},[e._v(e._s(e.__("Clear Search")))])],1)},vx=[];let yx=class extends s.ZP{clearSearch(){this.$emit("input")}};(0,r.gn)([(0,l.fI)({default:"element"})],yx.prototype,"label",void 0),yx=(0,r.gn)([(0,l.wA)({components:{Dropdown:Oc.Z,IconButton:Xa.Z}})],yx);const fx=yx,_x=fx;var bx=(0,N.Z)(_x,mx,vx,!1,null,null,null);const Sx=bx.exports;var Cx=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("div",{staticClass:"element-preset-chooser"},[t("div",{staticClass:"element-preset-chooser__input"},[t(Wm.Z,{ref:"input",staticClass:"breakdance-dense-select breakdance-white-gray-outlined-input",attrs:{items:e.presetItems,dense:"",solo:"",flat:"",filled:"","search-input":e.newPresetName,placeholder:e.__("Choose Design Preset"),"no-data-text":"","hide-details":"",value:e.currentPreset,loading:e.addingPreset},on:{"update:searchInput":function(t){e.newPresetName=t},"update:search-input":function(t){e.newPresetName=t},input:e.selectPreset,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.createPresetOnEnter.apply(null,arguments)},"update:list-index":e.onListIndexUpdate,blur:function(t){e.autocompleteListIndex=-1}},scopedSlots:e._u([{key:"append-item",fn:function(){return[t(Tc.Z,{staticClass:"element-preset-chooser__create-button",class:{"element-preset-chooser__create-button--disabled":!e.canCreatePreset},attrs:{dense:"",link:""},on:{click:e.openSavePresetDialog}},[t(Dc.V9,[e.foundPresetsWithName?t("b",[e._v(" "+e._s(e.__("Create preset from design"))+" ")]):t("b",[e._v(" "+e._s(e.sprintf(e._doc("Create %s preset","%s: Preset name"),e.newPresetNameItalic))+" ")])])],1)]},proxy:!0},{key:"no-data",fn:function(){return[t("div")]},proxy:!0}])}),t("div",{staticClass:"element-preset-chooser__actions"},[e.currentPreset?t("div",{key:"detach",staticClass:"properties-panel-search-extra-button element-preset-chooser__detach",attrs:{"aria-label":e.__("Detach Styles"),title:e.__("Detach Styles")},on:{click:function(t){return t.stopPropagation(),e.detach.apply(null,arguments)}}},[t("Icon",{attrs:{icon:"LinkSimpleSlashSolidIcon",size:"12"}})],1):e._e(),e.currentPreset||!e.isPresetValid?t("div",{key:"clear",staticClass:"properties-panel-search-extra-button element-preset-chooser__clear",attrs:{"aria-label":e.__("Clear Styles")},on:{click:function(t){return t.stopPropagation(),e.clear.apply(null,arguments)}}},[t("Icon",{attrs:{icon:"CloseIcon",size:"12"}})],1):e._e()])],1),e.currentPreset?t("NiceButton",{staticClass:"element-preset-chooser__edit",attrs:{"aria-label":e.__("Edit")},on:{click:e.edit}},[e._v(" "+e._s(e.__("Edit"))+" ")]):e._e()],1),e.isPresetValid?e._e():t("div",{staticClass:"element-preset-chooser-invalid"},[t("AlertBox",{attrs:{options:{style:"error",content:e.__("The selected preset does not exist or has been deleted. Please select another preset.")}}})],1),t("PresetDialog",{attrs:{open:e.savePresetDialog,"element-id":e.element.id,"default-name":e.newPresetName},on:{close:e.closePresetDialog}})],1)},xx=[];let wx=class extends l.w3{constructor(){super(...arguments),this.newPresetName="",this.autocompleteListIndex=-1,this.addingPreset=!1,this.savePresetDialog=!1}get foundPresetsWithName(){return!this.newPresetName||this.presetItems.filter((e=>e.text.toLowerCase().includes(this.newPresetName.toLowerCase()))).length}get newPresetNameItalic(){return`<i>${this.newPresetName}</i>`}get elementName(){return c.configStore.element(this.element.data.type).name}get availablePresets(){return c.globalStore.presets}get isPresetValid(){return!this.currentPreset||this.currentPreset&&this.presetItems.find((e=>e.value===this.currentPreset))}get isPresetsOverridesEnabled(){return c.configStore.isExperimentEnabled("design-presets-overrides")}get presetItems(){const e=this.element.data.type;return this.availablePresets.filter((t=>t.availableForType===e)).map((e=>({text:e.name,value:e.id})))}get currentPreset(){return this.element.data.properties?.meta?.preset}get canCreatePreset(){return!!this.element.data.properties?.design}async createPresetOnEnter(){if(-1!==this.autocompleteListIndex)return;if(this.foundPresetsWithName)return;if(!this.newPresetName)return;if(!this.canCreatePreset)return void cd.Z.log.errorMessage("No design to save as preset");const e=(0,ae.Lr)(this.newPresetName,this.element.data.type,this.element.data.properties.design);this.addingPreset=!0;try{(0,ae.xk)(e),(0,ae.I8)(e.id,this.element.id),this.$refs.input.blur()}catch(t){cd.Z.log.errorMessage("Failed to save preset")}finally{this.addingPreset=!1}}onListIndexUpdate(e){this.autocompleteListIndex=e}selectPreset(e){this.newPresetName="",(0,ae.I8)(e,this.element.id,!this.isPresetsOverridesEnabled),this.autocompleteListIndex=-1}clear(){(0,ae.Tn)(this.element.id)}detach(){this.currentPreset&&((0,ae.WE)(this.currentPreset,this.element.id),(0,ae.Tn)(this.element.id))}edit(){c.uiStore.setActivePresetId(this.currentPreset),(0,Bu.oM)("presets")}openSavePresetDialog(){this.savePresetDialog=!0}closePresetDialog(){this.savePresetDialog=!1}};(0,r.gn)([(0,l.fI)()],wx.prototype,"element",void 0),wx=(0,r.gn)([(0,l.wA)({components:{NiceButton:Br.Z,Icon:He.Z,DropdownInput:Cd.Z,AlertBox:Ag.Z,PresetDialog:xa}})],wx);const Ix=wx,Px=Ix;var kx=(0,N.Z)(Px,Cx,xx,!1,null,null,null);const Ex=kx.exports;var Tx=n(37220);let Dx=class extends s.ZP{constructor(){super(...arguments),this.searchBoxState={modifiedOnly:!1,includeSettings:!1,query:""},this.editingElementControlsTreeContext=Tx.rq,this.searchString=""}get element(){return c.uiStore.activeElement}get elementId(){return c.uiStore.activeElementId}clearQuery(){this.updateSearchBoxState({modifiedOnly:!1,query:"",includeSettings:!1})}updateSearchBoxState(e){this.searchBoxState=e}get hasSearchParameters(){return this.searchBoxState.modifiedOnly||this.searchBoxState.query}get noSearchResults(){return gx(this.controlsFilteredBySearchParams.contentSections,0)+gx(this.controlsFilteredBySearchParams.designSections,0)+gx(this.controlsFilteredBySearchParams.settingsSections,0)===0}get controlsFilteredBySearchParams(){const e=this.searchBoxState.includeSettings,t=this.searchBoxState.modifiedOnly,n=this.isPresetEnabled&&!this.isPresetsOverridesEnabled,s=this.searchBoxState.query,i={designSections:n?[]:this.controls.designSections,contentSections:this.controls.contentSections,settingsSections:e?this.controls.settingsSections:[]},o=t?this.controls:i;return ux(o,t,s,this.editingElementControlsTreeContext)}get controls(){const e=this.element.data.type,t=c.configStore.element(e).controls;return(0,dx.Z)(t,c.configStore.permission)}get isPresetEnabled(){return!!this.element&&(0,ae.CO)(this.element.id)}get searchDisabled(){return"design"===this.tab&&this.isPresetEnabled&&!this.isPresetsOverridesEnabled}get isPresetsOverridesEnabled(){return c.configStore.isExperimentEnabled("design-presets-overrides")}get contentSections(){return this.controls.contentSections}get designSections(){return this.controls.designSections}get settingsSections(){return this.controls.settingsSections}get hasContentControls(){return this.controls.contentSections.length>0}get hasDesignControls(){return this.controls.designSections.length>0}get hasSettingsControls(){return this.controls.settingsSections.length>0}get tab(){return this.elementId&&c.uiStore.activeElementProperties?.tab?c.uiStore.activeElementProperties.tab:this.hasContentControls?"content":this.hasDesignControls?"design":this.hasSettingsControls?"settings":""}updateTab(e){this.elementId&&c.uiStore.setCurrentElementTab(e)}};(0,r.gn)([(0,l.fI)()],Dx.prototype,"value",void 0),(0,r.gn)([(0,l.DF)("context")],Dx.prototype,"editingElementControlsTreeContext",void 0),Dx=(0,r.gn)([(0,l.wA)({components:{ElementPresetChooser:Ex,DropdownInput:Cd.Z,ControlsTree:_C["default"],SearchBox:OC,DesignContentSettingsTabs:nx,DesignTabContent:cx,Icon:He.Z,SearchBoxEmptyState:Sx}})],Dx);const Ax=Dx,Zx=Ax;var Ox=(0,N.Z)(Zx,yC,fC,!1,null,null,null);const Mx=Ox.exports;let Bx=class extends s.ZP{get elementIsActive(){return!!c.uiStore.activeElement}};Bx=(0,r.gn)([(0,l.wA)({components:{Titlebar:aC,TabsAndControls:Mx,BlankSidebarContent:hC}})],Bx);const Lx=Bx,Nx=Lx;var Fx=(0,N.Z)(Nx,$S,WS,!1,null,null,null);const Rx=Fx.exports;var Vx=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-add-panel"},[t("PanelHeader",{on:{close:e.close},scopedSlots:e._u(["oxygen"===e.builderMode?{key:"right",fn:function(){return[t("IconButton",{staticClass:"breakdance-toolbar-icon-button",attrs:{icon:"BookOpenIcon",size:14,small:"",tooltip:e.__("Design Library")},on:{click:e.openDesignLibrary}})]},proxy:!0}:null],null,!0)},[e._v(" "+e._s(e.__("Add"))+" ")]),"success"===e.state?["breakdance"===e.builderMode?t("div",{staticClass:"breakdance-add-panel__selection-wrapper"},[t("button",{staticClass:"breakdance-add-panel__panel-selection breakdance-add-panel__panel-selection--active"},[e._v(" "+e._s(e.__("Elements"))+" ")]),t("button",{staticClass:"breakdance-add-panel__panel-selection",on:{click:e.openDesignLibrary}},[e._v(" "+e._s(e.__("Library"))+" ")])]):e._e(),t("ElementsList")]:"loading"===e.state?[t("div",{staticClass:"d-flex justify-center align-center",staticStyle:{height:"100%"}},[t(Xp.Z,{attrs:{indeterminate:"",size:100,color:"var(--gray300)"}})],1)]:[t("div",{staticClass:"d-flex justify-center align-center pa-4",staticStyle:{height:"100%","font-size":"var(--text-md)","font-weight":"500",color:"var(--gray700)"}},[e._v(" "+e._s(e.__("error: failed to load elements"))+" ")])]],2)},$x=[],Wx=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-add-panel__element-list"},[t("div",{staticClass:"breakdance-add-panel-search d-flex"},[e.isAddPanelOpen?t("SearchInput",{attrs:{tabindex:"0",placeholder:e.isElementStudioOpen?e.sprintf(e.__("Search %d elements"),e.elementsCount):e.__("Search elements"),value:e.searchString,autofocus:!0,"data-test-id":"breakdance-add-panel-search"},on:{input:e.handleSearch,keydown:[e.resetSelectedSearchItemIndex,function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.addSelectedSearchItem.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:e.nextOrPreviousSelectedSearchElement.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),e.goToSelectedSearchElement("prev"))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),e.goToSelectedSearchElement("next"))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.closePanel.apply(null,arguments)}]}}):e._e(),e.advancedSearchAvailable?[t(Qo.Z,{staticClass:"ml-2",attrs:{"x-small":"",text:"",outlined:e.hasSearchParams},on:{click:function(t){e.advancedSearchDialogOpen=!0}}},[e._v(e._s(e.__("advanced")))]),t(Ha.Z,{attrs:{width:"220"},model:{value:e.advancedSearchDialogOpen,callback:function(t){e.advancedSearchDialogOpen=t},expression:"advancedSearchDialogOpen"}},[t(Jc.Z,[t(yd.ZB,[t("br"),t("h4",[e._v(e._s(e.__("Internal Element Project Management Tool")))]),t(Qo.Z,{attrs:{small:""},on:{click:e.dumpSearchResults}},[e._v(e._s(e.__("dump search results")))]),t("div",{staticClass:"d-flex align-center justify-space-between"},[e._v(" "+e._s(e.__("Has Dynamic Stuff"))+" "),t(Fg.Z,{model:{value:e.advancedSearchHasDynamicStuff,callback:function(t){e.advancedSearchHasDynamicStuff=t},expression:"advancedSearchHasDynamicStuff"}})],1),e._v(" "+e._s(e.__("Looks Good:"))+" "),t("DropdownInput",{attrs:{items:e.advancedSearchDropdownItems,clearable:""},model:{value:e.advancedSearchLooksGood,callback:function(t){e.advancedSearchLooksGood=t},expression:"advancedSearchLooksGood"}}),t("br"),e._v(" "+e._s(e.__("Options Good:"))+" "),t("DropdownInput",{attrs:{items:e.advancedSearchDropdownItems,clearable:""},model:{value:e.advancedSearchOptionsGood,callback:function(t){e.advancedSearchOptionsGood=t},expression:"advancedSearchOptionsGood"}}),t("br"),e._v(" "+e._s(e.__("Options Work:"))+" "),t("DropdownInput",{attrs:{items:e.advancedSearchDropdownItems,clearable:""},model:{value:e.advancedSearchOptionsWork,callback:function(t){e.advancedSearchOptionsWork=t},expression:"advancedSearchOptionsWork"}}),t("br"),e._v(" "+e._s(e.__("Dynamic Behavior Works:"))+" "),t("DropdownInput",{attrs:{items:e.advancedSearchDropdownItems,clearable:""},model:{value:e.advancedSearchDynamicBehaviorWorks,callback:function(t){e.advancedSearchDynamicBehaviorWorks=t},expression:"advancedSearchDynamicBehaviorWorks"}}),t("br")],1)],1)],1)]:e._e()],2),t("div",{staticClass:"breakdance-add-panel__item-wrapper"},[e.hasSearchParams?e._e():e._l(e.elementCategories,(function(n,s){return t("div",{key:s},[e.elementsInActiveCategory(n.slug).length?t("Accordion",{attrs:{expanded:e.openCategoriesIndex.includes(s)},on:{toggle:function(t){return e.chooseCategory(s)}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"breakdance-add-panel__item-title",attrs:{tabindex:"0","data-test-id":`elements-category-${n.label.replace(/ /g,"-").toLowerCase()}`},on:{keypress:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.chooseCategory(s)}}},[e._v(" "+e._s(n.label)+" ")])]},proxy:!0},{key:"content",fn:function(){return[t("div",{staticClass:"breakdance-add-panel__item-element-wrapper"},e._l(e.elementsInActiveCategory(n.slug),(function(e,n){return t("AddElement",{key:n,attrs:{element:e}})})),1)]},proxy:!0}],null,!0)}):e._e()],1)})),e.hasSearchParams?t("div",{staticClass:"breakdance-add-panel__item-element-wrapper breakdance-add-panel__item-element-wrapper--search"},[e.searchResultsCount?e._e():t("div",{staticClass:"breakdance-add-panel__no-results-for-search"},[e._v(" "+e._s(e.__("no results"))+" ")]),e._l(e.elementsForSearch,(function(n,s){return t("AddElement",{key:n.slug,attrs:{isSearching:!0,element:n,isSelected:e.selectedSearchElementIndex===s,"show-html-tag":e.searchInHtmlTags,"search-query":e.searchString}})}))],2):e._e()],2)])},Ux=[],zx=n(39872),Hx=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t(Qo.Z,{on:{click:function(t){e.isOpen=!0}}},[e._v(e._s(e.__("Open Website Dialog")))]),t(Ha.Z,{model:{value:e.isOpen,callback:function(t){e.isOpen=t},expression:"isOpen"}},[t(Jc.Z,[t("h1",[e._v(" "+e._s(e.__("use the below HTML code on breakdance.com to display a list of elements."))+" ")]),t("p",[e._v(" "+e._s(e.__("this is currently used at https://breakdance.com/features/elements"))+" ")]),t("div",{staticClass:"all-elements"},e._l(e.elementCategories,(function(n){return t("div",{key:n.categoryLabel,staticClass:"element-category-wrapper"},[t("div",{staticClass:"element-category"},[t("h3",{staticClass:"element-category-label"},[e._v(" "+e._s(n.categoryLabel)+" ")])]),t("div",{staticClass:"elements"},e._l(n.elements,(function(n){return t("div",{key:n.element,staticClass:"element"},[t("div",{staticClass:"element-title"},[e._v(" "+e._s(n.element)+" ")]),n.icon&&e.elementIconIsLocal(n.icon)?t("div",{staticClass:"element-icon"},[t("RawIcon",{attrs:{icon:n.icon}})],1):t("div",{staticClass:"element-icon",domProps:{innerHTML:e._s(n.icon)}})])})),0)])})),0)])],1)],1)},Gx=[],Kx=n(24192);let jx=class extends s.ZP{constructor(){super(...arguments),this.isOpen=!1}elementIconIsLocal(e){return fy.iconNames.find((t=>t===e))}get elementCategories(){const e=Object.values(c.configStore.elements);return c.configStore.builderElementCategories.map((t=>({categoryLabel:t.label,elements:e.filter((e=>!0!==e.experimental)).filter((e=>!e.addPanelRules||!e.addPanelRules.alwaysHide)).filter((e=>e.category===t.slug)).map((e=>({element:e.name,icon:e.uiIcon}))).sort(((e,t)=>e.element.localeCompare(t.element)))}))).filter((e=>0!==e.elements.length))}};jx=(0,r.gn)([(0,l.wA)({components:{RawIcon:Kx.Z}})],jx);const qx=jx,Xx=qx;var Yx=(0,N.Z)(Xx,Hx,Gx,!1,null,null,null);const Qx=Yx.exports;let Jx=class extends s.ZP{constructor(){super(...arguments),this.openCategoriesIndex=[0,1],this.searchString="",this.selectedSearchElementIndex=0,this.advancedSearchAvailable=!1,this.advancedSearchDialogOpen=!1,this.advancedSearchHasDynamicStuff=!1,this.advancedSearchLooksGood=!1,this.advancedSearchOptionsGood=!1,this.advancedSearchOptionsWork=!1,this.advancedSearchDynamicBehaviorWorks=!1}get builderMode(){return c.configStore.builderMode}addSelectedSearchItem(){const e=this.elementsForSearch[this.selectedSearchElementIndex]?.slug;e&&(0,qe.Sl)(this.elementsForSearch[this.selectedSearchElementIndex])&&(c.documentStore.addElement({elementSlug:e}),this.doesSearchQueryMatchAnyHtmlTag&&(0,qe.Q$)(c.uiStore.activeElementId,this.searchString,`DocumentAddElement:Slug:${e}`),"oxygen"===this.builderMode&&(0,Bu.TO)("add"))}get searchResultsCount(){return Object.keys(this.elementsForSearch).length}goToSelectedSearchElement(e="next"){let t="next"===e?this.selectedSearchElementIndex+1:this.selectedSearchElementIndex-1;t===this.searchResultsCount?t=0:-1===t&&(t=this.searchResultsCount-1),this.selectedSearchElementIndex=t,this.scrollToActive()}nextOrPreviousSelectedSearchElement(e){""!==this.searchString&&e.preventDefault(),this.goToSelectedSearchElement(e.shiftKey?"prev":"next")}handleSearch(e){this.searchString!==e&&document.querySelector(".breakdance-add-panel")?.scrollTo({top:0}),this.searchString=e}get isAddPanelOpen(){return"add"===this.panelContext?.state}resetSearchWhenPanelOpens(){this.isAddPanelOpen&&this.handleSearch("")}resetSelectedSearchItemIndex(e){const t=["Enter","Tab","ShiftLeft","ShiftRight","ArrowUp","ArrowDown"];t.includes(e.code)||(this.selectedSearchElementIndex=0)}get elementsCount(){return this.elements.length}chooseCategory(e){this.searchString="";const t=this.openCategoriesIndex.findIndex((t=>t===e));-1===t?this.openCategoriesIndex=[...this.openCategoriesIndex,e]:this.openCategoriesIndex.splice(t,1)}elementsInActiveCategory(e){return this.elements.filter((t=>t.category===e))}get elementCategories(){return c.configStore.builderElementCategories}get elements(){return Object.values(c.configStore.elements).filter((e=>!!c.uiStore.settings.showExperimentalElements||!0!==e.experimental)).filter((e=>!(0,qe.GF)(e.addPanelRules,e.settings))).filter((e=>(0,qe.Sl)(e))).sort(((e,t)=>e.order<t.order?-1:e.order>t.order?1:0))}get searchInHtmlTags(){return"oxygen"===c.configStore.builderMode}get doesSearchQueryMatchAnyHtmlTag(){return this.filteredSearchElements.find((e=>[e.htmlTag?.default,...e.htmlTag?.options].filter(Boolean).find((e=>e===this.searchString))))}get elementsForSearch(){return this.doesSearchQueryMatchAnyHtmlTag?this.filteredSearchElements.sort(((e,t)=>{const n=e.category?.toLowerCase(),s=t.category?.toLowerCase();return n===s?0:"basic"===n?-1:"basic"===s?1:0})):this.filteredSearchElements}get filteredSearchElements(){const e=this.searchInHtmlTags?["htmlTag.default","htmlTag.options"]:[],t=(0,qe.tM)(this.elements,this.searchString,e),n=t.filter((e=>{const t=e.projectManagement?e.projectManagement:void 0;return!Object.values({looksGood:this.advancedSearchLooksGood?t?.looksGood==this.advancedSearchLooksGood:void 0,optionsGood:this.advancedSearchOptionsGood?t?.optionsGood==this.advancedSearchOptionsGood:void 0,optionsWork:this.advancedSearchOptionsWork?t?.optionsWork==this.advancedSearchOptionsWork:void 0,dynamicBehaviorWorks:this.advancedSearchDynamicBehaviorWorks?t?.dynamicBehaviorWorks==this.advancedSearchDynamicBehaviorWorks:void 0,hasDynamicStuff:this.advancedSearchHasDynamicStuff?e.dependencies||e.actions:void 0}).includes(!1)}));return n}scrollToActive(){(0,A.forceNextTick)((()=>{document.querySelector(".breakdance-add-panel__element--selected")?.scrollIntoView({block:"center"})}))}dumpSearchResults(){console.log(this.elementsForSearch.map((e=>e.name)).join("\n"))}get advancedSearchDropdownItems(){return["yes","no","unknown","sort of"]}mounted(){Ke.uq.register("a d v",(()=>this.advancedSearchAvailable=!0))}beforeDestroy(){Ke.uq.unbind("a d v")}get hasSearchParams(){return!!(this.searchString||this.advancedSearchLooksGood||this.advancedSearchOptionsGood||this.advancedSearchOptionsWork||this.advancedSearchDynamicBehaviorWorks||this.advancedSearchHasDynamicStuff)}updateAdvancedSearchValue(e,t){this[e]=t}get isElementStudioOpen(){return c.uiStore.panelState.elementStudioOpen}closePanel(){(0,Bu.TO)("add")}};(0,r.gn)([(0,l.tB)({from:"panelContext",default:{}})],Jx.prototype,"panelContext",void 0),(0,r.gn)([(0,l.RL)("isAddPanelOpen")],Jx.prototype,"resetSearchWhenPanelOpens",null),Jx=(0,r.gn)([(0,l.wA)({components:{SearchInput:eu.Z,TextInput:na.Z,Accordion:tv.Z,AddElement:zx.Z,DropdownInput:Cd.Z,WebsiteDialog:Qx}})],Jx);const ew=Jx,tw=ew;var nw=(0,N.Z)(tw,Wx,Ux,!1,null,null,null);const sw=nw.exports;var iw,ow=n(18236),aw=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(Ha.Z,{attrs:{fullscreen:e.fullscreen,width:e.fullscreen?null:1140,"content-class":"design-library-dialog"},model:{value:e.isOpen,callback:function(t){e.isOpen=t},expression:"isOpen"}},[t("header",{staticClass:"design-library-header"},[t("TopBarSection",[t("IconButton",{attrs:{icon:"HouseIcon",size:"18",title:e.__("Go home")},on:{click:e.goHome}})],1),t("TopBarSection",{attrs:{"border-left":!0,"border-right":!0}},[t("DesignProviderDropdown",{attrs:{providers:e.providers},model:{value:e.selectedProvider,callback:function(t){e.selectedProvider=t},expression:"selectedProvider"}})],1),t("TopBarSection",{staticClass:"design-library-breakpoint-chooser ml-auto mr-auto",attrs:{"border-left":!0,"border-right":!0}},[t("BreakpointsSelection",{model:{value:e.breakpoint,callback:function(t){e.breakpoint=t},expression:"breakpoint"}})],1),t("TopBarSection",{staticClass:"ml-auto pr-2",attrs:{"border-right":!0}},[t("NiceButton",{attrs:{disabled:!e.canImportAll,"left-icon":"ArrowDownToLine",loading:e.importingPage},on:{click:e.importAll}},[e._v(" "+e._s(e.__("Import Page"))+" ")])],1),t("TopBarSection",[t("IconButton",{attrs:{icon:e.fullscreen?"DownLeftAndUpRightToCenter":"UpRightAndDownLeftFromCenter",size:"18",title:e.__("Make modal full screen")},on:{click:e.toggleFullscreen}}),e.selectedUrl?t("a",{attrs:{href:e.selectedUrl,target:"_blank"}},[t("IconButton",{attrs:{icon:"ShareFromSquareIcon",size:"18",title:e.__("Visit site")}})],1):e._e()],1),t("TopBarSection",{attrs:{"border-left":!0}},[t("IconButton",{attrs:{icon:"CloseIcon",size:"18",title:e.__("Close modal")},on:{click:e.close}})],1)],1),t("div",{staticClass:"design-library-contents"},[t("DesignLibrarySidebar",{attrs:{items:e.sidebarItems},on:{select:e.onPostSelected}}),t("div",{ref:"iframeWrapper",staticClass:"design-library-iframe-wrapper"},[e.previewLoaded?[t("DesignLibraryDependencyWarning",{attrs:{provider:e.selectedProvider,"relies-on-global-settings":e.reliesOnGlobalSettings,"relies-on-design-presets":e.reliesOnDesignPresets}})]:e._e(),t("ProOnlyAlertBox",{attrs:{options:{feature:"design-library",content:e.__("Soon, the Design Library will only be available in the pro version. For now, enjoy your free preview!")}}}),e.showPasswordForm?t("DesignLibraryPassword",{attrs:{provider:e.selectedProvider,compact:!0},on:{"password-validated":e.getAllProvidersAndReloadSelected}}):t("div",{staticClass:"design-library-iframe-inner-wrapper",style:e.iframeWrapperStyles},[e.selectedProvider&&e.iframeUrl?t("iframe",{ref:"iframe",staticClass:"design-library-iframe",style:e.iframeStyles,attrs:{src:e.iframeUrl},on:{load:e.onProviderLoaded}}):e._e()]),e.previewLoaded?t(ow.Z,{attrs:{value:e.loading,absolute:""}},[t(Xp.Z,{attrs:{indeterminate:"",size:"64"}})],1):e._e(),!e.previewLoaded&&e.selectedProvider?t("DesignLibrarySkeleton"):e._e()],2)],1)])},rw=[],lw=n(65118),cw=n(75031),dw=function(){var e=this;e._self._c;return e._m(0)},uw=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"design-library-skeleton-loader"},[t("span",{staticClass:"design-library-skeleton-header"},[t("span",{staticClass:"design-library-skeleton-line"}),t("span",{staticClass:"design-library-skeleton-line"}),t("span",{staticClass:"design-library-skeleton-line"})]),t("span",{staticClass:"design-library-skeleton-hero"},[t("span",{staticClass:"design-library-skeleton-line"}),t("span",{staticClass:"design-library-skeleton-line"})]),t("div",{staticClass:"design-library-skeleton-button"},[t("span",{staticClass:"design-library-skeleton-line"}),t("span",{staticClass:"design-library-skeleton-line"})])])}];let pw=(0,l.wA)(iw=class extends s.ZP{})||iw;const hw=pw;var gw=(0,N.Z)(hw,dw,uw,!1,null,null,null);const mw=gw.exports;var vw=n(33356),yw=n(12817),fw=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("aside",{staticClass:"design-library-sidebar"},[t("header",{staticClass:"design-library-sidebar-header"},[t("SearchInput",{attrs:{placeholder:e.__("Search..."),autofocus:!0,small:!0},model:{value:e.searchQuery,callback:function(t){e.searchQuery=t},expression:"searchQuery"}}),e.types.length?t("DropdownInput",{attrs:{items:e.types,placeholder:e.__("Filter by type"),clearable:!0},model:{value:e.selectedType,callback:function(t){e.selectedType=t},expression:"selectedType"}}):e._e()],1),t(yw.Z,{attrs:{hoverable:"",activatable:"","open-on-click":"",items:e.treeItems,"open-all":!!e.searchQuery},on:{"update:active":function(t){return e.$emit("select",t)}},scopedSlots:e._u([{key:"prepend",fn:function({item:n,open:s}){return[n.children?t("Icon",{attrs:{icon:s?"FolderOpenIcon":"FolderIcon"}}):e._e()]}}])})],1)},_w=[],bw=n(74221);let Sw=class extends s.ZP{constructor(){super(...arguments),this.searchQuery="",this.selectedType=""}onItemsChange(){this.searchQuery="",this.selectedType=""}get filteredItems(){const e=this.searchQuery;if(!e)return this.items.filter(this.filterItemByType);const t=new bw.Z(this.items,{keys:["name"],threshold:.2});return t.search(e.trim()).map((e=>e.item)).filter(this.filterItemByType)}get types(){const e=[...new Set(this.items.map((e=>e.type)))].filter(Boolean);return e.map((e=>({value:e,text:g()(e?.replace("breakdance_",""))})))}get treeItems(){const e=[],t=this.filteredItems.reduce(((t,n)=>(n.tags.length?n.tags.forEach((e=>{t[e]=t[e]||[],t[e].push(n)})):e.push(n),t)),Object.create(null)),n=Object.keys(t).map((e=>({id:e,name:e,children:t[e]})));return[...e,...n]}filterItemByType(e){return!this.selectedType||e.type===this.selectedType}};(0,r.gn)([(0,l.fI)({default(){return[]}})],Sw.prototype,"items",void 0),(0,r.gn)([(0,l.RL)("items")],Sw.prototype,"onItemsChange",null),Sw=(0,r.gn)([(0,l.wA)({components:{DropdownInput:Cd.Z,AlertBox:Ag.Z,SearchInput:eu.Z,Icon:He.Z}})],Sw);const Cw=Sw,xw=Cw;var ww=(0,N.Z)(xw,fw,_w,!1,null,null,null);const Iw=ww.exports;var Pw=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.isInlineImportEnabled?t("div",[t("div",{staticClass:"design-library-global-settings-warning"},[t("div",[t("div",{staticClass:"design-library-global-settings-warning-text"},[e.wasPreviouslyImported?[t("Icon",{staticClass:"design-library_success-icon",attrs:{icon:"CheckSquareIcon"}}),e._v(" "+e._s(e.__("You've already imported settings from this Design Library."))+" ")]:[t("Icon",{staticClass:"design-library_warning-icon",attrs:{icon:"ExclamationMarkCircleIcon"}}),t("span",[e._v(" "+e._s(e.sprintf(e.__("This design set relies on %s. It won't look the same unless you import them."),e.items))+" ")])]],2)]),t("NiceButton",{on:{click:e.toggleImportScreen}},[e._v(e._s(e.__("Import Settings")))])],1),e.showImportScreen?t("div",{staticClass:"design-library-import-global-settings-panel"},[t("div",{staticClass:"design-library-import-global-settings-panel-content"},[e.loading?t("div",[t("LoadingSpinner",{attrs:{color:"var(--gray500)",size:65}})],1):[t("span",[e._v(" "+e._s(e.__("Importing from this design set will replace some of your current settings."))+" ")]),e.availableImportTypesCount>1?t("div",{staticClass:"import-options"},[t("h4",[e._v(e._s(e.__("Choose what to import:")))]),t("div",{staticClass:"checkbox-group"},[e.isGlobalSettingsEnabled()?t(Um.Z,{staticClass:"checkbox-item",attrs:{label:e.__("Global Settings"),"hide-details":""},model:{value:e.selectedItems.globalSettings,callback:function(t){e.$set(e.selectedItems,"globalSettings",t)},expression:"selectedItems.globalSettings"}}):e._e(),e.isDesignPresetsEnabled()?t(Um.Z,{staticClass:"checkbox-item",attrs:{label:e.__("Design Presets"),"hide-details":""},model:{value:e.selectedItems.designPresets,callback:function(t){e.$set(e.selectedItems,"designPresets",t)},expression:"selectedItems.designPresets"}}):e._e(),e.isVariablesEnabled()?t(Um.Z,{staticClass:"checkbox-item",attrs:{label:e.__("Variables"),"hide-details":""},model:{value:e.selectedItems.variables,callback:function(t){e.$set(e.selectedItems,"variables",t)},expression:"selectedItems.variables"}}):e._e(),e.isOxySelectorsEnabled()?t(Um.Z,{staticClass:"checkbox-item",attrs:{label:e.__("Selectors"),"hide-details":""},model:{value:e.selectedItems.oxySelectors,callback:function(t){e.$set(e.selectedItems,"oxySelectors",t)},expression:"selectedItems.oxySelectors"}}):e._e()],1)]):e._e(),t("div",[t(Qo.Z,{staticClass:"mr-2",attrs:{text:""},on:{click:e.toggleImportScreen}},[e._v(" "+e._s(e.__("Cancel"))+" ")]),t(Qo.Z,{attrs:{dark:"",color:"blue",disabled:!e.hasSelectedItems},on:{click:e.importSelectedItems}},[e._v(" "+e._s(e.__("Confirm Overwrite & Import"))+" ")])],1)]],2)]):e._e()]):e._e()},kw=[],Ew=n(14018),Tw=n(17582),Dw=n(22218),Aw=n(58720);const Zw={globalSettings:{key:"globalSettings",label:"Global Settings",action:"breakdance_get_external_global_settings",decoder:cw.az,storeKey:"globalSettingsLastImportedFromUrl",setter:e=>c.globalStore.setGlobalSettings(e?.globalSettings),uiPanel:"globalSettings"},designPresets:{key:"designPresets",label:"Design Presets",action:"breakdance_get_external_design_presets",decoder:Ew.p,storeKey:"designPresetsLastImportedFromUrl",setter:e=>c.globalStore.setPresets(e),uiPanel:"presets"},variables:{key:"variables",label:"Variables",action:"breakdance_get_external_variables",decoder:iu.dt({variables:Tw.eh,collections:iu.IX(iu.Z_)}),storeKey:"variablesLastImportedFromUrl",setter:e=>{c.globalStore.setVariables(e.variables),c.globalStore.setVariablesCollections(e.collections)},uiPanel:"variables"},oxySelectors:{key:"oxySelectors",label:"Selectors",action:"breakdance_get_external_oxy_selectors",decoder:iu.dt({selectors:iu.IX(Dw.En),collections:iu.IX(iu.Z_)}),storeKey:"oxySelectorsLastImportedFromUrl",setter:e=>{console.log("importing selectors",e),c.globalStore.setOxygenSelectors(e.selectors),c.globalStore.setOxygenSelectorsCollections(e.collections)},uiPanel:null}};let Ow=class extends s.ZP{constructor(){super(...arguments),this.loading=!1,this.showImportScreen=!1,this.selectedItems=this.getDefaultSelectedItems()}get isInlineImportEnabled(){return!!this.provider&&(!this.provider.isLocal&&(!!this.wasPreviouslyImported||this.hasAvailableImportTypes))}get wasPreviouslyImported(){const e=this.provider?.url,t=this.providerData,n=["globalSettingsLastImportedFromUrl","designPresetsLastImportedFromUrl","variablesLastImportedFromUrl","oxySelectorsLastImportedFromUrl"];return n.some((n=>t?.[n]===e))}get providerData(){return c.configStore.designLibrary}get hasAvailableImportTypes(){return this.isGlobalSettingsEnabled()||this.isDesignPresetsEnabled()||this.isVariablesEnabled()||this.isOxySelectorsEnabled()}get availableImportTypesCount(){return[this.isGlobalSettingsEnabled(),this.isDesignPresetsEnabled(),this.isVariablesEnabled(),this.isOxySelectorsEnabled()].filter(Boolean).length}get hasSelectedItems(){return Object.values(this.selectedItems).some((e=>e))}get items(){const e=[];return this.isGlobalSettingsEnabled()&&e.push((0,Ft.__)("Global Settings")),this.isDesignPresetsEnabled()&&e.push((0,Ft.__)("Design Presets")),this.isVariablesEnabled()&&e.push((0,Ft.__)("Variables")),this.isOxySelectorsEnabled()&&e.push((0,Ft.__)("Selectors")),(0,Ft.UY)(e)}getDefaultSelectedItems(){return{globalSettings:this.isGlobalSettingsEnabled(),designPresets:this.isDesignPresetsEnabled(),variables:this.isVariablesEnabled(),oxySelectors:this.isOxySelectorsEnabled()}}isGlobalSettingsEnabled(){return this.providerData?.isGlobalSettingsEnabled&&this.reliesOnGlobalSettings}isDesignPresetsEnabled(){return this.providerData?.isDesignPresetsEnabled&&this.reliesOnDesignPresets}isVariablesEnabled(){return this.providerData?.isVariablesEnabled}isOxySelectorsEnabled(){return this.providerData?.isOxySelectorsEnabled}getProviderDisplayName(){return this.provider?.name||this.provider?.url||(0,Ft.__)("Unknown")}resetSelectedItems(){this.selectedItems=this.getDefaultSelectedItems()}toggleImportScreen(){this.showImportScreen=!this.showImportScreen,this.showImportScreen&&this.resetSelectedItems()}async importSelectedItems(){if(this.provider?.isLocal)return;this.loading=!0;const e=Object.entries(this.selectedItems).filter((([e,t])=>t)).map((([e])=>this.importType(e)));await Promise.all(e),this.loading=!1,this.showImportScreen=!1,this.resetSelectedItems()}async importType(e){const t=Zw[e],n=this.provider?.url;if(!t.action)return;if(!n)return;const s=(0,su.zG)(await(0,ad.D)({action:t.action,decoder:t.decoder,friendlyName:`${t.label} for "${n}"`,dataToPost:{url:n}}),(0,ou.g_)((()=>!1),(e=>(t.storeKey&&c.configStore.setDesignLibrary({...c.configStore.designLibrary,[t.storeKey]:n}),e))));!1!==s&&null!==s?(t.setter?.(s),t.uiPanel&&c.uiStore.setShouldPanelLoadFreshDataIntoStoreOnceOpened(t.uiPanel,!1),cd.Z.log.message((0,Ft.gB)((0,Ft.TZ)('Imported %s from "%s"',"1: import type label, 2: provider name"),t.label,this.getProviderDisplayName()))):cd.Z.log.errorMessage((0,Ft.gB)((0,Ft.TZ)('Error importing %s for "%s"',"1: import type label, 2: provider name"),t.label,this.getProviderDisplayName()))}};(0,r.gn)([(0,l.fI)({default:null})],Ow.prototype,"provider",void 0),(0,r.gn)([(0,l.fI)({default:!1})],Ow.prototype,"reliesOnGlobalSettings",void 0),(0,r.gn)([(0,l.fI)({default:!1})],Ow.prototype,"reliesOnDesignPresets",void 0),Ow=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,NiceButton:Br.Z,LoadingSpinner:Aw.Z}})],Ow);const Mw=Ow,Bw=Mw;var Lw=(0,N.Z)(Bw,Pw,kw,!1,null,null,null);const Nw=Lw.exports;var Fw=n(92260),Rw=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Dropdown",{attrs:{"offset-y":"","close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("div",e._g({staticClass:"document-chooser"},n),[t("div",{staticClass:"document-chooser-text"},["breakdance"===e.builderMode?t("h2",[e._v(" "+e._s(e.__("Design Set"))+" ")]):e._e(),"oxygen"===e.builderMode?t("span",{staticClass:"document-chooser-type-label"},[t("span",[e._v(e._s(e.__("Design Set:")))])]):e._e(),t("span",{staticClass:"ellipsis-text"},[e._v(" "+e._s(e.value&&e.value.name)+" ")])]),t("div",{staticClass:"document-chooser-dropdown-icon"},[t("Icon",{attrs:{size:"11",icon:"CaretDownIcon"}})],1)])]}}]),model:{value:e.open,callback:function(t){e.open=t},expression:"open"}},[t(Jc.Z,{staticClass:"vscroll-scroll vscroll-wrap",attrs:{width:"300",height:"350"}},[t("div",{staticClass:"preview-content-chooser-dialog-search-form-wrapper"},[t(ed.Z,{staticClass:"preview-content-chooser-dialog-search-box breakdance-dense-input",attrs:{label:e.__("Search..."),clearable:"",solo:"",flat:"",dense:"","full-width":"","single-line":"","background-color":"var(--gray150)",autofocus:""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1),t(Ec.Z,{ref:"scrollable",staticClass:"vscroll-scroll",attrs:{dense:""}},[e._l(e.filteredProviders,(function(n,s){return[t(Tc.Z,{key:s,class:{"document-chooser-item-selected":e.value&&n.url===e.value.url},attrs:{link:""},on:{click:function(t){return e.chooseProvider(n)}}},[t(Dc.V9,{staticClass:"previewable-item-list-item"},[t("div",{staticClass:"previewable-item-label previewable-item-label-stop-text-from-overflowing"},[e._v(" "+e._s(n.name)+" ")]),n.type?t("div",{staticClass:"previewable-item-type"},[e._v(" "+e._s(e.formatType(n.type))+" ")]):e._e()])],1)]}))],2)],1)],1)},Vw=[];let $w=class extends s.ZP{constructor(){super(...arguments),this.open=!1,this.search=""}onSearchChange(){const e=this.$refs.scrollable;this.$nextTick((()=>{e.$el.scrollTop=0}))}get builderMode(){return c.configStore.builderMode}get filteredProviders(){return this.search?this.providers.filter((e=>e.name.toLowerCase().includes(this.search.toLowerCase()))):this.providers}formatType(e){return e.replace(/_/g," ")}chooseProvider(e){this.$emit("input",e),this.open=!1,(0,Tt.K)("Design Library",{action:"modal_provider_selected",provider:e.name,url:e.url})}};(0,r.gn)([(0,l.fI)()],$w.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],$w.prototype,"providers",void 0),(0,r.gn)([(0,l.RL)("search")],$w.prototype,"onSearchChange",null),$w=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,Dropdown:Oc.Z,TopBarSection:Kc}})],$w);const Ww=$w,Uw=Ww;var zw=(0,N.Z)(Uw,Rw,Vw,!1,null,null,null);const Hw=zw.exports;var Gw=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("div",{staticClass:"design-library-global-settings-warning"},[t("div",[t("div",{staticClass:"design-library-global-settings-warning-text"},[e.lastImportedFromUrl===e.provider?.url?[t("Icon",{staticClass:"design-library_success-icon",attrs:{icon:"CheckSquareIcon"}}),e._v(" "+e._s(e.__("You've already imported the Design Presets from this site."))+" ")]:e.lastImportedFromUrl?[t("Icon",{staticClass:"design-library_warning-icon",attrs:{icon:"ExclamationMarkCircleIcon"}}),t("span",[e._v(" "+e._s(e.__("This design relies on Design Presets. It won't look the same unless you import them."))+" ")])]:[t("div",[e._v(" "+e._s(e.__("This design relies on Design Presets. It won't look the same unless you import them."))+" ")])]],2)]),t("NiceButton",{on:{click:e.toggleImportScreen}},[e._v(e._s(e.__("Import Design Presets")))])],1),e.showImportScreen?t("div",{staticClass:"design-library-import-global-settings-panel"},[e.loading?t("div",[t("LoadingSpinner",{attrs:{color:"var(--gray500)",size:65}})],1):[t("span",[e._v(" "+e._s(e.__("Your existing Design Presets will be overwritten with the Presets from this library website."))+" ")]),t("div",[t(Qo.Z,{staticClass:"mr-2",attrs:{text:""},on:{click:e.toggleImportScreen}},[e._v(" "+e._s(e.__("Cancel"))+" ")]),t(Qo.Z,{attrs:{dark:"",color:"blue"},on:{click:e.importSettings}},[e._v(" "+e._s(e.__("Confirm Overwrite & Import"))+" ")])],1)]],2):e._e()])},Kw=[];let jw=class extends s.ZP{constructor(){super(...arguments),this.loading=!1,this.showImportScreen=!1}async importSettings(){if(this.provider?.isLocal)return;this.loading=!0;const e=this.provider?.url,t=(0,su.zG)(await(0,ad.D)({action:"breakdance_get_external_design_presets",decoder:Ew.p,friendlyName:`Design Presets for "${e}"`,dataToPost:{url:e}}),(0,ou.g_)((()=>null),(t=>(e&&Q.PK.setDesignLibrary({...Q.PK.designLibrary,designPresetsLastImportedFromUrl:e}),t))));this.loading=!1,this.showImportScreen=!1,t?(Q.cr.setPresets(t),Q.kD.setShouldPanelLoadFreshDataIntoStoreOnceOpened("presets",!1),cd.Z.log.message((0,Ft.gB)((0,Ft.TZ)('Imported Design Presets from "%s"',"%s: Provider name or URL"),this.provider?.name||this.provider?.url))):cd.Z.log.errorMessage((0,Ft.gB)((0,Ft.TZ)('Error importing Design Presets for "%s"',"%s: Provider name or URL"),this.provider?.name||this.provider?.url))}toggleImportScreen(){this.showImportScreen=!this.showImportScreen}};(0,r.gn)([(0,l.fI)({default:null})],jw.prototype,"provider",void 0),(0,r.gn)([(0,l.fI)({default:null})],jw.prototype,"lastImportedFromUrl",void 0),jw=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,NiceButton:Br.Z,LoadingSpinner:Aw.Z}})],jw);const qw=jw,Xw=qw;var Yw=(0,N.Z)(Xw,Gw,Kw,!1,null,null,null);const Qw=Yw.exports;var Jw=n(66696);let eI=class extends s.ZP{constructor(){super(...arguments),this.selectedProvider=null,this.selectedPostId=null,this.providerElements=[],this.reliesOnGlobalSettings=!1,this.reliesOnDesignPresets=!1,this.providerPosts=[],this.importingPage=!1,this.requiresPassword=!1,this.passwordValid=!0,this.breakpoint={id:Pe.Wp,label:"",minWidth:void 0,maxWidth:void 0,defaultPreviewWidth:Pe.kS},this.canvasSize={width:0,height:0},this.loading=!1,this.previewLoaded=!1,this.fullscreen=!1,this.loadingDesignSetData=!1}mounted(){Q.kD.hasFullAccess&&(Ke.uq.register(je.r.CMD_B,this.open),this.setSelectedProviderToLastUsedProvider())}beforeDestroy(){Ke.uq.unbind(je.r.CMD_B),this.unbindListeners()}get library(){return Q.PK.designLibrary}get providers(){return this.library.designProviders}get showPasswordForm(){return this.requiresPassword&&!this.passwordValid}setSelectedProviderToLastUsedProvider(){const e=(0,Qa.f8)(),t=this.providers.find((t=>t.url===e));if(t)this.selectedProvider=t;else{const e=this.providers.find((e=>"This Website"===e.name));e&&(this.selectedProvider=e)}}get sidebarItems(){return this.providerPosts}get isOpen(){return Q.kD.panelState.designLibraryModalOpen}set isOpen(e){Q.kD.setDesignLibraryModalState(e)}get selectedPost(){return this.providerPosts.find((e=>e.id===this.selectedPostId))}get selectedUrl(){return this.selectedPost?.url||this.selectedProvider?.url}get iframeUrl(){if(!this.selectedUrl)return null;const e=new URL(this.selectedUrl);return e.searchParams.append("breakdance","design-library"),this.currentProviderPassword&&e.searchParams.set("password",this.currentProviderPassword),e.toString()}get previewWidth(){return this.breakpoint.id===Pe.Wp?"100%":this.breakpoint.defaultPreviewWidth}get minWidth(){return(0,Pe.GV)(Q.cr)}get iframeWrapperStyles(){return{width:"100%"===this.previewWidth?"100%":`${this.previewWidth}px`}}get iframeStyles(){const e=e=>{const t=Math.min(1,this.canvasSize.width/e);return{width:`${e}px`,transform:`scale(${t})`,height:this.canvasSize.height*(1/t)+"px"}};return"100%"===this.previewWidth?this.canvasSize.width<this.minWidth?e(this.minWidth):{width:"100%",minWidth:`${this.minWidth}px`}:e(this.previewWidth)}get canImportAll(){return this.providerElements.length}get currentProviderPassword(){const e=new URL(this.selectedProvider?.url||"");return e.searchParams.get("password")}onDialogOpen(){this.isOpen?this.modalOpened():this.unbindListeners()}onProviderChange(e,t){this.providerElements=[],this.selectedPostId=null,this.providerPosts=[],this.reliesOnGlobalSettings=!1,this.reliesOnDesignPresets=!1,this.getDesignSetData(),e.url!==t?.url&&(this.previewLoaded=!1)}modalOpened(){this.selectedProvider||(this.selectedProvider=this.providers[1]),(0,Tt.K)("Design Library",{action:"modal_opened"}),this.calculateSizeAfterTransition(),window.addEventListener("message",this.handleIframeMessage,!1),window.addEventListener("resize",this.setCanvasSize)}unbindListeners(){window.removeEventListener("message",this.handleIframeMessage,!1),window.removeEventListener("resize",this.setCanvasSize)}calculateSizeAfterTransition(){const e=400;setTimeout((()=>this.setCanvasSize()),e)}setCanvasSize(){const e=this.$refs.iframeWrapper;if(!e)return;const{width:t,height:n}=e.getBoundingClientRect();this.canvasSize={width:t,height:n}}reloadIframe(){const e=this.$refs.iframe;e?(e.src+="",this.loading=!0):this.selectedProvider=this.providers[0]}goHome(){this.selectedPostId=null,this.reloadIframe()}toggleFullscreen(){this.fullscreen=!this.fullscreen,this.calculateSizeAfterTransition()}handleIframeMessage(e){if("string"!==typeof e.data)return;const[t,n]=e.data.split(/,(.*)/s);"breakdanceGetElements"===t&&this.getElements(n),"breakdanceImportElement"===t&&this.importElement(n),"breakdanceBeforeLeave"===t&&this.navigatedAway()}onPostSelected(e){const[t]=e;this.loading=!0,this.selectedPostId=t||null,this.reloadIframe(),(0,Tt.K)("Design Library",{action:"modal_page_selected",provider:this.selectedProvider?.name,post_id:t,url:this.selectedProvider?.url})}onProviderLoaded(){this.previewLoaded=!0,this.loading=!1,this.setCanvasSize()}getElements(e){this.loading=!1;const t=(0,lw.Z)(e,iu.IX(cw.NM));this.providerElements=(0,su.zG)(t,(0,ou.g_)((()=>[]),(e=>e)))}navigatedAway(){this.loading=!0}importElement(e){const t=(0,lw.Z)(e,cw.NM),n=(0,su.zG)(t,(0,ou.g_)((()=>null),(e=>e)));n&&((0,Tt.K)("Design Library",{action:"modal_import_element",provider:this.selectedProvider?.name,elementSlug:n.data.type,url:this.selectedProvider?.url}),this.insertElements([n]),this.close(),this.$nextTick((()=>{(0,vw.zE)()})))}insertElements(e){(0,Qa.AE)(e),this.selectedProvider&&(0,Qa.Hw)(this.selectedProvider.url)}importAll(){this.importingPage=!0,this.insertElements(this.providerElements),this.close(),this.importingPage=!1,this.$nextTick((()=>{(0,vw.zE)()}))}close(){Q.kD.setDesignLibraryModalState(!1)}open(){Q.kD.setDesignLibraryModalState(!0)}async getDesignSetData(){const e=this.selectedProvider?.url;this.loadingDesignSetData=!0,(0,su.zG)(await(0,ad.D)({action:this.selectedProvider?.isLocal?"breakdance_get_local_design_set":"breakdance_get_external_design_set",decoder:Fw.i2,friendlyName:"Design Set Data",dataToPost:{url:e}}),(0,ou.g_)((()=>{this.providerPosts=[]}),(e=>{this.providerPosts=e.posts,this.requiresPassword=e.requiresPassword||!1,this.passwordValid=!!e.passwordValid,this.reliesOnGlobalSettings=e.reliesOnGlobalSettings,this.reliesOnDesignPresets=e.reliesOnDesignPresets}))),this.loadingDesignSetData=!1}async getAllProvidersAndReloadSelected(){await this.getUpdatedDesignProviders();const e=this.providers.find((e=>e.name===this.selectedProvider?.name));this.selectedProvider=e||this.providers[0]}async getUpdatedDesignProviders(){(0,su.zG)(await(0,ad.D)({action:"breakdance_get_design_library_data",decoder:Fw.Jd}),(0,ou.g_)((()=>{}),(e=>{Q.PK.setDesignLibrary(e)})))}};(0,r.gn)([(0,l.RL)("isOpen")],eI.prototype,"onDialogOpen",null),(0,r.gn)([(0,l.RL)("selectedProvider")],eI.prototype,"onProviderChange",null),eI=(0,r.gn)([(0,l.wA)({components:{ProOnlyAlertBox:Zg.Z,IconButton:Xa.Z,NiceButton:Br.Z,DesignLibrarySidebar:Iw,DesignLibrarySkeleton:mw,TopBarSection:Kc,TextInput:na.Z,DropdownInput:Cd.Z,BreakpointsSelection:Fc,DesignProviderDropdown:Hw,DesignLibraryPassword:Jw.Z,DesignLibraryDependencyWarning:Nw,DesignLibraryDesignPresets:Qw}})],eI);const tI=eI,nI=tI;var sI=(0,N.Z)(nI,aw,rw,!1,null,null,null);const iI=sI.exports;var oI=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(gC.Z,{staticClass:"breakdance-panel-header d-flex align-center",attrs:{tile:""}},[t("div",{staticClass:"breakdance-panel-header-title"},[e._t("default")],2),t(vc.Z),e._t("right"),e.backInsteadOfClose?t("IconButton",{staticClass:"breakdance-panel-header-close-button",attrs:{icon:"ChevronDownIcon",rotate:"90",size:"12",small:""},on:{click:e.close}}):t("IconButton",{staticClass:"breakdance-panel-header-close-button",attrs:{icon:"CloseIcon",size:"breakdance"===e.builderMode?16:14,small:""},on:{click:e.close}})],2)},aI=[];let rI=class extends l.w3{close(){this.$emit("close")}get builderMode(){return c.configStore.builderMode}};(0,r.gn)([(0,l.fI)({default:!1})],rI.prototype,"backInsteadOfClose",void 0),rI=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z}})],rI);const lI=rI,cI=lI;var dI=(0,N.Z)(cI,oI,aI,!1,null,null,null);const uI=dI.exports;let pI=class extends s.ZP{close(){(0,Bu.TO)("add")}openDesignLibrary(){Q.kD.setDesignLibraryModalState(!0)}get state(){return Q.PK.elementsLoadingState}get builderMode(){return Q.PK.builderMode}};pI=(0,r.gn)([(0,l.wA)({components:{DesignLibraryModal:iI,PanelHeader:uI,ElementsList:sw,IconButton:Xa.Z}})],pI);const hI=pI,gI=hI;var mI=(0,N.Z)(gI,Vx,$x,!1,null,null,null);const vI=mI.exports;var yI=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vscroll-wrap vscroll-scroll global-settings-panel"},[t("div",{staticClass:"vscroll-wrap vscroll-scroll"},[t("PanelHeader",{on:{close:e.close},scopedSlots:e._u([{key:"right",fn:function(){return[t("ImportExportDropdownMenu",{attrs:{name:e.__("Global Settings"),"settings-to-export":e.settingsToExport,"validate-settings":e.validateImport,"import-settings":e.importSettings}})]},proxy:!0}])},[e._v(" "+e._s(e.__("Globals"))+" "),t("BrowseModeToggle",{attrs:{"panel-to-open":"globalSettings"}}),t("PanelHeaderButton",{attrs:{enabled:"history"===e.viewMode},on:{click:e.toggleViewMode}},[e._v(e._s(e.__("history")))])],1),"controls"===e.viewMode?t("GlobalSettingsPanelControlsViewMode",{attrs:{"is-loading":e.isLoading}}):"history"===e.viewMode?t("GlobalSettingsPanelHistoryViewMode"):e._e()],1)])},fI=[],_I=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.isBrowseModeAvailable?t("PanelHeaderButton",{attrs:{enabled:e.isBrowseModeEnabled},on:{click:e.toggleBrowseMode}},[e._v(e._s(e.__("browse")))]):e._e()},bI=[],SI=n(89381),CI=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:{"breakdance-panel-header-button":!0,"breakdance-panel-header-button--enabled":e.enabled},on:{click:function(t){return e.$emit("click")}}},[e._t("default")],2)},xI=[];let wI=class extends l.w3{};(0,r.gn)([(0,l.fI)({default:!0})],wI.prototype,"enabled",void 0),wI=(0,r.gn)([(0,l.wA)({components:{}})],wI);const II=wI,PI=II;var kI=(0,N.Z)(PI,CI,xI,!1,null,null,null);const EI=kI.exports;let TI=class extends s.ZP{get isBrowseModeEnabled(){return"browse"===c.uiStore.mode?.mode}get isBrowseModeAvailable(){return"breakdance"===c.configStore.builderMode}toggleBrowseMode(){(0,SI.lD)(this.panelToOpen)}};(0,r.gn)([(0,l.fI)({default:"globalSettings"})],TI.prototype,"panelToOpen",void 0),TI=(0,r.gn)([(0,l.wA)({components:{PanelHeaderButton:EI}})],TI);const DI=TI,AI=DI;var ZI=(0,N.Z)(AI,_I,bI,!1,null,null,null);const OI=ZI.exports;var MI=n(38433),BI=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vscroll-wrap vscroll-scroll"},[e.isLoading?t(MI.Z,{attrs:{"justify-center":"","align-center":""}},[t(Xp.Z,{attrs:{size:"64",indeterminate:"",color:"var(--gray300)"}})],1):[e.hasSearchParameters?e._e():t("div",{staticClass:"vscroll-scroll"},[t("ControlsTree",{attrs:{controls:e.controls,path:"settings"}})],1),e.hasSearchParameters&&!e.noSearchResults?t("div",{staticClass:"vscroll-scroll"},[""!==e.searchBoxState.query?t("div",{staticClass:"control-tree-search-term"},[t("span",[e._v(e._s(e.sprintf(e._xdoc('Search results for "%s"',"Global Settings","Global Settings. %s: Search query"),e.searchBoxState.query)))]),t("div",{staticClass:"control-tree-search-clear",on:{click:e.clearQuery}},[t("Icon",{attrs:{icon:"CloseIcon",size:"14"}})],1)]):e._e(),t("ControlsTree",{attrs:{controls:e.controlsFilteredBySearchParams,path:"settings",linear:!0}})],1):e.hasSearchParameters&&e.noSearchResults?t(gC.Z,{staticClass:"d-flex justify-center align-center flex-column",attrs:{height:"100%"}},[t("SearchBoxEmptyState",{attrs:{label:"settings"},on:{input:e.clearQuery}})],1):e._e(),t("SearchBox",{attrs:{value:e.searchBoxState,location:"settings"},on:{input:e.updateSearchBoxState}})]],2)},LI=[],NI=n(18759);let FI=class extends s.ZP{constructor(){super(...arguments),this.searchBoxState={modifiedOnly:!1,query:""},this.editingGlobalSettingsControlsTreeContext=VI}updateSearchBoxState(e){this.searchBoxState=e}clearQuery(){this.updateSearchBoxState({modifiedOnly:!1,query:""})}get controls(){return Q.PK.globalSettingsControlsAndTemplate.controls}get controlsFilteredBySearchParams(){return px(this.controls,this.searchBoxState.modifiedOnly,this.searchBoxState.query,this.editingGlobalSettingsControlsTreeContext,"settings")}get noSearchResults(){return 0===gx(this.controlsFilteredBySearchParams,0)}get hasSearchParameters(){return this.searchBoxState.modifiedOnly||this.searchBoxState.query}};(0,r.gn)([(0,l.fI)({default:!1})],FI.prototype,"isLoading",void 0),(0,r.gn)([(0,l.DF)("context")],FI.prototype,"editingGlobalSettingsControlsTreeContext",void 0),FI=(0,r.gn)([(0,l.wA)({components:{ControlsTree:_C["default"],SearchBox:OC,Icon:He.Z,SearchBoxEmptyState:Sx}})],FI);const RI=FI,VI={getControlValue:e=>j()(Q.cr.globalSettings,e),setControlValue(e,t,n,s){Q.cr.throttledGlobalSettingsPropertyChange((0,Zv.YO)({path:e,value:t},{control:n,controlsTree:this.getControls(e)||[]},s))},getControls:()=>Q.PK.globalSettingsControlsAndTemplate.controls,setAccordionState:(e,t)=>{(0,NI.v)(e,t)},getAccordionState:e=>(0,NI.uz)(e)},$I=RI;var WI=(0,N.Z)($I,BI,LI,!1,null,null,null);const UI=WI.exports;var zI=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vscroll-wrap vscroll-scroll"},[t("RevisionsList",{attrs:{"is-loading":e.isLoading,revisions:e.revisionUiItems},on:{revisionSelected:e.onRevisionSelected}})],1)},HI=[],GI=n(95996);async function KI(){return(0,su.zG)(await(0,ad.D)({action:"breakdance_retrieve_global_settings_revisions",decoder:GI.qT}),(0,od.mapLeft)((()=>null)),ou.i$)}var jI=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-revisions-list vscroll-wrap vscroll-scroll"},[e.isLoading?t(MI.Z,{attrs:{"justify-center":"","align-center":""}},[t(Xp.Z,{attrs:{size:"64",indeterminate:"",color:"var(--gray300)"}})],1):e.revisionsNotSupportedMessage?t("div",{staticClass:"breakdance-revisions-list__not-found"},[t("p",[e._v(e._s(e.revisionsNotSupportedMessage))])]):e.revisions.length?t("div",{staticClass:"breakdance-revisions-list__items"},e._l(e.revisions,(function(n,s){return t("RevisionItem",{key:n.revisionData.id,attrs:{revision:n.revisionData,selected:n.isSelected},on:{click:function(t){return e.onRevisionSelected(n,s)}}})})),1):t("div",{staticClass:"breakdance-revisions-list__not-found"},[t("h2",[e._v(e._s(e.__("No revisions found")))]),t("p",[e._v(e._s(e.__("Save any changes to create a new revision")))])])],1)},qI=[],XI=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"revisions-item",class:{"revisions-item--selected":e.selected},on:{click:function(t){return e.$emit("click",e.revision)}}},[t("span",{staticClass:"revisions-item__date"},[e._v(e._s(e.revision.date))]),e.revision.author?[t("span",[e._v(e._s(e.revision.author))])]:e._e()],2)},YI=[];let QI=class extends s.ZP{};(0,r.gn)([(0,l.fI)({default(){return{}}})],QI.prototype,"revision",void 0),(0,r.gn)([(0,l.fI)({default:!1})],QI.prototype,"selected",void 0),QI=(0,r.gn)([(0,l.wA)({})],QI);const JI=QI,eP=JI;var tP=(0,N.Z)(eP,XI,YI,!1,null,null,null);const nP=tP.exports;let sP=class extends s.ZP{onRevisionSelected(e,t){this.$emit("revisionSelected",e,t)}};(0,r.gn)([(0,l.fI)({default:!1})],sP.prototype,"isLoading",void 0),(0,r.gn)([(0,l.fI)({default:[]})],sP.prototype,"revisions",void 0),(0,r.gn)([(0,l.fI)({default:null})],sP.prototype,"revisionsNotSupportedMessage",void 0),sP=(0,r.gn)([(0,l.wA)({components:{RevisionItem:nP}})],sP);const iP=sP,oP=iP;var aP=(0,N.Z)(oP,jI,qI,!1,null,null,null);const rP=aP.exports;var lP=n(25886);let cP=class extends s.ZP{constructor(){super(...arguments),this.isLoading=!1,this.remoteRevisions=null,this.selectedIndex=null,this.unsubscribeFromStore=()=>{},this.currentUnsavedRevision=null}async beforeMount(){await this.loadRemoteRevisions(),Q.cr.settingsHasUnsavedChangesPresent&&(this.recalculateSelectedIndexBasedOnStoreAndRevisionDataObjectsMatch(),-1===this.selectedIndex&&this.setCurrentStoreDataAsCurrentUnsavedRevisionIfDataIsNotEqualToMostRecentRemoteRevisionData()),this.recalculateSelectedIndexBasedOnStoreAndRevisionDataObjectsMatch(),this.unsubscribeFromStore=this.$store.subscribe((e=>{const t=(0,lP.q$)(e);"global"===t&&"global/restoreGlobalSettingsRevision"!==e.type&&"global/setSelectors"!==e.type&&("global/setGlobalSettings"===e.type?this.currentUnsavedRevision=null:this.setCurrentStoreDataAsCurrentUnsavedRevisionIfDataIsNotEqualToMostRecentRemoteRevisionData(),this.recalculateSelectedIndexBasedOnStoreAndRevisionDataObjectsMatch())}))}beforeDestroy(){this.unsubscribeFromStore()}async loadRemoteRevisions(){this.isLoading=!0,this.remoteRevisions=await KI(),this.selectedIndex=null,this.isLoading=!1}recalculateSelectedIndexBasedOnStoreAndRevisionDataObjectsMatch(){this.selectedIndex=this.findSelectedIndexBasedOnStoreDataMatch()}findSelectedIndexBasedOnStoreDataMatch(){const e=(0,wd.Z)(Q.cr.globalSettings);return this.revisions.findIndex((t=>oh()(t.globalSettings,e)))}setCurrentStoreDataAsCurrentUnsavedRevisionIfDataIsNotEqualToMostRecentRemoteRevisionData(){this.isCurrentStoreDataTheSameAsTheMostRecentRemoteRevisionData()?this.currentUnsavedRevision=null:this.setCurrentUnsavedRevisionFromCurrentStoreData()}isCurrentStoreDataTheSameAsTheMostRecentRemoteRevisionData(){if(null===this.remoteRevisions||0===this.remoteRevisions.length)return!1;const[e]=this.remoteRevisions,t=(0,wd.Z)(Q.cr.globalSettings);return oh()(e.globalSettings,t)}setCurrentUnsavedRevisionFromCurrentStoreData(){this.currentUnsavedRevision={id:-1,author:!1,date:"Current",globalSettings:(0,wd.Z)(Q.cr.globalSettings)}}get revisionUiItems(){return this.revisions.map(((e,t)=>({isSelected:t===this.selectedIndex,revisionData:e})))}get revisions(){const e=this.remoteRevisions??[];return this.currentUnsavedRevision?[this.currentUnsavedRevision,...e]:e}onRevisionSelected(e,t){this.selectedIndex=t,Ie.n.transaction((()=>Q.cr.restoreGlobalSettingsRevision(e.revisionData)),"Restore Global Settings From Revision")}get unsavedChangesPresent(){return Q.kD.unsavedChangesPresent}async updateRevisionsAfterSaving(){Q.kD.unsavedChangesPresent||(await this.loadRemoteRevisions(),this.currentUnsavedRevision=null,this.recalculateSelectedIndexBasedOnStoreAndRevisionDataObjectsMatch())}};(0,r.gn)([(0,l.RL)("unsavedChangesPresent")],cP.prototype,"updateRevisionsAfterSaving",null),cP=(0,r.gn)([(0,l.wA)({components:{RevisionsList:rP}})],cP);const dP=cP,uP=dP;var pP=(0,N.Z)(uP,zI,HI,!1,null,null,null);const hP=pP.exports;var gP=n(1073),mP=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("Dropdown",{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("IconButton",e._g({class:"breakdance"===e.builderMode?"breakdance-panel-header-left-of-close-button":"",attrs:{size:"breakdance"===e.builderMode?16:14,small:"",icon:"breakdance"===e.builderMode?"EllipsisStrokeIcon":"EllipsisSolidIcon"}},n))]}}])},[t(Ec.Z,[t(Tc.Z,{attrs:{dense:""},on:{click:e.openImportDialog}},[t(Dc.V9,[e._v(" "+e._s(e.sprintf(e._xdoc("Import %s","Settings","%s: Settings name"),e.name))+" ")])],1),t(Tc.Z,{attrs:{dense:""},on:{click:e.exportSettings}},[t(Dc.V9,[e._v(" "+e._s(e.sprintf(e._doc("Export %s","%s: Settings name"),e.name))+" ")])],1)],1)],1),t("Dialog",{scopedSlots:e._u([{key:"title",fn:function(){return[e._v(" "+e._s(e.sprintf(e._xdoc("Import %s","Settings","%s: Settings name"),e.name))+" ")]},proxy:!0},{key:"text",fn:function(){return[t("FileUpload",{attrs:{height:"300px",accept:".json",acceptsMultiple:!1},on:{input:e.handleFiles}},[e.canImport?[e._v(" "+e._s(e.__("File accepted"))+" ")]:[e._v(" "+e._s(e.sprintf(e._doc("Drag %s.json here","%s: Settings file name"),e.slugifiedName))+" ")]],2),e.canMerge?t(Um.Z,{attrs:{label:e.sprintf(e._doc("Merge with the existing %s.","%s: Settings name"),e.name),"hide-details":""},model:{value:e.merge,callback:function(t){e.merge=t},expression:"merge"}}):e._e()]},proxy:!0},{key:"actions",fn:function(){return[t(Qo.Z,{staticStyle:{"margin-right":"auto"},attrs:{text:""},on:{click:e.cancelImport}},[e._v(" "+e._s(e.__("Cancel"))+" ")]),t(Qo.Z,{attrs:{dark:"",color:"blue",disabled:!e.canImport},on:{click:e.runImport}},[e._v(" "+e._s(e.__("Import"))+" ")])]},proxy:!0}]),model:{value:e.importDialogOpen,callback:function(t){e.importDialogOpen=t},expression:"importDialogOpen"}})],1)},vP=[],yP=n(88506);function fP(e,t,n="text/plain"){const s=new Blob([e],{type:n}),i=document.createElement("a");i.download=t,i.href=(window.webkitURL||window.URL).createObjectURL(s),i.dataset.downloadurl=[n,i.download,i.href].join(":"),document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(i.href)}let _P=class extends l.w3{constructor(){super(...arguments),this.canImport=!1,this.importDialogOpen=!1,this.settingsToImport={},this.merge=!1}get slugifiedName(){return Qf()(this.name,{lower:!0})}openImportDialog(){this.importDialogOpen=!0}cancelImport(){this.settingsToImport={},this.canImport=!1,this.importDialogOpen=!1}handleFiles(e){const t=e?.[0],n=new FileReader;n.onloadend=async e=>{if(!e?.target)return;const t=e.target.result,n=(0,id.pipe)((0,yP.Z)(t),(0,od.fold)((()=>{}),(e=>e)));if(!this.validateSettings(n))return this.settingsToImport={},void(this.canImport=!1);this.settingsToImport=n,this.canImport=!0},n.readAsText(t)}runImport(){this.importSettings(this.settingsToImport,this.merge?"merge":"replace"),this.settingsToImport={},this.canImport=!1,this.importDialogOpen=!1}exportSettings(){const e=(0,Wg.g)(this.settingsToExport);fP(e||"",`${this.slugifiedName}.json`)}get builderMode(){return c.configStore.builderMode}};(0,r.gn)([(0,l.fI)({default:"Global Settings"})],_P.prototype,"name",void 0),(0,r.gn)([(0,l.fI)()],_P.prototype,"settingsToExport",void 0),(0,r.gn)([(0,l.fI)({default:!1})],_P.prototype,"canMerge",void 0),(0,r.gn)([(0,l.fI)()],_P.prototype,"validateSettings",void 0),(0,r.gn)([(0,l.fI)()],_P.prototype,"importSettings",void 0),_P=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z,Dropdown:Oc.Z,Dialog:ta.Z,FileUpload:pg.Z}})],_P);const bP=_P,SP=bP;var CP=(0,N.Z)(SP,mP,vP,!1,null,null,null);const xP=CP.exports;let wP=class extends s.ZP{constructor(){super(...arguments),this.storedData=null,this.isStoringData=!1,this.isLoadingData=!1}get viewMode(){return Q.kD.panelState.globalSettingsPanelActiveViewMode}toggleViewMode(){Q.kD.setPanelState({...Q.kD.panelState,globalSettingsPanelActiveViewMode:"controls"===this.viewMode?"history":"controls"})}get isLoading(){return this.isStoringData||this.isLoadingData}async beforeMount(){Q.kD.panelState.shouldLoadFreshDataIntoStoreOnceOpened.globalSettings?(Q.kD.setPanelState({...Q.kD.panelState,globalSettingsPanelActiveViewMode:"controls"}),await this.loadSettings()):Q.kD.setShouldPanelLoadFreshDataIntoStoreOnceOpened("globalSettings",!0)}async storeSettings(){this.isStoringData=!0;const e=await(0,gP.T)();return this.storedData=(0,wd.Z)(Q.cr.globalSettings),this.isStoringData=!1,e}async loadSettings(){this.isLoadingData=!0;const e=await(0,gP._)();return this.storedData=(0,wd.Z)(Q.cr.globalSettings),this.isLoadingData=!1,e}get unsavedChangesPresent(){return Q.cr.settingsHasUnsavedChangesPresent}requestPanelClosingConfirmation(){Q.kD.requestClosingConfirmation({subject:"globalSettings",confirmationDefinition:{title:(0,Ft.__)("You have unsaved changes to your Global Settings."),text:(0,Ft.__)("Would you like to save or discard these changes?"),type:"info"}})}handleUnsavedChangesPresentChange(e){e?this.requestPanelClosingConfirmation():Q.kD.noClosingConfirmationIsNeededFor("globalSettings")}get confirmationChosenOption(){return Q.kD.closingConfirmations.globalSettings?.chosenOption}async handleConfirmationChosenOptionChange(e){"discard"===e?(Q.kD.setClosingConfirmationIsDiscarding({subject:"globalSettings",isDiscarding:!0}),await this.loadSettings()?this.close():this.requestPanelClosingConfirmation()):"save"===e&&(Q.kD.setClosingConfirmationIsSaving({subject:"globalSettings",isSaving:!0}),await this.storeSettings()?this.close():this.requestPanelClosingConfirmation())}close(){(0,Bu.TO)("globalSettings")}get settingsToExport(){return Q.cr.globalSettings}validateImport(e){return"settings"in e?(0,su.zG)(e,iu.dt({settings:iu.IM(iu.Z_,iu._4)}).decode,(0,ou.g_)((()=>(cd.Z.log.errorMessage("Error importing Global Settings - the file is invalid."),!1)),(()=>!0))):(cd.Z.log.errorMessage("Error importing Global Settings - the file is invalid or empty."),!1)}importSettings(e){"settings"in e?(Ie.n.transaction((()=>{Q.cr.setGlobalSettings(e)}),"Import Global Settings"),cd.Z.log.message("Global Settings imported.")):cd.Z.log.errorMessage("No Global Settings to import.")}};(0,r.gn)([(0,l.RL)("unsavedChangesPresent",{immediate:!0})],wP.prototype,"handleUnsavedChangesPresentChange",null),(0,r.gn)([(0,l.RL)("confirmationChosenOption",{immediate:!0})],wP.prototype,"handleConfirmationChosenOptionChange",null),wP=(0,r.gn)([(0,l.wA)({components:{GlobalSettingsPanelHistoryViewMode:hP,GlobalSettingsPanelControlsViewMode:UI,PanelHeaderButton:EI,BrowseModeToggle:OI,PanelHeader:uI,ImportExportDropdownMenu:xP}})],wP);const IP=wP,PP=IP;var kP=(0,N.Z)(PP,yI,fI,!1,null,null,null);const EP=kP.exports;var TP=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vscroll-wrap vscroll-scroll selectors-panel"},[e.isLoadingData?t(MI.Z,{attrs:{row:"","justify-center":"","align-center":""}},[t(Xp.Z,{attrs:{size:"64",indeterminate:"",color:"var(--gray300)"}})],1):e._e(),e.activeSelector?t("EditSelector",{on:{close:e.close}}):e._e(),e.activeSelector||e.isLoadingData?e._e():t("ManageSelectors",{on:{close:e.close}})],1)},DP=[],AP=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vscroll-wrap vscroll-scroll"},[t("PanelHeader",{on:{close:function(t){return e.$emit("close")}}},[e._v(e._s(e.__("Selectors"))+" "),t("BrowseModeToggle",{attrs:{"panel-to-open":"selectors"}}),t("PanelHeaderButton",{attrs:{enabled:"history"===e.viewMode},on:{click:e.toggleViewMode}},[e._v(" "+e._s(e.__("history"))+" ")])],1),t("FreeModeAlertForSelectors",{staticClass:"ma-4"}),"controls"===e.viewMode?[t("AddSelector"),t("div",{staticClass:"vscroll-wrap vscroll-scroll breakdance-manage-selectors"},[t("SelectorsList",{attrs:{selectors:e.selectors,searchable:!0},on:{input:e.updateSelectors}})],1)]:"history"===e.viewMode?[t("SelectorsPanelHistoryViewMode")]:e._e()],2)},ZP=[],OP=n(35097),MP=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"d-flex flex-row add-selector"},[t("TextInput",{staticClass:"flex-grow-1",attrs:{placeholder:e.__(".your.css > #selector-69::after")},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.addSelector.apply(null,arguments)}},model:{value:e.newSelectorName,callback:function(t){e.newSelectorName=t},expression:"newSelectorName"}}),t("NiceButton",{staticClass:"ml-1",attrs:{size:"small"},on:{click:e.addSelector}},[e._v(" "+e._s(e.__("Add"))+" ")])],1)},BP=[],LP=n(37982);let NP=class extends s.ZP{constructor(){super(...arguments),this.newSelectorName=""}addSelector(){this.newSelectorName&&((0,id.pipe)((0,LP.DQ)(this.newSelectorName),(0,od.fold)((e=>e.forEach(cd.Z.log.message)),(e=>(0,LP.Fr)(e)))),this.newSelectorName="")}};NP=(0,r.gn)([(0,l.wA)({components:{NiceButton:Br.Z,TextInput:na.Z}})],NP);const FP=NP,RP=FP;var VP=(0,N.Z)(RP,MP,BP,!1,null,null,null);const $P=VP.exports;var WP=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("RevisionsPanel",{attrs:{resources:e.selectors,"resource-key":e.resourceKey,"resource-has-unsaved-changes-present":e.hasUnsavedChangesPresent,"fetch-revisions-method":e.fetchRevisionsMethod,"update-method":"setSelectors","restore-method":"restoreSelectorsRevision"}})},UP=[];async function zP(){return(0,su.zG)(await(0,ad.D)({action:"breakdance_retrieve_selectors_revisions",decoder:GI.Ue}),(0,od.mapLeft)((()=>null)),ou.i$)}var HP=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("RevisionsList",{attrs:{"is-loading":e.isLoading,revisions:e.revisionUiItems},on:{revisionSelected:e.onRevisionSelected}})},GP=[];let KP=class extends s.ZP{constructor(){super(...arguments),this.isLoading=!1,this.remoteRevisions=null,this.selectedIndex=null,this.unsubscribeFromStore=()=>{},this.currentUnsavedRevision=null}async updateRevisionsAfterSaving(){this.unsavedChangesPresent||(await this.loadRemoteRevisions(),this.currentUnsavedRevision=null,this.recalculateSelectedIndex())}get unsavedChangesPresent(){return Q.kD.unsavedChangesPresent}get revisionUiItems(){return this.revisions.map(((e,t)=>({isSelected:t===this.selectedIndex,revisionData:e})))}get revisions(){const e=this.remoteRevisions??[];return this.currentUnsavedRevision?[this.currentUnsavedRevision,...e]:e}async beforeMount(){await this.loadRemoteRevisions(),this.resourceHasUnsavedChangesPresent&&(this.recalculateSelectedIndex(),-1===this.selectedIndex&&this.updateUnsavedRevisionIfNeeded()),this.recalculateSelectedIndex(),this.unsubscribeFromStore=this.$store.subscribe((e=>{const t=(0,lP.q$)(e);"global"===t&&e.type!==`global/${this.restoreMethod}`&&"global/setGlobalSettings"!==e.type&&(e.type===`global/${this.updateMethod}`?this.currentUnsavedRevision=null:this.updateUnsavedRevisionIfNeeded(),this.recalculateSelectedIndex())}))}beforeDestroy(){this.unsubscribeFromStore()}async loadRemoteRevisions(){this.isLoading=!0,this.remoteRevisions=await this.fetchRevisionsMethod(),this.selectedIndex=null,this.isLoading=!1}recalculateSelectedIndex(){const e=(0,wd.Z)(this.resources);this.selectedIndex=this.revisions.findIndex((t=>oh()(t[this.resourceKey],e)))}updateUnsavedRevisionIfNeeded(){this.hasCurrentStoreDataChanged()?this.currentUnsavedRevision=null:this.setUnsavedRevisionFromStore()}hasCurrentStoreDataChanged(){if(null===this.remoteRevisions)return!1;const[e]=this.remoteRevisions,t=(0,wd.Z)(this.resources);return oh()(e[this.resourceKey],t)}setUnsavedRevisionFromStore(){this.currentUnsavedRevision={id:-1,author:!1,date:(0,Ft.__)("Current"),[this.resourceKey]:(0,wd.Z)(this.resources)}}onRevisionSelected(e,t){this.selectedIndex=t,Ie.n.transaction((()=>Q.cr[this.restoreMethod](e.revisionData)),(0,Ft.gB)((0,Ft.TZ)("Restore %s from revision","%s: Resource name (selectors, presets, etc)"),this.resourceKey))}};(0,r.gn)([(0,l.fI)({required:!0})],KP.prototype,"resourceKey",void 0),(0,r.gn)([(0,l.fI)({required:!0})],KP.prototype,"restoreMethod",void 0),(0,r.gn)([(0,l.fI)({required:!0})],KP.prototype,"updateMethod",void 0),(0,r.gn)([(0,l.fI)({required:!0})],KP.prototype,"fetchRevisionsMethod",void 0),(0,r.gn)([(0,l.fI)({required:!0})],KP.prototype,"resources",void 0),(0,r.gn)([(0,l.fI)({required:!0})],KP.prototype,"resourceHasUnsavedChangesPresent",void 0),(0,r.gn)([(0,l.RL)("unsavedChangesPresent")],KP.prototype,"updateRevisionsAfterSaving",null),KP=(0,r.gn)([(0,l.wA)({components:{RevisionsList:rP}})],KP);const jP=KP,qP=jP;var XP=(0,N.Z)(qP,HP,GP,!1,null,null,null);const YP=XP.exports;let QP=class extends s.ZP{constructor(){super(...arguments),this.resourceKey="selectors"}get selectors(){return Q.cr.cssSelectors}get hasUnsavedChangesPresent(){return Q.cr.selectorsHasUnsavedChangesPresent}get fetchRevisionsMethod(){return zP}};QP=(0,r.gn)([(0,l.wA)({components:{RevisionsPanel:YP,RevisionsList:rP}})],QP);const JP=QP,ek=JP;var tk=(0,N.Z)(ek,WP,UP,!1,null,null,null);const nk=tk.exports;var sk=n(45713);let ik=class extends s.ZP{get viewMode(){return c.uiStore.panelState.selectorsPanelPanelActiveViewMode}toggleViewMode(){c.uiStore.setPanelState({...c.uiStore.panelState,selectorsPanelPanelActiveViewMode:"controls"===this.viewMode?"history":"controls"})}get selectors(){return c.globalStore.cssSelectors}updateSelectors(e){c.globalStore.setSelectors((0,wd.Z)(e))}};ik=(0,r.gn)([(0,l.wA)({components:{FreeModeAlertForSelectors:sk.Z,AlertBox:Ag.Z,SelectorsPanelHistoryViewMode:nk,PanelHeaderButton:EI,BrowseModeToggle:OI,draggable:ev(),SelectorsList:OP.Z,AddSelector:$P,PanelHeader:uI}})],ik);const ok=ik,ak=ok;var rk=(0,N.Z)(ak,AP,ZP,!1,null,null,null);const lk=rk.exports;var ck=n(43432),dk=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.activeSelector?t("div",{staticClass:"vscroll-wrap vscroll-scroll"},[t("PanelHeader",{attrs:{backInsteadOfClose:!0},on:{close:e.close}},[e._v(" "+e._s(e.__("Editing Selector"))+" ")]),t("FreeModeAlertForSelectors",{staticClass:"ma-4"}),t("div",{staticClass:"breakdance-selector-titlebar"},[t("div",{staticClass:"flex-grow-1 mr-2"},[e.editingClassOrClassHover?[t("div",{staticClass:"d-flex flex-row align-center flex-wrap mr-2"},[t("transition",{attrs:{name:"blink-on-change"}},[t("div",{key:e.activeSelector.name,staticClass:"selector-titlebar-classname mr-1 ml-n1"},[e._v(" "+e._s(e.activeSelector.name.replace(":hover",""))+" ")])]),t(Qo.Z,{class:["editing-class-hover-hover-button-always",e.editingClassHover?"editing-class-hover-hover-button-active":"editing-class-hover-hover-button"],attrs:{"x-small":"",depressed:""},on:{click:e.toggleHover}},[e._v(" :hover ")])],1)]:[t("div",{staticClass:"d-flex flex-column"},[t("TextInput",{attrs:{value:e.activeSelector.name},on:{input:e.tryToRenameActiveSelector}})],1)]],2),e.selectorIsHighlightable?t(ck.Z,{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("IconButton",e._g({attrs:{icon:"SearchFileIcon",size:"16",active:e.highlight},on:{click:e.toggleHighlight}},n))]}}],null,!1,3251607670)},[t("span",[e._v(e._s(e.sprintf(e.__("%s on page"),e.howManyOnPage)))])]):e._e(),t("IconButton",{attrs:{icon:"TrashIcon",size:"16"},on:{click:e.deleteSelector}})],1),""!==e.searchBoxState.query&&e.hasSearchParameters&&!e.noSearchResults?t("div",{staticClass:"control-tree-search-term control-tree-search-term-selector"},[t("span",[e._v(e._s(e.sprintf(e._xdoc('Search results for "%s"',"Selectors","%s: Search query"),e.searchBoxState.query)))]),t("div",{staticClass:"control-tree-search-clear",on:{click:e.clearQuery}},[t("Icon",{attrs:{icon:"CloseIcon",size:"14"}})],1)]):e._e(),e.editingClassOrClassHover||!e.attemptingToRename||e.isAttemptedRenameValid?e._e():t("div",{staticClass:"edit-selector-invalid-name-error"},[e._v(" "+e._s(e.__("invalid selector name"))+" ")]),t("div",{staticClass:"edit-selector-border"}),e.hasSearchParameters?e._e():t("div",{staticClass:"vscroll-scroll"},[t("ControlsTree",{attrs:{controls:e.controls,path:"properties"}})],1),e.hasSearchParameters&&!e.noSearchResults?t("div",{staticClass:"vscroll-scroll"},[t("ControlsTree",{attrs:{controls:e.controlsFilteredBySearchParams,path:"properties",linear:!0}})],1):e.hasSearchParameters&&e.noSearchResults?t(gC.Z,{staticClass:"d-flex justify-center align-center flex-column",attrs:{height:"100%"}},[t("SearchBoxEmptyState",{attrs:{label:"selectors"},on:{input:e.clearQuery}})],1):e._e(),t("SearchBox",{attrs:{value:e.searchBoxState,location:"selector"},on:{input:e.updateSearchBoxState}})],1):e._e()},uk=[],pk=n(5598);let hk=class extends s.ZP{constructor(){super(...arguments),this.searchBoxState={modifiedOnly:!1,query:""},this.highlight=!1,this.attemptingToRename=!1,this.editingClassControlsTreeContext=vk}updateSearchBoxState(e){this.searchBoxState=e}clearQuery(){this.updateSearchBoxState({modifiedOnly:!1,query:""})}get hasSearchParameters(){return this.searchBoxState.modifiedOnly||this.searchBoxState.query}get controlsFilteredBySearchParams(){return px(this.controls,this.searchBoxState.modifiedOnly,this.searchBoxState.query,this.editingClassControlsTreeContext,"properties")}get noSearchResults(){return 0===gx(this.controlsFilteredBySearchParams,0)}get howManyOnPage(){if(!c.uiStore.activeSelector)return 0;const e=this.editingClassHover?c.uiStore.activeSelector.name.replace(":hover",""):c.uiStore.activeSelector.name,t=window.Breakdance.canvas.document.querySelectorAll(e);return t.length}get editingClass(){return!!this.activeSelector&&"class"===this.activeSelector.type}get editingClassHover(){return!!this.activeSelector&&(!!this.activeSelector.name.endsWith(":hover")&&!!mk(this.activeSelector.name.replace(":hover","")))}get editingClassOrClassHover(){return this.editingClass||this.editingClassHover}get selectorIsHighlightable(){return!!c.uiStore.activeSelectorName&&!(c.uiStore.activeSelectorName.includes(":")&&!this.editingClassHover)}get controls(){return c.configStore.selectorControls}get activeSelector(){return c.uiStore.activeSelector}toggleHighlight(){this.highlight?this.clearHighlight():this.setHighlight()}beforeDestroy(){this.clearHighlight()}setHighlight(){if(this.highlight=!0,!c.uiStore.activeSelector)return;const e=this.editingClassHover?c.uiStore.activeSelector.name.replace(":hover",""):c.uiStore.activeSelector.name;(0,pk.BL)((0,T.RY)(),"breakdance-selector-highlight",`${e} {\n outline: 10px dashed rgba(255,200,0) !important;\n outline-offset: -5px;\n animation-duration: 2000ms;\n animation-iteration-count: infinite;\n }\n `)}clearHighlight(){this.highlight=!1,(0,pk.BL)((0,T.RY)(),"breakdance-selector-highlight","")}deleteSelector(){if(!this.activeSelector)return;const e=this.activeSelector,t=c.globalStore.cssSelectors.findIndex((t=>t.name===e.name));if(-1!==t){const e=(0,wd.Z)(c.globalStore.cssSelectors);e.splice(t,1),c.globalStore.setSelectors(e)}}close(){this.backToAllSelectors()}get activeElementTitle(){return!!c.uiStore.activeElement&&c.configStore.element(c.uiStore.activeElement.data.type).name}openElementProperties(){(0,Bu.oM)("elementproperties")}backToAllSelectors(){c.uiStore.setActiveSelectorName(null)}get isAttemptedRenameValid(){return!this.attemptingToRename||(0,LP._S)(this.attemptingToRename)}tryToRenameActiveSelector(e){if(!e)return;if(this.attemptingToRename=e,this.clearHighlight(),!(0,LP._S)(e))return;const t=c.globalStore.cssSelectors.findIndex((e=>e===this.activeSelector)),n=(0,wd.Z)(c.globalStore.cssSelectors);n[t]&&(n[t].name=e,c.globalStore.setSelectors(n),c.uiStore.setActiveSelectorName(e),this.attemptingToRename=!1)}toggleHover(){if(c.uiStore.activeSelector)if(this.editingClass){const e=c.uiStore.activeSelectorName+":hover",t=()=>c.globalStore.cssSelectors.find((t=>t.name===e));let n=t();if(n||((0,LP.Fr)({name:e,type:"custom",properties:{}}),n=t()),!n)return void cd.Z.log.message(`Unable to create or find a :hover selector for ${c.uiStore.activeSelectorName}`);c.uiStore.setActiveSelectorName(n.name),(0,Bu.oM)("selectors")}else if(this.editingClassHover&&this.activeSelector){const e=mk(this.activeSelector.name.replace(":hover",""));e&&(c.uiStore.setActiveSelectorName(e.name),(0,Bu.oM)("selectors"))}}};(0,r.gn)([(0,l.DF)("context")],hk.prototype,"editingClassControlsTreeContext",void 0),hk=(0,r.gn)([(0,l.wA)({components:{FreeModeAlertForSelectors:sk.Z,AlertBox:Ag.Z,ControlsTree:_C["default"],SearchBox:OC,IconButton:Xa.Z,PanelHeader:uI,TextInput:na.Z,SearchBoxEmptyState:Sx,Icon:He.Z}})],hk);const gk=hk,mk=e=>c.globalStore.cssSelectors.find((t=>t.name===e)),vk={getControls:()=>c.configStore.selectorControls,getControlValue:e=>j()(c.uiStore.activeSelector,`${e}`,void 0),setControlValue(e,t,n,s){c.uiStore.activeSelector&&c.globalStore.throttledSelectorPropertyChange((0,Zv.V5)({selector:c.uiStore.activeSelector,path:e,value:t},{control:n,controlsTree:this.getControls(e)||[]},s))},setAccordionState:(e,t)=>{const n=c.uiStore.activeSelector&&c.uiStore.activeSelector.name;n&&(0,NI.MK)(n,e,t)},getAccordionState:e=>{const t=c.uiStore.activeSelector&&c.uiStore.activeSelector.name;return!!t&&(0,NI.jv)(t,e)}},yk=gk;var fk=(0,N.Z)(yk,dk,uk,!1,null,null,null);const _k=fk.exports;let bk=class extends s.ZP{constructor(){super(...arguments),this.isLoadingData=!1,this.isStoringData=!1}get activeSelector(){return c.uiStore.activeSelector}async beforeMount(){c.uiStore.panelState.shouldLoadFreshDataIntoStoreOnceOpened.selectors?(c.uiStore.setPanelState({...c.uiStore.panelState,selectorsPanelPanelActiveViewMode:"controls"}),await this.load()):c.uiStore.setShouldPanelLoadFreshDataIntoStoreOnceOpened("selectors",!0)}async load(){this.isLoadingData=!0;const e=await(0,LP.c3)();return this.isLoadingData=!1,e}async save(){this.isStoringData=!0;const e=await(0,LP.zF)();return this.isStoringData=!1,e}requestPanelClosingConfirmation(){c.uiStore.requestClosingConfirmation({subject:"selectors",confirmationDefinition:{title:(0,Ft.__)("You have unsaved changes to your Selectors."),text:(0,Ft.__)("Would you like to save or discard these changes?"),type:"info"}})}get unsavedChangesPresent(){return c.globalStore.selectorsHasUnsavedChangesPresent}handleUnsavedChangesPresentChange(e){e?this.requestPanelClosingConfirmation():c.uiStore.noClosingConfirmationIsNeededFor("selectors")}get confirmationChosenOption(){return c.uiStore.closingConfirmations.selectors?.chosenOption}async handleConfirmationChosenOptionChange(e){"discard"===e?(c.uiStore.setClosingConfirmationIsDiscarding({subject:"globalSettings",isDiscarding:!0}),await this.load()?this.close():this.requestPanelClosingConfirmation()):"save"===e&&(c.uiStore.setClosingConfirmationIsSaving({subject:"globalSettings",isSaving:!0}),await this.save()?this.close():this.requestPanelClosingConfirmation())}get isLoading(){return this.isLoadingData||this.isStoringData}close(){(0,Bu.TO)("selectors")}};(0,r.gn)([(0,l.RL)("unsavedChangesPresent",{immediate:!0})],bk.prototype,"handleUnsavedChangesPresentChange",null),(0,r.gn)([(0,l.RL)("confirmationChosenOption",{immediate:!0})],bk.prototype,"handleConfirmationChosenOptionChange",null),bk=(0,r.gn)([(0,l.wA)({components:{EditSelector:_k,ManageSelectors:lk}})],bk);const Sk=bk,Ck=Sk;var xk=(0,N.Z)(Ck,TP,DP,!1,null,null,null);const wk=xk.exports;var Ik=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-structure-panel vscroll-wrap vscroll-scroll"},[t("PanelHeader",{ref:"panelHeader",on:{close:e.close},scopedSlots:e._u([{key:"right",fn:function(){return[e.children.length&&"breakdance"===e.builderMode?t("button",{staticClass:"breakdance-structure-panel__toggle-button mr-2",on:{click:e.toggleNodes}},[1===e.toggleStage?[e._v(e._s(e.__("Expand")))]:e._e(),[0,2].includes(e.toggleStage)?[e._v(e._s(e.__("Collapse")))]:e._e()],2):e._e(),e.children.length&&"oxygen"===e.builderMode?[t("IconButton",{staticClass:"breakdance-toolbar-icon-button",attrs:{icon:1===e.toggleStage?"ArrowsFromLineIcon":([0,2].includes(e.toggleStage),"ArrowsToLineIcon"),size:14,small:"",tooltip:1===e.toggleStage?e.__("Expand"):([0,2].includes(e.toggleStage),e.__("Collapse"))},on:{click:e.toggleNodes}})]:e._e(),t("StructurePanelDropdownMenu")]},proxy:!0}])},[e._v(" "+e._s(e.__("Structure"))+" ")]),t("div",{class:e.classList,on:{contextmenu:e.onContextMenu}},[t("div",{staticClass:"structure-node root-node",attrs:{"data-element-id":e.ROOT_ELEMENT_ID},on:{mousedown:e.dragStart}},[t("div",{staticClass:"structure-node-title-wrapper"},[t("div",{staticClass:"structure-node-title",staticStyle:{"margin-left":"-16px",display:"none"}},[e._v(" "+e._s(e.__("Root Node"))+" ")]),t("div",{staticClass:"top-half",attrs:{"data-element-id":e.ROOT_ELEMENT_ID,"data-depth":-1}}),t("div",{staticClass:"bottom-half",attrs:{"data-element-id":e.ROOT_ELEMENT_ID,"data-depth":-1}})]),e.children.length>0?t("ChildStructureNodes",{attrs:{nodes:e.children,depth:0}}):t("div",{staticClass:"structure-panel-empty-state"},[t("h5",[e._v(e._s(e.__("No Elements")))]),t("p",[e._v(e._s(e.__("Add an element to your page and it will show up here.")))]),t("StandardButton",{staticClass:"open-elements-toolbar-button ml-auto mr-auto",attrs:{size:"22",testId:"open-elements-toolbar-button"},on:{click:e.toggleAdd}},[e._v(" "+e._s(e.__("Add"))+" ")])],1)],1)]),t("RightClickMenu",{attrs:{context:"structure-panel"}})],1)},Pk=[];function kk(){return{overTopHalf:!1,overBottomHalf:!1,overIndex:!1,overNodeId:!1,overNodeParentId:!1,overSelf:!1,overNestDeeper:!1,overNestShallower:!1}}function Ek(e,t){const n=document.elementsFromPoint(e,t).filter(Tk("structure-node")).sort(Dk).reverse().pop();if(n){const e=n.dataset.elementId;if(e)return(0,T.ME)(e)}return!1}const Tk=e=>t=>!!t.classList.contains(e),Dk=(e,t)=>parseInt(e.dataset.depth)>parseInt(t.dataset.depth)?-1:parseInt(t.dataset.depth)>parseInt(e.dataset.depth)?1:0,Ak=(e,t)=>{const n=e.filter(Tk(t));return n.length>0&&(0,T.ME)(n[0].dataset.elementId)},Zk=(e,t,n)=>{const s=document.elementsFromPoint(e,t),i=kk();if(i.overNestDeeper=Ak(s,"nest-deeper"),i.overNestShallower=Ak(s,"nest-shallower"),i.overTopHalf=Ak(s,"top-half"),i.overBottomHalf=Ak(s,"bottom-half"),i.overSelf=!1!==Ak(s,"breakdance--currently-dragging"),i.overBottomHalf?i.overNodeId=i.overBottomHalf:i.overTopHalf&&(i.overNodeId=i.overTopHalf),i.overNodeId){const e=(0,ge.getNodeParent)(n,i.overNodeId),t=(0,ge.getNodeIndex)(n,i.overNodeId);!1!==t&&!1!==e&&(i.overIndex=t,i.overNodeParentId=e.id)}return i};var Ok=n(98992);function Mk(e,t,n){let s=!1;const i=(0,ge.findNode)(t,n);if(!i)return!1;if(e.overSelf){if(e.overSelf){if(Uk(n,t)&&e.overNestShallower===n){let e=!1;s=Rk(n,t),s&&(e=s.parentId);while(e){if((0,Fe.xJ)(t,i,e))break;if(!s||(0,Fe.xJ)(t,i,s.parentId)||!Uk(e,t))break;{const n=(0,ge.getNodeParent)(t,e);e=!!n&&n.id,e&&(s=Fk(e,t))}}}zk(n,t)&&e.overNestDeeper===n&&(s=Vk(n,t))}}else if(e.overTopHalf){s=Bk(e.overTopHalf,t),n===$k(e.overTopHalf,t)&&(s=!1);const o=$k(e.overTopHalf,t);s&&o&&(0,Fe.xJ)(t,i,o)&&(s=Fk(o,t))}else if(e.overBottomHalf&&(0===Wk(e.overBottomHalf,t)||(0,Ok.nx)(e.overBottomHalf))){if(s=Lk(e.overBottomHalf,t),s&&(0,Fe.xJ)(t,i,s.parentId)){const n=(0,ge.getNodeIndex)(t,i.id),o=(0,ge.getNodeParent)(t,i.id);!1!==n&&!1!==o&&s&&e.overIndex&&s.parentId===o.id&&n<e.overIndex&&(s.index=s.index-1)}else s&&!(0,Fe.xJ)(t,i,s.parentId)&&(s=Nk(e.overBottomHalf));if(s&&!(0,Fe.xJ)(t,i,s.parentId)&&Uk(e.overBottomHalf,t)){let n=!1;if(e.overBottomHalf){const s=(0,ge.getNodeParent)(t,e.overBottomHalf);n=!!s&&s.id}while(n){s=Lk(n,t);const e=(0,ge.getNodeParent)(t,i.id);if(s&&e&&s.parentId===e.id){const e=(0,ge.getNodeIndex)(t,i.id),o=(0,ge.getNodeIndex)(t,n);e<o&&(s.index=s.index-1)}if(s)if(!(0,Fe.xJ)(t,i,s.parentId)&&Uk(n,t)){const e=(0,ge.getNodeParent)(t,n);n=!!e&&e.id}else n=!1;else n=!1}}}else e.overBottomHalf&&Wk(e.overBottomHalf,t)>0&&(s=Nk(e.overBottomHalf));if(!s)return!1;const o=(0,Fe.xJ)(t,i,s.parentId);return!!o&&s}function Bk(e,t){const n=(0,ge.getNodeIndex)(t,e),s=(0,ge.getNodeParent)(t,e);return!1!==n&&!1!==s&&{parentId:s.id,index:n}}function Lk(e,t){const n=(0,ge.getNodeIndex)(t,e),s=(0,ge.getNodeParent)(t,e);return!1!==n&&!1!==s&&{parentId:s.id,index:n+1}}function Nk(e){return{parentId:e,index:0}}function Fk(e,t){const n=Wk(e,t);return!1!==n&&{parentId:e,index:n}}function Rk(e,t){const n=(0,ge.getNodeParent)(t,e);return!!n&&Lk(n.id,t)}function Vk(e,t){const n=$k(e,t);return!!n&&Fk(n,t)}function $k(e,t){const n=(0,ge.getNodeIndex)(t,e),s=(0,ge.getNodeParent)(t,e);return!1!==n&&!1!==s&&(!(n<1)&&s.children[n-1].id)}function Wk(e,t){const n=(0,ge.findNode)(t,e);return!!n&&n.children.length}function Uk(e,t){const n=(0,ge.getNodeIndex)(t,e),s=(0,ge.getNodeParent)(t,e);if(!1===n||!1===s)return;const i=Wk(s.id,t);return i?1===i||n===i-1:void 0}function zk(e,t){const n=(0,ge.getNodeIndex)(t,e);if(!1!==n)return n>0}var Hk=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Dropdown",{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("IconButton",e._g({class:"breakdance"===e.builderMode?" breakdance-panel-header-left-of-close-button":"breakdance-panel-icon-button",attrs:{size:"breakdance"===e.builderMode?16:12,small:"",icon:"breakdance"===e.builderMode?"EllipsisStrokeIcon":"EllipsisSolidIcon"}},n))]}}])},[t(Ec.Z,[t(Tc.Z,{attrs:{dense:""},on:{click:e.copy}},[t(Dc.V9,[e._v(" "+e._s(e.__("Copy All Elements"))+" ")])],1),t(Tc.Z,{attrs:{dense:""},on:{click:e.paste}},[t(Dc.V9,[e._v(" "+e._s(e.__("Paste Elements"))+" ")])],1)],1)],1)},Gk=[];let Kk=class extends l.w3{copy(){(0,Wo.wp)(c.documentStore.document.tree.root.children.map((e=>e.id)))}get builderMode(){return c.configStore.builderMode}async paste(){const e=(await(0,Wo.ij)())?.element;Array.isArray(e)?(0,Qa.AE)(e,"pasting"):e?(0,Wo.HR)(null,e):alert("nothing to paste")}};Kk=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z,Dropdown:Oc.Z}})],Kk);const jk=Kk,qk=jk;var Xk=(0,N.Z)(qk,Hk,Gk,!1,null,null,null);const Yk=Xk.exports;let Qk=class extends l.w3{constructor(){super(...arguments),this.mouseDragStatus={...kk()},this.forceGrabbingCursor=!1,this.firstDragMovement=!0,this.draggedNodeId=!1,this.lastSubmittedDrag=!1,this.didMoveElement=!1,this.unsubscribeFromActivateElementMutation=null,this.easyEvent=new Z.hF,this.delayedExpandNodeTimeout=null,this.toggleStage=2}close(){(0,Bu.TO)("structure")}get classList(){return{"structure-panel-content-wrapper":!0,"is-draggable":this.hasPermission,"drag-in-progress":c.uiStore.isCanvasElementBeingDragged,"force-grabbing-cursor":this.forceGrabbingCursor}}beforeCreate(){this.$options.components.ChildStructureNodes=n(71600).Z}get activeElementId(){return c.uiStore.activeElementId}get builderMode(){return c.configStore.builderMode}get children(){if(c.uiStore.inlineEditingContext?.elementId){const e=(0,ge.findNode)(c.documentStore.document.tree,c.uiStore.inlineEditingContext.elementId);return e?.children||[]}return this.rootElement.children}mounted(){this.expandToShowActiveElementWatch(),this.unsubscribeFromActivateElementMutation=this.$store.subscribe((({type:e})=>{"ui/activateElementMutation"===e&&this.expandToShowActiveElementWatch()}))}expandToShowActiveElementWatch(){if(this.activeElementId){const e=(0,Ok.FM)(c.documentStore.document.tree,this.activeElementId);e&&c.uiStore.setStructurePanelNodesExpandedState({...c.uiStore.structurePanelNodesExpandedState,...e}),this.$nextTick((()=>{if(!this.$el||!this.panelHeader)return;const e=this.$el.querySelector(`[data-element-id="${this.activeElementId}"] .structure-node-title-wrapper`);e&&(0,Bu.aQ)(this.$el,this.panelHeader.$el,e)}))}}get rootElement(){return c.documentStore.document.tree.root}get hasPermission(){return c.uiStore.hasFullAccess}onContextMenu(e){if(!this.hasPermission)return;e.preventDefault(),e.stopPropagation();const t=Ek(e.clientX,e.clientY)||void 0;t&&c.uiStore.activateElement(t);const n=(0,ze.n)(e.clientX,e.clientY);c.uiStore.setOnStructurePanelRightClickMenuState({elementId:t,position:n})}dragStart(e){if(0!==e.button)return;if(!this.hasPermission)return;const t=Ek(e.clientX,e.clientY);t&&(c.uiStore.activateElement(t),this.draggedNodeId=t,this.easyEvent.on("mousemove",this.dragging),this.easyEvent.on("mouseup",this.dragEnd),this.forceGrabbingCursor=!0,this.didMoveElement=!1,Ie.n.startTransaction())}async dragging(e){if((0,Z.Pm)(e))return;if(e.preventDefault(),e.stopPropagation(),!this.draggedNodeId)return;let t=null;if(c.uiStore.setDragMousePosition(null),this.firstDragMovement){const e=(0,ge.getNodeIndex)(c.documentStore.document.tree,this.draggedNodeId),n=(0,ge.getNodeParent)(c.documentStore.document.tree,this.draggedNodeId);if(!1===e||!1===n)return;c.uiStore.setCanvasElementDraggedId(this.draggedNodeId),t={draggedElementId:this.draggedNodeId,droppedOnElementId:n.id,index:e},this.firstDragMovement=!1}else{this.mouseDragStatus=Zk(e.clientX,e.clientY,c.documentStore.document.tree),this.ifMouseIsOverACollapsedNodeForLongEnoughThenWeShouldExpandIt(e);const n=Mk(this.mouseDragStatus,c.documentStore.document.tree,this.draggedNodeId);n&&(t={draggedElementId:this.draggedNodeId,droppedOnElementId:n.parentId,index:n.index})}if(t){const e=(0,ge.findNode)(c.documentStore.document.tree,t.droppedOnElementId),n=(0,Ok.sF)(t.droppedOnElementId)||0===e?.children.length;if(n){const e=await c.documentStore.moveElement({...t,wrapWithTransaction:!1});this.didMoveElement=this.didMoveElement||e,c.uiStore.setStructurePanelNodesExpandedState({...c.uiStore.structurePanelNodesExpandedState,[t.droppedOnElementId.toString()]:!0}),this.lastSubmittedDrag=t}}}async dragEnd(e){if(e.preventDefault(),e.stopPropagation(),this.easyEvent.removeAll(),this.lastSubmittedDrag){const e=await c.documentStore.moveElement({...this.lastSubmittedDrag,wrapWithTransaction:!1});this.didMoveElement=this.didMoveElement||e}if(!1!==this.draggedNodeId&&this.didMoveElement){const e=(0,ge.findNode)(c.documentStore.document.tree,this.draggedNodeId);Ie.n.endTransaction(`Move ${(0,ie.JC)(e?.data.type)}`)}else Ie.n.cancelTransactionIfItIsStillInProgress();c.uiStore.endCanvasElementDrag(),this.lastSubmittedDrag=!1,this.mouseDragStatus={...kk()},this.firstDragMovement=!0,this.draggedNodeId=!1,this.forceGrabbingCursor=!1,this.didMoveElement=!1}ifMouseIsOverACollapsedNodeForLongEnoughThenWeShouldExpandIt(e){this.mouseDragStatus.overNodeId&&this.delayedExpandNode(this.mouseDragStatus.overNodeId,e)}delayedExpandNode(e,t){this.delayedExpandNodeTimeout&&clearTimeout(this.delayedExpandNodeTimeout),this.delayedExpandNodeTimeout=setTimeout((()=>{if(this.delayedExpandNodeTimeout=null,e===this.mouseDragStatus.overNodeId){const n=(0,wd.Z)(c.uiStore.structurePanelNodesExpandedState);n[e]=!0,c.uiStore.setStructurePanelNodesExpandedState(n),this.dragging(t)}}),500)}get ROOT_ELEMENT_ID(){return ge.ROOT_ELEMENT_ID}collapseAllNodes(){c.uiStore.setStructurePanelNodesExpandedState((0,Ok.u3)(c.documentStore.document.tree,!1))}expandAllNodes(){c.uiStore.setStructurePanelNodesExpandedState((0,Ok.u3)(c.documentStore.document.tree,!0))}collapseAllNodesExcept(e){const t=(0,Ok.u3)(c.documentStore.document.tree,!1),n=(0,Ok.FM)(c.documentStore.document.tree,e);c.uiStore.setStructurePanelNodesExpandedState({...t,...n})}toggleNodes(){if(0===this.toggleStage)this.toggleStage=1,this.collapseAllNodes();else if(1===this.toggleStage)this.expandAllNodes(),this.toggleStage=2;else if(c.uiStore.activeElementId){const e=(0,ge.getNodeParent)(c.documentStore.document.tree,c.uiStore.activeElementId);if(e&&e?.id===ge.ROOT_ELEMENT_ID)return this.collapseAllNodes(),void(this.toggleStage=1);this.collapseAllNodesExcept(c.uiStore.activeElementId),this.toggleStage=0}else this.collapseAllNodes(),this.toggleStage=1}beforeDestroy(){this.unsubscribeFromActivateElementMutation&&this.unsubscribeFromActivateElementMutation()}toggleAdd(){(0,Bu._y)("add")}};(0,r.gn)([(0,l.Rl)()],Qk.prototype,"panelHeader",void 0),Qk=(0,r.gn)([(0,l.wA)({components:{RightClickMenu:La,PanelHeader:uI,StandardButton:Fl,IconButton:Xa.Z,Dropdown:Oc.Z,StructurePanelDropdownMenu:Yk}})],Qk);const Jk=Qk,eE=Jk;var tE=(0,N.Z)(eE,Ik,Pk,!1,null,null,null);const nE=tE.exports;var sE=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-history-and-revisions-panel vscroll-wrap vscroll-scroll"},[t("PanelHeader",{ref:"panelHeader",staticClass:"breakdance-history-and-revisions-panel__header",on:{close:e.close}},[e._v(" "+e._s(e.__("History"))+" ")]),e.disableRevisions?e._e():t("TabsRow",[t("Tab",{attrs:{value:e.tab,id:"history"},on:{input:function(t){e.tab=t}}},[e._v(e._s(e.__("History")))]),t("Tab",{attrs:{value:e.tab,id:"revisions"},on:{input:function(t){e.tab=t}}},[e._v(e._s(e.__("Revisions")))])],1),"history"===e.tab?t("History",{on:{scrollToActiveEl:e.scrollToActiveElement}}):"revisions"===e.tab?t("Revisions"):e._e()],1)},iE=[],oE=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"snapshots-list"},e._l(e.snapshots,(function(n,s){return t("SnapshotItem",{key:e.snapshots.length-1-s,attrs:{"data-snapshot-index":e.snapshots.length-1-s,snapshot:n,selected:e.currentIndex===e.snapshots.length-1-s},on:{click:function(t){return e.onSnapshotSelected(e.snapshots.length-1-s)}}})})),1)},aE=[],rE=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"snapshots-item",class:{"snapshots-item--selected":e.selected},attrs:{"data-test-id":"snapshots-item"},on:{click:function(t){return e.$emit("click",e.snapshot)}}},[t("span",{staticClass:"snapshots-item__title"},[e._v(e._s(e.snapshot.title))])])},lE=[];let cE=class extends l.w3{};(0,r.gn)([(0,l.fI)({default(){return{}}})],cE.prototype,"snapshot",void 0),(0,r.gn)([(0,l.fI)({default:!1})],cE.prototype,"selected",void 0),cE=(0,r.gn)([(0,l.wA)({})],cE);const dE=cE,uE=dE;var pE=(0,N.Z)(uE,rE,lE,!1,null,null,null);const hE=pE.exports;let gE=class extends l.w3{onSnapshotSelected(e){Q.GD.setCurrentSnapshotIndex(e),Ie.n.setStoreFromCurrentSnapshot()}close(){(0,Bu.TO)("history")}get snapshots(){return[...Q.GD.snapshots].reverse()}get currentIndex(){return Q.GD.index}handleCurrentIndexChange(){this.scrollToActiveSnapshotElement()}scrollToActiveSnapshotElement(){l.w3.nextTick((()=>{const e=this.$el.querySelector(`[data-snapshot-index="${this.currentIndex}"]`);e&&this.$emit("scrollToActiveEl",e)}))}};(0,r.gn)([(0,l.RL)("currentIndex",{immediate:!0})],gE.prototype,"handleCurrentIndexChange",null),gE=(0,r.gn)([(0,l.wA)({components:{PanelHeader:uI,SnapshotItem:hE}})],gE);const mE=gE,vE=mE;var yE=(0,N.Z)(vE,oE,aE,!1,null,null,null);const fE=yE.exports;var _E=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"revisions-panel"},[t("RevisionsList",{attrs:{"is-loading":e.loading,revisions:e.revisionUiItems,"revisions-not-supported-message":e.revisionsNotSupportedMessage},on:{revisionSelected:e.onRevisionSelected}})],1)},bE=[];let SE=class extends s.ZP{constructor(){super(...arguments),this.loading=!1,this.selectedRevisionIndex=0,this.unsubscribeFromStore=()=>{},this.revisionsNotSupportedMessage=null}get revisionUiItems(){return this.revisions.map(((e,t)=>({revisionData:e,isSelected:this.selectedRevisionIndex===t})))}async mounted(){this.loading=!0;const e=await this.fetchRemoteRevisions();this.loading=!1,e&&(Q.kD.setRevisionsData({revisions:e,currentUnsavedRevision:this.getCurrentUnsavedRevision(e)}),this.setActiveRevision(),this.unsubscribeFromStore=this.$store.subscribe((e=>{const t=(0,lP.q$)(e);"document"===t&&"document/loadRevision"!==e.type&&(Q.kD.setRevisionsData({revisions:Q.kD.revisionsData.revisions,currentUnsavedRevision:this.getCurrentUnsavedRevision(Q.kD.revisionsData.revisions)}),this.setActiveRevision())})))}destroyed(){this.unsubscribeFromStore()}get revisions(){return Q.kD.revisionsData.currentUnsavedRevision?[Q.kD.revisionsData.currentUnsavedRevision,...Q.kD.revisionsData.revisions]:Q.kD.revisionsData.revisions}get currentTree(){return(0,ge.exportTree)(Q.Hb.document.tree)}get unsavedChangesPresent(){return Q.kD.unsavedChangesPresent}async updateRevisionsAfterSaving(){if(!Q.kD.unsavedChangesPresent){const e=await this.fetchRemoteRevisions();e&&Q.kD.setRevisionsData({revisions:e,currentUnsavedRevision:null}),this.setActiveRevision()}}setActiveRevision(){const e=this.getActiveRevisionIndex(Q.kD.revisionsData.revisions);-1!==e?(this.selectedRevisionIndex=Q.kD.revisionsData.currentUnsavedRevision?e+1:e,this.scrollToActiveRevision("smooth")):(this.selectedRevisionIndex=0,this.scrollToActiveRevision("auto"))}getActiveRevisionIndex(e){return e.findIndex((e=>(0,ge.treesEqual)(e.tree,this.currentTree)))}getCurrentUnsavedRevision(e){const t=this.getActiveRevisionIndex(e);if(-1===t)return{id:-1,author:!1,date:"Current",tree:this.currentTree};const n=0===t&&Q.kD.revisionsData.currentUnsavedRevision&&(0,ge.treesEqual)(e[t].tree,Q.kD.revisionsData.currentUnsavedRevision?.tree);return n?null:Q.kD.revisionsData.currentUnsavedRevision}async fetchRemoteRevisions(){return(0,id.pipe)(await(0,ad.D)({action:"breakdance_retrieve_revisions",decoder:GI.VZ,dataToPost:{id:Q.Hb.document.documentMeta.id}}),(0,od.fold)((e=>((0,th.UE)(e),null)),(e=>"unsupported"in e?(this.revisionsNotSupportedMessage=e.unsupported,null):e.revisions.map((e=>{const t=(0,lw.Z)(e.tree,cw.f2),n=(0,id.pipe)(t,(0,od.fold)((()=>null),(e=>e)));return{...e,tree:n}})).filter((e=>null!==e.tree)))))}onRevisionSelected(e,t){const n=this.revisions.find((t=>t.id===e.revisionData.id));n&&(this.selectedRevisionIndex=t,Q.kD.activateElement(null),Q.kD.setInterfaceState("loading"),Q.Hb.loadRevision(n),Q.kD.setInterfaceState("normal"))}scrollToActiveRevision(e){(0,A.forceNextTick)((()=>document.querySelector(".revisions-panel .revisions-item--selected")?.scrollIntoView({behavior:e,block:"center"})))}};(0,r.gn)([(0,l.RL)("unsavedChangesPresent")],SE.prototype,"updateRevisionsAfterSaving",null),SE=(0,r.gn)([(0,l.wA)({components:{RevisionsList:rP,RevisionItem:nP,PanelHeader:uI}})],SE);const CE=SE,xE=CE;var wE=(0,N.Z)(xE,_E,bE,!1,null,null,null);const IE=wE.exports;let PE=class extends s.ZP{constructor(){super(...arguments),this.tab="history"}close(){(0,Bu.TO)("history")}scrollToActiveElement(e){(0,Bu.aQ)(this.$el,this.panelHeader.$el,e)}};(0,r.gn)([(0,l.fI)({default:!1})],PE.prototype,"disableRevisions",void 0),(0,r.gn)([(0,l.Rl)()],PE.prototype,"panelHeader",void 0),PE=(0,r.gn)([(0,l.wA)({components:{Revisions:IE,History:fE,PanelHeader:uI,TabsRow:qC,Tab:WC}})],PE);const kE=PE,EE=kE;var TE=(0,N.Z)(EE,sE,iE,!1,null,null,null);const DE=TE.exports;var AE=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:e.classList},[e._t("default")],2)},ZE=[];let OE=class extends s.ZP{get classList(){if("closed"===this.panelState)return{};const e=Bu.t6.includes(this.panelState);return{"breakdance-panel":!0,width288:!e,width400:e,"vscroll-wrap":!0,borderOnLeft:"right"===this.position,borderOnRight:"left"===this.position,"breakdance-app-left-area":"left"===this.position,"breakdance-app-right-area":"right"===this.position}}get builderMode(){return c.configStore.builderMode}};(0,r.gn)([(0,l.fI)()],OE.prototype,"position",void 0),(0,r.gn)([(0,l.fI)()],OE.prototype,"panelState",void 0),OE=(0,r.gn)([l.wA],OE);const ME=OE,BE=ME;var LE=(0,N.Z)(BE,AE,ZE,!1,null,null,null);const NE=LE.exports;var FE=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-variables-panel vscroll-wrap vscroll-scroll"},[t("PanelHeader",{on:{close:e.close},scopedSlots:e._u([{key:"right",fn:function(){return[t("IconButton",{attrs:{icon:"FolderPlusIcon",size:"14",small:"",tooltip:e.__("Add Collection")},on:{click:e.addCollection}}),t("IconButton",{attrs:{icon:"HistorySolidIcon",size:"13",small:"",active:"history"===e.viewMode,tooltip:e.__("History")},on:{click:e.toggleViewMode}}),t("ImportExportDropdownMenu",{attrs:{name:e.__("Variables"),"settings-to-export":e.settingsToExport,"validate-settings":e.validateImport,"import-settings":e.importVariables,"can-merge":!0}})]},proxy:!0}])},[e._v(" "+e._s(e.__("Variables"))+" ")]),e.isLoadingData?t(MI.Z,{attrs:{row:"","justify-center":"","align-center":""}},[t(Xp.Z,{attrs:{size:"64",indeterminate:"",color:"var(--gray300)"}})],1):["controls"===e.viewMode?t("ManageVariables"):e._e(),"history"===e.viewMode?t("VariablesHistory"):e._e()],t("PanelMask")],2)},RE=[],VE=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"global-variables"},[t("CollectionsInput",{attrs:{collections:e.collections,"resource-name":"variables",value:e.value},on:{"update-collections":e.setCollections,input:e.setVariables},scopedSlots:e._u([{key:"default",fn:function({collection:n}){return[t("InlineRepeater",{staticClass:"oxy-collection__repeater",attrs:{value:e.variablesByCollection[n],control:e.collectionControls[n],"data-key":"id",group:"oxy-variables"},on:{input:function(t){return e.handleDrag(t,n)}},scopedSlots:e._u([{key:"default",fn:function({value:n}){return[t("VariableRepeaterItem",{key:n.id,attrs:{variable:n},on:{input:e.setVariable}})]}}],null,!0)})]}}])})],1)},$E=[],WE=n(90889),UE=n(55645),zE=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-collections"},[t("draggable",e._b({attrs:{value:e.collections},on:{input:e.handleDrag}},"draggable",e.dragOptions,!1),e._l(e.collections,(function(n,s){return t("div",{staticClass:"oxy-collection"},[t("header",{staticClass:"oxy-collection-header"},[t("Icon",{staticClass:"oxy-collection-header__icon",attrs:{icon:e.isToggled(n)?"ChevronRightIcon":"ChevronDownIcon",size:12},on:{click:function(t){return e.toggleCollection(n)}}}),t("div",{staticClass:"oxy-collection-header__title"},[t("input",{staticClass:"oxy-collection__title",attrs:{contenteditable:"true",placeholder:e.__("Enter a name")},domProps:{value:n},on:{input:function(t){return e.setCollectionName(t,s)},keypress:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;t.preventDefault()}}}),t("Icon",{attrs:{icon:"PenSolidIcon",size:10}})],1),t("div",{staticClass:"oxy-collection__actions"},[e._t("actions",null,{collection:n}),t("IconButton",{attrs:{icon:"DownloadSolidIcon",size:"12",tooltip:e.__("Download")},on:{click:function(t){return e.exportCollection(n)}}}),t("IconButton",{attrs:{icon:"TrashSolidIcon",size:"12",tooltip:e.__("Delete")},on:{click:function(t){return e.deleteCollection(n)}}}),t("IconButton",{staticClass:"oxy-collection__handle",attrs:{size:"12",icon:"GripDotsVerticalIcon",tooltip:e.__("Drag to reorder")}})],2)],1),e.isToggled(n)?e._e():e._t("default",null,{collection:n})],2)})),0),t("div",{staticClass:"oxy-collection-empty-state",on:{click:e.addCollection}},[t("Icon",{attrs:{icon:"FolderPlusIcon",size:"13"}}),t("span",[e._v(e._s(e.__("Add new collection")))])],1)],1)},HE=[];let GE=class extends l.w3{constructor(){super(...arguments),this.toggledCollections=[],this.dragOptions={animation:200,handle:".oxy-collection__handle",ghostClass:"breakdance-inline-repeater-item--ghost",forceFallback:!0}}isToggled(e){return this.toggledCollections.includes(e)}toggleCollection(e){this.toggledCollections.includes(e)?this.toggledCollections=this.toggledCollections.filter((t=>t!==e)):this.toggledCollections.push(e)}handleDrag(e){const t=(0,wd.Z)(this.value).sort(((t,n)=>{const s=e.indexOf(t.collection),i=e.indexOf(n.collection);return s===i?0:s-i}));this.$emit("update-collections",e),this.$emit("input",t)}setCollectionName(e,t){const n=e.target,s=n.value,i=this.collections[t],o=this.collections;o[t]=s;const a=this.value.map((e=>(e.collection===i&&(e.collection=s),e)));this.$emit("update-collections",o),this.$emit("input",a)}deleteCollection(e){const t=confirm((0,Ft.gB)((0,Ft.TZ)('Are you sure you want to delete the collection "%s"?',"%s: Collection name"),e));if(!t)return;const n=this.value.filter((t=>t.collection!==e)),s=this.collections.filter((t=>t!==e));this.$emit("update-collections",s),this.$emit("input",n)}exportCollection(e){const t=this.value.filter((t=>t.collection===e)),n=(0,Wg.g)(t),s=Qf()(e,{lower:!0});fP(n||"",`${s}-${this.resourceName}.json`)}addCollection(){const e=tl.hI,t=this.collections;let n=1;while(t.includes(`${e} ${n}`))n++;const s=`${e} ${n}`;this.$emit("update-collections",[...t,s])}};(0,r.gn)([(0,l.fI)()],GE.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],GE.prototype,"collections",void 0),(0,r.gn)([(0,l.fI)()],GE.prototype,"resourceName",void 0),GE=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,draggable:ev(),VariableRepeaterItem:UE.Z,IconButton:Xa.Z}})],GE);const KE=GE,jE=KE;var qE=(0,N.Z)(jE,zE,HE,!1,null,null,null);const XE=qE.exports;let YE=class extends s.ZP{onValueChange(){this.checkMissingCollections()}get collections(){return Q.cr.variablesCollections}get labels(){return this.value.map((e=>e.label))}get control(){return{options:{repeaterOptions:{buttonName:(0,Ft.__)("Add Variable"),templates:(0,WE.jI)(this.labels),autofocusOnAdd:!0,autofocusIndex:1}}}}checkMissingCollections(){const e=[...new Set(this.value.map((e=>e.collection)))],t=e.filter((e=>!this.collections.includes(e)));t.length&&Q.cr.setVariablesCollections(e)}beforeCreate(){this.$options.components.InlineRepeater=n(99926).Z}get collectionControls(){const e={};return this.collections.forEach((t=>{const n=(0,WE.jI)(this.labels,t);e[t]={...this.control,options:{...this.control.options,repeaterOptions:{...this.control.options?.repeaterOptions,templates:n}}}})),e}get variablesByCollection(){const e={};return this.collections.forEach((t=>{e[t]=this.value.filter((e=>e.collection===t))})),e}setVariable(e){const t=(0,wd.Z)(this.value),n=t.findIndex((t=>t.id===e.id));-1!==n&&(t[n]=e),this.setVariables(t)}setVariables(e){this.$emit("input",e)}handleDrag(e,t){this.variablesByCollection[t]=e.map((e=>({...e,collection:t})));const n=[];this.collections.forEach((e=>{n.push(...this.variablesByCollection[e])})),this.setVariables(n)}setCollections(e){Ie.n.transaction((()=>{Q.cr.setVariablesCollections(e)}),"Set Variable Collections")}};(0,r.gn)([(0,l.fI)({default(){return[]}})],YE.prototype,"value",void 0),(0,r.gn)([(0,l.RL)("value",{immediate:!0,deep:!0})],YE.prototype,"onValueChange",null),YE=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,IconButton:Xa.Z,draggable:ev(),CollectionsInput:XE,VariableRepeaterItem:UE.Z}})],YE);const QE=YE,JE=QE;var eT=(0,N.Z)(JE,VE,$E,!1,null,null,null);const tT=eT.exports;var nT=n(41836),sT=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-variables-panel-content"},[t("GlobalVariablesInput",{attrs:{value:e.variables},on:{input:e.updateVariables}})],1)},iT=[];let oT=class extends l.w3{get variables(){return Q.cr.variables||[]}updateVariables(e){Ie.n.transaction((()=>{Q.cr.setVariables(e)}),"Update Variables")}};oT=(0,r.gn)([(0,l.wA)({components:{GlobalVariablesInput:tT,Icon:He.Z}})],oT);const aT=oT,rT=aT;var lT=(0,N.Z)(rT,sT,iT,!1,null,null,null);const cT=lT.exports;var dT=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("RevisionsPanel",{attrs:{resources:e.variables,"resource-key":e.resourceKey,"resource-has-unsaved-changes-present":e.hasUnsavedChangesPresent,"fetch-revisions-method":e.fetchRevisionsMethod,"update-method":"setVariables","restore-method":"restoreVariablesRevision"}})},uT=[];let pT=class extends s.ZP{constructor(){super(...arguments),this.resourceKey="variables"}get variables(){return Q.cr.variables}get hasUnsavedChangesPresent(){return Q.cr.variablesHasUnsavedChangesPresent}get fetchRevisionsMethod(){return nT.u7}};pT=(0,r.gn)([(0,l.wA)({components:{RevisionsPanel:YP,RevisionsList:rP}})],pT);const hT=pT,gT=hT;var mT=(0,N.Z)(gT,dT,uT,!1,null,null,null);const vT=mT.exports;var yT=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.showMask?t("span",{staticClass:"oxy-panel-mask",on:{click:e.closeMask}}):e._e()},fT=[];let _T=class extends l.w3{get showMask(){return c.uiStore.panelState.oxyPanelIsMasked}closeMask(){c.uiStore.setPanelState({...c.uiStore.panelState,oxyPanelIsMasked:!1})}};_T=(0,r.gn)([(0,l.wA)({})],_T);const bT=_T,ST=bT;var CT=(0,N.Z)(ST,yT,fT,!1,null,"1dcc87c2",null);const xT=CT.exports;function wT(e,t,n="cssVariableName",s=!0){const i=t.map((e=>e[n])),o=e.filter((e=>!i.includes(e[n]))),a=t.map((t=>{const i=e.find((e=>e[n]===t[n]));return i&&s&&(t.id=i.id),t}));return{variablesToKeep:o,variables:[...o,...a]}}let IT=class extends s.ZP{constructor(){super(...arguments),this.isLoadingData=!1,this.isStoringData=!1}get settingsToExport(){return c.globalStore.variables}get viewMode(){return c.uiStore.panelState.variablesPanelPanelActiveViewMode}async beforeMount(){c.uiStore.panelState.shouldLoadFreshDataIntoStoreOnceOpened.variables?await this.load():c.uiStore.setShouldPanelLoadFreshDataIntoStoreOnceOpened("variables",!0)}toggleViewMode(){c.uiStore.setPanelState({...c.uiStore.panelState,variablesPanelPanelActiveViewMode:"controls"===this.viewMode?"history":"controls"})}async load(){this.isLoadingData=!0;const e=await(0,nT.Ap)();return this.isLoadingData=!1,e}async save(){this.isStoringData=!0;const e=await(0,nT.$Q)();return this.isStoringData=!1,e}requestPanelClosingConfirmation(){c.uiStore.requestClosingConfirmation({subject:"variables",confirmationDefinition:{title:(0,Ft.__)("You have unsaved changes to your Variables."),text:(0,Ft.__)("Would you like to save or discard these changes?"),type:"info"}})}get unsavedChangesPresent(){return c.globalStore.variablesHasUnsavedChangesPresent}handleUnsavedChangesPresentChange(e){e?this.requestPanelClosingConfirmation():c.uiStore.noClosingConfirmationIsNeededFor("variables")}get confirmationChosenOption(){return c.uiStore.closingConfirmations.variables?.chosenOption}async handleConfirmationChosenOptionChange(e){"discard"===e?(c.uiStore.setClosingConfirmationIsDiscarding({subject:"variables",isDiscarding:!0}),await this.load()?this.close():this.requestPanelClosingConfirmation()):"save"===e&&(c.uiStore.setClosingConfirmationIsSaving({subject:"variables",isSaving:!0}),await this.save()?this.close():this.requestPanelClosingConfirmation())}get isLoading(){return this.isLoadingData||this.isStoringData}close(){(0,Bu.TO)("variables")}addCollection(){"history"==this.viewMode&&this.toggleViewMode();const e=tl.hI,t=c.globalStore.variablesCollections;let n=1;while(t.includes(`${e} ${n}`))n++;const s=`${e} ${n}`;c.globalStore.setVariablesCollections([...t,s])}validateImport(e){return Array.isArray(e)?(0,su.zG)(e,Tw.eh.decode,(0,ou.g_)((()=>(cd.Z.log.errorMessage((0,Ft.__)("Error importing Variables - the file is invalid.")),!1)),(()=>!0))):(cd.Z.log.errorMessage((0,Ft.__)("Error importing Variables - the file is invalid or empty.")),!1)}importVariables(e,t){Array.isArray(e)?Ie.n.transaction((()=>{if("replace"===t)c.globalStore.setVariables(e);else{const{variablesToKeep:t,variables:n}=wT(c.globalStore.variables,e);c.globalStore.setVariables(n),cd.Z.log.message((0,Ft.gB)((0,Ft.__)("%s variables imported. %s existing variables were kept."),e.length,t.length))}}),"Import Variables"):cd.Z.log.errorMessage((0,Ft.__)("No Variables to import."))}};(0,r.gn)([(0,l.RL)("unsavedChangesPresent",{immediate:!0})],IT.prototype,"handleUnsavedChangesPresentChange",null),(0,r.gn)([(0,l.RL)("confirmationChosenOption",{immediate:!0})],IT.prototype,"handleConfirmationChosenOptionChange",null),IT=(0,r.gn)([(0,l.wA)({components:{ImportExportDropdownMenu:xP,PanelMask:xT,IconButton:Xa.Z,Tab:WC,TabsRow:qC,PanelHeader:uI,SearchInput:eu.Z,ManageVariables:cT,VariablesHistory:vT,PanelHeaderButton:EI,GlobalVariablesInput:tT}})],IT);const PT=IT,kT=PT;var ET=(0,N.Z)(kT,FE,RE,!1,null,null,null);const TT=ET.exports;var DT=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vscroll-wrap vscroll-scroll presets-panel"},[e.isLoadingData?t(MI.Z,{attrs:{row:"","justify-center":"","align-center":""}},[t(Xp.Z,{attrs:{size:"64",indeterminate:"",color:"var(--gray300)"}})],1):e.activePreset?t("EditPreset",{on:{close:e.close}}):e.activePreset?e._e():t("ManagePresets",{on:{close:e.close}})],1)},AT=[],ZT=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vscroll-wrap vscroll-scroll"},[t("PanelHeader",{on:{close:function(t){return e.$emit("close")}}},[e._v(" "+e._s(e.__("Design Presets"))+" "),t("PanelHeaderButton",{attrs:{enabled:"history"===e.viewMode},on:{click:e.toggleViewMode}},[e._v(" "+e._s(e.__("history"))+" ")])],1),t("FreeModeAlertForPresets",{staticClass:"ma-4"}),"controls"===e.viewMode?[e.isAddPresetEnabled?t("AddPreset"):e._e(),e.isImportExportEnabled?t("ImportExportPresets"):e._e(),t("div",{staticClass:"vscroll-wrap vscroll-scroll breakdance-manage-presets"},[t("PresetsList",{attrs:{presets:e.presets,searchable:!0},on:{input:e.updatePresets}})],1)]:"history"===e.viewMode?[t("PresetsPanelHistoryViewMode")]:e._e()],2)},OT=[],MT=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vscroll-wrap vscroll-scroll"},[t("div",{staticClass:"vscroll-scroll presets-list"},[e.presets.length?e._l(e.presetsByElement,(function(n,s){return t("div",{key:s,staticClass:"presets-list-group breakdance-repeater-draggable"},[t("h4",{staticClass:"presets-list-title"},[e._v(e._s(e.getElementName(s)))]),e._l(n,(function(n,s){return t("div",{key:s,staticClass:"breakdance-repeater-item"},[t("RepeaterItemAccordion",{attrs:{"can-edit":!0,"can-drag":!1,"no-duplicate":!0},on:{"title:click":function(t){return e.editPreset(n)},"edit-item":function(t){return e.editPreset(n)},"delete-item":function(t){return e.deletePreset(n)}},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticClass:"breakdance-repeater-item-title-text"},[e._v(" "+e._s(n.name)+" ")])]},proxy:!0}],null,!0)})],1)}))],2)})):t("p",{staticClass:"manage-presets"},[e._v(e._s(e.__("You don't have any presets yet.")))])],2),e.searchable?t("div",{staticClass:"properties-panel-search-box-wrap properties-panel-search-box-wrap-presets"},[t("Icon",{staticClass:"properties-panel-search-icon",attrs:{icon:"SearchIcon",size:"13"}}),t("TextInput",{attrs:{placeholder:e.__("Search")},model:{value:e.searchString,callback:function(t){e.searchString=t},expression:"searchString"}})],1):e._e()])},BT=[],LT=n(11656);let NT=class extends s.ZP{constructor(){super(...arguments),this.dragOptions={animation:200,handle:".breakdance-repeater-item-handler",filter:".breakdance-repeater-item--ignore-drag",ghostClass:"breakdance-repeater-item--ghost",forceFallback:!0},this.searchString=""}get presetsByElement(){const e={};return this.filteredPresets.forEach((t=>{e[t.availableForType]||(e[t.availableForType]=[]),e[t.availableForType].push(t)})),Object.keys(e).forEach((t=>{e[t].sort(((e,t)=>e.name<t.name?-1:t.name<e.name?1:0))})),e}get filteredPresets(){if(this.searchString){const e=this.searchString?.toLowerCase()??"";return this.presets.filter((t=>t.name.toLowerCase().includes(e)))}return this.presets}deletePreset(e){const t=this.presets.findIndex((t=>t.id===e.id)),n=(0,wd.Z)(this.presets);n.splice(t,1),this.$emit("input",n)}handleDrag(e){this.$emit("input",(0,wd.Z)(e))}editPreset(e){c.uiStore.setActivePresetId(e.id),(0,Bu.oM)("presets")}getElementName(e){return c.configStore.element(e).name}};(0,r.gn)([(0,l.fI)()],NT.prototype,"searchable",void 0),(0,r.gn)([(0,l.fI)()],NT.prototype,"presets",void 0),NT=(0,r.gn)([(0,l.wA)({components:{RepeaterItemAccordion:LT.Z,draggable:ev(),TextInput:na.Z,Icon:He.Z}})],NT);const FT=NT,RT=FT;var VT=(0,N.Z)(RT,MT,BT,!1,null,null,null);const $T=VT.exports;var WT=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"add-preset"},[t("TextInput",{attrs:{placeholder:e.__("Name")},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.addPreset.apply(null,arguments)}},model:{value:e.newPresetName,callback:function(t){e.newPresetName=t},expression:"newPresetName"}}),t(Wm.Z,{staticClass:"breakdance-dense-select breakdance-white-gray-outlined-input",attrs:{placeholder:e.__("Element"),items:e.elementsItems,dense:"",solo:"",flat:"",filled:"","hide-details":"","no-data-text":e.__("No presets available")},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.addPreset.apply(null,arguments)}},model:{value:e.newPresetType,callback:function(t){e.newPresetType=t},expression:"newPresetType"}}),t("NiceButton",{attrs:{size:"small"},on:{click:e.addPreset}},[e._v(e._s(e.__("Add")))])],1)},UT=[];let zT=class extends s.ZP{constructor(){super(...arguments),this.newPresetName="",this.newPresetType=""}get elements(){return c.configStore.elements}get elementsItems(){return Object.values(this.elements).filter((e=>void 0!==e)).filter((e=>!(0,qe.GF)(e.addPanelRules,e.settings))).map((e=>({text:e.name,value:e?.slug})))}addPreset(){if(!this.newPresetName||!this.newPresetType)return;const e=(0,ae.Lr)(this.newPresetName,this.newPresetType);(0,ae.xk)(e),this.newPresetName="",this.newPresetType=""}};zT=(0,r.gn)([(0,l.wA)({components:{DropdownInput:Cd.Z,NiceButton:Br.Z,TextInput:na.Z}})],zT);const HT=zT,GT=HT;var KT=(0,N.Z)(GT,WT,UT,!1,null,null,null);const jT=KT.exports;var qT=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("RevisionsPanel",{attrs:{resources:e.presets,"resource-key":e.resourceKey,"resource-has-unsaved-changes-present":e.hasUnsavedChangesPresent,"fetch-revisions-method":e.fetchRevisionsMethod,"update-method":"setPresets","restore-method":"restorePresetsRevision"}})},XT=[];async function YT(){return(0,su.zG)(await(0,ad.D)({action:"breakdance_retrieve_presets_revisions",decoder:GI.hl}),(0,od.mapLeft)((()=>null)),ou.i$)}let QT=class extends s.ZP{constructor(){super(...arguments),this.resourceKey="presets"}get presets(){return Q.cr.presets}get hasUnsavedChangesPresent(){return Q.cr.presetsHasUnsavedChangesPresent}get fetchRevisionsMethod(){return YT}};QT=(0,r.gn)([(0,l.wA)({components:{RevisionsPanel:YP,RevisionsList:rP}})],QT);const JT=QT,eD=JT;var tD=(0,N.Z)(eD,qT,XT,!1,null,null,null);const nD=tD.exports;var sD=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"manage-presets-import-export"},[t("div",[t("NiceButton",{attrs:{"left-icon":"UploadFileIcon",expanded:!0},on:{click:e.openFileUpload}},[e._v(" "+e._s(e.__("Import"))+" ")]),t("input",{ref:"fileUpload",staticStyle:{display:"none"},attrs:{type:"file",accept:"application/json"},on:{change:e.importPresets}})],1),t("NiceButton",{attrs:{"left-icon":"DownloadFileIcon",small:"",expanded:!0},on:{click:e.exportPresets}},[e._v(" "+e._s(e.__("Export"))+" ")])],1)},iD=[],oD=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("ProOnlyAlertBox",{attrs:{options:{feature:"presets",content:e.sprintf(e._doc("Design Presets are only available in %s Pro. They won't work on the frontend.","%s: Plugin name"),e.$bdox("plugin_name"))}}})},aD=[];let rD=class extends s.ZP{};rD=(0,r.gn)([(0,l.wA)({components:{ProOnlyAlertBox:Zg.Z}})],rD);const lD=rD,cD=lD;var dD=(0,N.Z)(cD,oD,aD,!1,null,null,null);const uD=dD.exports;let pD=class extends s.ZP{openFileUpload(){const e=this.$refs.fileUpload;e.click()}importPresets(e){const t=e.target,n=t.files&&t.files[0];if(!n)return;const s=new FileReader;s.onload=()=>{const e=s.result,t=(0,id.pipe)((0,lw.Z)(e,Ew.p),(0,od.fold)((()=>null),(e=>e)));if(null===t)return void cd.Z.log.errorMessage((0,Ft.__)("The file you selected is not a valid Presets file."));if(!t.length)return void cd.Z.log.message((0,Ft.__)("The file you selected does not contain any presets."));const n=t.map((e=>e.id)),i=c.globalStore.presets.filter((e=>!n.includes(e.id)));c.globalStore.setPresets([...i,...t])},s.readAsText(n),e.target.value=""}exportPresets(){const e=`breakdance-presets-${(0,fa.z)()}.json`,t=(0,id.pipe)((0,Uh.J)(c.globalStore.presets),(0,od.fold)((()=>""),(e=>e))),n=document.createElement("a"),s=new Blob([t],{type:"application/json"});n.setAttribute("href",window.URL.createObjectURL(s)),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}};pD=(0,r.gn)([(0,l.wA)({components:{FreeModeAlertForPresets:uD,AlertBox:Ag.Z,PresetsPanelHistoryViewMode:nD,PanelHeaderButton:EI,BrowseModeToggle:OI,draggable:ev(),PresetsList:$T,AddPreset:jT,PanelHeader:uI,IconButton:Xa.Z,NiceButton:Br.Z}})],pD);const hD=pD,gD=hD;var mD=(0,N.Z)(gD,sD,iD,!1,null,null,null);const vD=mD.exports;let yD=class extends s.ZP{get viewMode(){return c.uiStore.panelState.presetsPanelActiveViewMode}toggleViewMode(){c.uiStore.setPanelState({...c.uiStore.panelState,presetsPanelActiveViewMode:"controls"===this.viewMode?"history":"controls"})}get presets(){return c.globalStore.presets}get isAddPresetEnabled(){return c.configStore.isExperimentEnabled("design-presets-add")}get isImportExportEnabled(){return c.configStore.isExperimentEnabled("design-presets-import-export")}updatePresets(e){c.globalStore.setPresets((0,wd.Z)(e))}};yD=(0,r.gn)([(0,l.wA)({components:{FreeModeAlertForPresets:uD,AlertBox:Ag.Z,PresetsPanelHistoryViewMode:nD,PanelHeaderButton:EI,BrowseModeToggle:OI,draggable:ev(),PresetsList:$T,AddPreset:jT,PanelHeader:uI,ImportExportPresets:vD}})],yD);const fD=yD,_D=fD;var bD=(0,N.Z)(_D,ZT,OT,!1,null,null,null);const SD=bD.exports;var CD=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.activePreset?t("div",{staticClass:"vscroll-wrap vscroll-scroll"},[t("PanelHeader",{attrs:{backInsteadOfClose:!0},on:{close:e.close}},[e._v(" "+e._s(e.__("Editing Preset"))+" ")]),t("div",{staticClass:"breakdance-preset-content"},[t("div",{staticClass:"breakdance-preset-element-name truncate"},[t("span",{staticClass:"breakdance-preset-element-name__icon"},[e.element?.uiIcon?t("ElementIcon",{attrs:{icon:e.element.uiIcon,size:"14"}}):e._e()],1),t("span",{staticClass:"truncate"},[e._v(e._s(e.element?.name))])]),t("div",{staticClass:"breakdance-preset-titlebar"},[t("div",{staticClass:"flex-grow-1 mr-2"},[t("div",{staticClass:"d-flex flex-column"},[t("TextInput",{attrs:{value:e.activePreset.name,placeholder:e.__("Preset Name")},on:{input:e.tryToRenameActivePreset}})],1)]),t("IconButton",{attrs:{icon:"TrashIcon",size:"16"},on:{click:e.deletePreset}})],1)]),""!==e.searchBoxState.query&&e.hasSearchParameters&&!e.noSearchResults?t("div",{staticClass:"control-tree-search-term control-tree-search-term-preset"},[t("span",[e._v(e._s(e.sprintf(e._xdoc('Search results for "%s"',"Element Presets","%s: Search query"),e.searchBoxState.query)))]),t("div",{staticClass:"control-tree-search-clear",on:{click:e.clearQuery}},[t("Icon",{attrs:{icon:"CloseIcon",size:"14"}})],1)]):e._e(),t("div",{staticClass:"edit-preset-border"}),e.isActiveElementRelatedToActivePreset||e.skipTypeCheckForActiveElement?[e.hasSearchParameters?e._e():t("div",{staticClass:"vscroll-scroll"},[t("ControlsTree",{attrs:{controls:e.controls,path:"design"}})],1),e.hasSearchParameters&&!e.noSearchResults?t("div",{staticClass:"vscroll-scroll"},[t("ControlsTree",{attrs:{controls:e.controlsFilteredBySearchParams,path:"design",linear:!0}})],1):e.hasSearchParameters&&e.noSearchResults?t(gC.Z,{staticClass:"d-flex justify-center align-center flex-column",attrs:{height:"100%"}},[t("SearchBoxEmptyState",{attrs:{label:"presets"},on:{input:e.clearQuery}})],1):e._e(),t("SearchBox",{attrs:{value:e.searchBoxState,location:"preset"},on:{input:e.updateSearchBoxState}})]:t("div",{staticClass:"breakdance-preset-content"},[t("AlertBox",{staticClass:"mb-4",attrs:{options:{style:"info",content:e.sprintf(e._doc("To edit, select %s element with this preset applied.","%s: element type"),e.element?.name)}}}),t("NiceButton",{attrs:{expanded:!0},on:{click:function(t){e.skipTypeCheckForActiveElement=!0}}},[e._v(" "+e._s(e.__("Edit Anyway"))+" ")])],1)],2):e._e()},xD=[];let wD=class extends s.ZP{constructor(){super(...arguments),this.searchBoxState={modifiedOnly:!1,query:""},this.skipTypeCheckForActiveElement=!1,this.attemptingToRename=!1,this.editingPresetControlsTreeContext={getControls:()=>this.controls,getControlValue:e=>j()(c.uiStore.activePreset,`${e}`,void 0),setControlValue(e,t,n,s){if(!c.uiStore.activePreset)return;const i=(0,ge.getNodesByPresetId)(c.documentStore.document.tree,c.uiStore.activePreset.id);c.globalStore.throttledPresetPropertyChange((0,Zv._Z)({preset:c.uiStore.activePreset,path:e,value:t},{control:n,controlsTree:this.getControls(e)||[]},s)),i.forEach((n=>{Al.w.run.onPropertyChange({elementId:n.id,path:e,value:(0,wd.Z)(t),previousValue:"",transactionKey:void 0})}))},setAccordionState:(e,t)=>{const n=c.uiStore.activePreset&&c.uiStore.activePreset.id;n&&(0,NI.Q)(n,e,t)},getAccordionState:e=>{const t=c.uiStore.activePreset&&c.uiStore.activePreset.id;return!!t&&(0,NI.WX)(t,e)}}}updateSearchBoxState(e){this.searchBoxState=e}clearQuery(){this.updateSearchBoxState({modifiedOnly:!1,query:""})}get isActiveElementRelatedToActivePreset(){return this.activeElement&&this.activeElement.data.type===this.activePreset?.availableForType&&this.activeElement.data?.properties?.meta?.preset===this.activePreset?.id}get activeElement(){return c.uiStore.activeElement}get activeElementId(){return c.uiStore.activeElementId}get hasSearchParameters(){return this.searchBoxState.modifiedOnly||this.searchBoxState.query}get controlsFilteredBySearchParams(){return px(this.controls,this.searchBoxState.modifiedOnly,this.searchBoxState.query,this.editingPresetControlsTreeContext,"design")}get noSearchResults(){return 0===gx(this.controlsFilteredBySearchParams,0)}get element(){return this.activePreset?c.configStore.element(this.activePreset.availableForType):null}get controls(){const e=this.element?.controls.designSections??[];return(0,ae.mJ)(e)}get activePreset(){return c.uiStore.activePreset}deletePreset(){if(!this.activePreset)return;const e=this.activePreset,t=c.globalStore.presets.findIndex((t=>t.id===e.id));if(-1!==t){const e=(0,wd.Z)(c.globalStore.presets);e.splice(t,1),c.globalStore.setPresets(e)}}close(){this.backToAllPresets()}backToAllPresets(){c.uiStore.setActivePresetId(null)}tryToRenameActivePreset(e){if(!e)return;this.attemptingToRename=e;const t=c.globalStore.presets.findIndex((e=>e.id===this.activePreset?.id)),n=(0,wd.Z)(c.globalStore.presets);n[t]&&(n[t].name=e,c.globalStore.setPresets(n),this.attemptingToRename=!1)}};(0,r.gn)([(0,l.DF)("context")],wD.prototype,"editingPresetControlsTreeContext",void 0),wD=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,ElementIcon:on.Z,FreeModeAlertForPresets:uD,AlertBox:Ag.Z,ControlsTree:_C["default"],SearchBox:OC,IconButton:Xa.Z,PanelHeader:uI,TextInput:na.Z,SearchBoxEmptyState:Sx,NiceButton:Br.Z}})],wD);const ID=wD,PD=ID;var kD=(0,N.Z)(PD,CD,xD,!1,null,null,null);const ED=kD.exports;let TD=class extends s.ZP{constructor(){super(...arguments),this.isLoadingData=!1,this.isStoringData=!1}get activePreset(){return c.uiStore.activePreset}async beforeMount(){c.uiStore.panelState.shouldLoadFreshDataIntoStoreOnceOpened.presets?(c.uiStore.setPanelState({...c.uiStore.panelState,presetsPanelActiveViewMode:"controls"}),await this.load()):c.uiStore.setShouldPanelLoadFreshDataIntoStoreOnceOpened("presets",!0)}async load(){this.isLoadingData=!0;const e=await(0,ae.wQ)();return this.isLoadingData=!1,e}async save(){this.isStoringData=!0;const e=await(0,ae.rE)();return this.isStoringData=!1,e}requestPanelClosingConfirmation(){c.uiStore.requestClosingConfirmation({subject:"presets",confirmationDefinition:{title:(0,Ft.__)("You have unsaved changes to your Presets."),text:(0,Ft.__)("Would you like to save or discard these changes?"),type:"info"}})}get unsavedChangesPresent(){return c.globalStore.presetsHasUnsavedChangesPresent}handleUnsavedChangesPresentChange(e){e?this.requestPanelClosingConfirmation():c.uiStore.noClosingConfirmationIsNeededFor("presets")}get confirmationChosenOption(){return c.uiStore.closingConfirmations.presets?.chosenOption}async handleConfirmationChosenOptionChange(e){"discard"===e?(c.uiStore.setClosingConfirmationIsDiscarding({subject:"globalSettings",isDiscarding:!0}),await this.load()?this.close():this.requestPanelClosingConfirmation()):"save"===e&&(c.uiStore.setClosingConfirmationIsSaving({subject:"globalSettings",isSaving:!0}),await this.save()?this.close():this.requestPanelClosingConfirmation())}get isLoading(){return this.isLoadingData||this.isStoringData}close(){(0,Bu.TO)("presets")}};(0,r.gn)([(0,l.RL)("unsavedChangesPresent",{immediate:!0})],TD.prototype,"handleUnsavedChangesPresentChange",null),(0,r.gn)([(0,l.RL)("confirmationChosenOption",{immediate:!0})],TD.prototype,"handleConfirmationChosenOptionChange",null),TD=(0,r.gn)([(0,l.wA)({components:{EditPreset:ED,ManagePresets:SD}})],TD);const DD=TD,AD=DD;var ZD=(0,N.Z)(AD,DT,AT,!1,null,null,null);const OD=ZD.exports;var MD=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"ai-panel vscroll-wrap vscroll-scroll"},[t("PanelHeader",{ref:"panelHeader",on:{close:e.close}},[e._v(e._s(e.__("AI Assistant")))]),e.canViewTabs?t("TabsRow",{staticClass:"ai-panel-tabs",attrs:{"fixed-tabs":""},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("Tab",{attrs:{value:e.tab,id:"write"},on:{input:function(t){e.tab=t}}},[t("Icon",{attrs:{icon:"PenIcon",size:"18"}})],1),t("Tab",{attrs:{value:e.tab,id:"settings"},on:{input:function(t){e.tab=t}}},[t("Icon",{attrs:{icon:"GearIcon",size:"18"}})],1)],1):e._e(),t("div",{staticClass:"ai-panel-content vscroll-wrap vscroll-scroll"},[e.loadingSettings?t(Xp.Z,{staticClass:"d-block mx-auto my-4",attrs:{size:"48",indeterminate:"",color:"var(--indigo600)"}}):e.pluginNotInstalled?t("AIPluginNotInstalled"):e.settings.isApiKeySet?[e.element||"write"!==e.tab?"write"===e.tab?t("AIWriter",{attrs:{title:e.sprintf(e._doc("Rewrite %s","%s: Item name being rewritten with AI"),e.friendlyName),prompt:e.prompt,loading:e.rewriteInProgress,disabled:e.isAIDisabled,"element-name":e.elementConfig?.name,"locked-fields":e.lockedFields},on:{rewrite:e.rewrite,updatePrompt:e.updatePrompt}}):"images"===e.tab?t("AIUnsplash"):"settings"===e.tab?t("AISettings",{attrs:{settings:e.settings.prompt,loading:e.savingSettings},on:{input:e.updateSettings}}):e._e():t("AINoElementSelected")]:t("AINoApiKey")],2)],1)},BD=[],LD=n(87808),ND=n(76491),FD=n(74959),RD=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"ai-unsplash"},[t("h3",{staticClass:"ai-panel__title"},[e._v(e._s(e.__("Unsplash")))]),t("div",[t("p",[e._v(" "+e._s(e.__("Fetch images from Unsplash to use in your content, they are automatically added to Image elements in the selected section."))+" ")]),t("label",[e._v(e._s(e.__("Keywords")))]),t("div",{staticClass:"ai-images-search-input"},[t("TextInput",{on:{blur:e.talkToUnsplash},model:{value:e.keywords,callback:function(t){e.keywords=t},expression:"keywords"}}),t(Qo.Z,{staticClass:"ai-images-preview-btn",attrs:{small:"",text:"",color:"primary"},on:{click:e.talkToUnsplash}},[e._v(" "+e._s(e.__("Preview"))+" ")])],1),t("div",{staticClass:"my-2"},[t("label",[e._v(e._s(e.__("Orientation")))]),t("ButtonBarInput",{staticClass:"mb-3",attrs:{items:e.orientationItems},model:{value:e.orientation,callback:function(t){e.orientation=t},expression:"orientation"}})],1),t(Um.Z,{attrs:{label:e.__("Fill Empty Images Only"),"hide-details":""},model:{value:e.fillEmptyImagesOnly,callback:function(t){e.fillEmptyImagesOnly=t},expression:"fillEmptyImagesOnly"}}),e.images.length?t("div",{staticClass:"mt-2"},[t("h4",[e._v(e._s(e.__("Preview")))]),t("div",{staticClass:"ai-images-preview"},e._l(e.images,(function(e){return t("a",{key:e.id,attrs:{href:e.urls.full,target:"_blank"}},[t("img",{attrs:{src:e.urls.small,alt:""}})])})),0)]):e._e(),t("NiceButton",{staticClass:"ai-button",attrs:{loading:e.loading,size:"huge",disabled:0===e.imagesFields.length},on:{click:e.fetchImages}},[0===e.imagesFields.length?[e._v(" "+e._s(e.__("No images found in this section"))+" ")]:[e._v(" "+e._s(e.__("Import Images From Unsplash"))+" ")]],2)],1)])},VD=[];let $D=class extends l.w3{constructor(){super(...arguments),this.images=[],this.loading=!1,this.fillEmptyImagesOnly=!1,this.keywords="",this.orientation=null}get orientationItems(){return[{text:(0,Ft.__)("Landscape"),value:"landscape"},{text:(0,Ft.__)("Portrait"),value:"portrait"},{text:(0,Ft.__)("Squarish"),value:"squarish"}]}get imagesFields(){return c.uiStore.activeElement?(0,ir.ho)(c.uiStore.activeElement):[]}async fetchImages(){if(this.keywords)if(0!==this.imagesFields.length){if(this.loading=!0,await this.talkToUnsplash(),!this.images.length)return cd.Z.log.errorMessage((0,Ft.__)("No images found. Please try again with different keywords.")),void(this.loading=!1);(0,ir.hh)(this.imagesFields,this.images,this.fillEmptyImagesOnly),this.loading=!1,this.keywords="",this.images=[]}else cd.Z.log.errorMessage((0,Ft.__)("No images to complete. Please add an image to the section first."));else cd.Z.log.errorMessage((0,Ft.__)("Please enter a keyword to fetch images."))}async talkToUnsplash(){this.images=await(0,ND.Ig)([this.keywords],this.imagesFields.length,this.orientation)}};$D=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,NumberInput:xd.Z,IconButton:Xa.Z,NiceButton:Br.Z,ButtonBarInput:$g.Z,TopBarSection:Kc}})],$D);const WD=$D,UD=WD;var zD=(0,N.Z)(UD,RD,VD,!1,null,null,null);const HD=zD.exports;var GD=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"ai-business"},[t("h3",{staticClass:"ai-panel__title"},[e._v(e._s(e.__("Tell us about your business")))]),t("div",{staticClass:"ai-business-form mb-5"},[t("div",{staticClass:"ai-business-field"},[t("label",{staticClass:"ai-business-field__label",attrs:{for:""}},[e._v(e._s(e.__("Business Name")))]),t("TextInput",{attrs:{value:e.settings.businessName},on:{input:function(t){return e.updateField("businessName",t)}}})],1),t("div",{staticClass:"ai-business-field"},[t("label",{staticClass:"ai-business-field__label",attrs:{for:""}},[e._v(" "+e._s(e.__("Qualifiers (optional)"))+" ")]),t("TextInput",{attrs:{value:e.settings.qualifiers},on:{input:function(t){return e.updateField("qualifiers",t)}}})],1),t("div",{staticClass:"ai-business-field"},[t("label",{staticClass:"ai-business-field__label",attrs:{for:""}},[e._v(" "+e._s(e.__("Describe Your Business"))+" ")]),t("TextInput",{attrs:{value:e.settings.businessDescription,multiline:!0},on:{input:function(t){return e.updateField("businessDescription",t)}}})],1),t("div",{staticClass:"ai-business-field"},[t("label",{staticClass:"ai-business-field__label",attrs:{for:""}},[e._v(e._s(e.__("Macros")))]),t("Repeater",{attrs:{value:e.settings.presets,control:{options:{repeaterOptions:{titleTemplate:"{name}",defaultTitle:e.__("Macro"),buttonName:e.__("Add Macro")}}}},on:{input:e.updatePresets},scopedSlots:e._u([{key:"default",fn:function({index:n}){return[t("div",{staticClass:"ai-business-field"},[t("label",{staticClass:"ai-business-field__label",attrs:{for:""}},[e._v(e._s(e.__("Name")))]),t("TextInput",{on:{input:function(t){return e.updatePreset("name",t,n)}},model:{value:e.settings.presets[n].name,callback:function(t){e.$set(e.settings.presets[n],"name",t)},expression:"settings.presets[repeaterIndex].name"}})],1),t("div",{staticClass:"ai-business-field"},[t("label",{staticClass:"ai-business-field__label",attrs:{for:""}},[e._v(e._s(e.__("Prompt")))]),t("TextInput",{attrs:{placeholder:e.__("Example:\nShorten the following text"),multiline:!0,"variable-options":{enabled:!0},"variable-items":[{text:e.__("Field's Value"),value:"text"}]},on:{input:function(t){return e.updatePreset("prompt",t,n)}},model:{value:e.settings.presets[n].prompt,callback:function(t){e.$set(e.settings.presets[n],"prompt",t)},expression:"settings.presets[repeaterIndex].prompt"}})],1)]}}])})],1)])])},KD=[];let jD=class extends l.w3{updateField(e,t){const n=(0,wd.Z)(this.settings);n[e]=t,this.$emit("input",n)}updatePresets(e){const t=(0,wd.Z)(this.settings);t.presets=e,this.$emit("input",t)}updatePreset(e,t,n){const s=(0,wd.Z)(this.settings),i=s.presets||[];i[n][e]=t,s.presets=i,this.$emit("input",s)}};(0,r.gn)([(0,l.fI)()],jD.prototype,"settings",void 0),(0,r.gn)([(0,l.fI)()],jD.prototype,"loading",void 0),jD=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,NumberInput:xd.Z,IconButton:Xa.Z,TopBarSection:Kc,NiceButton:Br.Z,DropdownInput:Cd.Z,Repeater:nv.Z}})],jD);const qD=jD,XD=qD;var YD=(0,N.Z)(XD,GD,KD,!1,null,null,null);const QD=YD.exports;var JD=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"ai-writer"},[t("h3",{staticClass:"ai-panel__title"},[e._v(e._s(e.title))]),t("div",{staticClass:"ai-writer-field mb-4"},[t("label",{staticClass:"ai-writer-field__label",attrs:{for:""}},[e._v(e._s(e.__("Describe This Section")))]),t("TextInput",{attrs:{value:e.prompt.sectionDescription,multiline:!0},on:{input:function(t){return e.updateField("sectionDescription",t)},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.metaKey?t.ctrlKey||t.shiftKey||t.altKey?null:(t.preventDefault(),e.$emit("rewrite")):null}}}),t(ck.Z,{attrs:{"max-width":"236",bottom:""},scopedSlots:e._u([{key:"activator",fn:function({attrs:n,on:s}){return[t("span",{staticClass:"d-block text-right"},[t("span",e._g(e._b({staticClass:"ai-writer-tooltip"},"span",n,!1),s),[t("Icon",{attrs:{icon:"CircleInfoIcon",size:"14"}}),e._v(" "+e._s(e.__("See examples"))+" ")],1)])]}}])},[t("div",[e._v(" "+e._s(e.__("Examples:"))+" "),t("ul",[t("li",[e._v(e._s(e.__("Homepage hero section")))]),t("li",[e._v(" "+e._s(e.__("Call to action section on services page"))+" ")]),t("li",[e._v(e._s(e.__("Section showing testimonials")))])])])])],1),t("div",{staticClass:"ai-writer-field mb-4"},[t("label",{staticClass:"ai-writer-field__label",attrs:{for:""}},[e._v(e._s(e.__("Qualifiers (optional)")))]),t("TextInput",{attrs:{value:e.prompt.qualifiers},on:{input:function(t){return e.updateField("qualifiers",t)}}}),t(ck.Z,{attrs:{"max-width":"236",bottom:""},scopedSlots:e._u([{key:"activator",fn:function({attrs:n,on:s}){return[t("span",{staticClass:"d-block text-right"},[t("span",e._g(e._b({staticClass:"ai-writer-tooltip"},"span",n,!1),s),[t("Icon",{attrs:{icon:"CircleInfoIcon",size:"14"}}),e._v(" "+e._s(e.__("See examples"))+" ")],1)])]}}])},[t("div",[e._v(" "+e._s(e.__("Examples:"))+" "),t("ul",[t("li",[e._v(e._s(e.__("Be funny")))]),t("li",[e._v(e._s(e.__("Write it like snoop dogg")))]),t("li",[e._v(e._s(e.__("Be very concise")))]),t("li",[e._v(e._s(e.__("Be verbose")))]),t("li",[e._v(" "+e._s(e.__("Mention apples, oranges, and bananas"))+" ")])])])])],1),t("div",{staticClass:"ai-writer-field ai-writer-field--row"},[t("label",{staticClass:"ai-writer-field__label",attrs:{for:""}},[e._v(e._s(e.__("Temperature")))]),t("NumberInput",{attrs:{value:e.prompt.temperature,"range-options":{min:0,max:1,step:.1}},on:{input:e.updateTemperature}})],1),e.disabled?t("AlertBox",{staticClass:"mt-5",attrs:{options:{style:"warning",content:e.sprintf(e._doc("The %s element does not support AI writing.","%s: Element name"),e.elementNameBold)}}}):e._e(),e.lockedFields.length?t("div",{staticClass:"ai-writer-warning"},[t("div",{on:{click:function(t){e.viewWarning=!e.viewWarning}}},[t("AlertBox",{attrs:{options:{style:"warning",content:e.__("Some fields are locked and will not be updated by AI. <b class='cursor-pointer'>Click to view.</b>")}}})],1),e.viewWarning?t("ul",{staticClass:"ai-write-warning-list"},e._l(e.lockedFields,(function(n){return t("li",[e._v(" "+e._s(e.sprintf(e._doc("%s Field in","%s: Field label"),n.field.label))+" "),t("b",{staticClass:"cursor-pointer",on:{click:function(t){return e.activateElement(n.nodeId)}}},[e.isActiveElement(n.nodeId)?[e._v(" "+e._s(e.__("This Element"))+" ")]:[e._v(" "+e._s(e.sprintf(e._doc("%s Element","%s: Element name"),n.nodeName))+" ")]],2)])})),0):e._e()]):e._e(),t("NiceButton",{staticClass:"ai-writer-button",attrs:{loading:e.loading,leftIcon:"SparklesIcon",color:"indigo",size:"huge",disabled:e.disabled},on:{click:function(t){return e.$emit("rewrite")}}},[e._v(" "+e._s(e.__("Rewrite With AI"))+" ")])],1)},eA=[];let tA=class extends l.w3{constructor(){super(...arguments),this.viewWarning=!1}get elementNameBold(){return`<b>${this.elementName}</b>`}updateField(e,t){const n=(0,wd.Z)(this.prompt);Sd()(n,e,t),this.$emit("updatePrompt",n)}updateTemperature(e){const t=Math.max(0,Math.min(1,e));this.updateField("temperature",t)}isActiveElement(e){return Q.kD.activeElementId===e}activateElement(e){Q.kD.activateElement(e)}};(0,r.gn)([(0,l.fI)()],tA.prototype,"prompt",void 0),(0,r.gn)([(0,l.fI)()],tA.prototype,"title",void 0),(0,r.gn)([(0,l.fI)({default:!1})],tA.prototype,"loading",void 0),(0,r.gn)([(0,l.fI)({default:!1})],tA.prototype,"disabled",void 0),(0,r.gn)([(0,l.fI)({default:""})],tA.prototype,"elementName",void 0),(0,r.gn)([(0,l.fI)({default(){return[]}})],tA.prototype,"lockedFields",void 0),tA=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,TextInput:na.Z,NiceButton:Br.Z,NumberInput:xd.Z,ToggleInput:Zp.Z,AlertBox:Ag.Z}})],tA);const nA=tA,sA=nA;var iA=(0,N.Z)(sA,JD,eA,!1,null,null,null);const oA=iA.exports;var aA=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"ai-panel-message"},[t("Icon",{staticClass:"ai-panel-message__icon",attrs:{size:"60",icon:"RobotIcon"}}),t(yd.EB,{staticClass:"ai-panel-message__title"},[e._v(" "+e._s(e.__("Welcome to Breakdance AI"))+" ")]),t("p",[e._v(e._s(e.__("Rewrite your content with the power of AI.")))]),t("p",[e._v(" "+e._s(e.__("Breakdance uses OpenAI's GPT-3.5 to rewrite your content. Please install the Breakdance AI plugin to use this feature."))+" ")]),t("NiceButton",{attrs:{size:"huge",color:"indigo"},on:{click:e.goToPluginPage}},[e._v(" "+e._s(e.__("Install now"))+" ")])],1)},rA=[];let lA=class extends l.w3{goToPluginPage(){window.open("https://breakdance.com/ai","_blank")}};lA=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,NiceButton:Br.Z}})],lA);const cA=lA,dA=cA;var uA=(0,N.Z)(dA,aA,rA,!1,null,null,null);const pA=uA.exports;var hA=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"ai-panel-message"},[t("Icon",{staticClass:"ai-panel-message__icon",attrs:{size:"60",icon:"RobotIcon"}}),t(yd.EB,{staticClass:"ai-panel-message__title"},[e._v(" "+e._s(e.__("Set up your OpenAI API key"))+" ")]),t("p",[e._v(" "+e._s(e.__("You need to set up your OpenAI API key before you can use the AI assistant."))+" ")]),t("p",[t("a",{attrs:{href:e.wpAdminSettingsAiTabUrl,target:"_blank",rel:"noopener noreferrer"}},[e._v(" "+e._s(e.__("Click here to set up your API key"))+" ")])])],1)},gA=[];let mA=class extends l.w3{get wpAdminSettingsAiTabUrl(){return"wp-admin/admin.php?page="+this.$bdox("admin_page_settings_slug")+"&tab=ai"}};mA=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,NiceButton:Br.Z}})],mA);const vA=mA,yA=vA;var fA=(0,N.Z)(yA,hA,gA,!1,null,null,null);const _A=fA.exports;var bA=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"ai-panel-message"},[t("Icon",{staticClass:"ai-panel-message__icon",attrs:{size:"60",icon:"RobotIcon"}}),t(yd.EB,{staticClass:"ai-panel-message__title"},[e._v(" "+e._s(e.__("Select an element first"))+" ")]),t("p",[e._v(" "+e._s(e.__("Click on an element in the editor to rewrite it with AI."))+" ")])],1)},SA=[];let CA=class extends l.w3{};CA=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,NiceButton:Br.Z}})],CA);const xA=CA,wA=xA;var IA=(0,N.Z)(wA,bA,SA,!1,null,null,null);const PA=IA.exports;let kA=class extends l.w3{constructor(){super(...arguments),this.rewriteInProgress=!1,this.savingSettings=!1,this.loadingSettings=!1,this.pluginNotInstalled=!1,this.activeTab="content",this.tab="write",this.maxRetries=3,this.retries=0}get element(){return c.uiStore.activeElement||null}get elementConfig(){return this.element?c.configStore.element(this.element.data.type):null}get isAIDisabled(){return this.elementConfig?.settings&&this.elementConfig?.settings.disableAI}get settings(){return c.globalStore.aiSettings}get prompt(){return{sectionDescription:this.elementDescription,qualifiers:this.qualifiers,temperature:this.temperature,lockedFields:this.lockedFieldsPaths,locale:this.settings.locale,unsplash:{enabled:!1,fillEmptyImagesOnly:!1,keywords:""},singularity:{sectionData:{type:!1,index:!1},shouldGenerateOnInitialLoad:!1,unsplashKeywords:[]},onboarding:{sectionType:!1,shouldGenerateOnInitialLoad:!1}}}get friendlyName(){return this.element?(0,ir.w2)(this.element):"Section"}get elementDescription(){return this.element?(0,ir.EJ)(this.element):""}get qualifiers(){return this.element?(0,ir.zX)(this.element):""}get temperature(){return this.element?(0,ir.Wh)(this.element):1}get canViewTabs(){return this.settings.isApiKeySet&&!this.pluginNotInstalled}get unsavedChangesPresent(){return c.globalStore.aiSettingsHasUnsavedChangesPresent}get lockedFieldsPaths(){return this.element?(0,ir.nS)(this.element):[]}get lockedFields(){return this.element?(0,ir.LX)(this.element).filter((e=>e.field.locked)):[]}async fetchAndUpdateImages(e){if(!this.element)return;const t=(0,ir.ho)(this.element),{enabled:n,fillEmptyImagesOnly:s}=this.prompt.unsplash;if(!n)return;if(!e)return void this.log((0,Ft.__)("Failed to get Unsplash keywords from OpenAI API."));const i=await(0,ND.Ig)(e,t.length);(0,ir.hh)(t,i,s)}async syncRewrite(e,t){const n=(0,id.pipe)(await(0,ND.Tk)(e,"json","breakdance_ai_request_completion",!1),(0,od.fold)((()=>null),(e=>e)));if(!n)throw new Error((0,Ft.__)("No response was returned from OpenAI API."));const s=(0,ir.wi)(n,t);if(!s.elements.length)throw new Error((0,Ft.__)("No elements were returned from OpenAI API."));(0,ir.gU)(s.elements),await this.fetchAndUpdateImages(s.unsplash_keywords)}async streamRewrite(e,t){await(0,ND.ho)(e,"json",this.temperature);const n=(0,ND.m3)();let s="";return new Promise(((e,i)=>{n.onmessage=async o=>{if("[DONE]"===o.data){n.close();try{const n=(0,LD.K)(s),i=(0,ir.wi)(n,t);(0,ir.gU)(i.elements),console.log("%cOutput","color: green;"),console.log(n),e(s)}catch(a){i(a)}}else{if(s+=(0,ND.y8)(o.data),s=(0,ND.J4)(s),!s)return;try{const e=(0,ND.n7)(s),n=(0,LD.K)(e),i=(0,ir.wi)(n,t);(0,ir.gU)(i.elements)}catch(a){console.debug(s),console.debug(a)}}},n.onerror=e=>{n.close(),i(e.data)}}))}async rewrite(){if(this.rewriteInProgress)return;if(!this.element)return;const e=(0,ir.LX)(this.element),t=(0,FD.ee)(e),n=(0,FD.r1)(t,this.prompt,this.settings.prompt);if(this.rewriteInProgress=!0,(0,ir.JA)(this.element,this.prompt),console.log("%cInput","color: #2196F3;"),console.log({fields:e,prompt:n}),!e.length)return this.log((0,Ft.__)("This element is empty, please add some content first.")),void(this.rewriteInProgress=!1);try{this.settings.isStreamingEnabled?await this.streamRewrite(n,e):await this.syncRewrite(n,e)}catch(s){await this.retry(s)}this.rewriteInProgress=!1}async retry(e){this.rewriteInProgress=!1,this.retries<this.maxRetries?(console.log(`%cRetrying ${this.retries+1} of ${this.maxRetries}`,"color: #2196F3;"),this.retries++,await this.rewrite()):(this.retries=0,console.log("Max retries reached, giving up."),this.handleError(e))}handleError(e){(0,ir.Qm)(e)}updateSettings(e){const t=(0,wd.Z)(this.settings);t.prompt=e,c.globalStore.setAiSettings(t)}async savePromptSettings(){this.savingSettings=!0;const e=await(0,ND.yV)();return this.savingSettings=!1,e}async loadSettings(){this.loadingSettings=!0;const e=await(0,ND.I8)();return e?(this.loadingSettings=!1,this.pluginNotInstalled=!1,!0):(c.uiStore.noClosingConfirmationIsNeededFor("ai"),this.pluginNotInstalled=!0,this.loadingSettings=!1,!1)}updatePrompt(e){this.element&&c.documentStore.unthrottledPropertyChanged({elementId:this.element.id,path:"meta.promptInfo",meta:{snapshotLabel:(0,Ft.gB)((0,Ft.TZ)("Updated prompt info for element #%s","%s: Element ID"),this.element.id)},value:e})}requestPanelClosingConfirmation(){c.uiStore.requestClosingConfirmation({subject:"ai",confirmationDefinition:{title:(0,Ft.__)("You have unsaved changes to your AI Settings."),text:(0,Ft.__)("Would you like to save or discard these changes?"),type:"info"}})}handleUnsavedChangesPresentChange(e){e?this.requestPanelClosingConfirmation():c.uiStore.noClosingConfirmationIsNeededFor("ai")}get confirmationChosenOption(){return c.uiStore.closingConfirmations.ai?.chosenOption}async handleConfirmationChosenOptionChange(e){"discard"===e?(c.uiStore.setClosingConfirmationIsDiscarding({subject:"ai",isDiscarding:!0}),await this.loadSettings()?this.close():this.requestPanelClosingConfirmation()):"save"===e&&(c.uiStore.setClosingConfirmationIsSaving({subject:"ai",isSaving:!0}),await this.savePromptSettings()?this.close():this.requestPanelClosingConfirmation())}close(){(0,Bu.TO)("ai")}log(e){cd.Z.log.errorMessage(e)}async beforeMount(){c.uiStore.panelState.shouldLoadFreshDataIntoStoreOnceOpened.ai?await this.loadSettings():c.uiStore.setShouldPanelLoadFreshDataIntoStoreOnceOpened("ai",!0)}};(0,r.gn)([(0,l.RL)("unsavedChangesPresent",{immediate:!0})],kA.prototype,"handleUnsavedChangesPresentChange",null),(0,r.gn)([(0,l.RL)("confirmationChosenOption",{immediate:!0})],kA.prototype,"handleConfirmationChosenOptionChange",null),kA=(0,r.gn)([(0,l.wA)({components:{Tab:WC,Icon:He.Z,TabsRow:qC,NiceButton:Br.Z,PanelHeader:uI,AIWriter:oA,AIUnsplash:HD,AISettings:QD,AINoApiKey:_A,AIPluginNotInstalled:pA,AINoElementSelected:PA}})],kA);const EA=kA,TA=EA;var DA=(0,N.Z)(TA,MD,BD,!1,null,null,null);const AA=DA.exports;var ZA=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-properties-panel breakdance-element-properties-panel",attrs:{"data-test-id":"element-properties-panel"}},[e.elementIsActive?[t("Titlebar",{attrs:{size:"small"}}),t("OxygenTabsAndControls")]:[t("BlankSidebarContent")]],2)},OA=[],MA=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-tabs-controls"},[e.isComponent?e._e():t("header",{staticClass:"oxy-properties-panel-toolbar"},[t("div",{staticClass:"oxy-properties-panel-toolbar-section"},[t("ClassDropdown",{attrs:{tab:e.activeTabSlug}})],1)]),t("div",{staticClass:"oxy-tabs",class:{"oxy-tabs--expand-to-fit":e.filteredTabs.length<4}},e._l(e.filteredTabs,(function(n){return t("OxygenCopyPastContextMenu",{key:n.slug,attrs:{name:n.name,value:e.getSettingsData(n.slug),path:n.slug},on:{input:function(t){return e.setSettingsData(n.slug,t)}},scopedSlots:e._u([{key:"default",fn:function({openContextMenu:s}){return[t(ck.Z,{attrs:{"content-class":"oxy-tooltip",top:"","open-delay":500,transition:"0",text:n.name},scopedSlots:e._u([{key:"activator",fn:function({on:i,attrs:o}){return[t("button",e._g(e._b({staticClass:"oxy-tabs-item",class:{"oxy-tabs-item--active":e.activeTabSlug===n.slug,"oxy-tabs-item--filled":e.tabHasData(n.slug)},on:{click:function(t){return e.updateTab(n.slug)},contextmenu:s}},"button",o,!1),i),[t("Icon",{attrs:{icon:n.icon}})],1)]}}],null,!0)},[t("span",{domProps:{innerHTML:e._s(n.name)}})])]}}],null,!0)})})),1),t("div",{staticClass:"vscroll-wrap vscroll-scroll oxy-tab",class:`oxy-tab-${e.activeTabSlug}`},["classes"===e.activeTabSlug?t("ClassProperties",{attrs:{selector:e.activeSelector,"nested-selector":e.activeNestedSelector}}):"attributes"===e.activeTabSlug?t("OxygenHtmlAttributes"):t("ControlsTree",{attrs:{controls:e.controlSections,path:e.path}})],1),t("PanelMask")],1)},BA=[],LA=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-class-properties"},[e.selector?.locked&&!e.editAnyway?t("div",{staticClass:"oxy-class-properties__locked-warning"},[t("p",[e._v(" "+e._s(e.sprintf(e._doc("The selector %s is locked.","%s: CSS selector name"),e.selectorNameBold))+" "),t("br"),e._v(" "+e._s(e.__("Are you sure you want to edit?"))+" ")]),t("nice-button",{on:{click:function(t){e.editAnyway=!0}}},[e._v(e._s(e.__("Edit anyway")))])],1):t("OxygenControls",{attrs:{controls:e.controls,root:!0},model:{value:e.propertiesAtCurrentBreakpoint,callback:function(t){e.propertiesAtCurrentBreakpoint=t},expression:"propertiesAtCurrentBreakpoint"}}),t("span",{staticClass:"oxy-class-properties-spacer"})],1)},NA=[],FA=n(82078);const RA=Hg.LF.indexOf("custom"),VA=[...Hg.LF.slice(0,RA),"none",...Hg.LF.slice(RA)],$A=[{slug:"layout",name:"Layout",type:"accordion",open:!0,controls:[{slug:"display",name:"Display",type:"button-bar",items:[{value:"block",label:"Block"},{value:"flex",label:"Flex"},{value:"grid",label:"Grid"},{value:"none",label:"None"},{value:"inline-block",label:"Inline Block",shortLabel:"In. Block"},{value:"inline-flex",label:"Inline Flex",shortLabel:"In. Flex"},{value:"inline-grid",label:"Inline Grid",shortLabel:"In. Grid"},{value:"inline",label:"Inline"},{value:"contents",label:"Contents"}],hideAfter:4},{slug:"flex_direction",name:"Flow",type:"button-bar",hideAfter:3,items:[{value:"row",label:"Row",icon:"ArrowRightIcon",hideLabel:!0},{value:"column",label:"Column",icon:"ArrowDownIcon",hideLabel:!0},{value:"wrap",label:"Wrap",icon:"ArrowTurnDownLeftIcon",hideLabel:!0},{value:"row-reverse nowrap",label:"Row Reverse",shortLabel:"Row Rev."},{value:"row-reverse wrap",label:"Row Reverse Wrap",shortLabel:"Row Rev. Wrap"},{value:"column wrap",label:"Column Wrap",shortLabel:"Col. Wrap"},{value:"column-reverse nowrap",label:"Column Reverse",shortLabel:"Col. Rev."},{value:"column-reverse wrap",label:"Column Reverse Wrap",shortLabel:"Col. Rev. Wrap"},{value:"wrap-reverse",label:"Wrap-Reverse",shortLabel:"Wrap-Rev."}],conditions:["layout.display","in",["flex","inline-flex"]]},{slug:"flex_align",name:"Align",type:"align",conditions:["layout.display","in",["flex","inline-flex"]]},{slug:"grid",name:"Grid",type:"group",columns:11,controls:[{slug:"simple_grid_template_columns",name:"Columns",type:"number",width:5,positionLabel:"bottom",disabledConditions:["layout.grid.enable_advanced_mode","==",!0]},{slug:"simple_grid_template_rows",name:"Rows",type:"number",width:5,positionLabel:"bottom",disabledConditions:["layout.grid.enable_advanced_mode","==",!0]},{slug:"enable_advanced_mode",name:"Enable Advanced Mode",type:"button",icon:"GearIcon",width:1,hideLabel:!0}],conditions:["layout.display","in",["grid","inline-grid"]]},{slug:"grid_template_columns",name:"Columns",type:"repeater",noDataMessage:"No columns",noExpand:!0,noDisable:!0,defaultTitle:"Column",itemIcon:"LeftAndRightArrowsIcon",titleTemplate(e){return`${e.size?.style||"(empty)"}`},defaultNewValue:{size:{number:"1",unit:"fr",style:"1fr"}},controls:[{slug:"size",name:"Size",type:"unit",defaultType:"fr",types:["fr",...Hg.LF],min:.25,max:5,step:.25}],conditions:[["layout.display","in",["grid","inline-grid"]],["layout.grid.enable_advanced_mode","==",!0]]},{slug:"grid_template_rows",name:"Rows",type:"repeater",noDataMessage:"No rows",noExpand:!0,noDisable:!0,defaultTitle:"Row",itemIcon:"LeftAndRightArrowsIcon",titleTemplate(e){return`${e.size?.style||"(empty)"}`},defaultNewValue:{size:{number:"1",unit:"fr",style:"1fr"}},controls:[{slug:"size",name:"Size",type:"unit",defaultType:"fr",types:["fr",...Hg.LF],min:.25,max:5,step:.25}],conditions:[["layout.display","in",["grid","inline-grid"]],["layout.grid.enable_advanced_mode","==",!0]]},{slug:"grid_area",name:"Areas",type:"repeater",noDisable:!0,noExpand:!0,defaultNewValue:{name:"Area-{index}"},defaultTitle:"Area",titleTemplate(e){return`${e.name}`},noDataMessage:"No areas",controls:[{slug:"name",name:"Name",type:"text"}],conditions:[["layout.display","in",["grid","inline-grid"]],["layout.grid.enable_advanced_mode","==",!0]]},{slug:"grid_auto_columns",name:"Auto Columns",type:"unit",defaultType:"fr",types:["fr",...Hg.LF],conditions:[["layout.display","in",["grid","inline-grid"]],["layout.grid.enable_advanced_mode","==",!0]],width:6,positionLabel:"bottom"},{slug:"grid_auto_rows",name:"Auto Rows",type:"unit",defaultType:"fr",types:["fr",...Hg.LF],conditions:[["layout.display","in",["grid","inline-grid"]],["layout.grid.enable_advanced_mode","==",!0]],width:6,positionLabel:"bottom"},{slug:"grid_auto_flow",name:"Flow",type:"button-bar",items:[{value:"row",label:"Row",icon:"ArrowRightIcon",hideLabel:!0},{value:"column",label:"Column",icon:"ArrowDownIcon",hideLabel:!0}],conditions:["layout.display","in",["grid","inline-grid"]]},{slug:"grid_align",name:"Align",type:"align",conditions:["layout.display","in",["grid","inline-grid"]]},{slug:"gap",name:"Gap",type:"gap",conditions:["layout.display","in",["grid","inline-grid","flex","inline-flex"]]},{slug:"grid_justify_content",name:"Justify",type:"button-bar",items:[{value:"start",label:"Start",icon:"FlexAlignLeftIcon",hideLabel:!0},{value:"center",label:"Center",icon:"FlexAlignCenterHorizontalIcon",hideLabel:!0},{value:"end",label:"End",icon:"FlexAlignRightIcon",hideLabel:!0},{value:"stretch",label:"Stretch",icon:"FlexAlignStretch",hideLabel:!0},{value:"space-between",label:"Space Between",icon:"FlexAlignSpaceBetween",hideLabel:!0},{value:"space-around",label:"Space Around",icon:"FlexAlignSpaceAround",hideLabel:!0}],conditions:["layout.display","in",["grid","inline-grid"]]},{slug:"grid_align_content",name:"Align C.",type:"button-bar",items:[{value:"start",label:"Start",icon:"FlexAlignTopIcon",hideLabel:!0},{value:"center",label:"Center",icon:"FlexAlignCenterVerticalIcon",hideLabel:!0},{value:"end",label:"End",icon:"FlexAlignBottomIcon",hideLabel:!0},{value:"stretch",label:"Stretch",icon:"FlexAlignStretchHorizontal",hideLabel:!0},{value:"space-between",label:"Space Between",icon:"FlexAlignSpaceBetweenHorizontal",hideLabel:!0},{value:"space-around",label:"Space Around",icon:"FlexAlignSpaceAroundHorizontal",hideLabel:!0}],conditions:["layout.display","in",["grid","inline-grid"]]},{slug:"visibility",name:"Visibility",type:"button-bar",items:[{value:"visible",label:"Visible"},{value:"hidden",label:"Hidden"}]}]},{slug:"spacing",name:"Spacing",type:"accordion",controls:[{slug:"spacing",name:"spacing",type:"spacing",hideLabel:!0}]},{slug:"size",name:"Size",type:"accordion",controls:[{slug:"width",name:"Width",type:"unit",width:6},{slug:"height",name:"Height",type:"unit",width:6},{slug:"max_width",name:"Max W",type:"unit",width:6,types:VA},{slug:"max_height",name:"Max H",type:"unit",width:6,types:VA},{slug:"min_width",name:"Min W",type:"unit",width:6},{slug:"min_height",name:"Min H",type:"unit",width:6},{slug:"overflow",name:"Overflow",type:"button-bar",items:[{label:"Visible",value:"visible",icon:"EyeSolidIcon",hideLabel:!0},{label:"Hidden",value:"hidden",icon:"EyeSlashSolidIcon",hideLabel:!0},{label:"Scroll",value:"scroll",icon:"ComputerMouseScrollWheelIcon",hideLabel:!0},{label:"Clip",value:"clip",icon:"ScissorsIcon",hideLabel:!0},{label:"Auto",value:"auto"}]},{name:"Ratio",slug:"aspect_ratio",type:"select",items:[{label:"16:9",value:"16 / 9"},{label:"4:3",value:"4 / 3"},{label:"3:2",value:"3 / 2"},{label:"Square (1:1)",value:"1"},{label:"Custom",value:"custom"}]},{slug:"aspect_ratio_custom",name:"",type:"group",controls:[{slug:"width",name:"Width",type:"number",width:6,positionLabel:"bottom"},{slug:"height",name:"Height",type:"number",width:6,positionLabel:"bottom"}],conditions:["size.aspect_ratio","==","custom"]},{name:"Obj Fit",slug:"object_fit",type:"select",items:[{label:"Fill",value:"fill"},{label:"Contain",value:"contain"},{label:"Cover",value:"cover"},{label:"None",value:"none"},{label:"Scale Down",value:"scale-down"}]},{name:"Position",slug:"object_position",type:"focus-point",conditions:["size.object_fit","not in",[void 0,"none"]]},{name:"Box Size",slug:"box_sizing",type:"button-bar",width:12,items:[{label:"Border Box",value:"border-box"},{label:"Content Box",value:"content-box"}]}]},{slug:"position",name:"Position",type:"accordion",controls:[{slug:"position",name:"Position",type:"select",items:[{label:"Static",value:"static"},{label:"Relative",value:"relative"},{label:"Absolute",value:"absolute"},{label:"Fixed",value:"fixed"},{label:"Sticky",value:"sticky"}]},{slug:"top",name:"Top",type:"unit",width:6,conditions:["position.position","not in",["static",void 0]]},{slug:"right",name:"Right",type:"unit",width:6,conditions:["position.position","not in",["static",void 0]]},{slug:"bottom",name:"Bottom",type:"unit",width:6,conditions:["position.position","not in",["static",void 0]]},{slug:"left",name:"Left",type:"unit",width:6,conditions:["position.position","not in",["static",void 0]]},{slug:"z_index",name:"Z-Index",type:"number",width:6,conditions:["position.position","not in",["static",void 0]]}]},{slug:"typography",name:"Typography",type:"accordion",hideAfter:9,controls:[{slug:"color",name:"Color",type:"color"},{slug:"font_family",name:"Font",type:"font-family"},{slug:"font_weight",name:"Weight",type:"select",items:[{label:"100 - Thin",value:100},{label:"200 - Extra Light",value:200},{label:"300 - Light",value:300},{label:"400 - Normal",value:400},{label:"500 - Medium",value:500},{label:"600 - Semi Bold",value:600},{label:"700 - Bold",value:700},{label:"800 - Extra Bold",value:800},{label:"900 - Black",value:900}]},{slug:"font_size",name:"Size",type:"unit",width:6,min:0},{slug:"line_height",name:"Height",type:"unit",width:6,defaultType:"custom"},{slug:"text_align",name:"Align",type:"button-bar",items:[{label:"Left",value:"start",icon:"AlignLeftIcon",hideLabel:!0},{label:"Center",value:"center",icon:"AlignCenterIcon",hideLabel:!0},{label:"Right",value:"end",icon:"AlignRightIcon",hideLabel:!0},{label:"Justify",value:"justify",icon:"AlignJustifyIcon",hideLabel:!0}]},{slug:"style",name:"Style",type:"group",controls:[{slug:"text_decoration",name:"Decoration",type:"button-bar",width:8,items:[{label:"None",value:"none",icon:"XmarkIcon",hideLabel:!0},{label:"Underline",value:"underline",icon:"UnderlineIcon",hideLabel:!0},{label:"Overline",value:"overline",icon:"OverlineIcon",hideLabel:!0},{label:"Line Through",value:"line-through",icon:"StrikethroughIcon",hideLabel:!0}],positionLabel:"bottom"},{slug:"font_style",name:"Italic",type:"button-bar",items:[{label:"<span style='font-family: monospace;vertical-align: middle;font-weight:normal;'>I</span>",value:"normal"},{label:"Italic",value:"italic",icon:"ItalicIcon",hideLabel:!0}],width:4,positionLabel:"bottom"}]},{slug:"text_transform",name:"Transform",type:"button-bar",items:[{label:"None",value:"none",icon:"XmarkIcon",hideLabel:!0},{label:"AA",value:"uppercase"},{label:"Aa",value:"capitalize"},{label:"aa",value:"lowercase"}],width:7,positionLabel:"bottom"},{slug:"letter_spacing",name:"Letter Spacing",type:"unit",width:5,positionLabel:"bottom"},{slug:"text_indent",name:"Text Indent",type:"unit",width:6,positionLabel:"bottom"},{slug:"direction",name:"Direction",type:"button-bar",items:["ltr","rtl"],width:6,positionLabel:"bottom"},{slug:"overflow_wrap",name:"Overflow Wrap",width:6,positionLabel:"bottom",type:"select",items:["normal","break-word"]},{slug:"text_wrap",name:"Text Wrap",width:6,positionLabel:"bottom",type:"select",items:[{label:"auto",value:"wrap"},{label:"nowrap",value:"nowrap"},{label:"balance",value:"balance"},{label:"pretty",value:"pretty"}]},{slug:"text_overflow",name:"Text Overflow",type:"button-bar",positionLabel:"bottom",width:4,items:[{value:"clip",label:"Clip",icon:"XmarkIcon",hideLabel:!0},{value:"ellipsis",label:"Ellipsis",icon:"EllipsisIcon",hideLabel:!0}]},{slug:"list_style",name:"List Style",type:"button-bar",positionLabel:"bottom",width:8,items:[{value:"none",label:"None",icon:"XmarkIcon",hideLabel:!0},{value:"disc",label:"Circles",icon:"ListIcon",hideLabel:!0},{value:"numbers",label:"Numbers",icon:"OlListIcon",hideLabel:!0},{value:"lower-alpha",label:"Letters",icon:"LetterAIcon",hideLabel:!0},{value:"lower-roman",label:"Roman numerals",icon:"LetterIIcon",hideLabel:!0}]},{slug:"stroke",name:"Stroke",type:"group",controls:[{slug:"stroke_width",name:"Width",type:"unit",width:5,positionLabel:"bottom"},{slug:"stroke_color",name:"Color",type:"color",width:7,positionLabel:"bottom"}]},{slug:"text_shadow",name:"Text Shadow",type:"repeater",itemColorPath:"color",titleTemplate:e=>{const{x:t,y:n,blur:s}=e;return`Text Shadow: ${t?.style} ${n?.style} ${s?.style}`},defaultNewValue:{x:{number:0,unit:"px",style:"0px"},y:{number:1,unit:"px",style:"1px"},blur:{number:1,unit:"px",style:"1px"},color:"#000000"},controls:[{slug:"x",name:"X",type:"unit",min:-20,max:20,step:1},{slug:"y",name:"Y",type:"unit",min:-20,max:20,step:1},{slug:"blur",name:"Blur",type:"unit",min:0,max:20,step:1},{slug:"color",name:"Color",type:"color"}]}]},{slug:"background",name:"Background",type:"accordion",controls:[{slug:"background_color",name:"Color",type:"color"},{slug:"backgrounds",name:"Image & Gradient",type:"repeater",defaultNewValue:{type:"image"},itemIcon:"ImageAndVideIcon",titleTemplate:e=>"gradient"===e?.type?"Gradient":"image"===e?.type?"Image":"color_overlay"===e?.type?e.color||"Color Overlay":"video"===e?.type?"Video":"",defaultTitle:"Background",controls:[{slug:"type",name:"Type",type:"button-bar",hideLabel:!0,items:[{label:"Image",value:"image",icon:"ImageIcon",hideLabel:!0},{label:"Gradient",value:"gradient",iconHtml:'<span class="oxy-gradient-icon"></span>',hideLabel:!0},{label:"Color Overlay",value:"color_overlay",icon:"SquareSolidIcon",hideLabel:!0}]},{slug:"image",name:"Image",type:"media",hideLabel:!0,conditions:["background.backgrounds[].type","==","image"]},{slug:"image_size",name:"Size",type:"media-size",conditions:["background.backgrounds[].type","==","image"]},{slug:"background_size",name:"Size",type:"button-bar",items:[{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"Custom",value:"custom"}],conditions:["background.backgrounds[].type","==","image"]},{slug:"background_size_custom",name:"",type:"group",controls:[{slug:"width",name:"Width",type:"unit",width:6,positionLabel:"bottom"},{slug:"height",name:"Height",type:"unit",width:6,positionLabel:"bottom"}],conditions:[["background.backgrounds[].type","==","image"],["background.backgrounds[].background_size","==","custom"]]},{slug:"background_position",name:"Position",type:"focus-point",conditions:["background.backgrounds[].type","==","image"]},{slug:"background_repeat",name:"Repeat",type:"button-bar",items:[{label:"No Repeat",value:"no-repeat",icon:"XmarkIcon",hideLabel:!0},{label:"Repeat",value:"repeat",icon:"GridIcon",hideLabel:!0},{label:"Repeat X",value:"repeat-x",icon:"EllipsisIcon",hideLabel:!0},{label:"Repeat Y",value:"repeat-y",icon:"EllipsisVerticalIcon",hideLabel:!0}],conditions:["background.backgrounds[].type","==","image"]},{slug:"background_attachment",name:"Attach",type:"button-bar",items:[{label:"Scroll",value:"scroll"},{label:"Fixed",value:"fixed"}],conditions:["background.backgrounds[].type","==","image"]},{slug:"background_blend_mode",name:"Blend",type:"select",items:[{label:"Normal",value:"normal"},{label:"Multiply",value:"multiply"},{label:"Screen",value:"screen"},{label:"Overlay",value:"overlay"},{label:"Darken",value:"darken"},{label:"Lighten",value:"lighten"},{label:"Color Dodge",value:"color-dodge"},{label:"Color Burn",value:"color-burn"},{label:"Hard Light",value:"hard-light"},{label:"Soft Light",value:"soft-light"},{label:"Difference",value:"difference"},{label:"Exclusion",value:"exclusion"},{label:"Hue",value:"hue"},{label:"Saturation",value:"saturation"},{label:"Color",value:"color"},{label:"Luminosity",value:"luminosity"}],conditions:["background.backgrounds[].type","==","image"]},{slug:"color",name:"Color",type:"color",hideLabel:!0,inline:!0,positionLabel:"bottom",conditions:["background.backgrounds[].type","==","color_overlay"]},{slug:"gradient",name:"Gradient",type:"color",hideLabel:!0,inline:!0,positionLabel:"bottom",colorType:"gradientOnly",conditions:["background.backgrounds[].type","==","gradient"]}]}]},{slug:"borders",name:"Borders",type:"accordion",controls:[{slug:"border_radius",name:"Radius",type:"border-radius"},{slug:"borders",name:"Borders",type:"border",positionLabel:"top"}]},{slug:"effects",name:"Effects",type:"accordion",hideAfter:12,controls:[{slug:"opacity",name:"Opacity",type:"number",min:0,max:100,step:1},{slug:"cursor",name:"Cursor",type:"select",items:["auto","default","pointer","wait","text","move","not-allowed","help","crosshair","grab","grabbing"]},{slug:"blend_mode",name:"Blend",type:"select",items:[{label:"Normal",value:"normal"},{label:"Multiply",value:"multiply"},{label:"Screen",value:"screen"},{label:"Overlay",value:"overlay"},{label:"Darken",value:"darken"},{label:"Lighten",value:"lighten"},{label:"Color Dodge",value:"color-dodge"},{label:"Color Burn",value:"color-burn"},{label:"Hard Light",value:"hard-light"},{label:"Soft Light",value:"soft-light"},{label:"Difference",value:"difference"},{label:"Exclusion",value:"exclusion"},{label:"Hue",value:"hue"},{label:"Saturation",value:"saturation"},{label:"Color",value:"color"},{label:"Luminosity",value:"luminosity"}]},{slug:"outline_style",name:"Outline",type:"button-bar",items:[{label:"None",value:"none"},{label:"Solid",value:"solid"},{label:"Dashed",value:"dashed"},{label:"Dotted",value:"dotted"}]},{slug:"outline_width",name:"Width",type:"unit",width:6,conditions:["effects.outline_style","not in",["none",void 0]]},{slug:"outline_offset",name:"Offset",type:"unit",width:6,conditions:["effects.outline_style","not in",["none",void 0]]},{slug:"outline_color",name:"Color",type:"color",conditions:["effects.outline_style","not in",["none",void 0]]},{slug:"transition",name:"Transition",type:"repeater",titleTemplate:e=>{const t=e?.property||"all",n=t.charAt(0).toUpperCase()+t.slice(1);return`${n}: ${e?.duration?.style||"0ms"}`},itemIcon:"TimerIcon",defaultNewValue:{property:"opacity",duration:{number:"200",unit:"ms",style:"200ms"},easing:"ease"},controls:[{slug:"property",name:"Property",type:"select",items:["all","none","color","background","transform","width","height","opacity","border","box-shadow","outline"]},{slug:"duration",name:"Duration",type:"unit",min:0,step:25,max:1e3,types:["ms","s","custom"],defaultType:"ms"},{slug:"easing",name:"Easing",type:"select",items:["ease","linear","ease-in","ease-out","ease-in-out"]},{slug:"delay",name:"Delay",type:"unit",min:0,step:25,max:1e3,types:["ms","s","custom"],defaultType:"ms"}]},{slug:"box_shadow",name:"Box Shadow",type:"repeater",itemColorPath:"color",titleTemplate:e=>{const{x:t,y:n,blur:s,spread:i}=e,o="inset"===e.position?"Inner":"Outer";return`${o}: ${t?.style} ${n?.style} ${s?.style} ${i?.style}`},defaultNewValue:{x:{number:0,unit:"px",style:"0px"},y:{number:2,unit:"px",style:"2px"},blur:{number:5,unit:"px",style:"5px"},spread:{number:0,unit:"px",style:"0px"},color:"#00000030",position:"outset"},controls:[{slug:"position",name:"Position",type:"button-bar",items:[{label:"Outset",value:"outset"},{label:"Inset",value:"inset"}]},{slug:"color",name:"Color",type:"color"},{slug:"x",name:"X",type:"unit"},{slug:"y",name:"Y",type:"unit"},{slug:"blur",name:"Blur",type:"unit"},{slug:"spread",name:"Spread",type:"unit"}]},{slug:"filter",name:"Filter",type:"repeater",itemIcon:"WandMagicSparkles",defaultNewValue:{type:"blur",value:{number:100,unit:"%",style:"100%"},blur_value:{number:5,unit:"px",style:"5px"},hue_value:{number:180,unit:"deg",style:"180deg"},x:{number:0,unit:"px",style:"0px"},y:{number:2,unit:"px",style:"2px"},blur:{number:5,unit:"px",style:"5px"}},titleTemplate:e=>{if("drop-shadow"===e.type)return`Drop shadow: ${e.x?.style} ${e.y?.style} ${e.blur?.style}`;const t=e.type?e.type?.charAt(0).toUpperCase()+e.type?.slice(1).replace("-"," "):"Filter";return"blur"===e.type?`${t}: ${e.blur_value?.style}`:"hue-rotate"===e.type?`${t}: ${e.hue_value?.style}`:`${t}: ${e.value?.style}`},controls:[{slug:"type",name:"Type",type:"select",items:[{label:"Blur",value:"blur"},{label:"Brightness",value:"brightness"},{label:"Contrast",value:"contrast"},{label:"Grayscale",value:"grayscale"},{label:"Hue Rotate",value:"hue-rotate"},{label:"Invert",value:"invert"},{label:"Opacity",value:"opacity"},{label:"Saturate",value:"saturate"},{label:"Sepia",value:"sepia"}]},{slug:"blur_value",name:"Value",type:"unit",conditions:["effects.filter[].type","==","blur"]},{slug:"hue_value",name:"Value",type:"unit",defaultType:"deg",types:["deg"],min:0,max:360,step:45,conditions:["effects.filter[].type","==","hue-rotate"]},{slug:"value",name:"Value",type:"unit",min:0,max:100,step:1,defaultType:"%",types:["%"],conditions:["effects.filter[].type","in",["brightness","contrast","grayscale","invert","opacity","saturate","sepia"]]},{slug:"x",name:"X",type:"unit",conditions:["effects.filter[].type","==","drop-shadow"]},{slug:"blur",name:"Blur",type:"unit",conditions:["effects.filter[].type","==","drop-shadow"]}]},{slug:"backdrop_filter",name:"Backdrop Filter",type:"repeater",itemIcon:"WandMagicSparkles",defaultNewValue:{type:"blur",value:{number:100,unit:"%",style:"100%"},blur_value:{number:5,unit:"px",style:"5px"},hue_value:{number:180,unit:"deg",style:"180deg"},x:{number:0,unit:"px",style:"0px"},y:{number:2,unit:"px",style:"2px"},blur:{number:5,unit:"px",style:"5px"}},titleTemplate:e=>{if("drop-shadow"===e.type)return`Drop shadow: ${e.x?.style} ${e.y?.style} ${e.blur?.style}`;const t=e.type?e.type?.charAt(0).toUpperCase()+e.type?.slice(1).replace("-"," "):"Filter";return"blur"===e.type?`${t}: ${e.blur_value?.style}`:"hue-rotate"===e.type?`${t}: ${e.hue_value?.style}`:`${t}: ${e.value?.style}`},controls:[{slug:"type",name:"Type",type:"select",items:[{label:"Blur",value:"blur"},{label:"Brightness",value:"brightness"},{label:"Contrast",value:"contrast"},{label:"Grayscale",value:"grayscale"},{label:"Hue Rotate",value:"hue-rotate"},{label:"Invert",value:"invert"},{label:"Opacity",value:"opacity"},{label:"Saturate",value:"saturate"},{label:"Sepia",value:"sepia"}]},{slug:"blur_value",name:"Value",type:"unit",conditions:["effects.backdrop_filter[].type","==","blur"]},{slug:"hue_value",name:"Value",type:"unit",defaultType:"deg",types:["deg"],min:0,max:360,step:45,conditions:["effects.backdrop_filter[].type","==","hue-rotate"]},{slug:"value",name:"Value",type:"unit",min:0,max:100,step:1,defaultType:"%",types:["%"],conditions:["effects.backdrop_filter[].type","in",["brightness","contrast","grayscale","invert","opacity","saturate","sepia"]]},{slug:"x",name:"X",type:"unit",conditions:["effects.backdrop_filter[].type","==","drop-shadow"]},{slug:"blur",name:"Blur",type:"unit",conditions:["effects.backdrop_filter[].type","==","drop-shadow"]}]},{slug:"transform",name:"Transform",type:"repeater",itemIcon:"LeftAndRightArrowsIcon",defaultNewValue:{type:"translate",translate_x:{number:0,unit:"px",style:"0px"},translate_y:{number:0,unit:"px",style:"0px"},translate_z:{number:0,unit:"px",style:"0px"},scale_x:1,scale_y:1,scale_z:1,rotate_x:{number:0,unit:"deg",style:"0deg"},rotate_y:{number:0,unit:"deg",style:"0deg"},rotate_z:{number:0,unit:"deg",style:"0deg"},skew_x:{number:0,unit:"deg",style:"0deg"},skew_y:{number:0,unit:"deg",style:"0deg"}},titleTemplate:e=>"translate"===e.type?`Translate: ${e.translate_x?.style}, ${e.translate_y?.style}, ${e.translate_z?.style}`:"scale"===e.type?`Scale: ${e.scale_x}, ${e.scale_y}, ${e.scale_z}`:"rotate"===e.type?`Rotate: ${e.rotate_x?.style}, ${e.rotate_y?.style}, ${e.rotate_z?.style}`:"skew"===e.type?`Skew: ${e.skew_x?.style}, ${e.skew_y?.style}`:"Transform",controls:[{slug:"type",name:"Type",type:"button-bar",hideLabel:!0,items:[{label:"Translate",value:"translate"},{label:"Scale",value:"scale"},{label:"Rotate",value:"rotate"},{label:"Skew",value:"skew"}]},{slug:"translate_x",name:"X",type:"unit",conditions:["effects.transform[].type","==","translate"]},{slug:"translate_y",name:"Y",type:"unit",conditions:["effects.transform[].type","==","translate"]},{slug:"translate_z",name:"Z",type:"unit",conditions:["effects.transform[].type","==","translate"]},{slug:"scale_x",name:"X",type:"number",min:0,step:.1,max:2,conditions:["effects.transform[].type","==","scale"]},{slug:"scale_y",name:"Y",type:"number",min:0,step:.1,max:2,conditions:["effects.transform[].type","==","scale"]},{slug:"scale_z",name:"Z",type:"number",min:0,step:.1,max:2,conditions:["effects.transform[].type","==","scale"]},{slug:"rotate_x",name:"X",type:"unit",defaultType:"deg",types:["deg"],conditions:["effects.transform[].type","==","rotate"]},{slug:"rotate_y",name:"Y",type:"unit",defaultType:"deg",types:["deg"],conditions:["effects.transform[].type","==","rotate"]},{slug:"rotate_z",name:"Z",type:"unit",defaultType:"deg",types:["deg"],conditions:["effects.transform[].type","==","rotate"]},{slug:"skew_x",name:"X",type:"unit",defaultType:"deg",types:["deg"],conditions:["effects.transform[].type","==","skew"]},{slug:"skew_y",name:"Y",type:"unit",defaultType:"deg",types:["deg"],conditions:["effects.transform[].type","==","skew"]}]},{slug:"transform_origin",name:"Origin",type:"focus-point"},{slug:"pointer_events",name:"Events",type:"button-bar",items:[{value:"auto",label:"Auto"},{value:"none",label:"None"}]},{slug:"backface_visibility",name:"Backface",type:"button-bar",items:[{value:"visible",label:"Visible"},{value:"hidden",label:"Hidden"}]}]},{slug:"flex_child",name:"Flex Child",type:"accordion",conditions:(0,tl.Pv)(["flex","inline-flex"]),controls:[{slug:"flex_grow",name:"Grow",type:"number",width:4,positionLabel:"bottom"},{slug:"flex_shrink",name:"Shrink",type:"number",width:4,positionLabel:"bottom"},{slug:"flex_basis",name:"Basis",type:"unit",width:4,positionLabel:"bottom"},{slug:"align_self",name:"Align",type:"button-bar",items:[{value:"auto",label:"Auto"},{value:"start",label:"Start",icon:"FlexAlignLeftIcon",hideLabel:!0},{value:"center",label:"Center",icon:"FlexAlignCenterHorizontalIcon",hideLabel:!0},{value:"end",label:"End",icon:"FlexAlignRightIcon",hideLabel:!0},{value:"stretch",label:"Stretch",icon:"FlexAlignStretch",hideLabel:!0}]},{slug:"order",name:"Order",type:"button-bar",items:[{label:"None",value:"none",icon:"XmarkIcon",hideLabel:!0},{value:-1,label:"First"},{value:99,label:"Last"},{value:"custom",label:"Custom"}]},{slug:"order_custom",name:"Order",type:"number",width:6,conditions:["flex_child.order","==","custom"]}]},{slug:"grid_child",name:"Grid Child",type:"accordion",conditions:(0,tl.Pv)(["grid","inline-grid"]),controls:[{slug:"row_start",name:"Row Start",type:"text",width:3,positionLabel:"bottom",disabledConditions:["grid_child.area","not in",[void 0,null]]},{slug:"column_start",name:"Col. Start",type:"text",width:3,positionLabel:"bottom",disabledConditions:["grid_child.area","not in",[void 0,null]]},{slug:"row_end",name:"Row End",type:"text",width:3,positionLabel:"bottom",disabledConditions:["grid_child.area","not in",[void 0,null]]},{slug:"column_end",name:"Col. End",type:"text",width:3,positionLabel:"bottom",disabledConditions:["grid_child.area","not in",[void 0,null]]},{slug:"area",name:"Area",type:"text"},{slug:"align_self",name:"Align",type:"button-bar",items:[{value:"auto",label:"Auto",icon:"XmarkIcon",hideLabel:!0},{value:"start",label:"Start",icon:"FlexAlignTopIcon",hideLabel:!0},{value:"center",label:"Center",icon:"FlexAlignCenterVerticalIcon",hideLabel:!0},{value:"end",label:"End",icon:"FlexAlignBottomIcon",hideLabel:!0},{value:"stretch",label:"Stretch",icon:"FlexAlignStretchHorizontal",hideLabel:!0}]},{slug:"justify_self",name:"Justify",type:"button-bar",items:[{value:"auto",label:"Auto",icon:"XmarkIcon",hideLabel:!0},{value:"start",label:"Start",icon:"FlexAlignLeftIcon",hideLabel:!0},{value:"center",label:"Center",icon:"FlexAlignCenterHorizontalIcon",hideLabel:!0},{value:"end",label:"End",icon:"FlexAlignRightIcon",hideLabel:!0},{value:"stretch",label:"Stretch",icon:"FlexAlignStretch",hideLabel:!0}]},{slug:"order",name:"Order",type:"button-bar",items:[{label:"None",value:"none",icon:"XmarkIcon",hideLabel:!0},{value:-1,label:"First"},{value:99,label:"Last"},{value:"custom",label:"Custom"}]},{slug:"order_custom",name:"Order",type:"number",width:6,conditions:["grid_child.order","==","custom"]}]},{slug:"custom_css",name:"Custom CSS",type:"accordion",controls:[{slug:"custom_css",name:"Custom CSS",type:"code",language:"css",hideLabel:!0,placeholder:":selector {\n \n}",autofillOnEmpty:":selector {\n PLACECURSORHERE\n}"}]}];var WA=n(37156);let UA=class extends l.w3{constructor(){super(...arguments),this.controls=$A,this.editAnyway=!1,this.context=this.reactiveContext(),this.transactionKey=null}reactiveContext(){return{getInheritanceMap:()=>this.inheritanceMap,getControlInheritance:e=>this.inheritanceMap?.[e],getControlInheritanceByPrefix:e=>(0,WA.e6)(this.inheritanceMap,`${e}.`),getParentControlInheritance(e){const t=this.getParentPath(e);return(0,WA.e6)(this.getInheritanceMap(),`${t}.`)},getControlValue:e=>{const t={};for(const n of c.configStore.breakpoints){const s=j()(this.properties,`${n.id}.${e}`);void 0!==s&&(t[n.id]=s)}return t},getControlValueAt:(e,t)=>{const n=e?`${t}.${e}`:t;return j()(this.properties,n)},getParentPath(e){return e.split(".").slice(0,-1).join(".")},setControlValue:(e,t,n)=>{const s=(0,wd.Z)(this.properties),i=Object.keys(t);for(const o of i)Sd()(s,`${o}.${e}`,t[o]);this.transactionKey=n,this.properties=s},setControlValueAt:(e,t,n,s)=>{const i=(0,wd.Z)(this.properties);Sd()(i,`${t}.${e}`,n),this.transactionKey=s,this.properties=i},getParentControlValueAt(e,t){const n=this.getParentPath(e);return this.getControlValueAt(n,t)},getParentControlValue(e){const t=this.getParentPath(e);return this.getControlValue(t)}}}get breakpoints(){return c.configStore.breakpoints}get breakpointId(){return c.uiStore.currentBreakpoint.id}get selectorNameBold(){return`<b>${this.selector?.name}</b>`}get properties(){const e=this.nestedSelector||this.selector;return e&&e.properties?e.properties:{}}set properties(e){if(!this.selector&&this.element)return void(0,tl.bO)(this.element,e);if(!this.selector)return void console.log("No selector, this should not happen");const t=null===this.transactionKey?void 0:this.transactionKey;(0,tl.Cg)({selectorId:this.selector.id,nestedSelectorId:this.nestedSelector?.id,properties:e,transactionKey:t})}get propertiesAtCurrentBreakpoint(){return this.properties[this.breakpointId]}set propertiesAtCurrentBreakpoint(e){const t=0===Object.keys(e).length,n=t?null:e,s=(0,wd.Z)(this.properties)||{};s[this.breakpointId]=n,this.properties=s}get element(){return c.uiStore.activeElement?c.uiStore.activeElement:null}get inheritanceMap(){const e=this.nestedSelector?.id||this.selector?.id;if(!e)return;let t;return t=this.nestedSelector?[this.nestedSelector.id]:"elementproperties"!==this.panelContext?.state?[e]:this.element?.data?.properties?.meta?.classes||[],(0,WA.Gb)(t,e,this.breakpointId)}};(0,r.gn)([(0,l.DF)("oxyContext")],UA.prototype,"context",void 0),(0,r.gn)([(0,l.tB)({from:"panelContext",default:void 0})],UA.prototype,"panelContext",void 0),(0,r.gn)([(0,l.fI)()],UA.prototype,"selector",void 0),(0,r.gn)([(0,l.fI)()],UA.prototype,"nestedSelector",void 0),UA=(0,r.gn)([(0,l.wA)({components:{NiceButton:Br.Z,OxygenControls:FA.Z,OxygenControl:XS["default"]}})],UA);const zA=UA,HA=zA;var GA=(0,N.Z)(HA,LA,NA,!1,null,null,null);const KA=GA.exports;var jA=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("OxygenCopyPastContextMenu",{attrs:{name:"Selectors",path:"selectors",value:e.elementClasses},on:{input:e.updateClasses},scopedSlots:e._u([{key:"default",fn:function({openContextMenu:n}){return[t("div",{ref:"container",staticClass:"oxy-class-selector",on:{contextmenu:n}},[t(ck.Z,{attrs:{text:"Tooltip",top:"",disabled:!e.errorMessage,value:!!e.errorMessage},scopedSlots:e._u([{key:"activator",fn:function({attrs:n}){return[t(zm.Z,e._b({ref:"input",staticClass:"oxy-class-selector-widget",attrs:{multiple:"",value:e.elementClasses,items:e.availableClasses,"search-input":e.newClassName,"item-text":"name","item-value":"id","return-object":!1,"persistent-placeholder":"","hide-details":"","hide-selected":"",dense:"",placeholder:e.__("Select or create a class")},on:{input:e.updateClasses,"update:searchInput":function(t){e.newClassName=t},"update:search-input":function(t){e.newClassName=t},blur:e.onBlur},scopedSlots:e._u([{key:"append",fn:function(){return[t("Icon",{attrs:{icon:"ChevronDownIcon",size:12}})]},proxy:!0},{key:"no-data",fn:function(){return[e.newClassName?t(Tc.Z,{attrs:{dense:""},on:{click:function(t){return e.createFromNameAndSelect()}}},[t(Dc.V9,[t("div",{staticClass:"oxy-class-selector-new-class"},[e._v(" "+e._s(e.__("Create"))+" "),t("oxy-class-token",{attrs:{editable:!1,active:!0,demo:!0,name:e.newClassName}})],1)])],1):e._e()]},proxy:!0},{key:"prepend-item",fn:function(){return[e.showSuggestClassName?t(Tc.Z,{attrs:{dense:""},on:{click:e.addSuggestedClass}},[t(Dc.V9,[t("div",{staticClass:"oxy-class-selector-new-class"},[e._v(" "+e._s(e.__("Create"))+" "),t("oxy-class-token",{attrs:{editable:!1,active:!0,demo:!0,name:e.suggestClassName}})],1)])],1):e._e()]},proxy:!0},{key:"prepend",fn:function(){return[e.elementClasses.length?e._e():t("oxy-class-breakpoint-icon",{key:"breakpoint-empty"})]},proxy:!0},{key:"selection",fn:function({item:n,index:s}){return[0===s?t("oxy-class-breakpoint-icon",{key:"breakpoint-empty"}):e._e(),t("div",{staticClass:"oxy-token-drag-indicator",class:{"oxy-token-drag-indicator--active":n===e.draggedOverId,[`oxy-token-drag-indicator--${e.dropPosition}`]:n===e.draggedOverId&&e.dropPosition},attrs:{draggable:"true"},on:{dragstart:function(t){return e.dragStart(t,n)},drag:e.dragMove,dragend:e.dragEnd,mousedown:function(e){e.stopPropagation()}}},[t("oxy-class-token",{attrs:{id:n,active:n===e.activeSelector?.id,"nested-selector":e.getNestedSelectorForActiveSelector(n)},on:{select:e.activateSelector,"clear-select":e.clearSelector,"select-nested":e.selectNestedSelector,"clear-nested":e.clearNestedSelector,"close-menu":e.closeMenu}})],1)]}}],null,!0)},"v-combobox",n,!1))]}}],null,!0)},[t("span",{domProps:{innerHTML:e._s(e.errorMessage)}})])],1)]}}])})},qA=[],XA=n(68697),YA=n(24603),QA=n(87459),JA=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-class-selector-breakpoint"},[t("Icon",{attrs:{icon:e.breakpointIcon,rotate:e.breakpointIconRotation,size:12}})],1)},eZ=[];let tZ=class extends l.w3{get currentBreakpointId(){return c.uiStore.currentBreakpoint.id}get breakpointIcon(){return Pe.b8[this.currentBreakpointId]?.icon||Pe.nR}get breakpointIconRotation(){return Pe.b8[this.currentBreakpointId]?.rotate}};tZ=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],tZ);const nZ=tZ,sZ=nZ;var iZ=(0,N.Z)(sZ,JA,eZ,!1,null,null,null);const oZ=iZ.exports;let aZ=class extends l.w3{constructor(){super(...arguments),this.newClassName=null,this.errorMessage=null,this.draggableItems=[],this.draggingId=null,this.draggedOverId=null,this.dropPosition=null,this.draggingFromIndex=null,this.dropIndex=null,this.containerRect=null}onNewClassNameChange(){this.newClassName&&(this.errorMessage=null)}onElementIdChange(){this.activeSelector&&(c.uiStore.setCurrentElementTab("classes"),c.uiStore.setCurrentElementOxyNestedSelector(void 0))}onTabChange(){if("classes"!==this.tab)return;if(this.activeSelector)return;const e=this.elementClasses.find((e=>{const t=this.availableClasses.find((t=>t.id==e));return t&&!t.locked}));e&&this.activateSelector(e)}get element(){return c.uiStore.activeElement}get elementId(){return c.uiStore.activeElementId}get availableClasses(){return c.globalStore.oxySelectors.filter((e=>"class"===e.type))}get activeSelector(){return c.uiStore.activeOxySelector}get activeNestedSelector(){return c.uiStore.activeOxyNestedSelector}get elementClasses(){return this.element&&this.element?.data?.properties?.meta?.classes||[]}get showSuggestClassName(){const e=this.elementClasses.map((e=>this.availableClasses.find((t=>t.id==e)))).map((e=>e?.name)).filter((e=>e)),t=e.some((e=>e?.match(new RegExp(`^${this.elementSlug}-\\d+$`))));return!this.newClassName&&!t}get elementSlug(){return this.element?(0,tl.nW)(this.element):""}get suggestClassName(){return this.element?(0,tl.Bc)(this.element):""}addSuggestedClass(){this.updateClasses([...this.elementClasses,this.suggestClassName])}createClassIfNeeded(e){const t=this.availableClasses.find((t=>t.name==e));if(t)return t;const n=(0,tl.C2)(e);return(0,tl.PJ)(n),n}createFromNameAndSelect(){if(!this.newClassName)return;const e=this.createClassIfNeeded(this.newClassName);this.activateSelector(e.id)}updateClasses(e){if(!this.elementId)return;if(!e)return void(0,tl.E4)(this.elementId,[]);this.errorMessage=null;const t=e.find((e=>!(0,XA.Z)(e))),n=e.filter((e=>(0,XA.Z)(e)));if(t){if(!t||!String(t).trim())return(0,tl.E4)(this.elementId,n);const e=this.createClassIfNeeded(t).id;this.elementClasses.includes(e)||n.push(e)}(0,tl.E4)(this.elementId,n),this.activateSelector(n[n.length-1])}activateSelector(e){this.elementId&&(c.uiStore.setCurrentElementOxySelector(e),c.uiStore.setCurrentElementTab("classes"),this.closeMenu())}clearSelector(){c.uiStore.setCurrentElementOxySelector(void 0),c.uiStore.setCurrentElementTab(void 0)}selectNestedSelector(e){c.uiStore.setCurrentElementOxyNestedSelector(e)}clearNestedSelector(){c.uiStore.setCurrentElementOxyNestedSelector(void 0)}closeMenu(){this.$refs.input&&(this.$refs.input.isMenuActive=!1,this.$refs.input.blur())}onBlur(e){const t=e.relatedTarget;t?.classList.contains("v-list-item")||(this.newClassName="")}getNestedSelectorForActiveSelector(e){return e===this.activeSelector?.id?this.activeNestedSelector:void 0}dragStart(e,t){this.draggingId=t,e.dataTransfer.dropEffect="move",this.activateSelector(t),document.addEventListener("dragover",this.dragOver,!1);const n=this.$refs.container,s=n.querySelectorAll(".oxy-class-token");this.containerRect=n.getBoundingClientRect(),this.draggableItems=Array.from(s).map((e=>({node:e,rect:e.getBoundingClientRect()})))}dragOver(e){e.preventDefault(),e.dataTransfer.dropEffect="move"}dragMove(e){if(!e.clientX&&!e.clientY)return;const t=this.findClosestItem(e.clientX,e.clientY);if(this.draggedOverId=t.node?.dataset.id||null,this.dropPosition=t.position||null,this.draggedOverId&&this.draggingId){const e=this.elementClasses.indexOf(this.draggedOverId);this.dropIndex="before"==this.dropPosition?e:Math.min(e+1,this.elementClasses.length),this.draggingFromIndex=this.elementClasses.indexOf(this.draggingId),this.dropIndex!==this.draggingFromIndex&&this.dropIndex!==this.draggingFromIndex+1&&this.draggedOverId!==this.draggingId||(this.draggedOverId=null,this.dropPosition=null)}}dragEnd(){null!==this.draggedOverId&&null!==this.draggingFromIndex&&null!==this.dropIndex&&(this.moveItem(this.draggingFromIndex,this.dropIndex),this.clearDragStyles(),document.removeEventListener("dragover",this.dragOver,!1))}clearDragStyles(){this.draggedOverId=null,this.dropPosition=null,this.draggingId=null,this.draggingFromIndex=null,this.dropIndex=null}moveItem(e,t){if(!this.elementId)return;const n=this.elementClasses;if(e===t||e<0||t<0||e>n.length||t>n.length)return;const[s]=n.splice(e,1);t>e&&t--,n.splice(t,0,s),(0,tl.E4)(this.elementId,n)}findClosestItem(e,t){let n={node:null,rect:null},s=1/0,i="";this.draggableItems.forEach((o=>{const a=o.rect.left+o.rect.width/2,r=o.rect.top+o.rect.height/2,l=Math.sqrt(Math.pow(e-a,2)+Math.pow(t-r,2));l<s&&(s=l,n=o,i=e<a?"before":"after")}));const o=this.containerRect.top+this.containerRect.height;return o-t<-50&&(i="after",n=this.draggableItems[this.draggableItems.length-1]),o-t>100&&(i="before",n=this.draggableItems[0]),{position:i,...n}}};(0,r.gn)([(0,l.fI)()],aZ.prototype,"tab",void 0),(0,r.gn)([(0,l.RL)("newClassName")],aZ.prototype,"onNewClassNameChange",null),(0,r.gn)([(0,l.RL)("elementId",{immediate:!0})],aZ.prototype,"onElementIdChange",null),(0,r.gn)([(0,l.RL)("tab",{immediate:!0})],aZ.prototype,"onTabChange",null),aZ=(0,r.gn)([(0,l.wA)({components:{OxyClassBreakpointIcon:oZ,OxygenCopyPastContextMenu:QA.Z,Icon:He.Z,NiceButton:Br.Z,OxyClassToken:YA.Z}})],aZ);const rZ=aZ,lZ=rZ;var cZ=(0,N.Z)(lZ,jA,qA,!1,null,null,null);const dZ=cZ.exports;var uZ=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-html-attributes"},[t("oxygen-control",{attrs:{control:e.control,value:e.value},on:{input:e.setValue}})],1)},pZ=[];let hZ=class extends l.w3{get control(){return{type:"repeater",name:(0,Ft.__)("HTML Attributes"),slug:"html_attributes",noDataMessage:(0,Ft.__)("None"),noDisable:!0,noDuplicate:!0,titleTemplate:e=>`${e?.name||""}="${e?.value||""}"`,defaultTitle:(0,Ft.__)("Attribute"),controls:[{slug:"name",name:(0,Ft.__)("Attribute"),type:"text",disableVariable:!0},{slug:"value",name:(0,Ft.__)("Value"),type:"text",disableVariable:!0}]}}get value(){return j()(c.uiStore.activeElement,"data.properties.settings.advanced.attributes")}setValue(e){c.uiStore.activeElementId&&c.documentStore.unthrottledPropertyChanged({elementId:c.uiStore.activeElementId,path:"settings.advanced.attributes",value:e,meta:{snapshotLabel:`Set html attributes for element #${c.uiStore.activeElementId}`}})}};hZ=(0,r.gn)([(0,l.wA)({components:{OxygenControl:XS["default"]}})],hZ);const gZ=hZ,mZ=gZ;var vZ=(0,N.Z)(mZ,uZ,pZ,!1,null,null,null);const yZ=vZ.exports;var fZ=n(58172);let _Z=class extends l.w3{constructor(){super(...arguments),this.editingElementControlsTreeContext=Tx.rq,this.settingsControlsAsTabs=[{name:(0,Ft.__)("Override Variables"),slug:"override_variables",icon:"DollarSolidIcon",hidden:this.isComponent},{name:(0,Ft.__)("Conditions"),slug:"conditions",icon:"ConditionsSolidIcon"},{name:(0,Ft.__)("Interactions"),slug:"interactions",icon:"ArrowPointerSolidIcon",hidden:this.isComponent},{name:(0,Ft.__)("Animations"),slug:"animations",icon:"PlaySolidIcon",hidden:this.isComponent}]}get activeTabSlug(){return this.elementId&&c.uiStore.activeElementProperties?.tab?c.uiStore.activeElementProperties.tab:this.controls.contentSections.length?"content":"classes"}get tabs(){const e=this.settingsControlsAsTabs;return[{name:(0,Ft.__)("Content"),slug:"content",icon:"PenSolidIcon",hidden:0===this.controls.contentSections.length},{name:(0,Ft.__)("Design"),slug:"design",icon:"PaletteSolidIcon",hidden:0===this.controls.designSections.length||this.isComponent},...e,{name:(0,Ft.__)("Settings"),slug:"settings",icon:"GearSolidIcon",hidden:0===this.controls.settingsSections.length||this.isComponent},{name:(0,Ft.__)("Classes"),slug:"classes",icon:"ClassesIcon",hidden:!0},{name:(0,Ft.__)("Attributes"),slug:"attributes",hidden:!0}]}get filteredTabs(){return this.tabs.filter((e=>!e?.hidden))}get activeTab(){return this.tabs.find((e=>e.slug===this.activeTabSlug))}get element(){return c.uiStore.activeElement}get elementId(){return c.uiStore.activeElementId}get activeSelector(){return c.uiStore.activeOxySelector}get activeNestedSelector(){return c.uiStore.activeOxyNestedSelector}get controls(){const e=this.element.data.type,t=c.configStore.element(e).controls;return(0,dx.Z)(t,c.configStore.permission)}get controlSections(){return"content"===this.activeTabSlug?this.controls.contentSections:"design"===this.activeTabSlug?this.controls.designSections:this.isTopLevelSettingsTab(this.activeTabSlug)?this.controls.settingsSections.filter((e=>e.slug===this.activeTabSlug)):"settings"===this.activeTabSlug?this.controls.settingsSections.filter((e=>!this.settingsControlsAsTabs.some((t=>t.slug===e.slug)))):[]}get path(){return"content"===this.activeTabSlug?"content":"design"===this.activeTabSlug?"design":this.isTopLevelSettingsTab(this.activeTabSlug)||"settings"===this.activeTabSlug?"settings":""}get isComponent(){return!!this.element&&this.element?.data?.type===Ge.COMPONENT_SLUG}isTopLevelSettingsTab(e){return this.settingsControlsAsTabs.some((t=>t.slug===e))}updateTab(e){c.uiStore.setCurrentElementOxySelector(void 0),c.uiStore.setCurrentElementTab(e)}getSettingsData(e){const t=this.isTopLevelSettingsTab(e),n=t?`settings.${e}`:e,s=this.editingElementControlsTreeContext.getControlValue(n);if("settings"===e){const e=(0,wd.Z)(s);return(0,fZ.Kn)(e)?(this.settingsControlsAsTabs.forEach((t=>delete e[t.slug])),e):e}return s}setSettingsData(e,t){if(!this.elementId)return;const n=this.isTopLevelSettingsTab(e),s=n?`settings.${e}`:e;"settings"!==e?c.documentStore.throttledPropertyChanged({elementId:this.elementId,path:s,value:t,meta:{snapshotLabel:(0,Ft.gB)((0,Ft.H$)("Paste %s","Oxygen Control","%s: Control slug/name"),e)}}):this.updateSettingsButIgnoreTopLevelTabs(t)}updateSettingsButIgnoreTopLevelTabs(e){if(!this.elementId)return;const t=(0,wd.Z)(this.editingElementControlsTreeContext.getControlValue("settings"))||{},n=(0,wd.Z)(e)||{};this.settingsControlsAsTabs.forEach((e=>{(0,fZ.Kn)(t)&&e.slug in t&&(n[e.slug]=t[e.slug])})),c.documentStore.throttledPropertyChanged({elementId:this.elementId,path:"settings",value:n,meta:{snapshotLabel:(0,Ft.__)("Paste settings")}})}tabHasData(e){return(0,XC.vr)(this.getSettingsData(e))}};(0,r.gn)([(0,l.DF)("context")],_Z.prototype,"editingElementControlsTreeContext",void 0),_Z=(0,r.gn)([(0,l.wA)({components:{PanelMask:xT,Icon:He.Z,ControlsTree:_C["default"],ClassDropdown:dZ,ClassProperties:KA,OxygenHtmlAttributes:yZ,OxygenCopyPastContextMenu:QA.Z}})],_Z);const bZ=_Z,SZ=bZ;var CZ=(0,N.Z)(SZ,MA,BA,!1,null,null,null);const xZ=CZ.exports;let wZ=class extends s.ZP{get elementIsActive(){return!!c.uiStore.activeElement}mounted(){this.elementIsActive||(0,Bu.TO)("elementproperties")}};wZ=(0,r.gn)([(0,l.wA)({components:{Titlebar:aC,TabsAndControls:Mx,BlankSidebarContent:hC,OxygenTabsAndControls:xZ}})],wZ);const IZ=wZ,PZ=IZ;var kZ=(0,N.Z)(PZ,ZA,OA,!1,null,null,null);const EZ=kZ.exports;var TZ=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vscroll-wrap vscroll-scroll"},[t("PanelHeader",{attrs:{"back-instead-of-close":!!e.selector},on:{close:e.close},scopedSlots:e._u([e.selectorName?null:{key:"right",fn:function(){return[t("IconButton",{attrs:{icon:"FolderPlusIcon",size:"14",small:"",tooltip:e.__("Add Collection")},on:{click:e.addCollection}}),t("IconButton",{attrs:{icon:"HistorySolidIcon",size:"13",small:"",active:"history"===e.viewMode,tooltip:e.__("History")},on:{click:e.toggleViewMode}}),t("ImportExportDropdownMenu",{attrs:{name:e.__("Selectors"),"settings-to-export":e.selectors,"validate-settings":e.validateImport,"import-settings":e.importSelectors,"can-merge":!0}})]},proxy:!0}],null,!0)},[e._v(" "+e._s(e.selectorName??e.__("Selectors"))+" ")]),t("FreeModeAlertForSelectors",{staticClass:"ma-4"}),"controls"===e.viewMode?[e.selector||e.nestedSelector?t("ClassProperties",{attrs:{selector:e.selector,"nested-selector":e.nestedSelector}}):t("SelectorsList",{attrs:{selectors:e.selectors,searchable:!0},on:{select:e.select,"select-nested":e.selectNested}})]:"history"===e.viewMode?[t("SelectorsPanelHistoryViewMode")]:e._e()],2)},DZ=[],AZ=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"vscroll-wrap vscroll-scroll"},[t("div",{staticClass:"vscroll-scroll oxy-selectors-list"},[e.searchString?t("div",e._l(e.filteredSelectors,(function(n){return t("SelectorsListItem",{key:n.id,attrs:{selector:n},on:{select:function(t){return e.$emit("select",t)},"select-nested":function(t){return e.$emit("select-nested",n.id,t)},"update-nested":e.handleNestedDrag}})})),1):t("CollectionsInput",{attrs:{collections:e.collections,"resource-name":"selectors",value:e.selectors},on:{"update-collections":e.setCollections,input:e.setSelectors},scopedSlots:e._u([{key:"actions",fn:function({collection:n}){return[t("IconButton",{attrs:{icon:e.isLocked(n)?"LockIcon":"UnlockIcon",size:"12",tooltip:e.isLocked(n)?e.__("Unlock all"):e.__("Lock all")},on:{click:function(t){return e.toggleCollectionLock(n)}}})]}},{key:"default",fn:function({collection:n}){return[t("draggable",e._b({attrs:{value:e.selectorsByCollection[n],group:"oxy-selectors"},on:{input:function(t){return e.handleDrag(t,n)}}},"draggable",e.dragOptions,!1),e._l(e.selectorsByCollection[n],(function(n){return t("SelectorsListItem",{key:n.id,attrs:{selector:n},on:{select:function(t){return e.$emit("select",t)},"select-nested":function(t){return e.$emit("select-nested",n.id,t)},"update-nested":e.handleNestedDrag}})})),1),t("AddSelector",{attrs:{collection:n}})]}}])})],1),e.searchable?t("div",{staticClass:"properties-panel-search-box-wrap properties-panel-search-box-wrap-selectors"},[t("TextInput",{attrs:{placeholder:e.__("Search selectors")},model:{value:e.searchString,callback:function(t){e.searchString=t},expression:"searchString"}}),t("Icon",{staticClass:"properties-panel-search-icon",attrs:{icon:"SearchIcon",size:"13"}})],1):e._e()])},ZZ=[],OZ=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-selectors-list-item"},[t("oxy-class-token",{attrs:{id:e.selector.id,name:e.name,removable:!1},on:{select:function(t){return e.$emit("select",t)},"select-nested":function(t){return e.$emit("select-nested",t)}}}),e.selector.children?.length?t("div",{staticClass:"oxy-selectors-list-nested"},[t("draggable",e._b({attrs:{value:e.selector.children},on:{input:function(t){return e.$emit("update-nested",e.selector.id,t)}}},"draggable",e.dragOptions,!1),e._l(e.selector.children,(function(n){return t("div",{key:n.id,staticClass:"oxy-selectors-list-nested-item"},[t("Icon",{attrs:{icon:"ArrowTurnDownRightIcon",size:"13"}}),t("oxy-class-token",{attrs:{id:e.selector.id,"nested-selector":n,name:n.name,creatable:!1,removable:!1,lockable:!1,"hide-nested-token":!0},on:{select:function(t){return e.$emit("select-nested",n.id)},"select-nested":function(t){return e.$emit("select-nested",t)}}})],1)})),0)],1):e._e()],1)},MZ=[];let BZ=class extends l.w3{constructor(){super(...arguments),this.dragOptions={animation:200,filter:".oxy-class-token-actions__button",ghostClass:"breakdance-repeater-item--ghost",forceFallback:!0}}get name(){return"class"===this.selector.type?`.${this.selector.name}`:this.selector.name}};(0,r.gn)([(0,l.fI)()],BZ.prototype,"selector",void 0),BZ=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,draggable:ev(),OxyClassToken:YA.Z}})],BZ);const LZ=BZ,NZ=LZ;var FZ=(0,N.Z)(NZ,OZ,MZ,!1,null,null,null);const RZ=FZ.exports;var VZ=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"oxy-add-selector"},[t("TextInput",{staticClass:"flex-grow-1",attrs:{placeholder:e.__(".your.css > #selector-69::after")},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.addSelector.apply(null,arguments)}},model:{value:e.newSelectorName,callback:function(t){e.newSelectorName=t},expression:"newSelectorName"}}),t("NiceButton",{staticClass:"oxy-add-selector__button",attrs:{size:"small"},on:{click:e.addSelector}},[e._v(" "+e._s(e.__("Add"))+" ")])],1)},$Z=[];let WZ=class extends s.ZP{constructor(){super(...arguments),this.newSelectorName=""}get collections(){return Q.cr.oxySelectorsCollections}get isSingleClassName(){if(!this.newSelectorName)return!1;const e=/^\.[a-zA-Z0-9_/-]+$/;return e.test(this.newSelectorName)}addSelector(){if(!this.newSelectorName)return;const e=this.isSingleClassName&&this.newSelectorName.startsWith(".")?this.newSelectorName.substring(1):this.newSelectorName;if((0,tl.hP)(e))return void cd.Z.log.errorMessage((0,Ft.__)("This selector already exists."));const t=(0,tl.C2)(this.newSelectorName,null,this.isSingleClassName?"class":"custom",this.collection||tl.T8);(0,tl.PJ)(t),this.newSelectorName=""}};(0,r.gn)([(0,l.fI)()],WZ.prototype,"collection",void 0),WZ=(0,r.gn)([(0,l.wA)({components:{DropdownInput:Cd.Z,NiceButton:Br.Z,TextInput:na.Z}})],WZ);const UZ=WZ,zZ=UZ;var HZ=(0,N.Z)(zZ,VZ,$Z,!1,null,null,null);const GZ=HZ.exports;let KZ=class extends s.ZP{constructor(){super(...arguments),this.searchString="",this.dragOptions={animation:200,filter:".oxy-class-token-actions__button",ghostClass:"breakdance-repeater-item--ghost",forceFallback:!0},this.selectorsByCollection={}}onValueChange(){this.updateInternalValue(),this.checkMissingCollections()}checkMissingCollections(){const e=[...new Set(this.selectors.map((e=>e.collection)))],t=e.filter((e=>!this.collections.includes(e)));t.length&&Q.cr.setOxygenSelectorsCollections(e)}onColsChange(){this.updateInternalValue()}updateInternalValue(){this.collections.forEach((e=>{this.$set(this.selectorsByCollection,e,this.getCollectionSelectors(e))}))}get collections(){return Q.cr.oxySelectorsCollections}get filteredSelectors(){return this.selectors.filter((e=>{if(!this.searchString)return!0;const t=e.name.toLowerCase().includes(this.searchString.toLowerCase()),n=e.children?.some((e=>e.name.includes(this.searchString)));return t||n}))}handleDrag(e,t){this.selectorsByCollection[t]=e.map((e=>({...e,collection:t})));const n=[];this.collections.forEach((e=>{n.push(...this.selectorsByCollection[e])})),this.setSelectors(n)}handleNestedDrag(e,t){const n=(0,wd.Z)(this.selectors).map((n=>n.id===e?{...n,children:t}:n));this.setSelectors(n)}setSelectors(e){Ie.n.transaction((()=>{Q.cr.setOxygenSelectors((0,wd.Z)(e))}),"Update Selectors")}setCollections(e){Ie.n.transaction((()=>{Q.cr.setOxygenSelectorsCollections(e)}),"Update Selector Collections")}getCollectionSelectors(e){return this.selectors.filter((t=>t.collection===e))}isLocked(e){return this.selectors.filter((t=>t.collection===e)).every((e=>e.locked))}toggleCollectionLock(e){const t=(0,wd.Z)(this.selectors),n=t.filter((t=>t.collection===e)),s=n.some((e=>!e.locked)),i=t.map((t=>(t.collection===e&&(t.locked=s),t)));this.setSelectors(i)}};(0,r.gn)([(0,l.fI)()],KZ.prototype,"searchable",void 0),(0,r.gn)([(0,l.fI)()],KZ.prototype,"selectors",void 0),(0,r.gn)([(0,l.RL)("selectors",{immediate:!0,deep:!0})],KZ.prototype,"onValueChange",null),(0,r.gn)([(0,l.RL)("collections",{immediate:!0,deep:!0})],KZ.prototype,"onColsChange",null),KZ=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z,AddSelector:GZ,CollectionsInput:XE,Icon:He.Z,draggable:ev(),TextInput:na.Z,OxyClassToken:YA.Z,SelectorsListItem:RZ}})],KZ);const jZ=KZ,qZ=jZ;var XZ=(0,N.Z)(qZ,AZ,ZZ,!1,null,null,null);const YZ=XZ.exports;var QZ=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("RevisionsPanel",{attrs:{resources:e.selectors,"resource-key":e.resourceKey,"resource-has-unsaved-changes-present":e.hasUnsavedChangesPresent,"fetch-revisions-method":e.fetchRevisionsMethod,"update-method":"setOxygenSelectors","restore-method":"restoreOxySelectorsRevision"}})},JZ=[];async function eO(){return(0,su.zG)(await(0,ad.D)({action:"breakdance_retrieve_oxy_selectors_revisions",decoder:iu.IX(GI.tm)}),(0,ou.Vn)((()=>null)),ou.i$)}let tO=class extends l.w3{constructor(){super(...arguments),this.resourceKey="oxySelectors"}get selectors(){return c.globalStore.oxySelectors}get hasUnsavedChangesPresent(){return c.globalStore.oxySelectorsHasUnsavedChangesPresent}get fetchRevisionsMethod(){return eO}};tO=(0,r.gn)([(0,l.wA)({components:{RevisionsPanel:YP}})],tO);const nO=tO,sO=nO;var iO=(0,N.Z)(sO,QZ,JZ,!1,null,"07b9a160",null);const oO=iO.exports;function aO(e,t,n="name",s=!0,i=!0){const o=t.map((e=>e[n])),a=e.filter((e=>!o.includes(e[n]))),r=t.map((t=>{const o=e.find((e=>e[n]===t[n]));if(o&&i&&(t.id=o.id),t.children&&s&&o&&o.children){const e=o.children.map((e=>e[n])),s=t.children.filter((t=>!e.includes(t[n])));return{...t,children:[...o.children,...s]}}return t}));return{selectorsToKeep:a,selectors:[...a,...r]}}let rO=class extends s.ZP{constructor(){super(...arguments),this.selectorId=null,this.nestedId=null}get selector(){return this.selectors.find((e=>e.id===this.selectorId))}get nestedSelector(){return this.selector?.children?.find((e=>e.id===this.nestedId))}get viewMode(){return c.uiStore.panelState.selectorsPanelPanelActiveViewMode}get selectors(){return c.globalStore.oxySelectors}get selectorName(){return this.selector?this.nestedSelector?`.${this.selector.name} ${this.nestedSelector.name}`:"class"===this.selector.type?`.${this.selector.name}`:this.selector.name:null}get collections(){return c.globalStore.oxySelectorsCollections}toggleViewMode(){c.uiStore.setPanelState({...c.uiStore.panelState,selectorsPanelPanelActiveViewMode:"controls"===this.viewMode?"history":"controls"})}select(e){this.selectorId=e}selectNested(e,t){this.selectorId=e,this.nestedId=t}close(){this.selector?(this.selectorId=null,this.nestedId=null):(0,Bu.TO)("oxySelectors")}validateImport(e){return(0,su.zG)(e,iu.IX(Dw.En).decode,(0,ou.g_)((e=>(cd.Z.log.errorMessage((0,Ft.__)("Error importing Selectors - the file is invalid.")),(0,Fb.H)(e),!1)),(()=>!0)))}importSelectors(e,t){e.length?Ie.n.transaction((()=>{if("replace"===t)c.globalStore.setOxygenSelectors(e),cd.Z.log.message((0,Ft.gB)((0,Ft.__)("%s selectors imported. All existing selectors were replaced."),e.length));else{const{selectorsToKeep:t,selectors:n}=aO(c.globalStore.oxySelectors,e);c.globalStore.setOxygenSelectors(n),cd.Z.log.message((0,Ft.gB)((0,Ft.__)("%s selectors imported. %s existing selectors were kept."),e.length,t.length))}}),"Import Selectors"):cd.Z.log.errorMessage((0,Ft.__)("Error importing Selectors - the file is empty."))}addCollection(){const e=tl.hI,t=this.collections;let n=1;while(t.includes(`${e} ${n}`))n++;const s=`${e} ${n}`;c.globalStore.setOxygenSelectorsCollections([...t,s])}};rO=(0,r.gn)([(0,l.wA)({components:{ImportExportDropdownMenu:xP,AddSelector:GZ,AlertBox:Ag.Z,PanelHeader:uI,SelectorsList:YZ,RevisionsPanel:YP,ClassProperties:KA,BrowseModeToggle:OI,PanelHeaderButton:EI,FreeModeAlertForSelectors:sk.Z,SelectorsPanelHistoryViewMode:oO,IconButton:Xa.Z}})],rO);const lO=rO,cO=lO;var dO=(0,N.Z)(cO,TZ,DZ,!1,null,null,null);const uO=dO.exports;let pO=class extends s.ZP{constructor(){super(...arguments),this.reactivePanelContext={state:this.panelState,position:this.position},this.panelContext=this.reactivePanelContext}get builderMode(){return c.configStore.builderMode}get activeElementId(){return c.uiStore.activeElementId}updatePanelContext(){this.reactivePanelContext.state=this.panelState}};(0,r.gn)([(0,l.fI)()],pO.prototype,"position",void 0),(0,r.gn)([(0,l.fI)()],pO.prototype,"panelState",void 0),(0,r.gn)([(0,l.RL)("panelState")],pO.prototype,"updatePanelContext",null),(0,r.gn)([(0,l.DF)("panelContext")],pO.prototype,"panelContext",void 0),pO=(0,r.gn)([(0,l.wA)({components:{OxySelectorsPanel:uO,VariablesPanel:TT,PresetsPanel:OD,AppLayoutBodyPanelArea:NE,HistoryAndRevisionsPanel:DE,StructurePanel:nE,ElementPropertiesPanel:Rx,Add:vI,GlobalSettingsPanel:EP,SelectorsPanel:wk,AIPanel:AA,OxygenElementPropertiesPanel:EZ}})],pO);const hO=pO,gO=hO;var mO=(0,N.Z)(gO,RS,VS,!1,null,null,null);const vO=mO.exports;var yO=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-app-wrapper"},[t("div",{staticClass:"breakdance-top-bar-wrapper"},[e._t("topbar")],2),t("div",{staticClass:"breakdance-app-body-wrapper"},[e._t("body")],2)])},fO=[];let _O=class extends s.ZP{};_O=(0,r.gn)([l.wA],_O);const bO=_O,SO=bO;var CO=(0,N.Z)(SO,yO,fO,!1,null,null,null);const xO=CO.exports;var wO=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",e._l(e.closingConfirmations,(function(n,s){return t("ConfirmDialog",{key:s,attrs:{type:n.type,"save-is-enabled":!n.chosenOption,"save-is-in-progress":n.isSaving,"discard-is-enabled":!n.chosenOption,"discard-is-in-progress":n.isDiscarding,"has-cancel":n.hasCancel,"has-discard":n.hasDiscard,"action-text":n.actionText,show:n.show},on:{discard:function(t){return e.markClosingConfirmationAs(s,"discard")},save:function(t){return e.markClosingConfirmationAs(s,"save")},cancel:function(t){return e.hideClosingConfirmation(s)},"click:outside":function(t){return e.hideClosingConfirmation(s)}},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(n.title)+" ")]},proxy:!0},{key:"text",fn:function(){return[e._v(e._s(n.text))]},proxy:!0}],null,!0)})})),1)},IO=[];let PO=class extends l.w3{get closingConfirmations(){return Object.fromEntries(Object.entries(Q.kD.closingConfirmations).filter((([,e])=>e&&e.show)))}markClosingConfirmationAs(e,t){Q.kD.chooseOptionForClosingConfirmation({subject:e,chosenOption:t})}hideClosingConfirmation(e){Q.kD.hideClosingConfirmation(e)}};PO=(0,r.gn)([(0,l.wA)({components:{ConfirmDialog:uh.Z}})],PO);const kO=PO,EO=kO;var TO=(0,N.Z)(EO,wO,IO,!1,null,null,null);const DO=TO.exports;var AO=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Dialog",{attrs:{value:!0,persistent:""},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.__("This post can't be edited directly.")))]},proxy:!0},{key:"text",fn:function(){return[e.templateName?[t("p",[e.templateIsFallback?[e._v(" "+e._s(e.sprintf(e.__(e._doc('This post is rendered with a builder\'s internal "%s" template.',"%s: Template name")),e.decodedTemplateName))+" ")]:[e._v(" "+e._s(e.sprintf(e._doc('This post is rendered with a "%s" template.',"%s: Template name"),e.decodedTemplateName))+" ")]],2)]:[t("p",[e.templateIsFallback?[e._v(" "+e._s(e._doc("This post is rendered with a builder's internal template.","%s: Template name"))+" ")]:[e._v(" "+e._s(e.__("This post is rendered with a template."))+" ")]],2)],e.templateIsFallback?t("p",[e._v(" "+e._s(e.__("Please create your own template."))+" ")]):t("p",[e._v(" "+e._s(e.sprintf(e._x("The template does not contain a Template Content Area element. Therefore, the posts it applies to are not editable in %s.","Plugin name"),e.$bdox("plugin_name")))+" ")])]},proxy:!0},{key:"actions",fn:function(){return[e.templateIsFallback&&e.templatesPageUrl?t(Qo.Z,{attrs:{text:"",href:e.templatesPageUrl}},[e._v(" "+e._s(e.__("Templates page"))+" ")]):e.templateIsFallback?e._e():t(Qo.Z,{attrs:{text:"",href:e.templateUrl}},[e._v(" "+e._s(e.__("Edit Template"))+" ")]),t(Qo.Z,{attrs:{dark:"",color:"blue",href:e.backToAdmin}},[e._v(e._s(e.__("Go back")))])]},proxy:!0}])})},ZO=[];let OO=class extends s.ZP{get decodedTemplateName(){const e=document.createElement("textarea");return e.innerHTML=this.templateName,e.value}get templateUrl(){return(0,Hl.UH)(this.templateId)}get backToAdmin(){return Q.PK.documentSpecificNeededUrls?Q.PK.documentSpecificNeededUrls.backToWordPressUrl??"":""}};(0,r.gn)([(0,l.fI)()],OO.prototype,"templateName",void 0),(0,r.gn)([(0,l.fI)()],OO.prototype,"templateId",void 0),(0,r.gn)([(0,l.fI)()],OO.prototype,"templateIsFallback",void 0),(0,r.gn)([(0,l.fI)()],OO.prototype,"templatesPageUrl",void 0),OO=(0,r.gn)([(0,l.wA)({components:{Dialog:ta.Z}})],OO);const MO=OO,BO=MO;var LO=(0,N.Z)(BO,AO,ZO,!1,null,null,null);const NO=LO.exports;var FO=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("Dialog",{attrs:{value:!0,persistent:""},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.__("Invalid post")))]},proxy:!0},{key:"text",fn:function(){return["post_does_not_exist"===e.invalidPostData.errorType?t("div",[e._v(" "+e._s(e.__("The requested post doesn't exist. It may have been deleted, or maybe you used an outdated URL."))+" ")]):e._e(),"post_is_in_trash"===e.invalidPostData.errorType?t("div",[e._v(" "+e._s(e.__("You can't edit this item because it is in the Trash. Please restore it and try again."))+" ")]):e._e(),"post_type_is_banned"===e.invalidPostData.errorType?t("div",[e.invalidPostData.postType?[e._v(" "+e._s(e.sprintf(e._doc('Posts with post type "%s" can\'t be edited with %s directly. Please use a %s Template instead.',"1: Post type name, 2: Plugin name, 3: Plugin name"),e.invalidPostData.postType,e.$bdox("plugin_name"),e.$bdox("plugin_name")))+" ")]:[e._v(" "+e._s(e.sprintf(e._doc("The requested post can't be edited with %s.","%s: Plugin name"),e.$bdox("plugin_name")))+" ")]],2):e._e(),"post_type_is_restricted"===e.invalidPostData.errorType?t("div",[e._v(" "+e._s(e.sprintf(e._doc('You don\'t have enough permissions to edit "%s" post type.',"%s: Post type name"),e.invalidPostData.postType))+" ")]):e._e()]},proxy:!0},{key:"actions",fn:function(){return[t(Qo.Z,{attrs:{dark:"",color:"blue",href:e.invalidPostData.backToAdminUrl}},[e._v(" "+e._s(e.__("Back to WordPress admin"))+" ")])]},proxy:!0}])})},RO=[];let VO=class extends s.ZP{get invalidPostData(){return Q.PK.invalidPostData}};VO=(0,r.gn)([(0,l.wA)({components:{Dialog:ta.Z}})],VO);const $O=VO,WO=$O;var UO=(0,N.Z)(WO,FO,RO,!1,null,null,null);const zO=UO.exports;var HO=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.isComponentType&&e.totalRootChildren>1?t("div",{staticClass:"components-root-tag-warning"},[e._v(" "+e._s(e.__("Components must have a single root tag."))+" ")]):e._e()},GO=[];let KO=class extends l.w3{get totalRootChildren(){return c.documentStore.document.tree.root.children.length}get isComponentType(){return c.documentStore.document.documentMeta.postType===zd.Zr}};KO=(0,r.gn)([(0,l.wA)({})],KO);const jO=KO,qO=jO;var XO=(0,N.Z)(qO,HO,GO,!1,null,"1432a125",null);const YO=XO.exports;var QO=function(){var e=this,t=e._self._c;e._self._setupProxy;return"breakdance"===e.builderMode?t("button",{staticClass:"preview-mode-close-button",on:{click:e.togglePreviewMode}},[e._v(" "+e._s(e.__("Close Preview"))+" ")]):"oxygen"===e.builderMode?t("button",{staticClass:"preview-mode-close-button-oxygen",on:{click:e.togglePreviewMode}},[t("Icon",{attrs:{icon:"CloseSolidIcon"}})],1):e._e()},JO=[];let eM=class extends l.w3{togglePreviewMode(){c.uiStore.togglePreviewMode()}get builderMode(){return c.configStore.builderMode}get isPreviewMode(){return c.uiStore.isPreviewMode}onIsPreviewModeChange(){if(this.isPreviewMode){const e=new Event("breakdance_play_animations",{bubbles:!0});window.Breakdance.canvas.document.dispatchEvent(e)}}};(0,r.gn)([(0,l.RL)("isPreviewMode",{immediate:!0})],eM.prototype,"onIsPreviewModeChange",null),eM=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],eM);const tM=eM,nM=tM;var sM=(0,N.Z)(nM,QO,JO,!1,null,null,null);const iM=sM.exports;var oM=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-left-panel-new",class:{"singularity-left-panel-new--highlighted":e.isLeftPanelHighlighted}},[t("div",{staticClass:"singularity-left-panel-new__content"},["page_structure"===e.singularityLeftPanelState?t("PageStructureNew"):e._e(),"brand"===e.singularityLeftPanelState?t("BrandPanel"):e._e(),"brand_edit_color"===e.singularityLeftPanelState?t("BrandPanelColorEdit"):e._e(),"brand_edit_typography"===e.singularityLeftPanelState?t("BrandPanelTypographyEdit"):e._e(),"page_manager"===e.singularityLeftPanelState?t("WPPageManagerNew"):e._e(),"section_add_or_swap"===e.singularityLeftPanelState?t("SectionAddOrSwapPanelNew"):e._e(),"image_editor"===e.singularityLeftPanelState?t("ImageEditor",{key:e.imageEditorKey}):e._e(),"background_image_editor"===e.singularityLeftPanelState?t("BackgroundImageEditor"):e._e(),"icon_editor"===e.singularityLeftPanelState?t("IconEditor"):e._e(),"text_editor"===e.singularityLeftPanelState?t("TextEditor"):e._e(),"link_editor"===e.singularityLeftPanelState?t("LinkEditor"):e._e(),"content_properties_editor"===e.singularityLeftPanelState?t("ContentPropertiesEditor"):e._e(),"header_footer_editor"===e.singularityLeftPanelState?t("HeaderAndFooterEditor"):e._e(),"add_new_section"===e.singularityLeftPanelState?t("NewSectionPanel"):e._e(),"rewrite_section"===e.singularityLeftPanelState?t("RewriteSectionPanel"):e._e(),t("FeedbackBox")],1)])},aM=[],rM=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[e._v(" I am the section writer. "),t(ed.Z,{attrs:{label:"Section ID",type:"number",outlined:"",dense:""},model:{value:e.sectionId,callback:function(t){e.sectionId=e._n(t)},expression:"sectionId"}}),t(Qo.Z,{on:{click:e.writeSection}},[e._v("Write Content")]),t(Qo.Z,{on:{click:e.populateImages}},[e._v("Populate Images")])],1)},lM=[];let cM=class extends s.ZP{constructor(){super(...arguments),this.sectionId=-1}async writeSection(){er.P.addJob((async e=>{await(0,tr.H2)(this.sectionId,e)}),{jobType:"section_rewrite",documentId:c.documentStore.document.documentMeta.id,elementId:this.sectionId,description:`Section rewrite triggered manually from SectionWriter for section ${this.sectionId}`,priority:"critical",snapshotLabel:"Write Section with AI"})}async populateImages(){er.P.addJob((async e=>{await(0,tr.SW)(this.sectionId,e)}),{jobType:"section_image_replacement",documentId:c.documentStore.document.documentMeta.id,elementId:this.sectionId,description:`Image population triggered manually from SectionWriter for section ${this.sectionId}`,priority:"high",snapshotLabel:"Populate Images in Section with AI"})}};cM=(0,r.gn)([(0,l.wA)({components:{}})],cM);const dM=cM,uM=dM;var pM=(0,N.Z)(uM,rM,lM,!1,null,null,null);const hM=pM.exports;var gM=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"page-structure vscroll-wrap vscroll-scroll"},[t("div",{class:{"page-structure-content-wrapper":!0,"page-structure-content-wrapper-drag-in-progress":e.isDragging}},[t("PageStructureHeader"),e.isOpeningPage?t("div",{staticClass:"page-structure__loading"},[t("span",{staticClass:"page-structure__loading-title"},[t("Icon",{staticClass:"animate-spin",attrs:{icon:"CircleNotchSolidIcon",size:"18"}}),e._v("Loading page...")],1),t("span",{staticClass:"page-structure__loading-text"},[e._v("This will take a few seconds.")])]):e.structure.length?t("div",{staticClass:"page-structure__sections-wrapper"},[t("span",{staticClass:"page-structure__top-bar"},[t("span",[e._v(" Drag sections to reorder.")]),t("NiceButton",{attrs:{color:"gray",size:"small","left-icon":"PlusIconSolid"},on:{click:e.addSection}},[e._v("Add Section")])],1),t("div",{staticClass:"page-structure-sections-wrapper"},[t("div",{staticClass:"page-structure-sections"},[t("draggable",{attrs:{value:e.structure,handle:".page-structure-section__title-bar",options:e.draggableOptions},on:{change:e.handleChange,start:e.onDragStart,end:e.onDragEnd}},e._l(e.structure,(function(n,s){return t("PageStructureSectionNew",{key:n.nodeId,attrs:{value:n,index:s,active:!e.isDragging&&e.isActive(n.nodeId),dragOperationInProgress:e.isDragging,currentlyBeingDragged:e.currentlyDraggedNodeId===n.nodeId}})})),1)],1)])]):t("div",{staticClass:"page-structure-section__empty-state",on:{click:e.addSection}},[t("NiceButton",{attrs:{color:"gray",size:"large","left-icon":"PlusIconSolid"},on:{click:function(t){return t.stopPropagation(),e.addSection.apply(null,arguments)}}},[e._v("Add Section")])],1)],1)])},mM=[];function vM(e){return e.root.children.filter((e=>e.data.type!==Us.Uu&&e.data.type!==Us.hO)).map(yM)}function yM(e){return{nodeId:e.id,description:(0,ir.EJ)(e)}}function fM(e,t){c.documentStore.unthrottledPropertyChanged({elementId:e,path:"meta.promptInfo.sectionDescription",meta:{snapshotLabel:`Updated sectionDescription for "${e}"`},value:t})}function _M(e,t){c.documentStore.unthrottledPropertyChanged({elementId:e,path:"meta.friendlyName",meta:{snapshotLabel:`Updated friendly name for element "${e}"`},value:t.trim()})}function bM(e,t){const n=t.root.children.some((e=>e.data.type===Us.Uu));return n?e+1:e}var SM=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:e.classList},[t("div",{staticClass:"page-structure-section__title-bar",on:{click:e.activateSection}},[t("div",{staticClass:"page-structure-section-drag-handle"},[t("Icon",{staticClass:"page-structure-section-drag-handle__icon",attrs:{size:"18",icon:"GripVerticalSolidIcon"}})],1),t("div",{staticClass:"page-structure-section__title-bar__title"},[e.active?t("InlineTextEdit",{staticClass:"page-structure-section__title-bar__title",attrs:{value:e.title,component:"span"},on:{update:e.updateSectionFriendlyName}}):t("span",[e._v(e._s(e.title))]),e.active||e.isSectionCurrentlyRewritingWithAi?t("span",{staticClass:"page-structure-section__active-indicator"}):e._e()],1),t("div",{staticClass:"page-structure-section__title-bar__actions"},[t(ck.Z,{attrs:{top:"","max-width":"180","content-class":"singularity-tooltip",transition:"0"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("div",e._g({staticClass:"page-structure-section__title-bar__action",attrs:{role:"button"},on:{click:function(t){return t.stopPropagation(),e.duplicateSection.apply(null,arguments)}}},n),[t("Icon",{attrs:{icon:"DuplicateSolidIcon",size:14}})],1)]}}])},[t("span",{staticClass:"singularity-tooltip__text"},[e._v(" Duplicate Section ")])]),t(ck.Z,{attrs:{top:"","max-width":"180","content-class":"singularity-tooltip",transition:"0"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("div",e._g({staticClass:"page-structure-section__title-bar__action",attrs:{role:"button"},on:{click:function(t){return t.stopPropagation(),e.deleteSection.apply(null,arguments)}}},n),[t("Icon",{attrs:{icon:"TrashSolidIcon",size:14}})],1)]}}])},[t("span",{staticClass:"singularity-tooltip__text"},[e._v(" Delete Section ")])])],1)]),e.active?t("div",{staticClass:"page-structure-section__content"},[t("div",{staticClass:"page-structure-section__content-wrapper"},[t("div",{staticClass:"page-structure-section__content-field"},[t("label",[e._v("Layout")]),e.sectionCardData?t("SectionCard",{staticClass:"section-card-not-tall section-card-in-page-structure-panel",attrs:{value:e.sectionCardData,showLabel:!0},nativeOn:{click:function(t){return e.openSectionLibrary("swap")}}}):e._e()],1),t("NiceButton",{attrs:{"left-icon":"Grid2Icon",color:"gray",expanded:"true"},on:{click:function(t){return e.openSectionLibrary("swap")}}},[e._v("Update Layout ")]),e.hasBackgroundImage?[t("div",{staticClass:"page-structure-section__divider"}),e.hasBackgroundImage?t("SingularityImageMediaPreview",{attrs:{value:e.value}}):e._e(),t("NiceButton",{attrs:{"left-icon":"ImageIcon",color:"gray",expanded:"true"},on:{click:e.editBackgroundImage}},[e._v("Change Image ")])]:e._e(),t("div",{staticClass:"page-structure-section__divider"}),t("EditWithAiButton",{attrs:{nodeId:e.value.nodeId}}),t("div",{staticClass:"page-structure-section__divider"}),t("PageStructureSectionColorsNewV2",{attrs:{elementId:e.value.nodeId}})],2)]):e._e()])},CM=[],xM=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.internalValue?t("div",{staticClass:"singularity-image-preview"},[t("div",{staticClass:"page-structure-section__content-field"},[t("label",[e._v("Background Image")]),t("div",{staticClass:"breakdance-media-input-single",attrs:{role:"button"},on:{click:e.editBackgroundImage}},[t("MediaPreview",{attrs:{value:e.internalValue}}),t("MediaChooserLayer",{attrs:{value:e.internalValue,actionText:"Edit"},on:{click:e.editBackgroundImage}})],1)])]):e._e()},wM=[],IM=n(53049),PM=n(4802);let kM=class extends s.ZP{editBackgroundImage(){c.singularityStore.setImageEditorPanelState({elementId:this.value.nodeId,controlPath:"design.background.image",initialStep:"main"}),c.singularityStore.setSingularityLeftPanel("image_editor")}get internalValue(){const e=(0,ge.findNode)(c.documentStore.document.tree,this.value.nodeId);if(!e)return!1;const t=j()(e.data.properties,"design.background.image");return(0,id.pipe)(t,jy.V0.decode,(0,od.fold)((e=>{console.debug("Media decoder failed",e)}),(e=>e)))}};(0,r.gn)([(0,l.fI)()],kM.prototype,"value",void 0),kM=(0,r.gn)([(0,l.wA)({components:{MediaPreview:IM.Z,NiceButton:Br.Z,MediaChooserLayer:PM.Z}})],kM);const EM=kM,TM=EM;var DM=(0,N.Z)(TM,xM,wM,!1,null,null,null);const AM=DM.exports;var ZM=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("span",{staticClass:"inline-edit",on:{mouseenter:function(t){e.hover=!0},mouseleave:function(t){e.hover=!1},"click:outside":e.save}},[e.editing?[t("input",{directives:[{name:"model",rawName:"v-model",value:e.editValue,expression:"editValue"}],ref:"input",staticClass:"inline-edit__input",attrs:{placeholder:e.placeholder},domProps:{value:e.editValue},on:{blur:e.onBlur,keyup:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.onEnter.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.cancel.apply(null,arguments)}],input:function(t){t.target.composing||(e.editValue=t.target.value)}}})]:[t(e.component,{tag:"component"},[e._v(e._s(e.value))]),t(ck.Z,{attrs:{top:"","max-width":"180","content-class":"singularity-tooltip",transition:"0"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("Icon",e._g({directives:[{name:"show",rawName:"v-show",value:e.hover,expression:"hover"}],staticClass:"inline-edit__edit-icon",attrs:{icon:"PenSolidIcon",size:"14"},on:{click:function(t){return t.stopPropagation(),e.activateEdit.apply(null,arguments)}}},n))]}}])},[t("span",{staticClass:"singularity-tooltip__text"},[e._v(" Edit section friendly name ")])])]],2)},OM=[];let MM=class extends s.ZP{constructor(){super(...arguments),this.editing=!1,this.editValue="",this.hover=!1,this.enterPressed=!1}onActiveChange(e){e&&this.activateEdit()}activateEdit(){this.$emit("editing",!0),this.editing=!0,this.editValue=this.value,this.$nextTick((()=>{this.$refs.input.focus()}))}onEnter(){this.enterPressed=!0,this.save()}onBlur(){this.enterPressed||this.save(),this.enterPressed=!1}save(){this.editValue.trim()?(this.$emit("update",this.editValue),this.$emit("editing",!1),this.editing=!1):this.cancel()}cancel(){this.editing=!1}};(0,r.gn)([(0,l.fI)({required:!0})],MM.prototype,"value",void 0),(0,r.gn)([(0,l.fI)({default:""})],MM.prototype,"placeholder",void 0),(0,r.gn)([(0,l.fI)({default:"span"})],MM.prototype,"component",void 0),(0,r.gn)([(0,l.fI)({default:!1})],MM.prototype,"active",void 0),(0,r.gn)([(0,l.RL)("active")],MM.prototype,"onActiveChange",null),MM=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],MM);const BM=MM,LM=BM;var NM=(0,N.Z)(LM,ZM,OM,!1,null,"5ff13e93",null);const FM=NM.exports;var RM=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"page-structure-section-colors-new"},[t("div",{staticClass:"page-structure-section__content-field"},[t("div",{staticClass:"page-structure-section__content-field-label"},[t("label",[e._v("Color Scheme")]),t("IconButtonShuffle",{attrs:{size:"small"},on:{update:e.randomizeAll}})],1)]),e.isOverlayHeader?t("div",{staticClass:"overlay-header-message"},[e._v(" Color scheme inherited from section ")]):t("div",{staticClass:"category-swatches-wrapper"},[t("div",{staticClass:"category-swatches-new"},e._l(e.availableCategories,(function(n){return t("div",{key:n.name,staticClass:"category-swatch-new",class:{"category-swatch-new--selected":e.selectedCategory===n.name,"category-swatch-new--show-picker":e.showPicker&&e.selectedCategory===n.name},style:e.getCategoryStyle(n.scheme),attrs:{role:"button"},on:{click:function(t){return e.toggleCategory(n.name)}}},[e._m(0,!0)])})),0)]),e.selectedCategory&&!e.isOverlayHeader&&e.showPicker?t("div",{staticClass:"color-scheme-picker"},[t("ColorSchemePickerNew",{attrs:{elementId:e.elementId,currentSchemeString:e.colorSchemeString,category:e.selectedCategory},on:{select:e.handleSchemeSelected}})],1):e._e()])},VM=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"category-swatch__swatches"},[t("div",{staticClass:"category-swatch__bg"}),t("div",{staticClass:"category-swatch__text"})])}],$M=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"color-scheme-picker-panel-new"},[t("div",{staticClass:"color-scheme-picker-panel-new__content"},[t("div",{staticClass:"schemes-grid-new"},e._l(e.categorySchemes,(function(n,s){return t("ColorSchemeCardNew",{key:s,attrs:{scheme:n,schemeString:e.getSchemeString(s),isSelected:e.getSchemeString(s)===e.currentSchemeString},on:{select:function(t){e.selectScheme(e.getSchemeString(s),n)}}})})),1)])])},WM=[],UM=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"color-scheme-card-new",class:{"color-scheme-card-new--selected":e.isSelected},style:e.previewStyle,attrs:{role:"button"},on:{mouseenter:e.select}},[e.isSelected?t("div",{staticClass:"color-scheme-card__dot"}):e._e()])},zM=[],HM=n(11987);let GM=class extends s.ZP{get shadeLabel(){return(0,HM.uz)(this.scheme,this.schemeString)}get previewStyle(){return{"--card-bg":this.scheme.background.value?.toString(),"--card-text":this.scheme.contrastedFromBackgroundForText.value?.toString()}}select(){this.$emit("select")}};(0,r.gn)([(0,l.fI)({required:!0})],GM.prototype,"scheme",void 0),(0,r.gn)([(0,l.fI)({required:!0})],GM.prototype,"schemeString",void 0),(0,r.gn)([(0,l.fI)({default:!1})],GM.prototype,"isSelected",void 0),GM=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],GM);const KM=GM,jM=KM;var qM=(0,N.Z)(jM,UM,zM,!1,null,null,null);const XM=qM.exports;var YM=n(75495);let QM=class extends s.ZP{constructor(){super(...arguments),this.showGrid=!1}get allSchemes(){return(0,YM.W)(Q.fz.brand.color)}get categorySchemes(){return"primary"===this.category?this.allSchemes.primary:"secondary1"===this.category?this.allSchemes.secondary[0]||[]:"secondary2"===this.category?this.allSchemes.secondary[1]||[]:"neutral"===this.category?this.allSchemes.neutral:[]}get selectedIndex(){const e=this.categorySchemes.findIndex(((e,t)=>this.getSchemeString(t)===this.currentSchemeString));return e>=0?e:0}get currentScheme(){return this.categorySchemes[this.selectedIndex]}get currentSwatchStyle(){return this.currentScheme?{"--card-bg":this.currentScheme.background.value?.toString(),"--card-text":this.currentScheme.contrastedFromBackgroundForText.value?.toString()}:{}}getSchemeString(e){return(0,HM.$w)(this.category,e)}onSliderChange(e){const t=e.target,n=parseInt(t.value),s=this.categorySchemes[n];s&&this.selectScheme(this.getSchemeString(n),s)}shuffleScheme(){const e=Math.floor(Math.random()*this.categorySchemes.length),t=this.categorySchemes[e];t&&this.selectScheme(this.getSchemeString(e),t)}toggleGrid(){this.showGrid=!this.showGrid}close(){this.$emit("close")}selectScheme(e,t){this.$emit("select",e,t)}};(0,r.gn)([(0,l.fI)({required:!0})],QM.prototype,"elementId",void 0),(0,r.gn)([(0,l.fI)({default:""})],QM.prototype,"currentSchemeString",void 0),(0,r.gn)([(0,l.fI)({required:!0})],QM.prototype,"category",void 0),QM=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,ColorSchemeCardNew:XM}})],QM);const JM=QM,eB=JM;var tB=(0,N.Z)(eB,$M,WM,!1,null,null,null);const nB=tB.exports;var sB=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("IconButton",{staticClass:"icon-button-shuffle",class:{"is-rotating":e.isRotating,"is-small":"small"===e.size,"is-default":"default"===e.size},attrs:{icon:"ArrowsRotateSolidIcon",small:"true",size:"small"===e.size?12:16,tooltip:"Shuffle"},on:{click:e.handleClick}})},iB=[];let oB=class extends s.ZP{constructor(){super(...arguments),this.isRotating=!1}handleClick(e){this.isRotating=!0,this.$emit("update",e),setTimeout((()=>{this.isRotating=!1}),600)}};(0,r.gn)([(0,l.fI)()],oB.prototype,"size",void 0),oB=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z}})],oB);const aB=oB,rB=aB;var lB=(0,N.Z)(rB,sB,iB,!1,null,null,null);const cB=lB.exports;let dB=class extends s.ZP{constructor(){super(...arguments),this.showPicker=!1}get element(){return(0,ge.findNode)(Q.Hb.document.tree,this.elementId)}get chosenScheme(){if(!this.element)return HM.RT;const e=j()(this.element,"data.properties.settings.advanced.classes",[]);return(0,HM.kr)(e)}get colorSchemeString(){return this.chosenScheme.schemeString}get selectedCategory(){return this.chosenScheme.category}get schemeIndex(){return this.chosenScheme.index}get categoryLabel(){if(!this.selectedCategory)return"";const e={primary:"Primary",secondary1:"Secondary 1",secondary2:"Secondary 2",neutral:"Neutral"};return e[this.selectedCategory]||""}get allSchemes(){return(0,YM.W)(Q.fz.brand.color)}get availableCategories(){return(0,HM.n)(this.allSchemes,this.selectedCategory,this.schemeIndex)}getCategoryStyle(e){return e?{"--swatch-bg":e.background.value?.toString(),"--swatch-text":e.contrastedFromBackgroundForText.value?.toString()}:{}}toggleCategory(e){if(!e)return;const t=this.selectedCategory===e;this.showPicker=!this.showPicker,t||(this.showPicker=!0,this.selectRandomSchemeForCategory(e))}selectRandomSchemeForCategory(e){const t=(0,HM.w5)(e,this.allSchemes);t&&this.handleSchemeSelected(t.schemeString,t.scheme)}randomizeAll(){const e=(0,HM.qA)(this.allSchemes);e&&this.handleSchemeSelected(e.schemeString,e.scheme)}handleSchemeSelected(e,t){this.element&&(0,HM.Q8)(this.elementId,this.element,e,t)}};(0,r.gn)([(0,l.fI)({required:!0})],dB.prototype,"elementId",void 0),(0,r.gn)([(0,l.fI)({default:!1})],dB.prototype,"isOverlayHeader",void 0),dB=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,ColorSchemePickerNew:nB,IconButtonShuffle:cB}})],dB);const uB=dB,pB=uB;var hB=(0,N.Z)(pB,RM,VM,!1,null,null,null);const gB=hB.exports;var mB=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("NiceButton",{class:{"is-spinning":e.isSectionCurrentlyRewritingWithAi},attrs:{disabled:e.isSectionCurrentlyRewritingWithAi,"left-icon":e.isSectionCurrentlyRewritingWithAi?"CircleNotchSolidIcon":"SparklesIconSolid",color:"gray",expanded:"true"},on:{click:e.openSectionRewrite}},[e._v(" "+e._s(e.isSectionCurrentlyRewritingWithAi?"Rewriting with AI...":"Edit with AI")+" ")])},vB=[];function yB(e){const t=(0,ge.findNode)(c.documentStore.document.tree,e);if(!t)return;const n=(0,sr.E)(t),s={sectionType:n?.singularity.sectionData.type||"unknown"};(0,Tt.K)("FutureLayer Section Rewrite Click",s)}let fB=class extends s.ZP{openSectionRewrite(){const e=(0,ge.findNode)(c.documentStore.document.tree,this.nodeId);e&&(c.singularityStore.setSectionRewritePanelState({section:yM(e)}),c.singularityStore.setSingularityLeftPanel("rewrite_section"),yB(this.nodeId))}get isSectionCurrentlyRewritingWithAi(){return c.singularityStore.aiJobs.filter((e=>"elementId"in e.context&&e.context.elementId===this.nodeId&&("running"===e.status||"pending"===e.status)&&"section_rewrite"===e.context.jobType)).length>0}};(0,r.gn)([(0,l.fI)({required:!0})],fB.prototype,"nodeId",void 0),fB=(0,r.gn)([(0,l.wA)({components:{NiceButton:Br.Z}})],fB);const _B=fB,bB=_B;var SB=(0,N.Z)(bB,mB,vB,!1,null,null,null);const CB=SB.exports;let xB=class extends s.ZP{constructor(){super(...arguments),this.isRewriteModalOpen=!1}get sectionIdToOperateOn(){return this.value.nodeId}get nodeToOperateOn(){return(0,ge.findNode)(c.documentStore.document.tree,this.value.nodeId)}get sectionCardData(){return pr(this.value.nodeId)}moveSection(e){const t="up"===e?this.index-1:this.index+1;c.documentStore.moveElement({draggedElementId:this.value.nodeId,droppedOnElementId:c.documentStore.document.tree.root.id,index:t}),c.uiStore.activateElement(this.value.nodeId)}duplicateSection(){c.documentStore.duplicateElementAndActivateIt(this.value.nodeId)}deleteSection(){c.documentStore.deleteElement({nodeId:this.value.nodeId})}updateSectionFriendlyName(e){_M(this.value.nodeId,e)}get promptInfo(){if(this.nodeToOperateOn)return(0,sr.E)(this.nodeToOperateOn)}get title(){return(this.nodeToOperateOn?.data.properties?.meta?.friendlyName?.trim()||this.promptInfo?.singularity.sectionData.type||"unknown title")??0}get hasBackgroundImage(){const e=(0,ge.findNode)(c.documentStore.document.tree,this.value.nodeId);return e&&"image"==j()(e.data.properties,"design.background.type")}editBackgroundImage(){this.sectionIdToOperateOn&&(c.singularityStore.setImageEditorPanelState({elementId:this.sectionIdToOperateOn,controlPath:"design.background.image",initialStep:"options"}),c.singularityStore.setSingularityLeftPanel("image_editor"),(0,Tt.K)("FutureLayer Edit Section Background Click"))}openSectionLibrary(e){this.sectionIdToOperateOn&&((0,Tt.K)("FutureLayer Section Library Opened",{mode:e}),c.singularityStore.setSectionAddOrSwapPanelState({mode:e,sectionId:this.sectionIdToOperateOn}),c.singularityStore.setSectionLibraryModalState(!0))}get classList(){return{"currently-being-dragged":this.currentlyBeingDragged,"drag-operation-in-progress":this.dragOperationInProgress,"page-structure-section":!0,"page-structure-section--active":this.active,"page-structure-section--open":this.active,"page-structure-section--currently-rewriting":this.isSectionCurrentlyRewritingWithAi}}get isSectionCurrentlyRewritingWithAi(){return c.singularityStore.aiJobs.filter((e=>"elementId"in e.context&&e.context.elementId===this.sectionIdToOperateOn&&("running"===e.status||"pending"===e.status)&&"section_rewrite"===e.context.jobType)).length>0}get isSectionCurrentlyReplacingImagesWithAi(){return c.singularityStore.aiJobs.filter((e=>"elementId"in e.context&&e.context.elementId===this.sectionIdToOperateOn&&("running"===e.status||"pending"===e.status)&&"section_image_replacement"===e.context.jobType)).length>0}async activateSection(){(0,il.Uw)(),c.uiStore.activateElement(this.value.nodeId)}get activeElementId(){return c.uiStore.activeElementId}};(0,r.gn)([(0,l.fI)()],xB.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],xB.prototype,"index",void 0),(0,r.gn)([(0,l.fI)({default:!1})],xB.prototype,"active",void 0),(0,r.gn)([(0,l.fI)({default:!1})],xB.prototype,"dragOperationInProgress",void 0),(0,r.gn)([(0,l.fI)({default:!1})],xB.prototype,"currentlyBeingDragged",void 0),xB=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,NiceButton:Br.Z,SingularityImageMediaPreview:AM,SectionCard:Pr,InlineTextEdit:FM,PageStructureSectionColorsNewV2:gB,EditWithAiButton:CB}})],xB);const wB=xB,IB=wB;var PB=(0,N.Z)(IB,SM,CM,!1,null,null,null);const kB=PB.exports;var EB=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"page-structure-header"},[t("Dropdown",{staticClass:"page-structure-header__dropdown",attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("div",e._g({staticClass:"page-structure-header__title-dropdown"},n),[t("Icon",{staticClass:"page-structure-header__title-icon",attrs:{icon:e.isHomepage?"HomeSolidIcon":"PageRegularIcon",size:"20"}}),t("h1",{staticClass:"page-structure-header__title"},[t("span",[e._v(e._s(e.pageTitle))]),t("Icon",{staticClass:"page-structure-header__title-chevron-icon",attrs:{icon:"ChevronDownSolidIcon",size:"16"}})],1)],1)]}}])},[t("div",{staticClass:"page-structure-header__dropdown-content"},[e._l(e.pages,(function(e){return t("PageStructurePageListItem",{key:e.id,attrs:{value:e}})})),t("div",{staticClass:"page-structure-header__dropdown-divider"}),t("button",{staticClass:"page-structure-page-list-item",on:{click:e.openPagesPanel}},[t("div",{staticClass:"page-structure-page-list-item__content"},[t("div",{staticClass:"page-structure-page-list-item__title"},[t("Icon",{attrs:{size:12,icon:"ListIcon"}}),t("span",[e._v("Manage Pages")])],1)])])],2)])],1)},TB=[],DB=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"page-structure-page-list-item",class:e.classList,on:{click:e.openInCanvas}},[t("div",{staticClass:"page-structure-page-list-item__content"},[t("div",{staticClass:"page-structure-page-list-item__title"},[t("Icon",{attrs:{size:12,icon:e.isHomepage?"HomeSolidIcon":"PageRegularIcon"}}),t("span",[e._v(e._s(e.value.title))])],1)])])},AB=[];let ZB=class extends s.ZP{async openInCanvas(){c.singularityStore.setIsOpeningPageId(this.value.id),await(0,zl.$)(),await(0,Hl.rI)(this.value.id),c.singularityStore.setIsOpeningPageId(!1),c.singularityStore.setSingularityLeftPanel("page_structure")}get isOpeningPage(){return c.singularityStore.isOpeningPageId===this.value.id}get isHomepage(){return this.value.title.toLowerCase().includes("home")}get active(){return this.value.id===c.documentStore.document.documentMeta.id}get classList(){return{"is-active":this.active,"is-opening":this.isOpeningPage}}};(0,r.gn)([(0,l.fI)()],ZB.prototype,"value",void 0),ZB=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z,Icon:He.Z,Dropdown:Oc.Z}})],ZB);const OB=ZB,MB=OB;var BB=(0,N.Z)(MB,DB,AB,!1,null,null,null);const LB=BB.exports;var NB=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(ck.Z,{attrs:{bottom:"","max-width":"180","content-class":"singularity-tooltip",transition:"0"},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:s}){return[t("IconButton",e._g(e._b({staticClass:"breakdance-panel-header-left-of-close-button",attrs:{size:16,small:"",icon:"CircleQuestionSolidIcon"}},"IconButton",s,!1),n))]}}])},[t("span",{staticClass:"singularity-tooltip__text"},[e._v(" "+e._s(e.text)+" ")])])},FB=[];let RB=class extends s.ZP{};(0,r.gn)([(0,l.fI)({type:String,required:!0})],RB.prototype,"text",void 0),RB=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z}})],RB);const VB=RB,$B=VB;var WB=(0,N.Z)($B,NB,FB,!1,null,null,null);const UB=WB.exports;let zB=class extends s.ZP{get structure(){return vM(c.documentStore.document.tree)}get pages(){return c.singularityStore.pagesInWP.filter((e=>"page"===e.postType))}get pageTitle(){return c.documentStore.document.documentMeta.titleLabel}get isHomepage(){return this.pageTitle.toLowerCase().includes("home")}openPagesPanel(){c.singularityStore.setSingularityLeftPanel("page_manager")}addSection(){c.singularityStore.setSectionAddOrSwapPanelState({mode:"add_after",sectionId:this.structure.length?this.structure[this.structure.length-1].nodeId:null}),c.singularityStore.setSectionLibraryModalState(!0)}};zB=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z,Dropdown:Oc.Z,Icon:He.Z,PageStructurePageListItem:LB,SingularityTooltip:UB}})],zB);const HB=zB,GB=HB;var KB=(0,N.Z)(GB,EB,TB,!1,null,null,null);const jB=KB.exports;let qB=class extends s.ZP{constructor(){super(...arguments),this.isDragging=!1,this.isScrolling=!1,this.currentlyDraggedNodeId=null}get activeElement(){return c.uiStore.activeElementId}get structure(){return vM(c.documentStore.document.tree)}get pageTitle(){return c.documentStore.document.documentMeta.titleLabel}get isOpeningPage(){return c.singularityStore.isOpeningPageId}isActive(e){return c.uiStore.inlineEditingContext?c.uiStore.isElementBeingEditedInline(e):c.uiStore.activeElementId===e}get draggableOptions(){return{ghostClass:"page-structure-section--dragging",dragClass:"page-structure-section--drag-active",setData:e=>{const t=document.createElement("div");t.style.width="1px",t.style.height="1px",t.style.opacity="0",document.body.appendChild(t),e.setDragImage(t,0,0),setTimeout((()=>{document.body.contains(t)&&document.body.removeChild(t)}),0)}}}onDragStart(e){this.isDragging=!0;const t=e.oldIndex;this.currentlyDraggedNodeId=this.structure[t]?.nodeId||null}onDragEnd(){this.isDragging=!1,this.currentlyDraggedNodeId=null}handleChange(e){if(e.moved){const t=e.moved.element.nodeId,n=bM(e.moved.newIndex,c.documentStore.document.tree);c.documentStore.moveElement({draggedElementId:t,droppedOnElementId:c.documentStore.document.tree.root.id,index:n}),c.uiStore.activateElement(t),(0,vw.es)(!0)}}addSection(){c.singularityStore.setSectionAddOrSwapPanelState({mode:"add_after",sectionId:this.structure.length?this.structure[this.structure.length-1].nodeId:null}),c.singularityStore.setSingularityLeftPanel("add_new_section"),(0,Tt.K)("FutureLayer Page Structure Add Section Click",{pageTitle:this.pageTitle,currentSectionCount:this.structure.length})}};qB=(0,r.gn)([(0,l.wA)({components:{PageStructureSectionNew:kB,draggable:ev(),Icon:He.Z,PageStructureHeader:jB,NiceButton:Br.Z}})],qB);const XB=qB,YB=XB;var QB=(0,N.Z)(YB,gM,mM,!1,null,null,null);const JB=QB.exports;var eL=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"futurelayer-image-editor-panel vscroll-wrap vscroll-scroll"},[t("SingularityPanelHeader",{attrs:{parentTitle:e.panelTitle,childTitle:e.childTitle,backState:e.backState}}),e.isOptionsView?t("div",{staticClass:"futurelayer-image-editor-panel__content"},[t("div",{staticClass:"futurelayer-image-editor-options"},e._l(e.options,(function(n){return t("SingularityOption",{key:n.value,attrs:{icon:n.icon,description:n.description,title:n.label},on:{click:function(e){n.action&&n.action()}},scopedSlots:e._u([{key:"content",fn:function(){return["stock"===n.value?t("FutureLayerImageSuggested",{attrs:{imageControlData:e.futureLayerImageDataForCurrentImage}}):e._e()]},proxy:!0}],null,!0)})})),1)]):e.isOptionsView||e.isStockImagesView?e.isStockImagesView?t("FutureLayerImageBrowser",{attrs:{imageControlData:e.futureLayerImageDataForCurrentImage},on:{"image-selected":e.handleImageSelected,"image-previewed":e.handleImagePreviewed,"image-restored":e.handleImageRestored}}):e.isLoadingView?t("div",{staticClass:"image-editor-loading"},[t("div",{staticClass:"image-editor-content-wrapper"},[t("Icon",{staticClass:"animate-spin",attrs:{icon:"CircleNotchSolidIcon",size:"18"}})],1)]):e._e():t("div",{staticClass:"image-editor-content-wrapper"},[e.isGalleryMode?t("GalleryStrip",{attrs:{"base-path-to-image-control":e.basePathToImageControl,"element-id":e.elementId,"selected-image-index":e.selectedImageIndex},on:{"path-selected":function(t){e.pathToImageControlWhenInGalleryMode=t},"caption-path-selected":function(t){e.pathToImageCaptionWhenInGalleryMode=t},"index-changed":e.updateSelectedImageIndex}}):e._e(),t("div",{staticClass:"image-editor-current-image"},[e.currentMediaInputValue&&e.imageHasUrl?t("div",{staticClass:"image-editor-current-image__badge"},[t("SingularityBadge",{attrs:{value:"Selected"}})],1):e._e(),e.currentMediaInputValue?t("div",{staticClass:"image-editor-delete-button"},[t("Icon",{attrs:{icon:"CloseSolidIcon",size:"16"},on:{click:function(t){return e.updateMediaInputValue(null)}}})],1):e._e(),t("div",{staticClass:"image-editor-preview"},[t("MediaPreview",{attrs:{value:e.currentMediaInputValue}}),t("MediaChooserLayer",{attrs:{value:e.currentMediaInputValue,actionText:e.currentMediaInputValue?"Change":"Add"},on:{click:function(t){return e.setEditorView(e.EditorView.Options)}}})],1),e.isGalleryMode?t("div",{staticClass:"image-editor-info-text"},[t("TextInput",{staticClass:"singularity-prompt__prompt-input",attrs:{value:e.currentCaptionValue,placeholder:"Update caption"},on:{input:function(t){return e.updateCaption(t)}}})],1):e._e(),t("div",{staticClass:"imageg-editor-current-image__buttons"},[t("NiceButton",{attrs:{"left-icon":"ImageIcon",color:"gray",expanded:"true"},on:{click:function(t){return e.setEditorView(e.EditorView.Options)}}},[e._v(" "+e._s(e.currentMediaInputValue?"Change Image":"Add Image")+" ")])],1)])],1),t("SingularityMediaUploadDialog",{attrs:{dialogOpen:e.isUploadDialogView,multiple:!1,value:e.currentMediaInputValue,"media-input-options":e.mediaInputOptions,"active-tab":e.activeWPMediaDialogTab},on:{input:e.updateMediaInputValue,close:function(t){return e.setEditorView(e.EditorView.Main)}}})],1)},tL=[],nL=n(19499),sL=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"futurelayer-image-browser"},[t("div",{staticClass:"search-section"},[t("div",{staticClass:"search-input-wrapper"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.searchKeyword,expression:"searchKeyword"}],staticClass:"search-input-wrapper-input",attrs:{type:"text",placeholder:"Search for images..."},domProps:{value:e.searchKeyword},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchImages.apply(null,arguments)},input:function(t){t.target.composing||(e.searchKeyword=t.target.value)}}}),t("Icon",{attrs:{icon:"SearchIcon",size:"14"},on:{click:e.searchImages}})],1),e.aiKeywords.length>0?t("div",{staticClass:"suggested-keywords"},[t("div",{staticClass:"keyword-chips"},e._l(e.aiKeywords,(function(n){return t("span",{key:n,staticClass:"keyword-chip",on:{click:function(t){return e.useKeyword(n)}}},[e._v(" "+e._s(n)+" ")])})),0)]):e._e()]),t("div",{ref:"imagesSection",staticClass:"images-section"},[e.displayedImages.length>0?t("div",{staticClass:"search-results"},[t("div",{staticClass:"images-grid"},e._l(e.displayedImages,(function(n){return t("FutureImageThumbnail",{key:n.id,attrs:{image:n},on:{click:function(t){return e.selectImage(n)},mouseenter:function(t){return e.previewImage(n)},mouseleave:e.restoreOriginalImage}})})),1)]):e._e(),0!==e.displayedImages.length||e.isSearching?e._e():t("div",{staticClass:"no-results"},[t("Icon",{attrs:{icon:"SearchIcon",size:"48"}}),t("p",[e._v(" No images available. Try searching for images using the input above. ")])],1)]),e.hasMoreImages&&e.displayedImages.length?t("div",{staticClass:"load-more"},[t("NiceButton",{attrs:{size:"large",color:"gray",loading:e.isSearching,expanded:"true"},on:{click:e.loadMoreImages}},[e._v("Load More")])],1):e._e()])},iL=[],oL=n(14663),aL=n(50247),rL=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("figure",{class:e.classes},[t("img",{staticClass:"image-card__image",attrs:{src:e.image.urls.regular,alt:e.image.alt_description||""},on:{load:e.handleLoad,error:e.handleError,click:function(t){return e.$emit("click",e.image)},mouseenter:function(t){return e.$emit("mouseenter",e.image)},mouseleave:function(t){return e.$emit("mouseleave")}}}),t("div",{staticClass:"image-card__attribution",class:{"is-expanded":e.showAttributionOverlay}},[e.showAttributionOverlay?t("Icon",{staticClass:"image-card__attribution-close-icon",attrs:{icon:"CloseSolidIcon",size:"16"},on:{click:function(t){e.showAttributionOverlay=!1}}}):e._e(),e.showAttributionOverlay?t("span",{staticClass:"image-card__attribution-text",domProps:{innerHTML:e._s(e.attribution)}}):e._e(),t("div",{staticClass:"image-card__attribution-tooltip"},[e.showAttributionOverlay?e._e():t("div",{staticClass:"image-card__attribution-icon",on:{click:function(t){e.showAttributionOverlay=!0}}},[t("Icon",{attrs:{icon:"CircleInfoSolidIcon",size:"14"}})],1)])],1)])},lL=[];let cL=class extends s.ZP{constructor(){super(...arguments),this.isLoading=!0,this.showAttributionOverlay=!1}handleLoad(){this.isLoading=!1}handleError(){this.isLoading=!1}get classes(){return{"image-card":!0,"image-card--loading":this.isLoading,"image-card--landscape":"landscape"===(0,aL.FK)(this.image),"image-card--portrait":"portrait"===(0,aL.FK)(this.image),"image-card--square":"square"===(0,aL.FK)(this.image)}}get attribution(){return(0,aL.dF)(this.image)}};(0,r.gn)([(0,l.fI)({required:!0})],cL.prototype,"image",void 0),cL=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],cL);const dL=cL,uL=dL;var pL=(0,N.Z)(uL,rL,lL,!1,null,null,null);const hL=pL.exports;let gL=class extends s.ZP{constructor(){super(...arguments),this.searchKeyword="",this.searchResults=[],this.isSearching=!1,this.currentSearchTerm="",this.currentPage=1,this.hasMoreImages=!0,this.debouncedLogSearchFn=qa()((e=>{(0,Tt.K)("FutureLayer Stock Image Search",{searchTerm:e})}),1e3)}get aiKeywords(){return this.imageControlData?.keywords||[]}get displayedImages(){return this.searchResults.length>0?this.searchResults:this.imageControlData?.searchResults||[]}mounted(){this.aiKeywords.length>0&&(this.searchKeyword=this.aiKeywords[0],this.currentSearchTerm=this.aiKeywords[0])}async loadMoreImages(){if(this.searchKeyword.trim()){this.isSearching=!0,this.currentPage+=1;try{const e=await(0,oL.Ok)({query:this.searchKeyword,page:this.currentPage,per_page:12},new AbortController);e.length>0?this.searchResults=[...this.searchResults,...e]:this.hasMoreImages=!1}catch(e){console.error("Image search failed:",e)}finally{this.isSearching=!1}}}useKeyword(e){this.searchKeyword=e,this.searchImages()}async searchImages(){if(this.searchKeyword.trim()){this.isSearching=!0,this.currentSearchTerm=this.searchKeyword,this.currentPage=1,this.hasMoreImages=!0;try{const e=await(0,oL.Ok)({query:this.searchKeyword,page:this.currentPage,per_page:20},new AbortController);this.searchResults=e,this.hasMoreImages=e.length>0}catch(e){console.error("Image search failed:",e),this.searchResults=[],this.hasMoreImages=!1}finally{this.isSearching=!1}}}previewImage(e){const t=e.urls.regular||"";this.$emit("image-previewed",t)}restoreOriginalImage(){this.$emit("image-restored")}selectImage(e){this.$emit("image-selected",e)}getImageSource(e){return(0,aL.I)(e)?"Unsplash":"Pexels"}onSearchKeywordChange(){this.debouncedLogSearchFn(this.searchKeyword)}};(0,r.gn)([(0,l.fI)({default:null})],gL.prototype,"imageControlData",void 0),(0,r.gn)([(0,l.RL)("searchKeyword")],gL.prototype,"onSearchKeywordChange",null),gL=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,NiceButton:Br.Z,Icon:He.Z,FutureImageThumbnail:hL}})],gL);const mL=gL,vL=mL;var yL=(0,N.Z)(vL,sL,iL,!1,null,null,null);const fL=yL.exports;var _L=n(10921),bL=n(52166),SL=n(86025),CL=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"panel-header",class:{"panel-header--global":e.isGlobal}},[t("h1",{staticClass:"panel-header__title",class:{"panel-header__title--link":e.backState},on:{click:e.goBackToPanelState}},[e.backState?t("Icon",{staticClass:"panel-header__title-chevron",attrs:{icon:"ChevronDownSolidIcon",rotate:"90",size:"14"}}):e._e(),e.isGlobal?t("Icon",{staticClass:"panel-header__global-icon",attrs:{icon:"GlobeIcon",size:"20"}}):e._e(),t("span",{staticClass:"panel-header__title-parent"},[e._v(e._s(e.parentTitle))]),e.childTitle?[t("span",{staticClass:"panel-header__title-divider"},[e._v("/")]),t("span",{staticClass:"panel-header__title-child"},[e._v(e._s(e.childTitle))])]:e._e()],2),t("div",{staticClass:"panel-header__actions"},[e._t("actions")],2)])},xL=[];let wL=class extends s.ZP{goBackToPanelState(){"function"===typeof this.backState?this.backState():this.backState&&c.singularityStore.setSingularityLeftPanel(this.backState)}};(0,r.gn)([(0,l.fI)({default:"Title"})],wL.prototype,"parentTitle",void 0),(0,r.gn)([(0,l.fI)()],wL.prototype,"childTitle",void 0),(0,r.gn)([(0,l.fI)()],wL.prototype,"backState",void 0),(0,r.gn)([(0,l.fI)({default:!1})],wL.prototype,"isGlobal",void 0),wL=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],wL);const IL=wL,PL=IL;var kL=(0,N.Z)(PL,CL,xL,!1,null,null,null);const EL=kL.exports;var TL=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"gallery-image-strip"},[t("div",{staticClass:"gallery-images-container"},[t("draggable",e._b({staticClass:"gallery-images-draggable",attrs:{value:e.galleryImages,group:"images"},on:{input:e.updateGallery}},"draggable",e.dragOptions,!1),[e._l(e.galleryImages,(function(n,s){return t("div",{key:s,staticClass:"gallery-image-item",class:{selected:s===e.selectedIndex},on:{click:function(t){return e.selectImage(s)}}},[n&&n.url?t("img",{staticClass:"gallery-thumbnail",attrs:{src:n.url,alt:n.caption||""}}):t("div",{staticClass:"gallery-thumbnail empty"},[t("span",[e._v("No Image")])]),e.galleryImages.length>1?t("button",{staticClass:"delete-image-btn",on:{click:function(t){return t.stopPropagation(),e.deleteImage(s)}}},[e._v(" × ")]):e._e()])})),t("button",{staticClass:"add-image-btn",on:{click:e.addImage}},[e._v("+")])],2)],1)])},DL=[];let AL=class extends s.ZP{constructor(){super(...arguments),this.dragOptions={animation:200,forceFallback:!0,filter:".add-image-btn",ghostClass:"is-ghost-image"}}updateGallery(e){const t=e.map((e=>({image:e,type:"image"})));c.documentStore.unthrottledPropertyChanged({elementId:this.elementId,path:this.repeaterBasePath,value:t,meta:{snapshotLabel:"Reorder Gallery Images"}})}get repeaterBasePath(){return this.basePathToImageControl.split("[]")[0]}get repeaterSubPath(){const e=this.basePathToImageControl.split("[]");return e[1]?.startsWith(".")?e[1].substring(1):e[1]}get repeaterArrayValue(){const e=(0,ge.findNode)(c.documentStore.document.tree,this.elementId);if(!e)return[];const t=j()(e.data.properties,this.repeaterBasePath);return Array.isArray(t)?t:[]}get galleryImages(){return this.repeaterArrayValue.map((e=>this.repeaterSubPath?j()(e,this.repeaterSubPath)||null:e)).filter(Boolean)}get selectedIndex(){return Math.max(0,Math.min(this.selectedImageIndex,this.galleryImages.length-1))}get pathToImageControlWhenInGalleryMode(){return`${this.repeaterBasePath}[${this.selectedIndex}].${this.repeaterSubPath}`}get pathToImageCaptionWhenInGalleryMode(){return`${this.repeaterBasePath}[${this.selectedIndex}].caption`}emitPathChange(){this.$emit("path-selected",this.pathToImageControlWhenInGalleryMode),this.$emit("caption-path-selected",this.pathToImageCaptionWhenInGalleryMode)}emitIndexChange(){this.$emit("index-changed",this.selectedIndex)}selectImage(e){e>=0&&e<this.galleryImages.length&&this.$emit("index-changed",e)}addImage(){const e={id:-1,type:"external_image",url:"",alt:"",caption:""},t={};this.repeaterSubPath&&Sd()(t,this.repeaterSubPath,e),"image"===this.repeaterSubPath&&(t.caption="");const n=[...this.repeaterArrayValue,t],s=n.length-1;c.documentStore.unthrottledPropertyChanged({elementId:this.elementId,path:this.repeaterBasePath,value:n,meta:{snapshotLabel:"Add Image to Gallery"}}),this.$emit("index-changed",s)}deleteImage(e){if(e<0||e>=this.galleryImages.length||this.galleryImages.length<=1)return;const t=[...this.repeaterArrayValue];t.splice(e,1),c.documentStore.unthrottledPropertyChanged({elementId:this.elementId,path:this.repeaterBasePath,value:t,meta:{snapshotLabel:"Delete Image from Gallery"}});let n=this.selectedIndex;e<=this.selectedIndex&&(n=Math.max(0,this.selectedIndex-1)),n>=t.length&&(n=t.length-1),this.$emit("index-changed",n)}};(0,r.gn)([(0,l.fI)({required:!0})],AL.prototype,"basePathToImageControl",void 0),(0,r.gn)([(0,l.fI)({required:!0})],AL.prototype,"elementId",void 0),(0,r.gn)([(0,l.fI)({default:0})],AL.prototype,"selectedImageIndex",void 0),(0,r.gn)([(0,l.RL)("pathToImageControlWhenInGalleryMode",{immediate:!0})],AL.prototype,"emitPathChange",null),(0,r.gn)([(0,l.RL)("selectedIndex")],AL.prototype,"emitIndexChange",null),AL=(0,r.gn)([(0,l.wA)({components:{draggable:ev()}})],AL);const ZL=AL,OL=ZL;var ML=(0,N.Z)(OL,TL,DL,!1,null,null,null);const BL=ML.exports;var LL=n(81452),NL=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("MediaUploadDialog",{attrs:{open:e.open,multiple:e.multiple,"selected-media":e.value,"accepted-file-types":e.mediaInputOptions,"active-tab":e.activeTab},on:{input:e.onMediaSelected,close:function(t){return e.$emit("close")}}})},FL=[];let RL=class extends s.ZP{constructor(){super(...arguments),this.open=!1}onDialogOpenChange(e){this.open=e}get acceptedFileTypes(){return this.mediaInputOptions?.acceptedFileTypes||[]}updateValue(e){this.$emit("input",e)}async onMediaSelected(e){const t=(0,wd.Z)(this.value);Array.isArray(t)&&Array.isArray(e)?(t.push(...e),this.updateValue(t)):this.updateValue(e)}};(0,r.gn)([(0,l.fI)()],RL.prototype,"value",void 0),(0,r.gn)([(0,l.fI)()],RL.prototype,"mediaInputOptions",void 0),(0,r.gn)([(0,l.fI)()],RL.prototype,"multiple",void 0),(0,r.gn)([(0,l.fI)()],RL.prototype,"dialogOpen",void 0),(0,r.gn)([(0,l.fI)({default:"library"})],RL.prototype,"activeTab",void 0),(0,r.gn)([(0,l.RL)("dialogOpen",{immediate:!0})],RL.prototype,"onDialogOpenChange",null),RL=(0,r.gn)([(0,l.wA)({components:{MediaUploadDialog:LL.Z}})],RL);const VL=RL,$L=VL;var WL=(0,N.Z)($L,NL,FL,!1,null,null,null);const UL=WL.exports;var zL=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"futurelayer-image-browser-suggested"},[e.displayedImages.length>0?t("div",{staticClass:"images-grid-small"},e._l(e.displayedImages,(function(e){return t("div",{key:e.id,staticClass:"image-card-small"},[t("img",{attrs:{src:e.urls.regular,alt:e.alt_description||""}})])})),0):e._e()])},HL=[];let GL=class extends s.ZP{constructor(){super(...arguments),this.limit=3}get displayedImages(){return this.imageControlData?.searchResults.slice(0,this.limit)||[]}};(0,r.gn)([(0,l.fI)({default:null})],GL.prototype,"imageControlData",void 0),GL=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,NiceButton:Br.Z,Icon:He.Z}})],GL);const KL=GL,jL=KL;var qL=(0,N.Z)(jL,zL,HL,!1,null,null,null);const XL=qL.exports;var YL;(function(e){e["Main"]="main",e["Options"]="options",e["UploadDialog"]="uploadDialog",e["StockImages"]="stockImages",e["Loading"]="loading"})(YL||(YL={}));let QL=class extends s.ZP{constructor(){super(...arguments),this.originalMediaValue=null,this.pathToImageControlWhenInGalleryMode=null,this.pathToImageCaptionWhenInGalleryMode=null,this.editorView=YL.Main,this.EditorView=YL,this.options=[{label:"File Upload",value:"file_upload",icon:"UploadFileIcon",description:"Upload from your computer.",action:()=>{this.openWPMediaUploadDialog("upload")}},{label:"Browse Library",value:"browse_library",icon:"ImageIcon",description:"Choose from your media library.",action:()=>{this.openWPMediaUploadDialog("library")}},{label:"Curated for You",value:"stock",icon:"SparklesIcon",description:"Search thousands of free images.",action:()=>{this.setEditorView(YL.StockImages),(0,Tt.K)("FutureLayer Image Editor Open Stock Images")}}],this.activeWPMediaDialogTab="library",this.addIsOpen=!1}mounted(){Ke.uq.register(je.r.SHIFT_ESC,(()=>{this.setEditorView(YL.Main)})),"options"===this.initialStep?this.setEditorView(YL.Options):this.setEditorView(YL.Main)}beforeDestroy(){Ke.uq.unbind(je.r.SHIFT_ESC)}setEditorView(e){this.editorView=e||YL.Main}setOptionView(){this.setEditorView(YL.Options)}get isMainView(){return this.editorView===YL.Main}get isOptionsView(){return this.editorView===YL.Options}get isUploadDialogView(){return this.editorView===YL.UploadDialog}get isStockImagesView(){return this.editorView===YL.StockImages}get isLoadingView(){return this.editorView===YL.Loading}get backState(){return this.isOptionsView?this.setEditorView:this.isStockImagesView?this.setOptionView:"page_structure"}get childTitle(){return this.isOptionsView?"Update":this.isStockImagesView?"Stock Images":null}get imageHasUrl(){return this.currentMediaInputValue?.url&&this.currentMediaInputValue.url.length>0}get currentCaptionValue(){if(!this.elementId||!this.pathToImageCaptionWhenInGalleryMode||!this.isGalleryMode)return"";const e=(0,ge.findNode)(c.documentStore.document.tree,this.elementId);if(!e)return"";const t=j()(e.data.properties,this.pathToImageCaptionWhenInGalleryMode);return t||""}updateCaption(e){this.elementId&&this.pathToImageCaptionWhenInGalleryMode&&this.isGalleryMode&&c.documentStore.unthrottledPropertyChanged({elementId:this.elementId,path:this.pathToImageCaptionWhenInGalleryMode,value:e,meta:{snapshotLabel:`Gallery Image ${this.selectedImageIndex+1} Caption Update`}})}openWPMediaUploadDialog(e){this.activeWPMediaDialogTab=e,this.setEditorView(YL.UploadDialog),(0,Tt.K)("FutureLayer Image Editor Open WP Media Dialog",{tab:e})}get panelTitle(){return this.isGalleryMode?"Edit Gallery":"Edit Image"}get elementId(){return c.singularityStore.imageEditorPanelState?.elementId}get basePathToImageControl(){return c.singularityStore.imageEditorPanelState?.controlPath}get selectedImageIndex(){return c.singularityStore.imageEditorPanelState?.selectedImageIndex??0}get initialStep(){return c.singularityStore.imageEditorPanelState?.initialStep??"main"}get isGalleryMode(){return this.basePathToImageControl?.includes("[]")||!1}get pathToImageControl(){return this.isGalleryMode&&this.pathToImageControlWhenInGalleryMode?this.pathToImageControlWhenInGalleryMode:this.basePathToImageControl}get futureLayerImageData(){const e=(0,ge.findNode)(c.documentStore.document.tree,this.elementId);return e?(0,bL.p5)(e):null}get node(){return(0,ge.findNode)(c.documentStore.document.tree,this.elementId)}get futureLayerImageDataForCurrentImage(){const e=this.futureLayerImageData;return this.isGalleryMode?e?.[this.selectedImageIndex]||null:e?.[0]||null}get currentMediaInputValue(){if(!this.elementId||!this.pathToImageControl)return null;const e=(0,ge.findNode)(c.documentStore.document.tree,this.elementId);if(!e)return null;const t=j()(e.data.properties,this.pathToImageControl);return t||null}updateMediaInputValue(e){this.elementId&&this.pathToImageControl&&c.documentStore.unthrottledPropertyChanged({elementId:this.elementId,path:this.pathToImageControl,value:e,meta:{snapshotLabel:this.isGalleryMode?`Gallery Image ${this.selectedImageIndex+1} Update`:"Image Editor Media Input Update"}})}updateSelectedImageIndex(e){this.elementId&&this.basePathToImageControl&&c.singularityStore.setImageEditorPanelState({elementId:this.elementId,controlPath:this.basePathToImageControl,selectedImageIndex:e,initialStep:this.initialStep})}handleImagePreviewed(e){this.originalMediaValue||(this.originalMediaValue=this.currentMediaInputValue);const t={type:"external_image",url:e,alt:"",caption:"",id:-1};this.updateMediaInputValue(t)}handleImageRestored(){this.originalMediaValue&&(this.updateMediaInputValue(this.originalMediaValue),this.originalMediaValue=null)}async handleImageSelected(e){if(!this.node)return;if(this.originalMediaValue=null,this.setEditorView(YL.Loading),(0,SL.oI)(e)){const t=(0,aL.Zu)(e,(0,aL.Jp)(this.node)),n=await(0,SL.Aq)(t,e,new AbortController);if(n){const e=(0,SL.oM)(n);return this.updateMediaInputValue(e),void this.setEditorView(YL.Main)}}const t=(0,_L.Bs)(e);this.updateMediaInputValue(t),this.setEditorView(YL.Main)}openAdd(){this.addIsOpen=!this.addIsOpen}get mediaInputOptions(){return{acceptedFileTypes:["image"]}}get uiStoreActiveElementId(){return c.uiStore.activeElementId}closePanelIfElementIdChanges(){this.elementId!==this.uiStoreActiveElementId&&c.singularityStore.setImageEditorPanelState(null)}};(0,r.gn)([(0,l.RL)("uiStoreActiveElementId")],QL.prototype,"closePanelIfElementIdChanges",null),QL=(0,r.gn)([(0,l.wA)({components:{Dropdown:Oc.Z,IconButton:Xa.Z,PanelHeader:uI,WPMediaInput:nL.Z,FutureLayerImageBrowser:fL,SingularityPanelHeader:EL,GalleryStrip:BL,SingularityBadge:Sr,NiceButton:Br.Z,SingularityOption:Or,MediaUploadDialog:LL.Z,SingularityMediaUploadDialog:UL,MediaPreview:IM.Z,MediaChooserLayer:PM.Z,FutureLayerImageSuggested:XL,Icon:He.Z,TextInput:na.Z}})],QL);const JL=QL,eN=JL;var tN=(0,N.Z)(eN,eL,tL,!1,null,null,null);const nN=tN.exports;var sN=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"background-image-editor vscroll-wrap vscroll-scroll"},[t("PanelHeader",{ref:"panelHeader",on:{close:e.close},scopedSlots:e._u([{key:"right",fn:function(){return[t("IconButton",{staticClass:"breakdance-panel-header-left-of-close-button",attrs:{size:16,small:"",icon:"PlusIconSolid"},on:{click:function(t){return e.$emit("something")}}}),t("Dropdown",{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("IconButton",e._g({staticClass:"breakdance-panel-header-left-of-close-button",attrs:{size:16,small:"",icon:"EllipsisStrokeIcon"}},n))]}}])},[t(Ec.Z,[t(Tc.Z,{attrs:{dense:""},on:{click:function(t){return e.$emit("edit-background-image")}}},[t(Dc.V9,[e._v(" Edit Background Image ")])],1)],1)],1)]},proxy:!0}])},[t("IconButton",{staticClass:"breakdance-panel-header-left-of-close-button",attrs:{size:16,small:"",icon:"ArrowLeftIcon"},on:{click:e.backToPageStructurePanel}}),e._v(" Edit Background Image ")],1),t("div",{staticClass:"background-image-editor-content-wrapper"},[t("div",{staticClass:"background-image-editor-current-image"},[t("h2",[e._v("Current Background Image")]),t("WPMediaInput",{attrs:{value:e.mediaInputValue,"media-options":e.mediaInputOptions},on:{input:e.updateMediaInputValue}})],1),t("UnsplashImageBrowser",{on:{"image-selected":e.handleImageSelected}})],1)],1)},iN=[],oN=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"unsplash-image-browser"},[t("h2",[e._v("Search Images")]),t("div",{staticClass:"unsplash-image-browser-search-input-wrapper"},[t("TextInput",{model:{value:e.unsplashSearchQuery,callback:function(t){e.unsplashSearchQuery=t},expression:"unsplashSearchQuery"}}),t("NiceButton",{attrs:{loading:e.loading},on:{click:e.searchUnsplash}},[e._v(" Search ")]),t(tg.Z,{attrs:{items:["landscape","portrait","squarish"],label:"Orientation",outlined:""},model:{value:e.unsplashSearchOrientation,callback:function(t){e.unsplashSearchOrientation=t},expression:"unsplashSearchOrientation"}})],1),e._l(e.images,(function(n,s){return t("div",{key:s,staticClass:"unsplash-image-wrapper"},[t("img",{attrs:{src:n.urls.regular,alt:n.alt_description||""},on:{click:function(t){return e.selectImage(n)}}}),t("p",[e._v(e._s(n.description||""))])])})),0!==e.images.length||e.loading?e._e():t("div",[e._v(" Search for images using the input above ")])],2)},aN=[];let rN=class extends s.ZP{constructor(){super(...arguments),this.images=[],this.unsplashSearchOrientation="landscape",this.unsplashSearchQuery="",this.loading=!1}async searchUnsplash(){if(this.unsplashSearchQuery.trim()){this.loading=!0;try{const e=await(0,oL.Ok)({query:this.unsplashSearchQuery,page:1,per_page:20},new AbortController);this.images=e}catch(e){console.error("Error searching Unsplash:",e),this.images=[]}finally{this.loading=!1}}}selectImage(e){this.$emit("image-selected",e)}};rN=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,NiceButton:Br.Z}})],rN);const lN=rN,cN=lN;var dN=(0,N.Z)(cN,oN,aN,!1,null,null,null);const uN=dN.exports;let pN=class extends s.ZP{get sectionId(){return c.singularityStore.backgroundImageEditorPanelState?.sectionId}get mediaInputValue(){if(!this.sectionId)return null;const e=(0,ge.findNode)(c.documentStore.document.tree,this.sectionId);if(!e)return null;const t=j()(e.data.properties,gN);return t||null}updateMediaInputValue(e){this.sectionId&&c.documentStore.unthrottledPropertyChanged({elementId:this.sectionId,path:gN,value:e,meta:{snapshotLabel:"Background Image Editor Media Input Update"}})}get mediaInputOptions(){return{acceptedFileTypes:["image"]}}backToPageStructurePanel(){c.singularityStore.setSingularityLeftPanel("page_structure")}handleImageSelected(e){const t=(0,_L.Bs)(e);this.updateMediaInputValue(t)}close(){alert("close")}get uiStoreActiveElementId(){return c.uiStore.activeElementId}closePanelIfElementIdChanges(){this.sectionId!==this.uiStoreActiveElementId&&c.singularityStore.setBackgroundImageEditorPanelState(null)}};(0,r.gn)([(0,l.RL)("uiStoreActiveElementId")],pN.prototype,"closePanelIfElementIdChanges",null),pN=(0,r.gn)([(0,l.wA)({components:{Dropdown:Oc.Z,IconButton:Xa.Z,PanelHeader:uI,WPMediaInput:nL.Z,UnsplashImageBrowser:uN}})],pN);const hN=pN,gN="design.background.image",mN=hN;var vN=(0,N.Z)(mN,sN,iN,!1,null,null,null);const yN=vN.exports;var fN=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"icon-editor vscroll-wrap vscroll-scroll"},[t("SingularityPanelHeader",{attrs:{parentTitle:"Edit Icon",backState:"page_structure"}}),t("div",{staticClass:"icon-editor-content-wrapper"},[t("IconInput",{attrs:{value:e.iconInputValue},on:{input:e.updateIconInputValue}})],1)],1)},_N=[],bN=n(77963);let SN=class extends s.ZP{get iconId(){return c.singularityStore.iconEditorPanelState.iconId}get iconInputValue(){if(!this.iconId)return null;const e=(0,ge.findNode)(c.documentStore.document.tree,this.iconId);if(!e)return null;const t=j()(e.data.properties,xN);return t||null}updateIconInputValue(e){this.iconId&&c.documentStore.unthrottledPropertyChanged({elementId:this.iconId,path:xN,value:e,meta:{snapshotLabel:"Icon Editor Input Update"}})}};SN=(0,r.gn)([(0,l.wA)({components:{IconInput:bN.Z,SingularityPanelHeader:EL}})],SN);const CN=SN,xN="content.content.icon",wN=CN;var IN=(0,N.Z)(wN,fN,_N,!1,null,null,null);const PN=IN.exports;var kN=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"text-editor vscroll-wrap vscroll-scroll"},[t("SingularityPanelHeader",{attrs:{parentTitle:"Edit Text",backState:"page_structure"}}),t("div",{staticClass:"text-editor-content-wrapper"},[t("TextInput",{attrs:{value:e.textInputValue,multiline:!0},on:{input:e.updateTextInputValue}})],1)],1)},EN=[];let TN=class extends s.ZP{get uiStoreActiveElementId(){return c.uiStore.activeElementId}closePanelIfElementIdChanges(){this.textEditorPanelState?.elementId!==this.uiStoreActiveElementId&&c.singularityStore.setTextEditorPanelState(null)}get textEditorPanelState(){return c.singularityStore.textEditorPanelState}get textInputValue(){if(!this.textEditorPanelState)return null;const e=(0,ge.findNode)(c.documentStore.document.tree,this.textEditorPanelState.elementId);if(!e)return null;const t=j()(e.data.properties,this.textEditorPanelState.contentEditablePropertyPath);return t||null}updateTextInputValue(e){this.textEditorPanelState?.elementId&&c.documentStore.unthrottledPropertyChanged({elementId:this.textEditorPanelState.elementId,path:this.textEditorPanelState.contentEditablePropertyPath,value:e,meta:{snapshotLabel:"Text Editor Input Update"}})}};(0,r.gn)([(0,l.RL)("uiStoreActiveElementId")],TN.prototype,"closePanelIfElementIdChanges",null),TN=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,SingularityPanelHeader:EL}})],TN);const DN=TN,AN=DN;var ZN=(0,N.Z)(AN,kN,EN,!1,null,null,null);const ON=ZN.exports;var MN=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-panel vscroll-wrap vscroll-scroll"},[t("div",{staticClass:"singularity-panel__wrapper"},[t("SingularityPanelHeader",{attrs:{parentTitle:"Edit",childTitle:"Link",backState:"page_structure"}}),t("div",{staticClass:"singularity-panel__content"},e._l(e.linkPropertyPaths,(function(n){return t("div",{key:n},[t("LinkInput",{attrs:{value:e.linkInputValue(n)},on:{input:function(t){return e.updateLinkInputValue(t,n)}}})],1)})),0)],1)])},BN=[],LN=n(98236);let NN=class extends s.ZP{get linkEditorPanelState(){return c.singularityStore.linkEditorPanelState}get uiStoreActiveElementId(){return c.uiStore.activeElementId}closePanelIfElementIdChanges(){this.linkEditorPanelState?.elementId!==this.uiStoreActiveElementId&&c.singularityStore.setLinkEditorPanelState(null)}get linkPropertyPaths(){return c.singularityStore.linkEditorPanelState?.linkPropertyPaths}linkInputValue(e){if(!this.linkEditorPanelState)return null;const t=(0,ge.findNode)(c.documentStore.document.tree,this.linkEditorPanelState.elementId);if(!t)return null;const n=j()(t.data.properties,e);return n||null}updateLinkInputValue(e,t){this.linkEditorPanelState?.elementId&&c.documentStore.unthrottledPropertyChanged({elementId:this.linkEditorPanelState.elementId,path:t,value:e,meta:{snapshotLabel:"Link Editor Input Update"}})}close(){alert("close")}backToPageStructurePanel(){c.singularityStore.setLinkEditorPanelState(null)}};(0,r.gn)([(0,l.RL)("uiStoreActiveElementId")],NN.prototype,"closePanelIfElementIdChanges",null),NN=(0,r.gn)([(0,l.wA)({components:{LinkInput:LN.Z,SingularityPanelHeader:EL}})],NN);const FN=NN,RN=FN;var VN=(0,N.Z)(RN,MN,BN,!1,null,null,null);const $N=VN.exports;var WN=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-panel vscroll-wrap vscroll-scroll singularity-edit-content-properties-panel"},[t("div",{staticClass:"singularity-panel__wrapper"},[t("SingularityPanelHeader",{attrs:{parentTitle:e.panelTitle}}),t("div",{staticClass:"singularity-panel__content"},[t("div",{staticClass:"singularity-controls-tree"},[e.contentSections?t("ControlsTree",{attrs:{controls:e.contentSections,path:"content",forceFirstSectionOpen:!0}}):e._e()],1)])],1)])},UN=[];let zN=class extends s.ZP{constructor(){super(...arguments),this.editingElementControlsTreeContext=Tx.rq}get contentSections(){return c.uiStore.activeElement?c.configStore.element(c.uiStore.activeElement.data.type).controls.contentSections:null}get contentPropertiesEditorPanelState(){return c.singularityStore.contentPropertiesEditorPanelState}get panelTitle(){return c.uiStore.activeElement?c.configStore.element(c.uiStore.activeElement.data.type).name:null}};(0,r.gn)([(0,l.DF)("context")],zN.prototype,"editingElementControlsTreeContext",void 0),zN=(0,r.gn)([(0,l.wA)({components:{ControlsTree:_C["default"],SingularityPanelHeader:EL}})],zN);const HN=zN,GN=HN;var KN=(0,N.Z)(GN,WN,UN,!1,null,null,null);const jN=KN.exports;var qN=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"header-footer-editor vscroll-wrap vscroll-scroll"},[t("SingularityPanelHeader",{attrs:{parentTitle:(e.isHeader?"Header":"Footer")+" Editor",isGlobal:"true"}}),t("div",{staticClass:"header-footer-editor-content-wrapper"},[t("div",{staticClass:"header-footer-editor-section-card"},[t("label",[e._v("Layout")]),e.sectionCardData?t("SectionCard",{attrs:{value:e.sectionCardData,showLabel:!0,isGlobal:!0},nativeOn:{click:function(t){return e.replaceWithAnother.apply(null,arguments)}}}):e._e(),t("NiceButton",{attrs:{"left-icon":"Grid2Icon",color:"gray",expanded:"true"},on:{click:e.replaceWithAnother}},[e._v("Update Layout ")])],1),t("div",{staticClass:"page-structure-section__divider"}),e.sectionIdToOperateOn?t("EditWithAiButton",{attrs:{nodeId:e.sectionIdToOperateOn}}):e._e(),t("div",{staticClass:"page-structure-section__divider"}),t("PageStructureSectionColorsNew",{attrs:{elementId:e.sectionIdToOperateOn,isOverlayHeader:e.isOverlayHeader}})],1)],1)},XN=[],YN=n(93979),QN=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"page-structure-section-colors-new"},[e._m(0),e.isOverlayHeader?t("div",{staticClass:"overlay-header-message"},[e._v(" Color scheme inherited from section ")]):t("div",{staticClass:"category-swatches-wrapper"},[t("div",{staticClass:"category-swatches"},e._l(e.availableCategories,(function(n){return t("div",{key:n.name,staticClass:"category-swatch",class:{"category-swatch--selected":e.selectedCategory===n.name},style:e.getCategoryStyle(n.scheme),attrs:{role:"button"},on:{click:function(t){return e.toggleCategory(n.name)}}},[t("div",{staticClass:"category-swatch__bg"}),t("div",{staticClass:"category-swatch__text"})])})),0),t("button",{staticClass:"randomize-button",attrs:{title:"Randomize color scheme"},on:{click:e.randomizeAll}},[t("Icon",{attrs:{icon:"ShuffleIcon",size:"16"}})],1)]),e.selectedCategory&&!e.isOverlayHeader?t("div",{staticClass:"color-scheme-picker"},[t("ColorSchemePicker",{attrs:{elementId:e.elementId,currentSchemeString:e.colorSchemeString,category:e.selectedCategory},on:{select:e.handleSchemeSelected}})],1):e._e()])},JN=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"page-structure-section__content-field"},[t("label",[e._v("Color Scheme")])])}],eF=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"color-scheme-picker-panel"},[t("div",{staticClass:"color-scheme-picker-panel__content"},[t("div",{staticClass:"scheme-controls"},[t("div",{staticClass:"scheme-controls__swatch",style:e.currentSwatchStyle},[t("div",{staticClass:"scheme-controls__swatch-letter"},[e._v("A")])]),t("input",{staticClass:"scheme-controls__slider",attrs:{type:"range",min:0,max:e.categorySchemes.length-1},domProps:{value:e.selectedIndex},on:{input:e.onSliderChange}}),t("button",{staticClass:"scheme-controls__button",attrs:{title:"Random scheme"},on:{click:e.shuffleScheme}},[t("Icon",{attrs:{icon:"ShuffleIcon",size:"16"}})],1),t("button",{staticClass:"scheme-controls__button",attrs:{title:"Show all schemes"},on:{click:e.toggleGrid}},[t("Icon",{attrs:{icon:"EllipsisIcon",size:"16"}})],1)]),e.showGrid?t("div",{staticClass:"schemes-grid"},e._l(e.categorySchemes,(function(n,s){return t("ColorSchemeCard",{key:s,attrs:{scheme:n,schemeString:e.getSchemeString(s),isSelected:e.getSchemeString(s)===e.currentSchemeString},on:{select:function(t){e.selectScheme(e.getSchemeString(s),n)}}})})),1):e._e()])])},tF=[],nF=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"color-scheme-card",class:{"color-scheme-card--selected":e.isSelected},style:e.previewStyle,attrs:{role:"button"},on:{click:e.select}},[t("div",{staticClass:"color-scheme-card__letter"},[e._v("A")]),e.isSelected?t("div",{staticClass:"color-scheme-card__checkmark"},[t("Icon",{attrs:{icon:"CheckIcon",size:"12"}})],1):e._e()])},sF=[];let iF=class extends s.ZP{get shadeLabel(){return(0,HM.uz)(this.scheme,this.schemeString)}get previewStyle(){return{"--card-bg":this.scheme.background.value?.toString(),"--card-text":this.scheme.contrastedFromBackgroundForText.value?.toString()}}select(){this.$emit("select")}};(0,r.gn)([(0,l.fI)({required:!0})],iF.prototype,"scheme",void 0),(0,r.gn)([(0,l.fI)({required:!0})],iF.prototype,"schemeString",void 0),(0,r.gn)([(0,l.fI)({default:!1})],iF.prototype,"isSelected",void 0),iF=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],iF);const oF=iF,aF=oF;var rF=(0,N.Z)(aF,nF,sF,!1,null,null,null);const lF=rF.exports;let cF=class extends s.ZP{constructor(){super(...arguments),this.showGrid=!1}get allSchemes(){return(0,YM.W)(Q.fz.brand.color)}get categorySchemes(){return"primary"===this.category?this.allSchemes.primary:"secondary1"===this.category?this.allSchemes.secondary[0]||[]:"secondary2"===this.category?this.allSchemes.secondary[1]||[]:"neutral"===this.category?this.allSchemes.neutral:[]}get selectedIndex(){const e=this.categorySchemes.findIndex(((e,t)=>this.getSchemeString(t)===this.currentSchemeString));return e>=0?e:0}get currentScheme(){return this.categorySchemes[this.selectedIndex]}get currentSwatchStyle(){return this.currentScheme?{"--card-bg":this.currentScheme.background.value?.toString(),"--card-text":this.currentScheme.contrastedFromBackgroundForText.value?.toString()}:{}}getSchemeString(e){return(0,HM.$w)(this.category,e)}onSliderChange(e){const t=e.target,n=parseInt(t.value),s=this.categorySchemes[n];s&&this.selectScheme(this.getSchemeString(n),s)}shuffleScheme(){const e=Math.floor(Math.random()*this.categorySchemes.length),t=this.categorySchemes[e];t&&this.selectScheme(this.getSchemeString(e),t)}toggleGrid(){this.showGrid=!this.showGrid}close(){this.$emit("close")}selectScheme(e,t){this.$emit("select",e,t)}};(0,r.gn)([(0,l.fI)({required:!0})],cF.prototype,"elementId",void 0),(0,r.gn)([(0,l.fI)({default:""})],cF.prototype,"currentSchemeString",void 0),(0,r.gn)([(0,l.fI)({required:!0})],cF.prototype,"category",void 0),cF=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,ColorSchemeCard:lF}})],cF);const dF=cF,uF=dF;var pF=(0,N.Z)(uF,eF,tF,!1,null,null,null);const hF=pF.exports;let gF=class extends s.ZP{get element(){return(0,ge.findNode)(Q.Hb.document.tree,this.elementId)}get chosenScheme(){if(!this.element)return HM.RT;const e=j()(this.element,"data.properties.settings.advanced.classes",[]);return(0,HM.kr)(e)}get colorSchemeString(){return this.chosenScheme.schemeString}get selectedCategory(){return this.chosenScheme.category}get schemeIndex(){return this.chosenScheme.index}get categoryLabel(){if(!this.selectedCategory)return"";const e={primary:"Primary",secondary1:"Secondary 1",secondary2:"Secondary 2",neutral:"Neutral"};return e[this.selectedCategory]||""}get allSchemes(){return(0,YM.W)(Q.fz.brand.color)}get availableCategories(){return(0,HM.n)(this.allSchemes,this.selectedCategory,this.schemeIndex)}getCategoryStyle(e){return e?{"--swatch-bg":e.background.value?.toString(),"--swatch-text":e.contrastedFromBackgroundForText.value?.toString()}:{}}toggleCategory(e){console.log("toggleCategory called with:",e,"current:",this.selectedCategory);const t=this.selectedCategory===e;t||this.selectRandomSchemeForCategory(e)}selectRandomSchemeForCategory(e){const t=(0,HM.w5)(e,this.allSchemes);t&&this.handleSchemeSelected(t.schemeString,t.scheme)}randomizeAll(){const e=(0,HM.qA)(this.allSchemes);e&&this.handleSchemeSelected(e.schemeString,e.scheme)}handleSchemeSelected(e,t){this.element&&(0,HM.Q8)(this.elementId,this.element,e,t)}};(0,r.gn)([(0,l.fI)({required:!0})],gF.prototype,"elementId",void 0),(0,r.gn)([(0,l.fI)({default:!1})],gF.prototype,"isOverlayHeader",void 0),gF=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,ColorSchemePicker:hF}})],gF);const mF=gF,vF=mF;var yF=(0,N.Z)(vF,QN,JN,!1,null,null,null);const fF=yF.exports;let _F=class extends s.ZP{get elementId(){return c.singularityStore.headerAndFooterEditorPanelState?.elementId}get sectionIdToOperateOn(){return(0,YN.Q)()}get sectionCardData(){return this.sectionIdToOperateOn?pr(this.sectionIdToOperateOn):null}get elementType(){return c.singularityStore.headerAndFooterEditorPanelState?.elementType}get uiStoreActiveElementId(){return c.uiStore.activeElementId}get uiStoreInlineEditingContext(){return c.uiStore.inlineEditingContext}get isHeader(){return"header"===this.elementType}get isOverlayHeader(){if(!this.isHeader||!this.elementId)return!1;const e=(0,ge.findNode)(c.documentStore.document.tree,this.elementId);return!!e&&(0,pi.ju)(e)}editMenu(){c.singularityStore.setSingularityLeftPanel("page_manager")}editLogo(){c.singularityStore.setSingularityLeftPanel("brand")}replaceWithAnother(){this.sectionIdToOperateOn&&(c.singularityStore.setSectionAddOrSwapPanelState({mode:"swap",sectionId:this.sectionIdToOperateOn}),c.singularityStore.setSectionLibraryModalState(!0))}mounted(){this.$watch("uiStoreActiveElementId",(()=>{const e=this.elementId===this.uiStoreActiveElementId,t=this.sectionIdToOperateOn===this.uiStoreActiveElementId;e||t||c.singularityStore.setHeaderAndFooterEditorPanelState(null)})),this.$watch("uiStoreInlineEditingContext",(e=>{e&&e.elementId===this.elementId||c.singularityStore.setHeaderAndFooterEditorPanelState(null)}))}};_F=(0,r.gn)([(0,l.wA)({components:{SingularityPanelHeader:EL,NiceButton:Br.Z,SectionCard:Pr,PageStructureSectionColorsNew:fF,EditWithAiButton:CB}})],_F);const bF=_F,SF=bF;var CF=(0,N.Z)(SF,qN,XN,!1,null,null,null);const xF=CF.exports;var wF=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-wp-page-manager"},[t("div",{staticClass:"singularity-wp-page-manager__wrapper"},[t("div",{staticClass:"singularity-wp-page-manager__header"},[t("div",{staticClass:"singularity-wp-page-manager__header-left"},[t("h1",{staticClass:"singularity-wp-page-manager__header-title"},[t("span",{on:{click:e.closeAdd}},[e._v("Pages")]),e.addIsOpen?t("span",{staticClass:"singularity-wp-page-manager__header-title-child"},[e._v(" / Add Page")]):e._e()])]),t("div",{staticClass:"singularity-wp-page-manager__header-right"},[e.addIsOpen?e._e():t("NiceButton",{attrs:{"left-icon":"PlusIcon",color:"gray",size:"small"},on:{click:e.openAdd}},[e._v(" Add Page")])],1)]),e.addIsOpen?e._e():t("div",{staticClass:"singularity-wp-page-manager__content"},[t("div",{staticClass:"singularity-wp-page-manager__section"},[t("div",{staticClass:"singularity-wp-page-manager__section-header"},[t("h3",{staticClass:"singularity-wp-page-manager__section-title"},[e._v(" Pages In Main Menu ")]),t("span",{staticClass:"singularity-wp-page-manager__section-count"},[e._v(e._s(e.pagesInMenu.length))])]),t("div",{staticClass:"singularity-wp-page-manager__list",class:{"is-saving":e.saveInProgress,"is-opening":e.isOpeningPage,"is-empty":0===e.pagesInMenu.length}},[t("draggable",{staticClass:"singularity-wp-page-manager__menu-dropzone",class:{"is-empty":0===e.pagesInMenu.length},attrs:{handle:".page-drag-handle",group:"pages"},model:{value:e.pagesInMenu,callback:function(t){e.pagesInMenu=t},expression:"pagesInMenu"}},[e._l(e.pagesInMenu,(function(n){return t("WPPageManagerPageNew",{key:n.id,attrs:{value:n},on:{"page-deleted":e.handlePageDeleted,"page-updated":e.updateLocalPageLists}})})),0===e.pagesInMenu.length?t("div",{staticClass:"singularity-wp-page-manager__empty-menu"},[e._v(" Drag pages here to add them to the main menu ")]):e._e()],2)],1)]),t("div",{staticClass:"singularity-wp-page-manager__section"},[t("div",{staticClass:"singularity-wp-page-manager__section-header"},[t("h3",{staticClass:"singularity-wp-page-manager__section-title"},[e._v(" Other Pages "),t("SingularityTooltip",{attrs:{text:"These pages are not included in the main menu. You can drag and drop them into the main menu above."}})],1),t("span",{staticClass:"singularity-wp-page-manager__section-count"},[e._v(e._s(e.otherPages.length))])]),t("div",{staticClass:"singularity-wp-page-manager__list",class:{"is-saving":e.saveInProgress,"is-opening":e.isOpeningPage,"is-empty":0===e.otherPages.length}},[t("draggable",{staticClass:"singularity-wp-page-manager__menu-dropzone",class:{"is-empty":0===e.otherPages.length},attrs:{group:"pages"},model:{value:e.otherPages,callback:function(t){e.otherPages=t},expression:"otherPages"}},[e._l(e.otherPages,(function(n){return t("WPPageManagerPageNew",{key:n.id,attrs:{value:n},on:{"page-deleted":e.handlePageDeleted,"page-updated":e.updateLocalPageLists}})})),0===e.otherPages.length?t("div",{staticClass:"singularity-wp-page-manager__empty-menu"},[e._v(" Drag pages here to remove them from the main menu. ")]):e._e()],2)],1)])]),e.addIsOpen?t("WPPageManagerAddPageWizard",{on:{close:e.closeAdd}}):e._e()],1)])},IF=[],PF=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"wp-page-manager-page-new",class:e.classList,on:{click:function(t){!e.editingTitle&&e.openInCanvas()}}},[t("div",{staticClass:"wp-page-manager-page-new__content"},[t("div",{staticClass:"wp-page-manager-page-new__title"},[t("Icon",{staticClass:"page-drag-handle wp-page-manager-page-new__drag-handle",attrs:{size:18,icon:"GripVerticalSolidIcon"}}),e.isOpeningPageThisPage||e.value.generatingInBackground?t("Icon",{staticClass:"wp-page-manager-page-new__loading-icon",attrs:{size:14,icon:"CircleNotchSolidIcon"}}):t("Icon",{attrs:{size:14,icon:e.isHomepage?"HomeSolidIcon":"PageRegularIcon"}}),t("div",{staticClass:"wp-page-manager-page-new__edit-title",on:{click:function(e){e.stopPropagation()}}},[t("InlineTextEdit",{staticClass:"wp-page-manager-page-new__title-text",attrs:{value:e.value.title||"Untitled",component:"span",active:e.editingTitle},on:{update:e.updatePage,editing:function(t){e.editingTitle=t}}})],1),e.active?t("span",{staticClass:"wp-page-manager-page-new__active-indicator"}):e._e()],1),t("div",{staticClass:"wp-page-manager-page-new__actions"},[t("Dropdown",{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("Icon",e._g({staticClass:"breakdance-panel-header-left-of-close-button",attrs:{size:16,icon:"EllipsisSolidIcon"}},n))]}}])},[t(Ec.Z,[t(Tc.Z,{attrs:{dense:""},on:{click:e.setAsHomepage}},[t(Dc.V9,[e._v(" Set as Homepage ")])],1),t(Tc.Z,{attrs:{dense:""},on:{click:e.deletePage}},[t(Dc.V9,[e._v(" Delete ")])],1),t(Tc.Z,{attrs:{dense:""},on:{click:e.setEditMode}},[t(Dc.V9,[e._v(" Edit title ")])],1)],1)],1)],1)])])},kF=[],EF=n(52338);async function TF(e){return(0,id.pipe)(await(0,ad.D)({action:"breakdance_singularity_set_as_homepage",decoder:iu.dt({success:iu.Z_}),dataToPost:{id:e}}),(0,od.fold)((()=>!1),(t=>(c.singularityStore.setHomepageInWP(e),!0))))}let DF=class extends s.ZP{constructor(){super(...arguments),this.additionalOpen=!1,this.deleteInProgress=!1,this.editingTitle=!1,this.newTitle="",this.updateInProgress=!1,this.setAsHomepageInProgress=!1}get isHomepage(){return c.singularityStore.homepageInWP===this.value.id}get isOpeningPageThisPage(){return c.singularityStore.isOpeningPageId===this.value.id}openAdditional(){this.additionalOpen=!this.additionalOpen}async openInCanvas(){c.singularityStore.setIsOpeningPageId(this.value.id),await(0,zl.$)(),await(0,Hl.rI)(this.value.id),c.singularityStore.setSingularityLeftPanel("page_structure"),c.singularityStore.setIsOpeningPageId(!1)}async deletePage(){const e=confirm(`Are you sure you want to delete the page "${this.value.title}"?`);e&&(this.deleteInProgress=!0,await(0,EF.qC)(this.value.id),this.deleteInProgress=!1,this.$emit("page-deleted",this.value.id))}setEditMode(){this.editingTitle=!0}get pageInStore(){return c.singularityStore.pagesInWP.find((e=>e.id===this.value.id))}async updatePage(e){console.log("Updating page title to:",e),e.trim()?(this.updateInProgress=!0,await(0,EF.U_)(this.value.id,e),this.updateInProgress=!1,this.editingTitle=!1,this.$emit("page-updated")):this.editingTitle=!1}async setAsHomepage(){this.setAsHomepageInProgress=!0,await TF(this.value.id),this.setAsHomepageInProgress=!1}get active(){return this.value.id===c.documentStore.document.documentMeta.id}get classList(){return{"is-active":this.active,"is-opening":this.isOpeningPageThisPage,"is-deleting":this.deleteInProgress,"is-updating":this.updateInProgress,"is-setting-as-homepage":this.setAsHomepageInProgress,"is-generating":this.value.generatingInBackground}}};(0,r.gn)([(0,l.fI)()],DF.prototype,"value",void 0),DF=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z,Icon:He.Z,Dropdown:Oc.Z,InlineTextEdit:FM}})],DF);const AF=DF,ZF=AF;var OF=(0,N.Z)(ZF,PF,kF,!1,null,null,null);const MF=OF.exports;var BF=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"wp-page-manager-add-page-wizard"},["choose-type"===e.currentStep?t("div",{staticClass:"wizard-step"},[e._m(0),t("div",{staticClass:"page-type-options"},[t("SingularityOption",{attrs:{icon:"FileLinesIcon",title:"Blank Page"},on:{click:function(t){return e.selectPageType("blank")}}}),t("SingularityOption",{attrs:{icon:"SparklesIcon",title:"Generate With AI"},on:{click:function(t){return e.selectPageType("ai")}}})],1)]):e._e(),"page-details"===e.currentStep?t("div",{staticClass:"wizard-step"},[t("div",{staticClass:"wizard-header"},[t("h3",{staticClass:"wizard-header__title",on:{click:e.goBack}},[t("Icon",{attrs:{icon:"ChevronDownSolidIcon",rotate:"90",size:"14"}}),e._v(" "+e._s("blank"===e.selectedType?"Create Blank Page":"Generate Page With AI")+" ")],1)]),t("div",{staticClass:"form-content"},[t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"page-title"}},[e._v("Page Title")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.pageTitle,expression:"pageTitle"}],ref:"pageTitleInput",staticClass:"form-input",attrs:{id:"page-title",type:"text",placeholder:"Enter page title"},domProps:{value:e.pageTitle},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.createPage.apply(null,arguments)},input:function(t){t.target.composing||(e.pageTitle=t.target.value)}}})]),"ai"===e.selectedType?t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"page-description"}},[e._v("Page Description")]),t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.pageDescription,expression:"pageDescription"}],staticClass:"form-textarea",attrs:{id:"page-description",placeholder:"Describe what this page should contain (e.g., 'About page for a tech company with team bios and company history')",rows:"4"},domProps:{value:e.pageDescription},on:{input:function(t){t.target.composing||(e.pageDescription=t.target.value)}}})]):e._e()]),t("div",{staticClass:"form-actions"},[t("NiceButton",{attrs:{color:"gray",size:"large"},on:{click:e.goBack}},[e._v(" Back ")]),t("NiceButton",{attrs:{"left-icon":"blank"===e.selectedType?"PlusIcon":"SparklesSolidIcon",color:"yellow",expanded:"true",size:"large",disabled:!e.pageTitle.trim()},on:{click:e.createPage}},[e._v(" "+e._s("blank"===e.selectedType?"Create Page":"Generate Page")+" ")])],1)]):e._e(),"creating"===e.currentStep?t("div",{staticClass:"wizard-step"},[t("div",{staticClass:"success-content"},[t("h3",[t("Icon",{staticClass:"animate-spin",attrs:{icon:"CircleNotchSolidIcon",size:"24"}}),e._v(" "+e._s("blank"===e.selectedType?"Creating your page...":"Generating...")+" ")],1),"ai"===e.selectedType?t("p",[e._v(" This may take a moment as AI creates your content. ")]):e._e()])]):e._e(),"success"===e.currentStep?t("div",{staticClass:"wizard-step"},[t("div",{staticClass:"success-content"},[t("h3",[t("Icon",{attrs:{icon:"CheckSolidIcon",size:"24"}}),e._v(" Your page was created!")],1),t("p",[t("b",[e._v(e._s(e.pageTitle))]),e._v(" has been successfully "+e._s("blank"===e.selectedType?"created":"generated")+" ")]),t("div",{staticClass:"success-actions"},[t("NiceButton",{staticStyle:{width:"50%"},attrs:{color:"yellow",size:"large",loading:e.openingInProgress,expanded:"true"},on:{click:e.editPage}},[e.openingInProgress?t("div",{staticClass:"css-spinner-small"}):e._e(),e._v(" "+e._s(e.openingInProgress?"Opening...":"Edit Page")+" ")]),t("NiceButton",{attrs:{variant:"gray",size:"large",loading:e.openingInProgress},on:{click:e.backToPages}},[e._v(" Back to Pages ")])],1),"ai"===e.selectedType?t("FeedbackBoxAI",{attrs:{"event-properties":e.eventPropertiesForTracking}}):e._e()],1)]):e._e()])},LF=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"wizard-header"},[t("h3",[e._v("How would you like to create your page?")])])}],NF=n(41791),FF=n(44821),RF=n(20952),VF=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.isHidden?e._e():t("div",{staticClass:"feedback-box-ai",class:{"feedback-sent":e.feedbackSent}},[t("label",{staticClass:"feedback-box-ai-label"},[e._v(e._s(e.feedbackSent?"Thank you for your feedback!":"How did we do?"))]),t("div",{staticClass:"feedback-box-thumbs"},[t("button",{staticClass:"feedback-thumb",class:{"is-selected":"up"===e.rating},attrs:{type:"button","aria-label":"Thumbs up"},on:{click:function(t){return e.handleThumb("up")}}},[t("Icon",{attrs:{icon:"ThumbsUpSolidIcon",size:"20"}})],1),t("button",{staticClass:"feedback-thumb feedback-thumb-down",class:{"is-selected":"down"===e.rating},attrs:{type:"button","aria-label":"Thumbs down"},on:{click:function(t){return e.handleThumb("down")}}},[t("Icon",{attrs:{icon:"ThumbsUpSolidIcon",rotate:"180",size:"20"}})],1)])])},$F=[];let WF=class extends s.ZP{constructor(){super(...arguments),this.rating=null,this.feedbackSent=!1,this.isHidden=!1}handleThumb(e){this.rating=e,(0,Tt.K)("FutureLayer Feedback AI",{rating:e,...this.eventProperties}),this.feedbackSent=!0,setTimeout((()=>{this.feedbackSent=!1,this.rating=null,this.isHidden=!0}),3e3)}};(0,r.gn)([(0,l.fI)()],WF.prototype,"eventProperties",void 0),WF=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],WF);const UF=WF,zF=UF;var HF=(0,N.Z)(zF,VF,$F,!1,null,null,null);const GF=HF.exports;let KF=class extends s.ZP{constructor(){super(...arguments),this.currentStep="choose-type",this.selectedType=null,this.pageTitle="",this.pageDescription="",this.createdPageId=null,this.openingInProgress=!1}selectPageType(e){this.selectedType=e,this.currentStep="page-details",this.$nextTick((()=>{this.$refs.pageTitleInput?.focus()})),(0,Tt.K)("FutureLayer WP Page Manager: Page Type Selected",{type:e})}goBack(){"page-details"===this.currentStep&&(this.currentStep="choose-type",this.selectedType=null)}async createPage(){if(this.pageTitle.trim()){this.currentStep="creating";try{let e;if(await(0,FF.N)(),"ai"===this.selectedType){const t=await(0,EF.Le)(this.pageTitle,{},"page");if(!t)return;e=await(0,er.j)((async e=>await(0,NF.x)(this.pageTitle,t.id,e,this.pageDescription||void 0)),{jobType:"background_page_generation",pageId:t.id,pageTitle:this.pageTitle,description:`Generating page: ${this.pageTitle}`,priority:"normal"}),(0,Tt.K)("FutureLayer WP Page Manager: AI Page Generation Started",{title:this.pageTitle,description:this.pageDescription||null})}else{const t=(0,ge.getBlankTree)(),n=(0,Us.LC)(t);e=await(0,EF.DC)({title:this.pageTitle,postType:"page",tree:n,singularityMeta:{}}),(0,Tt.K)("FutureLayer WP Page Manager: Blank Page Creation Started",{title:this.pageTitle})}if(!e)return;this.createdPageId=e.id,this.currentStep="success",(0,RF.h)()}catch(e){console.error("Failed to create page:",e)}}}get eventPropertiesForTracking(){return{pageType:this.selectedType,pageTitle:this.pageTitle,pageDescription:"ai"===this.selectedType?this.pageDescription:null}}async editPage(){this.createdPageId&&(this.openingInProgress=!0,await(0,zl.$)(),await(0,Hl.rI)(this.createdPageId),c.singularityStore.setSingularityLeftPanel("page_structure"),this.openingInProgress=!1)}backToPages(){this.$emit("close")}};KF=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,IconButton:Xa.Z,NiceButton:Br.Z,SingularityOption:Or,FeedbackBoxAI:GF}})],KF);const jF=KF,qF=jF;var XF=(0,N.Z)(qF,BF,LF,!1,null,null,null);const YF=XF.exports;let QF=class extends s.ZP{constructor(){super(...arguments),this.pagesInMenu=[],this.otherPages=[],this.addIsOpen=!1,this.menuSaving=!1,this.menuSaved=!1,this.initialLoadComplete=!1,this.saveInProgress=!1}mounted(){this.updateLocalPageLists(),this.$nextTick((()=>{this.initialLoadComplete=!0}))}get isOpeningPage(){return c.singularityStore.isOpeningPageId}get pages(){return c.singularityStore.pagesInWP.filter((e=>"page"===e.postType))}updateLocalPageLists(){const e=this.pages;this.pagesInMenu=e.filter((e=>e.isInMainMenu)).sort(((e,t)=>{const n=e.menuOrder||0,s=t.menuOrder||0;return n-s})),this.otherPages=e.filter((e=>!e.isInMainMenu)),(0,Tt.K)("FutureLayer WP Page Manager: Local Page Lists Updated")}async onMenuPagesChanged(){if(this.initialLoadComplete){this.saveInProgress=!0;const e=this.pagesInMenu.map((e=>e.id));await(0,EF.TE)(e),this.saveInProgress=!1}}handlePageDeleted(e){this.pagesInMenu=this.pagesInMenu.filter((t=>t.id!==e)),this.otherPages=this.otherPages.filter((t=>t.id!==e))}openAdd(){this.addIsOpen=!0,(0,Tt.K)("FutureLayer WP Page Manager: Open Add Page")}closeAdd(){this.addIsOpen=!1,this.updateLocalPageLists()}};(0,r.gn)([(0,l.RL)("pagesInMenu",{deep:!0})],QF.prototype,"onMenuPagesChanged",null),QF=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,WPPageManagerPageNew:MF,WPPageManagerAddPageWizard:YF,Dropdown:Oc.Z,IconButton:Xa.Z,SingularityPanelHeader:EL,NiceButton:Br.Z,Icon:He.Z,draggable:ev(),SingularityTooltip:UB}})],QF);const JF=QF,eR=JF;var tR=(0,N.Z)(eR,wF,IF,!1,null,null,null);const nR=tR.exports;var sR=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-panel vscroll-wrap vscroll-scroll"},[t("div",{staticClass:"singularity-panel__wrapper"},[t("SingularityPanelHeader",{attrs:{parentTitle:"Brand"}}),t("div",{staticClass:"singularity-panel__content"},[t("BrandManageLogo"),t("BrandManageColors"),t("BrandManageTypography"),t("BrandManageButtons")],1)],1)])},iR=[],oR=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("TogglePanel",{attrs:{title:"Colors",open:e.isPanelOpen},scopedSlots:e._u([{key:"actions",fn:function(){return[t("IconButtonShuffle",{on:{update:e.shuffle}})]},proxy:!0}])},[t("BrandPaletteGenerator",{attrs:{palette:e.brand.color.neutral,neutral:!0}}),e.brand.color.primary?t("BrandPaletteGenerator",{attrs:{palette:e.brand.color.primary},on:{update:e.updatePrimaryPalette}}):e._e(),e._l(e.brand.color.secondary,(function(n,s){return t("BrandPaletteGenerator",{key:n.label,attrs:{palette:n,index:s},on:{update:function(t){return e.updateSecondaryPalette(s,t)},remove:function(t){return e.removeSecondaryPalette(s)}}})})),e.brand.color.secondary.length<2?t("div",{staticClass:"brand-panel__add-palette",attrs:{role:"button"},on:{click:function(t){return e.addPalette(e.brand.color.secondary.length+1)}}},[t("Icon",{staticClass:"brand-panel__add-icon",attrs:{icon:"PlusIcon",size:"18"}})],1):e._e()],2)},aR=[],rR=function(){var e=this,t=e._self._c;e._self._setupProxy;return e.palette?t("div",{staticClass:"palette-generator"},[e.palette?t("div",{staticClass:"palette-generator__button",class:{"palette-generator__button--light":e.isLightColor,"palette-generator__button--neutral":e.neutral,"palette-generator__button--primary":e.palette.primary,"palette-generator__button--secondary":!e.neutral&&!e.palette.primary,"palette-generator__button--locked":e.palette.locked}},[e.neutral?e._e():t("div",{staticClass:"palette-generator__actions"},[e.palette.primary||e.palette.locked?e._e():t("div",{staticClass:"palette-generator__action",style:e.primaryTagStyle,attrs:{role:"button"},on:{click:e.removePalette}},[t("Icon",{attrs:{icon:"TrashSolidIcon",size:"10"}})],1),e.palette.locked?e._e():t("div",{staticClass:"palette-generator__action",style:e.primaryTagStyle,attrs:{role:"button"},on:{click:e.shufflePalette}},[t("Icon",{attrs:{icon:"ArrowsRotateSolidIcon",size:"10"}})],1),t("div",{staticClass:"palette-generator__action",style:e.primaryTagStyle,attrs:{role:"button"},on:{click:e.lockPalette}},[e.palette.locked?t("Icon",{attrs:{icon:"LockSolidIcon",size:"10"}}):t("Icon",{staticClass:"palette-generator__icon-locked",attrs:{icon:"LockOpenSolidIcon",size:"10"}})],1)]),t("div",{staticClass:"palette-generator__base",class:{"palette-generator__base--light":e.isLightColor,"palette-generator__base--neutral":e.neutral},style:{backgroundColor:e.palette.base.value?.toString()},attrs:{role:"button"},on:{click:e.openEditColorPanel}},[t("div",{staticClass:"palette-generator__top"},[t("div",[e.palette.primary&&!e.palette.locked?t("div",{staticClass:"palette-generator__badge",style:e.primaryTagStyle},[e._v(" Primary ")]):e._e()])]),t("div",{staticClass:"palette-generator__label-group",style:e.textStyle},[t("span",{staticClass:"palette-generator__label"},[e._v(e._s(e.palette.label))]),t("span",{staticClass:"palette-generator__hex"},[e._v(" "+e._s(e.palette.base.value?.toString().substring(1).toUpperCase())+" ")])])]),t("div",{staticClass:"palette-generator__swatches"},e._l(e.palette.scale,(function(e,n){return t("div",{key:"color-"+n,staticClass:"palette-generator__swatch",style:{backgroundColor:e.value?.toString()}})})),0)]):e._e()]):e._e()},lR=[],cR=n(45904),dR=n(43425);let uR=class extends s.ZP{constructor(){super(...arguments),this.isOverlayOpen=!1}openEditColorPanel(){this.palette&&!this.palette.locked&&(c.singularityStore.setSingularityLeftPanel("brand_edit_color"),c.singularityStore.setCurrentPalette({palette:this.palette,index:this.index??null}))}get textStyle(){return this.palette?{color:(0,dR.eO)(this.palette.base.value?.toString())?this.palette.scale[900].value?.toString():this.palette.scale[100].value?.toString()}:{}}get primaryTagStyle(){return this.palette?{backgroundColor:((0,dR.eO)(this.palette.base.value?.toString()),this.palette.scale[600].value?.toString()),color:(0,dR.eO)(this.palette.base.value?.toString())?this.palette.scale[900].value?.toString():this.palette.scale[100].value?.toString()}:{}}updatePalette(e){this.$emit("update",{...e,primary:this.palette.primary,locked:this.palette.locked})}removePalette(){this.$emit("remove")}lockPalette(){this.$emit("update",{...this.palette,locked:!this.palette.locked})}shufflePalette(){const e=(0,dR.Bc)(this.palette.primary,this.index?this.index+1:1);this.updatePalette(e)}get isLightColor(){return!!this.palette?.base&&(0,dR.eO)(this.palette.base.value?.toString())}};(0,r.gn)([(0,l.fI)()],uR.prototype,"palette",void 0),(0,r.gn)([(0,l.fI)({default:!1})],uR.prototype,"neutral",void 0),(0,r.gn)([(0,l.fI)()],uR.prototype,"index",void 0),uR=(0,r.gn)([(0,cR.ZP)({components:{Icon:He.Z}})],uR);const pR=uR,hR=pR;var gR=(0,N.Z)(hR,rR,lR,!1,null,null,null);const mR=gR.exports;var vR=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"toggle-panel",class:{"toggle-panel--loading":e.isLoading}},[t("div",{staticClass:"toggle-panel__header"},[t("span",{staticClass:"toggle-panel__title",on:{click:e.toggle}},[t("Icon",{staticClass:"toggle-panel__icon",attrs:{size:"14",icon:"ChevronDownSolidIcon",rotate:e.isOpen?"":"-90"}}),t("span",[e._v(e._s(e.title))])],1),t("div",{staticClass:"toggle-panel__actions"},[e._t("actions")],2)]),e.isOpen?t("div",{staticClass:"toggle-panel__content"},[e._t("default")],2):e._e()])},yR=[];let fR=class extends s.ZP{constructor(){super(...arguments),this.isOpen=this.open}onIsOpenChanged(e){this.isOpen=e}toggle(){this.isOpen=!this.isOpen,this.$emit("update:isOpen",this.isOpen)}};(0,r.gn)([(0,l.fI)({type:String,default:""})],fR.prototype,"title",void 0),(0,r.gn)([(0,l.fI)({type:Boolean,default:!1})],fR.prototype,"isLoading",void 0),(0,r.gn)([(0,l.fI)({type:Boolean,default:!1})],fR.prototype,"open",void 0),(0,r.gn)([(0,l.RL)("isOpen")],fR.prototype,"onIsOpenChanged",null),fR=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],fR);const _R=fR,bR=_R;var SR=(0,N.Z)(bR,vR,yR,!1,null,null,null);const CR=SR.exports;let xR=class extends s.ZP{get brand(){return c.singularityStore.brand}get isPanelOpen(){return"color"===c.singularityStore.brandPanelState?.openedPanel}updatePrimaryPalette(e){Ie.n.transaction((()=>{e.primary=!0,c.singularityStore.setPalette({type:"primary",palette:e}),(0,dR.hR)()}),"Updated primary color"),(0,Tt.K)("FutureLayer Brand: Primary Palette Updated",{type:"primary"})}updateSecondaryPalette(e,t){Ie.n.transaction((()=>{c.singularityStore.updateSecondaryPalette({index:e,palette:t}),(0,dR.hR)()}),"Updated secondary color"),(0,Tt.K)("FutureLayer Brand: Primary Palette Updated",{type:"secondary"})}removeSecondaryPalette(e){Ie.n.transaction((()=>{c.singularityStore.removeSecondaryPalette(e),(0,dR.hR)()}),"Removed secondary color")}shuffle(){(0,dR.q3)(),(0,Tt.K)("FutureLayer Brand: Colors Shuffled")}addPalette(e){Ie.n.transaction((()=>{this.brand.color.primary?(0,dR._c)(e):(0,dR.SL)(),(0,dR.hR)()}),"Added color palette")}};xR=(0,r.gn)([(0,l.wA)({components:{BrandPaletteGenerator:mR,IconButtonShuffle:cB,Icon:He.Z,TogglePanel:CR}})],xR);const wR=xR,IR=wR;var PR=(0,N.Z)(IR,oR,aR,!1,null,null,null);const kR=PR.exports;var ER=n(62367),TR=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("TogglePanel",{attrs:{title:"Typography",open:e.isPanelOpen},scopedSlots:e._u([{key:"actions",fn:function(){return[t("IconButtonShuffle",{on:{update:e.shuffle}})]},proxy:!0}])},[t("BrandTypographyPicker",{attrs:{value:e.headingFont,label:"Headings",type:"heading_font"},on:{update:function(t){return e.updateFont("heading_font",t)}}}),t("BrandTypographyPicker",{attrs:{value:e.bodyFont,label:"Text",type:"body_font"},on:{update:function(t){return e.updateFont("body_font",t)}}}),t("BrandTypographyPicker",{attrs:{value:e.buttonPrimaryTypographyFont,type:"buttons",label:"Buttons"},on:{update:function(t){return e.updateFont("buttons",t)}}}),t("BrandToggleFontSizes",{on:{update:e.updateFontRatio}})],1)},DR=[],AR=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"typography-picker"},[t("BrandTypographyFont",{attrs:{value:e.value,label:e.label},on:{update:e.openTypographyEditPanel}})],1)},ZR=[],OR=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"typography-font",attrs:{role:"button"},on:{click:e.update}},[e.font?.previewImageUrl?t("img",{staticClass:"typography-font__preview-image",attrs:{alt:e.font?.label,src:e.font?.previewImageUrl}}):e._e(),t("div",{staticClass:"typography-font__info"},[t("span",{staticClass:"typography-font__label"},[e._v(e._s(e.description||e.font?.label||"No font"))]),e.label?t("span",{staticClass:"typography-font__description"},[e._v(" "+e._s(e.label)+" ")]):e._e()])])},MR=[];let BR=class extends s.ZP{update(){this.$emit("update",this.value)}get font(){return c.configStore.fonts.find((e=>e.slug===this.value?.slug))}};(0,r.gn)([(0,l.fI)()],BR.prototype,"label",void 0),(0,r.gn)([(0,l.fI)()],BR.prototype,"description",void 0),(0,r.gn)([(0,l.fI)()],BR.prototype,"value",void 0),BR=(0,r.gn)([l.wA],BR);const LR=BR,NR=LR;var FR=(0,N.Z)(NR,OR,MR,!1,null,null,null);const RR=FR.exports;let VR=class extends s.ZP{constructor(){super(...arguments),this.isOverlayOpen=!1}update(e){c.singularityStore.setSingularityLeftPanel("brand"),this.$emit("update",e)}openTypographyEditPanel(){c.singularityStore.setSingularityLeftPanel("brand_edit_typography"),c.singularityStore.setCurrentFont(this.type)}};(0,r.gn)([(0,l.fI)()],VR.prototype,"value",void 0),(0,r.gn)([(0,l.fI)({default:"Body"})],VR.prototype,"label",void 0),(0,r.gn)([(0,l.fI)({default:"body_font"})],VR.prototype,"type",void 0),VR=(0,r.gn)([(0,l.wA)({components:{BrandTypographyFont:RR}})],VR);const $R=VR,WR=$R;var UR=(0,N.Z)(WR,AR,ZR,!1,null,null,null);const zR=UR.exports,HR=[{body_font:"gfont-nunitosans",heading_font:"gfont-playfairdisplay"},{body_font:"gfont-montserrat",heading_font:"gfont-domine"},{body_font:"gfont-lato",heading_font:"gfont-ptserif"},{body_font:"gfont-nunitosans",heading_font:"gfont-librecaslontext"},{body_font:"gfont-opensans",heading_font:"gfont-gloock"},{body_font:"gfont-heebo",heading_font:"gfont-ebgaramond"},{body_font:"gfont-roboto",heading_font:"gfont-lora"},{body_font:"gfont-mulish",heading_font:"gfont-domine"},{body_font:"gfont-barlow",heading_font:"gfont-dmserifdisplay"},{body_font:"gfont-roboto",heading_font:"gfont-librecaslontext"},{body_font:"gfont-mulish",heading_font:"gfont-librecaslontext"},{body_font:"gfont-heebo",heading_font:"gfont-domine"},{body_font:"gfont-karla",heading_font:"gfont-gloock"},{body_font:"gfont-montserrat",heading_font:"gfont-playfairdisplay"},{body_font:"gfont-poppins",heading_font:"gfont-cinzel"},{body_font:"gfont-manrope",heading_font:"gfont-vollkorn"},{body_font:"gfont-worksans",heading_font:"gfont-crimsonpro"},{body_font:"gfont-manrope",heading_font:"gfont-nunitosans"},{body_font:"gfont-opensans",heading_font:"gfont-jost"},{body_font:"gfont-nunitosans",heading_font:"gfont-raleway"},{body_font:"gfont-raleway",heading_font:"gfont-montserrat"},{body_font:"gfont-inter",heading_font:"gfont-karla"},{body_font:"gfont-firasans",heading_font:"gfont-nunitosans"},{body_font:"gfont-jost",heading_font:"gfont-opensans"},{body_font:"gfont-firasans",heading_font:"gfont-ibmplexsans"},{body_font:"gfont-dmsans",heading_font:"gfont-raleway"},{body_font:"gfont-quicksand",heading_font:"gfont-mulish"},{body_font:"gfont-opensans",heading_font:"gfont-inter"},{body_font:"gfont-lato",heading_font:"gfont-ibmplexsans"},{body_font:"gfont-opensans",heading_font:"gfont-lato"},{body_font:"gfont-nunitosans",heading_font:"gfont-jost"},{body_font:"gfont-montserrat",heading_font:"gfont-karla"},{body_font:"gfont-raleway",heading_font:"gfont-poppins"},{body_font:"gfont-raleway",heading_font:"gfont-dmsans"},{body_font:"gfont-crimsonpro",heading_font:"gfont-montserrat"},{body_font:"gfont-lora",heading_font:"gfont-dmsans"},{body_font:"gfont-cardo",heading_font:"gfont-firasans"},{body_font:"gfont-domine",heading_font:"gfont-poppins"},{body_font:"gfont-rosarivo",heading_font:"gfont-jost"},{body_font:"gfont-vollkorn",heading_font:"gfont-firasans"},{body_font:"gfont-domine",heading_font:"gfont-manrope"},{body_font:"gfont-ebgaramond",heading_font:"gfont-lato"},{body_font:"gfont-ebgaramond",heading_font:"gfont-manrope"},{body_font:"gfont-alegreya",heading_font:"gfont-montserrat"},{body_font:"gfont-lora",heading_font:"gfont-mulish"},{body_font:"gfont-gloock",heading_font:"gfont-manrope"},{body_font:"gfont-crimsonpro",heading_font:"gfont-ubuntu"},{body_font:"gfont-alegreya",heading_font:"gfont-karla"},{body_font:"gfont-ptserif",heading_font:"gfont-montserrat"},{body_font:"gfont-ptserif",heading_font:"gfont-lato"},{body_font:"gfont-fredoka",heading_font:"gfont-lobster"},{body_font:"gfont-comfortaa",heading_font:"gfont-pacifico"},{body_font:"gfont-rubik",heading_font:"gfont-chewy"},{body_font:"gfont-kumbhsans",heading_font:"gfont-lemon"},{body_font:"gfont-quicksand",heading_font:"gfont-righteous"},{body_font:"gfont-signika",heading_font:"gfont-monoton"},{body_font:"gfont-mavenpro",heading_font:"gfont-alfaslabone"},{body_font:"gfont-urbanist",heading_font:"gfont-bungee"},{body_font:"gfont-balsamiqsans",heading_font:"gfont-permanentmarker"},{body_font:"gfont-sen",heading_font:"gfont-russoone"}];function GR(){return HR[Math.floor(Math.random()*HR.length)]}function KR(){const{body_font:e,heading_font:t}=GR();Ie.n.transaction((()=>{jR("body_font",e),jR("heading_font",t),jR("buttons",e)}),"Shuffled typography")}function jR(e,t){e&&("buttons"!==e?(0,ER.Ig)("settings.typography",{[e]:t}):qR(t))}function qR(e){(0,ER.Ig)(["settings.buttons.primary.typography.typography.custom.customTypography.fontFamily","settings.buttons.secondary.typography.typography.custom.customTypography.fontFamily"],{breakpoint_base:e})}function XR(e){(0,ER.Ig)("settings.typography",{ratio:{breakpoint_base:e}})}var YR=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("ButtonGroup",{attrs:{options:e.ratios,value:e.currentRatio},on:{update:e.update}})},QR=[],JR=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"toggle-button-group"},[e.label?t("label",{staticClass:"toggle-button-group__label"},[e._v(e._s(e.label))]):e._e(),t("div",{staticClass:"toggle-button-group__buttons"},e._l(e.options,(function(n){return t("button",{key:n.value,class:{"is-active":e.isActive(n.value)},on:{click:function(t){return e.update(n.value)}}},[e._v(" "+e._s(n.label)+" ")])})),0)])},eV=[];let tV=class extends s.ZP{update(e){this.$emit("update",e)}isActive(e){return this.value===e}};(0,r.gn)([(0,l.fI)({required:!0,type:Array})],tV.prototype,"options",void 0),(0,r.gn)([(0,l.fI)({required:!0})],tV.prototype,"value",void 0),(0,r.gn)([(0,l.fI)({type:String,default:""})],tV.prototype,"label",void 0),tV=(0,r.gn)([l.wA],tV);const nV=tV,sV=nV;var iV=(0,N.Z)(sV,JR,eV,!1,null,null,null);const oV=iV.exports,aV=[{label:"Small",value:1.1},{label:"Normal",value:1.25},{label:"Large",value:1.4}];let rV=class extends s.ZP{constructor(){super(...arguments),this.ratios=aV}update(e){this.$emit("update",e)}get currentRatio(){return c.globalStore.globalSettings.settings.typography.ratio&&c.globalStore.globalSettings.settings.typography.ratio.breakpoint_base?c.globalStore.globalSettings.settings.typography.ratio.breakpoint_base:this.ratios[1].value}isActive(e){return this.currentRatio===e}};rV=(0,r.gn)([(0,l.wA)({components:{ButtonGroup:oV}})],rV);const lV=rV,cV=lV;var dV=(0,N.Z)(cV,YR,QR,!1,null,null,null);const uV=dV.exports;let pV=class extends s.ZP{get globalTypography(){return c.globalStore.globalSettings.settings.typography}get buttonPrimaryTypographySlug(){return c.globalStore.globalSettings.settings.buttons?.primary?.typography?.typography?.custom?.customTypography?.fontFamily.breakpoint_base||null}get buttonPrimaryTypographyFont(){return c.configStore.fonts.filter((e=>e.slug===(this.buttonPrimaryTypographySlug?this.buttonPrimaryTypographySlug:this.bodyFont?.slug)))[0]}get isPanelOpen(){return"typography"===c.singularityStore.brandPanelState?.openedPanel}get headingFont(){return this.globalTypography?c.configStore.fonts.filter((e=>e.slug===this.globalTypography.heading_font))[0]:null}get bodyFont(){return this.globalTypography?c.configStore.fonts.filter((e=>e.slug===this.globalTypography.body_font))[0]:null}shuffle(){KR(),(0,Tt.K)("FutureLayer Brand: Typography Shuffled")}updateFontRatio(e){XR(e)}updateFont(e,t){jR(e,t),(0,Tt.K)("FutureLayer Brand: Typography Updated",{type:e,slug:t})}};pV=(0,r.gn)([(0,l.wA)({components:{TogglePanel:CR,IconButtonShuffle:cB,BrandTypographyPicker:zR,BrandToggleFontSizes:uV}})],pV);const hV=pV,gV=hV;var mV=(0,N.Z)(gV,TR,DR,!1,null,null,null);const vV=mV.exports;var yV=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("TogglePanel",{attrs:{title:"Buttons & Forms",open:e.isPanelOpen},scopedSlots:e._u([{key:"actions",fn:function(){return[t("IconButtonShuffle",{on:{update:e.shuffle}})]},proxy:!0}])},[t("BrandToggleButtonFormRadius",{attrs:{value:e.radiuses},on:{update:e.updateRadiuses}}),t("BrandToggleButtonSize",{attrs:{value:e.buttonSizes},on:{update:e.updateButtonSizes}}),t("BrandSampleUI",{attrs:{cssStyles:e.cssStyles}})],1)},fV=[],_V=n(65556),bV=n(59705),SV=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("ButtonGroup",{attrs:{options:e.radiusesWithLabels,value:e.currentRatio,label:"Rounded"},on:{update:e.update}})},CV=[];let xV=class extends s.ZP{update(e){this.$emit("update",e)}get radiusesWithLabels(){return this.value.map((e=>({label:_V.mP[e],value:e})))}get currentRatio(){return c.singularityStore.brand.ui.inputRadius}};(0,r.gn)([(0,l.fI)()],xV.prototype,"value",void 0),xV=(0,r.gn)([(0,l.wA)({components:{ButtonGroup:oV}})],xV);const wV=xV,IV=wV;var PV=(0,N.Z)(IV,SV,CV,!1,null,null,null);const kV=PV.exports;var EV=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("ButtonGroup",{attrs:{options:e.sizesWithLabels,value:e.currentButtonSize,label:"Size"},on:{update:e.update}})},TV=[];let DV=class extends s.ZP{update(e){this.$emit("update",e)}get sizesWithLabels(){return this.value.map((e=>({label:_V.MQ[e],value:e})))}get currentButtonSize(){return c.singularityStore.brand.ui.buttonSize}};(0,r.gn)([(0,l.fI)()],DV.prototype,"value",void 0),DV=(0,r.gn)([(0,l.wA)({components:{ButtonGroup:oV}})],DV);const AV=DV,ZV=AV;var OV=(0,N.Z)(ZV,EV,TV,!1,null,null,null);const MV=OV.exports;var BV=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"brand-sample-ui"},[t("label",{staticClass:"toggle-button-group__label"},[e._v("Preview")]),t("div",{staticClass:"sample-ui",style:e.cssStyles.sampleUI},[t("div",{staticClass:"sample-ui-form-control"},[t("div",{staticClass:"sample-ui-form-control__label",style:e.cssStyles.label},[e._v(" Label ")]),t("div",{staticClass:"sample-ui-form-control__form-input",style:e.cssStyles.forms},[e._v(" Placeholder ")])]),t("div",{staticClass:"sample-ui__buttons"},[t("div",{staticClass:"sample-ui__button",style:e.cssStyles.primary},[e._v("Primary")]),t("div",{staticClass:"sample-ui__button",style:e.cssStyles.secondary},[e._v(" Secondary ")])])])])},LV=[];let NV=class extends s.ZP{};(0,r.gn)([(0,l.fI)({type:Object,required:!0})],NV.prototype,"cssStyles",void 0),NV=(0,r.gn)([l.wA],NV);const FV=NV,RV=FV;var VV=(0,N.Z)(RV,BV,LV,!1,null,null,null);const $V=VV.exports;let WV=class extends s.ZP{constructor(){super(...arguments),this.radiuses=["none","sm","md","full"],this.buttonSizes=["sm","default","md","lg"]}get brand(){return c.singularityStore.brand}get bodyFont(){const e=c.globalStore.globalSettings.settings.typography.body_font;return c.configStore.fonts.find((t=>t.slug===e))}get isPanelOpen(){return"ui"===c.singularityStore.brandPanelState?.openedPanel}updateRadiuses(e){c.singularityStore.setInputRadius({inputRadius:e}),(0,bV.fR)({radius:this.inputBorderRadius}),(0,bV.wT)({radius:this.inputBorderRadius}),(0,Tt.K)("FutureLayer Brand: Input Radius Updated",{inputRadius:this.inputBorderRadius,buttonSize:this.inputButtonSize})}updateButtonSizes(e){c.singularityStore.setButtonSize({buttonSize:e}),(0,bV.fR)({radius:this.inputBorderRadius}),(0,Tt.K)("FutureLayer Brand: Button Size Updated",{inputRadius:this.inputBorderRadius,buttonSize:this.inputButtonSize})}get inputBorderRadius(){return c.singularityStore.brand.ui.inputRadius}get inputButtonSize(){return c.singularityStore.brand.ui.buttonSize}get sampleUIStyles(){return this.brand.color.neutral?{backgroundColor:this.brand.color.primary?.scale[100].value?.toString()}:{}}get stylesPrimary(){return this.brand.color.primary?{backgroundColor:this.brand.color.primary.base.value?.toString(),color:this.brand.color.primary.text.value?.toString(),borderRadius:_V.CZ[this.inputBorderRadius]?.style,padding:bV.p1[this.inputButtonSize]?.string}:{}}get stylesSecondary(){return this.brand.color.neutral?(console.log(bV.p1[this.inputButtonSize]?.string),{backgroundColor:"transparent",color:this.brand.color.neutral.base.value?.toString(),borderColor:this.brand.color.neutral.scale[300].value?.toString(),borderRadius:_V.CZ[this.inputBorderRadius]?.style,padding:bV.p1[this.inputButtonSize]?.string}):{}}get stylesLabel(){return this.brand.color.neutral?{color:this.brand.color.neutral.base.value?.toString()}:{}}get stylesForms(){return this.brand.color.neutral?{borderColor:this.brand.color.neutral.scale[200].value?.toString(),borderRadius:_V.CZ[this.inputBorderRadius]?.style,color:this.brand.color.neutral.scale[300].value?.toString()}:{}}get cssStyles(){return{sampleUI:this.sampleUIStyles,label:this.stylesLabel,forms:this.stylesForms,primary:this.stylesPrimary,secondary:this.stylesSecondary}}randomUniqueRadius(){const e=this.inputBorderRadius;let t=e;while(t===e)t=this.radiuses[Math.floor(Math.random()*this.radiuses.length)];return t}randomUniqueButtonSize(){const e=this.inputButtonSize;let t=e;while(t===e)t=this.buttonSizes[Math.floor(Math.random()*this.buttonSizes.length)];return t}shuffle(){const e=this.randomUniqueRadius(),t=this.randomUniqueButtonSize();Ie.n.transaction((()=>{this.updateRadiuses(e),this.updateButtonSizes(t)}),"Shuffled buttons & forms"),(0,Tt.K)("FutureLayer Brand: Buttons & Forms Shuffled",{inputRadius:this.inputBorderRadius,buttonSize:this.inputButtonSize})}};WV=(0,r.gn)([(0,l.wA)({components:{IconButtonShuffle:cB,Icon:He.Z,TogglePanel:CR,BrandToggleButtonFormRadius:kV,BrandToggleButtonSize:MV,BrandSampleUI:$V}})],WV);const UV=WV,zV=UV;var HV=(0,N.Z)(zV,yV,fV,!1,null,null,null);const GV=HV.exports;var KV=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("TogglePanel",{attrs:{title:"Site Logo",open:e.isPanelOpen}},[t("div",{staticClass:"brand-logo-panel"},[e.currentLogo?t("div",{staticClass:"brand-logo-preview",style:e.previewStyles},[t("img",{staticClass:"brand-logo-image",attrs:{src:e.currentLogo.url,alt:e.currentLogo.alt||"Site Logo"}})]):t("SingularityEmptyState",{attrs:{icon:"ImageIcon",title:"No logo yet",description:"Add a logo to your website.",buttonText:"Upload"},on:{action:e.openMediaPicker}}),t("div",{staticClass:"brand-logo-actions"},[e.currentLogo?t("NiceButton",{attrs:{color:"gray"},on:{click:e.openMediaPicker}},[e._v(" "+e._s(e.currentLogo?"Change Logo":"Upload Logo")+" ")]):e._e(),e.currentLogo?t("NiceButton",{attrs:{color:"gray"},on:{click:e.removeLogo}},[e._v(" Remove ")]):e._e()],1)],1),e.loading?t("div",[e._v("updating...")]):e._e(),t("MediaUploadDialog",{attrs:{open:e.dialogOpen,multiple:!1,"selected-media":e.currentLogo,"accepted-file-types":["image"]},on:{input:e.onMediaSelected,close:e.closeDialog}})],1)},jV=[],qV=n(98349),XV=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-empty-state"},[e.icon?t("Icon",{staticClass:"singularity-empty-state__icon",attrs:{icon:e.icon,size:"32"}}):e._e(),e.title?t("h5",{staticClass:"singularity-empty-state__title"},[e._v(e._s(e.title))]):e._e(),e.description?t("p",{staticClass:"singularity-empty-state__description"},[e._v(" "+e._s(e.description)+" ")]):e._e(),e.buttonText?t("NiceButton",{attrs:{color:"gray",size:"small","left-icon":"PlusIcon"},on:{click:function(t){return e.$emit("action")}}},[e._v(" "+e._s(e.buttonText)+" ")]):e._e()],1)},YV=[];let QV=class extends s.ZP{};(0,r.gn)([(0,l.fI)()],QV.prototype,"icon",void 0),(0,r.gn)([(0,l.fI)()],QV.prototype,"title",void 0),(0,r.gn)([(0,l.fI)()],QV.prototype,"description",void 0),(0,r.gn)([(0,l.fI)()],QV.prototype,"buttonText",void 0),QV=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,NiceButton:Br.Z}})],QV);const JV=QV,e$=JV;var t$=(0,N.Z)(e$,XV,YV,!1,null,"31dfc89d",null);const n$=t$.exports;let s$=class extends s.ZP{constructor(){super(...arguments),this.dialogOpen=!1,this.loading=!1}get isPanelOpen(){return"logo"===c.singularityStore.brandPanelState?.openedPanel}get brand(){return c.singularityStore.brand}get currentLogo(){return this.brand.logo?.logo||null}openMediaPicker(){this.dialogOpen=!0}closeDialog(){this.dialogOpen=!1}onMediaSelected(e){e&&!Array.isArray(e)&&this.updateLogo(e),this.closeDialog()}async updateLogo(e){const t={...this.brand,logo:{logo:e}};(0,Tt.K)("FutureLayer Brand: Logo Updated"),await this.setBrandAndRerender(t)}async removeLogo(){const e={...this.brand,logo:{logo:null}};(0,Tt.K)("FutureLayer Brand: Logo Removed"),await this.setBrandAndRerender(e)}async setBrandAndRerender(e){this.loading=!0,c.singularityStore.setBrand(e),await(0,ER.N1)(),await(0,qV.x)(),this.loading=!1}get previewStyles(){return this.brand.color.neutral?{backgroundColor:this.brand.color.primary?.scale[100].value?.toString()}:{}}};s$=(0,r.gn)([(0,l.wA)({components:{TogglePanel:CR,Icon:He.Z,NiceButton:Br.Z,MediaUploadDialog:LL.Z,SingularityEmptyState:n$}})],s$);const i$=s$,o$=i$;var a$=(0,N.Z)(o$,KV,jV,!1,null,null,null);const r$=a$.exports;let l$=class extends s.ZP{constructor(){super(...arguments),this.loadingSettings=!1}async saveBrandSettings(){this.loadingSettings=!0,await(0,ER.N1)(),this.loadingSettings=!1}destroyed(){document.removeEventListener("breakdanceSaveButtonClicked",this.saveBrandSettings)}mounted(){document.addEventListener("breakdanceSaveButtonClicked",this.saveBrandSettings)}};l$=(0,r.gn)([(0,l.wA)({components:{SingularityPanelHeader:EL,BrandManageLogo:r$,BrandManageColors:kR,BrandManageTypography:vV,BrandManageButtons:GV}})],l$);const c$=l$,d$=c$;var u$=(0,N.Z)(d$,sR,iR,!1,null,null,null);const p$=u$.exports;var h$=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-panel vscroll-wrap vscroll-scroll"},[t("div",{staticClass:"singularity-panel__wrapper"},[t("SingularityPanelHeader",{attrs:{backState:"brand",parentTitle:"Brand",childTitle:"Edit Color"}}),t("div",{staticClass:"singularity-panel__content"},[t("div",{staticClass:"brand-color-editor toggle-panel"},[t("div",{staticClass:"brand-color-editor__container"},[t("TextInput",{attrs:{value:e.internalPalette?.label,placeholder:"Palette name"},on:{input:function(t){return e.updateLabel(t)}}}),e.internalPalette?t("div",{staticClass:"brand-color-editor__swatches"},e._l(e.internalPalette?.scale,(function(n,s){return t("div",{key:"color-"+s},[n&&n.value?t("div",{staticClass:"brand-color-editor__swatch",style:e.style(n.value?.toString()),on:{click:function(t){e.copyColor(n.value?.toString())}}},[t("span",{staticClass:"brand-color-editor__swatch-label"},[e._v(" "+e._s(n.value?.toString().substring(1).toUpperCase())+" "),e.internalPalette.base.value===n.value?t("span",{staticClass:"brand-color-editor__swatch-dot"}):e._e()]),t("CopyButton",{staticClass:"brand-color-editor__swatch-copy",attrs:{valueToCopy:n.value?.toString()}})],1):e._e()])})),0):e._e(),t("BrandColorPicker",{attrs:{color:e.internalPalette?.base.value},on:{update:e.updateColor}}),t("NiceButton",{attrs:{"left-icon":"ArrowsRotateSolidIcon",color:"gray"},on:{click:e.shufflePalette}},[e._v(" Shuffle ")])],1)])])],1)])},g$=[],m$=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"palette-picker",on:{"click:outside":function(t){e.isOverlayOpen=!1}}},[e.isOverlayOpen?t("div",{staticClass:"palette-picker__overlay"},[t("Chrome",{attrs:{value:e.color,disableAlpha:!0},on:{input:e.updateColor}})],1):e._e(),t("NiceButton",{attrs:{"left-icon":"ColorPickerIcon",color:"gray",expanded:!0},on:{click:function(t){e.isOverlayOpen=!e.isOverlayOpen}}},[e._v(e._s(e.isOverlayOpen?"Hide":"Show")+" Picker")])],1)},v$=[],y$=n(94023);let f$=class extends s.ZP{constructor(){super(...arguments),this.internalColor=this.color,this.isOverlayOpen=!1,this.palette=(0,dR.Wk)(this.internalColor)}get classes(){return{"is-light":(0,dR.eO)(this.internalColor)}}updateColor(e){this.internalColor=e.hex,this.palette=(0,dR.Wk)(e.hex),this.$emit("update",e.hex)}get inlineStyles(){return{backgroundColor:this.internalColor,color:(0,dR.eO)(this.internalColor)?String(this.palette.scale[900].value):String(this.palette.scale[100].value)}}copyColor(e){Gu()(e)}onColorChange(e){this.internalColor=e,this.palette=(0,dR.Wk)(e)}mounted(){this.palette=(0,dR.Wk)(this.internalColor)}};(0,r.gn)([(0,l.fI)()],f$.prototype,"color",void 0),(0,r.gn)([(0,l.RL)("color")],f$.prototype,"onColorChange",null),f$=(0,r.gn)([(0,cR.ZP)({components:{Chrome:y$.Chrome,NiceButton:Br.Z}})],f$);const _$=f$,b$=_$;var S$=(0,N.Z)(b$,m$,v$,!1,null,null,null);const C$=S$.exports;let x$=class extends s.ZP{constructor(){super(...arguments),this.internalPalette=this.currentPalette}get currentPalette(){return c.singularityStore.currentPalette?c.singularityStore.currentPalette.palette:null}get currentIndex(){return c.singularityStore.currentPalette?c.singularityStore.currentPalette.index:null}style(e){return this.currentPalette?(0,dR._9)(e,this.currentPalette):{}}updateColor(e){if(!this.internalPalette)return;const t=(0,dR.Wk)(e,this.internalPalette.primary,!1,this.currentIndex?this.currentIndex+1:1);this.internalPalette={...this.internalPalette,base:t.base,scale:t.scale,text:t.text,primary:this.internalPalette.primary},this.updatePalette()}copyColor(e){Gu()(e)}updateLabel(e){this.internalPalette&&(this.internalPalette.label=e)}shufflePalette(){if(!this.internalPalette)return;const e=(0,dR.Bc)(this.internalPalette.primary,this.currentIndex?this.currentIndex+1:1);this.internalPalette={...e,primary:this.internalPalette.primary},this.updatePalette()}updatePalette(){Ie.n.transaction((()=>{this.internalPalette&&(this.internalPalette.primary?c.singularityStore.setPalette({type:"primary",palette:this.internalPalette}):c.singularityStore.updateSecondaryPalette({index:this.currentIndex??0,palette:this.internalPalette}),(0,dR.hR)())}),"Updated color")}onPaletteChange(e){this.internalPalette={...e}}};(0,r.gn)([(0,l.RL)("currentPalette")],x$.prototype,"onPaletteChange",null),x$=(0,r.gn)([(0,l.wA)({components:{SingularityPanelHeader:EL,IconButton:Xa.Z,BrandColorPicker:C$,TextInput:na.Z,Icon:He.Z,NiceButton:Br.Z,CopyButton:dv.Z}})],x$);const w$=x$,I$=w$;var P$=(0,N.Z)(I$,h$,g$,!1,null,null,null);const k$=P$.exports;var E$=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-panel vscroll-wrap vscroll-scroll"},[t("div",{staticClass:"singularity-panel__wrapper"},[t("SingularityPanelHeader",{attrs:{backState:"brand",parentTitle:"Brand",childTitle:"Typography"}}),t("div",{staticClass:"singularity-panel__content"},[t("div",{staticClass:"toggle-panel"},e._l(Object.keys(e.filteredFontsByCategory),(function(n){return t("BrandTypographyCategory",{key:n,attrs:{label:n,fonts:e.filteredFontsByCategory[n]},on:{update:e.update,show:e.showCategory}})})),1)])],1)])},T$=[],D$=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"typography-category"},[t("div",{staticClass:"typography-category__container"},[e.isOpen?e._e():t("BrandTypographyFont",{attrs:{value:e.representativeFont,description:e.label,label:`${e.filteredFonts.length} fonts`},on:{update:e.open}}),e.isOpen?t("div",{staticClass:"typography-category__picker"},[t("div",{staticClass:"typography-category__header"},[t("span",{staticClass:"typography-category__title"},[e._v(e._s(e.label)+" fonts")]),t("IconButton",{attrs:{small:"true",icon:"CloseIcon"},on:{click:e.close}})],1),t("div",{staticClass:"typography-category__search"},[t("TextInput",{attrs:{placeholder:e.searchInputPlaceholder,value:e.filter},on:{input:e.updateFilter}})],1),t("div",{staticClass:"typography-category__fonts"},e._l(e.filteredFonts,(function(n,s){return t("BrandTypographyFont",{key:"font-"+s,attrs:{value:n},on:{update:e.update}})})),1)]):e._e()],1)])},A$=[];const Z$={"sans-serif":"Inter",serif:"Playfair Display",display:"Alfa Slab One",handwriting:"Caveat Brush",monospace:"Roboto Mono"};let O$=class extends s.ZP{constructor(){super(...arguments),this.isOpen=!1,this.filter=""}updateFilter(e){this.filter=e}open(){this.isOpen=!0,this.$emit("show",this.label)}close(){this.isOpen=!1,this.$emit("show","")}get filteredFonts(){return this.fonts.filter((e=>e.label.toLowerCase().includes(this.filter.toLowerCase())))}get searchInputPlaceholder(){return`Search ${this.label} fonts`}update(e){this.$emit("update",e)}getRepresentativeFont(e,t){const n=e.find((e=>e.label===Z$[t]));return n||null}get representativeFont(){const e=this.label;return this.getRepresentativeFont(this.fonts,e)}};(0,r.gn)([(0,l.fI)()],O$.prototype,"label",void 0),(0,r.gn)([(0,l.fI)()],O$.prototype,"fonts",void 0),O$=(0,r.gn)([(0,cR.ZP)({components:{BrandTypographyFont:RR,IconButton:Xa.Z,TextInput:na.Z}})],O$);const M$=O$,B$=M$;var L$=(0,N.Z)(B$,D$,A$,!1,null,null,null);const N$=L$.exports;let F$=class extends s.ZP{constructor(){super(...arguments),this.currentCategory=""}get currentFont(){return c.singularityStore.currentFont}get fontsByCategory(){return c.configStore.fonts.reduce(((e,t)=>{const n=t.category||"Other";return e[n]||(e[n]=[]),e[n].push(t),e}),{})}get filteredFontsByCategory(){return this.currentCategory?{[this.currentCategory]:this.fontsByCategory[this.currentCategory]||[]}:this.fontsByCategory}showCategory(e){this.currentCategory=e}update(e){this.currentFont&&(c.singularityStore.setSingularityLeftPanel("brand"),jR(this.currentFont,e.slug))}};F$=(0,r.gn)([(0,l.wA)({components:{SingularityPanelHeader:EL,BrandTypographyPicker:zR,BrandTypographyCategory:N$}})],F$);const R$=F$,V$=R$;var $$=(0,N.Z)(V$,E$,T$,!1,null,null,null);const W$=$$.exports;var U$=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-panel vscroll-wrap vscroll-scroll"},[t("div",{staticClass:"singularity-panel__wrapper"},[t("SingularityPanelHeader",{attrs:{backState:"page_structure",parentTitle:"Add Section",childTitle:e.childTitle}}),t("div",{staticClass:"singularity-panel__content"},[e.addNewSectionPanelState?"breakdance_ai"===e.addNewSectionPanelState.mode?t("div",{staticClass:"form-content"},[t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"section-description"}},[e._v("Section Description")]),t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.sectionDescription,expression:"sectionDescription"}],staticClass:"form-textarea",attrs:{id:"section-description",placeholder:"Describe what this section should contain (e.g., 'Hero section for a tech company with a headline, subheadline, and call-to-action button')",rows:"4"},domProps:{value:e.sectionDescription},on:{input:function(t){t.target.composing||(e.sectionDescription=t.target.value)}}})]),t("div",{staticClass:"form-actions"},[t("NiceButton",{attrs:{color:"gray",size:"large"},on:{click:e.goBack}},[e._v(" Back ")]),t("NiceButton",{attrs:{"left-icon":"SparklesSolidIcon",color:"yellow",size:"large",expanded:"true",disabled:!e.sectionDescription.trim()||e.isGenerating},on:{click:e.generateSection}},[e._v(" "+e._s(e.isGenerating?"Generating...":"Generate Section")+" ")])],1)]):e._e():t("div",{staticClass:"singularity-new-section-panel__options"},[t("SingularityOption",{attrs:{icon:"Grid2PlusSolidIcon",title:"Select from Library"},on:{click:e.openLibraryModal}}),t("SingularityOption",{attrs:{icon:"SparklesSolidIcon",title:"Build with AI"},on:{click:e.setBreakdanceAIMode}})],1)])],1)])},z$=[],H$=n(34755),G$=n(44652),K$=n(56888);async function j$(e,t){const n=await q$(e);if(!n)return console.error("Failed to determine section type"),null;const s={type:n.type,sectionFriendlyName:n.friendlyName,description:e},i=(0,Ja.pJ)(s);if(!i)return console.error("Failed to get section template for type:",n.type),null;if(!t)return i;const o=(0,ge.getBlankTree)(),a=(0,ge.copyNode)(o,i);(0,ge.moveNode)(o,a.id,o.root.id,0);const r=await(0,er.j)((async e=>await(0,G$.M)([{id:String(a.id),messages:(0,H$.kk)(a)}],e)),{jobType:"section_rewrite",documentId:0,elementId:a.id,description:`Generating section: ${e}`,priority:"critical",snapshotLabel:"Create Section With AI"}),l=(0,NF.hF)(o,r),c=await(0,er.j)((async e=>await(0,NF.P2)(l,e)),{jobType:"section_image_replacement",documentId:0,elementId:a.id,description:`Populating images for section: ${e}`,priority:"high",snapshotLabel:"Populate Images With AI"}),d=(0,ge.findNode)(c,a.id);return d||null}async function q$(e){const t=c.globalStore.aiSettings.prompt.businessName,n=c.globalStore.aiSettings.prompt.businessDescription,s=(0,Ja.FX)(),i=s.map((e=>`'${e}'`)).join(", "),o=[{role:"system",content:`You are an assistant that determines the appropriate section type for a website based on a description.\n\nWebsite name: ${t}\nWebsite description: ${n}\n\nValid section types are: ${i}\n\nYou must respond with a JSON object containing a "type" field with one of the valid section types, and a "friendlyName" field which is a short friendly name (1 to 3 words) that describes the content of the section.`},{role:"user",content:`Based on the following description, determine which section type to use:\n\n"${e}"\n\nRespond with JSON format: {"type": "chosen_section_type","friendlyName": "Friendly Name For The Section"}`}],a={id:"section-type-determination",messages:o};try{const t=await(0,er.j)((async e=>await(0,G$.M)([a],e)),{jobType:"section_rewrite",documentId:0,elementId:"section-type-determination",description:`Determining section type for: ${e}`,priority:"critical",dontCreateSnapshot:!0});if(t.length>0&&t[0].content){const e=(0,K$.B)(t[0].content);if(!e)return;return{type:e.type,friendlyName:e.friendlyName}}}catch(r){console.error("Failed to determine section type:",r)}}let X$=class extends s.ZP{constructor(){super(...arguments),this.option=null,this.sectionDescription="",this.isGenerating=!1}openLibraryModal(){c.singularityStore.setSectionAddOrSwapPanelState({mode:"add_after",sectionId:this.currentlyActiveSectionId}),c.singularityStore.setSectionLibraryModalState(!0),(0,Tt.K)("FutureLayer New Section: Library Selected")}get currentlyActiveSectionId(){return c.uiStore.activeElement?c.uiStore.activeElement.data.type!==Ge.SECTION_SLUG?null:c.uiStore.activeElement.id:null}get childTitle(){return null===this.addNewSectionPanelState?"Add":"breakdance_ai"===this.addNewSectionPanelState.mode?"Build with AI":"Add"}setBreakdanceAIMode(){c.singularityStore.setAddNewSectionPanelState({mode:"breakdance_ai"}),(0,Tt.K)("FutureLayer New Section: AI Selected")}goBack(){c.singularityStore.setAddNewSectionPanelState(null)}get addNewSectionPanelState(){return c.singularityStore.addNewSectionPanelState}async generateSection(){if(!this.sectionDescription.trim()||this.isGenerating)return;this.isGenerating=!0;const e=await j$(this.sectionDescription,!1);if((0,Tt.K)("FutureLayer New Section: AI Generation Started",{description:this.sectionDescription}),e){const t=cr(e,this.currentlyActiveSectionId??-1);t&&c.uiStore.activateElement(t),this.sectionDescription="",c.singularityStore.setAddNewSectionPanelState(null),c.singularityStore.setSingularityLeftPanel("page_structure")}else console.error("Failed to generate section");this.isGenerating=!1}};X$=(0,r.gn)([(0,l.wA)({components:{SingularityPanelHeader:EL,SingularityOption:Or,NiceButton:Br.Z}})],X$);const Y$=X$,Q$=Y$;var J$=(0,N.Z)(Q$,U$,z$,!1,null,null,null);const eW=J$.exports;var tW=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-panel vscroll-wrap vscroll-scroll"},[t("div",{staticClass:"singularity-panel__wrapper"},[t("SingularityPanelHeader",{attrs:{backState:"page_structure",parentTitle:"Sections",childTitle:e.modalTitle}}),t("div",{staticClass:"singularity-panel__content"},[e.option?"content"===e.option?t("div",{staticClass:"form-content"},[t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"page-description"}},[e._v("Section Description")]),t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.internalSectionDescription,expression:"internalSectionDescription"}],staticClass:"form-textarea",attrs:{id:"page-description",placeholder:"Describe what you want the content of this section to be about (e.g., 'A team of professionals collaborating in a modern office environment')",rows:"4"},domProps:{value:e.internalSectionDescription},on:{input:[function(t){t.target.composing||(e.internalSectionDescription=t.target.value)},e.updateDescription]}})]),t("div",{staticClass:"form-actions"},[t("NiceButton",{attrs:{color:"gray",size:"large"},on:{click:e.closePanel}},[e._v(" Back ")]),t("NiceButton",{class:{"is-spinning":e.isSectionCurrentlyRewritingWithAi},attrs:{disabled:e.isSectionCurrentlyRewritingWithAi,"left-icon":e.isSectionCurrentlyRewritingWithAi?"CircleNotchSolidIcon":"SparklesIconSolid",color:"yellow",size:"large",expanded:"true"},on:{click:e.rewrite}},[e._v(" "+e._s(e.isSectionCurrentlyRewritingWithAi?"Working...":"Rewrite With AI")+" ")])],1)]):"images"===e.option?t("div",{staticClass:"form-content"},[t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"page-description"}},[e._v("Images Description")]),t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.internalImagesDescription,expression:"internalImagesDescription"}],staticClass:"form-textarea",attrs:{id:"page-description",placeholder:"Describe what kind of images should be in this section (e.g., 'A modern office space with people collaborating')",rows:"4"},domProps:{value:e.internalImagesDescription},on:{input:function(t){t.target.composing||(e.internalImagesDescription=t.target.value)}}})]),t("div",{staticClass:"form-actions"},[t("NiceButton",{attrs:{color:"gray",size:"large"},on:{click:e.closePanel}},[e._v(" Back ")]),t("NiceButton",{class:{"is-spinning":e.isSectionCurrentlyReplacingImagesWithAi},attrs:{"left-icon":e.isSectionCurrentlyReplacingImagesWithAi?"CircleNotchSolidIcon":"SparklesIconSolid",color:"yellow",size:"large",expanded:"true"},on:{click:e.repopulateImages}},[e._v(e._s(e.isSectionCurrentlyReplacingImagesWithAi?"Updating...":"Replace All Images")+" ")])],1)]):e._e():t("div",{staticClass:"singularity-new-section-panel__options"},[t("SingularityOption",{attrs:{icon:"SparklesIcon",title:"Rewrite Content"},on:{click:function(t){return e.setOption("content")}}}),t("SingularityOption",{attrs:{icon:"ImageIcon",title:"Replace Images"},on:{click:function(t){return e.setOption("images")}}})],1),e.isSectionAiWorkDone?t("FeedbackBoxAI",{attrs:{"event-properties":e.eventPropertiesForTracking}}):e._e()],1)],1)])},nW=[];let sW=class extends s.ZP{constructor(){super(...arguments),this.option=null,this.internalSectionDescription="",this.internalImagesDescription=""}closeDialog(){this.$emit("close")}closePanel(){c.singularityStore.setSectionRewritePanelState(null),c.singularityStore.setSingularityLeftPanel("page_structure")}setOption(e){this.option=e,(0,Tt.K)("FutureLayer Section Rewrite Option Selected",{option:e})}get promptInfo(){if(!this.section)return null;const e=(0,ge.findNode)(c.documentStore.document.tree,this.section.nodeId);return e?(0,sr.E)(e):null}get eventPropertiesForTracking(){return{location:"section_rewrite_panel",section_description:this.section?.description||null,prompt_info:this.promptInfo,rewrite_option:this.option||null,prompt_input:"content"===this.option?this.internalSectionDescription:this.internalImagesDescription}}get modalTitle(){return"content"===this.option?"Edit with AI":"images"===this.option?"Images":"Select"}get section(){return c.singularityStore.sectionRewritePanelState?c.singularityStore.sectionRewritePanelState.section:null}rewrite(){this.section&&(er.P.addJob((async e=>{this.section&&await(0,tr.H2)(this.section.nodeId,e)}),{jobType:"section_rewrite",documentId:c.documentStore.document.documentMeta.id,elementId:this.section.nodeId,description:`Section rewrite from rewrite panel for section ${this.section.nodeId}`,priority:"critical",snapshotLabel:"Rewrite section with AI"}),this.closeDialog(),(0,Tt.K)("FutureLayer Section Rewrite Started"))}repopulateImages(){if(!this.section)return;const e=(0,ge.findNode)(c.documentStore.document.tree,this.section.nodeId);e&&(er.P.addJob((async t=>{await(0,nr.q)(e,t)}),{jobType:"section_image_replacement",documentId:c.documentStore.document.documentMeta.id,elementId:this.section.nodeId,description:`Image replacement from rewrite panel for section ${this.section.nodeId}`,priority:"critical",snapshotLabel:"Rewrite section with AI"}),this.closeDialog(),(0,Tt.K)("FutureLayer Section Image Replacement Started"))}get isSectionCurrentlyRewritingWithAi(){return!!this.section&&c.singularityStore.aiJobs.filter((e=>"elementId"in e.context&&e.context.elementId===this.section?.nodeId&&("running"===e.status||"pending"===e.status)&&"section_rewrite"===e.context.jobType)).length>0}get isSectionCurrentlyReplacingImagesWithAi(){return!!this.section&&c.singularityStore.aiJobs.filter((e=>"elementId"in e.context&&e.context.elementId===this.section?.nodeId&&("running"===e.status||"pending"===e.status)&&"section_image_replacement"===e.context.jobType)).length>0}get isSectionAiWorkDone(){return!!this.section&&c.singularityStore.aiJobs.filter((e=>"elementId"in e.context&&e.context.elementId===this.section?.nodeId&&("completed"===e.status||"failed"===e.status)&&("section_rewrite"===e.context.jobType||"section_image_replacement"===e.context.jobType))).length>0}updateDescription(){this.section&&fM(this.section.nodeId,this.internalSectionDescription)}onSectionChange(e){this.internalSectionDescription=e?.description||"",this.internalImagesDescription="",this.option=e?"content":null}};(0,r.gn)([(0,l.RL)("section",{immediate:!0})],sW.prototype,"onSectionChange",null),sW=(0,r.gn)([(0,l.wA)({components:{SingularityPanelHeader:EL,SingularityOption:Or,NiceButton:Br.Z,TextInput:na.Z,IconButton:Xa.Z,Icon:He.Z,FeedbackBoxAI:GF}})],sW);const iW=sW,oW=iW;var aW=(0,N.Z)(oW,tW,nW,!1,null,null,null);const rW=aW.exports;var lW=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"feedback-box",class:{"is-open":e.showFeedback,"feedback-sent":e.feedbackSent}},[e.showFeedback?e._e():t("div",{staticClass:"feedback-button",attrs:{role:"button"},on:{click:e.toggle}},[t("span",[e._v(e._s(e.feedbackSent?"Thank you for your feedback!":"Leave Feedback"))]),t("Icon",{attrs:{icon:e.feedbackSent?"CheckIcon":"CommentSolidIcon",size:"16"}})],1),e.showFeedback?t("div",{staticClass:"flex flex-col gap-2"},[t("Icon",{staticClass:"close-icon",attrs:{icon:"CloseIcon",size:"18",role:"button"},on:{click:e.toggle}}),t("div",{staticClass:"form-group"},[t("label",[e._v("How would you rate your experience?")]),t("div",e._l([1,2,3,4,5],(function(n){return t("button",{key:n},[t("Icon",{staticClass:"feedback-star",class:{"is-selected":n<=(e.rating??0)},attrs:{icon:n<=(e.rating??0)?"StarSolidIcon":"StarIcon",size:"24"},on:{click:function(t){e.rating=n}}})],1)})),0),t("label",{attrs:{for:"feedback"}},[e._v("How can we improve this experience?")]),t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.feedback,expression:"feedback"}],staticClass:"form-textarea",attrs:{id:"feedback",placeholder:"We value your feedback and would love to hear your thoughts.",rows:"4"},domProps:{value:e.feedback},on:{input:function(t){t.target.composing||(e.feedback=t.target.value)}}}),t("NiceButton",{attrs:{color:"gray",disabled:!e.isValidFeedback},on:{click:e.sendFeedback}},[e._v("Send Feedback")])],1)],1):e._e()])},cW=[];let dW=class extends s.ZP{constructor(){super(...arguments),this.showFeedback=!1,this.feedbackTextArea=null,this.feedback="",this.rating=null,this.feedbackSent=!1}get isValidFeedback(){return this.feedback.length>0||this.rating&&this.rating>0}toggle(){this.showFeedback=!this.showFeedback,this.$nextTick((()=>{const e=this.$refs.feedbackTextarea;e&&e.focus()}))}sendFeedback(){this.feedback.length>0&&((0,Tt.K)("FutureLayer Feedback",{location:"sidebar",feedback:this.feedback,rating:this.rating}),this.feedback="",this.feedbackSent=!0,this.rating=null,this.showFeedback=!1,setTimeout((()=>{this.feedbackSent=!1}),3e3))}};dW=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z,NiceButton:Br.Z}})],dW);const uW=dW,pW=uW;var hW=(0,N.Z)(pW,lW,cW,!1,null,null,null);const gW=hW.exports;let mW=class extends s.ZP{get isLeftPanelHighlighted(){return c.singularityStore.singularityUiState.isSingularityLeftPanelHighlighted}get singularityLeftPanelState(){return c.singularityStore.singularityUiState.singularityLeftPanel}get imageEditorKey(){return c.singularityStore.imageEditorPanelState?.elementId||"no-image"}mounted(){(0,ER.MD)()}};mW=(0,r.gn)([(0,l.wA)({components:{SectionWriter:hM,PageStructureNew:JB,ImageEditor:nN,BackgroundImageEditor:yN,IconEditor:PN,TextEditor:ON,LinkEditor:$N,ContentPropertiesEditor:jN,HeaderAndFooterEditor:xF,WPPageManagerNew:nR,BrandPanel:p$,BrandPanelColorEdit:k$,BrandPanelTypographyEdit:W$,NewSectionPanel:eW,RewriteSectionPanel:rW,FeedbackBox:gW}})],mW);const vW=mW,yW=vW;var fW=(0,N.Z)(yW,oM,aM,!1,null,null,null);const _W=fW.exports;var bW=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity",class:e.classes},[e.isStep1?e._e():t("TopNavBuilder"),e.isStep1?[t("div",{staticClass:"singularity-main-area"},[t("Step1")],1)]:[t("div",{staticClass:"singularity-main-area vscroll-scroll"},[t("SingularityLeftPanelNew",{directives:[{name:"show",rawName:"v-show",value:e.singularityUiState.singularityLeftPanel,expression:"singularityUiState.singularityLeftPanel"}],key:"left_panel"}),t("SingularityCanvas",{key:"canvas",on:{loaded:function(t){return e.$emit("loaded")}}}),t("SingularityRightPanel",{directives:[{name:"show",rawName:"v-show",value:e.singularityUiState.singularityRightPanel,expression:"singularityUiState.singularityRightPanel"}],key:"right_panel"}),e.isFullWidthState?[t("SingularityFullWidthPanel")]:e._e()],2)],e.isSectionLibraryModalOpen?t("SingularitySectionLibraryModal",{on:{close:e.closeSectionLibraryModal}}):e._e(),t("OutOfCreditsModal"),t("PlanExpiredModal")],2)},SW=[],CW=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-prompt",class:{"singularity-prompt--loading":!e.waitingForThingsToBeReadyDone||e.creating||e.shouldAutostart}},[t("div",{staticClass:"singularity-prompt__wrapper"},[t("div",{staticClass:"singularity-prompt__title-wrapper"},[t("h1",{staticClass:"singularity-prompt__title"},[e.creating||e.shouldAutostart?t("Icon",{staticClass:"animate-spin",attrs:{icon:"CircleNotchSolidIcon",size:"38"}}):e._e(),e._v(" "+e._s(e.creating||e.shouldAutostart?"Building your new website...":"Let's get started")+" ")],1),t("p",{staticClass:"singularity-prompt__tagline"},[e._v(" "+e._s(e.creating||e.shouldAutostart?"This may take a minute, please be patient.":"Create a website in minutes with AI.")+" ")])]),e.creating||e.shouldAutostart?e._e():t("div",{staticClass:"singularity-prompt__prompt-wrapper"},[t("TextInput",{staticClass:"singularity-prompt__prompt-input",attrs:{value:e.businessName,label:"Website Name",multiline:!0,id:"businessName",placeholder:"Enter your website name"},on:{input:e.updateBusinessName}}),t("div",{staticClass:"singularity-prompt__description-wrapper"},[t("TextInput",{staticClass:"singularity-prompt__prompt-input",attrs:{value:e.businessDescription,multiline:!0,id:"Description",label:"Description",placeholder:"Create a website for..."},on:{input:e.updateBusinessDescription}}),t("div",{staticClass:"singularity-prompt__prompt-buttons"},[t("NiceButton",{class:{"is-spinning":e.creating},attrs:{loading:e.creating,disabled:e.creating,color:"yellow",size:"large","left-icon":"SparklesSolidIcon"},on:{click:e.generate}},[e._v("Start Building")])],1)],1)],1)])])},xW=[],wW=n(1638),IW=n(81626),PW=n(76007);async function kW(e=""){await(0,PW.c)();const t=c.globalStore.aiSettings.prompt.businessName??"",n=c.globalStore.aiSettings.prompt.businessDescription??"",s=(0,Ja.FX)().map((e=>`'${e}'`)).join(", ");var i="";i=e?`Generate a sitemap for a website.\n\n ${e?`\n ${e}\n `:""}\n\n Valid values for 'type' are ${s}. It's important you don't use any other values for 'type'.`:`Generate a sitemap for a website.\n\n The website should have an appropriate number of pages for the content. If the prompt includes information about the services offered, consider individual pages for each service.\n\n Each page should have an appropriate number of sections for its type. Maybe 8 for the homepage, and just one or two for the contact page.\n \n Website name: ${t}\n Website description: ${n}\n\n Valid values for 'type' are ${s}. It's important you don't use any other values for 'type'.`;const o=await(0,er.j)((async e=>await(0,IW.C)(i,wW.Pu,e,!0)),{jobType:"sitemap_generation",businessName:t,businessDescription:n,description:`Generating sitemap for ${t}`,priority:"critical"});return o}async function EW(e,t){const n=(0,id.pipe)(await(0,Hl.Dl)(e),(0,od.fold)((()=>{}),(e=>"document"in e&&e.document.documentMeta.singularityMeta&&e.document.documentMeta.singularityMeta.singularityInitialSections?e.document.documentMeta.singularityMeta.singularityInitialSections:void 0)));if(!n)return void console.error("No initial sections found for page ID:",e);await(0,Hl.ZR)(),await(0,PW.c)();const s=(0,ge.getBlankTree)();for(let i=0;i<n.length;i++){const e=n[i],t=(0,Ja.pJ)(e);if(!t)continue;const o=(0,ge.copyNode)(s,t);(0,ge.moveNode)(s,o.id,s.root.id,i)}console.log("page populated with sections",s);for(const i of s.root.children)console.log("rewriteContentInPhantomSection",i.id),await TW(s,i.id,t),console.log("populateImagesInPhantomSection",i.id),await DW(s,i.id,t);console.log("content rewritten with AI"),console.log("images updated AI"),await FW(s,e,void 0),await RW(e,{singularityInitialSections:n,initialSectionsAlreadyPopulated:!0}),console.log("tree saved and singularity meta updated for page",e)}async function TW(e,t,n){const s=(0,ge.findNode)(e,t);if(console.log("found node",s),!s)return;const i=(0,sr.E)(s),o=(0,ir.LX)(s),a=(0,FD.ee)(o),r=(0,FD.r1)(a,i,c.globalStore.aiSettings.prompt);if(console.log({fields:o,fieldsToFill:a,prompt:r}),o.length)try{const t=await(0,tr.iW)(r,o,n);console.log("parsedCompletion",t),t.elements.forEach((t=>{const n=(0,ge.findNode)(e,t.nodeId);n&&Sd()(n.data.properties,t.controlPath,t.value)})),i.singularity.shouldGenerateOnInitialLoad=!1,i.singularity.unsplashKeywords=t.unsplash_keywords,Sd()(s.data.properties,"meta.promptInfo",i)}catch(l){(0,ir.Qm)(l)}}async function DW(e,t,n){alert("dont use this, use replaceImagesInSectionWithAiMutating instead");const s=(0,ge.findNode)(e,t);if(!s)return;const i=(0,sr.E)(s),o=i.singularity.unsplashKeywords.length?i.singularity.unsplashKeywords:["generic"],a=(0,ir.ho)(s);if(!(a.length>0))return;const r=await(0,oL.Ok)({query:o.join(", "),page:1,per_page:a.length},n);console.log("unsplashResults",r),console.log("imageFieldsToComplete",a);for(let l=0;l<a.length;l++){const t=a[l],n=r[l],s=(0,ge.findNode)(e,t.nodeId);console.log("nodeToUpdate",s),s&&(Sd()(s.data.properties,t.controlPath,{id:-1,type:"external_image",url:n.urls.regular,alt:n.alt_description||"",caption:n.description||""}),console.log(`Updated node ${s.id} with image from Unsplash: ${n.urls.regular} at control path ${t.controlPath}`))}}async function AW(e,t){return(0,er.j)((async n=>{const s=e.map((e=>({title:e.title,id:e.id}))),i=await(0,IW.C)(`what are the most important pages for the header menu for our website in this list of pages? return them in the order they should appear in a header menu. return up to ${t} pages\n\n ${(0,Wg.g)(s)}\n\n `,iu.dt({pageIds:iu.IX(iu.pk)}),n,!0);return i?i.pageIds:(console.error("No important pages found"),[])}),{jobType:"sitemap_generation",businessName:"Website",businessDescription:"Menu generation for website navigation",description:`Analyzing ${e.length} pages to determine the most important ${t} for the header menu`,priority:"critical"})}async function ZW(e){const t=await AW(e,5);return(0,id.pipe)(await(0,ad.D)({action:"breakdance_singularity_sync_pages_to_default_wp_menu",decoder:iu.dt({success:iu.Z_}),dataToPost:{pageIds:(0,Wg.g)(t)}}),(0,od.fold)((()=>null),(e=>{console.log("Menu updated successfully:",e.success)})))}async function OW(e){console.log("Rebuilding from URL:",e);const t=(0,id.pipe)(await(0,ad.D)({action:"breakdance_singularity_website_intake_service",friendlyName:"Website Service Thing",dataToPost:{url:e},decoder:iu.IX(MW),resultKey:"data"}),(0,od.fold)((()=>{}),(e=>e)));await BW("we are rebuilding an existing website, and here is the info on the existing website. we want the new website to be as similar as possible to the existing one. here is data on the existing website: "+(0,Wg.g)(t))}const MW=iu.dt({url:iu.Z_,originalTitle:iu.Z_,analysis:iu.G0([iu.lB,iu.dt({title:iu.Z_,sections:iu.IX(iu.dt({title:iu.Z_,content:iu.Z_}))})]),images:iu.dt({images:iu.IX(iu.dt({url:iu.Z_,description:iu.Z_}))}),error:iu.G0([iu.S1,iu.Z_])});async function BW(e=""){await(0,EF.np)();const t=await kW(e);if(!t)return;const n=[];for(const i of t){const e=await(0,EF.Le)(i.title,{singularityInitialSections:i.sections},"page");e&&(n.push(e),i.title.toLowerCase().includes("home")||er.P.addJob((async t=>{await EW(e.id,t)}),{jobType:"background_page_generation",pageId:e.id,pageTitle:i.title,description:`Behind the scenes page generation for "${i.title}"`,priority:"low"}))}await ZW(n),await LW();const s=c.singularityStore.pagesInWP.find((e=>e.title.toLowerCase().includes("home")));s?(c.uiStore.setUnsavedChangesPresent(!1),await(0,Hl.rI)(s.id)):(c.uiStore.setUnsavedChangesPresent(!1),await(0,Hl.rI)(c.singularityStore.pagesInWP[0].id)),c.singularityStore.setSingularityUiState({...c.singularityStore.singularityUiState,singularityLeftPanel:"page_structure"})}async function LW(){await NW("Header",zd.kl,"head"),await NW("Footer",zd.WZ,"foot")}async function NW(e,t,n){const s=await(0,EF.Le)(e,{},t);if(!s)return;const i=(0,Ja.FX)().find((e=>e.toLowerCase().includes(n)));if(!i)return;const o=(0,Ja.pJ)({type:i,sectionFriendlyName:e,description:""});if(!o)return;await(0,Hl.ZR)();const a=(0,ge.getBlankTree)(),r=(0,ge.copyNode)(a,o);(0,ge.moveNode)(a,r.id,a.root.id,0);const l={type:"everywhere",priority:1,ruleGroups:[],disabled:!1};FW(a,s.id,l)}async function FW(e,t,n){const s={id:t,tree:(0,Uh.J)((0,ge.exportTree)(e)),templateSettings:n?(0,Uh.J)(n):void 0},i=(0,id.pipe)(await(0,ad.D)({friendlyName:"Saving to WordPress",action:"breakdance_save",dataToPost:s,decoder:iu._4}),(0,od.fold)((e=>((0,th.UE)(e),(0,od.left)(e))),(e=>(0,od.right)(e))));return i}async function RW(e,t){const n={id:e,singularityMeta:t?(0,Uh.J)(t):void 0},s=(0,id.pipe)(await(0,ad.D)({friendlyName:"Update Singularity Meta",action:"breakdance_singularity_update_singularity_meta",dataToPost:n,decoder:iu._4}),(0,od.fold)((e=>((0,th.UE)(e),(0,od.left)(e))),(e=>(0,od.right)(e))));return s}var VW=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("header",{staticClass:"singularity-top-nav"},[t("TopNavNotificationBar"),t("div",{staticClass:"singularity-top-nav-main"},[t("div",{staticClass:"singularity-top-nav__logo"},[t("FutureLayerIconAndWarningWrapper",{attrs:{forceHideExpirationWarning:!1}})],1),t("nav",{staticClass:"singularity-top-nav__menu"},[t("ul",[e._t("menu")],2)]),t("div",{staticClass:"singularity-top-nav__actions"},[e._t("actions")],2)])],1)},$W=[],WW=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-top-nav-top",class:{success:e.showClaimSuccess}},[e.showClaimSuccess||e.claimInProgress?t("TopNavNotificationBarSuccess",{attrs:{loading:e.claimInProgress},on:{dismiss:e.handleDismiss}}):e.isOnInstaWPAndUnclaimed?t("TopNavNotificationBarDeletionWarning"):e.isSelfHostedAndUnclaimed?t("TopNavNotificationBarConnectSite"):e._e()],1)},UW=[],zW=n(88396);function HW(){return c.singularityStore.siteStatus.claimUrl}function GW(){const e=new URLSearchParams(window.location.search);return e.get("claim_key")}async function KW(e){console.log("Processing claim key:",e);const t=await(0,ad.D)({action:"futurelayer_process_claim_key_ajax",dataToPost:{claim_key:e},decoder:iu.dt({success:iu.O7,message:iu.Z_,site_state:zW.pl}),suppressErrorLogging:!1,friendlyName:"Process Claim Key"});return"Right"===t._tag&&t.right.success?(console.log("Claim successful:",t.right.message),c.singularityStore.setSiteStatus({...c.singularityStore.siteStatus,isClaimed:!0,siteState:t.right.site_state}),!0):(console.error("Claim failed:","Right"===t._tag?t.right.message:"Unknown error"),!1)}function jW(){const e=new URL(window.location.href);e.searchParams.delete("claim_key"),window.history.replaceState({},"",e.toString())}async function qW(){const e=GW();e&&await KW(e)}var XW=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-top-nav-top-inner"},[t("span",{staticClass:"message"},[e._v(" This temporary site will be deleted in "),t("span",{staticClass:"counter"},[e._v(e._s(e.formattedTime))]),e._v(" unless you register and claim it. ")]),t(Qo.Z,{staticClass:"btn-action",on:{click:e.handleClaimSite}},[e._v(" Claim Your Site ")])],1)},YW=[];function QW(){const e=c.singularityStore.siteStatus.siteState;if(!e||"error"in e)return null;if(!e.expiration)return null;const t=(1e3*e.expiration-Date.now())/1e3;return t}function JW(e,t){const n=Math.floor(e/3600),s=Math.floor(e%3600/60),i=Math.floor(e%60);return t?n>0?`${n}:${s.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`:`${s}:${i.toString().padStart(2,"0")}`:n>0?`${n}:${s.toString().padStart(2,"0")}`:`${s}m`}function eU(){const e=c.singularityStore.siteStatus.siteState;if(!e||"error"in e)return null;if(!e.expiration)return null;const t=(1e3*e.expiration-Date.now())/1e3;return t}function tU(){const e=HW();if(e){const t=encodeURIComponent(window.location.href),n=`${e}&return_to=${t}`;window.location.href=n}}let nU=class extends s.ZP{constructor(){super(...arguments),this.intervalId=null,this.timeRemainingInSeconds=null}get formattedTime(){return!!this.timeRemainingInSeconds&&JW(this.timeRemainingInSeconds,!0)}handleClaimSite(){tU()}mounted(){this.timeRemainingInSeconds=QW(),this.intervalId=window.setInterval((()=>{this.timeRemainingInSeconds=QW()}),1e3)}beforeDestroy(){null!==this.intervalId&&clearInterval(this.intervalId)}};nU=(0,r.gn)([(0,l.wA)({})],nU);const sU=nU,iU=sU;var oU=(0,N.Z)(iU,XW,YW,!1,null,null,null);const aU=oU.exports;var rU=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-top-nav-top-inner"},[t("span",{staticClass:"message"},[e._v(" Connect this site to your FutureLayer account. ")]),t(Qo.Z,{staticClass:"btn-action",on:{click:e.handleClaimSite}},[e._v(" Connect Site ")])],1)},lU=[];let cU=class extends s.ZP{handleClaimSite(){tU()}};cU=(0,r.gn)([(0,l.wA)({})],cU);const dU=cU,uU=dU;var pU=(0,N.Z)(uU,rU,lU,!1,null,null,null);const hU=pU.exports;var gU=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-top-nav-top-inner"},[e.loading?t("span",{staticClass:"message"},[t("span",{staticClass:"spinner"}),e._v(" Connecting your site... ")]):[t("span",{staticClass:"message"},[e._v(" Your site is now connected to your FutureLayer account. ")]),t(Qo.Z,{staticClass:"btn-action",on:{click:e.dismiss}},[e._v(" Dismiss ")])]],2)},mU=[];let vU=class extends s.ZP{dismiss(){jW(),this.$emit("dismiss")}};(0,r.gn)([(0,l.fI)({type:Boolean,default:!1})],vU.prototype,"loading",void 0),vU=(0,r.gn)([(0,l.wA)({})],vU);const yU=vU,fU=yU;var _U=(0,N.Z)(fU,gU,mU,!1,null,null,null);const bU=_U.exports;let SU=class extends s.ZP{constructor(){super(...arguments),this.hasClaimKeyInUrl=!1,this.claimInProgress=!1}get hasExpiration(){const e=c.singularityStore.siteStatus.siteState;return!(!e||"error"in e)&&(null!==e.expiration&&void 0!==e.expiration)}get isSelfHostedAndUnclaimed(){return!this.hasExpiration&&!this.isClaimed}get isOnInstaWPAndUnclaimed(){return this.hasExpiration&&!this.isClaimed}get isClaimed(){return c.singularityStore.siteStatus.isClaimed}get showClaimSuccess(){return this.isClaimed&&this.hasClaimKeyInUrl}async mounted(){this.hasClaimKeyInUrl=null!==GW(),this.hasClaimKeyInUrl&&(this.claimInProgress=!0,await qW(),this.claimInProgress=!1)}handleDismiss(){jW(),this.hasClaimKeyInUrl=!1}};SU=(0,r.gn)([(0,l.wA)({components:{TopNavNotificationBarDeletionWarning:aU,TopNavNotificationBarConnectSite:hU,TopNavNotificationBarSuccess:bU}})],SU);const CU=SU,xU=CU;var wU=(0,N.Z)(xU,WW,UW,!1,null,null,null);const IU=wU.exports;var PU=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"futurelayer-icon-and-warning-wrapper"},[t("FutureLayerLogoMenu"),e.shouldShowBadge?t("FutureLayerDaysRemainingBadge"):e._e()],1)},kU=[],EU=n(60092),TU=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(EU.Z,{attrs:{"offset-y":"",bottom:"",left:"","close-on-content-click":!1},on:{input:e.onToggle},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:s}){return[t("div",e._g(e._b({staticClass:"logo-wrapper"},"div",s,!1),n),[t("Logo",{attrs:{fill:"white",size:"40"}})],1)]}}]),model:{value:e.isOpen,callback:function(t){e.isOpen=t},expression:"isOpen"}},[t(Jc.Z,{staticClass:"account-dropdown"},[t(Ec.Z,[t(Tc.Z,{attrs:{dense:""},on:{click:e.openSettings}},[t(Dc.V9,[e._v("Site Settings")])],1),t(Tc.Z,{attrs:{dense:""},on:{click:e.toggleAdvancedMode}},[t(Dc.V9,[e._v("Open in Breakdance")])],1),t(Tc.Z,{attrs:{dense:""},on:{click:e.openFrontend}},[t(Dc.V9,[e._v("Open in New Tab")])],1),t(Tc.Z,{attrs:{href:e.backToAdmin,dense:""}},[t(Dc.V9,[e._v("Exit to WordPress")])],1),t(bp.Z,{staticClass:"mt-2 mb-2"}),t(Tc.Z,{attrs:{dense:""},on:{click:e.toggleMobileBreakpoint}},[t(Dc.V9,[e._v(" Toggle Mobile View "+e._s(e.isMobile?"✓":""))])],1),t(Tc.Z,{attrs:{dense:"",disabled:e.isMobile},on:{click:e.toggleZoomLevel}},[t(Dc.V9,[e._v(" Toggle Zoom "+e._s(e.isZoomActive?"✓":""))])],1),e.devEnvironment?[t(bp.Z,{staticClass:"mt-2 mb-2"}),t(Tc.Z,{attrs:{dense:""},on:{click:e.toggleSingularityDebugPanel}},[t(Dc.V9,[e._v("Open Debug")])],1),t(Tc.Z,{attrs:{dense:""},on:{click:e.toggleSidebarPanels}},[t(Dc.V9,[e._v(" Toggle Sidebar Panels "+e._s(e.sidebarPanelsEnabled?"✓":"")+" ")])],1),e.sidebarPanelsEnabled?t(Tc.Z,{attrs:{dense:""},on:{click:e.toggleHistoryPanel}},[t(Dc.V9,[e._v(" Toggle History "+e._s(e.isHistoryPanelOpen?"✓":"")+" ")])],1):e._e(),t(Tc.Z,{attrs:{dense:""},on:{click:e.toggleAIJobManager}},[t(Dc.V9,[e._v("Toggle AI Job Manager")])],1)]:e._e()],2),e.isClaimed?[t(bp.Z),e.isLoading?t("div",{staticClass:"account-info loading-state"},[t(Xp.Z,{attrs:{indeterminate:"",size:"32"}})],1):t("div",{staticClass:"account-info"},[e.userData?t("div",{staticClass:"account-email"},[e._v(" "+e._s(e.userData.email)+" ")]):e._e(),t("div",{staticClass:"account-credits"},[t("strong",[e._v("Credits:")]),e._v(" "+e._s(e.credits)+" ")]),e.planSlug?t("div",{staticClass:"account-plan"},[t("strong",[e._v("Plan:")]),e._v(" "+e._s(e.planDisplayName)+" ")]):e._e(),t("NiceButton",{staticClass:"mt-2",attrs:{size:"small"},on:{click:e.manageAccount}},[e._v(" Manage Account ")])],1)]:e._e()],2)],1)},DU=[],AU=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("svg",{attrs:{width:e.size,height:e.size,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[t("rect",{attrs:{y:"0.0706177",width:"5.24729",height:"5.24729",rx:"2.62364",fill:e.fill}}),t("rect",{attrs:{x:"6.32727",y:"0.0706177",width:"5.24729",height:"5.24729",rx:"2.62364",fill:e.fill}}),t("rect",{attrs:{x:"12.6545",y:"0.0706177",width:"5.24729",height:"5.24729",rx:"2.62364",fill:e.fill}}),t("rect",{attrs:{y:"6.39789",width:"5.24729",height:"5.24729",rx:"2.62364",fill:e.fill}}),t("rect",{attrs:{x:"6.32727",y:"6.39789",width:"5.24729",height:"5.24729",rx:"2.62364",fill:e.fill}}),t("rect",{attrs:{y:"12.7252",width:"5.24729",height:"5.24729",rx:"2.62364",fill:e.fill}})])},ZU=[];let OU=class extends s.ZP{};(0,r.gn)([(0,l.fI)({default:"32"})],OU.prototype,"size",void 0),(0,r.gn)([(0,l.fI)({default:"#ffffff"})],OU.prototype,"fill",void 0),OU=(0,r.gn)([l.wA],OU);const MU=OU,BU=MU;var LU=(0,N.Z)(BU,AU,ZU,!1,null,null,null);const NU=LU.exports;var FU=n(48379);const RU="breakpoint_phone_portrait";let VU=class extends s.ZP{constructor(){super(...arguments),this.isOpen=!1,this.isLoading=!1}get devEnvironment(){return(0,zg.y)()}get siteState(){return c.singularityStore.siteStatus.siteState}get isClaimed(){return!(!this.siteState||"error"in this.siteState)&&"claimed"===this.siteState.type}get singularityDebugPanelOpen(){return"debug"===c.singularityStore.singularityUiState.singularityRightPanel}get isMobile(){return c.uiStore.currentBreakpoint.id===RU}get isZoomActive(){return c.singularityStore.canvasZoom}get sidebarPanelsEnabled(){return c.singularityStore.debugSidebarPanelsEnabled}get isHistoryPanelOpen(){return"history"===c.uiStore.panelState.leftSidebarPanel||"history"===c.uiStore.panelState.rightSidebarPanel}get userData(){return this.siteState&&"user_data"in this.siteState?this.siteState.user_data:null}get credits(){return this.siteState?"error"in this.siteState?0:"anonymous"===this.siteState.type?this.siteState.credits:"claimed"===this.siteState.type?this.siteState.user_data.credits:0:0}get planSlug(){return!this.siteState||"error"in this.siteState?null:"claimed"===this.siteState.type?this.siteState.user_data.plan_slug:null}get planDisplayName(){return this.planSlug?this.planSlug.charAt(0).toUpperCase()+this.planSlug.slice(1):""}manageAccount(){window.location.href=(0,FU.e)("/"),this.isOpen=!1}onToggle(e){e&&this.fetchSiteState()}async fetchSiteState(){this.isLoading=!0;try{const e=await(0,ad.D)({action:"futurelayer_get_site_state_from_app",decoder:iu.dt({success:iu.O7,data:zW.pl}),suppressErrorLogging:!1,friendlyName:"Get Site State from FutureLayer App"});"Right"===e._tag&&e.right.success&&c.singularityStore.setSiteStatus({...c.singularityStore.siteStatus,siteState:e.right.data})}catch(e){console.error("Failed to fetch site state:",e)}finally{this.isLoading=!1}}toggleSingularityDebugPanel(){c.singularityStore.setSingularityRightPanel(this.singularityDebugPanelOpen?null:"debug"),this.isOpen=!1}toggleAIJobManager(){c.singularityStore.setSingularityRightPanel("ai_job_manager"===c.singularityStore.singularityUiState.singularityRightPanel?null:"ai_job_manager"),this.isOpen=!1}openSettings(){c.singularityStore.setSingularityFullWidthPanel("settings"),this.isOpen=!1}get frontendUrl(){return(0,zu.j)()}get backToAdmin(){return Q.PK.documentSpecificNeededUrls?Q.PK.documentSpecificNeededUrls.backToWordPressUrl:""}openFrontend(){const e=this.frontendUrl;e&&window.open(e,"_blank"),this.isOpen=!1}toggleAdvancedMode(){(0,Aa.Cr)(),this.isOpen=!1}toggleMobileBreakpoint(){const e=this.isMobile?Q.PK.breakpoints.find((e=>e.id===Pe.Wp)):Q.PK.breakpoints.find((e=>e.id===RU));e&&(c.singularityStore.setCanvasZoom(!1),c.uiStore.changeBreakpoint(e),(0,Tt.K)("FutureLayer Mobile Preview Toggle"),this.isOpen=!1)}toggleZoomLevel(){c.singularityStore.toggleCanvasZoom(),(0,Tt.K)("FutureLayer Zoom Toggle"),this.isOpen=!1}toggleHistoryPanel(){this.isHistoryPanelOpen?("history"===c.uiStore.panelState.leftSidebarPanel&&c.uiStore.setLeftSidebarState("closed"),"history"===c.uiStore.panelState.rightSidebarPanel&&c.uiStore.setRightSidebarState("closed")):(0,Bu.oM)("history"),this.isOpen=!1}toggleSidebarPanels(){c.singularityStore.toggleDebugSidebarPanels(),this.isOpen=!1}};VU=(0,r.gn)([(0,l.wA)({components:{Logo:NU,NiceButton:Br.Z}})],VU);const $U=VU,WU=$U;var UU=(0,N.Z)(WU,TU,DU,!1,null,"f078c87e",null);const zU=UU.exports;var HU=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"days-remaining-badge",on:{click:e.navigateToSitePage}},[e._v(" "+e._s(e.daysRemainingText)+" ")])},GU=[];let KU=class extends s.ZP{constructor(){super(...arguments),this.currentTime=Date.now(),this.intervalId=null}get siteState(){return c.singularityStore.siteStatus.siteState}get siteId(){return!this.siteState||"error"in this.siteState?null:"claimed"===this.siteState.type?this.siteState.site_id:null}get secondsRemaining(){return this.currentTime,eU()}get timeRemaining(){if(null===this.secondsRemaining)return null;if(this.secondsRemaining<=0)return{days:0,hours:0,minutes:0};const e=Math.floor(this.secondsRemaining/86400),t=Math.floor(this.secondsRemaining%86400/3600),n=Math.floor(this.secondsRemaining%3600/60);return{days:e,hours:t,minutes:n}}get daysRemainingText(){if(null===this.timeRemaining)return"unknown expiration date";const{days:e,hours:t,minutes:n}=this.timeRemaining;return 0===e&&0===t&&0===n?"act now to prevent site deletion":0===e?0===t?`${n} ${1===n?"minute":"minutes"} remaining`:`${t} ${1===t?"hour":"hours"} ${n} ${1===n?"minute":"minutes"} remaining`:1===e?`1 day ${t} ${1===t?"hour":"hours"} remaining`:`${e} days ${t} ${1===t?"hour":"hours"} remaining`}navigateToSitePage(){if(!this.siteId)return void console.warn("No site ID available");const e=(0,FU.e)(`/sites/expiring/${this.siteId}`);window.location.href=e}mounted(){this.intervalId=window.setInterval((()=>{this.currentTime=Date.now()}),6e4)}beforeDestroy(){null!==this.intervalId&&clearInterval(this.intervalId)}};KU=(0,r.gn)([(0,l.wA)({})],KU);const jU=KU,qU=jU;var XU=(0,N.Z)(qU,HU,GU,!1,null,null,null);const YU=XU.exports;let QU=class extends s.ZP{get siteState(){return c.singularityStore.siteStatus.siteState}get userData(){return this.siteState&&"user_data"in this.siteState?this.siteState.user_data:null}get accountType(){return this.userData?"free"===this.userData?.plan_slug?"free":"pro":null}get isClaimed(){return c.singularityStore.siteStatus.isClaimed}get hasExpiration(){return!(!this.siteState||"error"in this.siteState)&&(null!==this.siteState.expiration&&void 0!==this.siteState.expiration)}get shouldShowBadge(){return this.hasExpiration&&this.isClaimed}};(0,r.gn)([(0,l.fI)({default:!1})],QU.prototype,"forceHideExpirationWarning",void 0),QU=(0,r.gn)([(0,l.wA)({components:{FutureLayerLogoMenu:zU,FutureLayerDaysRemainingBadge:YU}})],QU);const JU=QU,ez=JU;var tz=(0,N.Z)(ez,PU,kU,!1,null,"791520e3",null);const nz=tz.exports;let sz=class extends s.ZP{};sz=(0,r.gn)([(0,l.wA)({components:{TopNavNotificationBar:IU,FutureLayerIconAndWarningWrapper:nz}})],sz);const iz=sz,oz=iz;var az=(0,N.Z)(oz,VW,$W,!1,null,null,null);const rz=az.exports;var lz=n(5547),cz=n(52666);let dz=class extends s.ZP{constructor(){super(...arguments),this.creating=!1,this.rebuildFromUrl=null,this.waitingForThingsToBeReadyDone=!1,this.isBuildFromUrlMode=!1,this.activeStep=0,this.aiSettings={title:"",description:""},this.promptSteps=[{title:"Start"},{title:"Category"},{title:"Goals"},{title:"Writing Style"}],this.samplePrompts=[{buttonText:"Landing Page",businessName:"Smart Widget",businessDescription:"Create a landing page for a new product called Smart Widget. It should highlight the features and benefits of the product."},{buttonText:"Blog",businessName:"Travel Adventures",businessDescription:"Create a blog page called Travel Adventures which focuses on travel tips and experiences."},{buttonText:"Portfolio",businessName:"Creative Minds",businessDescription:"Create a design portfolio for agency called Creative Minds. It should showcase their best work and include client testimonials."},{buttonText:"Small Business",businessName:"Local Bakery",businessDescription:"Create a website for a small business called Local Bakery. It should include information about their products, location, and hours of operation."}]}generate(){this.isBuildFromUrlMode?this.rebuild():this.create()}async mounted(){await(0,lz.d2)(),this.aiSettings=(0,cz.Np)(),this.waitingForThingsToBeReadyDone=!0,this.checkForAutostart()}checkForAutostart(){this.shouldAutostart&&this.aiSettings.title&&this.aiSettings.description&&this.generate()}async create(){this.creating=!0,await(0,lz.GL)(this.aiSettings),this.creating=!1}async rebuild(){if(this.creating=!0,!this.rebuildFromUrl)return alert("Please enter a URL to rebuild from."),void(this.creating=!1);const e=await OW(this.rebuildFromUrl);console.log(e),console.log("Rebuild from URL completed"),c.singularityStore.setSingularityLeftPanel("page_structure"),this.creating=!1}nextStep(){this.activeStep<this.promptSteps.length-1&&this.activeStep++}setSamplePrompt(e){this.isBuildFromUrlMode=!1,this.updateBusinessDescription(e.businessDescription),this.updateBusinessName(e.businessName)}selectRandomPrompt(){const e=this.samplePrompts[Math.floor(Math.random()*this.samplePrompts.length)];this.setSamplePrompt(e)}get businessName(){return this.aiSettings.title}updateBusinessName(e){this.aiSettings.title=e}updateBusinessDescription(e){this.aiSettings.description=e}get businessDescription(){return this.aiSettings.description}get shouldAutostart(){const e=new URLSearchParams(window.location.search);return"true"===e.get("autostart")}};dz=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,TopNav:rz,NiceButton:Br.Z,Icon:He.Z}})],dz);const uz=dz,pz=uz;var hz=(0,N.Z)(pz,CW,xW,!1,null,null,null);const gz=hz.exports;var mz=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-right-panel"},["ai_job_manager"===e.singularityRightPanelState?t("AIJobManager"):e._e(),"debug"===e.singularityRightPanelState?t("SingularityDebugPanel"):e._e()],1)},vz=[],yz=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"ai-job-manager vscroll-wrap vscroll-scroll"},[t("PanelHeader",{attrs:{parentTitle:"AI Job Manager"}}),t("div",{staticClass:"ai-job-manager-content"},[t("div",{staticClass:"header"},[t(Qo.Z,{attrs:{color:"warning",small:""},on:{click:e.clearAllJobs}},[e._v("Clear All Jobs")])],1),t("div",{staticClass:"job-list"},[0===e.aiJobs.length?t("div",{staticClass:"no-jobs"},[e._v(" No AI jobs currently running ")]):e._e(),e._l(e.sortedJobs,(function(n){return t("div",{key:n.id,staticClass:"job-card"},[t("div",{staticClass:"job-header"},[t("div",{staticClass:"job-badges"},[t("span",{staticClass:"job-status",class:n.status},[e._v(e._s(n.status))]),t("span",{staticClass:"job-priority",class:n.context.priority},[e._v(e._s(n.context.priority))])]),t(Qo.Z,{attrs:{color:"error","x-small":"",disabled:"running"!==n.status&&"pending"!==n.status},on:{click:function(t){return e.abortJob(n.id)}}},[e._v(" Abort ")])],1),t("pre",{staticClass:"job-data"},[e._v(e._s(JSON.stringify(n,null,2)))])])}))],2)])],1)},fz=[];let _z=class extends s.ZP{get aiJobs(){return c.singularityStore.aiJobs}get sortedJobs(){const e={critical:0,high:1,normal:2,low:3};return[...this.aiJobs].sort(((t,n)=>e[t.context.priority]-e[n.context.priority]))}abortJob(e){er.P.abortJob(e)}clearAllJobs(){er.P.clearAllJobs()}};_z=(0,r.gn)([(0,l.wA)({components:{PanelHeader:EL}})],_z);const bz=_z,Sz=bz;var Cz=(0,N.Z)(Sz,yz,fz,!1,null,"ec13fbf8",null);const xz=Cz.exports;var wz=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"breakdance-panel vscroll-wrap borderOnRight singularity-debug-panel"},[e._v(" "+e._s(e.siteState)+" "+e._s(e.backgroundGeneratingHeadersAndFooters)+" "),t(Qo.Z,{on:{click:e.generateSitemapPopulatePagesWithSectionsWriteContentAndUpdateImages}},[e._v("generateSitemapPopulatePagesWithSectionsWriteContentAndUpdateImages")]),t("div",{staticClass:"singularity-debug-panel-content vscroll-wrap vscroll-scroll"},[t("SectionWriter"),t("AIJobManager"),e._v(" AI Server: "+e._s(e.aiServer)+" ")],1),t("div",[t(Qo.Z,{on:{click:e.replaceImagesInSectionWithAi}},[e._v("replaceImagesInSectionWithAi")]),t(Qo.Z,{on:{click:e.replaceImagesInSectionWithAiMutating}},[e._v("defensiveCopy and then replaceImagesInSectionWithAiMutating")])],1)],1)},Iz=[];let Pz=class extends s.ZP{generateSitemapPopulatePagesWithSectionsWriteContentAndUpdateImages(){}get siteState(){return c.singularityStore.siteStatus.siteState}get aiServer(){return c.singularityStore.aiServer}async replaceImagesInSectionWithAi(){const e=c.uiStore.activeElement;if(!e)return void alert("no active node");const t=await(0,nr.q)(e,new AbortController);console.log("Result is:",t)}async replaceImagesInSectionWithAiMutating(){const e=c.uiStore.activeElement;if(!e)return void alert("no active node");const t=(0,wd.Z)(e);await(0,nr._)(t,new AbortController),console.log("phantomNode after mutation:",t)}get backgroundGeneratingHeadersAndFooters(){return c.singularityStore.backgroundGeneratingHeadersAndFooters}};Pz=(0,r.gn)([(0,l.wA)({components:{SectionWriter:hM,AIJobManager:xz}})],Pz);const kz=Pz,Ez=kz;var Tz=(0,N.Z)(Ez,wz,Iz,!1,null,null,null);const Dz=Tz.exports;let Az=class extends s.ZP{get singularityRightPanelState(){return c.singularityStore.singularityUiState.singularityRightPanel}};Az=(0,r.gn)([(0,l.wA)({components:{AIJobManager:xz,SingularityDebugPanel:Dz}})],Az);const Zz=Az,Oz=Zz;var Mz=(0,N.Z)(Oz,mz,vz,!1,null,null,null);const Bz=Mz.exports;var Lz=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-full-width-panel"},["settings"===e.singularityFullWidthPanel?t("Settings"):e._e()],1)},Nz=[],Fz=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-wp-page-manager"},[t("div",{staticClass:"singularity-wp-page-manager__wrapper"},[t("div",{staticClass:"singularity-wp-page-manager__header"},[t("h1",{staticClass:"singularity-wp-page-manager__header-title"},[e._v("Settings")]),t("TopNavSave")],1),t("div",{staticClass:"singularity-settings__content"},[t("div",{staticClass:"settings-section"},[t("h2",[e._v("Site Information")]),t("div",{staticClass:"settings-form"},[t("TextInput",{staticClass:"settings-input",attrs:{label:"Site Title",placeholder:"Enter your site title"},on:{blur:e.saveSettings},model:{value:e.aiSettings.title,callback:function(t){e.$set(e.aiSettings,"title",t)},expression:"aiSettings.title"}}),t("TextInput",{staticClass:"settings-input",attrs:{label:"Site Description",multiline:!0,placeholder:"Enter your site description"},on:{blur:e.saveSettings},model:{value:e.aiSettings.description,callback:function(t){e.$set(e.aiSettings,"description",t)},expression:"aiSettings.description"}})],1)])])])])},Rz=[],Vz=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-save__indicator"},[e.unsavedChangesPresent?t("span",{staticClass:"singularity-save__item singularity-save__item--saving"},[t("span",{staticClass:"singularity-save__dot"}),e._v("Saving...")]):t("span",{staticClass:"singularity-save__item singularity-save__item--saved"},[t("span",{staticClass:"singularity-save__dot"}),e._v("Saved")])])},$z=[];let Wz=class extends s.ZP{constructor(){super(...arguments),this.lastSaved=new Date,this.unsubscribe=null}get unsavedChangesPresent(){return c.uiStore.unsavedChangesPresent}mounted(){this.unsubscribe=this.$store.subscribe((e=>{Ie.n.shouldMutationBeIgnored(e)||c.uiStore.setUnsavedChangesPresent(!0)}))}beforeDestroy(){this.unsubscribe&&this.unsubscribe()}};Wz=(0,r.gn)([(0,l.wA)({components:{Save:kc,Icon:He.Z}})],Wz);const Uz=Wz,zz=Uz;var Hz=(0,N.Z)(zz,Vz,$z,!1,null,null,null);const Gz=Hz.exports;let Kz=class extends s.ZP{constructor(){super(...arguments),this.aiSettings={title:"",description:""},this.saveInProgress=!1}mounted(){this.aiSettings=(0,cz.Np)()}async saveSettings(){this.saveInProgress=!0,await(0,cz.ZT)(this.aiSettings),this.saveInProgress=!1}};Kz=(0,r.gn)([(0,l.wA)({components:{TextInput:na.Z,TopNavSave:Gz}})],Kz);const jz=Kz,qz=jz;var Xz=(0,N.Z)(qz,Fz,Rz,!1,null,null,null);const Yz=Xz.exports;let Qz=class extends s.ZP{get singularityFullWidthPanel(){return c.singularityStore.singularityUiState.singularityFullWidthPanel}};Qz=(0,r.gn)([(0,l.wA)({components:{Settings:Yz}})],Qz);const Jz=Qz,eH=Jz;var tH=(0,N.Z)(eH,Lz,Nz,!1,null,null,null);const nH=tH.exports;var sH=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("TopNav",{scopedSlots:e._u([{key:"menu",fn:function(){return e._l(e.primaryNav,(function(e){return t("TopNavButton",{key:e.name,attrs:{link:e}})}))},proxy:!0},{key:"actions",fn:function(){return[t("TopNavSave"),[t("TopNavUndoRedo")]]},proxy:!0}])})},iH=[],oH=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("button",{class:{"is-active":e.isActive},on:{click:e.handleClick}},[e._v(" "+e._s(e.link.name)+" ")])},aH=[];let rH=class extends s.ZP{openPanel(e){void 0!==e?.leftPanel&&c.singularityStore.setSingularityLeftPanel(e.leftPanel),void 0!==e?.rightPanel&&c.singularityStore.setSingularityRightPanel(e.rightPanel),void 0!==e?.fullWidthPanel&&c.singularityStore.setSingularityFullWidthPanel(e.fullWidthPanel)}get isActive(){return this.link.panelState?.leftPanel&&c.singularityStore.singularityUiState.singularityLeftPanel===this.link.panelState?.leftPanel||this.link.panelState?.fullWidthPanel&&c.singularityStore.singularityUiState.singularityFullWidthPanel===this.link.panelState?.fullWidthPanel||this.link.panelState?.rightPanel&&c.singularityStore.singularityUiState.singularityRightPanel===this.link.panelState?.rightPanel}handleClick(){this.link.action?this.link.action():(this.openPanel(this.link.panelState),(0,Tt.K)("FutureLayer Top Nav Click",{name:this.link.name}))}};(0,r.gn)([(0,l.fI)()],rH.prototype,"link",void 0),rH=(0,r.gn)([(0,l.wA)({components:{Icon:He.Z}})],rH);const lH=rH,cH=lH;var dH=(0,N.Z)(cH,oH,aH,!1,null,null,null);const uH=dH.exports;var pH=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-top-nav-mobile",class:{"is-active":e.isPreviewMode}},[t("IconButton",{attrs:{size:16,icon:"PlaySolidIcon",active:e.isPreviewMode},on:{click:e.togglePreviewMode}})],1)},hH=[];let gH=class extends s.ZP{get currentBreakpoint(){return c.uiStore.currentBreakpoint.id}get isPreviewMode(){return c.singularityStore.previewMode}togglePreviewMode(){c.singularityStore.togglePreviewMode()}};gH=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z}})],gH);const mH=gH,vH=mH;var yH=(0,N.Z)(vH,pH,hH,!1,null,null,null);const fH=yH.exports;var _H=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"signularity-top-nav-undo-redo"},[t("IconButton",{attrs:{disabled:!e.canUndo,icon:"UndoIconSolid",size:"16"},on:{click:e.undo}}),t("IconButton",{attrs:{disabled:!e.canRedo,icon:"RedoIconSolid",size:"16"},on:{click:e.redo}})],1)},bH=[];let SH=class extends s.ZP{mounted(){Ke.uq.register(je.r.CMD_Z,this.undo),Ke.uq.register(je.r.CMD_SHIFT_Z,this.redo)}get canUndo(){return c.snapshotStore.canUndo}get canRedo(){return c.snapshotStore.canRedo}undo(){this.canUndo&&Ie.n.undo()}redo(){this.canRedo&&Ie.n.redo()}beforeDestroy(){Ke.uq.unbind(je.r.CMD_Z),Ke.uq.unbind(je.r.CMD_SHIFT_Z)}get builderMode(){return c.configStore.builderMode}};SH=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z,TopBarSection:Kc}})],SH);const CH=SH,xH=CH;var wH=(0,N.Z)(xH,_H,bH,!1,null,null,null);const IH=wH.exports;let PH=class extends s.ZP{constructor(){super(...arguments),this.primaryNav=[{panelState:{leftPanel:"page_structure",fullWidthPanel:null},name:"Build"},{panelState:{leftPanel:"brand",fullWidthPanel:null},name:"Brand"},{panelState:{leftPanel:"page_manager",fullWidthPanel:null},name:"Pages"}]}get singularityDebugPanelOpen(){return"debug"===c.singularityStore.singularityUiState.singularityRightPanel}get unsavedChangesPresent(){return c.uiStore.unsavedChangesPresent}get singularityUiState(){return c.singularityStore.singularityUiState}get isFullWidthState(){return!!this.singularityUiState.singularityFullWidthPanel}get isPageStructureOrBrandPanelOpen(){return"page_structure"===c.singularityStore.singularityUiState.singularityLeftPanel||"brand"===c.singularityStore.singularityUiState.singularityLeftPanel}openPageStructure(){c.singularityStore.setSingularityLeftPanel("page_structure")}};PH=(0,r.gn)([(0,l.wA)({components:{TopNav:rz,TopNavButton:uH,TopNavSave:Gz,TopNavPreviewMode:fH,TopNavUndoRedo:IH}})],PH);const kH=PH,EH=kH;var TH=(0,N.Z)(EH,sH,iH,!1,null,null,null);const DH=TH.exports;var AH=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-builder-canvas",class:{"is-mobile":e.isMobile,"is-zoomed-out":e.isZoomedOut}},[t("div",{staticClass:"singularity-browser-ui"},[e._m(0),t("IframeCanvas",{on:{loaded:function(t){return e.$emit("loaded")}}})],1)])},ZH=[function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-browser-ui__panel"},[t("div",{staticClass:"singularity-browser-ui__dots"},[t("span"),t("span"),t("span")])])}],OH=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"singularity-top-nav-icon-button",class:{"is-active":e.isMobile}},[t("IconButton",{attrs:{size:16,icon:"MobileIcon",active:e.isMobile},on:{click:e.toggleMobileBreakpoint}})],1)},MH=[];const BH="breakpoint_phone_portrait";let LH=class extends s.ZP{get currentBreakpoint(){return c.uiStore.currentBreakpoint.id}get isMobile(){return c.uiStore.currentBreakpoint.id===BH}toggleMobileBreakpoint(){const e=this.isMobile?c.configStore.breakpoints.find((e=>e.id===Pe.Wp)):c.configStore.breakpoints.find((e=>e.id===BH));e&&(c.singularityStore.setCanvasZoom(!1),c.uiStore.changeBreakpoint(e),(0,Tt.K)("FutureLayer Mobile Preview Toggle"))}};LH=(0,r.gn)([(0,l.wA)({components:{IconButton:Xa.Z}})],LH);const NH=LH,FH=NH;var RH=(0,N.Z)(FH,OH,MH,!1,null,null,null);RH.exports;let VH=class extends s.ZP{get isMobile(){return c.uiStore.currentBreakpoint.id===BH}get isZoomedOut(){return!this.isMobile&&c.singularityStore.canvasZoom}};VH=(0,r.gn)([(0,l.wA)({components:{IframeCanvas:dc}})],VH);const $H=VH,WH=$H;var UH=(0,N.Z)(WH,AH,ZH,!1,null,null,null);const zH=UH.exports,HH=!1,GH=1e3;let KH=!1;function jH(...e){HH&&console.log(...e)}function qH(){return c.uiStore.unsavedChangesPresent}async function XH(){c.uiStore.isSingularityMode&&(c.uiStore.saveInProgress?jH("Save in progress, skipping autosave."):qH()?(jH("Unsaved changes detected, performing autosave."),c.uiStore.inlineEditingContext?.elementId&&(jH("Inline editing context detected, triggering inline editor save."),await(0,il.PF)(c.uiStore.inlineEditingContext.elementId)),await Promise.all([(0,zl.$)(),(0,ER.N1)()])):jH("No unsaved changes present, skipping autosave."))}function YH(){KH?jH("Autosave service already started, skipping initialization."):(setInterval(XH,GH),KH=!0,jH("Autosave service started with interval:",GH))}var QH=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(Ha.Z,{attrs:{"max-width":"480"},on:{"click:outside":e.closeModal},model:{value:e.isOpen,callback:function(t){e.isOpen=t},expression:"isOpen"}},[t(Jc.Z,[t("IconButton",{staticClass:"close-button",attrs:{icon:"CloseIcon"},on:{click:e.closeModal}}),t("div",{staticClass:"modal-content"},[t("h3",[e._v("You're out of credits")]),t("p",[e._v(" You've reach your plan limit. "),e.isSiteClaimed?t("span",[e._v("Upgrade your account to continue building your site.")]):t("span",[e._v("Register an account and claim this site.")])]),t("div",{staticClass:"cta-wrapper",class:{"has-offer":e.offerText}},[e.offerText?t("p",[e._v(e._s(e.offerText))]):e._e(),t("NiceButton",{attrs:{color:"yellow",expanded:"true",size:"large"},on:{click:e.handleAction}},[e._v(" "+e._s(e.buttonText)+" ")])],1),t("NiceButton",{attrs:{color:"gray-ghost",expanded:"true",size:"large"},on:{click:e.handleAction}},[e._v(" See Pricing ")])],1)],1)],1)},JH=[];let eG=class extends s.ZP{get isOpen(){return c.singularityStore.isOutOfCreditsModalOpen}set isOpen(e){c.singularityStore.setOutOfCreditsModalOpen(e)}get siteStatus(){return c.singularityStore.siteStatus}get isSiteClaimed(){return this.siteStatus.isClaimed}get buttonText(){return this.isSiteClaimed?"Upgrade Plan":"Register Free"}closeModal(){c.singularityStore.setOutOfCreditsModalOpen(!1)}handleAction(){if(this.isSiteClaimed)window.location.href=(0,FU.e)("/pricing");else{const e=HW();if(e){const t=encodeURIComponent(window.location.href),n=`${e}&return_to=${t}`;window.location.href=n}}}};(0,r.gn)([(0,l.fI)()],eG.prototype,"offerText",void 0),eG=(0,r.gn)([(0,l.wA)({components:{NiceButton:Br.Z,IconButton:Xa.Z}})],eG);const tG=eG,nG=tG;var sG=(0,N.Z)(nG,QH,JH,!1,null,null,null);const iG=sG.exports;var oG=function(){var e=this,t=e._self._c;e._self._setupProxy;return t(Ha.Z,{attrs:{"max-width":"480"},on:{"click:outside":e.closeModal},model:{value:e.isOpen,callback:function(t){e.isOpen=t},expression:"isOpen"}},[t(Jc.Z,[t("IconButton",{staticClass:"close-button",attrs:{icon:"CloseIcon"},on:{click:e.closeModal}}),t("div",{staticClass:"modal-content"},[t("h3",[e._v("Plan Inactive")]),t("p",[e._v(" Your FutureLayer subscription is not active. Visit your account dashboard to resolve this issue. ")]),t("div",{staticClass:"cta-wrapper"},[t("NiceButton",{attrs:{color:"yellow",expanded:"true",size:"large"},on:{click:e.handleAction}},[e._v(" Go to Account Dashboard ")])],1)])],1)],1)},aG=[];let rG=class extends s.ZP{get isOpen(){return c.singularityStore.isPlanExpiredModalOpen}set isOpen(e){c.singularityStore.setPlanExpiredModalOpen(e)}closeModal(){c.singularityStore.setPlanExpiredModalOpen(!1)}handleAction(){window.location.href=(0,FU.e)("/")}};rG=(0,r.gn)([(0,l.wA)({components:{NiceButton:Br.Z,IconButton:Xa.Z}})],rG);const lG=rG,cG=lG;var dG=(0,N.Z)(cG,oG,aG,!1,null,null,null);const uG=dG.exports;let pG=class extends s.ZP{get singularityUiState(){return c.singularityStore.singularityUiState}get isSectionLibraryModalOpen(){return c.singularityStore.isSectionLibraryModalOpen}get isStep1(){return"step1"===this.singularityUiState.singularityFullWidthPanel}async mounted(){YH(),(0,Tt.K)("FutureLayer Loaded",{businessName:c.globalStore.aiSettings.prompt.businessName||"Unknown business name",businessDescription:c.globalStore.aiSettings.prompt.businessDescription||"Uenknown business description",url:(0,zu.j)()})}closeSectionLibraryModal(){c.singularityStore.setSectionLibraryModalState(!1)}get isPreviewMode(){return c.singularityStore.previewMode}get isFullWidthState(){return!!this.singularityUiState.singularityFullWidthPanel}get classes(){return{"singularity--full-width":this.isFullWidthState,[this.singularityUiState.singularityLeftPanel?`singularity--${this.singularityUiState.singularityLeftPanel}`:""]:!0,"singularity--with-left-panel":this.singularityUiState.singularityLeftPanel&&!this.singularityUiState.singularityRightPanel,"singularity--with-right-panel":this.singularityUiState.singularityRightPanel&&!this.singularityUiState.singularityLeftPanel,"singularity--with-both-panels":this.singularityUiState.singularityRightPanel&&this.singularityUiState.singularityLeftPanel,"singularity--preview-mode":this.isPreviewMode}}};pG=(0,r.gn)([(0,l.wA)({components:{Step1:gz,SingularityCanvas:zH,SingularityLeftPanelNew:_W,SingularityRightPanel:Bz,TopNavBuilder:DH,SingularitySectionLibraryModal:Vr,OutOfCreditsModal:iG,PlanExpiredModal:uG,SingularityFullWidthPanel:nH}})],pG);const hG=pG,gG=hG;var mG=(0,N.Z)(gG,bW,SW,!1,null,null,null);const vG=mG.exports;let yG=class extends s.ZP{constructor(){super(...arguments),this.showTemplateDialog=!1}mounted(){c.uiStore.hasFullAccess&&(0,je.c)().register()}beforeDestroy(){(0,je.c)().unbind(),(0,Wo.uV)().unbind()}get classList(){return{[`has-permission:${this.permission}`]:!0,["no-top-bar"]:this.isSingularityMode}}get isPreviewMode(){return c.uiStore.isPreviewMode}get preferencesModalOpen(){return c.uiStore.panelState.preferencesModalOpen}get elementStudioOpen(){return c.uiStore.panelState.elementStudioOpen}get singularityUiState(){return c.singularityStore.singularityUiState}get isSingularityMode(){return c.uiStore.isSingularityMode}get isDevEnvironment(){return(0,zg.y)()}get debugSidebarPanelsEnabled(){return c.singularityStore.debugSidebarPanelsEnabled}updatePreferencesModal(e){c.uiStore.setPreferencesModalOpen(e)}get keyboardShortcutsHelpModalOpen(){return c.uiStore.panelState.keyboardShortcutsHelpModalOpen}updateKeyboardShortcutsHelpModal(e){c.uiStore.setKeyboardShortcutHelpModalOpen(e)}get activeElementId(){return c.uiStore.activeElementId}get leftSidebarPanelState(){return c.uiStore.panelState.leftSidebarPanel}get rightSidebarPanelState(){return c.uiStore.panelState.rightSidebarPanel}get permission(){return c.configStore.permission?.slug}onIframeLoaded(){requestIdleCallback((()=>{(0,Hl.gn)()})),this.isRenderedWithTemplate()&&!this.containsTemplateContentArea&&(this.showTemplateDialog=!0),(0,Wo.uV)().register()}get showInvalidPostDialog(){return!!c.configStore.invalidPostData}isRenderedWithTemplate(){return null!==window.Breakdance?.canvas?.document?.querySelector("[data-rendered-with-template]")}getTemplateAttribute(e){if(!this.isRenderedWithTemplate())return null;const t=window.Breakdance?.canvas?.document?.querySelector("[data-rendered-with-template]");return t?.getAttribute(e)}get templateName(){return this.getTemplateAttribute("data-template-name")??""}get templateId(){const e=this.getTemplateAttribute("data-template-id");return e?parseInt(e):null}get isTemplateFallback(){return"true"===this.getTemplateAttribute("data-template-is-fallback")}get templatesPageUrl(){return this.getTemplateAttribute("data-template-page-url")}get containsTemplateContentArea(){return null!==window.Breakdance?.canvas?.document?.querySelector(".bde-themeless-template-content-area")}get builderMode(){return c.configStore.builderMode}get singularityModeStep1(){return this.isSingularityMode&&"step1"===this.singularityUiState.singularityFullWidthPanel}};yG=(0,r.gn)([(0,l.wA)({components:{ComponentRootTagWarning:YO,PreviewModeCloseButton:iM,DesignLibraryModal:iI,InvalidPostDialog:zO,TemplateDialog:NO,ClosingConfirmations:DO,IframeCanvasWrapper:mc,BuilderTopBar:qp,PreferencesModal:tm,ElementStudio:FS,KeyboardShortcutsHelpModal:lm,SidebarPanels:vO,ConfirmDialog:uh.Z,AppLayout:xO,SingularityLeftPanelNew:_W,Singularity:vG}})],yG);const fG=yG,_G=fG;var bG=(0,N.Z)(_G,m,v,!1,null,null,null);const SG=bG.exports;var CG=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",[t("h1",[e._v(e._s(e.__("Unrecoverable Errors")))]),e._l(e.errors,(function(n,s){return t("div",{key:s,staticClass:"unrecoverable-errors"},[e._v(" "+e._s(n)+" ")])}))],2)},xG=[];let wG=class extends s.ZP{get errors(){return c.uiStore.unrecoverableErrorMessages}};wG=(0,r.gn)([l.wA],wG);const IG=wG,PG=IG;var kG=(0,N.Z)(PG,CG,xG,!1,null,null,null);const EG=kG.exports;var TG=n(90878);let DG=class extends s.ZP{constructor(){super(...arguments),this.broadcastChannel=null}async beforeMount(){if("builder"===window.Breakdance.initialMode){const e=await(0,Hl.Dl)(window.Breakdance.initialDocumentToLoadId);(0,Hl.PX)(e)}this.broadcastChannel=(0,TG.a)()}beforeDestroy(){this.broadcastChannel&&this.broadcastChannel.close()}get interfaceState(){return c.uiStore.interfaceState}get errorsPresent(){return c.uiStore.unrecoverableErrorMessages.length}get currentDocumentMetaId(){return c.documentStore.document.documentMeta.id}get builderMode(){return c.configStore.builderMode}handleCurrentDocumentChange(e){const t=[g()(this.builderMode||"")];if(e!==lP.VY){const e=(0,Yl.aV)(c.documentStore.document.documentMeta.titleLabel);t.push(e)}window.document.title=t.join(" | ")}get unsavedChangesPresent(){return c.uiStore.unsavedChangesPresent}handleUnsavedChangesPresentChange(e){e?this.requestClosingConfirmation():this.removeClosingConfirmation()}requestClosingConfirmation(){c.uiStore.requestClosingConfirmation({subject:"builder",confirmationDefinition:{title:(0,Ft.__)("You must save your changes first"),actionText:(0,Ft.__)("Save and continue"),type:"warning",hasCancel:!0,hasDiscard:!1}})}removeClosingConfirmation(){c.uiStore.noClosingConfirmationIsNeededFor("builder")}get confirmationChosenOption(){return c.uiStore.closingConfirmations.builder?.chosenOption}async handleConfirmationChosenOptionChange(e){"discard"===e?(this.removeClosingConfirmation(),(0,SI.w7)()):"save"===e&&(c.uiStore.setClosingConfirmationIsSaving({subject:"builder",isSaving:!0}),(0,id.pipe)(await(0,zl.$)(),(0,od.fold)((()=>{c.uiStore.setClosingConfirmationIsSaving({subject:"builder",isSaving:!1})}),(()=>{this.removeClosingConfirmation(),(0,SI.w7)()}))))}};(0,r.gn)([(0,l.RL)("currentDocumentMetaId")],DG.prototype,"handleCurrentDocumentChange",null),(0,r.gn)([(0,l.RL)("unsavedChangesPresent",{immediate:!0})],DG.prototype,"handleUnsavedChangesPresentChange",null),(0,r.gn)([(0,l.RL)("confirmationChosenOption",{immediate:!0})],DG.prototype,"handleConfirmationChosenOptionChange",null),DG=(0,r.gn)([(0,l.wA)({components:{BuilderLayout:SG,Loading:Ql.Z,UnrecoverableErrors:EG}})],DG);const AG=DG,ZG=AG;var OG=(0,N.Z)(ZG,u,p,!1,null,null,null);const MG=OG.exports;var BG=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",["normal"===e.interfaceState?t("AppLayout",{scopedSlots:e._u([{key:"topbar",fn:function(){return[t("TopBar",[t("TopBarSection",[t("div",{staticClass:"browse-mode-address-bar"},[t("h2",[e._v(e._s(e.__("Viewing Page")))]),t("a",{staticClass:"ellipsis-text breakdance-browse-mode__url-to-display",attrs:{title:e.iframeUrlToDisplay,href:e.iframeUrlToDisplay,target:"_blank"}},[e._v(" "+e._s(e.iframeUrlToDisplay)+" ")])])]),t(vc.Z),t("TopBarSection",{attrs:{"border-left":"true","border-right":"true"}},[t("BreakpointsSelection",{model:{value:e.currentBreakpoint,callback:function(t){e.currentBreakpoint=t},expression:"currentBreakpoint"}})],1),t(vc.Z),t("UndoRedo"),t("TopBarSection",{attrs:{"border-left":"true"}},[t("Dropdown",{staticClass:"open-settings-toolbar-button",attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("IconButton",e._g({attrs:{active:e.isAnyBrowseModeSupportedPanelOpen,size:"18",icon:"EllipsisStrokeIcon"}},n))]}}],null,!1,2694485179)},[t(Ec.Z,[t(Tc.Z,{attrs:{dense:""},on:{click:e.toggleGlobalSettingsPanel}},[t(Dc.V9,[e._v(e._s(e.__("Global Settings")))])],1),t(Tc.Z,{attrs:{dense:""},on:{click:e.toggleSelectorsPanel}},[t(Dc.V9,[e._v(e._s(e.__("Selectors")))])],1),t(Tc.Z,{attrs:{dense:""},on:{click:e.togglePresetsPanel}},[t(Dc.V9,[e._v(e._s(e.__("Design Presets")))])],1),t(Tc.Z,{attrs:{dense:""},on:{click:e.toggleHistoryAndRevisionsPanel}},[t(Dc.V9,[e._v(e._s(e.__("History")))])],1)],1)],1)],1),t("TopBarSection",{attrs:{borderLeft:!0}},[t("BrowseModeSave")],1),t("TopBarSection",{attrs:{"border-left":"true"}},[t("IconButton",{attrs:{icon:"ArrowLeftIcon",size:"18"},on:{click:e.exitBrowseMode}})],1)],1)]},proxy:!0},{key:"body",fn:function(){return[t("ClosingConfirmations"),t("BrowseModeSidebarPanels",{attrs:{"panel-state":e.leftSidebarPanelState,position:"left"}}),t("IframeWrapper",{attrs:{"iframe-state":e.iframeState,"iframe-url":e.iframeUrl,"iframe-preview-width":e.iframePreviewWidth,"current-breakpoint":e.currentBreakpoint,"iframe-exited":!1,"iframe-id":e.iframeID,"min-width":e.iframeMinWidth},on:{iframeLoaded:e.handleIframeLoaded,previewWidthChange:e.handlePreviewWidthChange,previewWidthChangeWithAdjustmentBar:e.handlePreviewWidthChangeWithAdjustmentBar,resetPreviewWidth:e.handleResetPreviewWidth}}),t("BrowseModeSidebarPanels",{attrs:{"panel-state":e.rightSidebarPanelState,position:"right"}})]},proxy:!0}],null,!1,3365145357)}):"loading"===e.interfaceState?t("Loading"):e._e()],1)},LG=[],NG=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("AppLayoutBodyPanelArea",{attrs:{"panel-state":e.panelState,position:e.position}},["globalSettings"===e.panelState?t("GlobalSettingsPanel"):e._e(),"selectors"===e.panelState?t("SelectorsPanel"):e._e(),"history"===e.panelState?t("HistoryAndRevisionsPanel",{attrs:{"disable-revisions":!0}}):e._e(),"presets"===e.panelState?t("PresetsPanel"):e._e()],1)},FG=[];let RG=class extends s.ZP{};(0,r.gn)([(0,l.fI)()],RG.prototype,"position",void 0),(0,r.gn)([(0,l.fI)()],RG.prototype,"panelState",void 0),RG=(0,r.gn)([(0,l.wA)({components:{HistoryAndRevisionsPanel:DE,AppLayoutBodyPanelArea:NE,GlobalSettingsPanel:EP,SelectorsPanel:wk,PresetsPanel:OD}})],RG);const VG=RG,$G=VG;var WG=(0,N.Z)($G,NG,FG,!1,null,null,null);const UG=WG.exports;var zG=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("StandardButton",{staticStyle:{"margin-left":"3px","margin-right":"3px"},attrs:{loading:e.saveInProgress,minWidth:"80"},on:{click:e.save}},[e._v(" "+e._s(e.__("Save"))+" ")])},HG=[];let GG=class extends s.ZP{constructor(){super(...arguments),this.saveInProgress=!1}get unsavedChangesPresent(){return c.uiStore.unsavedChangesPresent}async save(){this.saveInProgress=!0,await(0,gP.T)(),await(0,LP.zF)(),this.saveInProgress=!1}mounted(){Ke.uq.register(je.r.CMD_S,this.save)}beforeDestroy(){Ke.uq.unbind(je.r.CMD_S)}};GG=(0,r.gn)([(0,l.wA)({components:{StandardButton:Fl}})],GG);const KG=GG,jG=KG;var qG=(0,N.Z)(jG,zG,HG,!1,null,null,null);const XG=qG.exports;let YG=class extends s.ZP{constructor(){super(...arguments),this.iframeID="breakdance-browser-iframe",this.iframeDocument=null,this.broadcastChannel=null}async beforeMount(){if("browse"===window.Breakdance.initialMode){const e=await(0,Hl.x2)();(0,Hl.Oc)(e,{returnUrl:window.Breakdance.returnUrl,browseModeOpenUrl:window.Breakdance.browseModeOpenUrl})}this.broadcastChannel=(0,TG.a)()}get interfaceState(){return c.uiStore.interfaceState}mounted(){this.warnIfUnsavedFunction=(0,Sc.$)((()=>c.globalStore.settingsHasUnsavedChangesPresent||c.globalStore.selectorsHasUnsavedChangesPresent))}beforeDestroy(){(0,Sc.e)(this.warnIfUnsavedFunction),this.broadcastChannel&&this.broadcastChannel.close()}handleIframeLoaded(e){if(!e)throw this.iframeDocument=null,"Unable to proceed – iframe element is missing";this.iframeDocument=(0,SI.RL)(e)}handlePreviewWidthChange(e){c.uiStore.changePreviewWidthMutation(e)}handlePreviewWidthChangeWithAdjustmentBar(e){c.uiStore.changePreviewWidthWithAdjustmentBar(e)}handleResetPreviewWidth(){c.uiStore.selectBaseBreakpoint()}get iframeUrl(){return c.browseModeStore.iframeUrl}get iframeState(){return c.browseModeStore.iframeState}get iframeDocumentTitleToDisplay(){return c.browseModeStore.iframeDocumentTitleToDisplay}get iframeUrlToDisplay(){return c.browseModeStore.iframeUrlToDisplay}get iframePreviewWidth(){return c.uiStore.canvasPreviewWidth}get iframeMinWidth(){return(0,Pe.GV)(c.globalStore)}get leftSidebarPanelState(){return c.uiStore.panelState.leftSidebarPanel}get rightSidebarPanelState(){return c.uiStore.panelState.rightSidebarPanel}get globalProperties(){return c.globalStore.globalProperties}get selectors(){return c.globalStore.cssSelectors}get presets(){return c.globalStore.presets}get oxySelectors(){return c.globalStore.oxySelectors}get isAnyBrowseModeSupportedPanelOpen(){return(0,Bu.O_)("globalSettings")||(0,Bu.O_)("selectors")||(0,Bu.O_)("history")}get currentBreakpoint(){return c.uiStore.currentBreakpoint}set currentBreakpoint(e){c.uiStore.changeBreakpoint(e)}exitBrowseMode(){(0,SI.os)()}toggleGlobalSettingsPanel(){(0,Bu._y)("globalSettings")}toggleSelectorsPanel(){(0,Bu._y)("selectors")}togglePresetsPanel(){(0,Bu._y)("presets")}toggleHistoryAndRevisionsPanel(){(0,Bu.oM)("history")}handleCurrentDocumentChange(){(0,SI.r1)()}onGlobalSettingsChanged(){this.iframeDocument&&(0,Jr.TK)(this.iframeDocument)}onSelectorsChanged(){this.iframeDocument&&(0,Jr.EO)(this.iframeDocument)}onPresetsChanged(){this.iframeDocument&&(0,Jr.aL)(this.iframeDocument)}onOxySelectorsChanged(){this.iframeDocument&&(0,el.V)(this.iframeDocument)}};(0,r.gn)([(0,l.RL)("iframeDocumentTitleToDisplay",{immediate:!0})],YG.prototype,"handleCurrentDocumentChange",null),(0,r.gn)([(0,l.RL)("globalProperties",{deep:!0,immediate:!0})],YG.prototype,"onGlobalSettingsChanged",null),(0,r.gn)([(0,l.RL)("selectors",{deep:!0,immediate:!0})],YG.prototype,"onSelectorsChanged",null),(0,r.gn)([(0,l.RL)("presets",{deep:!0,immediate:!0})],YG.prototype,"onPresetsChanged",null),(0,r.gn)([(0,l.RL)("oxySelectors",{deep:!0,immediate:!0})],YG.prototype,"onOxySelectorsChanged",null),YG=(0,r.gn)([(0,l.wA)({components:{UndoRedo:Qc,BrowseModeSave:XG,BrowseModeSidebarPanels:UG,BreakpointsSelection:Fc,Icon:He.Z,StandardButton:Fl,IframeWrapper:oc,TopBarSection:Kc,AppLayoutBodyPanelArea:NE,TopBar:pp,AppLayout:xO,IconButton:Xa.Z,ClosingConfirmations:DO,Dropdown:Oc.Z,Loading:Ql.Z}})],YG);const QG=YG,JG=QG;var eK=(0,N.Z)(JG,BG,LG,!1,null,null,null);const tK=eK.exports;async function nK(e){if(e.origin!==window.location.origin)return void console.warn("Message received from untrusted origin:",e.origin);const t=e.data,{id:n,type:s,payload:i}=t;if("REQUEST"===s&&n&&i?.action)try{switch(i.action){case"saveDocumentToWordPress":await(0,zl.$)();break;case"updateGlobalSettingsPerPath":Ie.n.ignore((async()=>{c.globalStore.updateGlobalSettingsPerPath(i.data)}));break;case"updateBreakpoint":Ie.n.ignore((async()=>{c.uiStore.changeBreakpoint(i.data.breakpoint)}));break;case"importSectionFromOnboarding":(0,Qa.AE)([i.data.sectionTree],"pasting",{},{mode:"replace",targetElementId:c.uiStore.activeElementId||i.data.targetElementId});break;case"onboardingActivateElement":Ie.n.ignore((async()=>{c.uiStore.activateElement(i.data.elementId)}));break;case"updateSectionPrompt":c.documentStore.unthrottledPropertyChanged({elementId:i.data.elementId,path:"meta.promptInfo.sectionDescription",meta:{snapshotLabel:"Updated prompt info for element"},value:i.data.sectionDescription}),await(0,Et.H2)(i.data.elementId);break;case"shuffleSection":(0,Nt.R4)(i.data.elementId);break;case"toggleSectionColors":(0,_t.x3)(i.data.elementId,i.data.colorGroup);break;default:throw new Error(`Unknown action: ${i.action}`)}const t={activeElementId:c.uiStore.activeElementId,document:c.documentStore.document};window.parent.postMessage({id:n,type:"RESPONSE",payload:{success:!0,payload:t}},e.origin)}catch(o){window.parent.postMessage({id:n,type:"RESPONSE",payload:{success:!1,error:o.message||"Unknown iframe error"}},e.origin)}}var sK=n(41720);let iK=class extends s.ZP{beforeMount(){window.Breakdance.singularity?((0,Aa.VH)(),"step1"===window.Breakdance.singularity?(0,sK.B)("step1"):"step2"===window.Breakdance.singularity&&(0,sK.B)("step2")):c.uiStore.setMode({mode:window.Breakdance.initialMode})}mounted(){(0,Tt.K)("Builder Loaded",{subscriptionMode:window.Breakdance.subscriptionMode,builderMode:window.Breakdance.initialMode,theme:c.uiStore.settings.theme,url:location.href,title:document.title,viewport:{width:window.innerWidth,height:window.innerHeight}}),window.Breakdance.isOnboarding&&window.addEventListener("message",nK)}get isBrowseModeEnabled(){return"browse"===c.uiStore.mode?.mode}get useCustomScrollbar(){if("breakdance"===c.configStore.builderMode)return!1;const e=(0,Ho.X)().toLowerCase();return/windows/.test(e)}get useThinScrollbar(){return"breakdance"!==c.configStore.builderMode&&!this.useCustomScrollbar}get useDarkMode(){return"oxygen"===c.configStore.builderMode||"dark"===c.uiStore.settings.theme}get isOnboardingMode(){return window.Breakdance.isOnboarding}get isFutureLayerMode(){return(0,Aa.o8)()}get classList(){return{"breakdance-dark-mode":this.useDarkMode,"futurelayer-dark-mode":this.isFutureLayerMode&&this.useDarkMode,"breakdance-preview-mode":this.isPreviewMode,"oxygen-custom-scrollbar":this.useCustomScrollbar,"oxygen-thin-scrollbar":this.useThinScrollbar,"breakdance-onboarding":this.isOnboardingMode}}get isPreviewMode(){return c.uiStore.isPreviewMode}darkModeWatcher(e){this.$vuetify.theme.dark=e}};(0,r.gn)([(0,l.RL)("useDarkMode",{immediate:!0})],iK.prototype,"darkModeWatcher",null),iK=(0,r.gn)([(0,l.wA)({components:{BrowseMode:tK,Builder:MG,Notifications:d.Z}})],iK);const oK=iK,aK=oK;var rK=(0,N.Z)(aK,o,a,!1,null,null,null);const lK=rK.exports;var cK=n(74604),dK=n(18082),uK=n(15855);s.ZP.config.productionTip=!1,s.ZP.config.ignoredElements=["lite-vimeo","lite-youtube"],s.ZP.directive("permission",cK.Z),s.ZP.use(dK.k,{getTranslations:dK.F}),s.ZP.mixin(uK.L),new s.ZP({store:c["default"],vuetify:Rl.Z,render:e=>e(lK)}).$mount("#app")},59810:(e,t,n)=>{n.d(t,{C8:()=>r,kq:()=>i});var s=n(90889);function i(e,t={}){if(e){if("function"===typeof e)return e();const n=e.some((e=>"string"===typeof e)),s=n?[e]:e;return s.map((e=>a(e,t))).every(Boolean)}return!0}function o(e,t){const n=t?.[e]?.value;if((0,s.Hk)(n)){const e=(0,s.X_)(n);if(e?.value)return e.value}return n}function a(e,t){const[n,s,i]=e,a=o(n,t);return"=="===s&&a===i||("!="===s&&a!==i||(">"===s&&a>i||("<"===s&&a<i||(">="===s&&a>=i||("<="===s&&a<=i||(!("in"!==s||!i.includes(a))||("not in"===s&&!i.includes(a)||(!("contains"!==s||!a.includes(i))||("not contains"===s&&!a.includes(i)||(!("starts with"!==s||!a.startsWith(i))||!("ends with"!==s||!a.endsWith(i))))))))))))}function r(e,t){if(e){if("function"===typeof e)return e;const n=e.some((e=>"string"===typeof e));if(n){const[n,s,i]=e;return[[n.replace("[]",`[${t}]`),s,i]]}return e.map((e=>{const[n,s,i]=e;return[n.replace("[]",`[${t}]`),s,i]}))}return e}},37156:(e,t,n)=>{n.d(t,{CD:()=>S,Gb:()=>m,Ms:()=>b,a0:()=>f,e6:()=>v,i7:()=>_,oO:()=>y});var s=n(85450),i=n(22218),o=n(3735),a=n(86042),r=n(48973);const l={"layout.gap":["layout.gap.column","layout.gap.row"]};function c(e){return""===e||null===e||void 0===e}function d(e){return"object"===typeof e&&null!==e&&"unit"in e&&"number"in e&&"style"in e}function u(e){return"object"===typeof e&&null!==e&&!d(e)}function p(e,t){return t>e?i.eV.AFTER:t===e?i.eV.CURRENT:i.eV.BEFORE}function h(e,t,n,s,i,o,a,r){for(const l in t){const d=`${e}.${l}`,p=t[l];if(u(p))for(const e in p){const t=Array.isArray(p)?`${d}[${e}]`:`${d}.${e}`,l=p[e];u(l)?h(t,l,n,s,i,o,a,r):c(l)||(s[t]={value:l,position:i,breakpoint:o,from:n,fromBreakpoint:r<a})}else c(p)||(s[d]={value:p,position:i,breakpoint:o,from:n,fromBreakpoint:r<a})}}function g(e,t,n,s,i,o,a){for(const r in e){const l=e[r];u(l)?h(r,l,t,n,s,i,o,a):c(l)||(n[r]={value:l,position:s,breakpoint:i,from:t,fromBreakpoint:a<o})}}function m(e,t,n){const i={},o=s.globalStore.oxySelectors.flatMap((e=>[e,...e.children||[]])),a=e.map((e=>{const t=o.find((t=>t.id===e));return t||null})).filter((e=>null!==e)),r=[...a].sort(((e,t)=>{const n=o.findIndex((t=>t.id===e.id)),s=o.findIndex((e=>e.id===t.id));return n-s})),c=r.findIndex((e=>e.id===t)),d=s.configStore.breakpointIds.findIndex((e=>e===n)),u=s.configStore.breakpointIds.slice(0,d+1);for(let s=0;s<r.length;s++){const e=r[s],t=p(c,s);for(let n=0;n<u.length;n++){const s=u[n],o=e.properties?.[s];o&&g(o,e.id,i,t,s,d,n)}}for(const[s,p]of Object.entries(l))p.some((e=>e in i))&&(i[s]=i[p[0]]);return i}function v(e,t){if(e)return Object.entries(e).reduce(((e,[n,s])=>(n.startsWith(t)&&(e[n.slice(t.length)]=s),e)),{})}function y(e,t){if("select"===e.type){const n=e.items?.find((function(e){return"string"===typeof e?e===t:e.value===t}));return"string"===typeof n?n:n?.label}if("unit"===e.type)return t;if("font-family"===e.type){const e=s.configStore.fonts.find((e=>e.slug===t));return e?.label||""}return"color"===e.type?(0,o.zG)(t,a.Dz.decode,(0,r.g_)((()=>t),(e=>e.type))):"spacing"===e.type||"string"===typeof t?t:"number"===typeof t?t.toString():""}function f(e){return null!==e?.value&&void 0!==e?.value&&b(e)}function _(e){return e?.position===i.eV.AFTER}function b(e){const t=e?.position===i.eV.BEFORE;return t||S(e)}function S(e){return!!e?.fromBreakpoint&&e?.position===i.eV.CURRENT}},24111:(e,t,n)=>{function s(e){const t=i(e);return{...e,children:e.children?.map((e=>{const n=e.name.includes("&")?e.name:`& ${e.name}`;return{...e,name:n.replace(/&/g,t)}}))}}function i(e){return"class"===e.type?`.${e.name}`:e.name}n.d(t,{I:()=>i,r:()=>s})},41836:(e,t,n)=>{n.d(t,{$Q:()=>v,Ap:()=>m,Ds:()=>g,u7:()=>y});var s=n(98851),i=n(3735),o=n(48973),a=n(51168),r=n(31044),l=n(65669),c=n(32521),d=n(95690),u=n(69137),p=n(17582);function h(e){u.n.transaction((()=>{const t=r.cr.variables;let n=t.length;for(let i=t.length-1;i>=0;i--)if(t[i].collection===e.collection){n=i+1;break}const s=[...t.slice(0,n),e,...t.slice(n)];r.cr.setVariables(s)}),"Add Variable")}function g(e){h(e),(0,d.O_)("variables")||v()}async function m(){const e=await(0,s.D)({action:"breakdance_load_variables",decoder:p.r6});return(0,i.zG)(e,(0,o.g_)((e=>((0,a.UE)(e.map((e=>({...e,customNotificationToShow:e.customNotificationToShow?"INTERNAL_SERVER_ERROR"===e.customNotificationToShow.type?{...e.customNotificationToShow,keepOpen:!0}:e.customNotificationToShow:void 0})))),!1)),(e=>(u.n.ignore((()=>{r.cr.setVariables(e.variables),r.cr.setVariablesCollections(e.collections),r.cr.markCurrentVariablesAsUntouched()})),!0))))}async function v(){return(0,i.zG)(await(0,s.D)({friendlyName:"Saving variables to WordPress",action:"breakdance_save_variables",dataToPost:{variables:(0,l.J)({variables:r.cr.variables,collections:r.cr.variablesCollections})},decoder:c._4}),(0,o.g_)((e=>((0,a.UE)(e),!1)),(()=>(u.n.ignore((()=>r.cr.markCurrentVariablesAsUntouched())),!0))))}async function y(){return(0,i.zG)(await(0,s.D)({action:"breakdance_retrieve_variables_revisions",decoder:p.SD}),(0,o.Vn)((()=>null)),o.i$)}},67132:(e,t,n)=>{n.d(t,{Qu:()=>a,rf:()=>r});var s=n(98851),i=n(48262),o=(n(9665),n(39664),n(65669));async function a(e){return await(0,s.D)({action:"breakdance_manage_templates_save",dataToPost:{id:e.id,title:e.title,postType:e.postType,settings:(0,o.J)(e.settings)},decoder:i.t0,resultKey:"data",friendlyName:"Save template"})}async function r(e){return await(0,s.D)({action:"breakdance_manage_templates_load_data",dataToPost:{post_type:e},decoder:i.YL,resultKey:"data",friendlyName:"Get templates data"})}},47187:(e,t,n)=>{n.d(t,{aA:()=>o});n(23128);var s=n(18446),i=n.n(s);function o(e,t,n){const s=e.find((e=>i()(e.settings,t)));return!s||confirm(`You already have a ${n} with the same settings called "${s.title}". Continue anyway?`)}},48262:(e,t,n)=>{n.d(t,{YL:()=>y,t0:()=>g});var s=n(99697),i=n(47902),o=n(32521),a=n(88683),r=n(20918);const l=o.jV([o.dt({slug:o.Z_,label:o.Z_}),o.r$({defaultPriority:o.pk})]),c=(o.IX(o.dt({text:o.Z_,value:o.pk})),o.IX(o.dt({label:o.Z_,types:o.IX(l)}))),d=o.r$({parentId:o.pk,type:o.Z_,ruleGroups:o.IX(s.ZQ),triggers:s.Gc,priority:o.pk,disabled:o.O7,fallback:o.O7,onlyShowOnce:o.O7,avoidMultiple:o.O7,limitPageLoad:o.G0([o.pk,o.lB]),limitSession:o.G0([o.pk,o.lB]),limitForever:o.G0([o.pk,o.lB])}),u=o.G0([o.i0(r.AZ),o.i0(r.lM),o.i0(r.kl),o.i0(r.Nn),o.i0(r.WZ),o.i0(r.$v),o.i0(r.hF),o.i0(r.Zr),o.i0("breakdance_popup"),o.i0("breakdance_acf_block")]),p=o.dt({id:o.pk,title:o.Z_,editInBreakdanceLink:o.Z_,postType:u,status:o.G0([o.i0("publish"),o.i0("trash"),o.S1])}),h=o.jV([p,o.dt({settings:o.G0([d,o.lB])})]),g=o.jV([p,o.dt({settings:d})]),m=o.dt({text:o.Z_,value:o.Z_,proOnly:o.G0([o.S1,o.O7])}),v=o.dt({conditions:o.IX(s.dV),dynamicFields:o.IX(i.pG),templateTypeCategories:c,popupTriggers:o.G0([o.lB,o.IX(m)])}),y=o.dt({templates:o.IX(h),templatesManagementData:v,isWooCommerceActive:o.O7,environment:a.Pt})},43981:(e,t,n)=>{n.d(t,{Z:()=>s});const s="form.breakdance-unbrowsable,\nform.breakdance-unbrowsable input,\nform.breakdance-unbrowsable select,\nform.breakdance-unbrowsable button,\na.breakdance-unbrowsable,\narea.breakdance-unbrowsable {\n cursor: not-allowed !important;\n}"}},t={};function n(s){var i=t[s];if(void 0!==i)return i.exports;var o=t[s]={id:s,loaded:!1,exports:{}};return e[s].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,(()=>{var e=[];n.O=(t,s,i,o)=>{if(!s){var a=1/0;for(d=0;d<e.length;d++){for(var[s,i,o]=e[d],r=!0,l=0;l<s.length;l++)(!1&o||a>=o)&&Object.keys(n.O).every((e=>n.O[e](s[l])))?s.splice(l--,1):(r=!1,o<a&&(a=o));if(r){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[s,i,o]}})(),(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}})(),(()=>{n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e)})(),(()=>{n.j=143})(),(()=>{var e={143:0};n.O.j=t=>0===e[t];var t=(t,s)=>{var i,o,[a,r,l]=s,c=0;if(a.some((t=>0!==e[t]))){for(i in r)n.o(r,i)&&(n.m[i]=r[i]);if(l)var d=l(n)}for(t&&t(s);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return n.O(d)},s=globalThis["webpackChunkbuilder"]=globalThis["webpackChunkbuilder"]||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})();var s=n.O(void 0,[998,64],(()=>n(23370)));s=n.O(s)})();
//# sourceMappingURL=app.dec5a514.js.map