PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.0-dev4
Elementor Website Builder – more than just a page builder v3.35.0-dev4
4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 All 455 releases
← All changes | assets/js/packages/editor-elements/editor-elements.min.js +1 -1 4.2.0-beta1 → 3.35.0-dev4 View file →
@@ -1 +1 @@
1 -!function(){"use strict";var e={2020:function(e){e.exports=window.elementorV2.editorProps},5527:function(e){e.exports=window.elementorV2.editorV1Adapters},22444:function(e){e.exports=window.elementorV2.utils},27723:function(e){e.exports=window.wp.i18n},47290:function(e){e.exports=window.elementorV2.editorStyles},94639:function(e,t,n){var o,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,d={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(d,{ELEMENT_STYLE_CHANGE_EVENT:()=>V,addModelToParent:()=>addModelToParent,createElement:()=>createElement,createElementStyle:()=>createElementStyle,createElements:()=>createElements,deleteElement:()=>deleteElement,deleteElementStyle:()=>deleteElementStyle,dropElement:()=>dropElement,duplicateElement:()=>duplicateElement,duplicateElements:()=>duplicateElements,findChildRecursive:()=>findChildRecursive,findModelInDocument:()=>findModelInDocument,generateElementId:()=>generateElementId,getAllDescendants:()=>getAllDescendants,getAnchoredAncestorId:()=>getAnchoredAncestorId,getAnchoredDescendantId:()=>getAnchoredDescendantId,getContainer:()=>getContainer,getCurrentDocumentContainer:()=>getCurrentDocumentContainer,getCurrentDocumentId:()=>getCurrentDocumentId,getElementChildrenWithFallback:()=>getElementChildren,getElementEditorSettings:()=>getElementEditorSettings,getElementInteractions:()=>getElementInteractions,getElementLabel:()=>getElementLabel,getElementSetting:()=>getElementSetting,getElementSettings:()=>getElementSettings,getElementStyles:()=>getElementStyles,getElementType:()=>getElementType,getElements:()=>getElements,getLinkInLinkRestriction:()=>getLinkInLinkRestriction,getSelectedElements:()=>getSelectedElements,getWidgetsCache:()=>getWidgetsCache,isElementAnchored:()=>isElementAnchored,moveElement:()=>moveElement,moveElements:()=>moveElements,playElementInteractions:()=>playElementInteractions,removeElements:()=>removeElements,removeModelFromParent:()=>removeModelFromParent,replaceElement:()=>replaceElement,resolveContainer:()=>resolveContainer,selectElement:()=>selectElement,shouldCreateNewLocalStyle:()=>shouldCreateNewLocalStyle,styleRerenderEvents:()=>U,updateElementEditorSettings:()=>updateElementEditorSettings,updateElementInteractions:()=>updateElementInteractions,updateElementSettings:()=>updateElementSettings,updateElementStyle:()=>updateElementStyle,useElementChildren:()=>useElementChildren,useElementEditorSettings:()=>useElementEditorSettings,useParentElement:()=>useParentElement,useSelectedElement:()=>useSelectedElement,useSelectedElementSettings:()=>useSelectedElementSettings}),e.exports=(o=d,((e,t,n,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let d of l(t))s.call(e,d)||d===n||r(e,d,{get:()=>t[d],enumerable:!(o=i(t,d))||o.enumerable});return e})(r({},"__esModule",{value:!0}),o));var a=n(5527),c=n(5527);function getContainer(e){const t=window,n=t.elementor?.getContainer?.(e);return n??null}var selectElement=e=>{try{const t=getContainer(e);(0,c.__privateRunCommand)("document/elements/select",{container:t})}catch{}};function findChildRecursive(e,t){const n=e.get("elements")??[];for(const e of n){if(t(e))return{model:e};const n=findChildRecursive(e,t);if(n)return n}return null}function getElementChildren(e,t){return(e.get("elements")??[]).filter(e=>!t||t(e)).map(e=>({model:e}))}function toElementModel({model:e}){return{id:e.get("id"),editorSettings:e.get("editor_settings")??{}}}function useElementChildren(e,t){return(0,a.__privateUseListenTo)([(0,a.v1ReadyEvent)(),(0,a.commandEndEvent)("document/elements/create"),(0,a.commandEndEvent)("document/elements/delete"),(0,a.commandEndEvent)("document/elements/update"),(0,a.commandEndEvent)("document/elements/set-settings")],()=>{const n=getContainer(e),o=n?.model;if(!o)return{};return Object.entries(t).reduce((e,[t,n])=>{const r=findChildRecursive(o,e=>e.get("elType")===t);if(!r)return e[n]=[],e;const i=getElementChildren(r.model,e=>e.get("elType")===n);return e[n]=i.map(toElementModel),e},{})},[e])}var m=n(5527);function getElementEditorSettings(e){const t=getContainer(e);return t?.model.get("editor_settings")??{}}var useElementEditorSettings=e=>(0,m.__privateUseListenTo)((0,m.windowEvent)("elementor/element/update_editor_settings"),()=>getElementEditorSettings(e),[e]),u=n(5527);function useParentElement(e){return(0,u.__privateUseListenTo)([(0,u.commandEndEvent)("document/elements/create")],()=>{if(!e)return null;const t=window,n=t?.elementor?.getContainer?.(e);return n?n.parent:null},[e])}var p=n(5527);function getWidgetsCache(){const e=window;return e?.elementor?.widgetsCache||null}function getElementType(e){if(!e)return null;const t=getWidgetsCache(),n=t?.[e];return n?.atomic_controls&&n?.atomic_props_schema?{key:e,controls:n.atomic_controls,propsSchema:n.atomic_props_schema,dependenciesPerTargetMapping:n.dependencies_per_target_mapping??{},title:n.title,styleStates:n.atomic_style_states??[],pseudoStates:n.atomic_pseudo_states??[]}:null}function getSelectedElements(){const e=window;return(e.elementor?.selection?.getElements?.()??[]).reduce((e,t)=>{const n=t.model.get("widgetType")||t.model.get("elType");return n&&e.push({id:t.model.get("id"),type:n}),e},[])}function getSelectedElement(){const e=getSelectedElements(),[t]=e,n=getElementType(t?.type);return 1===e.length&&n&&t?{element:t,elementType:n}:{element:null,elementType:null}}function useSelectedElement(){return(0,p.__privateUseListenTo)([(0,p.commandEndEvent)("document/elements/select"),(0,p.commandEndEvent)("document/elements/deselect"),(0,p.commandEndEvent)("document/elements/select-all"),(0,p.commandEndEvent)("document/elements/deselect-all")],getSelectedElement)}var E=n(5527),getElementSetting=(e,t)=>{const n=getContainer(e);return n?.settings?.get(t)??null},getElementSettings=(e,t)=>Object.fromEntries(t.map(t=>[t,getElementSetting(e,t)]));function useSelectedElementSettings(){return(0,E.__privateUseListenTo)([(0,E.commandEndEvent)("document/elements/select"),(0,E.commandEndEvent)("document/elements/deselect"),(0,E.commandEndEvent)("document/elements/select-all"),(0,E.commandEndEvent)("document/elements/deselect-all"),(0,E.commandEndEvent)("document/elements/set-settings")],()=>{const{element:e,elementType:t}=getSelectedElement();if(!e||!t)return{element:null,elementType:null,settings:null};return{element:e,elementType:t,settings:getElementSettings(e.id,Object.keys(t.propsSchema))}})}var g=n(5527);function createElement({container:e,model:t,options:n}){return(0,g.__privateRunCommandSync)("document/elements/create",{container:e,model:t,options:{edit:!1,...n}})}var f=n(5527),v=n(27723),C=n(5527);function deleteElement({container:e,options:t={}}){(0,C.__privateRunCommandSync)("document/elements/delete",{container:e,options:t})}function isConnected(e){return!!e&&(!e.view?.el||e.view.el.isConnected)}function resolveContainer(e,t){const n=e.lookup?.();if(isConnected(n))return n;const o=getContainer(t);return isConnected(o)?o:null}function getDocumentUtils(){return window.$e?.components?.get?.("document")?.utils}function findModelInDocument(e){return getDocumentUtils()?.findModelById?.(e)??null}function addModelToParent(e,t,n){return getDocumentUtils()?.addModelToParent?.(e,t,n)??!1}function removeModelFromParent(e,t){return getDocumentUtils()?.removeModelFromParent?.(e,t)??!1}var createElements=({elements:e,title:t,subtitle:n=(0,v.__)("Item added","elementor")})=>(0,f.undoable)({do:({elements:e})=>{const t=[];return e.forEach(({container:e,options:n,...o})=>{const r=e.lookup?.()??e;if(!r)throw new Error("Parent container not found");const i=createElement({container:r,...o,options:{...n,useHistory:!1}});t.push({container:i,parentContainer:r,model:i.model?.toJSON()||{},options:n,containerId:i.id,parentContainerId:r.id})}),{createdElements:t}},undo:(e,{createdElements:t})=>{[...t].reverse().forEach(({container:e,containerId:t,parentContainerId:n})=>{const o=resolveContainer(e,t);o?deleteElement({container:o,options:{useHistory:!1}}):removeModelFromParent(n,t)})},redo:(e,{createdElements:t})=>{const n=[];return t.forEach(({parentContainer:e,parentContainerId:t,model:o,options:r})=>{const i=resolveContainer(e,t);if(i){const e=createElement({container:i,model:o,options:{...r,useHistory:!1}});return void n.push({container:e,parentContainer:i,model:e.model.toJSON(),options:r,containerId:e.id,parentContainerId:i.id})}addModelToParent(t,o),n.push({container:e,parentContainer:e,model:o,options:r,containerId:o.id??"",parentContainerId:t})}),{createdElements:n}}},{title:t,subtitle:n})({elements:e}),y=n(5527);function dropElement({containerId:e,model:t,options:n}){const o=getContainer(e);if(!o)throw new Error(`Container with ID "${e}" not found`);return(0,y.__privateRunCommandSync)("preview/drop",{container:o,model:t,options:n})}var h=n(5527);function duplicateElement({element:e,options:t={}}){const n=e.view?._index??0,o=!1!==t.clone?n+1:void 0;return(0,h.__privateRunCommandSync)("document/elements/duplicate",{container:e,options:{at:o,edit:!1,...t}})}var w=n(5527),I=n(27723),duplicateElements=({elementIds:e,title:t,subtitle:n=(0,I.__)("Item duplicated","elementor"),onDuplicateElements:o,onRestoreElements:r})=>(0,w.undoable)({do:({elementIds:e})=>{o?.();const t=[];return e.forEach(e=>{const n=getContainer(e);if(!n?.parent)return;const o=duplicateElement({element:n,options:{useHistory:!1}});o.parent&&t.push({container:o,parentContainer:o.parent,model:o.model.toJSON(),at:o.view?._index,containerId:o.id,parentContainerId:o.parent.id})}),{duplicatedElements:t}},undo:(e,{duplicatedElements:t})=>{r?.(),[...t].reverse().forEach(({container:e,containerId:t,parentContainerId:n})=>{const o=resolveContainer(e,t);o?deleteElement({container:o,options:{useHistory:!1}}):removeModelFromParent(n,t)})},redo:(e,{duplicatedElements:t})=>{o?.();const n=[];return t.forEach(({parentContainer:e,parentContainerId:t,model:o,at:r})=>{const i=resolveContainer(e,t);if(i){const e=createElement({container:i,model:o,options:{useHistory:!1,clone:!1,at:r}});return void n.push({container:e,parentContainer:i,model:o,at:r,containerId:e.id,parentContainerId:i.id})}addModelToParent(t,o,{at:r}),n.push({container:e,parentContainer:e,model:o,at:r,containerId:o.id??"",parentContainerId:t})}),{duplicatedElements:n}}},{title:t,subtitle:n})({elementIds:e}),generateElementId=()=>{const e=window;return e.elementorCommon?.helpers?.getUniqueId?.()??`el-${Date.now()}-${Math.random().toString(36).substring(2,9)}`};function getCurrentDocumentContainer(){const e=window;return e.elementor?.documents?.getCurrent?.()?.container??null}function getCurrentDocumentId(){const e=window;try{return e.elementor?.documents?.getCurrentId?.()??null}catch{return null}}var _=n(22444),S=(0,_.createError)({code:"element_not_found",message:"Element not found."}),b=(0,_.createError)({code:"style_not_found",message:"Style not found."}),T=(0,_.createError)({code:"element_type_not_exists",message:"Element type does not exist."}),x=(0,_.createError)({code:"element_label_not_exists",message:"Element label does not exist."}),O=(0,_.createError)({code:"element_parent_not_found",message:"Element parent not found."}),M=(0,_.createError)({code:"element_index_not_found",message:"Element index not found."});function getElementLabel(e){e||(e=getSelectedElements()?.[0]?.id);const t=getContainer(e),n=t?.model.get("widgetType")||t?.model.get("elType");if(!n)throw new T({context:{elementId:e}});const o=getWidgetsCache()?.[n]?.title;if(!o)throw new x({context:{elementType:n}});return o}var getElementStyles=e=>{const t=getContainer(e);return t?.model.get("styles")||null};function getAllDescendants(e){return[e,...(e.children??[]).flatMap(e=>getAllDescendants(e))]}function getElements(e){const t=e?getContainer(e):getCurrentDocumentContainer();if(!t)return[];const n=[...t.model.get("elements")??[]].flatMap(e=>getElements(e.get("id")));return[t,...n]}function moveElement({element:e,targetContainer:t,options:n={}}){const o=e.lookup?.(),r=t.lookup?.();if(!o)throw new Error(`Element not found: ${e.id}`);if(!r)throw new Error(`Target container not found: ${t.id}`);const i=o.model.toJSON();deleteElement({container:o,options:{...n,useHistory:!1}});return createElement({container:r,model:i,options:{edit:!1,...n,useHistory:!1}})}var D=n(5527),P=n(27723),moveElements=({moves:e,title:t,subtitle:n=(0,P.__)("Elements moved","elementor"),onMoveElements:o,onRestoreElements:r})=>(0,D.undoable)({do:({moves:e})=>{const t=[];return o?.(),e.forEach(({element:e,targetContainer:n,options:o})=>{const r=e.lookup?.()??e,i=n.lookup?.()??n;if(!r)throw new Error("Element not found");if(!i)throw new Error("Target container not found");if(!r.parent)throw new Error("Element has no parent container");const l=r.parent,s=l.children?.indexOf(r)??-1,d=moveElement({element:r,targetContainer:i,options:{...o,useHistory:!1}});t.push({element:d,originalContainer:l,originalIndex:s,targetContainer:i,options:o,elementId:d.id,originalContainerId:l.id,targetContainerId:i.id})}),{movedElements:t}},undo:(e,{movedElements:t})=>{r?.(),[...t].reverse().forEach(({element:e,elementId:t,originalContainer:n,originalContainerId:o,originalIndex:r})=>{const i=resolveContainer(e,t),l=resolveContainer(n,o);i&&l&&moveElement({element:i,targetContainer:l,options:{useHistory:!1,at:r>=0?r:void 0}})})},redo:(e,{movedElements:t})=>{const n=[];return o?.(),t.forEach(({element:e,elementId:t,originalContainer:o,originalContainerId:r,originalIndex:i,targetContainer:l,targetContainerId:s,options:d})=>{const a=resolveContainer(e,t),c=resolveContainer(o,r),m=resolveContainer(l,s);if(!a||!c||!m)return;const u=moveElement({element:a,targetContainer:m,options:{...d,useHistory:!1}});n.push({element:u,originalContainer:c,originalIndex:i,targetContainer:m,options:d,elementId:u.id,originalContainerId:c.id,targetContainerId:m.id})}),{movedElements:n}}},{title:t,subtitle:n})({moves:e}),R=n(5527),A=n(27723),removeElements=({elementIds:e,title:t,subtitle:n=(0,A.__)("Item removed","elementor"),onRemoveElements:o,onRestoreElements:r})=>(0,R.undoable)({do:({elementIds:e})=>{const t=[];return e.forEach(e=>{const n=getContainer(e);n?.parent&&t.push({container:n,parent:n.parent,model:n.model.toJSON(),at:n.view?._index??0,containerId:n.id,parentId:n.parent.id})}),o?.(),t.forEach(({container:e})=>{deleteElement({container:e,options:{useHistory:!1}})}),{removedElements:t}},undo:(e,{removedElements:t})=>{r?.(),[...t].reverse().forEach(({parent:e,parentId:t,model:n,at:o})=>{const r=resolveContainer(e,t);r?createElement({container:r,model:n,options:{useHistory:!1,at:o}}):addModelToParent(t,n,{at:o})})},redo:(e,{removedElements:t})=>{o?.();const n=[];return t.forEach(({container:e,parent:t,model:o,at:r,containerId:i,parentId:l})=>{const s=resolveContainer(e,i),d=resolveContainer(t,l);if(s&&d)return deleteElement({container:s,options:{useHistory:!1}}),void n.push({container:s,parent:d,model:o,at:r,containerId:i,parentId:l});removeModelFromParent(l,i),n.push({container:e,parent:t,model:o,at:r,containerId:i,parentId:l})}),{removedElements:n}}},{title:t,subtitle:n})({elementIds:e}),replaceElement=({currentElementId:e,newElement:t,withHistory:n=!0})=>{const o=getContainer(e);if(!o)throw new S({context:{elementId:e}});const{container:r,index:i}=function getNewElementContainer(e,t){const{parent:n}=e;if(!n)throw new O({context:{elementId:e.id}});const o=e.view?._index??0;if(-1===o)throw new M({context:{elementId:e.id}});let r={container:n,index:o};"document"===n.id&&"widget"===t.elType&&(r=function createWrapperForWidget(e,t){const n=createElement({container:e,model:{elType:k},options:{at:t,useHistory:!1}});return{container:n,index:0}}(n,o));return r}(o,t),l=createElement({container:r,model:t,options:{at:i,useHistory:n}});return deleteElement({container:o,options:{useHistory:n}}),l};var k="e-flexbox";var H=n(5527),updateElementEditorSettings=({elementId:e,settings:t})=>{const n=getContainer(e);if(!n)throw new Error(`Element with id ${e} not found`);const o=n.model.get("editor_settings")??{};n.model.set("editor_settings",{...o,...t}),(0,H.__privateRunCommandSync)("document/save/set-is-modified",{status:!0},{internal:!0})},L=n(5527),updateElementSettings=({id:e,props:t,withHistory:n=!0})=>{const o=getContainer(e);if(!o)return;const r={container:o,settings:{...t}};n?(0,L.__privateRunCommandSync)("document/elements/settings",r):(0,L.__privateRunCommandSync)("document/elements/set-settings",r,{internal:!0})},j="a, [data-action-link]";function getLinkInLinkRestriction(e,t){const n=getAnchoredDescendantId(e);if(n)return{shouldRestrict:!0,reason:"descendant",elementId:n};const o=function checkForInlineLink(e,t){const n=getElementDOM(e);if(!n)return!1;if(n.matches(j))return!1;const o=t??getElementSetting(e,"link")?.value;if(o?.destination)return!1;return null!==n.querySelector(j)}(e,t);if(o)return{shouldRestrict:!0,reason:"descendant",elementId:e};const r=getAnchoredAncestorId(e);return r?{shouldRestrict:!0,reason:"ancestor",elementId:r}:{shouldRestrict:!1}}function getAnchoredDescendantId(e){const t=getElementDOM(e);if(!t)return null;for(const n of Array.from(t.querySelectorAll(j))){const t=findElementIdOf(n);if(t!==e)return t}return null}function getAnchoredAncestorId(e){const t=getElementDOM(e);if(!t||null===t.parentElement)return null;const n=t.parentElement.closest(j);return n?findElementIdOf(n):null}function isElementAnchored(e){const t=getElementDOM(e);return!!t&&(!!t.matches(j)||doesElementContainAnchor(t))}function doesElementContainAnchor(e){for(const t of Array.from(e.children))if(!isElementorElement(t)){if(t.matches(j))return!0;if(doesElementContainAnchor(t))return!0}return!1}function findElementIdOf(e){return e.closest("[data-id]")?.dataset.id||null}function getElementDOM(e){try{const t=getContainer(e)?.view?.el;return t||function queryPreviewDOMByElementId(e){const t=window.elementor?.getPreviewContainer?.()?.view?.el?.ownerDocument;if(!t)return null;return t.querySelector(`[data-id="${e}"]`)}(e)}catch{return null}}function isElementorElement(e){return e.hasAttribute("data-id")}var N=n(5527),V="elementor/editor-v2/editor-elements/style",U=[(0,N.commandEndEvent)("document/elements/create"),(0,N.commandEndEvent)("document/elements/duplicate"),(0,N.commandEndEvent)("document/elements/import"),(0,N.commandEndEvent)("document/elements/paste"),(0,N.windowEvent)(V)],F=n(2020),$=n(47290),W=n(2020),q=n(5527);function mutateElementStyles(e,t){const n=getContainer(e);if(!n)throw new S({context:{elementId:e}});const o=Object.keys(n.model.get("styles")??{}),r=function mutateStyles(e,t){const n=structuredClone(e.model.get("styles"))??{},o=Object.entries(t(n)).map(([e,t])=>(t.variants=function removeEmptyVariants(e){return e.variants.filter(({props:e,custom_css:t})=>Object.keys(e).length>0||t?.raw)}(t),[e,t])).filter(([,e])=>!function isStyleEmpty(e){return 0===e.variants.length}(e)),r=Object.fromEntries(o);return e.model.set("styles",r),r}(n,t);return function clearRemovedClasses(e,{oldIds:t,newIds:n}){const o=t.filter(e=>!n.includes(e)),r=structuredClone(function getClassesProps(e){return Object.entries(e.settings.toJSON()).filter(e=>{const[,t]=e;return W.classesPropTypeUtil.isValid(t)})}(e));r.forEach(([,e])=>{e.value=e.value.filter(e=>!o.includes(e))}),updateElementSettings({id:e.id,props:Object.fromEntries(r),withHistory:!1})}(n,{oldIds:o,newIds:Object.keys(r)}),function notifyChanges(){(function dispatchChangeEvent(){window.dispatchEvent(new CustomEvent(V))})(),(0,q.__privateRunCommandSync)("document/save/set-is-modified",{status:!0},{internal:!0})}(),r}function createElementStyle({styleId:e,elementId:t,classesProp:n,label:o,meta:r,props:i,custom_css:l=null,additionalVariants:s=[]}){let d=e;return mutateElementStyles(t,e=>{d??=(0,$.generateId)(`e-${t}-`,Object.keys(e));const a=[{meta:r,props:i,custom_css:l},...s];return e[d]={id:d,label:o,type:"class",variants:a},function addStyleToClassesProp(e,t,n){const o=getElementSetting(e,t),r=F.classesPropTypeUtil.create(e=>[...e??[],n],{base:o});updateElementSettings({id:e,props:{[t]:r},withHistory:!1})}(t,n,d),e}),d}function shouldCreateNewLocalStyle(e){return!e?.styleId&&!e?.provider}function deleteElementStyle(e,t){mutateElementStyles(e,e=>(delete e[t],e))}var J=n(2020),B=n(47290);function updateElementStyle(e){mutateElementStyles(e.elementId,t=>{const n=t[e.styleId];if(!n)throw new b({context:{styleId:e.styleId}});const o=(0,B.getVariantByMeta)(n,e.meta),r=("custom_css"in e?e.custom_css:o?.custom_css)??null;return o?(o.props=(0,J.mergeProps)(o.props,e.props),o.custom_css=r?.raw?r:null):n.variants.push({meta:e.meta,props:e.props,custom_css:r}),t})}function getElementInteractions(e){const t=getContainer(e),n=t?.model?.get("interactions");return"string"==typeof n?JSON.parse(n):n}var G=n(5527),updateElementInteractions=({elementId:e,interactions:t})=>{const n=getContainer(e);if(!n)throw new Error(`Element with id ${e} not found`);n.model.set("interactions",t),window.dispatchEvent(new CustomEvent("elementor/element/update_interactions")),(0,G.__privateRunCommandSync)("document/save/set-is-modified",{status:!0},{internal:!0})},playElementInteractions=(e,t)=>{window.top?.dispatchEvent(new CustomEvent("atomic/play_interactions",{detail:{elementId:e,interactionId:t}}))}}},t={};var n=function __webpack_require__(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,__webpack_require__),r.exports}(94639);(window.elementorV2=window.elementorV2||{}).editorElements=n}(),window.elementorV2.editorElements?.init?.();
1 +!function(){"use strict";var e={d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ELEMENT_STYLE_CHANGE_EVENT:function(){return ee},createElement:function(){return g},createElementStyle:function(){return ie},createElements:function(){return y},deleteElement:function(){return I},deleteElementStyle:function(){return le},dropElement:function(){return _},duplicateElement:function(){return h},duplicateElements:function(){return S},generateElementId:function(){return C},getAllDescendants:function(){return V},getAnchoredAncestorId:function(){return z},getAnchoredDescendantId:function(){return Y},getContainer:function(){return o},getCurrentDocumentContainer:function(){return b},getCurrentDocumentId:function(){return T},getElementEditorSettings:function(){return s},getElementInteractions:function(){return ue},getElementLabel:function(){return L},getElementSetting:function(){return d},getElementSettings:function(){return c},getElementStyles:function(){return N},getElementType:function(){return p},getElements:function(){return $},getLinkInLinkRestriction:function(){return W},getSelectedElements:function(){return E},getWidgetsCache:function(){return f},isElementAnchored:function(){return F},moveElement:function(){return A},moveElements:function(){return U},playElementInteractions:function(){return fe},removeElements:function(){return k},replaceElement:function(){return J},selectElement:function(){return r},shouldCreateNewLocalStyle:function(){return se},styleRerenderEvents:function(){return te},updateElementEditorSettings:function(){return q},updateElementInteractions:function(){return ae},updateElementSettings:function(){return B},updateElementStyle:function(){return de},useElementChildren:function(){return i},useElementEditorSettings:function(){return l},useElementInteractions:function(){return me},useElementSetting:function(){return u},useElementSettings:function(){return m},useParentElement:function(){return a},useSelectedElement:function(){return w}});var n=window.elementorV2.editorV1Adapters;function o(e){const t=window,n=t.elementor?.getContainer?.(e);return n??null}const r=e=>{try{const t=o(e);(0,n.__privateRunCommand)("document/elements/select",{container:t})}catch{}};function i(e,t){return(0,n.__privateUseListenTo)([(0,n.v1ReadyEvent)(),(0,n.commandEndEvent)("document/elements/create"),(0,n.commandEndEvent)("document/elements/delete"),(0,n.commandEndEvent)("document/elements/update"),(0,n.commandEndEvent)("document/elements/set-settings")],()=>{const n=o(e);return Object.entries(t).reduce((e,[t,o])=>{const r=n?.children?.findRecursive?.(({model:e})=>e.get("elType")===t),i=r?.children??[];return e[o]=i.filter(({model:e})=>e.get("elType")===o).map(({id:e})=>({id:e})),e},{})},[e])}function s(e){const t=o(e);return t?.model.get("editor_settings")??{}}const l=e=>(0,n.__privateUseListenTo)((0,n.windowEvent)("elementor/element/update_editor_settings"),()=>s(e),[e]),d=(e,t)=>{const n=o(e);return n?.settings?.get(t)??null},c=(e,t)=>Object.fromEntries(t.map(t=>[t,d(e,t)])),u=(e,t)=>(0,n.__privateUseListenTo)((0,n.commandEndEvent)("document/elements/set-settings"),()=>d(e,t),[e,t]),m=(e,t)=>(0,n.__privateUseListenTo)((0,n.commandEndEvent)("document/elements/set-settings"),()=>t.reduce((t,n)=>{const o=d(e,n);return null!==o&&(t[n]=o),t},{}),[e,t.join(",")]);function a(e){return(0,n.__privateUseListenTo)([(0,n.commandEndEvent)("document/elements/create")],()=>{if(!e)return null;const t=window,n=t?.elementor?.getContainer?.(e);return n?n.parent:null},[e])}function f(){const e=window;return e?.elementor?.widgetsCache||null}function p(e){if(!e)return null;const t=f(),n=t?.[e];return n?.atomic_controls&&n?.atomic_props_schema?{key:e,controls:n.atomic_controls,propsSchema:n.atomic_props_schema,dependenciesPerTargetMapping:n.dependencies_per_target_mapping??{},title:n.title,styleStates:n.atomic_style_states??[]}:null}function E(){const e=window;return(e.elementor?.selection?.getElements?.()??[]).reduce((e,t)=>{const n=t.model.get("widgetType")||t.model.get("elType");return n&&e.push({id:t.model.get("id"),type:n}),e},[])}function w(){const e=(0,n.__privateUseListenTo)([(0,n.commandEndEvent)("document/elements/select"),(0,n.commandEndEvent)("document/elements/deselect"),(0,n.commandEndEvent)("document/elements/select-all"),(0,n.commandEndEvent)("document/elements/deselect-all")],E),[t]=e,o=p(t?.type);return 1===e.length&&o?{element:t,elementType:o}:{element:null,elementType:null}}function g({containerId:e,model:t,options:r}){const i=o(e);if(!i)throw new Error(`Container with ID "${e}" not found`);return(0,n.__privateRunCommandSync)("document/elements/create",{container:i,model:t,options:{edit:!1,...r}})}var v=window.wp.i18n;function I({elementId:e,options:t={}}){const r=o(e);if(!r)throw new Error(`Element with ID "${e}" not found`);return(0,n.__privateRunCommand)("document/elements/delete",{container:r,options:t})}const y=({elements:e,title:t,subtitle:r=(0,v.__)("Item added","elementor")})=>(0,n.undoable)({do:({elements:e})=>{const t=[];return e.forEach(e=>{const{options:n,...o}=e,r=g({...o,options:{...n,useHistory:!1}}),i=r.id;t.push({elementId:i,model:r.model?.toJSON()||{},createParams:{...e}})}),{createdElements:t}},undo:(e,{createdElements:t})=>{[...t].reverse().forEach(({elementId:e})=>{I({elementId:e,options:{useHistory:!1}})})},redo:(e,{createdElements:t})=>{const n=[];return t.forEach(({createParams:e,model:t})=>{const r=g({containerId:e.containerId,model:t,options:{...e.options,useHistory:!1}}).id,i=o(r);i&&n.push({elementId:r,model:i.model.toJSON(),createParams:e})}),{createdElements:n}}},{title:t,subtitle:r})({elements:e});function _({containerId:e,model:t,options:r}){const i=o(e);if(!i)throw new Error(`Container with ID "${e}" not found`);return(0,n.__privateRunCommandSync)("preview/drop",{container:i,model:t,options:r})}function h({elementId:e,options:t={}}){const r=o(e);if(!r)throw new Error(`Element with ID "${e}" not found`);const i=r.view?._index??0,s=!1!==t.clone?i+1:void 0;return(0,n.__privateRunCommandSync)("document/elements/duplicate",{container:r,options:{at:s,edit:!1,...t}})}const S=({elementIds:e,title:t,subtitle:r=(0,v.__)("Item duplicated","elementor"),onDuplicateElements:i,onRestoreElements:s})=>(0,n.undoable)({do:({elementIds:e})=>(i?.(),{duplicatedElements:e.reduce((e,t)=>{const n=o(t);if(n?.parent){const n=h({elementId:t,options:{useHistory:!1}});e.push({id:n.id,model:n.model.toJSON(),originalElementId:t,modelToRestore:n.model.toJSON(),parentContainerId:n.parent?.id,at:n.view?._index})}return e},[])}),undo:(e,{duplicatedElements:t})=>{s?.(),[...t].reverse().forEach(({id:e})=>{I({elementId:e,options:{useHistory:!1}})})},redo:(e,{duplicatedElements:t})=>(i?.(),{duplicatedElements:t.reduce((e,t)=>{if(t.modelToRestore&&t.parentContainerId){const n=g({containerId:t.parentContainerId,model:t.modelToRestore,options:{useHistory:!1,clone:!1,at:t.at}});e.push({id:n.id,model:n.model.toJSON(),originalElementId:t.originalElementId,modelToRestore:t.modelToRestore,parentContainerId:t.parentContainerId,at:t.at})}return e},[])})},{title:t,subtitle:r})({elementIds:e}),C=()=>{const e=window;return e.elementorCommon?.helpers?.getUniqueId?.()??`el-${Date.now()}-${Math.random().toString(36).substring(2,9)}`};function b(){const e=window;return e.elementor?.documents?.getCurrent?.()?.container??null}function T(){const e=window;return e.elementor?.documents?.getCurrentId?.()??null}var R=window.elementorV2.utils;const x=(0,R.createError)({code:"element_not_found",message:"Element not found."}),O=(0,R.createError)({code:"style_not_found",message:"Style not found."}),H=(0,R.createError)({code:"element_type_not_exists",message:"Element type does not exist."}),P=(0,R.createError)({code:"element_label_not_exists",message:"Element label does not exist."}),j=(0,R.createError)({code:"element_parent_not_found",message:"Element parent not found."}),D=(0,R.createError)({code:"element_index_not_found",message:"Element index not found."});function L(e){e||(e=E()?.[0]?.id);const t=o(e),n=t?.model.get("widgetType")||t?.model.get("elType");if(!n)throw new H({context:{elementId:e}});const r=f()?.[n]?.title;if(!r)throw new P({context:{elementType:n}});return r}const N=e=>{const t=o(e);return t?.model.get("styles")||null};function V(e){return[e,...(e.children??[]).flatMap(e=>V(e))]}function $(e){const t=e?o(e):b();if(!t)return[];const n=[...t.model.get("elements")??[]].flatMap(e=>$(e.get("id")));return[t,...n]}function A({elementId:e,targetContainerId:t,options:n={}}){const r=o(e),i=o(t);if(!r)throw new Error(`Element with ID "${e}" not found`);if(!i)throw new Error(`Target container with ID "${t}" not found`);const s=r.model.toJSON();return I({elementId:e,options:{...n,useHistory:!1}}),g({containerId:t,model:s,options:{edit:!1,...n,useHistory:!1}})}const U=({moves:e,title:t,subtitle:r=(0,v.__)("Elements moved","elementor"),onMoveElements:i,onRestoreElements:s})=>(0,n.undoable)({do:({moves:e})=>{const t=[];return i?.(),e.forEach(e=>{const{elementId:n}=e,r=o(n);if(!r)throw new Error(`Element with ID "${n}" not found`);const i={elementId:n,originalContainerId:r.parent?.id||"",originalIndex:r.parent?.children?.indexOf(r)??-1},s=A({...e,options:{...e.options,useHistory:!1}});t.push({elementId:n,originalPosition:i,move:e,element:s})}),{movedElements:t}},undo:(e,{movedElements:t})=>{s?.(),[...t].reverse().forEach(({originalPosition:e})=>{const{elementId:t,originalContainerId:n,originalIndex:o}=e;A({elementId:t,targetContainerId:n,options:{useHistory:!1,at:o>=0?o:void 0}})})},redo:(e,{movedElements:t})=>{const n=[];return i?.(),t.forEach(({move:e,originalPosition:t})=>{const o=A({...e,options:{...e.options,useHistory:!1}});n.push({elementId:e.elementId,originalPosition:t,move:e,element:o})}),{movedElements:n}}},{title:t,subtitle:r})({moves:e}),k=({elementIds:e,title:t,subtitle:r=(0,v.__)("Item removed","elementor"),onRemoveElements:i,onRestoreElements:s})=>(0,n.undoable)({do:({elementIds:e})=>{const t=[];return e.forEach(e=>{const n=o(e);if(n){const o=n.model.toJSON(),r=n.parent,i=n.view?._index??0;t.push({elementId:e,model:o,parent:r??null,at:i})}}),i?.(),e.forEach(e=>{I({elementId:e,options:{useHistory:!1}})}),{elementIds:e,removedElements:t}},undo:(e,{removedElements:t})=>{s?.(),[...t].reverse().forEach(({model:e,parent:t,at:n})=>{t&&e&&g({containerId:t.id,model:e,options:{useHistory:!1,at:n}})})},redo:(e,{elementIds:t,removedElements:n})=>(i?.(),t.forEach(e=>{I({elementId:e,options:{useHistory:!1}})}),{elementIds:t,removedElements:n})},{title:t,subtitle:r})({elementIds:e}),J=async({currentElement:e,newElement:t,withHistory:n=!0})=>{const{containerId:r,index:i}=function(e,t){const n=o(e.id);if(!n)throw new x({context:{elementId:e.id}});const{parent:r}=n;if(!r)throw new j({context:{elementId:e.id}});const i=n.view?._index??0;if(-1===i)throw new D({context:{elementId:e.id}});let s={containerId:r.id,index:i};return"document"===r.id&&"widget"===t.elType&&(s=function(e,t){return{containerId:g({containerId:e,model:{elType:M},options:{at:t,useHistory:!1}}).id,index:0}}(r.id,i)),s}(e,t),s=g({containerId:r,model:t,options:{at:i,useHistory:n}});return await I({elementId:e.id,options:{useHistory:n}}),s},M="e-flexbox",q=({elementId:e,settings:t})=>{const r=o(e);if(!r)throw new Error(`Element with id ${e} not found`);const i=r.model.get("editor_settings")??{};r.model.set("editor_settings",{...i,...t}),(0,n.__privateRunCommandSync)("document/save/set-is-modified",{status:true},{internal:!0})},B=({id:e,props:t,withHistory:r=!0})=>{const i={container:o(e),settings:{...t}};r?(0,n.__privateRunCommandSync)("document/elements/settings",i):(0,n.__privateRunCommandSync)("document/elements/set-settings",i,{internal:!0})},G="a, [data-action-link]";function W(e,t){const n=Y(e);if(n)return{shouldRestrict:!0,reason:"descendant",elementId:n};const o=function(e,t){const n=X(e);if(!n)return!1;if(n.matches(G))return!1;const o=t??d(e,"link")?.value;return!o?.destination&&null!==n.querySelector(G)}(e,t);if(o)return{shouldRestrict:!0,reason:"descendant",elementId:e};const r=z(e);return r?{shouldRestrict:!0,reason:"ancestor",elementId:r}:{shouldRestrict:!1}}function Y(e){const t=X(e);if(!t)return null;for(const n of Array.from(t.querySelectorAll(G))){const t=Q(n);if(t!==e)return t}return null}function z(e){const t=X(e);if(!t||null===t.parentElement)return null;const n=t.parentElement.closest(G);return n?Q(n):null}function F(e){const t=X(e);return!!t&&(!!t.matches(G)||K(t))}function K(e){for(const t of Array.from(e.children))if(!Z(t)){if(t.matches(G))return!0;if(K(t))return!0}return!1}function Q(e){return e.closest("[data-id]")?.dataset.id||null}function X(e){try{return o(e)?.view?.el||null}catch{return null}}function Z(e){return e.hasAttribute("data-id")}const ee="elementor/editor-v2/editor-elements/style",te=[(0,n.commandEndEvent)("document/elements/create"),(0,n.commandEndEvent)("document/elements/duplicate"),(0,n.commandEndEvent)("document/elements/import"),(0,n.commandEndEvent)("document/elements/paste"),(0,n.windowEvent)(ee)];var ne=window.elementorV2.editorProps,oe=window.elementorV2.editorStyles;function re(e,t){const r=o(e);if(!r)throw new x({context:{elementId:e}});const i=Object.keys(r.model.get("styles")??{}),s=function(e,t){const n=structuredClone(e.model.get("styles"))??{},o=Object.entries(t(n)).map(([e,t])=>(t.variants=function(e){return e.variants.filter(({props:e,custom_css:t})=>Object.keys(e).length>0||t?.raw)}(t),[e,t])).filter(([,e])=>!function(e){return 0===e.variants.length}(e)),r=Object.fromEntries(o);return e.model.set("styles",r),r}(r,t);return function(e,{oldIds:t,newIds:n}){const o=t.filter(e=>!n.includes(e)),r=structuredClone(function(e){return Object.entries(e.settings.toJSON()).filter(e=>{const[,t]=e;return ne.classesPropTypeUtil.isValid(t)})}(e));r.forEach(([,e])=>{e.value=e.value.filter(e=>!o.includes(e))}),B({id:e.id,props:Object.fromEntries(r),withHistory:!1})}(r,{oldIds:i,newIds:Object.keys(s)}),window.dispatchEvent(new CustomEvent(ee)),(0,n.__privateRunCommandSync)("document/save/set-is-modified",{status:!0},{internal:!0}),s}function ie({styleId:e,elementId:t,classesProp:n,label:o,meta:r,props:i,custom_css:s=null,additionalVariants:l=[]}){let c=e;return re(t,e=>{c??=(0,oe.generateId)(`e-${t}-`,Object.keys(e));const u=[{meta:r,props:i,custom_css:s},...l];return e[c]={id:c,label:o,type:"class",variants:u},function(e,t,n){const o=d(e,t),r=ne.classesPropTypeUtil.create(e=>[...e??[],n],{base:o});B({id:e,props:{[t]:r},withHistory:!1})}(t,n,c),e}),c}function se(e){return!e?.styleId&&!e?.provider}function le(e,t){re(e,e=>(delete e[t],e))}function de(e){re(e.elementId,t=>{const n=t[e.styleId];if(!n)throw new O({context:{styleId:e.styleId}});const o=(0,oe.getVariantByMeta)(n,e.meta),r=("custom_css"in e?e.custom_css:o?.custom_css)??null;return o?(o.props=(0,ne.mergeProps)(o.props,e.props),o.custom_css=r?.raw?r:null):n.variants.push({meta:e.meta,props:e.props,custom_css:r}),t})}var ce=window.React;function ue(e){const t=o(e),n=t?.model?.get("interactions");return"string"==typeof n?JSON.parse(n):n}const me=e=>{const[t,o]=(0,ce.useState)(()=>ue(e)??{version:1,items:[]});return(0,n.__privateUseListenTo)((0,n.windowEvent)("elementor/element/update_interactions"),()=>{const t=ue(e);o(t??{version:1,items:[]})},[e]),t},ae=({elementId:e,interactions:t})=>{const r=o(e);if(!r)throw new Error(`Element with id ${e} not found`);r.model.set("interactions",t),window.dispatchEvent(new CustomEvent("elementor/element/update_interactions")),(0,n.__privateRunCommandSync)("document/save/set-is-modified",{status:true},{internal:!0})},fe=(e,t)=>{window.top?.dispatchEvent(new CustomEvent("atomic/play_interactions",{detail:{elementId:e,interactionId:t}}))};(window.elementorV2=window.elementorV2||{}).editorElements=t}(),window.elementorV2.editorElements?.init?.();