/*! For license information please see editor-canvas.min.js.LICENSE.txt */ !function(){"use strict";var e,t,n={1020:function(e,t,n){var r=n(7557),o=Symbol.for("react.element"),i=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,l={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!a.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:l,_owner:s.current}}t.jsx=l,t.jsxs=l},3617:function(e){e.exports=window.ReactDOM},4848:function(e,t,n){e.exports=n(1020)},5338:function(e,t,n){var r=n(3617);t.H=r.createRoot,r.hydrateRoot},7557:function(e){e.exports=window.React}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(function(e){s[e]=function(){return n[e]}});return s.default=function(){return n},o.d(i,s),i},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};o.r(i),o.d(i,{BREAKPOINTS_SCHEMA_FULL_URI:function(){return C},BREAKPOINTS_SCHEMA_URI:function(){return S},DOCUMENT_STRUCTURE_URI:function(){return os},GLOBAL_STYLES_IMPORTED_EVENT:function(){return ia},STYLE_SCHEMA_FULL_URI:function(){return E},STYLE_SCHEMA_URI:function(){return w},UnknownStyleStateError:function(){return Ln},UnknownStyleTypeError:function(){return Nn},WIDGET_SCHEMA_FULL_URI:function(){return b},WIDGET_SCHEMA_URI:function(){return v},canBeNestedTemplated:function(){return Ei},createNestedTemplatedElementType:function(){return Ti},createNestedTemplatedElementView:function(){return xi},createPropsResolver:function(){return kn},createTemplatedElementView:function(){return wi},createTransformer:function(){return fr},createTransformersRegistry:function(){return On},doAfterRender:function(){return sa},endDragElementFromPanel:function(){return Qs},init:function(){return Js},isAtomicWidget:function(){return Hs},registerElementType:function(){return Qi},registerModelExtensions:function(){return Zi},settingsTransformersRegistry:function(){return pr},startDragElementFromPanel:function(){return ea},styleTransformersRegistry:function(){return Pn},stylesInheritanceTransformersRegistry:function(){return In}});var s=window.elementorV2.editorV1Adapters,a=window.elementorV2.editorElements,l=window.elementorV2.editorMcp,c=window.elementorV2.editorProps,u=window.elementorV2.editorStyles;function d(e){const t=e?.default_children;return Array.isArray(t)?t.filter(e=>e?.meta?.required??!1):[]}function m(e){return"object"==typeof e&&null!==e&&Object.keys(e).length>0}function p(e){return!!e&&!1!==e.meta?.llm_support&&"Component"!==e.title&&(!!e.atomic_props_schema||m(e.controls))}function f(e){return e?.atomic_props_schema?"v4":"v3"}function h(){const e=(0,a.getWidgetsCache)()??{};return Object.keys(e).filter(t=>p(e[t])).sort().map(t=>{const n=e[t],r="string"==typeof n?.meta?.description?n.meta.description:void 0;return{type:t,version:f(n),...r&&{description:r}}})}const g=new Set(["section","tab","tabs"]),y="editor-canvas",v="elementor://widgets/schema/{widgetType}",b=`${y}_${v}`,w="elementor://styles/schema/{category}",E=`${y}_${w}`,T="elementor://styles/best-practices",S="elementor://breakpoints/list",C=`${y}_${S}`;var x=window.elementorV2.editor,_=o(7557),R=o.t(_,2),A=window.elementorV2.editorDocuments,k=window.elementorV2.editorStylesRepository,O=window.elementorV2.utils;const I=()=>((0,_.useEffect)(()=>{const e=P();return()=>{e()}},[]),null),P=()=>k.stylesRepository.subscribe((e,t)=>{e&&t&&Object.keys(t).forEach(n=>{if(!e[n]||(0,O.hash)(e[n])===(0,O.hash)(t[n]))return;const r=e[n],o=t[n];r.label!==o.label&&N(r.label,o.label)})}),N=(e,t)=>{Object.values((0,A.getV1DocumentsManager)().documents).forEach(n=>{const r=n.container;r.view?.el?.querySelectorAll(`.elementor .${e}`).forEach(n=>{n.classList.replace(e,t)})})};var L=window.elementorV2.ui;function $(){return"undefined"!=typeof window}function M(e){return V(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(V(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function V(e){return!!$()&&(e instanceof Node||e instanceof D(e).Node)}function U(e){return!!$()&&(e instanceof Element||e instanceof D(e).Element)}function z(e){return!!$()&&(e instanceof HTMLElement||e instanceof D(e).HTMLElement)}function F(e){return!(!$()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof D(e).ShadowRoot)}function W(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Q(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function B(e){return/^(table|td|th)$/.test(M(e))}function H(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const G=/transform|translate|scale|rotate|perspective|filter/,q=/paint|layout|strict|content/,Y=e=>!!e&&"none"!==e;let X;function K(e){const t=U(e)?Q(e):e;return Y(t.transform)||Y(t.translate)||Y(t.scale)||Y(t.rotate)||Y(t.perspective)||!J()&&(Y(t.backdropFilter)||Y(t.filter))||G.test(t.willChange||"")||q.test(t.contain||"")}function J(){return null==X&&(X="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),X}function Z(e){return/^(html|body|#document)$/.test(M(e))}function Q(e){return D(e).getComputedStyle(e)}function ee(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function te(e){if("html"===M(e))return e;const t=e.assignedSlot||e.parentNode||F(e)&&e.host||j(e);return F(t)?t.host:t}function ne(e){const t=te(e);return Z(t)?e.ownerDocument?e.ownerDocument.body:e.body:z(t)&&W(t)?t:ne(t)}function re(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ne(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=D(o);if(i){const e=oe(s);return t.concat(s,s.visualViewport||[],W(o)?o:[],e&&n?re(e):[])}return t.concat(o,re(o,[],n))}function oe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var ie=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),se="undefined"==typeof Element,ae=se?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,le=!se&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},ce=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):ce(e.parentNode))},ue=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!ce(i,!1))if("SLOT"===i.tagName){var s=i.assignedElements(),a=s.length?s:i.children,l=ue(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{ae.call(i,ie)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var c=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),u=!ce(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(c&&u){var d=ue(!0===c?i.children:c.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:i,candidates:d})}else o.unshift.apply(o,i.children)}}return r},de=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},me=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!de(e)?0:e.tabIndex},pe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},fe=function(e){return"INPUT"===e.tagName},he=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},ge=function(e,t){return!(t.disabled||function(e){return fe(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=ae.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ae.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return he(e)}else{if("function"==typeof r){for(var i=e;e;){var s=e.parentElement,a=le(e);if(s&&!s.shadowRoot&&!0===r(s))return he(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=i}if(function(e){var t,n,r,o,i=e&&le(e),s=null===(t=i)||void 0===t?void 0:t.host,a=!1;if(i&&i!==e)for(a=!!(null!==(n=s)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(s)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!a&&s;){var l,c,u;a=!(null===(c=s=null===(l=i=le(s))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n=0)},be=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,s=function(e,t){var n=me(e);return n<0&&t&&!de(e)?0:n}(i,o),a=o?be(e.candidates):i;0===s?o?t.push.apply(t,a):t.push(i):n.push({documentOrder:r,tabIndex:s,item:e,isScope:o,content:a})}),n.sort(pe).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},we=function(e,t){var n;return n=(t=t||{}).getShadowRoot?ue([e],t.includeContainer,{filter:ye.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ve}):function(e,t,n){if(ce(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ie));return t&&ae.call(e,ie)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,ye.bind(null,t)),be(n)};function Ee(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&F(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Te(e){return(null==e?void 0:e.ownerDocument)||document}function Se(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var Ce="undefined"!=typeof document?_.useLayoutEffect:function(){};function xe(e){const t=_.useRef(e);return Ce(()=>{t.current=e}),t}const _e={...R}.useInsertionEffect||(e=>e());function Re(e){const t=_.useRef(()=>{});return _e(()=>{t.current=e}),_.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ke(e,t){const n=we(e,Ae()),r=n.length;if(0===r)return;const o=function(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}(Te(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function Oe(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ee(n,r)}function Ie(e){we(e,Ae()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Pe(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}var Ne=o(4848),Le=o(3617);const $e=Math.min,Me=Math.max,De=Math.round,je=Math.floor,Ve=e=>({x:e,y:e}),Ue={left:"right",right:"left",bottom:"top",top:"bottom"};function ze(e,t){return"function"==typeof e?e(t):e}function Fe(e){return e.split("-")[0]}function We(e){return e.split("-")[1]}function Be(e){return"y"===e?"height":"width"}function He(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Ge(e){return"x"===He(e)?"y":"x"}function qe(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ye=["left","right"],Xe=["right","left"],Ke=["top","bottom"],Je=["bottom","top"];function Ze(e){const t=Fe(e);return Ue[t]+e.slice(t.length)}function Qe(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function et(e,t,n){let{reference:r,floating:o}=e;const i=He(t),s=Ge(t),a=Be(s),l=Fe(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(We(t)){case"start":p[s]-=m*(n&&c?-1:1);break;case"end":p[s]+=m*(n&&c?-1:1)}return p}async function tt(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=ze(t,e),f=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),h=a[m?"floating"===d?"reference":"floating":d],g=Qe(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=Qe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-w.top+f.top)/b.y,bottom:(w.bottom-g.bottom+f.bottom)/b.y,left:(g.left-w.left+f.left)/b.x,right:(w.right-g.right+f.right)/b.x}}const nt=new Set(["left","top"]);function rt(e){const t=Q(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=z(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=De(n)!==i||De(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function ot(e){return U(e)?e:e.contextElement}function it(e){const t=ot(e);if(!z(t))return Ve(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=rt(t);let s=(i?De(n.width):n.width)/r,a=(i?De(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const st=Ve(0);function at(e){const t=D(e);return J()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:st}function lt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ot(e);let s=Ve(1);t&&(r?U(r)&&(s=it(r)):s=it(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==D(e))&&t}(i,n,r)?at(i):Ve(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=D(i),t=r&&U(r)?D(r):r;let n=e,o=oe(n);for(;o&&r&&t!==n;){const e=it(o),t=o.getBoundingClientRect(),r=Q(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=D(o),o=oe(n)}}return Qe({width:u,height:d,x:l,y:c})}function ct(e,t){const n=ee(e).scrollLeft;return t?t.left+n:lt(j(e)).left+n}function ut(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ct(e,n),y:n.top+t.scrollTop}}function dt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=D(e),r=j(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=J();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=ct(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=j(e),n=ee(e),r=e.ownerDocument.body,o=Me(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Me(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ct(e);const a=-n.scrollTop;return"rtl"===Q(r).direction&&(s+=Me(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(j(e));else if(U(t))r=function(e,t){const n=lt(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=z(e)?it(e):Ve(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=at(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Qe(r)}function mt(e,t){const n=te(e);return!(n===t||!U(n)||Z(n))&&("fixed"===Q(n).position||mt(n,t))}function pt(e,t,n){const r=z(t),o=j(t),i="fixed"===n,s=lt(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ve(0);function c(){l.x=ct(o)}if(r||!r&&!i)if(("body"!==M(t)||W(o))&&(a=ee(t)),r){const e=lt(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?Ve(0):ut(o,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function ft(e){return"static"===Q(e).position}function ht(e,t){if(!z(e)||"fixed"===Q(e).position)return null;if(t)return t(e);let n=e.offsetParent;return j(e)===n&&(n=n.ownerDocument.body),n}function gt(e,t){const n=D(e);if(H(e))return n;if(!z(e)){let t=te(e);for(;t&&!Z(t);){if(U(t)&&!ft(t))return t;t=te(t)}return n}let r=ht(e,t);for(;r&&B(r)&&ft(r);)r=ht(r,t);return r&&Z(r)&&ft(r)&&!K(r)?n:r||function(e){let t=te(e);for(;z(t)&&!Z(t);){if(K(t))return t;if(H(t))return null;t=te(t)}return null}(e)||n}const yt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=j(r),a=!!t&&H(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Ve(1);const u=Ve(0),d=z(r);if((d||!d&&!i)&&(("body"!==M(r)||W(s))&&(l=ee(r)),d)){const e=lt(r);c=it(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const m=!s||d||i?Ve(0):ut(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+m.x,y:n.y*c.y-l.scrollTop*c.y+u.y+m.y}},getDocumentElement:j,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?H(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=re(e,[],!1).filter(e=>U(e)&&"body"!==M(e)),o=null;const i="fixed"===Q(e).position;let s=i?te(e):e;for(;U(s)&&!Z(s);){const t=Q(s),n=K(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||W(s)&&!n&&mt(e,s))?r=r.filter(e=>e!==s):o=t,s=te(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=dt(t,i[0],o);let a=s.top,l=s.right,c=s.bottom,u=s.left;for(let e=1;e{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&a?function(e,t){let n,r=null;const o=j(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:m,height:p}=c;if(a||t(),!m||!p)return;const f={rootMargin:-je(d)+"px "+-je(o.clientWidth-(u+m))+"px "+-je(o.clientHeight-(d+p))+"px "+-je(u)+"px",threshold:Me(0,$e(1,l))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==r||vt(c,e.getBoundingClientRect())||s(),h=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let m,p=-1,f=null;s&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),c&&!l&&f.observe(c),t&&f.observe(t));let h=l?lt(e):null;return l&&function t(){const r=lt(e);h&&!vt(h,r)&&n(),h=r,m=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const wt=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:h=!0,...g}=ze(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=Fe(o),v=He(a),b=Fe(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),E=m||(b||!h?[Ze(a)]:function(e){const t=Ze(e);return[qe(e),t,qe(t)]}(a)),T="none"!==f;!m&&T&&E.push(...function(e,t,n,r){const o=We(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Xe:Ye:t?Ye:Xe;case"left":case"right":return t?Ke:Je;default:return[]}}(Fe(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(qe)))),i}(a,h,f,w));const S=[a,...E],C=await l.detectOverflow(t,g),x=[];let _=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&x.push(C[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=We(e),o=Ge(e),i=Be(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ze(s)),[s,Ze(s)]}(o,s,w);x.push(C[e[0]],C[e[1]])}if(_=[..._,{placement:o,overflows:x}],!x.every(e=>e<=0)){var R,A;const e=((null==(R=i.flip)?void 0:R.index)||0)+1,t=S[e];if(t&&("alignment"!==d||v===He(t)||_.every(e=>He(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:_},reset:{placement:t}};let n=null==(A=_.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var k;const e=null==(k=_.filter(e=>{if(T){const t=He(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:k[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Et=(e,t,n)=>{const r=new Map,o={platform:yt,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:tt},l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=et(c,r,l),m=r,p=0;const f={};for(let n=0;n{t.current=e}),t}const Rt=(e,t)=>{const n=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=Fe(n),a=We(n),l="y"===He(n),c=nt.has(s)?-1:1,u=i&&l?-1:1,d=ze(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*u,y:m*c}:{x:m*c,y:p*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},At=(e,t)=>{const n=wt(e);return{name:n.name,fn:n.fn,options:[e,t]}},kt=(e,t)=>{const n=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=ze(e,t),u=await s.detectOverflow(t,c),d=Fe(o),m=We(o),p="y"===He(o),{width:f,height:h}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=m===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,g="end"===m?"top":"bottom");const v=h-u.top-u.bottom,b=f-u.left-u.right,w=$e(h-u[g],v),E=$e(f-u[y],b),T=!t.middlewareData.shift;let S=w,C=E;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=v),T&&!m){const e=Me(u.left,0),t=Me(u.right,0),n=Me(u.top,0),r=Me(u.bottom,0);p?C=f-2*(0!==e||0!==t?e+t:Me(u.left,u.right)):S=h-2*(0!==n||0!==r?n+r:Me(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:S});const x=await s.getDimensions(a.floating);return f!==x.width||h!==x.height?{reset:{rects:!0}}:{}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ot="data-floating-ui-focusable",It="active",Pt="selected",Nt={...R};let Lt=!1,$t=0;const Mt=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+$t++,Dt=Nt.useId||function(){const[e,t]=_.useState(()=>Lt?Mt():void 0);return Ce(()=>{null==e&&t(Mt())},[]),_.useEffect(()=>{Lt=!0},[]),e};const jt=_.createContext(null),Vt=_.createContext(null),Ut=()=>{var e;return(null==(e=_.useContext(jt))?void 0:e.id)||null},zt=()=>_.useContext(Vt);function Ft(e){return"data-floating-ui-"+e}function Wt(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const Bt=Ft("safe-polygon");function Ht(e,t,n){if(n&&!Se(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){const n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function Gt(e){return"function"==typeof e?e():e}function qt(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:m=!0}=t,p=zt(),f=Ut(),h=xe(c),g=xe(l),y=xe(n),v=xe(d),b=_.useRef(),w=_.useRef(-1),E=_.useRef(),T=_.useRef(-1),S=_.useRef(!0),C=_.useRef(!1),x=_.useRef(()=>{}),R=_.useRef(!1),A=Re(()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});_.useEffect(()=>{if(a)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(Wt(w),Wt(T),S.current=!0,R.current=!1)}},[a,i]),_.useEffect(()=>{if(!a)return;if(!h.current)return;if(!n)return;function e(e){A()&&r(!1,e,"hover")}const t=Te(s.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[s.floating,n,r,a,h,A]);const k=_.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=Ht(g.current,"close",b.current);o&&!E.current?(Wt(w),w.current=window.setTimeout(()=>r(!1,e,n),o)):t&&(Wt(w),r(!1,e,n))},[g,r]),O=Re(()=>{x.current(),E.current=void 0}),I=Re(()=>{if(C.current){const e=Te(s.floating).body;e.style.pointerEvents="",e.removeAttribute(Bt),C.current=!1}}),P=Re(()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type));_.useEffect(()=>{if(a&&U(s.domReference)){const r=s.domReference,o=s.floating;return n&&r.addEventListener("mouseleave",i),m&&r.addEventListener("mousemove",e,{once:!0}),r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",t),o&&(o.addEventListener("mouseleave",i),o.addEventListener("mouseenter",l),o.addEventListener("mouseleave",c)),()=>{n&&r.removeEventListener("mouseleave",i),m&&r.removeEventListener("mousemove",e),r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",t),o&&(o.removeEventListener("mouseleave",i),o.removeEventListener("mouseenter",l),o.removeEventListener("mouseleave",c))}}function e(e){if(Wt(w),S.current=!1,u&&!Se(b.current)||Gt(v.current)>0&&!Ht(g.current,"open"))return;const t=Ht(g.current,"open",b.current);t?w.current=window.setTimeout(()=>{y.current||r(!0,e,"hover")},t):n||r(!0,e,"hover")}function t(e){if(P())return void I();x.current();const t=Te(s.floating);if(Wt(T),R.current=!1,h.current&&o.current.floatingContext){n||Wt(w),E.current=h.current({...o.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){I(),O(),P()||k(e,!0,"safe-polygon")}});const r=E.current;return t.addEventListener("mousemove",r),void(x.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!Ee(s.floating,e.relatedTarget))&&k(e)}function i(e){P()||o.current.floatingContext&&(null==h.current||h.current({...o.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){I(),O(),P()||k(e)}})(e))}function l(){Wt(w)}function c(e){P()||k(e,!1)}},[s,a,e,u,m,k,O,I,r,n,y,p,g,h,o,P,v]),Ce(()=>{var e;if(a&&n&&null!=(e=h.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&A()){C.current=!0;const e=s.floating;if(U(s.domReference)&&e){var t;const n=Te(s.floating).body;n.setAttribute(Bt,"");const r=s.domReference,o=null==p||null==(t=p.nodesRef.current.find(e=>e.id===f))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[a,n,f,s,p,h,A]),Ce(()=>{n||(b.current=void 0,R.current=!1,O(),I())},[n,O,I]),_.useEffect(()=>()=>{O(),Wt(w),Wt(T),I()},[a,s.domReference,O,I]);const N=_.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){S.current||y.current||r(!0,t,"hover")}u&&!Se(b.current)||n||0===Gt(v.current)||R.current&&e.movementX**2+e.movementY**2<2||(Wt(T),"touch"===b.current?o():(R.current=!0,T.current=window.setTimeout(o,Gt(v.current))))}}},[u,r,n,y,v]);return _.useMemo(()=>a?{reference:N}:{},[a,N])}const Yt={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Xt=_.forwardRef(function(e,t){const[n,r]=_.useState();Ce(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[Ft("focus-guard")]:"",style:Yt};return(0,Ne.jsx)("span",{...e,...o})}),Kt={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Jt=_.createContext(null),Zt=Ft("portal");function Qt(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=function(e){void 0===e&&(e={});const{id:t,root:n}=e,r=Dt(),o=en(),[i,s]=_.useState(null),a=_.useRef(null);return Ce(()=>()=>{null==i||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),Ce(()=>{if(!r)return;if(a.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(Zt,""),e.appendChild(n),a.current=n,s(n)},[t,r]),Ce(()=>{if(null===n)return;if(!r)return;if(a.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!V(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(Zt,""),e=i||e,e.appendChild(l),a.current=l,s(l)},[t,n,r,o]),i}({id:n,root:r}),[s,a]=_.useState(null),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),m=null==s?void 0:s.modal,p=null==s?void 0:s.open,f=!!s&&!s.modal&&s.open&&o&&!(!r&&!i);return _.useEffect(()=>{if(i&&o&&!m)return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&Oe(e)&&("focusin"===e.type?Pe:Ie)(i)}},[i,o,m]),_.useEffect(()=>{i&&(p||Pe(i))},[p,i]),(0,Ne.jsxs)(Jt.Provider,{value:_.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[f&&i&&(0,Ne.jsx)(Xt,{"data-type":"outside",ref:l,onFocus:e=>{if(Oe(e,i)){var t;null==(t=u.current)||t.focus()}else{const e=ke(Te(n=s?s.domReference:null).body,-1)||n;null==e||e.focus()}var n}}),f&&i&&(0,Ne.jsx)("span",{"aria-owns":i.id,style:Kt}),i&&Le.createPortal(t,i),f&&i&&(0,Ne.jsx)(Xt,{"data-type":"outside",ref:c,onFocus:e=>{if(Oe(e,i)){var t;null==(t=d.current)||t.focus()}else{const t=ke(Te(n=s?s.domReference:null).body,1)||n;null==t||t.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent,"focus-out"))}var n}})]})}const en=()=>_.useContext(Jt);function tn(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Dt(),i=_.useRef({}),[s]=_.useState(()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}()),a=null!=Ut(),[l,c]=_.useState(r.reference),u=Re((e,t,r)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)}),d=_.useMemo(()=>({setPositionReference:c}),[]),m=_.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return _.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:m,events:s,floatingId:o,refs:d}),[t,u,m,s,o,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=_.useState(null),[a,l]=_.useState(null),c=(null==o?void 0:o.domReference)||i,u=_.useRef(null),d=zt();Ce(()=>{c&&(u.current=c)},[c]);const m=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=_.useState(r);St(m,r)||p(r);const[f,h]=_.useState(null),[g,y]=_.useState(null),v=_.useCallback(e=>{e!==T.current&&(T.current=e,h(e))},[]),b=_.useCallback(e=>{e!==S.current&&(S.current=e,y(e))},[]),w=i||f,E=s||g,T=_.useRef(null),S=_.useRef(null),C=_.useRef(u),x=null!=l,R=_t(l),A=_t(o),k=_t(c),O=_.useCallback(()=>{if(!T.current||!S.current)return;const e={placement:t,strategy:n,middleware:m};A.current&&(e.platform=A.current),Et(T.current,S.current,e).then(e=>{const t={...e,isPositioned:!1!==k.current};I.current&&!St(C.current,t)&&(C.current=t,Le.flushSync(()=>{d(t)}))})},[m,t,n,A,k]);Tt(()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const I=_.useRef(!1);Tt(()=>(I.current=!0,()=>{I.current=!1}),[]),Tt(()=>{if(w&&(T.current=w),E&&(S.current=E),w&&E){if(R.current)return R.current(w,E,O);O()}},[w,E,O,R,x]);const P=_.useMemo(()=>({reference:T,floating:S,setReference:v,setFloating:b}),[v,b]),N=_.useMemo(()=>({reference:w,floating:E}),[w,E]),L=_.useMemo(()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=xt(N.floating,u.x),r=xt(N.floating,u.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...Ct(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,N.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:O,refs:P,elements:N,floatingStyles:L}),[u,O,P,N,L])}({...e,elements:{...o,...a&&{reference:a}}}),p=_.useCallback(e=>{const t=U(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),m.refs.setReference(t)},[m.refs]),f=_.useCallback(e=>{(U(e)||null===e)&&(u.current=e,s(e)),(U(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!U(e))&&m.refs.setReference(e)},[m.refs]),h=_.useMemo(()=>({...m.refs,setReference:f,setPositionReference:p,domReference:u}),[m.refs,f,p]),g=_.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),y=_.useMemo(()=>({...m,...r,refs:h,elements:g,nodeId:t}),[m,h,g,t,r]);return Ce(()=>{r.dataRef.current.floatingContext=y;const e=null==d?void 0:d.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),_.useMemo(()=>({...m,context:y,refs:h,elements:g}),[m,h,g,y])}function nn(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[It]:t,[Pt]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Ot]:""},...i,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,i]=t;var s;o&&[It,Pt].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;ie(...o)).find(e=>void 0!==e)})):e[n]=i)}),e):e,{})}}const rn=[".e-off-canvas"];function on(){return on=Object.assign?Object.assign.bind():function(e){for(var t=1;t"isSelected"!==e&&"isSmallerOffset"!==e&&"isGlobal"!==e})(({theme:e,isSelected:t,isSmallerOffset:n,isGlobal:r})=>({outline:`${t?"2px":"1px"} solid ${r?e.palette.global.main:e.palette.primary.light}`,outlineOffset:t&&!n?"-2px":"-1px",pointerEvents:"none"})),ln=({element:e,isSelected:t,id:n,isGlobal:r=!1})=>{const{context:o,floating:i,isVisible:s}=function({element:e,isSelected:t}){const[n,r]=(0,_.useState)(!1),{refs:o,floatingStyles:i,context:s}=tn({open:n||t,onOpenChange:r,whileElementsMounted:bt,middleware:[kt(()=>({apply({elements:e,rects:t}){Object.assign(e.floating.style,{width:`${t.reference.width+2}px`,height:`${t.reference.height+2}px`})}})),Rt(({rects:e})=>-e.reference.height/2-e.floating.height/2)]});return(0,_.useEffect)(()=>{o.setReference(e)},[e,o]),{isVisible:n||t,context:s,floating:{setRef:o.setFloating,ref:o.floating,styles:i}}}({element:e,isSelected:t}),{getFloatingProps:a,getReferenceProps:l}=function(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),r=e.map(e=>null==e?void 0:e.item),o=_.useCallback(t=>nn(t,e,"reference"),t),i=_.useCallback(t=>nn(t,e,"floating"),n),s=_.useCallback(t=>nn(t,e,"item"),r);return _.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}([qt(o)]),c=(()=>{const e=window.elementor?.$preview?.[0];return!!e&&rn.map(t=>Array.from(e?.contentWindow?.document.body.querySelectorAll(t)??[])).flat().some(e=>e.checkVisibility({opacityProperty:!0,visibilityProperty:!0,contentVisibilityAuto:!0}))})();!function(e,t){(0,_.useEffect)(()=>{const n=e,{events:r,attrs:o}=function(e){const t=/^on(?=[A-Z])/;return Object.entries(e).reduce((e,[n,r])=>{if(!t.test(n))return e.attrs.push([n,r]),e;const o=n.replace(t,"").toLowerCase(),i=r;return e.events.push([o,i]),e},{events:[],attrs:[]})}(t());return r.forEach(([e,t])=>n.addEventListener(e,t)),o.forEach(([e,t])=>n.setAttribute(e,t)),()=>{r.forEach(([e,t])=>n.removeEventListener(e,t)),o.forEach(([e])=>n.removeAttribute(e))}},[t,e])}(e,l);const u=e.offsetHeight<=1;return s&&!c&&_.createElement(Qt,{id:sn},_.createElement(an,on({ref:i.setRef,isSelected:t,isGlobal:r,style:i.styles,"data-element-overlay":n,role:"presentation",isSmallerOffset:u},a())))},cn="atomic",un=[{component:ln,shouldRender:()=>!0}];function dn(){const e=(0,a.useSelectedElement)(),t=(0,s.__privateUseListenTo)([(0,s.windowEvent)("elementor/editor/element-rendered"),(0,s.windowEvent)("elementor/editor/element-destroyed")],()=>(0,a.getElements)().filter(e=>cn in(e.view?.el?.dataset??{})).map(e=>({id:e.id,domElement:e.view?.getDomElement?.()?.get?.(0),isGlobal:e.model.get("isGlobal")??!1})).filter(e=>!!e.domElement)),n="edit"===(0,s.useEditMode)(),r=(0,s.__privateUseIsRouteActive)("panel/global");return n&&!r?t.map(({id:t,domElement:n,isGlobal:r})=>{const o=e.element?.id===t;return un.map(({shouldRender:e,component:i},s)=>e({id:t,element:n,isSelected:o})&&_.createElement(i,{key:`${t}-${s}`,id:t,element:n,isSelected:o,isGlobal:r}))}):null}var mn=window.elementorV2.editorInteractions;function pn(e){const t=(0,_.useRef)(!1);(0,_.useEffect)(()=>{t.current||(t.current=!0,e())},[])}function fn({provider:e},{provider:t}){return e.priority-t.priority}function hn({provider:e,setInteractionItems:t}){return()=>{try{const n=e.actions.all(),r=e.getKey();t(t=>({...t,[r]:{provider:e,items:n}}))}catch{}}}function gn(){const e=(0,s.__privateUseListenTo)((0,s.commandEndEvent)("editor/documents/attach-preview"),()=>(0,s.getCanvasIframeDocument)()?.head),t=function(){const[e,t]=(0,_.useState)({}),n=(0,_.useMemo)(()=>{try{return mn.interactionsRepository.getProviders().map(e=>({provider:e,subscriber:hn({provider:e,setInteractionItems:t})}))}catch{return[]}},[]);return(0,_.useEffect)(()=>{if(0===n.length)return;const e=n.map(({provider:e,subscriber:t})=>e.subscribe(()=>{try{t()}catch{}}));return()=>{e.forEach(e=>e())}},[n]),pn(()=>{0!==n.length&&(0,s.registerDataHook)("after","editor/documents/attach-preview",async()=>{n.forEach(({subscriber:e})=>{try{e()}catch{}})})}),(0,_.useMemo)(()=>Object.values(e).sort(fn).flatMap(({items:e})=>e),[e])}();if(!e)return null;const n=JSON.stringify(Array.isArray(t)?t:[]);return _.createElement(L.Portal,{container:e},_.createElement("script",{type:"application/json","data-e-interactions":"true",dangerouslySetInnerHTML:{__html:n}}))}const yn="data-e-removed",vn="data-elementor-id",bn="elementor-post-",wn="-css";function En(e){const t=[...e.attributes].map(e=>[e.name,e.value]);return Object.fromEntries(t)}var Tn=window.elementorV2.editorResponsive;const Sn=new Set;function Cn(e,t=[]){return{then:n=>(t.push(n),Cn(e,t)),execute:async()=>{let n;for(const r of t){if(e.aborted)break;n=await r(n,e)}}}}const xn=e=>!!e&&"object"==typeof e&&"$$multi-props"in e&&!0===e["$$multi-props"],_n=e=>({"$$multi-props":!0,value:e}),Rn=e=>e.value,An=3;function kn({transformers:e,schema:t,onPropResolve:n}){async function r({props:e,schema:r,signal:i,renderContext:s}){r=r??t;const a=Promise.all(Object.entries(r).map(async([t,r])=>{const a=e[t]??r.default,l=await o({value:a,key:t,type:r,signal:i,renderContext:s});return n?.({key:t,value:l}),xn(l)?Rn(l):{[t]:l}}));return Object.assign({},...(await a).filter(Boolean))}async function o({value:t,key:n,type:i,signal:s,depth:a=0,renderContext:l}){if(null==t)return null;if(!(0,c.isTransformable)(t))return t;if(a>An)return null;if(!0===t.disabled)return null;let u=i;if("union"===i.kind&&(u=i.prop_types[t.$$type],!u))return null;if(t.$$type!==u.key)return null;let d=t.value;"object"===u.kind&&(d=await r({props:d,schema:u.shape,signal:s,renderContext:l})),"array"===u.kind&&(d=await Promise.all(d.map(e=>o({value:e,key:n,type:u.item_prop_type,depth:a,signal:s,renderContext:l}))));const m=e.get(t.$$type);if(!m)return null;try{return o({value:await m(d,{key:n,signal:s,renderContext:l,propType:i}),key:n,type:i,signal:s,depth:a+1,renderContext:l})}catch{return null}}return r}function On(){const e={};let t=null;return{register(t,n){return e[t]=n,this},registerFallback(e){return t=e,this},get(n){return e[n]??t},all(){return{...e}}}}const In=On(),Pn=On(),Nn=(0,O.createError)({code:"unknown_style_type",message:"Unknown style type"}),Ln=(0,O.createError)({code:"unknown_style_state",message:"Unknown style state"}),$n={class:"."},Mn="desktop",Dn="normal";function jn({resolve:e,breakpoints:t,selectorPrefix:n=""}){return async({styles:r,signal:o})=>{const i=new Set,s=r.filter(e=>{const t=function(e){const t=e.variants[0]?.meta?.breakpoint??Mn,n=e.variants[0]?.meta?.state??Dn;return`${e.id}-${t}-${n}`}(e);return!i.has(t)&&(i.add(t),!0)}).map(async r=>{const i=Object.values(r.variants).map(async i=>{const s=await async function({props:e,resolve:t,signal:n}){const r=await t({props:e,signal:n});return Object.entries(r).reduce((e,[t,n])=>(null===n||e.push(t+":"+n+";"),e),[]).join("")}({props:i.props,resolve:e,signal:o}),a=function(e){const t=(0,O.decodeString)(e?.raw||"");return t.trim()?t+"\n":""}(i.custom_css);return Vn().for(r.cssName,r.type).withPrefix(n).withState(i.meta.state).withMediaQuery(i.meta.breakpoint?t[i.meta.breakpoint]:null).wrap(s+a)}),s=await Promise.all(i);return{id:r.id,breakpoint:r?.variants[0]?.meta?.breakpoint||"desktop",value:s.join(""),state:r?.variants[0]?.meta?.state||null}});return await Promise.all(s)}}function Vn(e="",t){return{for:(n,r)=>{const o=$n[r];if(!o)throw new Nn({context:{type:r}});return Vn(`${e}${o}${n}`,t)},withPrefix:n=>Vn([n,e].filter(Boolean).join(" "),t),withState:n=>Vn((0,u.getSelectorWithState)(e,n),t),withMediaQuery:n=>{if(!n?.type)return Vn(e,t);const r=`${n.type}:${n.width}px`;return Vn(e,e=>`@media(${r}){${e}}`)},wrap:n=>{const r=`${e}{${n}}`;return t?t(r):r}}}const Un=".elementor";function zn({provider:e},{provider:t}){return e.priority-t.priority}function Fn({state:e},{state:t}){return(0,u.isClassState)(e)&&!(0,u.isClassState)(t)?-1:!(0,u.isClassState)(e)&&(0,u.isClassState)(t)?1:0}function Wn({provider:e,renderStyles:t,setStyleItems:n,getCache:r}){return function(){let i=null;return(...a)=>(i&&i.abort(),i=new AbortController,((i,a,l)=>Cn(i.signal).then((n,i)=>{const c=r(),u=void 0!==l&&void 0!==a,d=c.orderedIds.length>0;return d&&e.isPregeneratedLink&&function(e,t){if(Sn.has(e))return;const n=(0,s.getCanvasIframeDocument)();n&&(n.head.querySelectorAll('link[rel="stylesheet"]').forEach(e=>{const{id:n,href:r,media:o}=e;t({id:n,href:r,media:o})&&e.remove()}),Sn.add(e))}(e.getKey(),e.isPregeneratedLink),u&&d?async function(n,r,i,s){const a=function(e,t){const n=[];for(const r of Object.keys(t)){const o=t[r],i=e[r];i&&o===i||n.push(r)}return n}(r,i);if(n.orderedIds=e.actions.all().map(e=>e.id).reverse(),a.length>0){const r=o(a.map(t=>e.actions.get(t)).filter(e=>!!e).map(t=>({...t,cssName:e.actions.resolveCssName(t.id)})));return t({styles:r,signal:s}).then(e=>(function(e,t,n){for(const n of t)e.itemsById.delete(n);for(const t of n){const n=e.itemsById.get(t.id)||[];n.push(t),e.itemsById.set(t.id,n)}}(n,a,e),Bn(n)))}return Bn(n)}(c,a,l,i):async function(n,r){const i=e.actions.all(),s=[...i].reverse().map(t=>({...t,cssName:e.actions.resolveCssName(t.id)}));return t({styles:o(s),signal:r}).then(e=>(function(e,t,n){e.orderedIds=t.map(e=>e.id).reverse(),e.itemsById.clear();for(const t of n){const n=e.itemsById.get(t.id)||[];n.push(t),e.itemsById.set(t.id,n)}}(n,i,e),Bn(n)))}(c,i)}).then(t=>{n(n=>({...n,[e.getKey()]:{provider:e,items:t}}))}).execute())(i,...a))}();function o(e){return Object.values(e.reduce((e,t)=>(t.variants.forEach(n=>{const r=n.meta.breakpoint||"desktop";e[t.id]||(e[t.id]={}),e[t.id][r]||(e[t.id][r]={...t,variants:[]}),e[t.id][r].variants.push(n)}),e),{})).flatMap(e=>Object.values(e))}}function Bn(e){return e.orderedIds.map(t=>e.itemsById.get(t)).filter(e=>void 0!==e).flat()}function Hn(){return Hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t(0,s.getCanvasIframeDocument)()?.head),t=function(){const e=function(e){const t=(0,Tn.useBreakpointsMap)();return(0,_.useMemo)(()=>jn({selectorPrefix:Un,breakpoints:t,resolve:e}),[e,t])}((0,_.useMemo)(()=>kn({transformers:Pn,schema:(0,u.getStylesSchema)(),onPropResolve:({key:e,value:t})=>{"font-family"===e&&"string"==typeof t&&(0,s.enqueueFont)(t)}}),[])),t=(0,Tn.useBreakpoints)(),[n,r]=(0,_.useState)({}),o=(0,_.useRef)(new Map),i=(0,_.useMemo)(()=>{const t=()=>({orderedIds:[],itemsById:new Map});return k.stylesRepository.getProviders().map(n=>({provider:n,subscriber:Wn({provider:n,renderStyles:e,setStyleItems:r,getCache:()=>(e=>{const n=function(e){try{return e.getKey()}catch{return null}}(e);return n?(o.current.has(n)||o.current.set(n,t()),o.current.get(n)):t()})(n)})}))},[e]);(0,_.useEffect)(()=>{const e=i.map(({provider:e,subscriber:t})=>e.subscribe(t));return()=>{e.forEach(e=>e())}},[i]),pn(()=>{(0,s.registerDataHook)("after","editor/documents/attach-preview",async()=>{Sn.clear();const e=i.map(async({subscriber:e})=>e());await Promise.all(e)})});const a=(0,_.useMemo)(()=>{return e=t.map(e=>e.id),({breakpoint:t},{breakpoint:n})=>e.indexOf(t)-e.indexOf(n);var e},[t]);return(0,_.useMemo)(()=>Object.values(n).sort(zn).flatMap(({items:e})=>e).sort(Fn).sort(a),[n,a])}(),n=(0,s.__privateUseListenTo)((0,s.commandEndEvent)("editor/documents/attach-preview"),()=>{const e=(0,s.getCanvasIframeDocument)();if(!e)return[];const t=function(e){return[...e.body.querySelectorAll(`[${vn}]`)??[]].map(e=>e.getAttribute(vn)||"")}(e).map(e=>`${bn}${e}${wn}`),n=function(e){return[...e.head.querySelectorAll(`link[rel="stylesheet"][id^=${bn}][id$=${wn}]`)??[]]}(e).filter(e=>t.includes(e.getAttribute("id")??""));return n.forEach(e=>{e.hasAttribute(yn)||e.remove()}),n.map(e=>({...En(e),id:e.getAttribute("id")??"",[yn]:!0}))});return e?_.createElement(L.Portal,{container:e},function(e){const t=new Map;return e.filter(e=>{const n=t.get(e.id);return n?!n.find(t=>t.breakpoint===e.breakpoint&&t.state===e.state)&&(n.push(e),!0):(t.set(e.id,[e]),!0)})}(t).map(e=>_.createElement("style",{key:`${e.id}-${e.breakpoint}-${e.state??"normal"}`},e.value)),n.map(e=>_.createElement("link",Hn({},e,{key:e.id})))):null}var qn=window.elementorV2.editorNotifications,Yn=window.wp.i18n;const Xn="e-form",Kn=new Set(["e-form-input","e-form-textarea","e-form-label","e-form-checkbox","e-form-submit-button","e-form-select","e-form-radio-button","e-form-file-upload","e-form-date-picker","e-form-time-picker"]);function Jn(e){return e.model?.widgetType||e.model?.elType}function Zn(e){return e?.model.get("widgetType")||e?.model.get("elType")}function Qn(e){return e?.widgetType||e?.elType}function er(e){return function(e){return!!e?.view?.el?.closest('form,[data-element_type="e-form"]')}(e)}function tr(e,t){return e.some(e=>Qn(e)===t||!!e.elements&&tr(e.elements,t))}function nr(e,t){return e.some(e=>{const n=Qn(e);return!(!n||!t.has(n))||!!e.elements&&nr(e.elements,t)})}const rr={type:"default",message:(0,Yn.__)("Form elements must be placed inside a form.","elementor"),id:"form-fields-outside-form-blocked"};function or(e){const t=Jn(e);return!(!t||!Kn.has(t)||er(e.container)||(ar(),0))}function ir(e){const{containers:t=[e.container],target:n}=e;return!(!t.some(e=>{return!!e&&(t=e,n=Kn,(0,a.getAllDescendants)(t).some(e=>{const t=Zn(e);return!!t&&n.has(t)}));var t,n})||er(n)||function(e){return e.some(e=>Zn(e)===Xn)}(t)||(ar(),0))}function sr(e){const{storageType:t}=e;if("localstorage"!==t)return!1;const n=window?.elementorCommon?.storage?.get();return!!n?.clipboard?.elements&&!(!nr(n.clipboard.elements,Kn)||er(e.container)||(r=n.clipboard.elements,r.length&&r.every(e=>Qn(e)===Xn))||(ar(),0));var r}function ar(){(0,qn.notify)(rr)}const lr={type:"default",message:(0,Yn.__)("Forms can't be nested. Create separate forms instead.","elementor"),id:"form-nesting-blocked"};function cr(e){const t=Jn(e);return!(!t||t!==Xn||!er(e.container)||(mr(),0))}function ur(e){const{containers:t=[e.container],target:n}=e;return!(!t.some(e=>{return!!e&&(t=e,n=Xn,(0,a.getAllDescendants)(t).some(e=>Zn(e)===n));var t,n})||!er(n)||(mr(),0))}function dr(e){const{storageType:t}=e;if("localstorage"!==t)return!1;const n=window?.elementorCommon?.storage?.get();return!!n?.clipboard?.elements&&!(!tr(n.clipboard.elements,Xn)||!er(e.container)||(mr(),0))}function mr(){(0,qn.notify)(lr)}const pr=On();function fr(e){return e}const hr=()=>"";const gr=e=>e&&0!==Object.keys(e).length?{min:e.min||null,max:e.max||null}:null,yr=e=>e.map(e=>{const t=(e.date||"").trim(),n=(e.time||"").trim();return t||n?`${t} ${n}`.trim():""}).join(" "),vr=e=>e?.content??"",br=e=>e?.content??"",wr=({destination:e,isTargetBlank:t,tag:n})=>({href:"number"==typeof e?"#post-id-"+e:e,target:t?"_blank":"_self",tag:n??"a"}),Er=({id:e})=>e??null,Tr=e=>e&&0!==Object.keys(e).length?{min:e.min||null,max:e.max||null}:null,Sr=e=>({id:e.id??null,url:e.url??null,alt:e.alt??null});var Cr=window.elementorV2.wpMedia;const xr=async e=>{const{src:t,size:n}=e;if(!t?.id)return t?.url?{src:t.url,alt:t.alt??""}:null;const r=await(0,Cr.getMediaAttachment)({id:t.id}),o=r?.sizes?.[n??""];return o?{src:o.url,height:o.height,width:o.width,alt:r.alt}:r?{src:r.url,height:r.height,width:r.width,alt:r.alt}:null},_r=e=>e,{entries:Rr,setPrototypeOf:Ar,isFrozen:kr,getPrototypeOf:Or,getOwnPropertyDescriptor:Ir}=Object;let{freeze:Pr,seal:Nr,create:Lr}=Object,{apply:$r,construct:Mr}="undefined"!=typeof Reflect&&Reflect;Pr||(Pr=function(e){return e}),Nr||(Nr=function(e){return e}),$r||($r=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o1?t-1:0),r=1;r1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:Fr;Ar&&Ar(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(kr(t)||(t[r]=e),o=e)}e[o]=!0}return e}function eo(e){for(let t=0;t/gm),yo=Nr(/\$\{[\w\W]*/gm),vo=Nr(/^data-[\-\w.\u00B7-\uFFFF]+$/),bo=Nr(/^aria-[\-\w]+$/),wo=Nr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Eo=Nr(/^(?:\w+script|data):/i),To=Nr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),So=Nr(/^html$/i),Co=Nr(/^[a-z][.\w]*(-[.\w]+)+$/i);var xo=Object.freeze({__proto__:null,ARIA_ATTR:bo,ATTR_WHITESPACE:To,CUSTOM_ELEMENT:Co,DATA_ATTR:vo,DOCTYPE_NAME:So,ERB_EXPR:go,IS_ALLOWED_URI:wo,IS_SCRIPT_OR_DATA:Eo,MUSTACHE_EXPR:ho,TMPLIT_EXPR:yo});const _o=function(){return"undefined"==typeof window?null:window};var Ro=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_o();const n=t=>e(t);if(n.version="3.3.0",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:p,trustedTypes:f}=t,h=c.prototype,g=no(h,"cloneNode"),y=no(h,"remove"),v=no(h,"nextSibling"),b=no(h,"childNodes"),w=no(h,"parentNode");if("function"==typeof a){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let E,T="";const{implementation:S,createNodeIterator:C,createDocumentFragment:x,getElementsByTagName:_}=r,{importNode:R}=o;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Rr&&"function"==typeof w&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:k,ERB_EXPR:O,TMPLIT_EXPR:I,DATA_ATTR:P,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:M}=xo;let{IS_ALLOWED_URI:D}=xo,j=null;const V=Qr({},[...ro,...oo,...io,...ao,...co]);let U=null;const z=Qr({},[...uo,...mo,...po,...fo]);let F=Object.seal(Lr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,B=null;const H=Object.seal(Lr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let G=!0,q=!0,Y=!1,X=!0,K=!1,J=!0,Z=!1,Q=!1,ee=!1,te=!1,ne=!1,re=!1,oe=!0,ie=!1,se=!0,ae=!1,le={},ce=null;const ue=Qr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const me=Qr({},["audio","video","img","source","image","track"]);let pe=null;const fe=Qr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let ve=ye,be=!1,we=null;const Ee=Qr({},[he,ge,ye],Wr);let Te=Qr({},["mi","mo","mn","ms","mtext"]),Se=Qr({},["annotation-xml"]);const Ce=Qr({},["title","style","font","a","script"]);let xe=null;const _e=["application/xhtml+xml","text/html"];let Re=null,Ae=null;const ke=r.createElement("form"),Oe=function(e){return e instanceof RegExp||e instanceof Function},Ie=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ae||Ae!==e){if(e&&"object"==typeof e||(e={}),e=to(e),xe=-1===_e.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Re="application/xhtml+xml"===xe?Wr:Fr,j=Yr(e,"ALLOWED_TAGS")?Qr({},e.ALLOWED_TAGS,Re):V,U=Yr(e,"ALLOWED_ATTR")?Qr({},e.ALLOWED_ATTR,Re):z,we=Yr(e,"ALLOWED_NAMESPACES")?Qr({},e.ALLOWED_NAMESPACES,Wr):Ee,pe=Yr(e,"ADD_URI_SAFE_ATTR")?Qr(to(fe),e.ADD_URI_SAFE_ATTR,Re):fe,de=Yr(e,"ADD_DATA_URI_TAGS")?Qr(to(me),e.ADD_DATA_URI_TAGS,Re):me,ce=Yr(e,"FORBID_CONTENTS")?Qr({},e.FORBID_CONTENTS,Re):ue,W=Yr(e,"FORBID_TAGS")?Qr({},e.FORBID_TAGS,Re):to({}),B=Yr(e,"FORBID_ATTR")?Qr({},e.FORBID_ATTR,Re):to({}),le=!!Yr(e,"USE_PROFILES")&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,q=!1!==e.ALLOW_DATA_ATTR,Y=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,K=e.SAFE_FOR_TEMPLATES||!1,J=!1!==e.SAFE_FOR_XML,Z=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,re=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,oe=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,se=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,D=e.ALLOWED_URI_REGEXP||wo,ve=e.NAMESPACE||ye,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,F=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(F.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(F.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(F.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&(q=!1),ne&&(te=!0),le&&(j=Qr({},co),U=[],!0===le.html&&(Qr(j,ro),Qr(U,uo)),!0===le.svg&&(Qr(j,oo),Qr(U,mo),Qr(U,fo)),!0===le.svgFilters&&(Qr(j,io),Qr(U,mo),Qr(U,fo)),!0===le.mathMl&&(Qr(j,ao),Qr(U,po),Qr(U,fo))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?H.tagCheck=e.ADD_TAGS:(j===V&&(j=to(j)),Qr(j,e.ADD_TAGS,Re))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?H.attributeCheck=e.ADD_ATTR:(U===z&&(U=to(U)),Qr(U,e.ADD_ATTR,Re))),e.ADD_URI_SAFE_ATTR&&Qr(pe,e.ADD_URI_SAFE_ATTR,Re),e.FORBID_CONTENTS&&(ce===ue&&(ce=to(ce)),Qr(ce,e.FORBID_CONTENTS,Re)),se&&(j["#text"]=!0),Z&&Qr(j,["html","head","body"]),j.table&&(Qr(j,["tbody"]),delete W.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Kr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Kr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=e.TRUSTED_TYPES_POLICY,T=E.createHTML("")}else void 0===E&&(E=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(f,i)),null!==E&&"string"==typeof T&&(T=E.createHTML(""));Pr&&Pr(e),Ae=e}},Pe=Qr({},[...oo,...io,...so]),Ne=Qr({},[...ao,...lo]),Le=function(e){Ur(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){y(e)}},$e=function(e,t){try{Ur(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ur(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ne)try{Le(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Me=function(e){let t=null,n=null;if(ee)e=""+e;else{const t=Br(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===xe&&ve===ye&&(e=''+e+"");const o=E?E.createHTML(e):e;if(ve===ye)try{t=(new p).parseFromString(o,xe)}catch(e){}if(!t||!t.documentElement){t=S.createDocument(ve,"template",null);try{t.documentElement.innerHTML=be?T:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ve===ye?_.call(t,Z?"html":"body")[0]:Z?t.documentElement:i},De=function(e){return C.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},je=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ve=function(e){return"function"==typeof l&&e instanceof l};function Ue(e,t,r){Dr(e,e=>{e.call(n,t,r,Ae)})}const ze=function(e){let t=null;if(Ue(A.beforeSanitizeElements,e,null),je(e))return Le(e),!0;const r=Re(e.nodeName);if(Ue(A.uponSanitizeElement,e,{tagName:r,allowedTags:j}),J&&e.hasChildNodes()&&!Ve(e.firstElementChild)&&Xr(/<[/\w!]/g,e.innerHTML)&&Xr(/<[/\w!]/g,e.textContent))return Le(e),!0;if(7===e.nodeType)return Le(e),!0;if(J&&8===e.nodeType&&Xr(/<[/\w]/g,e.data))return Le(e),!0;if(!(H.tagCheck instanceof Function&&H.tagCheck(r))&&(!j[r]||W[r])){if(!W[r]&&We(r)){if(F.tagNameCheck instanceof RegExp&&Xr(F.tagNameCheck,r))return!1;if(F.tagNameCheck instanceof Function&&F.tagNameCheck(r))return!1}if(se&&!ce[r]){const t=w(e)||e.parentNode,n=b(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=g(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,v(e))}}return Le(e),!0}return e instanceof c&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:ve,tagName:"template"});const n=Fr(e.tagName),r=Fr(t.tagName);return!!we[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===ye?"svg"===n:t.namespaceURI===he?"svg"===n&&("annotation-xml"===r||Te[r]):Boolean(Pe[n]):e.namespaceURI===he?t.namespaceURI===ye?"math"===n:t.namespaceURI===ge?"math"===n&&Se[r]:Boolean(Ne[n]):e.namespaceURI===ye?!(t.namespaceURI===ge&&!Se[r])&&!(t.namespaceURI===he&&!Te[r])&&!Ne[n]&&(Ce[n]||!Pe[n]):!("application/xhtml+xml"!==xe||!we[e.namespaceURI]))}(e)?(Le(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!Xr(/<\/no(script|embed|frames)/i,e.innerHTML)?(K&&3===e.nodeType&&(t=e.textContent,Dr([k,O,I],e=>{t=Hr(t,e," ")}),e.textContent!==t&&(Ur(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ue(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},Fe=function(e,t,n){if(oe&&("id"===t||"name"===t)&&(n in r||n in ke))return!1;if(q&&!B[t]&&Xr(P,t));else if(G&&Xr(N,t));else if(H.attributeCheck instanceof Function&&H.attributeCheck(t,e));else if(!U[t]||B[t]){if(!(We(e)&&(F.tagNameCheck instanceof RegExp&&Xr(F.tagNameCheck,e)||F.tagNameCheck instanceof Function&&F.tagNameCheck(e))&&(F.attributeNameCheck instanceof RegExp&&Xr(F.attributeNameCheck,t)||F.attributeNameCheck instanceof Function&&F.attributeNameCheck(t,e))||"is"===t&&F.allowCustomizedBuiltInElements&&(F.tagNameCheck instanceof RegExp&&Xr(F.tagNameCheck,n)||F.tagNameCheck instanceof Function&&F.tagNameCheck(n))))return!1}else if(pe[t]);else if(Xr(D,Hr(n,$,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Gr(n,"data:")||!de[e])if(Y&&!Xr(L,Hr(n,$,"")));else if(n)return!1;return!0},We=function(e){return"annotation-xml"!==e&&Br(e,M)},Be=function(e){Ue(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||je(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:s,namespaceURI:a,value:l}=i,c=Re(s),u=l;let d="value"===s?u:qr(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,Ue(A.uponSanitizeAttribute,e,r),d=r.attrValue,!ie||"id"!==c&&"name"!==c||($e(s,e),d="user-content-"+d),J&&Xr(/((--!?|])>)|<\/(style|title|textarea)/i,d)){$e(s,e);continue}if("attributename"===c&&Br(d,"href")){$e(s,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){$e(s,e);continue}if(!X&&Xr(/\/>/i,d)){$e(s,e);continue}K&&Dr([k,O,I],e=>{d=Hr(d,e," ")});const m=Re(e.nodeName);if(Fe(m,c,d)){if(E&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(a);else switch(f.getAttributeType(m,c)){case"TrustedHTML":d=E.createHTML(d);break;case"TrustedScriptURL":d=E.createScriptURL(d)}if(d!==u)try{a?e.setAttributeNS(a,s,d):e.setAttribute(s,d),je(e)?Le(e):Vr(n.removed)}catch(t){$e(s,e)}}else $e(s,e)}Ue(A.afterSanitizeAttributes,e,null)},He=function e(t){let n=null;const r=De(t);for(Ue(A.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Ue(A.uponSanitizeShadowNode,n,null),ze(n),Be(n),n.content instanceof s&&e(n.content);Ue(A.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,c=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ve(e)){if("function"!=typeof e.toString)throw Kr("toString is not a function");if("string"!=typeof(e=e.toString()))throw Kr("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Q||Ie(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Re(e.nodeName);if(!j[t]||W[t])throw Kr("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=Me("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!te&&!K&&!Z&&-1===e.indexOf("<"))return E&&re?E.createHTML(e):e;if(r=Me(e),!r)return te?null:re?T:""}r&&ee&&Le(r.firstChild);const u=De(ae?e:r);for(;a=u.nextNode();)ze(a),Be(a),a.content instanceof s&&He(a.content);if(ae)return e;if(te){if(ne)for(c=x.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(U.shadowroot||U.shadowrootmode)&&(c=R.call(o,c,!0)),c}let d=Z?r.outerHTML:r.innerHTML;return Z&&j["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Xr(So,r.ownerDocument.doctype.name)&&(d="\n"+d),K&&Dr([k,O,I],e=>{d=Hr(d,e," ")}),E&&re?E.createHTML(d):d},n.setConfig=function(){Ie(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){Ae=null,Q=!1},n.isValidAttribute=function(e,t,n){Ae||Ie({});const r=Re(e),o=Re(t);return Fe(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Ur(A[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=jr(A[e],t);return-1===n?void 0:zr(A[e],n,1)[0]}return Vr(A[e])},n.removeHooks=function(e){A[e]=[]},n.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const Ao="width: 100%; height: 100%; overflow: unset;",ko=async(e,{signal:t})=>{const n=function(e){return"number"!=typeof e||e<=0?null:e}(e.id),r="string"==typeof e.url?e.url:null;let o=r;if(n&&!r){const e=await(0,Cr.getMediaAttachment)({id:n});o=e?.url??null}const i="string"==typeof o?o:null;if(!i)return{html:null,url:null};const s=await async function(e,t){try{const n=await fetch(e,{signal:t});if(!n.ok)return null;const r=n.headers.get("content-type")??"";return r.includes("svg")||r.includes("xml")||e.endsWith(".svg")?await n.text():null}catch{return null}}(i,t),a=s?function(e){const t=Ro.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0}}),n=(new DOMParser).parseFromString(t,"image/svg+xml").querySelector("svg");if(!n)return null;n.setAttribute("fill","currentColor");const r=(n.getAttribute("style")??"").trim(),o=r?`${r.replace(/;$/,"")}; ${Ao}`:Ao;return n.setAttribute("style",o),n.outerHTML}(s):null;return{html:a,url:i}},Oo=async e=>{const{id:t,url:n}=e;if(!t)return{id:null,url:n};const r=await(0,Cr.getMediaAttachment)({id:t});return{id:t,url:r?.url??n}},Io=e=>{const{color:t=null}=e;return t?`linear-gradient(${t}, ${t})`:null},Po=e=>"radial"===e.type?`radial-gradient(circle at ${e.positions}, ${e.stops})`:`linear-gradient(${e.angle}deg, ${e.stops})`,No=e=>{const{image:t,size:n=null,position:r=null,repeat:o=null,attachment:i=null}=e;return t?{src:t.src?`url(${t.src})`:null,repeat:o,attachment:i,size:n,position:r}:null},Lo=({width:e,height:t})=>`${e??"auto"} ${t??"auto"}`,$o=e=>{if(!e||0===e.length)return null;const t=e.map(e=>"string"==typeof e?{src:e,repeat:null,attachment:null,size:null,position:null}:e).filter(e=>e&&!!e.src);return 0===t.length?null:{"background-image":Mo(t,"src","none",!0),"background-repeat":Mo(t,"repeat","repeat"),"background-attachment":Mo(t,"attachment","scroll"),"background-size":Mo(t,"size","auto auto"),"background-position":Mo(t,"position","0% 0%")}};function Mo(e,t,n,r=!1){if(0===e.filter(e=>e?.[t]).length)return n;const o=e.map(e=>e[t]??n);return!r&&o.every(e=>e===o[0])?o[0]:o.join(",")}const Do=e=>{const{color:t=null,"background-overlay":n=null,clip:r=null}=e;return _n({...n,"background-color":t,"background-clip":r})},jo=e=>`${e?.color} ${e?.offset??0}%`,Vo=e=>t=>t?.length?t.filter(Boolean).join(e):null,Uo=(e,t)=>(n,{key:r})=>{const o=e.filter(e=>n[e]).map(e=>[t({propKey:r,key:e}),n[e]]);return _n(Object.fromEntries(o))},zo=e=>e?.length<1?null:e.filter(Boolean).map(Fo).join(" "),Fo=e=>{if("drop-shadow"===e.func){const{xAxis:t,yAxis:n,blur:r,color:o}=e.args;return`drop-shadow(${t||"0px"} ${n||"0px"} ${r||"10px"} ${o||"transparent"})`}const t=e.args?.size;return e.func&&t?`${e.func}(${t})`:""},Wo=e=>{const t=e.flexGrow,n=e.flexShrink,r=e.flexBasis,o=null!=t,i=null!=n,s=null!=r;return o||i||s?o&&i&&s?`${t} ${n} ${"object"==typeof r&&void 0!==r.size?`${r.size}${r.unit||""}`:r}`:o&&i&&!s?`${t} ${n}`:o&&!i&&s?`${t} 1 ${"object"==typeof r&&void 0!==r.size?`${r.size}${r.unit||""}`:r}`:!o&&i&&s?`0 ${n} ${"object"==typeof r&&void 0!==r.size?`${r.size}${r.unit||""}`:r}`:!o||i||s?o||!i||s?o||i||!s?null:`0 1 ${"object"==typeof r&&void 0!==r.size?`${r.size}${r.unit||""}`:r}`:`0 ${n}`:`${t}`:null};function Bo(e){return`${e??"0px"}`}const Ho=e=>`${Bo(e?.x)} ${Bo(e?.y)}`,Go=({x:e,y:t})=>`${e??"0px"} ${t??"0px"}`,qo=e=>[e.hOffset,e.vOffset,e.blur,e.spread,e.color,e.position].filter(Boolean).join(" "),Yo=e=>"auto"===e.unit?"auto":"custom"===e.unit?e.size:`${e.size}${e.unit}`,Xo=e=>e||0===e?"span "+e:null,Ko=e=>{const t={"-webkit-text-stroke":`${e.width} ${e.color}`,stroke:`${e.color}`,"stroke-width":`${e.width}`};return _n(t)},Jo=e=>e?.length<1?null:e.join(" "),Zo="0px",Qo=e=>`translate3d(${e.x??Zo}, ${e.y??Zo}, ${e.z??Zo})`;function ei(e){return`${e??"0px"}`}const ti=e=>{const t=ei(e.x),n=ei(e.y),r=ei(e.z);return"50%"===t&&"50%"===n&&"0px"===r?null:`${t} ${n} ${r}`},ni="0deg",ri=e=>[`rotateX(${e?.x??ni})`,`rotateY(${e?.y??ni})`,`rotateZ(${e?.z??ni})`].join(" "),oi=e=>`scale3d(${e.x??1}, ${e.y??1}, ${e.z??1})`,ii="0deg",si=e=>`skew(${e?.x??ii}, ${e?.y??ii})`;var ai=window.elementorV2.editorControls;const li=e=>{if(e?.length<1)return null;const t=(()=>{const e=new Set;return ai.transitionProperties.forEach(t=>{t.properties.forEach(t=>{e.add(t.value)})}),e})(),n=e.map(e=>ci(e,t)).filter(Boolean);return 0===n.length?null:n.join(", ")},ci=(e,t)=>{if(!e.selection||!e.size)return"";const n=e.selection.value;return t.has(n)?`${n} ${e.size}`:""};var ui=window.elementorV2.twing;function di(e){return["a","article","aside","button","div","footer","h1","h2","h3","h4","h5","h6","header","main","nav","p","section","span"].includes(e)?e:"div"}function mi(e){const t=["http:","https:","mailto:","tel:"];try{const n=new URL(e);return t.includes(n.protocol)?e:""}catch{return""}}function pi(){const e=window;return class extends e.elementor.modules.elements.views.Widget{onRender(...e){super.onRender(...e),this.#e("elementor/preview/atomic-widget/render"),this.#t("elementor/element/render")}onDestroy(...e){super.onDestroy(...e),this.#e("elementor/preview/atomic-widget/destroy"),this.#t("elementor/element/destroy")}attributes(){return{...super.attributes(),"data-atomic":"",style:"display: contents !important;"}}behaviors(){const e=["InlineEditing","Draggable","Resizable"],t=Object.entries(super.behaviors()).filter(([t])=>!e.includes(t));return Object.fromEntries(t)}getDomElement(){return this.$el.find(":first-child")}getHandlesOverlay(){return null}#e(e){window.top?.dispatchEvent(new CustomEvent(e,{detail:{id:this.model.get("id")}}))}#t(t){const n=this.getDomElement().get(0);n&&e.elementor?.$preview?.[0]?.contentWindow.dispatchEvent(new CustomEvent(t,{detail:{id:this.model.get("id"),type:this.model.get("widgetType"),element:n}}))}getContextMenuGroups(){return super.getContextMenuGroups().filter(e=>"save"!==e.name)}}}function fi({renderer:e,element:t}){const n=t.twig_main_template,r=t.base_styles_dictionary;return Object.entries(t.twig_templates).forEach(([t,n])=>{e.register(t,n)}),{templateKey:n,baseStylesDictionary:r,resolveProps:kn({transformers:pr,schema:t.atomic_props_schema})}}function hi(e){e._ensureViewIsIntact(),e._isRendering=!0,e.resetChildViewContainer(),e.triggerMethod("before:render",e)}function gi(e){e._isRendering=!1,e.isRendered=!0,e.triggerMethod("render",e)}function yi(e){e.children?.each(e=>{e.render()})}async function vi(e){const t=[];e.children?.each(e=>{e._currentRenderPromise&&t.push(e._currentRenderPromise)}),t.length>0&&await Promise.all(t)}function bi(e){return!!(e.atomic_props_schema&&e.twig_templates&&e.twig_main_template&&e.base_styles_dictionary)}function wi({type:e,renderer:t,element:n}){const r=pi(),{templateKey:o,baseStylesDictionary:i,resolveProps:s}=fi({type:e,renderer:t,element:n});return class extends r{_abortController=null;_lastResolvedSettingsHash=null;_domUpdateWasSkipped=!1;getTemplateType(){return"twig"}getNamespaceKey(){return e}renderOnChange(){this.render()}getRenderContext(){return this._parent?.getRenderContext?.()}getResolverRenderContext(){return this._parent?.getResolverRenderContext?.()}invalidateRenderCache(){this._lastResolvedSettingsHash=null}render(){this._abortController?.abort(),this._abortController=new AbortController;const e=Cn(this._abortController.signal).then(()=>this._beforeRender()).then(()=>this._renderTemplate()).then(()=>this._renderChildren()).then(()=>this._afterRender());return this._currentRenderPromise=e.execute(),this._currentRenderPromise}async _renderChildren(){this._shouldReuseChildren()?yi(this):super._renderChildren(),await vi(this)}_shouldReuseChildren(){return this._domUpdateWasSkipped&&this.children?.length>0}async _renderTemplate(){this.triggerMethod("before:render:template");const n=Cn(this._abortController?.signal).then((e,t)=>{const n=this.model.get("settings").toJSON();return s({props:n,signal:t,renderContext:this.getResolverRenderContext()})}).then(e=>this.afterSettingsResolve(e)).then(async n=>{const r=JSON.stringify(n);if(r===this._lastResolvedSettingsHash&&this.isRendered)return this._domUpdateWasSkipped=!0,null;this._domUpdateWasSkipped=!1,this._lastResolvedSettingsHash=r;const s={id:this.model.get("id"),interaction_id:this.getInteractionId(),type:e,settings:n,base_styles:i};return t.render(o,s)}).then(e=>{null!==e&&this.$el.html(e)});await n.execute(),this.bindUIElements(),this.triggerMethod("render:template")}afterSettingsResolve(e){return e}_beforeRender(){hi(this)}_afterRender(){gi(this)}_doAfterRender(e){this.isRendered?e():this.once("render",e)}_openEditingPanel(e){this._doAfterRender(()=>super._openEditingPanel(e))}getInteractionId(){const e=this.model.get("originId"),t=this.model.get("id");return e??t}}}function Ei(e){return bi(e)&&"support_nesting"in e&&!!e.support_nesting}function Ti({type:e,renderer:t,element:n,modelExtensions:r}){const o=window;return class extends o.elementor.modules.elements.types.Base{getType(){return e}getView(){return xi({type:e,renderer:t,element:n})}getModel(){const e=o.elementor.modules.elements.models.AtomicElementBase;return r&&Object.keys(r).length>0?e.extend(r):e}}}function Si(e){const t=e.get("id"),n=e.get("originId"),r={"data-model-cid":e.cid??"","data-interaction-id":n??t,"x-ignore":"true"};return Object.entries(r).map(([e,t])=>`${e}="${t}"`).join(" ")}function Ci(e){return["elementor-element","elementor-element-edit-mode",`elementor-element-${e.get("id")}`].join(" ")}function xi({type:e,renderer:t,element:n}){const r=window,{templateKey:o,baseStylesDictionary:i,resolveProps:s}=fi({type:e,renderer:t,element:n}),l=r.elementor.modules.elements.views.createAtomicElementBase(e),c=l.prototype._renderChildren,u=l.prototype._openEditingPanel,d=l.prototype.addElement;return l.extend({_abortController:null,_lastResolvedSettingsHash:null,_domUpdateWasSkipped:!1,template:!1,attributes(){return{"data-model-cid":this.model.cid}},getTemplateType(){return"twig"},invalidateRenderCache(){this._lastResolvedSettingsHash=null},renderOnChange(){this.render()},render(){this._abortController?.abort(),this._abortController=new AbortController;const e=Cn(this._abortController.signal).then(()=>this._beforeRender()).then(()=>this._renderTemplate()).then(()=>this._onTemplateReady()).then(()=>this._renderChildren()).then(()=>this._afterRender());return this._currentRenderPromise=e.execute(),this._currentRenderPromise},_beforeRender(){hi(this)},_onTemplateReady(){this.dispatchPreviewEvent("elementor/element/render")},_afterRender(){gi(this),this.dispatchPreviewEvent("elementor/element/rendered"),requestAnimationFrame(()=>{this._initAlpine()}),this.model.trigger("render:complete"),window.dispatchEvent(new CustomEvent(a.ELEMENT_STYLE_CHANGE_EVENT))},async _renderTemplate(){const n=this.model;this.triggerMethod("before:render:template");const r=Cn(this._abortController?.signal).then((e,t)=>{const r=n.get("settings").toJSON();return s({props:r,signal:t,renderContext:this.getResolverRenderContext?.()})}).then(async r=>{const s=JSON.stringify(r);if(s===this._lastResolvedSettingsHash&&this.isRendered)return this._domUpdateWasSkipped=!0,null;this._domUpdateWasSkipped=!1,this._lastResolvedSettingsHash=s;const a={id:n.get("id"),interaction_id:this.getInteractionId(),type:e,settings:r,base_styles:i,editor_attributes:Si(n),editor_classes:Ci(n)};return t.render(o,a)}).then(e=>{null!==e&&this._attachTwigContent(e)});await r.execute(),this.bindUIElements(),this.triggerMethod("render:template")},getRenderContext(){return this._parent?.getRenderContext?.()},getResolverRenderContext(){return this._parent?.getResolverRenderContext?.()},getChildType(){const e=n.allowed_child_types??[];return e&&e.length>0?e:l.prototype.getChildType.call(this)},_attachTwigContent(e){const t=r.jQuery(e),n=this.$el.get(0),o=t.get(0);if(!n||!o)return;this._destroyAlpine();const i=this.getHandlesOverlay()?.get(0)?.outerHTML??"",s=n.tagName!==o.tagName,a=s?(n.ownerDocument??document).createElement(o.tagName):n;Array.from(o.attributes).forEach(e=>{a.setAttribute(e.name,e.value)}),a.innerHTML=i+o.innerHTML,s&&(n.replaceWith(a),this.setElement(r.jQuery(a)))},async _renderChildren(){this._shouldReuseChildren()?yi(this):c.call(this),await vi(this),this._removeChildrenPlaceholder()},_shouldReuseChildren(){return this._domUpdateWasSkipped&&this.children?.length>0},_removeChildrenPlaceholder(){const e=this.$el.get(0);if(!e)return;const t=Array.from(e.childNodes).find(e=>e.nodeType===Node.COMMENT_NODE&&"elementor-children-placeholder"===e.nodeValue?.trim());t?.remove()},getChildViewContainer(){return this.childViewContainer="",this.$el},attachBuffer(e,t){const n=this.$el.get(0);if(!n)return;const r=Array.from(n.childNodes).find(e=>e.nodeType===Node.COMMENT_NODE&&"elementor-children-placeholder"===e.nodeValue?.trim());r?(r.parentNode?.insertBefore(t,r),r.remove()):n.append(t)},getDomElement(){return this.$el},onBeforeDestroy(){this._abortController?.abort()},onDestroy(){this.dispatchPreviewEvent("elementor/element/destroy")},_destroyAlpine(){const e=this.$el.get(0);if(!e)return;if(!e.getAttribute("x-data"))return;const t=e.ownerDocument?.defaultView;t?.Alpine?.destroyTree(e)},_initAlpine(){const e=this.$el.get(0);if(!e)return;if(e.removeAttribute("x-ignore"),!e.getAttribute("x-data"))return;const t=e.ownerDocument?.defaultView;t?.Alpine?.initTree(e)},_doAfterRender(e){this.isRendered?e():this.once("render",e)},_openEditingPanel(e){this._doAfterRender(()=>u.call(this,e))},addElement(e,t){return this.isRendered?d.call(this,e,t):function(e,t,n={}){const r=e.getContainer(),o={...t};if(o.id||(o.id=(0,a.generateElementId)()),o.elements||(o.elements=[]),!(0,a.addModelToParent)(r.id,o,n))return;const i=o.id,s=(0,a.findModelInDocument)(i);if(!s)return;const l={id:i,settings:{get:()=>({}),set:()=>({}),toJSON:()=>({})},parent:r,model:s,view:void 0,lookup(){return(0,a.getContainer)(i)??l}};return e.once("render",()=>{e.model?.trigger?.("navigator:add",s,n)}),!1!==n.edit&&function(e,t){e.once("render",()=>{const n=(0,a.getContainer)(t);n?.model?.trigger?n.model.trigger("request:edit"):e.model?.trigger?.("request:edit")})}(e,i),{getContainer:()=>l}}(this,e,t)},getInteractionId(){const e=this.model.get("originId"),t=this.model.get("id");return e??t}})}var _i=o(5338);const Ri="before",Ai="after",ki="never";class Oi{constructor(e){this.getSetting=e.getSetting,this.setSetting=e.setSetting,this.element=e.element,this.type=e.type,this.id=e.id,this.refreshView=e.refreshView,this.reactRoot=e.reactRoot,this.reactContainer=e.reactContainer}static getTypes(){return null}shouldRenderReplacement(){return!0}originalMethodsToTrigger(){return{_beforeRender:Ri,_afterRender:Ai,renderOnChange:ki,onDestroy:ki,render:ki}}}const Ii=["#elementor-editor-wrapper-v2","#elementor-navigator","#elementor-panel"],Pi={backgroundColor:"transparent",border:"none",outline:"none",boxShadow:"none",padding:"0",margin:"0",borderRadius:"0",overflow:"hidden",opacity:"0",pointerEvents:"none",position:"absolute",display:"block"},Ni={"e-button":"text","e-form-label":"text","e-heading":"title","e-paragraph":"paragraph","e-form-submit-button":"text"},Li=(e,t)=>t?e.querySelector(t):null,$i=(e,t)=>{const n=Di(e,t);n&&e.body.removeChild(n)},Mi=e=>`inline-editing-toolbar-anchor-${e}`,Di=(e,t)=>e.getElementById(Mi(t)),ji=(e,t,n)=>{const{width:r,height:o}=t;Object.assign(e.style,{...Pi,top:t.top-n.top+"px",left:t.left-n.left+"px",width:`${r}px`,height:`${o}px`})},Vi={name:"horizontalShifter",fn(e){const{x:t,y:n,elements:{reference:r,floating:o}}=e,i={...e,x:t,y:n};if(t<0)return i.x=0,i;const s=r.getBoundingClientRect(),a=t+o.offsetWidth,l=r.ownerDocument.body.offsetWidth;if(a>l&&s.right{const[l,c]=(0,_.useState)(!0),[u,d]=(0,_.useState)(null),{onSelectionEnd:m,anchor:p,clearAnchor:f}=((e,t)=>{const[n,r]=(0,_.useState)(null);(0,_.useEffect)(()=>{n||$i(e,t)},[n,e,t]);const o=(0,_.useCallback)(()=>{r(null)},[]);return{onSelectionEnd:n=>{const o=!n.state.selection.empty;$i(e,t),r(o?((e,t)=>{const n=e.defaultView,r=n?.getSelection();if(!r)return null;const o=r.getRangeAt(0).getBoundingClientRect(),i=e.body.getBoundingClientRect(),s=e.createElement("span");return ji(s,o,i),s.setAttribute("id",Mi(t)),e.body.appendChild(s),s})(e,t):null)},anchor:n,clearAnchor:o}})(r.ownerDocument,i);(0,_.useEffect)(()=>{l||(f(),a())},[l,f,a]);const h=(0,_.useCallback)(()=>{d(null),c(!1)},[]);return(e=>{const t=(0,_.useCallback)(()=>queueMicrotask(e),[e]);(0,_.useEffect)(()=>(Ii.forEach(e=>document?.querySelector(e)?.addEventListener("mousedown",t)),()=>Ii.forEach(e=>document?.querySelector(e)?.removeEventListener("mousedown",t))),[])})(h),(0,_.useEffect)(()=>{const e=o.ownerDocument,t=e=>{o.contains(e.target)||h()};return e.addEventListener("mousedown",t),()=>e.removeEventListener("mousedown",t)},[o,h]),l?_.createElement(L.ThemeProvider,null,_.createElement(zi,{expectedTag:n,rootElement:r,id:i}),_.createElement(ai.InlineEditor,{onEditorCreate:d,mountElement:o,editorProps:{attributes:{style:"outline: none; display: inherit; justify-content: inherit; align-items: inherit; flex-direction: inherit; text-align: inherit;"}},elementClasses:e,value:t,setValue:s,onBlur:h,autofocus:!0,onSelectionEnd:m}),p&&u&&_.createElement(Fi,{anchor:p,editor:u,id:i})):null},zi=({expectedTag:e,rootElement:t,id:n})=>{const r=Li(t,e),[o,i]=(0,_.useState)(r);return(0,_.useEffect)(()=>{i(Li(t,e))},[e,t]),o?_.createElement(ln,{element:o,id:n,isSelected:!0}):null},Fi=({anchor:e,editor:t,id:n})=>{const{refs:r,floatingStyles:o}=tn({placement:"top",strategy:"fixed",transform:!1,whileElementsMounted:bt,middleware:[Vi,At()]});return(0,_.useLayoutEffect)(()=>(r.setReference(e),()=>r.setReference(null)),[e,r]),_.createElement(Qt,{id:sn},_.createElement(L.Box,{ref:r.setFloating,role:"presentation",style:{...o,pointerEvents:"none"}},_.createElement(ai.InlineEditorToolbar,{editor:t,elementId:n})))},Wi=new Set([c.htmlV3PropTypeUtil.key,c.stringPropTypeUtil.key]);class Bi extends Oi{handlerAttached=!1;editing=!1;getReplacementKey(){return"inline-editing"}static getTypes(){return Object.keys(Ni)}isEditingModeActive(){return this.editing}shouldRenderReplacement(){return this.isInlineEditingEligible()&&"edit"===(0,s.getCurrentEditMode)()}handleRenderInlineEditor=()=>{!this.isEditingModeActive()&&this.isInlineEditingEligible()&&this.renderInlineEditor()};renderOnChange(){this.isEditingModeActive()||this.refreshView()}onDestroy(){this.resetInlineEditorRoot()}_beforeRender(){this.resetInlineEditorRoot()}_afterRender(){this.isInlineEditingEligible()&&!this.handlerAttached&&(this.element.addEventListener("click",this.handleRenderInlineEditor),this.handlerAttached=!0)}originalMethodsToTrigger(){const e=this.isEditingModeActive()?ki:Ri,t=this.isEditingModeActive()?ki:Ai;return{_beforeRender:e,_afterRender:t,renderOnChange:t,onDestroy:Ai,render:e}}resetInlineEditorRoot(){this.element.removeEventListener("click",this.handleRenderInlineEditor),this.handlerAttached=!1,this.reactRoot.render(null),this.editing=!1}unmountInlineEditor(){this.resetInlineEditorRoot(),this.refreshView()}isInlineEditingEligible(){const e=this.getInlineEditablePropertyName();return(({rawValue:e,propTypeFromSchema:t})=>null==e?(e=>{return!!e&&(!(!("key"in e)||(t=e.key,!Wi.has(t)))||"union"===e.kind&&[...Wi].some(t=>e.prop_types[t]));var t})(t):c.htmlV3PropTypeUtil.isValid(e)||c.stringPropTypeUtil.isValid(e))({rawValue:this.getSetting(e),propTypeFromSchema:this.getInlineEditablePropType()})}getInlineEditablePropertyName(){return Ni[this.type]??""}getInlineEditablePropType(){const e=(0,a.getElementType)(this.type)?.propsSchema,t=this.getInlineEditablePropertyName();return e?.[t]??null}getInlineEditablePropValue(){const e=this.getInlineEditablePropType(),t=this.getInlineEditablePropertyName();return this.getSetting(t)??e?.default??null}getExtractedContentValue(){const e=this.getInlineEditablePropValue(),t=c.htmlV3PropTypeUtil.extract(e);return c.stringPropTypeUtil.extract(t?.content??null)??""}setContentValue(e){const t=this.getInlineEditablePropertyName(),n=e||"",r=(0,c.parseHtmlChildren)(n),o=c.htmlV3PropTypeUtil.create({content:r.content?c.stringPropTypeUtil.create(r.content):null,children:r.children});(0,s.undoable)({do:()=>{const e=this.getInlineEditablePropValue();return this.runCommand(t,o),e},undo:(e,n)=>{this.runCommand(t,n??null)}},{title:(0,a.getElementLabel)(this.id),subtitle:(0,Yn.__)("%s edited","elementor").replace("%s",this.getInlineEditablePropTypeKey()??"Inline editing"),debounce:{wait:800}})()}getInlineEditablePropTypeKey(){const e=this.getInlineEditablePropType();if(!e)return null;if("union"===e.kind){const t=[c.htmlV3PropTypeUtil.key,c.stringPropTypeUtil.key];for(const n of t)if(e.prop_types[n])return n;return null}return"key"in e&&"string"==typeof e.key?e.key:null}runCommand(e,t){(0,s.__privateRunCommandSync)("document/elements/set-settings",{container:(0,a.getContainer)(this.id),settings:{[e]:t}},{internal:!0}),(0,s.__privateRunCommandSync)("document/save/set-is-modified",{status:!0},{internal:!0})}getExpectedTag(){const e=this.getTagPropType();return c.stringPropTypeUtil.extract(this.getSetting("tag")??null)??c.stringPropTypeUtil.extract(e?.default??null)??null}getTagPropType(){const e=(0,a.getElementType)(this.type)?.propsSchema;if(!e?.tag)return null;const t=e.tag??null;return"union"===t.kind?t.prop_types.string??null:t}renderInlineEditor(){this.isEditingModeActive()&&this.resetInlineEditorRoot();const e=this.element.children?.[0];if(!e)return;const t=e.classList.toString(),n=this.getExtractedContentValue(),r=this.getExpectedTag();e.innerHTML="",this.editing=!0,this.reactRoot.render(_.createElement(Ui,{elementClasses:t,initialValue:n,expectedTag:r,rootElement:this.element,contentElement:e,id:this.id,setValue:this.setContentValue.bind(this),requestDestroy:this.unmountInlineEditor.bind(this)}))}}const Hi=new Map,Gi=()=>{qi(Bi)},qi=e=>{const t=e.getTypes();t&&t.forEach(t=>{Hi.set(t,e)})},Yi=e=>{const t=wi(e);return class extends t{#n=null;#r;#o;#i;constructor(...e){super(...e);const t=this.model.get("settings");this.#o=this.el.ownerDocument.createElement("div"),this.#o.style.display="none",this.el.ownerDocument.body.appendChild(this.#o),this.#i=(0,_i.H)(this.#o),this.#r={getSetting:t.get.bind(t),setSetting:t.set.bind(t),element:this.el,type:this?.model?.get("widgetType")??this.container?.model?.get("elType")??null,id:this?.model?.get("id")??null,refreshView:this.refreshView.bind(this),reactRoot:this.#i,reactContainer:this.#o}}refreshView(){this.invalidateRenderCache?.(),this.render()}renderOnChange(){this.#s("renderOnChange")}render(){const e=this.#r,t=e.type,n=t?(r=t,Hi.get(r)??null):null;var r;n&&!this.#n&&(this.#n=new n(e)),this.#s("render")}onDestroy(){this.#s("onDestroy"),this.#i.unmount(),this.#o.remove()}_afterRender(){this.#s("_afterRender")}_beforeRender(){this.#s("_beforeRender")}#s(e){const n=t.prototype[e].bind(this),r=this.#n?.shouldRenderReplacement(),o=r&&this.#n?.[e]?.bind(this.#n);if(!o||!r)return n();const i=this.#n?.originalMethodsToTrigger()[e]??"never";"before"===i&&n(),o(),"after"===i&&n()}}},Xi=({type:e,renderer:t,element:n})=>{const r=window,o=Yi({type:e,renderer:t,element:n});return class extends r.elementor.modules.elements.types.Widget{getType(){return e}getView(){return o}}},Ki={},Ji={};function Zi(e,t){Ji[e]=t}function Qi(e,t){Ki[e]=t}function es(){(0,s.__privateListenTo)((0,s.v1ReadyEvent)(),()=>{const e=(0,a.getWidgetsCache)()??{},t=window,n=function(){const e=(0,ui.createArrayLoader)({}),t=(0,ui.createEnvironment)(e);return t.registerEscapingStrategy(di,"html_tag"),t.registerEscapingStrategy(mi,"full_url"),{register:e.setTemplate,render:t.render}}();!function(e){Object.entries(e).forEach(([e,t])=>{t.meta?.is_pro_promotion&&Qi(e,e=>function({type:e,renderer:t,element:n}){if(!Ei(n))throw new Error(`Element "${e}" is not a valid nested templated element.`);const r=Ti({type:e,renderer:t,element:n});let o=null;return class extends r{getView(){if(!o){const e=(new r).getView();o=function(e){return class extends e{_afterRender(){super._afterRender(),this.$el.off("click",".e-form-placeholder__remove-btn"),this.$el.on("click",".e-form-placeholder__remove-btn",e=>{e.preventDefault(),e.stopPropagation(),window.$e.run("document/elements/delete",{container:this.container})}),this.$el.off("click",".e-form-placeholder__unlock-btn"),this.$el.on("click",".e-form-placeholder__unlock-btn",e=>{e.stopPropagation()})}_renderChildren(){}behaviors(){const e=["InlineEditing","Draggable","Resizable"],t=Object.entries(super.behaviors()).filter(([t])=>!e.includes(t));return Object.fromEntries(t)}getContextMenuGroups(){return super.getContextMenuGroups().filter(e=>"save"!==e.name)}onDestroy(...e){super.onDestroy(...e),this.$el.off("click",".e-form-placeholder__remove-btn"),this.$el.off("click",".e-form-placeholder__unlock-btn")}}}(e)}return o}}}(e))})}(e),Object.entries(e).forEach(([e,r])=>{if(!r.atomic)return;const o=function(e,t,n){if(Ei(n)){const r=Ki[e];return r?r({type:e,renderer:t,element:n}):function(e,t,n){return Ti({type:e,renderer:t,element:n,modelExtensions:Ji[e]})}(e,t,n)}if(!bi(n))return function(e){const t=window;return class extends t.elementor.modules.elements.types.Widget{getType(){return e}getView(){return pi()}}}(e);const r=Ki[e];return r?r({type:e,renderer:t,element:n}):Xi({type:e,renderer:t,element:n})}(e,n,r);!function(e,t,n,r){if(!(bi(n)||Ei(n)))return;const o=e.elementor.elementsManager,i=Boolean(o.getElementTypeClass(t));try{o.registerElementType(new r)}catch{Ei(n)&&i&&(o.elementTypes[t]=new r)}}(t,e,r,o)})})}const ts={modifyDefaultChildren(e){if(!Array.isArray(e)||0===e.length)return e;const[t]=e,n=this.get("editor_settings")?.initial_position;if(!n||!t||"object"!=typeof t)return e;const r=t;return[{...r,settings:{...r.settings,paragraph:c.htmlV3PropTypeUtil.create({content:c.stringPropTypeUtil.create(`Tab ${n}`),children:[]})}},...e.slice(1)]}},ns="elementor://context/available-widgets",rs="elementor://context/available-widgets/v4",os="elementor://document/structure";function is(){const e=window,t=e.elementor?.documents?.getCurrent?.();if(!t)return{error:"No active document found"};const n=(t.container?.children||[]).map(e=>as(e));return{documentId:t.id,documentType:t.config.type,title:t.config.settings?.post_title||"Untitled",elements:n.filter(e=>null!==e)}}function ss(e){if(e.model?.config?.atomic)return"v4";const t=e.model?.attributes?.widgetType;return t&&(0,a.getWidgetsCache)()?.[t]?.atomic_props_schema?"v4":"v3"}function as(e){if(!e||!e.model)return null;const t=e.model.attributes,n={id:t.id,elType:t.elType,widgetType:t.widgetType||void 0,version:ss(e)},r=t.title||e.model?.editor_settings?.title;return r&&(n.title=r),e.children&&e.children.length>0&&(n.children=e.children.map(e=>as(e)).filter(e=>null!==e)),n}const ls="elementor://context/editor-state";function cs(){try{const e=window.elementor?.$previewContents?.[0];if(!e)return null;const t=[],n=e.cloneNode(!0);n.querySelectorAll(".elementor-editor-element-settings, #elementor-add-new-section").forEach(e=>{e.remove()});const r=(e,n=!1)=>{const o=e.classList?.contains("elementor-element")||n;if(e.nodeType===Node.TEXT_NODE&&o){const n=e.textContent?.trim().replace(/\s+/g," ");n&&n.length>2&&t.push(n)}else e.childNodes.forEach(e=>{r(e,o)})};r(n);const o=t.join(" ");return o.length>500?o.slice(0,500)+"...":o}catch{return null}}function us(){try{const e=window,t=e.elementor?.documents?.getCurrent?.(),n=t?.config?.settings?.post_title;if(n)return n;let r=document.title||"Page";return r=r.split(/\s*[‹»|–—-]\s*/)[0],r.trim()||"Page"}catch{return"Page"}}const ds="elementor://context/general",ms="elementor://context/selected-element";function ps(){const e=(0,a.getSelectedElements)();return 1!==e.length?{elementDisplayName:null,elementType:null,properties:null,selectedElementId:null,selectedParentId:null,version:null,widgetType:null}:fs((0,a.getContainer)(e[0].id))}function fs(e){if(!e?.id)return{elementDisplayName:null,elementType:null,properties:null,selectedElementId:null,selectedParentId:null,version:null,widgetType:null};const t=e.model.get("widgetType")??null,n=e.type??"widget";return{elementDisplayName:ys(e),elementType:n,properties:gs(e,t),selectedElementId:e.id,selectedParentId:e.parent?.id??null,version:hs(e,t),widgetType:t}}function hs(e,t){return e.model?.config?.atomic||t&&(0,a.getWidgetsCache)()?.[t]?.atomic_props_schema?"v4":"v3"}function gs(e,t){const n=e.settings?.toJSON?.();if(!n||"object"!=typeof n)return null;const r=t?(0,a.getWidgetsCache)()?.[t]:null,o=r?.controls,i={};for(const[e,t]of Object.entries(n)){if(null==t||""===t)continue;const n=o?.[e]?.default;void 0!==n&&JSON.stringify(t)===JSON.stringify(n)||(i[e]=t)}return Object.keys(i).length>0?i:null}function ys(e){try{if(e.label)return e.label;const t=e.model?.get?.("widgetType");return t?(t.charAt(0).toUpperCase()+t.slice(1)).replace(/-/g," "):"container"===e.type?"Container":"section"===e.type?"Section":`Element ${e.id}`}catch{return`Element ${e.id}`}}function vs(e,t){const n=window.elementorV2.editorVariables.Utils;return c.Schema.adjustLlmPropValueSchema(e,{forceKey:t,transformers:n.globalVariablesLLMResolvers})}const bs=e=>{const{elementId:t,propertyName:n,propertyValue:r,elementType:o}=e;if("_styles"===n){const e=(0,a.getElementStyles)(t)||{},n=r,o=(0,u.getStylesSchema)(),i=Object.fromEntries(Object.entries(n).map(([e,t])=>{if("custom_css"===e)return[e,t];const{key:n,kind:r}=o?.[e]||{};if(!n&&"union"!==r)throw new Error(`_styles property ${e} is not supported.`);return[e,vs(t,n)]}));let s;Object.keys(n).forEach(e=>{const t=o[e];if("custom_css"===e){let t=n[e];return"object"==typeof t&&t&&t.value&&(t=String(t.value)),t||(t=""),void(s={raw:btoa(t)})}if(!t)throw new Error(`Style property ${e} is not supported.`);if("plain"===t.kind&&"object"!=typeof n[e]){const r=(0,c.getPropSchemaFromCache)(t.key);if(r){const t=r.create(n[e]);n[e]=t}}}),delete i.custom_css;const l=Object.values(e).find(e=>"local"===e.label);return void(l?(0,a.updateElementStyle)({elementId:t,styleId:l.id,meta:{breakpoint:"desktop",state:null},...void 0!==s?{custom_css:s}:{},props:{...i}}):(0,a.createElementStyle)({elementId:t,...void 0!==s?{custom_css:s}:{},classesProp:"classes",label:"local",meta:{breakpoint:"desktop",state:null},props:{...i}}))}const i=(0,a.getWidgetsCache)()?.[o]?.atomic_props_schema;if(!i)throw new Error(`No prop schema found for element type: ${o}`);if(!i[n]){const e=Object.keys(i);throw new Error(`Property "${n}" does not exist on element type "${o}". Available properties are: ${e.join(", ")}`)}const l=i[n].key,d=vs(r,l),{valid:m,jsonSchema:p}=c.Schema.validatePropValue(i[n],r);if(!m)throw new Error(`Invalid PropValue for elementId: ${t}. PropKey: ${l}, PropValue: ${JSON.stringify(r)}\nExpected Schema: ${p}`);(0,a.updateElementSettings)({id:t,props:{[n]:d},withHistory:!1}),(0,s.__privateRunCommandSync)("document/save/set-is-modified",{status:!0},{internal:!0})};let ws=null;const Es={get widgetsSchema(){if(!ws){const e={},t=(0,a.getWidgetsCache)();if(!t)return{};Object.entries(t).forEach(([t,n])=>{n.atomic_props_schema&&(e[t]=structuredClone(n.atomic_props_schema))}),ws=e}return ws},validateProps(e,t,n=[]){if(!e)throw new Error("No schema provided for validation.");const r=[];let o=!1;return Object.entries(t).forEach(([t,i])=>{if(n.includes(t))return;const s=e[t];if(s)if(c.Schema.isPropKeyConfigurable(t,s)){const{valid:e}=c.Schema.validatePropValue(s,i);e||r.push(`Invalid property "${t}". Validate input with resource [${w.replace("{category}",t)}]`)}else r.push(`Property "${t}" is not configurable.`);else r.push(`Property "${t}" is not defined in the schema.`),o=!0}),o&&r.push("Available properties: "+Object.keys(e).join(", ")),{errors:r,valid:0===r.length}},validateStyles(e){const t=(0,u.getStylesSchema)(),n=e.custom_css,r=this.validateProps(t,e,["custom_css","$intention"]),o=()=>{r.valid=!1,r.errors=r.errors||[],r.errors.push('Invalid property "custom_css". Expected a string value.')};return n&&"object"==typeof n?"string"!=typeof n.value&&o():"string"!=typeof n&&null!=n&&o(),r},validatePropSchema(e,t,n=[]){const r=this.widgetsSchema[e];return r?this.validateProps(r,t,n):{valid:!1,errors:[`No schema found for widget type "${e}".`]}}};class Ts{constructor(e,t){this.elementType=e,this.requiredTemplates=d(t[e])}enforce(e){if(0===this.requiredTemplates.length)return;const t=[];for(const n of Array.from(e.children))this.collectMissingRequiredErrors(n,t);if(t.length)throw new Error(`${t.join("\n")}\nUse the widget schema resource; under llm_guidance.required_direct_children for V4 widgets.`)}collectMissingRequiredErrors(e,t){if(e.tagName===this.elementType){const n=new Set(Array.from(e.children).map(e=>e.tagName)),r=this.requiredTemplates.map(e=>e.widgetType??e.elType??"").filter(e=>e&&!n.has(e));if(r.length){const n=e.getAttribute("configuration-id"),o=n?`<${e.tagName} configuration-id="${n}">`:`<${e.tagName}>`;t.push(`${o} Missing required direct child element tag(s): ${r.join(", ")}.`)}}for(const n of Array.from(e.children))this.collectMissingRequiredErrors(n,t)}}class Ss{elementConfig={};elementStylesConfig={};elementCustomCSS={};rootContainers=[];api={createElement:a.createElement,deleteElement:a.deleteElement,getWidgetsCache:a.getWidgetsCache,generateElementId:a.generateElementId,getContainer:a.getContainer,doUpdateElementProperty:bs};static fromXMLString(e,t={}){const n=(new DOMParser).parseFromString(e,"application/xml"),r=n.querySelector("parsererror");if(r)throw new Error("Failed to parse XML string: "+r.textContent);return new Ss({xml:n,api:t})}constructor(e){const{api:t={},elementConfig:n={},stylesConfig:r={},customCSS:o={},xml:i}=e;this.xml=i,Object.assign(this.api,t),this.setElementConfig(n),this.setStylesConfig(r),this.setCustomCSS(o)}setElementConfig(e){this.elementConfig=e}setStylesConfig(e){this.elementStylesConfig=e}setCustomCSS(e){this.elementCustomCSS=e}getXML(){return this.xml}buildModelTree(e,t){const n=e.tagName,r="widget"===t[n]?.elType,o=this.api.generateElementId(),i=Array.from(e.children).map(e=>this.buildModelTree(e,t));e.setAttribute("id",o);const s={id:o,skipDefaultChildren:!0,elements:i,editor_settings:{title:e.getAttribute("configuration-id")??void 0},elType:"widget"};return r?{...s,elType:"widget",widgetType:n}:{...s,elType:n}}async awaitViewRender(e){const t=e.view;t?._currentRenderPromise instanceof Promise?await t._currentRenderPromise:await Promise.resolve()}validateChildTypes(e,t){const n=[],r=t[e.tagName]?.allowed_child_types;if(r?.length)for(const t of Array.from(e.children))r.includes(t.tagName)||n.push(`"${t.tagName}" is not allowed as a child of "${e.tagName}". Allowed: ${r.join(", ")}`);for(const r of Array.from(e.children))n.push(...this.validateChildTypes(r,t));return n}matchNodeByConfigId(e){const t=this.xml.querySelector(`[configuration-id="${e}"]`);if(!t)throw new Error(`Configuration id "${e}" does not have target node.`);const n=t.getAttribute("id");if(!n)throw new Error(`Node with configuration id "${e}" does not have element id.`);const r=this.api.getContainer(n);if(!r)throw new Error(`Element with id "${n}" not found but should exist.`);return{element:r,node:t}}async applyProperties(){const e=[],t=[],n={},r=new Set([...Object.keys(this.elementConfig),...Object.keys(this.elementStylesConfig),...Object.keys(this.elementCustomCSS)]);for(const o of r){let r,i;try{({element:r,node:i}=this.matchNodeByConfigId(o))}catch(n){const r=n.message;this.elementConfig[o]&&e.push(r),(this.elementStylesConfig[o]||this.elementCustomCSS[o])&&t.push(r);continue}const s=this.elementConfig[o];if(s)for(const[t,n]of Object.entries(s))try{this.api.doUpdateElementProperty({elementId:r.id,propertyName:t,propertyValue:n,elementType:i.tagName})}catch(t){e.push(t.message)}const a=this.elementStylesConfig[o];if(a){const e={};for(const[o,i]of Object.entries(a)){const{valid:s,errors:l}=Es.validateStyles({[o]:i});s?e[o]=i:(a.$intention&&(n[r.id]=n[r.id]||[],n[r.id].push(o)),t.push(...l||[]))}if(Object.keys(e).length>0)try{this.api.doUpdateElementProperty({elementId:r.id,propertyName:"_styles",propertyValue:e,elementType:i.tagName})}catch(e){t.push(String(e))}}const l=this.elementCustomCSS[o];if(l)try{this.api.doUpdateElementProperty({elementId:r.id,propertyName:"_styles",propertyValue:{custom_css:l},elementType:i.tagName})}catch(e){t.push(String(e))}await this.awaitViewRender(r)}return{configErrors:e,styleErrors:t,invalidStyles:n}}async build(e){const t=this.api.getWidgetsCache()||{};new Set(this.xml.querySelectorAll("*")).forEach(e=>{if(!t[e.tagName])throw new Error(`Unknown widget type: ${e.tagName}`)}),Object.keys(t).filter(e=>d(t[e]).length>0).forEach(e=>{new Ts(e,t).enforce(this.xml)});const n=[];for(const e of Array.from(this.xml.children))n.push(...this.validateChildTypes(e,t));if(n.length)throw new Error(`Invalid element structure:\n${n.join("\n")}`);const r=Array.from(this.xml.children);for(const n of r){const r=this.buildModelTree(n,t);try{const t=this.api.createElement({container:e,model:r,options:{useHistory:!1}});this.rootContainers.push(t),await this.awaitViewRender(t)}catch(e){const t=this.api.getContainer(r.id);throw t&&this.api.deleteElement({container:t,options:{useHistory:!1}}),e}}const{configErrors:o,styleErrors:i,invalidStyles:s}=await this.applyProperties();return{configErrors:o,styleErrors:i,invalidStyles:s,rootContainers:[...this.rootContainers]}}}const Cs="elementor://canvas/tools/build-compositions-guide",xs=()=>{const e=(0,l.toolPrompts)("build-compositions");return e.description(`\n# RESOURCES (Read before use)\n- [elementor://global-classes] - Check FIRST for reusable classes\n- [elementor://global-variables] - ONLY use variables defined here\n- [${ns}/v4]\n\n# TOOL SUPPORT\nThis tool support v4 elements only\n\n# WORKFLOW\n1. Check/create global classes via "create-global-class" tool\n2. Build composition (THIS TOOL) - minimal inline styles\n3. Apply classes via "apply-global-class" tool\n\n# XML STRUCTURE\n- Use widget tags: \`\`\n- Containers: "e-flexbox", "e-div-block", "e-tabs"\n- Every element needs unique "configuration-id"\n- No attributes, classes, IDs, or text nodes in XML\n\n## NESTED ELEMENTS\nSome elements have internal tree structures (nesting). When using these elements, you MUST build the FULL tree in XML.\n- Check \`llm_guidance.nesting\` in widget schemas for structure requirements\n- \`llm_guidance.required_direct_children\` lists element types that must appear as direct child tags in XML (from widget defaults)\n- \`allowed_child_types\` lists which element types can be nested inside\n- \`allowed_parents\` lists which element types this element can be placed inside\n\n# CONFIGURATION\n- Map configuration-id → elementConfig (props) + stylesConfig (layout only)\n- All PropValues require \`$$type\` matching schema\n- NO LINKS in configuration\n- Retry on errors up to 10x\n\nNote about configuration ids: These names are visible to the end-user, make sure they make sense, related and relevant.\n\n# DESIGN PHILOSOPHY: CONTEXT-DRIVEN CREATIVITY\n\n**Use the user's context aggressively.** Business type, brand personality, target audience, and purpose should drive every design decision. A law firm needs gravitas; a children's app needs playfulness. Don't default to generic.\n\n## SIZING: DEFAULT IS NO SIZE (CRITICAL)\n\n**DO NOT specify height or width unless you have a specific visual reason.**\n\nFlexbox and CSS already handle sizing automatically:\n- Containers grow to fit their content\n- Flex children distribute space via flex properties, not width/height\n- Text elements size to their content\n\nWHEN TO SPECIFY SIZE:\n- min-height on ROOT section for viewport-spanning hero (use min-height, NOT height)\n- max-width for contained content areas (e.g., max-width: 60rem)\n- Explicit aspect ratios for media containers\n\nNEVER SPECIFY:\n- height on nested containers (causes overflow)\n- width on flex children (use flex-basis or gap instead)\n- 100vh on anything except root-level sections\n- Any size "just to be safe" - if unsure, OMIT IT\n\nvh units are VIEWPORT-relative. Nested 100vh inside 100vh = 200vh overflow.\n\nGOOD: \`content naturally sizes\`\nBAD: \`overflow\`\n\n## Layout Variety (Break the Template)\n- AVOID: Full-width 100vh hero → three columns → testimonials → CTA (every AI does this)\n- VARY heights: Use auto-height sections with generous padding (6rem+). Let content breathe\n- VARY widths: Not everything spans full width. Use contained sections (max-width: 960px) mixed with edge-to-edge\n- ASYMMETRIC grids: 2:1, 1:3, offset layouts. Avoid equal column widths\n- Negative space as design element: Large margins create focus and sophistication\n- Break alignment intentionally: Offset headings, overlapping elements, broken grids\n\n## Visual Depth & Effects\n- Layer elements: Overlapping cards, text over images, floating elements\n- Subtle shadows with color tint (not pure black): \`box-shadow: 0 20px 60px rgba(, 0.15)\`\n- Gradient overlays on images for text readability\n- Border radius variation: Mix sharp (0) and soft (1rem+) corners purposefully\n- Backdrop blur for glassmorphism where appropriate\n- Micro-interactions via CSS: hover transforms, transitions (0.3s ease)\n\n## Typography with Character\n- Display fonts for headlines (from user's brand or contextually appropriate)\n- Size contrast: 4rem+ headlines vs 1rem body. Make hierarchy unmistakable\n- Letter-spacing: Tight for large headlines (-0.02em), loose for small caps (0.1em)\n- Line-height: Tight for headlines (1.1), generous for body (1.6-1.8)\n- Text decoration: Underlines, highlights, gradient text for emphasis\n\n## Color with Purpose\n- Extract palette from user context (brand colors, industry norms, mood)\n- 60-30-10 rule: dominant, secondary, accent\n- Tinted neutrals over pure grays: warm (#faf8f5, #2d2a26) or cool (#f5f7fa, #1e2430)\n- Color blocking: Large colored sections create visual rhythm\n- Gradient directions: Diagonal (135deg, 225deg) feel more dynamic than vertical\n\n## Spacing Strategy\n- Section padding: 6rem-10rem vertical, creating breathing room\n- Rhythm variation: Tight groups (2rem) with generous gaps between (6rem)\n- Use rem/em exclusively for responsive scaling\n- Generous padding on CTAs: min 1rem 2.5rem\n\n# HARD CONSTRAINTS\n- Variables ONLY from [elementor://global-variables] (others throw errors)\n- Avoid SVG widgets unless assets are pre-uploaded\n- Check \`llm_guidance\` in widget schemas\n\n# PARAMETERS\n- **xmlStructure**: Valid XML with configuration-id attributes\n- **elementConfig**: configuration-id → widget PropValues\n- **stylesConfig**: configuration-id → style PropValues (layout only)\n- **customCSS**: configuration-id → CSS rules (no selectors, semicolon-separated)\n `),e.example('\nSection with heading + button (NO explicit heights - content sizes naturally):\n{\n xmlStructure: "",\n elementConfig: {\n "section1": { "tag": { "$$type": "string", "value": "section" } }\n },\n customCSS: {\n "Section Title": "padding: 6rem 4rem; background: linear-gradient(135deg, #faf8f5 0%, #f0ebe4 100%);"\n },\n stylesConfig: {\n "Section Title": {\n "font-size": { "$$type": "size", "value": { "size": { "$$type": "number", "value": 3.5 }, "unit": { "$$type": "string", "value": "rem" } } },\n "color": { "$$type": "color", "value": { "$$type": "string", "value": "#2d2a26" } }\n }\n }\n}\nNote: No height/width specified on any element - flexbox handles layout automatically.\n'),e.parameter("xmlStructure","Valid XML structure with custom elementor tags and configuration-id attributes."),e.parameter("elementConfig","Record mapping configuration IDs to widget PropValues."),e.parameter("stylesConfig","Record mapping configuration IDs to style PropValues (layout/positioning only)."),e.instruction("Element IDs in the returned XML represent actual widgets. Use these IDs for subsequent styling or configuration changes."),e.prompt()};var _s=window.elementorV2.schema;const Rs={xmlStructure:_s.z.string().describe("The XML structure representing the composition to be built"),elementConfig:_s.z.record(_s.z.string().describe("The configuration id"),_s.z.record(_s.z.string().describe("property name"),_s.z.any().describe(`The PropValue for the property, refer to ${v}`))).describe("A record mapping element IDs to their configuration objects. REQUIRED"),stylesConfig:_s.z.record(_s.z.string().describe("The configuration id"),_s.z.record(_s.z.string().describe("StyleSchema property name"),_s.z.any().describe(`The PropValue for the style property. MANDATORY, refer to [${w}]`))).describe(`A record mapping element IDs to their styles configuration objects. Use the actual styles schema from [${w}].`).default({}),customCSS:_s.z.record(_s.z.string().describe("The configuration id"),_s.z.string().describe("The custom CSS for the element. MANDATORY")).describe("A record mapping element IDs to their custom CSS.").default({})},As={errors:_s.z.string().describe("Error message if the composition building failed").optional(),xmlStructure:_s.z.string().describe("The built XML structure as a string. Must use this XML after completion of building the composition, it contains real IDs.").optional(),llm_instructions:_s.z.string().describe("Instructions what to do next, Important to follow these instructions!").optional()},ks="elementor://canvas/tools/configure-element-guide",Os=()=>{const e=(0,l.toolPrompts)("configure-element");return e.description(`\nConfigure an existing element on the page.\n\n# **CRITICAL - REQUIRED INFORMATION (Must read before using this tool)**\n1. [${v}]\n Required to understand which widgets are available, and what are their configuration schemas.\n Every widgetType (i.e. e-heading, e-button) that is supported has it's own property schema, that you must follow in order to apply parameter values correctly.\n2. [${w}]\n Required to understand the styles schema for the widgets. All widgets share the same styles schema, grouped by categories.\n Use this resource to understand which style properties are available for each element, and how to structure the "stylePropertiesToChange" parameter.\n3. If not sure about the PropValues schema, you can use the "get-element-configuration-values" tool to retrieve the current PropValues configuration of the element.\n\nBefore using this tool, check the definitions of the elements PropTypes at the resource "widget-schema-by-type" at editor-canvas__elementor://widgets/schema/{widgetType}\nAll widgets share a common _style property for styling, which uses the common styles schema.\nRetrieve and check the common styles schema at the resource list "styles-schema" at editor-canvas__elementor://styles/schema/{category}\n\n# When to use this tool\nWhen a user requires to change anything in an element, such as updating text, colors, sizes, or other configurable properties.\nThis tool handles elements of type "widget".\nThis tool handles styling elements, using the "stylePropertiesToChange" parameter.\n\nTo CLEAR a property (i.e., set it to default or none), provide null as a value.\n\nThe element's schema must be known before using this tool.\nThe style schema must be known before using this tool.\n\nAttached resource link describing how PropType schema should be parsed as PropValue for this tool.\n\nRead carefully the PropType Schema of the element and it's styles, then apply correct PropValue according to the schema.\n\nPropValue structure:\n{\n "$$type": string, // MANDATORY as defined in the PropType schema under the "key" property\n value: unknown // The value according to the PropType schema for kinds of "array", use array with PropValues items inside. For "object", read the shape property of the PropType schema. For "plain", use strings.\n}\n\n\nALWAYS MAKE SURE you have the PropType schemas for the element you are configuring, and the common-styles schema for styling. If you are not sure, retrieve the schema from the resources mentioned above.\n\n\nYou can use multiple property changes at once by providing multiple entries in the propertiesToChange object, including _style alongside non-style props.\nSome properties are nested, use the root property name, then objects with nested values inside, as the complete schema suggests.\n\nMake sure you have the "widget-schema-by-type" resource available to retrieve the PropType schema for the element type you are configuring.\nMake sure you have the "styles-schema" resources available to retrieve the common styles schema.\n\n# How to configure elements\nWe use a dedicated PropType Schema for configuring elements, including styles. When you configure an element, you must use the EXACT PropType Value as defined in the schema.\nFor styleProperties, use the style schema provided, as it also uses the PropType format.\nFor all non-primitive types, provide the key property as defined in the schema as $$type in the generated object, as it is MANDATORY for parsing.\n\nUse the EXACT "PROP-TYPE" Schema given, and ALWAYS include the "key" property from the original configuration for every property you are changing.\n`),e.parameter("elementId","The ID of the element to configure. MANDATORY."),e.parameter("elementType","The type of the element to configure (i.e. e-heading, e-button). MANDATORY."),e.parameter("propertiesToChange","An object containing the properties to change, with their new values. MANDATORY. When updating a style only, provide an empty object."),e.parameter("stylePropertiesToChange","An object containing the style properties to change, with their new values. OPTIONAL."),e.example(`\n\`\`\`json\n{\n propertiesToChange: {\n // List of properties TO CHANGE, following the PropType schema for the element as defined in the resource [${v}]\n title: {\n $$type: 'string',\n value: 'New Title Text'\n },\n border: {\n $$type: 'boolean',\n value: false\n },\n },\n stylePropertiesToChange: {\n 'line-height': {\n $$type: 'size',\n value: {\n size: {\n $$type: 'number',\n value: 20\n },\n unit: {\n $$type: 'string',\n value: 'px'\n }\n }\n }\n },\n elementId: 'element-id',\n elementType: 'element-type'\n};\n\`\`\`\n`),e.instruction("The $$type property is MANDATORY for every value; it is required to parse the value and apply application-level effects."),e.instruction("\nV4 only: If MCP fails, give manual steps using V4 UI.\n\nV4 Editor structure:\nPanel tabs: General (→ Settings section: ID, Tag, Link), Style, Interactions.\nNO Advanced tab. Never mention Advanced tab.\n"),e.prompt()},Is=(Os(),{propertiesToChange:_s.z.record(_s.z.string().describe("The property name."),_s.z.any().describe(`PropValue, refer to [${v}] by correct type, as appears in elementType`),_s.z.any()).describe("An object record containing property names and their new values to be set on the element"),stylePropertiesToChange:_s.z.record(_s.z.string().describe("The style property name"),_s.z.any().describe(`The style PropValue, refer to [${w}] how to generate values`),_s.z.any()).describe("An object record containing style property names and their new values to be set on the element").default({}),elementType:_s.z.string().describe("The type of the element to retrieve the schema"),elementId:_s.z.string().describe("The unique id of the element to configure")}),Ps={success:_s.z.boolean().describe("Whether the configuration change was successful, only if propertyName and propertyValue are provided")};function Ns(e){const{propertyName:t,elementId:n,elementType:r,error:o,propertyType:i}=e;return`Failed to update property "${t}" on element "${n}": ${o.message}.\n${"prop"===i?`\nCheck the element's PropType schema at the resource [${v.replace("{widgetType}",r)}] for type "${r}" to ensure the property exists and the value matches the expected PropType.\nNow that you have this information, ensure you have the schema and try again.`:`\nCheck the styles schema at the resource [${w.replace("{category}",t)}] at editor-canvas__elementor://styles/schema/{category} to ensure the style property exists and the value matches the expected PropType.\n`};\n}`}const Ls={elementId:_s.z.string()},$s={properties:_s.z.record(_s.z.string(),_s.z.any()).describe("A record mapping PropTypes to their corresponding PropValues"),style:_s.z.record(_s.z.string(),_s.z.any()).describe("A record mapping StyleSchema properties to their corresponding PropValues"),childElements:_s.z.array(_s.z.object({id:_s.z.string(),elementType:_s.z.string(),childElements:_s.z.array(_s.z.any()).describe("An array of child element IDs, when applicable, same structure recursively")})).describe("An array of child element IDs, when applicable, with recursive structure")},Ms=e=>(e.children||[]).map(e=>({id:e.id,elementType:e.model.get("elType")||e.model.get("widgetType")||"unknown",childElements:Ms(e)})),Ds=e=>{(e=>{const{resource:t}=e;t("styles-best-practices",T,{description:"Styling best practices"},async()=>({contents:[{uri:T,text:`# Styling best practices\nPrefer using "em" and "rem" values for text-related sizes, padding and spacing. Use percentages for dynamic sizing relative to parent containers.\nThis flexboxes are by default "flex" with "stretch" alignment. To ensure proper layout, define the "justify-content" and "align-items" as in the schema.\n\nWhen applicable for styles, apply style PropValues using the ${w}.\nThe css string must follow standard CSS syntax, with properties and values separated by semicolons, no selectors, or nesting rules allowed.\n\n** CRITICAL - VARIABLES **\nWhen using global variables, ensure that the variables are defined in the elementor://global-variables resource.\nVariables from the user context ARE NOT SUPPORTED AND WILL RESOLVE IN ERROR.\n\n`}]})),t("styles-schema",new l.ResourceTemplate(w,{list:()=>({resources:[...Object.keys((0,u.getStylesSchema)())].filter(e=>"all"!==e).map(e=>({uri:`elementor://styles/schema/${e}`,name:"Style schema for "+e}))})}),{description:"Common styles schema for the specified category (applicable for V4 elements only)"},async(e,t)=>{const n="string"==typeof t.category?t.category:t.category?.[0],r=(0,u.getStylesSchema)()[n];if(!r)throw new Error(`No styles schema found for category: ${n}`);const o=c.Schema.propTypeToJsonSchema(r);return{contents:[{uri:e.toString(),mimeType:"application/json",text:JSON.stringify(c.Schema.enrichWithIntention(o,'Desired CSS in format "property: value;"'))}]}}),t("widget-schema-by-type",new l.ResourceTemplate(v,{list:()=>{const e=(0,a.getWidgetsCache)()||{};return{resources:Object.keys(e).filter(t=>p(e[t])).map(e=>({uri:`elementor://widgets/schema/${e}`,name:"Widget schema for "+e}))}}}),{description:"PropType schema for the specified widget type"},async(e,t)=>{const n="string"==typeof t.widgetType?t.widgetType:t.widgetType?.[0],r=(0,a.getWidgetsCache)()?.[n];if(!r)throw new Error(`No prop schema found for element type: ${n}`);const o=r.atomic_props_schema;if(!o){if(!m(r.controls))throw new Error(`No prop schema found for element type: ${n}`);const t=function(e){if(!m(e))return{};const t={};for(const[n,r]of Object.entries(e)){if(!r||"object"!=typeof r)continue;const e=r,o="string"==typeof e.type?e.type:void 0;if(o&&g.has(o))continue;const i={};if(Object.prototype.hasOwnProperty.call(e,"default")&&(i.default=e.default),o&&(i.type=o),Object.prototype.hasOwnProperty.call(e,"options")&&void 0!==e.options){const t=e.options;t&&"object"==typeof t&&!Array.isArray(t)?i.options=Object.keys(t):i.options=t}t[n]=i}return t}(r.controls);return{contents:[{uri:e.toString(),mimeType:"application/json",text:JSON.stringify({widget_version:"v3",message:"This widget exists in the editor but has no atomic props schema (V4). Use control_metadata as non-authoritative hints from legacy controls.",fields_note:"All settings are optional; there is no JSON schema for this widget type.",properties:t})}]}}const i=Object.fromEntries(Object.entries(o).filter(([e,t])=>c.Schema.isPropKeyConfigurable(e,t)).map(([e,t])=>[e,c.Schema.propTypeToJsonSchema(t)])),s="string"==typeof r?.meta?.description?r.meta.description:void 0,l={},u=r?.base_styles;u&&Object.values(u).forEach(e=>{e.variants.forEach(e=>{Object.assign(l,e.props)})});const p=Object.keys(l).length>0,f={can_have_children:!!r?.meta?.is_container};p&&(f.instructions="These are the default styles applied to the widget. Override only when necessary.",f.default_styles=l);const h=r.allowed_child_types,y=(0,a.getWidgetsCache)()||{},v=Object.entries(y).filter(([,e])=>e.allowed_child_types?.includes(n)).map(([e])=>e);(h?.length||v.length)&&(f.nesting={...h?.length?{allowed_child_types:h}:{},...v.length?{allowed_parents:v}:{}});const b=d(r).map(e=>e.widgetType??e.elType??"").filter(e=>Boolean(e));return b.length&&(f.required_direct_children=b),{contents:[{uri:e.toString(),mimeType:"application/json",text:JSON.stringify({type:"object",properties:i,description:s,llm_guidance:f})}]}})})(e),(e=>{const{resource:t,sendResourceUpdated:n}=e,r=(e,t=()=>!0)=>{const n=h().filter(t);return{contents:[{uri:e,mimeType:"application/json",text:JSON.stringify(n,null,2)}]}};t("available-widgets-v4",rs,{description:"All registered v4 version widgets"},async()=>r(rs,e=>"v4"===e.version)),t("available-widgets",ns,{description:"All registered widget types with v3/v4 version metadata and description."},async()=>r(ns));const o=(0,s.v1ReadyEvent)().name,i=()=>{0!==h().length&&(window.removeEventListener(o,i),n({uri:ns,...r(ns)}),n({uri:rs,...r(rs,e=>"v4"===e.version)}))};window.addEventListener(o,i),i()})(e),(e=>{const{resource:t,sendResourceUpdated:n}=e;let r=null;const o=()=>{const e=is(),t=JSON.stringify(e,null,2);t!==r&&(r=t,n({uri:os}))};(0,s.__privateListenTo)([(0,s.commandEndEvent)("document/elements/create"),(0,s.commandEndEvent)("document/elements/delete"),(0,s.commandEndEvent)("document/elements/move"),(0,s.commandEndEvent)("document/elements/copy"),(0,s.commandEndEvent)("document/elements/paste"),(0,s.commandEndEvent)("editor/documents/attach-preview"),(0,s.commandEndEvent)("editor/documents/switch")],o),o(),t("document-structure",os,{description:"Document structure."},async()=>({contents:[{uri:os,text:JSON.stringify(is(),null,2)}]}))})(e),(e=>{const{resource:t,sendResourceUpdated:n}=e;let r=null;const o=e=>{const t=JSON.stringify(e);t!==r&&(r=t,n({uri:ms}))};(0,s.__privateListenTo)([(0,s.commandEndEvent)("document/elements/select"),(0,s.commandEndEvent)("document/elements/deselect-all"),(0,s.commandEndEvent)("document/elements/settings")],e=>{if("command"!==e.type)return;const t=e;if("document/elements/deselect-all"===t.command)return void o({elementDisplayName:null,elementType:null,properties:null,selectedElementId:null,selectedParentId:null,version:null,widgetType:null});if("document/elements/select"!==t.command&&"document/elements/settings"!==t.command)return;const{container:n}=t.args||{};o(n?.id?fs(n):ps())}),o(ps()),t("selected-element",ms,{description:"Currently selected Elementor element context."},async()=>({contents:[{uri:ms,text:JSON.stringify(ps(),null,2)}]}))})(e),(e=>{const{resource:t,sendResourceUpdated:n}=e;let r="";const o=()=>({currentlyViewedScreen:"The user is currently viewing the Elementor editor",pageContent:cs(),pageTitle:us()});(0,s.__privateListenTo)([(0,s.commandEndEvent)("editor/documents/switch"),(0,s.commandEndEvent)("editor/documents/attach-preview")],()=>{const e=JSON.stringify(o());e!==r&&(r=e,n({uri:ls}))}),r=JSON.stringify(o()),t("editor-state",ls,{description:"Editor page title, preview text snapshot, and viewed screen label."},async()=>({contents:[{uri:ls,text:JSON.stringify(o(),null,2)}]}))})(e),(e=>{const{resource:t,sendResourceUpdated:n}=e;let r=null;const o=()=>{const e=window,t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new URLSearchParams(location.search).get("post"),r=n?Number(n):null,o=null!==r&&Number.isFinite(r)?r:null,i=(()=>{const e=window,t=e.elementor?.documents?.getCurrent?.()?.config?.settings?.post_title;return t?.trim()?t:null})(),s=new URL(window.location.href),a=s.pathname+s.search,l=i||"Elementor Editor",c=e.angieConfig?.plugins;return{timezone:t,postId:o,currentPage:{pageName:l,pageTitle:i,pageUrl:a},...c&&{plugins:c}}},i=()=>{const e=JSON.stringify(o());e!==r&&(r=e,n({uri:ds}))};t("general-context",ds,{description:"General context: timezone, post id, and current page."},async()=>({contents:[{uri:ds,mimeType:"application/json",text:JSON.stringify(o(),null,2)}]})),(0,s.__privateListenTo)([(0,s.commandEndEvent)("editor/documents/switch"),(0,s.commandEndEvent)("editor/documents/attach-preview"),(0,s.commandEndEvent)("document/elements/settings")],i),i()})(e),(e=>{const{addTool:t,resource:n}=e;n("build-compositions-guide",Cs,{title:"Build Compositions Guide",description:"Detailed guide for using the build-compositions tool",mimeType:"text/plain"},async e=>({contents:[{uri:e.href,mimeType:"text/plain",text:xs()}]})),t({name:"build-compositions",description:"Build V4 element compositions on the Elementor canvas. Read the guide resource before use.",schema:Rs,requiredResources:[{description:"Build compositions guide",uri:Cs},{description:"Widgets schema",uri:v},{description:"Styles schema",uri:w},{description:"Global Classes",uri:"elementor://global-classes"},{description:"Global Variables",uri:"elementor://global-variables"},{description:"Styles best practices",uri:T},{description:"Available widgets for this tool",uri:rs}],outputSchema:As,modelPreferences:{hints:[{name:"claude-sonnet-4-5"}]},handler:async e=>{!function(e){const t=(new DOMParser).parseFromString(e,"application/xml");if(t.querySelector("parsererror"))throw new Error("Failed to parse XML string: "+t);const n=(0,a.getWidgetsCache)()??{};for(const e of t.querySelectorAll("*")){const t=e.tagName,r=n[t];if(r&&"widget"===r.elType&&!r.atomic_props_schema)throw new Error(`This tool does not support V3 elements. Please use the elementor-v3-mcp tools instead for element type: ${t}`)}}(e.xmlStructure);const{xmlStructure:t,elementConfig:n,stylesConfig:r,customCSS:o}=e;let i="";const s=[],l=[],c=(0,a.getContainer)("document"),u=(0,A.getCurrentDocument)(),d=function(e,t){const n=e.children?.[0];return t===A.COMPONENT_DOCUMENT_TYPE&&n?n:e}(c,u?.type.value);try{const e=Ss.fromXMLString(t,{createElement:a.createElement,deleteElement:a.deleteElement,getWidgetsCache:a.getWidgetsCache});e.setElementConfig(n),e.setStylesConfig(r),e.setCustomCSS(o);const{invalidStyles:c,configErrors:u,rootContainers:m}=await e.build(d);l.push(...m),i=(new XMLSerializer).serializeToString(e.getXML()),u.length?s.push(...u.map(e=>new Error(e))):Object.entries(c).forEach(([e,t])=>{const n={value:t.join(";\n")};bs({elementId:e,propertyName:"_styles",propertyValue:{_styles:{custom_css:n}},elementType:"widget"})})}catch(e){s.push(e)}if(s.length){l.forEach(e=>{(0,a.deleteElement)({container:e,options:{useHistory:!1}})});const e=s.map(e=>"string"==typeof e?e:e instanceof Error?e.message||String(e):"object"==typeof e&&null!==e?JSON.stringify(e):String(e)).filter(e=>e&&""!==e.trim()&&"{}"!==e&&"null"!==e&&"undefined"!==e);if(0===e.length)throw new Error("Failed to build composition: Unknown error occurred. No error details available.");const t=`Failed to build composition with the following errors:\n\n${e.join("\n\n")}`;throw new Error(t)}return{xmlStructure:i,errors:s?.length?s.map(e=>"string"==typeof e?e:e.message).join("\n\n"):void 0,llm_instructions:'The composition was built successfully with element IDs embedded in the XML.\n\n**CRITICAL NEXT STEPS** (Follow in order):\n1. **Apply Global Classes**: Use "apply-global-class" tool to apply the global classes you created BEFORE building this composition\n - Check the created element IDs in the returned XML\n - Apply semantic classes (heading-primary, button-cta, etc.) to appropriate elements\n\n2. **Fine-tune if needed**: Use "configure-element" tool only for element-specific adjustments that don\'t warrant global classes\n\nRemember: Global classes ensure design consistency and reusability. Don\'t skip applying them!\n'}}})})(e),(e=>{const{addTool:t}=e;t({name:"get-element-configuration-values",description:"Retrieve the element's configuration PropValues for a specific element by unique ID.",schema:Ls,outputSchema:$s,modelPreferences:{intelligencePriority:.6,speedPriority:.9},handler:async({elementId:e})=>{const t=(0,a.getContainer)(e);if(!t)throw new Error(`Element with ID ${e} not found.`);const n=t.model.get("widgetType")||t.model.get("elType")||"",r=(0,a.getWidgetsCache)()?.[n];if(!r)throw new Error(`Unknown element type: ${n}. Check the available-widgets resource for valid types.`);if(!r.atomic_props_schema)throw new Error(`This tool does not support V3 elements. Please use the elementor-v3-mcp tools instead for element type: ${n}`);const o=t.settings,i=(0,a.getWidgetsCache)()?.[n]?.atomic_props_schema;if(!o||!i)throw new Error(`No settings or prop schema found for element ID: ${e}`);const s={},l={};c.Schema.configurableKeys(i).forEach(e=>{s[e]=structuredClone(o.get(e))});const u=(0,a.getElementStyles)(e)||{},d=Object.values(u).find(e=>"local"===e.label);if(d){const e=d.variants.find(e=>"desktop"===e.meta.breakpoint&&!e.meta.state);if(e){const t=e.props||{};Object.keys(t).forEach(e=>{void 0!==t[e]&&(l[e]=structuredClone(t[e]))}),e.custom_css&&(l.custom_css=atob(e.custom_css.raw))}}return{properties:{...s},style:{...l},childElements:Ms(t)}}})})(e),(e=>{const{addTool:t,resource:n}=e;n("configure-element-guide",ks,{title:"Configure Element Guide",description:"Detailed guide for using the configure-element tool",mimeType:"text/plain"},async e=>({contents:[{uri:e.href,mimeType:"text/plain",text:Os()}]})),t({name:"configure-element",description:"Configure an existing V4 element's properties and styles. Read the guide resource before use.",schema:Is,outputSchema:Ps,requiredResources:[{description:"Widgets schema",uri:v},{description:"Styles schema",uri:w},{description:"Configure element guide",uri:ks}],modelPreferences:{hints:[{name:"claude-sonnet-4-5"}],intelligencePriority:.8,speedPriority:.7},handler:({elementId:e,propertiesToChange:t,elementType:n,stylePropertiesToChange:r})=>{const o=(0,a.getWidgetsCache)()?.[n];if(!o)throw new Error(`Unknown element type: ${n}. Check the available-widgets resource for valid types.`);if(!o.atomic_props_schema)throw new Error(`This tool does not support V3 elements. Please use the elementor-v3-mcp tools instead for element type: ${n}`);const i=Object.entries(t),{valid:s,errors:l}=Es.validatePropSchema(n,t),{valid:c,errors:u}=Es.validateStyles(r||{});if(!s){const t=`Failed to configure element "${e}" due to invalid properties: ${l?.join("\n- ")}`;throw new Error(t)}if(!c){const t=`Failed to configure element "${e}" due to invalid style properties: ${u?.join("\n- ")}`;throw new Error(t)}for(const[t,r]of i)try{bs({elementId:e,elementType:n,propertyName:t,propertyValue:r})}catch(r){const o=Ns({propertyName:t,elementId:e,elementType:n,error:r,propertyType:"prop"});throw new Error(o)}for(const[t,o]of Object.entries(r||{}))try{bs({elementId:e,elementType:n,propertyName:"_styles",propertyValue:{[t]:o}})}catch(r){const o=Ns({propertyName:`(style) ${t}`,elementId:e,elementType:n,propertyType:"style",error:r});throw new Error(o)}return{success:!0}}})})(e),(e=>{const{resource:t,sendResourceUpdated:n}=e,r=()=>{const{breakpoints:e}=window.elementor?.config?.responsive||{};return e?Object.values(e).filter(e=>e.is_enabled).map(e=>{const{direction:t,label:n,value:r}=e;return{label:n,constraint:t,value:r}}):[]},o=()=>({contents:[{uri:S,mimeType:"application/json",text:JSON.stringify(r())}]});t("breakpoints ",S,{description:"Breakpoints list."},()=>o()),window.addEventListener((0,s.v1ReadyEvent)().name,()=>{n({uri:S,...o()})})})(e)},js=v.replace("{widgetType}","element-schema"),Vs=`Elementor Canvas MCP\nThis MCP enables creation, configuration, and styling of elements on the Elementor canvas using the build_composition tool.\n\n# Core Concepts\n\n## PropValues Structure\nAll data in Elementor uses PropValues - a typed wrapper for values:\n\`\`\`json\n{\n "$$type": "the-prop-type-schema-kind",\n "value": "the-actual-value-as-defined-for-the-propType"\n}\n\`\`\`\nThe \`$$type\` defines how Elementor interprets the value. Providing the correct \`$$type\` is critical - incorrect types will be rejected.\n\n## Design System Resources\n- **Global Variables**: Reusable colors, sizes, and fonts (\`elementor://global-variables\`)\n- **Global Classes**: Reusable style sets that can be applied to elements (\`elementor://global-classes\`)\n- **Widget Schemas**: Configuration options for each widget type (\`${v}\`)\n- **Style Schema**: Common styles shared across all widgets and containers (\`${w}\`)\n\n# Building Compositions with build_composition\n\nThe \`build_composition\` tool is the primary way to create elements. It accepts structure (XML), configuration, and styling in a single operation.\n\n## Complete Workflow\n\n### 1. Parse User Requirements\nUnderstand what needs to be built: structure, content, and styling.\n\n### 2. Check Global Resources FIRST\nAlways check existing resources before building:\n- List \`elementor://global-variables\` for available variables (colors, sizes, fonts)\n- List \`elementor://global-classes\` for available style sets\n- **Always prefer using existing global resources over creating inline styles**\n\n### 3. Retrieve Widget Schemas\nFor each widget you'll use:\n- List \`${v}\` to see available widgets\n- Retrieve configuration schema from \`${js}\` for each widget\n- Check the \`llm_guidance\` property to understand if a widget is a container (can have children)\n\n### 4. Build XML Structure\nCreate valid XML with configuration-ids:\n- Each element must have a unique \`configuration-id\` attribute\n- No text nodes, classes, or IDs in XML - structure only\n- Example:\n\`\`\`xml\n\n \n \n\n\`\`\`\n\n### 5. Create elementConfig\nMap each configuration-id to its widget properties using PropValues:\n- Use correct \`$$type\` matching the widget's schema\n- Use global variables in PropValues where applicable\n- Example:\n\`\`\`json\n{\n "heading-1": {\n "text": { "$$type": "string", "value": "Welcome" },\n "tag": { "$$type": "string", "value": "h1" }\n }\n}\n\`\`\`\n\n### 6. Create stylesConfig\nMap each configuration-id to style PropValues from \`${w}\`:\n- Use global variables for colors, sizes, and fonts\n- Example using global variable:\n\`\`\`json\n{\n "heading-1": {\n "color": { "$$type": "global-color-variable", "value": "primary-color-id" },\n "font-size": { "$$type": "size", "value": "2rem" }\n }\n}\n\`\`\`\n\n### 7. Execute build_composition\nCall the tool with your XML structure, elementConfig, and stylesConfig. The response will contain the created element IDs.\nAt the response you will also find llm_instructions for you to do afterwards, read and follow them!\n\n## Key Points\n\n- **PropValue Types**: Arrays that accept union types are typed as mixed arrays\n- **Visual Sizing**: Widget sizes MUST be defined in stylesConfig. Widget properties like image "size" control resolution, not visual appearance\n- **Global Variables**: Reference by ID in PropValues (e.g., \`{ "$$type": "global-color-variable", "value": "variable-id" }\`)\n- **Naming Conventions**: Use meaningful, purpose-based names (e.g., "primary-button", "heading-large"), not value-based names (e.g., "blue-style", "20px-padding")\n\n## Example: e-image PropValue Structure\n\`\`\`json\n{\n "$$type": "image",\n "value": {\n "src": {\n "$$type": "image-src",\n "value": {\n "url": { "$$type": "url", "value": "https://example.com/image.jpg" }\n }\n },\n "size": { "$$type": "string", "value": "full" }\n }\n}\n\`\`\`\nNote: The "size" property controls image resolution/loading, not visual size. Set visual dimensions in stylesConfig.\n`,Us={href:"https://go.elementor.com/element-link-inside-link-infotip",target:"_blank",color:"inherit",variant:"text",sx:{marginInlineStart:"20px"},children:"Learn more"};function zs(e){const{containers:t=[e.container],storageType:n}=e,r=t;if("localstorage"!==n)return!1;const o=window?.elementorCommon?.storage?.get();if(!o?.clipboard?.elements)return!1;const i=o.clipboard.elements,s={type:"default",message:(0,Yn.__)("To paste a link to this element, first remove the link from it's parent container.","elementor"),id:"paste-in-link-blocked",additionalActionProps:[Us]},a=Ws(i,r);return a&&(0,qn.notify)(s),a}function Fs(e){const{containers:t=[e.container],target:n}=e,r=t,o=n,i={type:"default",message:(0,Yn.__)("To drag a link to this element, first remove the link from it's parent container.","elementor"),id:"move-in-link-blocked",additionalActionProps:[Us]},s=Ws(r,[o]);return s&&(0,qn.notify)(i),s}function Ws(e,t){return!(!e?.length||!t?.length)&&(!!e.some(e=>!!e?.id&&((0,a.isElementAnchored)(e.id)||!!(0,a.getAnchoredDescendantId)(e.id)))&&t.some(e=>!!e?.id&&((0,a.isElementAnchored)(e.id)||!!(0,a.getAnchoredAncestorId)(e.id))))}function Bs(e){const{containers:t=[e.container]}=e;return t.some(Hs)}function Hs(e){return!!e&&Boolean(qs(e))}function Gs(e){const t=qs(e);if(!t)return null;const[n]=Object.entries(t).find(([,e])=>"plain"===e.kind&&e.key===c.CLASSES_PROP_KEY)??[];return n??null}function qs(e){const t=e?.model.get("widgetType")||e?.model.get("elType"),n=(0,a.getWidgetsCache)(),r=n?.[t];return r?.atomic_props_schema??null}function Ys(e){return e.length>1?(0,Yn.__)("Elements","elementor"):(0,a.getElementLabel)(e[0].id)}const Xs=()=>(0,s.undoable)({do:({containers:e,newStyle:t})=>e.map(e=>{const n=e.id,r=Gs(e);if(!r)return null;const o=(0,a.getElementStyles)(e.id),[i,s]=Object.entries(o??{})[0]??[],l=Object.keys(s??{}).length?s:null,c={styleId:i,originalStyle:l};if(i)t.variants.forEach(({meta:e,props:t,custom_css:r})=>{(0,a.updateElementStyle)({elementId:n,styleId:i,meta:e,props:t,custom_css:r})});else{const[e]=t.variants,o=t.variants.slice(1);c.styleId=(0,a.createElementStyle)({elementId:n,classesProp:r,label:k.ELEMENTS_STYLES_RESERVED_LABEL,...e,additionalVariants:o})}return c}),undo:({containers:e},t)=>{e.forEach((e,n)=>{const r=t[n];if(!r)return;if(!r.originalStyle)return void(0,a.deleteElementStyle)(e.id,r.styleId);const o=Gs(e);if(!o)return;const[i]=r.originalStyle.variants,s=r.originalStyle.variants.slice(1);(0,a.createElementStyle)({elementId:e.id,classesProp:o,label:k.ELEMENTS_STYLES_RESERVED_LABEL,styleId:r.styleId,...i,additionalVariants:s})})}},{title:({containers:e})=>Ys(e),subtitle:(0,Yn.__)("Style Pasted","elementor")});const Ks=()=>(0,s.undoable)({do:({containers:e})=>e.map(e=>{const t=e.model.get("id"),n=(0,a.getElementStyles)(t);return Object.keys(n??{}).forEach(e=>(0,a.deleteElementStyle)(t,e)),n}),undo:({containers:e},t)=>{e.forEach((e,n)=>{const r=Gs(e);if(!r)return;const o=e.model.get("id"),i=t[n];Object.entries(i??{}).forEach(([e,t])=>{const[n]=t.variants,i=t.variants.slice(1);(0,a.createElementStyle)({elementId:o,classesProp:r,styleId:e,label:k.ELEMENTS_STYLES_RESERVED_LABEL,...n,additionalVariants:i})})})}},{title:({containers:e})=>Ys(e),subtitle:(0,Yn.__)("Style Reset","elementor")});function Js(){Pn.register("size",Yo).register("shadow",qo).register("stroke",Ko).register("dimensions",Uo(["block-start","block-end","inline-start","inline-end"],({propKey:e,key:t})=>`${e}-${t}`)).register("filter",zo).register("backdrop-filter",zo).register("box-shadow",Vo(",")).register("background",Do).register("background-overlay",$o).register("background-color-overlay",Io).register("background-image-overlay",No).register("background-gradient-overlay",Po).register("gradient-color-stop",Vo(",")).register("color-stop",jo).register("background-image-position-offset",Go).register("background-image-size-scale",Lo).register("image-src",Sr).register("image",xr).register("object-position",Go).register("span",Xo).register("transform-origin",ti).register("perspective-origin",Ho).register("transform-move",Qo).register("transform-scale",oi).register("transform-rotate",ri).register("transform-skew",si).register("transform-functions",Jo).register("transform",Uo(["transform-functions","transform-origin","perspective","perspective-origin"],({key:e})=>"transform-functions"===e?"transform":e)).register("transition",li).register("layout-direction",Uo(["row","column"],({propKey:e,key:t})=>`${t}-${e}`)).register("flex",Wo).register("border-width",Uo(["block-start","block-end","inline-start","inline-end"],({key:e})=>`border-${e}-width`)).register("border-radius",Uo(["start-start","start-end","end-start","end-end"],({key:e})=>`border-${e}-radius`)).registerFallback(_r),function(){const e=Xs();(0,s.blockCommand)({command:"document/elements/paste-style",condition:Bs}),(0,s.__privateListenTo)((0,s.commandStartEvent)("document/elements/paste-style"),t=>function(e,t){const{containers:n=[e.container],storageKey:r}=e,o=n.filter(Hs);if(!o.length)return;const i=function(e="clipboard"){try{const t=JSON.parse(localStorage.getItem("elementor")??"{}");return t[e]?.elements}catch{return}}(r),[s]=i??[],l=(0,a.getContainer)(s.id);if(!s||!l||!Hs(l))return;const u=s.styles,d=Object.values(u??{})[0],m=function(e,t){const n=Gs(e);if(!n)return[];const r=(0,a.getElementSetting)(e.id,n);return r?.value.filter(e=>e!==t?.id)??[]}(l,d);m.length&&function(e,t){e.forEach(e=>{const n=Gs(e);if(!n)return;const r=(0,a.getElementSetting)(e.id,n),o=c.classesPropTypeUtil.extract(r)??[],i=c.classesPropTypeUtil.create(Array.from(new Set([...t,...o])));(0,a.updateElementSettings)({id:e.id,props:{[n]:i}})})}(o,m),d&&t({containers:o,newStyle:d})}(t.args,e))}(),function(){const e=Ks();(0,s.blockCommand)({command:"document/elements/reset-style",condition:Bs}),(0,s.__privateListenTo)((0,s.commandStartEvent)("document/elements/reset-style"),t=>function(e,t){const{containers:n=[e.container]}=e,r=n.filter(Hs);r.length&&t({containers:r})}(t.args,e))}(),(0,s.blockCommand)({command:"document/elements/paste",condition:zs}),(0,s.blockCommand)({command:"document/elements/move",condition:Fs}),(0,s.blockCommand)({command:"document/elements/create",condition:cr}),(0,s.blockCommand)({command:"document/elements/move",condition:ur}),(0,s.blockCommand)({command:"document/elements/paste",condition:dr}),(0,s.blockCommand)({command:"document/elements/create",condition:or}),(0,s.blockCommand)({command:"document/elements/move",condition:ir}),(0,s.blockCommand)({command:"document/elements/paste",condition:sr}),Gi(),es(),pr.register("classes",function(){const e=new Map;return t=>t.map(t=>function(e,t){if(!t.has(e)){const n=k.stylesRepository.getProviders().find(t=>t.actions.all().find(t=>t.id===e));if(!n)return e;t.set(e,n.getKey())}const n=t.get(e),r=k.stylesRepository.getProviderByKey(n);return r?.actions.resolveCssName(e)??e}(t,e)).filter(Boolean)}()).register("link",wr).register("query",Er).register("image",xr).register("image-src",Sr).register("svg-src",ko).register("video-src",Oo).register("attributes",hr).register("date-time",yr).register("html-v2",vr).register("html-v3",br).register("date-range",gr).register("time-range",Tr).registerFallback(_r),(0,x.injectIntoTop)({id:"elements-overlays",component:dn}),(0,x.injectIntoTop)({id:"canvas-style-render",component:Gn}),(0,x.injectIntoTop)({id:"canvas-interactions-render",component:gn}),(0,x.injectIntoLogic)({id:"classes-rename",component:I}),Ds((0,l.getMCPByDomain)("canvas",{instructions:"Everything related to V4 ( Atomic ) canvas.\n# Canvas workflow for new compositions\n- Configure elements settings and styles\n- Build compositions/sections out of V4 atomic elements using context aware designs using the website resources\n- Get and retrieve element configuration values\n",docs:Vs})),Zi("e-tab",ts)}const Zs=["elementor-element"],Qs=()=>{ra()?.panelElements?.trigger("element:drag:end")},ea=(e,t)=>{ta(t);const n=ra();n?.editor.reply("element:dragged",null),n?.panelElements.reply("element:selected",oa(e)).trigger("element:drag:start")},ta=e=>{const t={groups:na(e)};e.dataTransfer?.setData(JSON.stringify(t),"true")},na=e=>{const t=e.dataTransfer?.getData("text/plain");return t?JSON.parse(t).groups:Zs},ra=()=>{const e=window,t=e.elementor?.channels;if(!t)throw new Error("Elementor channels not found: Elementor editor is not initialized or channels are unavailable.");return t},oa=({settings:e,...t})=>{const n=window,r=n.elementor?.modules?.elements?.models?.Element;if(!r)throw new Error("Elementor legacy Element model not found in editor modules");return{model:new r({...t,custom:{isPreset:!!e,preset_settings:e}})}},ia="elementor/global-styles/imported";function sa(e,t){const n=e.map(e=>{const t=(0,a.getContainer)(e)?.view;if(t&&function(e){return"function"==typeof e?._doAfterRender}(t))return new Promise(e=>t._doAfterRender(e))}).filter(Boolean);n.length>0?Promise.all(n).then(()=>t(e)):t(e)}(window.elementorV2=window.elementorV2||{}).editorCanvas=i}(),window.elementorV2.editorCanvas?.init?.();