PATH:
home
/
lab2454c
/
argowells.com
/
wp-content
/
plugins
/
elementor
/
assets
/
js
/
packages
/
editor-canvas
/*! For license information please see editor-canvas.min.js.LICENSE.txt */ !function(){"use strict";var e,t,n={3404:function(e,t,n){var r=n(3617);t.H=r.createRoot,r.hydrateRoot},3617:function(e){e.exports=window.ReactDOM},7557:function(e){e.exports=window.React},9106: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,l={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,n){var r,a={},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)&&!l.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:a,_owner:s.current}}t.jsx=a,t.jsxs=a},9370:function(e,t,n){e.exports=n(9106)}},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 l=2&r&&n;("object"==typeof l||"function"==typeof l)&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).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_URI:function(){return l},DOCUMENT_STRUCTURE_URI:function(){return qr},STYLE_SCHEMA_URI:function(){return f},UnknownStyleStateError:function(){return bn},UnknownStyleTypeError:function(){return vn},WIDGET_SCHEMA_URI:function(){return p},createPropsResolver:function(){return mn},createTemplatedElementView:function(){return Sr},createTransformer:function(){return _n},createTransformersRegistry:function(){return hn},endDragElementFromPanel:function(){return _o},init:function(){return $o},isAtomicWidget:function(){return So},registerElementType:function(){return Yr},settingsTransformersRegistry:function(){return kn},startDragElementFromPanel:function(){return Ao},styleTransformersRegistry:function(){return gn}});var s=window.elementorV2.editorV1Adapters;const l="elementor://breakpoints/list";var a=window.elementorV2.editorElements,c=window.elementorV2.editorMcp,u=window.elementorV2.editorProps,d=window.elementorV2.editorStyles;const p="elementor://widgets/schema/{widgetType}",f="elementor://styles/schema/{category}",m="elementor://styles/best-practices";var h=window.elementorV2.editor,g=window.elementorV2.editorInteractions,y=o(7557),v=o.t(y,2),b=window.elementorV2.editorDocuments,w=window.elementorV2.editorStylesRepository,E=window.elementorV2.utils;const S=()=>((0,y.useEffect)(()=>{const e=x();return()=>{e()}},[]),null),x=()=>w.stylesRepository.subscribe((e,t)=>{e&&t&&Object.keys(t).forEach(n=>{if(!e[n]||(0,E.hash)(e[n])===(0,E.hash)(t[n]))return;const r=e[n],o=t[n];r.label!==o.label&&T(r.label,o.label)})}),T=(e,t)=>{Object.values((0,b.getV1DocumentsManager)().documents).forEach(n=>{const r=n.container;r.view?.el?.querySelectorAll(`.elementor .${e}`).forEach(n=>{n.classList.replace(e,t)})})};var R=window.elementorV2.ui;function C(){return"undefined"!=typeof window}function P(e){return _(e)?(e.nodeName||"").toLowerCase():"#document"}function $(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function k(e){var t;return null==(t=(_(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function _(e){return!!C()&&(e instanceof Node||e instanceof $(e).Node)}function A(e){return!!C()&&(e instanceof Element||e instanceof $(e).Element)}function O(e){return!!C()&&(e instanceof HTMLElement||e instanceof $(e).HTMLElement)}function I(e){return!(!C()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof $(e).ShadowRoot)}const M=new Set(["inline","contents"]);function L(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=q(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!M.has(o)}const j=new Set(["table","td","th"]);function N(e){return j.has(P(e))}const V=[":popover-open",":modal"];function D(e){return V.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const z=["transform","translate","scale","rotate","perspective"],U=["transform","translate","scale","rotate","perspective","filter"],W=["paint","layout","strict","content"];function F(e){const t=B(),n=A(e)?q(e):e;return z.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||U.some(e=>(n.willChange||"").includes(e))||W.some(e=>(n.contain||"").includes(e))}function B(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const H=new Set(["html","body","#document"]);function Y(e){return H.has(P(e))}function q(e){return $(e).getComputedStyle(e)}function X(e){return A(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if("html"===P(e))return e;const t=e.assignedSlot||e.parentNode||I(e)&&e.host||k(e);return I(t)?t.host:t}function K(e){const t=G(e);return Y(t)?e.ownerDocument?e.ownerDocument.body:e.body:O(t)&&L(t)?t:K(t)}function J(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=K(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=$(o);if(i){const e=Q(s);return t.concat(s,s.visualViewport||[],L(o)?o:[],e&&n?J(e):[])}return t.concat(o,J(o,[],n))}function Q(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Z=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),ee="undefined"==typeof Element,te=ee?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ne=!ee&&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},re=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&&re(e.parentNode)},oe=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!re(i,!1))if("SLOT"===i.tagName){var s=i.assignedElements(),l=s.length?s:i.children,a=oe(l,!0,n);n.flatten?r.push.apply(r,a):r.push({scopeParent:i,candidates:a})}else{te.call(i,Z)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var c=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),u=!re(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(c&&u){var d=oe(!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},ie=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},se=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))&&!ie(e)?0:e.tabIndex},le=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ae=function(e){return"INPUT"===e.tagName},ce=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},ue=function(e,t){return!(t.disabled||re(t)||function(e){return ae(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=te.call(e,"details>summary:first-of-type")?e.parentElement:e;if(te.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ce(e)}else{if("function"==typeof r){for(var i=e;e;){var s=e.parentElement,l=ne(e);if(s&&!s.shadowRoot&&!0===r(s))return ce(e);e=e.assignedSlot?e.assignedSlot:s||l===e.ownerDocument?s:l.host}e=i}if(function(e){var t,n,r,o,i=e&&ne(e),s=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(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));!l&&s;){var a,c,u;l=!(null===(c=s=null===(a=i=ne(s))||void 0===a?void 0:a.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(s))}return l}(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<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!te.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},de=function(e,t){return!(function(e){return function(e){return ae(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||ne(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||se(t)<0||!ue(e,t))},pe=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},fe=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=se(e);return n<0&&t&&!ie(e)?0:n}(i,o),l=o?fe(e.candidates):i;0===s?o?t.push.apply(t,l):t.push(i):n.push({documentOrder:r,tabIndex:s,item:e,isScope:o,content:l})}),n.sort(le).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},me=function(e,t){var n;return n=(t=t||{}).getShadowRoot?oe([e],t.includeContainer,{filter:de.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:pe}):function(e,t,n){if(re(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Z));return t&&te.call(e,Z)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,de.bind(null,t)),fe(n)};function he(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&I(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ge(e){return(null==e?void 0:e.ownerDocument)||document}function ye(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var ve="undefined"!=typeof document?y.useLayoutEffect:function(){};function be(e){const t=y.useRef(e);return ve(()=>{t.current=e}),t}const we={...v}.useInsertionEffect||(e=>e());function Ee(e){const t=y.useRef(()=>{});return we(()=>{t.current=e}),y.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}const Se=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function xe(e,t){const n=me(e,Se()),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}(ge(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function Te(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!he(n,r)}function Re(e){me(e,Se()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Ce(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 Pe=o(9370),$e=o(3617);const ke=Math.min,_e=Math.max,Ae=Math.round,Oe=Math.floor,Ie=e=>({x:e,y:e});function Me(e,t){return"function"==typeof e?e(t):e}function Le(e){return e.split("-")[0]}function je(e){return e.split("-")[1]}const Ne=new Set(["top","bottom"]);function Ve(e){return Ne.has(Le(e))?"y":"x"}function De(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 ze(e,t,n){let{reference:r,floating:o}=e;const i=Ve(t),s=function(e){return"x"===Ve(e)?"y":"x"}(t),l="y"===s?"height":"width",a=Le(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let f;switch(a){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(je(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}const Ue=new Set(["left","top"]);function We(e){const t=q(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=O(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=Ae(n)!==i||Ae(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function Fe(e){return A(e)?e:e.contextElement}function Be(e){const t=Fe(e);if(!O(t))return Ie(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=We(t);let s=(i?Ae(n.width):n.width)/r,l=(i?Ae(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const He=Ie(0);function Ye(e){const t=$(e);return B()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:He}function qe(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Fe(e);let s=Ie(1);t&&(r?A(r)&&(s=Be(r)):s=Be(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==$(e))&&t}(i,n,r)?Ye(i):Ie(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=$(i),t=r&&A(r)?$(r):r;let n=e,o=Q(n);for(;o&&r&&t!==n;){const e=Be(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;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=i,c+=s,n=$(o),o=Q(n)}}return De({width:u,height:d,x:a,y:c})}function Xe(e,t){const n=X(e).scrollLeft;return t?t.left+n:qe(k(e)).left+n}function Ge(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Xe(e,n),y:n.top+t.scrollTop}}const Ke=new Set(["absolute","fixed"]);function Je(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=$(e),r=k(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;const e=B();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,a=o.offsetTop)}const c=Xe(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:l,y:a}}(e,n);else if("document"===t)r=function(e){const t=k(e),n=X(e),r=e.ownerDocument.body,o=_e(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=_e(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Xe(e);const l=-n.scrollTop;return"rtl"===q(r).direction&&(s+=_e(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}(k(e));else if(A(t))r=function(e,t){const n=qe(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=O(e)?Be(e):Ie(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=Ye(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return De(r)}function Qe(e,t){const n=G(e);return!(n===t||!A(n)||Y(n))&&("fixed"===q(n).position||Qe(n,t))}function Ze(e,t,n){const r=O(t),o=k(t),i="fixed"===n,s=qe(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=Ie(0);function c(){a.x=Xe(o)}if(r||!r&&!i)if(("body"!==P(t)||L(o))&&(l=X(t)),r){const e=qe(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?Ie(0):Ge(o,l);return{x:s.left+l.scrollLeft-a.x-u.x,y:s.top+l.scrollTop-a.y-u.y,width:s.width,height:s.height}}function et(e){return"static"===q(e).position}function tt(e,t){if(!O(e)||"fixed"===q(e).position)return null;if(t)return t(e);let n=e.offsetParent;return k(e)===n&&(n=n.ownerDocument.body),n}function nt(e,t){const n=$(e);if(D(e))return n;if(!O(e)){let t=G(e);for(;t&&!Y(t);){if(A(t)&&!et(t))return t;t=G(t)}return n}let r=tt(e,t);for(;r&&N(r)&&et(r);)r=tt(r,t);return r&&Y(r)&&et(r)&&!F(r)?n:r||function(e){let t=G(e);for(;O(t)&&!Y(t);){if(F(t))return t;if(D(t))return null;t=G(t)}return null}(e)||n}const rt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=k(r),l=!!t&&D(t.floating);if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},c=Ie(1);const u=Ie(0),d=O(r);if((d||!d&&!i)&&(("body"!==P(r)||L(s))&&(a=X(r)),O(r))){const e=qe(r);c=Be(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!s||d||i?Ie(0):Ge(s,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-a.scrollTop*c.y+u.y+p.y}},getDocumentElement:k,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?D(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=J(e,[],!1).filter(e=>A(e)&&"body"!==P(e)),o=null;const i="fixed"===q(e).position;let s=i?G(e):e;for(;A(s)&&!Y(s);){const t=q(s),n=F(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&Ke.has(o.position)||L(s)&&!n&&Qe(e,s))?r=r.filter(e=>e!==s):o=t,s=G(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],l=i.reduce((e,n)=>{const r=Je(t,n,o);return e.top=_e(r.top,e.top),e.right=ke(r.right,e.right),e.bottom=ke(r.bottom,e.bottom),e.left=_e(r.left,e.left),e},Je(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:nt,getElementRects:async function(e){const t=this.getOffsetParent||nt,n=this.getDimensions,r=await n(e.floating);return{reference:Ze(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=We(e);return{width:t,height:n}},getScale:Be,isElement:A,isRTL:function(e){return"rtl"===q(e).direction}};function ot(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function it(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=r,c=Fe(e),u=o||i?[...c?J(c):[],...J(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&l?function(e,t){let n,r=null;const o=k(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(l,a){void 0===l&&(l=!1),void 0===a&&(a=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(l||t(),!p||!f)return;const m={rootMargin:-Oe(d)+"px "+-Oe(o.clientWidth-(u+p))+"px "+-Oe(o.clientHeight-(d+f))+"px "+-Oe(u)+"px",threshold:_e(0,ke(1,a))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==a){if(!h)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==r||ot(c,e.getBoundingClientRect())||s(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,m=null;s&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!a&&m.observe(c),m.observe(t));let h=a?qe(e):null;return a&&function t(){const r=qe(e);h&&!ot(h,r)&&n(),h=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,a&&cancelAnimationFrame(p)}}const st=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:l}=t,a=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=Le(n),l=je(n),a="y"===Ve(n),c=Ue.has(s)?-1:1,u=i&&a?-1:1,d=Me(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof m&&(f="end"===l?-1*m:m),a?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},lt=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:l}=t,{apply:a=()=>{},...c}=Me(e,t),u=await async function(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Me(t,e),m=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}}(f),h=l[p?"floating"===d?"reference":"floating":d],g=De(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(l.floating)),boundary:c,rootBoundary:u,strategy:a})),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(l.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=De(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:a}):y);return{top:(g.top-w.top+m.top)/b.y,bottom:(w.bottom-g.bottom+m.bottom)/b.y,left:(g.left-w.left+m.left)/b.x,right:(w.right-g.right+m.right)/b.x}}(t,c),d=Le(o),p=je(o),f="y"===Ve(o),{width:m,height:h}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=p===(await(null==s.isRTL?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=d,g="end"===p?"top":"bottom");const v=h-u.top-u.bottom,b=m-u.left-u.right,w=ke(h-u[g],v),E=ke(m-u[y],b),S=!t.middlewareData.shift;let x=w,T=E;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(T=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(x=v),S&&!p){const e=_e(u.left,0),t=_e(u.right,0),n=_e(u.top,0),r=_e(u.bottom,0);f?T=m-2*(0!==e||0!==t?e+t:_e(u.left,u.right)):x=h-2*(0!==n||0!==r?n+r:_e(u.top,u.bottom))}await a({...t,availableWidth:T,availableHeight:x});const R=await s.getDimensions(l.floating);return m!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}},at=(e,t,n)=>{const r=new Map,o={platform:rt,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=ze(c,r,a),p=r,f={},m=0;for(let n=0;n<l.length;n++){const{name:i,fn:h}=l[n],{x:g,y:y,data:v,reset:b}=await h({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,f={...f,[i]:{...f[i],...v}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=ze(c,p,a))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}})(e,t,{...o,platform:i})};var ct="undefined"!=typeof document?y.useLayoutEffect:function(){};function ut(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!ut(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||ut(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function dt(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pt(e,t){const n=dt(e);return Math.round(t*n)/n}function ft(e){const t=y.useRef(e);return ct(()=>{t.current=e}),t}const mt=(e,t)=>({...st(e),options:[e,t]}),ht="data-floating-ui-focusable",gt="active",yt="selected",vt={...v};let bt=!1,wt=0;const Et=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+wt++,St=vt.useId||function(){const[e,t]=y.useState(()=>bt?Et():void 0);return ve(()=>{null==e&&t(Et())},[]),y.useEffect(()=>{bt=!0},[]),e};const xt=y.createContext(null),Tt=y.createContext(null),Rt=()=>{var e;return(null==(e=y.useContext(xt))?void 0:e.id)||null},Ct=()=>y.useContext(Tt);function Pt(e){return"data-floating-ui-"+e}function $t(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const kt=Pt("safe-polygon");function _t(e,t,n){if(n&&!ye(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 At(e){return"function"==typeof e?e():e}function Ot(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:l=!0,delay:a=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=Ct(),m=Rt(),h=be(c),g=be(a),v=be(n),b=be(d),w=y.useRef(),E=y.useRef(-1),S=y.useRef(),x=y.useRef(-1),T=y.useRef(!0),R=y.useRef(!1),C=y.useRef(()=>{}),P=y.useRef(!1),$=Ee(()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});y.useEffect(()=>{if(l)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||($t(E),$t(x),T.current=!0,P.current=!1)}},[l,i]),y.useEffect(()=>{if(!l)return;if(!h.current)return;if(!n)return;function e(e){$()&&r(!1,e,"hover")}const t=ge(s.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[s.floating,n,r,l,h,$]);const k=y.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=_t(g.current,"close",w.current);o&&!S.current?($t(E),E.current=window.setTimeout(()=>r(!1,e,n),o)):t&&($t(E),r(!1,e,n))},[g,r]),_=Ee(()=>{C.current(),S.current=void 0}),O=Ee(()=>{if(R.current){const e=ge(s.floating).body;e.style.pointerEvents="",e.removeAttribute(kt),R.current=!1}}),I=Ee(()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type));y.useEffect(()=>{if(l&&A(s.domReference)){const r=s.domReference,o=s.floating;return n&&r.addEventListener("mouseleave",i),p&&r.addEventListener("mousemove",e,{once:!0}),r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",t),o&&(o.addEventListener("mouseleave",i),o.addEventListener("mouseenter",a),o.addEventListener("mouseleave",c)),()=>{n&&r.removeEventListener("mouseleave",i),p&&r.removeEventListener("mousemove",e),r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",t),o&&(o.removeEventListener("mouseleave",i),o.removeEventListener("mouseenter",a),o.removeEventListener("mouseleave",c))}}function e(e){if($t(E),T.current=!1,u&&!ye(w.current)||At(b.current)>0&&!_t(g.current,"open"))return;const t=_t(g.current,"open",w.current);t?E.current=window.setTimeout(()=>{v.current||r(!0,e,"hover")},t):n||r(!0,e,"hover")}function t(e){if(I())return void O();C.current();const t=ge(s.floating);if($t(x),P.current=!1,h.current&&o.current.floatingContext){n||$t(E),S.current=h.current({...o.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){O(),_(),I()||k(e,!0,"safe-polygon")}});const r=S.current;return t.addEventListener("mousemove",r),void(C.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==w.current||!he(s.floating,e.relatedTarget))&&k(e)}function i(e){I()||o.current.floatingContext&&(null==h.current||h.current({...o.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){O(),_(),I()||k(e)}})(e))}function a(){$t(E)}function c(e){I()||k(e,!1)}},[s,l,e,u,p,k,_,O,r,n,v,f,g,h,o,I,b]),ve(()=>{var e;if(l&&n&&null!=(e=h.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&$()){R.current=!0;const e=s.floating;if(A(s.domReference)&&e){var t;const n=ge(s.floating).body;n.setAttribute(kt,"");const r=s.domReference,o=null==f||null==(t=f.nodesRef.current.find(e=>e.id===m))||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=""}}}},[l,n,m,s,f,h,$]),ve(()=>{n||(w.current=void 0,P.current=!1,_(),O())},[n,_,O]),y.useEffect(()=>()=>{_(),$t(E),$t(x),O()},[l,s.domReference,_,O]);const M=y.useMemo(()=>{function e(e){w.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){T.current||v.current||r(!0,t,"hover")}u&&!ye(w.current)||n||0===At(b.current)||P.current&&e.movementX**2+e.movementY**2<2||($t(x),"touch"===w.current?o():(P.current=!0,x.current=window.setTimeout(o,At(b.current))))}}},[u,r,n,v,b]);return y.useMemo(()=>l?{reference:M}:{},[l,M])}const It={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},Mt=y.forwardRef(function(e,t){const[n,r]=y.useState();ve(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[Pt("focus-guard")]:"",style:It};return(0,Pe.jsx)("span",{...e,...o})}),Lt=y.createContext(null),jt=Pt("portal");function Nt(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=St(),o=Vt(),[i,s]=y.useState(null),l=y.useRef(null);return ve(()=>()=>{null==i||i.remove(),queueMicrotask(()=>{l.current=null})},[i]),ve(()=>{if(!r)return;if(l.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(jt,""),e.appendChild(n),l.current=n,s(n)},[t,r]),ve(()=>{if(null===n)return;if(!r)return;if(l.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!_(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const a=document.createElement("div");a.id=r,a.setAttribute(jt,""),e=i||e,e.appendChild(a),l.current=a,s(a)},[t,n,r,o]),i}({id:n,root:r}),[s,l]=y.useState(null),a=y.useRef(null),c=y.useRef(null),u=y.useRef(null),d=y.useRef(null),p=null==s?void 0:s.modal,f=null==s?void 0:s.open,m=!!s&&!s.modal&&s.open&&o&&!(!r&&!i);return y.useEffect(()=>{if(i&&o&&!p)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&&Te(e)&&("focusin"===e.type?Ce:Re)(i)}},[i,o,p]),y.useEffect(()=>{i&&(f||Ce(i))},[f,i]),(0,Pe.jsxs)(Lt.Provider,{value:y.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:a,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:l}),[o,i]),children:[m&&i&&(0,Pe.jsx)(Mt,{"data-type":"outside",ref:a,onFocus:e=>{if(Te(e,i)){var t;null==(t=u.current)||t.focus()}else{const e=xe(ge(n=s?s.domReference:null).body,-1)||n;null==e||e.focus()}var n}}),m&&i&&(0,Pe.jsx)("span",{"aria-owns":i.id,style:It}),i&&$e.createPortal(t,i),m&&i&&(0,Pe.jsx)(Mt,{"data-type":"outside",ref:c,onFocus:e=>{if(Te(e,i)){var t;null==(t=d.current)||t.focus()}else{const t=xe(ge(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 Vt=()=>y.useContext(Lt);function Dt(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=St(),i=y.useRef({}),[s]=y.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)}}}()),l=null!=Rt(),[a,c]=y.useState(r.reference),u=Ee((e,t,r)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)}),d=y.useMemo(()=>({setPositionReference:c}),[]),p=y.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return y.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:s,floatingId:o,refs:d}),[t,u,p,s,o,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=y.useState(null),[l,a]=y.useState(null),c=(null==o?void 0:o.domReference)||i,u=y.useRef(null),d=Ct();ve(()=>{c&&(u.current=c)},[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:a,open:c}=e,[u,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=y.useState(r);ut(p,r)||f(r);const[m,h]=y.useState(null),[g,v]=y.useState(null),b=y.useCallback(e=>{e!==x.current&&(x.current=e,h(e))},[]),w=y.useCallback(e=>{e!==T.current&&(T.current=e,v(e))},[]),E=i||m,S=s||g,x=y.useRef(null),T=y.useRef(null),R=y.useRef(u),C=null!=a,P=ft(a),$=ft(o),k=ft(c),_=y.useCallback(()=>{if(!x.current||!T.current)return;const e={placement:t,strategy:n,middleware:p};$.current&&(e.platform=$.current),at(x.current,T.current,e).then(e=>{const t={...e,isPositioned:!1!==k.current};A.current&&!ut(R.current,t)&&(R.current=t,$e.flushSync(()=>{d(t)}))})},[p,t,n,$,k]);ct(()=>{!1===c&&R.current.isPositioned&&(R.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const A=y.useRef(!1);ct(()=>(A.current=!0,()=>{A.current=!1}),[]),ct(()=>{if(E&&(x.current=E),S&&(T.current=S),E&&S){if(P.current)return P.current(E,S,_);_()}},[E,S,_,P,C]);const O=y.useMemo(()=>({reference:x,floating:T,setReference:b,setFloating:w}),[b,w]),I=y.useMemo(()=>({reference:E,floating:S}),[E,S]),M=y.useMemo(()=>{const e={position:n,left:0,top:0};if(!I.floating)return e;const t=pt(I.floating,u.x),r=pt(I.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...dt(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,I.floating,u.x,u.y]);return y.useMemo(()=>({...u,update:_,refs:O,elements:I,floatingStyles:M}),[u,_,O,I,M])}({...e,elements:{...o,...l&&{reference:l}}}),f=y.useCallback(e=>{const t=A(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;a(t),p.refs.setReference(t)},[p.refs]),m=y.useCallback(e=>{(A(e)||null===e)&&(u.current=e,s(e)),(A(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!A(e))&&p.refs.setReference(e)},[p.refs]),h=y.useMemo(()=>({...p.refs,setReference:m,setPositionReference:f,domReference:u}),[p.refs,m,f]),g=y.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),v=y.useMemo(()=>({...p,...r,refs:h,elements:g,nodeId:t}),[p,h,g,t,r]);return ve(()=>{r.dataRef.current.floatingContext=v;const e=null==d?void 0:d.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),y.useMemo(()=>({...p,context:v,refs:h,elements:g}),[p,h,g,v])}function zt(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[gt]:t,[yt]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[ht]:""},...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&&[gt,yt].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;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=i)}),e):e,{})}}function Ut(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=y.useCallback(t=>zt(t,e,"reference"),t),i=y.useCallback(t=>zt(t,e,"floating"),n),s=y.useCallback(t=>zt(t,e,"item"),r);return y.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function Wt(e,t){(0,y.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])}function Ft({element:e,isSelected:t}){const[n,r]=(0,y.useState)(!1),{refs:o,floatingStyles:i,context:s}=Dt({open:n||t,onOpenChange:r,whileElementsMounted:it,middleware:[(l=()=>({apply({elements:e,rects:t}){Object.assign(e.floating.style,{width:`${t.reference.width+2}px`,height:`${t.reference.height+2}px`})}}),{...lt(l),options:[l,undefined]}),mt(({rects:e})=>-e.reference.height/2-e.floating.height/2)]});var l;return(0,y.useEffect)(()=>{o.setReference(e)},[e,o]),{isVisible:n||t,context:s,floating:{setRef:o.setFloating,ref:o.floating,styles:i}}}const Bt=[".e-off-canvas"];function Ht(){return Ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ht.apply(null,arguments)}const Yt="elementor-preview-responsive-wrapper",qt=(0,R.styled)(R.Box,{shouldForwardProp:e=>"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"})),Xt=({element:e,isSelected:t,id:n,isGlobal:r=!1})=>{const{context:o,floating:i,isVisible:s}=Ft({element:e,isSelected:t}),{getFloatingProps:l,getReferenceProps:a}=Ut([Ot(o)]),c=(()=>{const e=window.elementor?.$preview?.[0];return!!e&&Bt.map(t=>Array.from(e?.contentWindow?.document.body.querySelectorAll(t)??[])).flat().some(e=>e.checkVisibility({opacityProperty:!0,visibilityProperty:!0,contentVisibilityAuto:!0}))})();Wt(e,a);const u=e.offsetHeight<=1;return s&&!c&&y.createElement(Nt,{id:Yt},y.createElement(qt,Ht({ref:i.setRef,isSelected:t,isGlobal:r,style:i.styles,"data-element-overlay":n,role:"presentation",isSmallerOffset:u},l())))},Gt="atomic",Kt=[{component:Xt,shouldRender:()=>!0}];function Jt(){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=>Gt 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 Kt.map(({shouldRender:e,component:i},s)=>e({id:t,element:n,isSelected:o})&&y.createElement(i,{key:`${t}-${s}`,id:t,element:n,isSelected:o,isGlobal:r}))}):null}function Qt(e){const t=(0,y.useRef)(!1);(0,y.useEffect)(()=>{t.current||(t.current=!0,e())},[])}function Zt({provider:e},{provider:t}){return e.priority-t.priority}function en({provider:e,setInteractionItems:t}){return()=>{try{const n=e.actions.all(),r=e.getKey();t(t=>({...t,[r]:{provider:e,items:n}}))}catch{}}}function tn(){const e=(0,s.__privateUseListenTo)((0,s.commandEndEvent)("editor/documents/attach-preview"),()=>(0,s.getCanvasIframeDocument)()?.head),t=function(){const[e,t]=(0,y.useState)({}),n=(0,y.useMemo)(()=>{try{return g.interactionsRepository.getProviders().map(e=>({provider:e,subscriber:en({provider:e,setInteractionItems:t})}))}catch{return[]}},[]);return(0,y.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]),Qt(()=>{0!==n.length&&(0,s.registerDataHook)("after","editor/documents/attach-preview",async()=>{n.forEach(({subscriber:e})=>{try{e()}catch{}})})}),(0,y.useMemo)(()=>Object.values(e).sort(Zt).flatMap(({items:e})=>e),[e])}();if(!e)return null;const n=JSON.stringify(Array.isArray(t)?t:[]);return y.createElement(R.Portal,{container:e},y.createElement("script",{type:"application/json","data-e-interactions":"true",dangerouslySetInnerHTML:{__html:n}}))}const nn="data-e-removed",rn="data-elementor-id",on="elementor-post-",sn="-css";function ln(e){const t=[...e.attributes].map(e=>[e.name,e.value]);return Object.fromEntries(t)}var an=window.elementorV2.editorResponsive;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 un=e=>!!e&&"object"==typeof e&&"$$multi-props"in e&&!0===e["$$multi-props"],dn=e=>({"$$multi-props":!0,value:e}),pn=e=>e.value,fn=3;function mn({transformers:e,schema:t,onPropResolve:n}){async function r({props:e,schema:r,signal:i,renderContext:s}){r=r??t;const l=Promise.all(Object.entries(r).map(async([t,r])=>{const l=e[t]??r.default,a=await o({value:l,key:t,type:r,signal:i,renderContext:s});return n?.({key:t,value:a}),un(a)?pn(a):{[t]:a}}));return Object.assign({},...(await l).filter(Boolean))}async function o({value:t,key:n,type:i,signal:s,depth:l=0,renderContext:a}){if(null==t)return null;if(!(0,u.isTransformable)(t))return t;if(l>fn)return null;if(!0===t.disabled)return null;let c=i;if("union"===i.kind&&(c=i.prop_types[t.$$type],!c))return null;if(t.$$type!==c.key)return null;let d=t.value;"object"===c.kind&&(d=await r({props:d,schema:c.shape,signal:s,renderContext:a})),"array"===c.kind&&(d=await Promise.all(d.map(e=>o({value:e,key:n,type:c.item_prop_type,depth:l,signal:s,renderContext:a}))));const p=e.get(t.$$type);if(!p)return null;try{return o({value:await p(d,{key:n,signal:s,renderContext:a,propType:i}),key:n,type:i,signal:s,depth:l+1,renderContext:a})}catch{return null}}return r}function hn(){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 gn=hn(),yn=(e,t="preview")=>{const n=window;return n.elementor?.helpers?.enqueueFont?.(e,t)??null},vn=(0,E.createError)({code:"unknown_style_type",message:"Unknown style type"}),bn=(0,E.createError)({code:"unknown_style_state",message:"Unknown style state"}),wn={class:"."};function En({resolve:e,breakpoints:t,selectorPrefix:n=""}){return async({styles:r,signal:o})=>{const i=r.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}),l=function(e){const t=(0,E.decodeString)(e?.raw||"");return t.trim()?t+"\n":""}(i.custom_css);return Sn().for(r.cssName,r.type).withPrefix(n).withState(i.meta.state).withMediaQuery(i.meta.breakpoint?t[i.meta.breakpoint]:null).wrap(s+l)}),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(i)}}function Sn(e="",t){return{for:(n,r)=>{const o=wn[r];if(!o)throw new vn({context:{type:r}});return Sn(`${e}${o}${n}`,t)},withPrefix:n=>Sn([n,e].filter(Boolean).join(" "),t),withState:n=>Sn((0,d.getSelectorWithState)(e,n),t),withMediaQuery:n=>{if(!n?.type)return Sn(e,t);const r=`${n.type}:${n.width}px`;return Sn(e,e=>`@media(${r}){${e}}`)},wrap:n=>{const r=`${e}{${n}}`;return t?t(r):r}}}const xn=".elementor";function Tn({provider:e},{provider:t}){return e.priority-t.priority}function Rn({state:e},{state:t}){return(0,d.isClassState)(e)&&!(0,d.isClassState)(t)?-1:!(0,d.isClassState)(e)&&(0,d.isClassState)(t)?1:0}function Cn({provider:e,renderStyles:t,setStyleItems:n}){return function(){let o=null;return(...i)=>(o&&o.abort(),o=new AbortController,(o=>cn(o.signal).then((n,o)=>{const i=e.actions.all().map((t,n,r)=>{const o=r[r.length-1-n];return{...o,cssName:e.actions.resolveCssName(o.id)}});return t({styles:r(i),signal:o})}).then(t=>{n(n=>({...n,[e.getKey()]:{provider:e,items:t}}))}).execute())(o,...i))}();function r(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 Pn(){return Pn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pn.apply(null,arguments)}function $n(){const e=(0,s.__privateUseListenTo)((0,s.commandEndEvent)("editor/documents/attach-preview"),()=>(0,s.getCanvasIframeDocument)()?.head),t=function(){const e=function(e){const t=(0,an.useBreakpointsMap)();return(0,y.useMemo)(()=>En({selectorPrefix:xn,breakpoints:t,resolve:e}),[e,t])}((0,y.useMemo)(()=>mn({transformers:gn,schema:(0,d.getStylesSchema)(),onPropResolve:({key:e,value:t})=>{"font-family"===e&&"string"==typeof t&&yn(t)}}),[])),[t,n]=(0,y.useState)({}),r=(0,y.useMemo)(()=>w.stylesRepository.getProviders().map(t=>({provider:t,subscriber:Cn({provider:t,renderStyles:e,setStyleItems:n})})),[e]);(0,y.useEffect)(()=>{const e=r.map(({provider:e,subscriber:t})=>e.subscribe(t));return()=>{e.forEach(e=>e())}},[r]),Qt(()=>{(0,s.registerDataHook)("after","editor/documents/attach-preview",async()=>{const e=r.map(async({subscriber:e})=>e());await Promise.all(e)})});const o=(0,an.getBreakpoints)().map(e=>e.id);return(0,y.useMemo)(()=>Object.values(t).sort(Tn).flatMap(({items:e})=>e).sort(Rn).sort(function(e){return({breakpoint:t},{breakpoint:n})=>e.indexOf(t)-e.indexOf(n)}(o)),[t,o.join("-")])}(),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(`[${rn}]`)??[]].map(e=>e.getAttribute(rn)||"")}(e).map(e=>`${on}${e}${sn}`),n=function(e){return[...e.head.querySelectorAll(`link[rel="stylesheet"][id^=${on}][id$=${sn}]`)??[]]}(e).filter(e=>t.includes(e.getAttribute("id")??""));return n.forEach(e=>{e.hasAttribute(nn)||e.remove()}),n.map(e=>({...ln(e),id:e.getAttribute("id")??"",[nn]:!0}))});return e?y.createElement(R.Portal,{container:e},t.map((e,t)=>y.createElement("style",{key:`${e.id}-${t}-${e.breakpoint}`},e.value)),n.map(e=>y.createElement("link",Pn({},e,{key:e.id})))):null}const kn=hn();function _n(e){return e}const An=()=>"";const On=e=>e.map(e=>{const t=(e.date||"").trim(),n=(e.time||"").trim();return t||n?`${t} ${n}`.trim():""}).join(" "),In=({destination:e,isTargetBlank:t,tag:n})=>({href:"number"==typeof e?"#post-id-"+e:e,target:t?"_blank":"_self",tag:n??"a"}),Mn=({id:e})=>e??null,Ln=e=>({id:e.id??null,url:e.url??null});var jn=window.elementorV2.wpMedia;const Nn=async e=>{const{src:t,size:n}=e;if(!t?.id)return t?.url?{src:t.url}:null;const r=await(0,jn.getMediaAttachment)({id:t.id}),o=r?.sizes?.[n??""];return o?{src:o.url,height:o.height,width:o.width}:r?{src:r.url,height:r.height,width:r.width}:null},Vn=e=>e,Dn=e=>{const{color:t=null}=e;return t?`linear-gradient(${t}, ${t})`:null},zn=e=>"radial"===e.type?`radial-gradient(circle at ${e.positions}, ${e.stops})`:`linear-gradient(${e.angle}deg, ${e.stops})`,Un=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},Wn=({width:e,height:t})=>`${e??"auto"} ${t??"auto"}`,Fn=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":Bn(t,"src","none",!0),"background-repeat":Bn(t,"repeat","repeat"),"background-attachment":Bn(t,"attachment","scroll"),"background-size":Bn(t,"size","auto auto"),"background-position":Bn(t,"position","0% 0%")}};function Bn(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 Hn=e=>{const{color:t=null,"background-overlay":n=null,clip:r=null}=e;return dn({...n,"background-color":t,"background-clip":r})},Yn=e=>`${e?.color} ${e?.offset??0}%`,qn=e=>t=>t?.length?t.filter(Boolean).join(e):null,Xn=(e,t)=>(n,{key:r})=>{const o=e.filter(e=>n[e]).map(e=>[t({propKey:r,key:e}),n[e]]);return dn(Object.fromEntries(o))},Gn=e=>e?.length<1?null:e.filter(Boolean).map(Kn).join(" "),Kn=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})`:""},Jn=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 Qn(e){return`${e??"0px"}`}const Zn=e=>`${Qn(e?.x)} ${Qn(e?.y)}`,er=({x:e,y:t})=>`${e??"0px"} ${t??"0px"}`,tr=e=>[e.hOffset,e.vOffset,e.blur,e.spread,e.color,e.position].filter(Boolean).join(" "),nr=e=>"custom"===e.unit?e.size:`${e.size}${e.unit}`,rr=e=>{const t={"-webkit-text-stroke":`${e.width} ${e.color}`,stroke:`${e.color}`,"stroke-width":`${e.width}`};return dn(t)},or=e=>e?.length<1?null:e.join(" "),ir="0px",sr=e=>`translate3d(${e.x??ir}, ${e.y??ir}, ${e.z??ir})`;function lr(e){return`${e??"0px"}`}const ar=e=>{const t=lr(e.x),n=lr(e.y),r=lr(e.z);return"50%"===t&&"50%"===n&&"0px"===r?null:`${t} ${n} ${r}`},cr="0deg",ur=e=>[`rotateX(${e?.x??cr})`,`rotateY(${e?.y??cr})`,`rotateZ(${e?.z??cr})`].join(" "),dr=e=>`scale3d(${e.x??1}, ${e.y??1}, ${e.z??1})`,pr="0deg",fr=e=>`skew(${e?.x??pr}, ${e?.y??pr})`;var mr=window.elementorV2.editorControls;const hr=e=>{if(e?.length<1)return null;const t=(()=>{const e=new Set;return mr.transitionProperties.forEach(t=>{t.properties.forEach(t=>{e.add(t.value)})}),e})(),n=e.map(e=>gr(e,t)).filter(Boolean);return 0===n.length?null:n.join(", ")},gr=(e,t)=>{if(!e.selection||!e.size)return"";const n=e.selection.value;return t.has(n)?`${n} ${e.size}`:""};var yr=window.elementorV2.twing;function vr(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 br(e){const t=["http:","https:","mailto:","tel:"];try{const n=new URL(e);return t.includes(n.protocol)?e:""}catch{return""}}function wr(){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 Er(e){return!!(e.atomic_props_schema&&e.twig_templates&&e.twig_main_template&&e.base_styles_dictionary)}function Sr({type:e,renderer:t,element:n}){const r=wr(),o=n.twig_main_template,i=n.base_styles_dictionary;Object.entries(n.twig_templates).forEach(([e,n])=>{t.register(e,n)});const s=mn({transformers:kn,schema:n.atomic_props_schema});return class extends r{#n=null;#r=[];#o=null;#i=!1;getTemplateType(){return"twig"}getNamespaceKey(){return e}renderOnChange(){this.render()}getRenderContext(){return this._parent?.getRenderContext?.()}getResolverRenderContext(){return this._parent?.getResolverRenderContext?.()}invalidateRenderCache(){this.#o=null}render(){this.#n?.abort(),this.#n=new AbortController;const e=cn(this.#n.signal).then(()=>this._beforeRender()).then(()=>this._renderTemplate()).then(()=>this._renderChildren()).then(()=>this._afterRender());return this._currentRenderPromise=e.execute(),this._currentRenderPromise}async _renderChildren(){this.#r=[],this.#s()?this.#l():super._renderChildren(),this.#a(),await this._waitForChildrenToComplete()}#s(){return this.#i&&this.children?.length>0}#l(){this.children?.each(e=>{e.render()})}#a(){this.children?.each(e=>{e._currentRenderPromise&&this.#r.push(e._currentRenderPromise)})}async _waitForChildrenToComplete(){this.#r.length>0&&await Promise.all(this.#r)}async _renderTemplate(){this.triggerMethod("before:render:template");const n=cn(this.#n?.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.#o&&this.isRendered)return this.#i=!0,null;this.#i=!1,this.#o=r;const s={id:this.model.get("id"),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(){this._ensureViewIsIntact(),this._isRendering=!0,this.resetChildViewContainer(),this.triggerMethod("before:render",this)}_afterRender(){this._isRendering=!1,this.isRendered=!0,this.triggerMethod("render",this)}_doAfterRender(e){this.isRendered?e():this.once("render",e)}_openEditingPanel(e){this._doAfterRender(()=>super._openEditingPanel(e))}}}var xr=o(3404),Tr=window.wp.i18n;const Rr="before",Cr="after",Pr="never";class $r{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}static getTypes(){return null}shouldRenderReplacement(){return!0}originalMethodsToTrigger(){return{_beforeRender:Rr,_afterRender:Cr,renderOnChange:Pr,onDestroy:Pr,render:Pr}}}const kr={"e-form-label":"text","e-heading":"title","e-paragraph":"paragraph"};function _r(){return _r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_r.apply(null,arguments)}const Ar=["#elementor-editor-wrapper-v2","#elementor-navigator","#elementor-panel"],Or="inline-editor-wrapper",Ir=({elementClasses:e,initialValue:t,expectedTag:n,rootElement:r,id:o,setValue:i,onBlur:s})=>{const[l,a]=(0,y.useState)(null),[c,u]=(0,y.useState)(null);return Vr(s),y.createElement(R.ThemeProvider,null,y.createElement(Mr,{expectedTag:n,rootElement:r,id:o}),y.createElement("style",null,`\n\t\t\t.${Or}, .${Or} > * {\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\t.ProseMirror > * {\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\t`),y.createElement(mr.InlineEditor,{onEditorCreate:u,editorProps:{attributes:{style:"outline: none;overflow-wrap: normal;height:100%"}},elementClasses:e,value:t,setValue:i,onBlur:s,autofocus:!0,expectedTag:n,wrapperClassName:Or,onSelectionEnd:e=>{const t=!e.state.selection.empty;a(t?(e=>{const t=e.root?.defaultView,n=t?.getSelection(),r=e.dom;if(!n||!r)return null;const o=n.getRangeAt(0).getBoundingClientRect(),i=r.getBoundingClientRect();if(!o||!i)return null;const s=o.top-i.top;return{left:o?.left+o?.width/2-i.left,top:s}})(e):null)}}),l&&c&&y.createElement(Lr,{expectedTag:n,editor:c,rootElement:r,id:o,selectionOffsets:l}))},Mr=({expectedTag:e,rootElement:t,id:n})=>{const r=Nr(t,e),[o,i]=(0,y.useState)(r);return(0,y.useEffect)(()=>{i(Nr(t,e))},[e,t]),o?y.createElement(Xt,{element:o,id:n,isSelected:!0}):null},Lr=({expectedTag:e,editor:t,rootElement:n,id:r,selectionOffsets:o})=>{const[i,s]=(0,y.useState)(null);return(0,y.useEffect)(()=>{s(Nr(n,e))},[e,n]),i?y.createElement(jr,{element:i,editor:t,id:r,selectionOffsets:o}):null},jr=({element:e,editor:t,id:n,selectionOffsets:r})=>{const{floating:o}=Ft({element:e,isSelected:!0}),{getFloatingProps:i,getReferenceProps:s}=Ut(),l=(c=r,(e=>{const t=e?.transform?.match(/translate\([^)]*\)\s?/g)?.[0],n=t?.match(/(-?\d+\.?\d*)/g);if(!t||!n)return null;const[r,o]=n.map(Number);return r&&o?e.transform:null})(a=o.styles)?{...a,marginLeft:`${c.left}px`,marginTop:`${c.top}px`,pointerEvents:"none"}:{display:"none"});var a,c;return Wt(e,s),y.createElement(Nt,{id:Yt},y.createElement(R.Box,_r({ref:o.setRef,style:{...o.styles,pointerEvents:"none"},role:"presentation"},i({style:l})),o.styles.transform&&y.createElement(R.Box,{sx:{position:"relative",transform:"translateY(-100%)",height:"max-content"}},y.createElement(mr.InlineEditorToolbar,{editor:t,elementId:n,sx:{transform:"translateX(-50%)"}}))))},Nr=(e,t)=>t?e.querySelector(t):null,Vr=e=>{const t=y.useCallback(()=>queueMicrotask(e),[e]);(0,y.useEffect)(()=>(Ar.forEach(e=>document?.querySelector(e)?.addEventListener("mousedown",t)),()=>Ar.forEach(e=>document?.querySelector(e)?.removeEventListener("mousedown",t))),[])};class Dr extends $r{inlineEditorRoot=null;handlerAttached=!1;getReplacementKey(){return"inline-editing"}static getTypes(){return Object.keys(kr)}isEditingModeActive(){return!!this.inlineEditorRoot}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()?Pr:Rr,t=this.isEditingModeActive()?Pr:Cr;return{_beforeRender:e,_afterRender:t,renderOnChange:t,onDestroy:Cr,render:e}}resetInlineEditorRoot(){this.element.removeEventListener("click",this.handleRenderInlineEditor),this.handlerAttached=!1,this.inlineEditorRoot?.unmount?.(),this.inlineEditorRoot=null}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)===u.htmlPropTypeUtil.key||t===u.stringPropTypeUtil.key)||"union"===e.kind&&Boolean(e.prop_types[u.htmlPropTypeUtil.key]||e.prop_types[u.stringPropTypeUtil.key]));var t})(t):u.htmlPropTypeUtil.isValid(e)||u.stringPropTypeUtil.isValid(e))({rawValue:this.getSetting(e),propTypeFromSchema:this.getInlineEditablePropType()})}getInlineEditablePropertyName(){return kr[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();return u.htmlPropTypeUtil.extract(e)??""}setContentValue(e){const t=this.getInlineEditablePropertyName(),n=u.htmlPropTypeUtil.create(e||"");(0,s.undoable)({do:()=>{const e=this.getInlineEditablePropValue();return this.runCommand(t,n),e},undo:(e,n)=>{this.runCommand(t,n??null)}},{title:(0,a.getElementLabel)(this.id),subtitle:(0,Tr.__)("%s edited","elementor").replace("%s",this.getInlineEditablePropTypeKey()??"Inline editing"),debounce:{wait:800}})()}getInlineEditablePropTypeKey(){const e=this.getInlineEditablePropType();return e?"union"===e.kind?e.prop_types[u.htmlPropTypeUtil.key]?u.htmlPropTypeUtil.key:e.prop_types[u.stringPropTypeUtil.key]?u.stringPropTypeUtil.key:null:"key"in e&&"string"==typeof e.key?e.key:null: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 u.stringPropTypeUtil.extract(this.getSetting("tag")??null)??u.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]?.classList.toString()??"",t=this.getExtractedContentValue(),n=this.getExpectedTag();this.element.innerHTML="",this.inlineEditorRoot=(0,xr.H)(this.element),this.inlineEditorRoot.render(y.createElement(Ir,{elementClasses:e,initialValue:t,expectedTag:n,rootElement:this.element,id:this.id,setValue:this.setContentValue.bind(this),onBlur:this.unmountInlineEditor.bind(this)}))}}const zr=new Map,Ur=()=>{Wr(Dr)},Wr=e=>{const t=e.getTypes();t&&t.forEach(t=>{zr.set(t,e)})},Fr=e=>{const t=Sr(e);return class extends t{#c=null;#u;constructor(...e){super(...e);const t=this.model.get("settings");this.#u={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)}}refreshView(){this.invalidateRenderCache?.(),this.render()}renderOnChange(){this.#d("renderOnChange")}render(){const e=this.#u,t=e.type,n=t?(r=t,zr.get(r)??null):null;var r;n&&!this.#c&&(this.#c=new n(e)),this.#d("render")}onDestroy(){this.#d("onDestroy")}_afterRender(){this.#d("_afterRender")}_beforeRender(){this.#d("_beforeRender")}#d(e){const n=t.prototype[e].bind(this),r=this.#c?.shouldRenderReplacement(),o=r&&this.#c?.[e]?.bind(this.#c);if(!o||!r)return n();const i=this.#c?.originalMethodsToTrigger()[e]??"never";"before"===i&&n(),o(),"after"===i&&n()}}},Br=({type:e,renderer:t,element:n})=>{const r=window,o=Fr({type:e,renderer:t,element:n});return class extends r.elementor.modules.elements.types.Widget{getType(){return e}getView(){return o}}},Hr={};function Yr(e,t){Hr[e]=t}const qr="elementor://document/structure";function Xr(){const e=window,t=e.elementor?.documents?.getCurrent?.();if(!t)return{error:"No active document found"};const n=(t.container?.children||[]).map(e=>Gr(e));return{documentId:t.id,documentType:t.config.type,title:t.config.settings?.post_title||"Untitled",elements:n.filter(e=>null!==e)}}function Gr(e){if(!e||!e.model)return null;const t=e.model.attributes,n={id:t.id,elType:t.elType,widgetType:t.widgetType||void 0},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=>Gr(e)).filter(e=>null!==e)),n}function Kr(e,t){const n=window.elementorV2.editorVariables.Utils;return u.Schema.adjustLlmPropValueSchema(e,{forceKey:t,transformers:n.globalVariablesLLMResolvers})}const Jr=e=>{const{elementId:t,propertyName:n,propertyValue:r,elementType:o}=e;if("_styles"===n){const e=(0,a.getElementStyles)(t)||{},n=r,o=(0,d.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,Kr(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,u.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 s=Kr(r,i[n].key);(0,a.updateElementSettings)({id:t,props:{[n]:s},withHistory:!1})};let Qr=null;const Zr={get widgetsSchema(){if(!Qr){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))}),Qr=e}return Qr},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(u.Schema.isPropKeyConfigurable(t)){const{valid:e}=u.Schema.validatePropValue(s,i);e||r.push(`Invalid property "${t}". Validate input with resource [${f.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,d.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 eo{elementConfig={};elementStylesConfig={};rootContainers=[];containerElements=[];api={createElement:a.createElement,getWidgetsCache:a.getWidgetsCache,generateElementId:a.generateElementId,getContainer:a.getContainer,doUpdateElementProperty:Jr};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 eo({xml:n,api:t})}constructor(e){const{api:t={},elementConfig:n={},stylesConfig:r={},xml:o}=e;this.xml=o,Object.assign(this.api,t),this.setElementConfig(n),this.setStylesConfig(r)}setElementConfig(e){this.elementConfig=e}setStylesConfig(e){this.elementStylesConfig=e}getXML(){return this.xml}iterateBuild(e,t,n){const r=e.tagName,o=this.containerElements.includes(r);let i="e-tabs"===t.model.get("elType")?t.children?.[1].children?.[n]?.id||t.children?.[1].id:t.id;i||(i=t.id);const s=o?this.api.createElement({containerId:i,model:{elType:r,id:(0,a.generateElementId)()},options:{useHistory:!1}}):this.api.createElement({containerId:i,model:{elType:"widget",widgetType:r,id:(0,a.generateElementId)()},options:{useHistory:!1}});"document"===t.id&&this.rootContainers.push(s),e.setAttribute("id",s.id);let l=0;for(const t of Array.from(e.children))this.iterateBuild(t,s,l),l++}findSchemaForNode(e){const t=this.api.getWidgetsCache()||{},n=e.tagName,r=t[n]?.atomic_props_schema;return r||null}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}}applyStyles(){const e=[],t={},n={};for(const[r,o]of Object.entries(this.elementStylesConfig)){const{element:i,node:s}=this.matchNodeByConfigId(r);for(const[r,l]of Object.entries(o)){const{valid:a,errors:c}=Zr.validateStyles({[r]:l});a?n[r]=l:(o.$intention&&(t[i.id]=t[i.id]||[],t[i.id].push(r)),e.push(...c||[])),this.api.doUpdateElementProperty({elementId:i.id,propertyName:"_styles",propertyValue:n,elementType:s.tagName})}}return{errors:e,invalidStyles:t}}applyConfigs(){const e=[];for(const[t,n]of Object.entries(this.elementConfig)){const{element:r,node:o}=this.matchNodeByConfigId(t),i=this.findSchemaForNode(o),s=Zr.validateProps(i,n);if(!s.valid&&s.errors?.length)e.push(...s.errors);else for(const[t,i]of Object.entries(n))try{this.api.doUpdateElementProperty({elementId:r.id,propertyName:t,propertyValue:i,elementType:o.tagName})}catch(t){e.push(t.message)}}return e}build(e){const t=this.api.getWidgetsCache()||{},n=Object.values(t).filter(e=>e.meta?.is_container).map(e=>e.elType).filter(e=>"string"==typeof e);this.containerElements=n,new Set(this.xml.querySelectorAll("*")).forEach(e=>{if(!t[e.tagName])throw new Error(`Unknown widget type: ${e.tagName}`)});const r=Array.from(this.xml.children);let o=0;for(const t of r)this.iterateBuild(t,e,o),o++;const{errors:i,invalidStyles:s}=this.applyStyles();return{configErrors:this.applyConfigs(),styleErrors:i,invalidStyles:s,rootContainers:[...this.rootContainers]}}}const to=()=>{const e=(0,c.toolPrompts)("build-compositions");return e.description(`\n# REQUIRED RESOURCES (Read before use)\n1. [${p}] - Widget types, configuration schemas, and PropType definitions\n2. [${f}] - Common styles schema shared by all widgets\n3. [elementor://global-classes] - Existing global classes (check FIRST to reuse)\n\n# THREE-PHASE WORKFLOW (MANDATORY)\n\n## Phase 1: Create Global Classes\n1. Analyze requirements → identify reusable patterns (typography, colors, spacing)\n2. Check [elementor://global-classes] for existing classes\n3. Use "create-global-class" tool for NEW reusable styles BEFORE building\n\n## Phase 2: Build Composition (THIS TOOL)\n4. Build valid XML with minimal inline styles (layout/positioning only)\n5. Avoid duplicating styles that should be global classes\n\n## Phase 3: Apply Classes\n6. Use "apply-global-class" tool to apply global classes to elements\n\n# CORE INSTRUCTIONS\n\n**Structure:**\n- Build valid XML using allowed widget tags (e.g., \`<e-button configuration-id="btn1"></e-button>\`)\n- Containers only: "e-flexbox", "e-div-block", "e-tabs"\n- Every element MUST have unique "configuration-id" attribute\n- No attributes, classes, IDs, or text nodes in XML\n\n**Configuration:**\n- Map each configuration-id to elementConfig (widget props) and stylesConfig (styles)\n- Follow exact PropType schemas from resources above\n- All PropValues need \`$$type\` property matching schema\n- Keep stylesConfig MINIMAL - layout only, NOT reusable styles\n\n**Validation:**\n- Parse XML before submission\n- Match all PropValues to schema (\`$$type\` required)\n- NO LINKS in any configuration\n- Retry on errors up to 10x, reading error messages carefully\n\n# DESIGN QUALITY: AVOID AI SLOP\n\n**Problem:** LLMs default to generic patterns (purple gradients, #333 grays, 24px headings, uniform spacing)\n**Solution:** Make intentional, distinctive choices. When unsure, choose bold over safe.\n\n## Typography Rules\n❌ AVOID: Inter/Roboto/Arial, small ratios (1.5x), medium weights (500-700)\n✅ USE: 3x+ size ratios, extreme weight contrasts (100/200 vs 800/900), tight headlines (1.1 line-height)\n\n## Color Rules\n❌ AVOID: Purple gradients, pure grays (#333/#666/#999), even distribution\n✅ USE: ONE dominant color (60-70%), 1-2 accent colors (10-15%), tinted neutrals (warm/cool grays)\n\n## Spacing Rules\n❌ AVOID: Uniform spacing (all 16px/24px), cramped layouts, centered everything\n✅ USE: Generous spacing (80-120px sections), dramatic variation (12px/48px/96px), asymmetric layouts\n\n## Background Rules\n❌ AVOID: Solid white/gray, single colors\n✅ USE: Layered gradients (2-3 layers), subtle patterns, alternating light/dark sections\n\n## Visual Hierarchy\n1. **Primary** (1 element): Largest, highest contrast, most space\n2. **Secondary** (2-3 elements): 40-60% of primary size\n3. **Tertiary** (rest): Minimal weight, muted\n\n**Contrast techniques:** 3x size differences, 300+ weight differences, color hierarchy (brand → neutral → muted)\n\n# DESIGN CONSTRAINTS (NEVER VIOLATE)\n\n**Typography:**\n- NEVER use Inter, Roboto, Arial, Helvetica as primary display fonts\n- NEVER use font-size ratios < 2.5x between headlines and body\n- NEVER use font-weight 500-700 for headlines (go lighter or heavier)\n\n**Color:**\n- PREFER not to use pure grays - use tinted neutrals (#2d2622, #faf8f6, not #333/#f5f5f5)\n- NEVER distribute colors evenly - commit to ONE dominant\n- NEVER use more than 3 core colors - except for info/alert/badges\n\n**Spacing:**\n- NEVER use uniform spacing\n- NEVER use < 4rem (64px) padding for major sections\n- NEVER center everything\n- PRIORITIZE rem based values over pixel based\n\n**Background:**\n- NEVER use solid #ffffff or #f5f5f5 without texture/gradients\n- ALWAYS layer 2+ gradient/color elements\n\n# WIDGET NOTES\n- Check \`llm_guidance\` property in widget schemas for context\n- Avoid SVG widgets (require content upload tools) - when must, prior to execution ensure assets uploaded\n- Apply style schema to containers for layout control\n\n# PARAMETERS (ALL MANDATORY)\n- **xmlStructure**: Valid XML with configuration-id attributes\n- **elementConfig**: Record of configuration-id → widget PropValues\n- **stylesConfig**: Record of configuration-id → style PropValues (layout only)\n `),e.example('\nA Heading and a button inside a flexbox\n{\n xmlStructure: "<e-flexbox configuration-id="flex1"><e-heading configuration-id="heading1"></e-heading><e-button configuration-id="button1"></e-button></e-flexbox>"\n elementConfig: {\n "flex1": {\n "tag": {\n "$$type": "string",\n "value": "section"\n },\n },\n stylesConfig: {\n "heading1": {\n "font-size": {\n "$$type": "size",\n "value": {\n "size": { "$$type": "number", "value": 24 },\n "unit": { "$$type": "string", "value": "px" }\n }\n },\n "color": {\n "$$type": "color",\n "value": { "$$type": "string", "value": "#333" }\n }\n }\n },\n}\n'),e.parameter("xmlStructure","**MANDATORY** A valid XML structure representing the composition to be built, using custom elementor tags, styling and configuration PropValues."),e.parameter("elementConfig","**MANDATORY** A record mapping configuration IDs to their corresponding configuration objects, defining the PropValues for each element created."),e.parameter("stylesConfig","**MANDATORY** A record mapping style PropTypes to their corresponding style configuration objects, defining the PropValues for styles to be applied to elements."),e.instruction("You will be provided the XML structure with element IDs. These IDs represent the actual elementor widgets created on the page/post.\nYou should use these IDs as reference for further configuration, styling or changing elements later on."),e.instruction('**CRITICAL WORKFLOW REMINDER**:\n1. FIRST: Create reusable global classes for typography, colors, spacing patterns using "create-global-class" tool\n2. SECOND: Use THIS tool with minimal inline styles (only layout & unique properties)\n3. THIRD: Apply global classes to elements using "apply-global-class" tool\n\nThis ensures maximum reusability and consistency across your design system. ALWAYS check [elementor://global-classes] for existing classes before creating new ones.'),e.prompt()};var no=window.elementorV2.schema;const ro={xmlStructure:no.z.string().describe("The XML structure representing the composition to be built"),elementConfig:no.z.record(no.z.string().describe("The configuration id"),no.z.record(no.z.string().describe("property name"),no.z.any().describe(`The PropValue for the property, refer to ${p}`))).describe("A record mapping element IDs to their configuration objects. REQUIRED"),stylesConfig:no.z.record(no.z.string().describe("The configuration id"),no.z.record(no.z.string().describe("StyleSchema property name"),no.z.any().describe(`The PropValue for the style property. MANDATORY, refer to [${f}]`))).describe(`A record mapping element IDs to their styles configuration objects. Use the actual styles schema from [${f}].`).default({})},oo={errors:no.z.string().describe("Error message if the composition building failed").optional(),xmlStructure:no.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()},io=`Configure an existing element on the page.\n\n# **CRITICAL - REQUIRED INFORMATION (Must read before using this tool)**\n1. [${p}]\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. [${f}]\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 retreive 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.\nRetreive and check the common styles schema at the resource list "styles-schema" at editor-canvas__elementor://styles/schema/{category}\n\n# Parameters\n- propertiesToChange: An object containing the properties to change, with their new values. MANDATORY. When updating a style only, provide an empty object.\n- stylePropertiesToChange: An object containing the style properties to change, with their new values. OPTIONAL\n- elementId: The ID of the element to configure. MANDATORY\n- elementType: The type of the element to configure (i.e. e-heading, e-button). MANDATORY\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<IMPORTANT>\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, retreive the schema from the resources mentioned above.\n</IMPORTANT>\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 retreive the PropType schema for the element type you are configuring.\nMake sure you have to "styles-schema" resources available to retreive 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 objecct, 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\n# Example\n\`\`\`json\n{\n propertiesToChange: {\n // List of properties TO CHANGE, following the PropType schema for the element as defined in the resource [${p}]\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', // MANDATORY do not forget to include the correct $$type for every property\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\n<IMPORTANT>\nThe $$type property is MANDATORY for every value, it is required to parse the value and apply application-level effects.\n</IMPORTANT>\n`,so={propertiesToChange:no.z.record(no.z.string().describe("The property name."),no.z.any().describe(`PropValue, refer to [${p}] by correct type, as appears in elementType`),no.z.any()).describe("An object record containing property names and their new values to be set on the element"),stylePropertiesToChange:no.z.record(no.z.string().describe("The style property name"),no.z.any().describe(`The style PropValue, refer to [${f}] how to generate values`),no.z.any()).describe("An object record containing style property names and their new values to be set on the element").default({}),elementType:no.z.string().describe("The type of the element to retreive the schema"),elementId:no.z.string().describe("The unique id of the element to configure")},lo={success:no.z.boolean().describe("Whether the configuration change was successful, only if propertyName and propertyValue are provided")};function ao(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 [${p.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 [${f.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 co={elementId:no.z.string()},uo={properties:no.z.record(no.z.string(),no.z.any()).describe("A record mapping PropTypes to their corresponding PropValues"),style:no.z.record(no.z.string(),no.z.any()).describe("A record mapping StyleSchema properties to their corresponding PropValues"),childElements:no.z.array(no.z.object({id:no.z.string(),elementType:no.z.string(),childElements:no.z.array(no.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")},po=e=>(e.children||[]).map(e=>({id:e.id,elementType:e.model.get("elType")||e.model.get("widgetType")||"unknown",childElements:po(e)})),fo=e=>{const{setMCPDescription:t}=e;t('Everything related to creative design, layout, styling and building the pages, specifically element of type "widget"'),(e=>{const{mcpServer:t}=e;t.resource("styles-best-practices",m,async()=>({contents:[{uri:m,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 ${f}.\nThe css string must follow standard CSS syntax, with properties and values separated by semicolons, no selectors, or nesting rules allowed.`}]})),t.resource("styles-schema",new c.ResourceTemplate(f,{list:()=>({resources:[...Object.keys((0,d.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"},async(e,t)=>{const n="string"==typeof t.category?t.category:t.category?.[0],r=(0,d.getStylesSchema)()[n];if(!r)throw new Error(`No styles schema found for category: ${n}`);const o=u.Schema.propTypeToJsonSchema(r);return{contents:[{uri:e.toString(),mimeType:"application/json",text:JSON.stringify(u.Schema.enrichWithIntention(o,'Desired CSS in format "property: value;"'))}]}}),t.resource("widget-schema-by-type",new c.ResourceTemplate(p,{list:()=>{const e=(0,a.getWidgetsCache)()||{};return{resources:Object.keys(e||{}).filter(t=>e[t]?.atomic_props_schema&&!1!==e[t].meta?.llm_support).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],o=r?.atomic_props_schema;if(!o||!r)throw new Error(`No prop schema found for element type: ${n}`);const i=Object.fromEntries(Object.entries(o).map(([e,t])=>[e,u.Schema.propTypeToJsonSchema(t)]));u.Schema.nonConfigurablePropKeys.forEach(e=>{delete i[e]});const s="string"==typeof r?.meta?.description?r.meta.description:void 0,l={},c=r?.base_styles;c&&Object.values(c).forEach(e=>{e.variants.forEach(e=>{Object.assign(l,e.props)})});const d=Object.keys(l).length>0,p={can_have_children:!!r?.meta?.is_container};return d&&(p.instructions="These are the default styles applied to the widget. Override only when necessary.",p.default_styles=l),{contents:[{uri:e.toString(),mimeType:"application/json",text:JSON.stringify({type:"object",properties:i,description:s,llm_guidance:p})}]}})})(e),(e=>{const{mcpServer:t,sendResourceUpdated:n}=e;let r=null;const o=()=>{const e=Xr(),t=JSON.stringify(e,null,2);t!==r&&(r=t,n({uri:qr}))};(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")],o),o(),t.resource("document-structure",qr,async()=>{const e=Xr();return{contents:[{uri:qr,text:JSON.stringify(e,null,2)}]}})})(e),(e=>{const{addTool:t}=e;t({name:"build-compositions",description:to(),schema:ro,requiredResources:[{description:"Widgets schema",uri:p},{description:"Styles schema",uri:f},{description:"Global Classes",uri:"elementor://global-classes"},{description:"Global Variables",uri:"elementor://global-variables"},{description:"Styles best practices",uri:m}],outputSchema:oo,modelPreferences:{hints:[{name:"claude-sonnet-4-5"}]},handler:async e=>{const{xmlStructure:t,elementConfig:n,stylesConfig:r}=e;let o="";const i=[],s=[],l=(0,a.getContainer)("document");try{const e=eo.fromXMLString(t,{createElement:a.createElement,getWidgetsCache:a.getWidgetsCache});e.setElementConfig(n),e.setStylesConfig(r);const{configErrors:c,invalidStyles:u,rootContainers:d}=e.build(l);if(o=(new XMLSerializer).serializeToString(e.getXML()),c.length)throw i.push(...c.map(e=>new Error(e))),new Error("Configuration errors occurred during composition building.");s.push(...d),Object.entries(u).forEach(([e,t])=>{const n={value:t.join(";\n")};Jr({elementId:e,propertyName:"_styles",propertyValue:{_styles:{custom_css:n}},elementType:"widget"})})}catch(e){i.push(e)}if(i.length){s.forEach(e=>{(0,a.deleteElement)({elementId:e.id,options:{useHistory:!1}})});const e=i.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")}\n\n"Missing $$type" errors indicate that the configuration objects are invalid. Try again and apply **ALL** object entries with correct $$type.\nNow that you have these errors, fix them and try again. Errors regarding configuration objects, please check against the PropType schemas`;throw new Error(t)}return{xmlStructure:o,errors:i?.length?i.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:co,outputSchema:uo,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.settings,r=(0,a.getWidgetsCache)()?.[t.model.get("widgetType")||t.model.get("elType")||""]?.atomic_props_schema;if(!n||!r)throw new Error(`No settings or prop schema found for element ID: ${e}`);const o={},i={};u.Schema.configurableKeys(r).forEach(e=>{o[e]=structuredClone(n.get(e))});const s=(0,a.getElementStyles)(e)||{},l=Object.values(s).find(e=>"local"===e.label);if(l){const e=l.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]&&(i[e]=structuredClone(t[e]))}),e.custom_css&&(i.custom_css=atob(e.custom_css.raw))}}return{properties:{...o},style:{...i},childElements:po(t)}}})})(e),(e=>{const{addTool:t}=e;t({name:"configure-element",description:io,schema:so,outputSchema:lo,requiredResources:[{description:"Widgets schema",uri:p},{description:"Styles schema",uri:f}],modelPreferences:{hints:[{name:"claude-sonnet-4-5"}],intelligencePriority:.8,speedPriority:.7},handler:({elementId:e,propertiesToChange:t,elementType:n,stylePropertiesToChange:r})=>{const o=Object.entries(t),{valid:i,errors:s}=Zr.validatePropSchema(n,t),{valid:l,errors:a}=Zr.validateStyles(r||{});if(!i){const t=`Failed to configure element "${e}" due to invalid properties: ${s?.join("\n- ")}`;throw new Error(t)}if(!l){const t=`Failed to configure element "${e}" due to invalid style properties: ${a?.join("\n- ")}`;throw new Error(t)}for(const[t,r]of o)try{Jr({elementId:e,elementType:n,propertyName:t,propertyValue:r})}catch(r){const o=ao({propertyName:t,elementId:e,elementType:n,error:r,propertyType:"prop"});throw new Error(o)}for(const[t,o]of Object.entries(r||{}))try{Jr({elementId:e,elementType:n,propertyName:"_styles",propertyValue:{[t]:o}})}catch(r){const o=ao({propertyName:`(style) ${t}`,elementId:e,elementType:n,propertyType:"style",error:r});throw new Error(o)}return{success:!0}}})})(e),(e=>{const{mcpServer: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:l,mimeType:"application/json",text:JSON.stringify(r())}]});t.resource("breakpoints ",l,()=>o()),window.addEventListener((0,s.v1ReadyEvent)().name,()=>{n({uri:l,...o()})})})(e)},mo=p.replace("{widgetType}","element-schema"),ho=`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 (\`${p}\`)\n- **Style Schema**: Common styles shared across all widgets and containers (\`${f}\`)\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 \`${p}\` to see available widgets\n- Retrieve configuration schema from \`${mo}\` 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<e-container configuration-id="container-1">\n <e-heading configuration-id="heading-1" />\n <e-text configuration-id="text-1" />\n</e-container>\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 \`${f}\`:\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`;var go=window.elementorV2.editorNotifications;const yo={href:"https://go.elementor.com/element-link-inside-link-infotip",target:"_blank",color:"inherit",variant:"text",sx:{marginInlineStart:"20px"},children:"Learn more"};function vo(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,Tr.__)("To paste a link to this element, first remove the link from it's parent container.","elementor"),id:"paste-in-link-blocked",additionalActionProps:[yo]},l=wo(i,r);return l&&(0,go.notify)(s),l}function bo(e){const{containers:t=[e.container],target:n}=e,r=t,o=n,i={type:"default",message:(0,Tr.__)("To drag a link to this element, first remove the link from it's parent container.","elementor"),id:"move-in-link-blocked",additionalActionProps:[yo]},s=wo(r,[o]);return s&&(0,go.notify)(i),s}function wo(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 Eo(e){const{containers:t=[e.container]}=e;return t.some(So)}function So(e){return!!e&&Boolean(To(e))}function xo(e){const t=To(e);if(!t)return null;const[n]=Object.entries(t).find(([,e])=>"plain"===e.kind&&e.key===u.CLASSES_PROP_KEY)??[];return n??null}function To(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 Ro(e){return e.length>1?(0,Tr.__)("Elements","elementor"):(0,a.getElementLabel)(e[0].id)}const Co=()=>(0,s.undoable)({do:({containers:e,newStyle:t})=>e.map(e=>{const n=e.id,r=xo(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:w.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=xo(e);if(!o)return;const[i]=r.originalStyle.variants,s=r.originalStyle.variants.slice(1);(0,a.createElementStyle)({elementId:e.id,classesProp:o,label:w.ELEMENTS_STYLES_RESERVED_LABEL,styleId:r.styleId,...i,additionalVariants:s})})}},{title:({containers:e})=>Ro(e),subtitle:(0,Tr.__)("Style Pasted","elementor")});const Po=()=>(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=xo(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:w.ELEMENTS_STYLES_RESERVED_LABEL,...n,additionalVariants:i})})})}},{title:({containers:e})=>Ro(e),subtitle:(0,Tr.__)("Style Reset","elementor")});function $o(){gn.register("size",nr).register("shadow",tr).register("stroke",rr).register("dimensions",Xn(["block-start","block-end","inline-start","inline-end"],({propKey:e,key:t})=>`${e}-${t}`)).register("filter",Gn).register("backdrop-filter",Gn).register("box-shadow",qn(",")).register("background",Hn).register("background-overlay",Fn).register("background-color-overlay",Dn).register("background-image-overlay",Un).register("background-gradient-overlay",zn).register("gradient-color-stop",qn(",")).register("color-stop",Yn).register("background-image-position-offset",er).register("background-image-size-scale",Wn).register("image-src",Ln).register("image",Nn).register("object-position",er).register("transform-origin",ar).register("perspective-origin",Zn).register("transform-move",sr).register("transform-scale",dr).register("transform-rotate",ur).register("transform-skew",fr).register("transform-functions",or).register("transform",Xn(["transform-functions","transform-origin","perspective","perspective-origin"],({key:e})=>"transform-functions"===e?"transform":e)).register("transition",hr).register("layout-direction",Xn(["row","column"],({propKey:e,key:t})=>`${t}-${e}`)).register("flex",Jn).register("border-width",Xn(["block-start","block-end","inline-start","inline-end"],({key:e})=>`border-${e}-width`)).register("border-radius",Xn(["start-start","start-end","end-start","end-end"],({key:e})=>`border-${e}-radius`)).registerFallback(Vn),function(){const e=Co();(0,s.blockCommand)({command:"document/elements/paste-style",condition:Eo}),(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(So);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||!So(l))return;const c=s.styles,d=Object.values(c??{})[0],p=function(e,t){const n=xo(e);if(!n)return[];const r=(0,a.getElementSetting)(e.id,n);return r?.value.filter(e=>e!==t?.id)??[]}(l,d);p.length&&function(e,t){e.forEach(e=>{const n=xo(e);if(!n)return;const r=(0,a.getElementSetting)(e.id,n),o=u.classesPropTypeUtil.extract(r)??[],i=u.classesPropTypeUtil.create(Array.from(new Set([...t,...o])));(0,a.updateElementSettings)({id:e.id,props:{[n]:i}})})}(o,p),d&&t({containers:o,newStyle:d})}(t.args,e))}(),function(){const e=Po();(0,s.blockCommand)({command:"document/elements/reset-style",condition:Eo}),(0,s.__privateListenTo)((0,s.commandStartEvent)("document/elements/reset-style"),t=>function(e,t){const{containers:n=[e.container]}=e,r=n.filter(So);r.length&&t({containers:r})}(t.args,e))}(),(0,s.blockCommand)({command:"document/elements/paste",condition:vo}),(0,s.blockCommand)({command:"document/elements/move",condition:bo}),Ur(),(0,s.__privateListenTo)((0,s.v1ReadyEvent)(),()=>{const e=(0,a.getWidgetsCache)()??{},t=window,n=function(){const e=(0,yr.createArrayLoader)({}),t=(0,yr.createEnvironment)(e);return t.registerEscapingStrategy(vr,"html_tag"),t.registerEscapingStrategy(br,"full_url"),{register:e.setTemplate,render:t.render}}();Object.entries(e).forEach(([e,r])=>{if(!r.atomic)return;let o;o=Hr[e]&&Er(r)?Hr[e]({type:e,renderer:n,element:r}):Er(r)?Br({type:e,renderer:n,element:r}):function(e){const t=window;return class extends t.elementor.modules.elements.types.Widget{getType(){return e}getView(){return wr()}}}(e),t.elementor.elementsManager.registerElementType(new o)})}),kn.register("classes",function(){const e=new Map;return t=>t.map(t=>function(e,t){if(!t.has(e)){const n=w.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=w.stylesRepository.getProviderByKey(n);return r?.actions.resolveCssName(e)??e}(t,e)).filter(Boolean)}()).register("link",In).register("query",Mn).register("image",Nn).register("image-src",Ln).register("attributes",An).register("date-time",On).registerFallback(Vn),(0,g.init)(),(0,h.injectIntoTop)({id:"elements-overlays",component:Jt}),(0,h.injectIntoTop)({id:"canvas-style-render",component:$n}),(0,h.injectIntoTop)({id:"canvas-interactions-render",component:tn}),(0,h.injectIntoLogic)({id:"classes-rename",component:S}),fo((0,c.getMCPByDomain)("canvas",{instructions:ho}))}const ko=["elementor-element"],_o=()=>{Mo()?.panelElements?.trigger("element:drag:end")},Ao=(e,t)=>{Oo(t);const n=Mo();n?.editor.reply("element:dragged",null),n?.panelElements.reply("element:selected",Lo(e)).trigger("element:drag:start")},Oo=e=>{const t={groups:Io(e)};e.dataTransfer?.setData(JSON.stringify(t),"true")},Io=e=>{const t=e.dataTransfer?.getData("text/plain");return t?JSON.parse(t).groups:ko},Mo=()=>{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},Lo=({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}})}};(window.elementorV2=window.elementorV2||{}).editorCanvas=i}(),window.elementorV2.editorCanvas?.init?.();
[-] editor-canvas.asset.php
[edit]
[-] editor-canvas.js.LICENSE.txt
[edit]
[-] editor-canvas.min.js.LICENSE.txt
[edit]
[+]
..
[-] editor-canvas.strings.js
[edit]
[-] editor-canvas.js
[edit]
[-] editor-canvas.min.js
[edit]