/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
elementor
/
assets
/
js
/
packages
/
editor-canvas
/
Upload File
HOME
/*! For license information please see editor-canvas.min.js.LICENSE.txt */ !function(){"use strict";var e,t,n={1020:function(e,t,n){var r=n(7557),o=Symbol.for("react.element"),i=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,l={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!a.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:l,_owner:s.current}}t.jsx=l,t.jsxs=l},3617:function(e){e.exports=window.ReactDOM},4848:function(e,t,n){e.exports=n(1020)},5338:function(e,t,n){var r=n(3617);t.H=r.createRoot,r.hydrateRoot},7557:function(e){e.exports=window.React}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(function(e){s[e]=function(){return n[e]}});return s.default=function(){return n},o.d(i,s),i},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};o.r(i),o.d(i,{BREAKPOINTS_SCHEMA_URI:function(){return a},DOCUMENT_STRUCTURE_URI:function(){return Vi},STYLE_SCHEMA_URI:function(){return p},UnknownStyleStateError:function(){return Sn},UnknownStyleTypeError:function(){return Tn},WIDGET_SCHEMA_URI:function(){return m},canBeNestedTemplated:function(){return si},createNestedTemplatedElementType:function(){return ai},createNestedTemplatedElementView:function(){return ui},createPropsResolver:function(){return vn},createTemplatedElementView:function(){return ii},createTransformer:function(){return nr},createTransformersRegistry:function(){return bn},endDragElementFromPanel:function(){return Es},init:function(){return bs},isAtomicWidget:function(){return ps},registerElementType:function(){return ji},registerModelExtensions:function(){return Di},settingsTransformersRegistry:function(){return tr},startDragElementFromPanel:function(){return Ts},styleTransformersRegistry:function(){return En},stylesInheritanceTransformersRegistry:function(){return wn}});var s=window.elementorV2.editorV1Adapters;const a="elementor://breakpoints/list";var l=window.elementorV2.editorElements,c=window.elementorV2.editorMcp,u=window.elementorV2.editorProps,d=window.elementorV2.editorStyles;const m="elementor://widgets/schema/{widgetType}",p="elementor://styles/schema/{category}",f="elementor://styles/best-practices";var h=window.elementorV2.editor,g=o(7557),y=o.t(g,2),v=window.elementorV2.editorDocuments,b=window.elementorV2.editorStylesRepository,w=window.elementorV2.utils;const E=()=>((0,g.useEffect)(()=>{const e=T();return()=>{e()}},[]),null),T=()=>b.stylesRepository.subscribe((e,t)=>{e&&t&&Object.keys(t).forEach(n=>{if(!e[n]||(0,w.hash)(e[n])===(0,w.hash)(t[n]))return;const r=e[n],o=t[n];r.label!==o.label&&S(r.label,o.label)})}),S=(e,t)=>{Object.values((0,v.getV1DocumentsManager)().documents).forEach(n=>{const r=n.container;r.view?.el?.querySelectorAll(`.elementor .${e}`).forEach(n=>{n.classList.replace(e,t)})})};var C=window.elementorV2.ui;function x(){return"undefined"!=typeof window}function R(e){return k(e)?(e.nodeName||"").toLowerCase():"#document"}function _(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function A(e){var t;return null==(t=(k(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function k(e){return!!x()&&(e instanceof Node||e instanceof _(e).Node)}function O(e){return!!x()&&(e instanceof Element||e instanceof _(e).Element)}function I(e){return!!x()&&(e instanceof HTMLElement||e instanceof _(e).HTMLElement)}function P(e){return!(!x()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof _(e).ShadowRoot)}function N(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=B(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function L(e){return/^(table|td|th)$/.test(R(e))}function M(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const $=/transform|translate|scale|rotate|perspective|filter/,D=/paint|layout|strict|content/,j=e=>!!e&&"none"!==e;let z;function V(e){const t=O(e)?B(e):e;return j(t.transform)||j(t.translate)||j(t.scale)||j(t.rotate)||j(t.perspective)||!U()&&(j(t.backdropFilter)||j(t.filter))||$.test(t.willChange||"")||D.test(t.contain||"")}function U(){return null==z&&(z="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),z}function F(e){return/^(html|body|#document)$/.test(R(e))}function B(e){return _(e).getComputedStyle(e)}function W(e){return O(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function H(e){if("html"===R(e))return e;const t=e.assignedSlot||e.parentNode||P(e)&&e.host||A(e);return P(t)?t.host:t}function G(e){const t=H(e);return F(t)?e.ownerDocument?e.ownerDocument.body:e.body:I(t)&&N(t)?t:G(t)}function Y(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=G(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||[],N(o)?o:[],e&&n?Y(e):[])}return t.concat(o,Y(o,[],n))}function q(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var X=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),K="undefined"==typeof Element,J=K?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Z=!K&&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},Q=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):Q(e.parentNode))},ee=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!Q(i,!1))if("SLOT"===i.tagName){var s=i.assignedElements(),a=s.length?s:i.children,l=ee(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{J.call(i,X)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var c=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),u=!Q(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(c&&u){var d=ee(!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},te=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ne=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))&&!te(e)?0:e.tabIndex},re=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},oe=function(e){return"INPUT"===e.tagName},ie=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},se=function(e,t){return!(t.disabled||function(e){return oe(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=J.call(e,"details>summary:first-of-type")?e.parentElement:e;if(J.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ie(e)}else{if("function"==typeof r){for(var i=e;e;){var s=e.parentElement,a=Z(e);if(s&&!s.shadowRoot&&!0===r(s))return ie(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=i}if(function(e){var t,n,r,o,i=e&&Z(e),s=null===(t=i)||void 0===t?void 0:t.host,a=!1;if(i&&i!==e)for(a=!!(null!==(n=s)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(s)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!a&&s;){var l,c,u;a=!(null===(c=s=null===(l=i=Z(s))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!J.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},ae=function(e,t){return!(function(e){return function(e){return oe(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Z(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)||ne(t)<0||!se(e,t))},le=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ce=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=ne(e);return n<0&&t&&!te(e)?0:n}(i,o),a=o?ce(e.candidates):i;0===s?o?t.push.apply(t,a):t.push(i):n.push({documentOrder:r,tabIndex:s,item:e,isScope:o,content:a})}),n.sort(re).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},ue=function(e,t){var n;return n=(t=t||{}).getShadowRoot?ee([e],t.includeContainer,{filter:ae.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:le}):function(e,t,n){if(Q(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(X));return t&&J.call(e,X)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,ae.bind(null,t)),ce(n)};function de(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&P(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function me(e){return(null==e?void 0:e.ownerDocument)||document}function pe(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var fe="undefined"!=typeof document?g.useLayoutEffect:function(){};function he(e){const t=g.useRef(e);return fe(()=>{t.current=e}),t}const ge={...y}.useInsertionEffect||(e=>e());function ye(e){const t=g.useRef(()=>{});return ge(()=>{t.current=e}),g.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 ve=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function be(e,t){const n=ue(e,ve()),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}(me(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function we(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!de(n,r)}function Ee(e){ue(e,ve()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Te(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 Se=o(4848),Ce=o(3617);const xe=Math.min,Re=Math.max,_e=Math.round,Ae=Math.floor,ke=e=>({x:e,y:e}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"};function Ie(e,t){return"function"==typeof e?e(t):e}function Pe(e){return e.split("-")[0]}function Ne(e){return e.split("-")[1]}function Le(e){return"y"===e?"height":"width"}function Me(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function $e(e){return"x"===Me(e)?"y":"x"}function De(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const je=["left","right"],ze=["right","left"],Ve=["top","bottom"],Ue=["bottom","top"];function Fe(e){const t=Pe(e);return Oe[t]+e.slice(t.length)}function Be(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 We(e,t,n){let{reference:r,floating:o}=e;const i=Me(t),s=$e(t),a=Le(s),l=Pe(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ne(t)){case"start":p[s]-=m*(n&&c?-1:1);break;case"end":p[s]+=m*(n&&c?-1:1)}return p}async function He(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=Ie(t,e),f=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),h=a[m?"floating"===d?"reference":"floating":d],g=Be(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=Be(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-w.top+f.top)/b.y,bottom:(w.bottom-g.bottom+f.bottom)/b.y,left:(g.left-w.left+f.left)/b.x,right:(w.right-g.right+f.right)/b.x}}const Ge=new Set(["left","top"]);function Ye(e){const t=B(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=I(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=_e(n)!==i||_e(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function qe(e){return O(e)?e:e.contextElement}function Xe(e){const t=qe(e);if(!I(t))return ke(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ye(t);let s=(i?_e(n.width):n.width)/r,a=(i?_e(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Ke=ke(0);function Je(e){const t=_(e);return U()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ke}function Ze(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=qe(e);let s=ke(1);t&&(r?O(r)&&(s=Xe(r)):s=Xe(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==_(e))&&t}(i,n,r)?Je(i):ke(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=_(i),t=r&&O(r)?_(r):r;let n=e,o=q(n);for(;o&&r&&t!==n;){const e=Xe(o),t=o.getBoundingClientRect(),r=B(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=_(o),o=q(n)}}return Be({width:u,height:d,x:l,y:c})}function Qe(e,t){const n=W(e).scrollLeft;return t?t.left+n:Ze(A(e)).left+n}function et(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Qe(e,n),y:n.top+t.scrollTop}}function tt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=_(e),r=A(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=U();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=Qe(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=A(e),n=W(e),r=e.ownerDocument.body,o=Re(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Re(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Qe(e);const a=-n.scrollTop;return"rtl"===B(r).direction&&(s+=Re(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(A(e));else if(O(t))r=function(e,t){const n=Ze(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=I(e)?Xe(e):ke(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=Je(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Be(r)}function nt(e,t){const n=H(e);return!(n===t||!O(n)||F(n))&&("fixed"===B(n).position||nt(n,t))}function rt(e,t,n){const r=I(t),o=A(t),i="fixed"===n,s=Ze(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ke(0);function c(){l.x=Qe(o)}if(r||!r&&!i)if(("body"!==R(t)||N(o))&&(a=W(t)),r){const e=Ze(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?ke(0):et(o,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function ot(e){return"static"===B(e).position}function it(e,t){if(!I(e)||"fixed"===B(e).position)return null;if(t)return t(e);let n=e.offsetParent;return A(e)===n&&(n=n.ownerDocument.body),n}function st(e,t){const n=_(e);if(M(e))return n;if(!I(e)){let t=H(e);for(;t&&!F(t);){if(O(t)&&!ot(t))return t;t=H(t)}return n}let r=it(e,t);for(;r&&L(r)&&ot(r);)r=it(r,t);return r&&F(r)&&ot(r)&&!V(r)?n:r||function(e){let t=H(e);for(;I(t)&&!F(t);){if(V(t))return t;if(M(t))return null;t=H(t)}return null}(e)||n}const at={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=A(r),a=!!t&&M(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ke(1);const u=ke(0),d=I(r);if((d||!d&&!i)&&(("body"!==R(r)||N(s))&&(l=W(r)),d)){const e=Ze(r);c=Xe(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const m=!s||d||i?ke(0):et(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+m.x,y:n.y*c.y-l.scrollTop*c.y+u.y+m.y}},getDocumentElement:A,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?M(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Y(e,[],!1).filter(e=>O(e)&&"body"!==R(e)),o=null;const i="fixed"===B(e).position;let s=i?H(e):e;for(;O(s)&&!F(s);){const t=B(s),n=V(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||N(s)&&!n&&nt(e,s))?r=r.filter(e=>e!==s):o=t,s=H(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=tt(t,i[0],o);let a=s.top,l=s.right,c=s.bottom,u=s.left;for(let e=1;e<i.length;e++){const n=tt(t,i[e],o);a=Re(n.top,a),l=xe(n.right,l),c=xe(n.bottom,c),u=Re(n.left,u)}return{width:l-u,height:c-a,x:u,y:a}},getOffsetParent:st,getElementRects:async function(e){const t=this.getOffsetParent||st,n=this.getDimensions,r=await n(e.floating);return{reference:rt(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}=Ye(e);return{width:t,height:n}},getScale:Xe,isElement:O,isRTL:function(e){return"rtl"===B(e).direction}};function lt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ct(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=qe(e),u=o||i?[...c?Y(c):[],...t?Y(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&a?function(e,t){let n,r=null;const o=A(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:m,height:p}=c;if(a||t(),!m||!p)return;const f={rootMargin:-Ae(d)+"px "+-Ae(o.clientWidth-(u+m))+"px "+-Ae(o.clientHeight-(d+p))+"px "+-Ae(u)+"px",threshold:Re(0,xe(1,l))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==r||lt(c,e.getBoundingClientRect())||s(),h=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let m,p=-1,f=null;s&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),c&&!l&&f.observe(c),t&&f.observe(t));let h=l?Ze(e):null;return l&&function t(){const r=Ze(e);h&&!lt(h,r)&&n(),h=r,m=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const ut=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:h=!0,...g}=Ie(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=Pe(o),v=Me(a),b=Pe(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),E=m||(b||!h?[Fe(a)]:function(e){const t=Fe(e);return[De(e),t,De(t)]}(a)),T="none"!==f;!m&&T&&E.push(...function(e,t,n,r){const o=Ne(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?ze:je:t?je:ze;case"left":case"right":return t?Ve:Ue;default:return[]}}(Pe(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(De)))),i}(a,h,f,w));const S=[a,...E],C=await l.detectOverflow(t,g),x=[];let R=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&x.push(C[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Ne(e),o=$e(e),i=Le(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Fe(s)),[s,Fe(s)]}(o,s,w);x.push(C[e[0]],C[e[1]])}if(R=[...R,{placement:o,overflows:x}],!x.every(e=>e<=0)){var _,A;const e=((null==(_=i.flip)?void 0:_.index)||0)+1,t=S[e];if(t&&("alignment"!==d||v===Me(t)||R.every(e=>Me(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:R},reset:{placement:t}};let n=null==(A=R.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var k;const e=null==(k=R.filter(e=>{if(T){const t=Me(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:k[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},dt=(e,t,n)=>{const r=new Map,o={platform:at,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:He},l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=We(c,r,l),m=r,p=0;const f={};for(let n=0;n<i.length;n++){const h=i[n];if(!h)continue;const{name:g,fn:y}=h,{x:v,y:b,data:w,reset:E}=await y({x:u,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=b?b:d,f[g]={...f[g],...w},E&&p<50&&(p++,"object"==typeof E&&(E.placement&&(m=E.placement),E.rects&&(c=!0===E.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),({x:u,y:d}=We(c,m,l))),n=-1)}return{x:u,y:d,placement:m,strategy:o,middlewareData:f}})(e,t,{...o,platform:i})};var mt="undefined"!=typeof document?g.useLayoutEffect:function(){};function pt(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(!pt(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||pt(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function ft(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ht(e,t){const n=ft(e);return Math.round(t*n)/n}function gt(e){const t=g.useRef(e);return mt(()=>{t.current=e}),t}const yt=(e,t)=>{const n=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=Pe(n),a=Ne(n),l="y"===Me(n),c=Ge.has(s)?-1:1,u=i&&l?-1:1,d=Ie(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*u,y:m*c}:{x:m*c,y:p*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},vt=(e,t)=>{const n=ut(e);return{name:n.name,fn:n.fn,options:[e,t]}},bt=(e,t)=>{const n=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=Ie(e,t),u=await s.detectOverflow(t,c),d=Pe(o),m=Ne(o),p="y"===Me(o),{width:f,height:h}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=m===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,g="end"===m?"top":"bottom");const v=h-u.top-u.bottom,b=f-u.left-u.right,w=xe(h-u[g],v),E=xe(f-u[y],b),T=!t.middlewareData.shift;let S=w,C=E;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=v),T&&!m){const e=Re(u.left,0),t=Re(u.right,0),n=Re(u.top,0),r=Re(u.bottom,0);p?C=f-2*(0!==e||0!==t?e+t:Re(u.left,u.right)):S=h-2*(0!==n||0!==r?n+r:Re(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:S});const x=await s.getDimensions(a.floating);return f!==x.width||h!==x.height?{reset:{rects:!0}}:{}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},wt="data-floating-ui-focusable",Et="active",Tt="selected",St={...y};let Ct=!1,xt=0;const Rt=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+xt++,_t=St.useId||function(){const[e,t]=g.useState(()=>Ct?Rt():void 0);return fe(()=>{null==e&&t(Rt())},[]),g.useEffect(()=>{Ct=!0},[]),e};const At=g.createContext(null),kt=g.createContext(null),Ot=()=>{var e;return(null==(e=g.useContext(At))?void 0:e.id)||null},It=()=>g.useContext(kt);function Pt(e){return"data-floating-ui-"+e}function Nt(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const Lt=Pt("safe-polygon");function Mt(e,t,n){if(n&&!pe(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 $t(e){return"function"==typeof e?e():e}function Dt(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:m=!0}=t,p=It(),f=Ot(),h=he(c),y=he(l),v=he(n),b=he(d),w=g.useRef(),E=g.useRef(-1),T=g.useRef(),S=g.useRef(-1),C=g.useRef(!0),x=g.useRef(!1),R=g.useRef(()=>{}),_=g.useRef(!1),A=ye(()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});g.useEffect(()=>{if(a)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(Nt(E),Nt(S),C.current=!0,_.current=!1)}},[a,i]),g.useEffect(()=>{if(!a)return;if(!h.current)return;if(!n)return;function e(e){A()&&r(!1,e,"hover")}const t=me(s.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[s.floating,n,r,a,h,A]);const k=g.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=Mt(y.current,"close",w.current);o&&!T.current?(Nt(E),E.current=window.setTimeout(()=>r(!1,e,n),o)):t&&(Nt(E),r(!1,e,n))},[y,r]),I=ye(()=>{R.current(),T.current=void 0}),P=ye(()=>{if(x.current){const e=me(s.floating).body;e.style.pointerEvents="",e.removeAttribute(Lt),x.current=!1}}),N=ye(()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type));g.useEffect(()=>{if(a&&O(s.domReference)){const r=s.domReference,o=s.floating;return n&&r.addEventListener("mouseleave",i),m&&r.addEventListener("mousemove",e,{once:!0}),r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",t),o&&(o.addEventListener("mouseleave",i),o.addEventListener("mouseenter",l),o.addEventListener("mouseleave",c)),()=>{n&&r.removeEventListener("mouseleave",i),m&&r.removeEventListener("mousemove",e),r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",t),o&&(o.removeEventListener("mouseleave",i),o.removeEventListener("mouseenter",l),o.removeEventListener("mouseleave",c))}}function e(e){if(Nt(E),C.current=!1,u&&!pe(w.current)||$t(b.current)>0&&!Mt(y.current,"open"))return;const t=Mt(y.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(N())return void P();R.current();const t=me(s.floating);if(Nt(S),_.current=!1,h.current&&o.current.floatingContext){n||Nt(E),T.current=h.current({...o.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){P(),I(),N()||k(e,!0,"safe-polygon")}});const r=T.current;return t.addEventListener("mousemove",r),void(R.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==w.current||!de(s.floating,e.relatedTarget))&&k(e)}function i(e){N()||o.current.floatingContext&&(null==h.current||h.current({...o.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){P(),I(),N()||k(e)}})(e))}function l(){Nt(E)}function c(e){N()||k(e,!1)}},[s,a,e,u,m,k,I,P,r,n,v,p,y,h,o,N,b]),fe(()=>{var e;if(a&&n&&null!=(e=h.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&A()){x.current=!0;const e=s.floating;if(O(s.domReference)&&e){var t;const n=me(s.floating).body;n.setAttribute(Lt,"");const r=s.domReference,o=null==p||null==(t=p.nodesRef.current.find(e=>e.id===f))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[a,n,f,s,p,h,A]),fe(()=>{n||(w.current=void 0,_.current=!1,I(),P())},[n,I,P]),g.useEffect(()=>()=>{I(),Nt(E),Nt(S),P()},[a,s.domReference,I,P]);const L=g.useMemo(()=>{function e(e){w.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){C.current||v.current||r(!0,t,"hover")}u&&!pe(w.current)||n||0===$t(b.current)||_.current&&e.movementX**2+e.movementY**2<2||(Nt(S),"touch"===w.current?o():(_.current=!0,S.current=window.setTimeout(o,$t(b.current))))}}},[u,r,n,v,b]);return g.useMemo(()=>a?{reference:L}:{},[a,L])}const jt={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},zt=g.forwardRef(function(e,t){const[n,r]=g.useState();fe(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[Pt("focus-guard")]:"",style:jt};return(0,Se.jsx)("span",{...e,...o})}),Vt={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ut=g.createContext(null),Ft=Pt("portal");function Bt(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=_t(),o=Wt(),[i,s]=g.useState(null),a=g.useRef(null);return fe(()=>()=>{null==i||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),fe(()=>{if(!r)return;if(a.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(Ft,""),e.appendChild(n),a.current=n,s(n)},[t,r]),fe(()=>{if(null===n)return;if(!r)return;if(a.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!k(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(Ft,""),e=i||e,e.appendChild(l),a.current=l,s(l)},[t,n,r,o]),i}({id:n,root:r}),[s,a]=g.useState(null),l=g.useRef(null),c=g.useRef(null),u=g.useRef(null),d=g.useRef(null),m=null==s?void 0:s.modal,p=null==s?void 0:s.open,f=!!s&&!s.modal&&s.open&&o&&!(!r&&!i);return g.useEffect(()=>{if(i&&o&&!m)return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&we(e)&&("focusin"===e.type?Te:Ee)(i)}},[i,o,m]),g.useEffect(()=>{i&&(p||Te(i))},[p,i]),(0,Se.jsxs)(Ut.Provider,{value:g.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[f&&i&&(0,Se.jsx)(zt,{"data-type":"outside",ref:l,onFocus:e=>{if(we(e,i)){var t;null==(t=u.current)||t.focus()}else{const e=be(me(n=s?s.domReference:null).body,-1)||n;null==e||e.focus()}var n}}),f&&i&&(0,Se.jsx)("span",{"aria-owns":i.id,style:Vt}),i&&Ce.createPortal(t,i),f&&i&&(0,Se.jsx)(zt,{"data-type":"outside",ref:c,onFocus:e=>{if(we(e,i)){var t;null==(t=d.current)||t.focus()}else{const t=be(me(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 Wt=()=>g.useContext(Ut);function Ht(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=_t(),i=g.useRef({}),[s]=g.useState(()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}()),a=null!=Ot(),[l,c]=g.useState(r.reference),u=ye((e,t,r)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)}),d=g.useMemo(()=>({setPositionReference:c}),[]),m=g.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return g.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:m,events:s,floatingId:o,refs:d}),[t,u,m,s,o,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=g.useState(null),[a,l]=g.useState(null),c=(null==o?void 0:o.domReference)||i,u=g.useRef(null),d=It();fe(()=>{c&&(u.current=c)},[c]);const m=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=g.useState(r);pt(m,r)||p(r);const[f,h]=g.useState(null),[y,v]=g.useState(null),b=g.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),w=g.useCallback(e=>{e!==C.current&&(C.current=e,v(e))},[]),E=i||f,T=s||y,S=g.useRef(null),C=g.useRef(null),x=g.useRef(u),R=null!=l,_=gt(l),A=gt(o),k=gt(c),O=g.useCallback(()=>{if(!S.current||!C.current)return;const e={placement:t,strategy:n,middleware:m};A.current&&(e.platform=A.current),dt(S.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==k.current};I.current&&!pt(x.current,t)&&(x.current=t,Ce.flushSync(()=>{d(t)}))})},[m,t,n,A,k]);mt(()=>{!1===c&&x.current.isPositioned&&(x.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const I=g.useRef(!1);mt(()=>(I.current=!0,()=>{I.current=!1}),[]),mt(()=>{if(E&&(S.current=E),T&&(C.current=T),E&&T){if(_.current)return _.current(E,T,O);O()}},[E,T,O,_,R]);const P=g.useMemo(()=>({reference:S,floating:C,setReference:b,setFloating:w}),[b,w]),N=g.useMemo(()=>({reference:E,floating:T}),[E,T]),L=g.useMemo(()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=ht(N.floating,u.x),r=ht(N.floating,u.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...ft(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,N.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:O,refs:P,elements:N,floatingStyles:L}),[u,O,P,N,L])}({...e,elements:{...o,...a&&{reference:a}}}),p=g.useCallback(e=>{const t=O(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),m.refs.setReference(t)},[m.refs]),f=g.useCallback(e=>{(O(e)||null===e)&&(u.current=e,s(e)),(O(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!O(e))&&m.refs.setReference(e)},[m.refs]),h=g.useMemo(()=>({...m.refs,setReference:f,setPositionReference:p,domReference:u}),[m.refs,f,p]),y=g.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),v=g.useMemo(()=>({...m,...r,refs:h,elements:y,nodeId:t}),[m,h,y,t,r]);return fe(()=>{r.dataRef.current.floatingContext=v;const e=null==d?void 0:d.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),g.useMemo(()=>({...m,context:v,refs:h,elements:y}),[m,h,y,v])}function Gt(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Et]:t,[Tt]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[wt]:""},...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&&[Et,Tt].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,{})}}const Yt=[".e-off-canvas"];function qt(){return qt=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},qt.apply(null,arguments)}const Xt="elementor-preview-responsive-wrapper",Kt=(0,C.styled)(C.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"})),Jt=({element:e,isSelected:t,id:n,isGlobal:r=!1})=>{const{context:o,floating:i,isVisible:s}=function({element:e,isSelected:t}){const[n,r]=(0,g.useState)(!1),{refs:o,floatingStyles:i,context:s}=Ht({open:n||t,onOpenChange:r,whileElementsMounted:ct,middleware:[bt(()=>({apply({elements:e,rects:t}){Object.assign(e.floating.style,{width:`${t.reference.width+2}px`,height:`${t.reference.height+2}px`})}})),yt(({rects:e})=>-e.reference.height/2-e.floating.height/2)]});return(0,g.useEffect)(()=>{o.setReference(e)},[e,o]),{isVisible:n||t,context:s,floating:{setRef:o.setFloating,ref:o.floating,styles:i}}}({element:e,isSelected:t}),{getFloatingProps:a,getReferenceProps:l}=function(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),r=e.map(e=>null==e?void 0:e.item),o=g.useCallback(t=>Gt(t,e,"reference"),t),i=g.useCallback(t=>Gt(t,e,"floating"),n),s=g.useCallback(t=>Gt(t,e,"item"),r);return g.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}([Dt(o)]),c=(()=>{const e=window.elementor?.$preview?.[0];return!!e&&Yt.map(t=>Array.from(e?.contentWindow?.document.body.querySelectorAll(t)??[])).flat().some(e=>e.checkVisibility({opacityProperty:!0,visibilityProperty:!0,contentVisibilityAuto:!0}))})();!function(e,t){(0,g.useEffect)(()=>{const n=e,{events:r,attrs:o}=function(e){const t=/^on(?=[A-Z])/;return Object.entries(e).reduce((e,[n,r])=>{if(!t.test(n))return e.attrs.push([n,r]),e;const o=n.replace(t,"").toLowerCase(),i=r;return e.events.push([o,i]),e},{events:[],attrs:[]})}(t());return r.forEach(([e,t])=>n.addEventListener(e,t)),o.forEach(([e,t])=>n.setAttribute(e,t)),()=>{r.forEach(([e,t])=>n.removeEventListener(e,t)),o.forEach(([e])=>n.removeAttribute(e))}},[t,e])}(e,l);const u=e.offsetHeight<=1;return s&&!c&&g.createElement(Bt,{id:Xt},g.createElement(Kt,qt({ref:i.setRef,isSelected:t,isGlobal:r,style:i.styles,"data-element-overlay":n,role:"presentation",isSmallerOffset:u},a())))},Zt="atomic",Qt=[{component:Jt,shouldRender:()=>!0}];function en(){const e=(0,l.useSelectedElement)(),t=(0,s.__privateUseListenTo)([(0,s.windowEvent)("elementor/editor/element-rendered"),(0,s.windowEvent)("elementor/editor/element-destroyed")],()=>(0,l.getElements)().filter(e=>Zt 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 Qt.map(({shouldRender:e,component:i},s)=>e({id:t,element:n,isSelected:o})&&g.createElement(i,{key:`${t}-${s}`,id:t,element:n,isSelected:o,isGlobal:r}))}):null}var tn=window.elementorV2.editorInteractions;function nn(e){const t=(0,g.useRef)(!1);(0,g.useEffect)(()=>{t.current||(t.current=!0,e())},[])}function rn({provider:e},{provider:t}){return e.priority-t.priority}function on({provider:e,setInteractionItems:t}){return()=>{try{const n=e.actions.all(),r=e.getKey();t(t=>({...t,[r]:{provider:e,items:n}}))}catch{}}}function sn(){const e=(0,s.__privateUseListenTo)((0,s.commandEndEvent)("editor/documents/attach-preview"),()=>(0,s.getCanvasIframeDocument)()?.head),t=function(){const[e,t]=(0,g.useState)({}),n=(0,g.useMemo)(()=>{try{return tn.interactionsRepository.getProviders().map(e=>({provider:e,subscriber:on({provider:e,setInteractionItems:t})}))}catch{return[]}},[]);return(0,g.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]),nn(()=>{0!==n.length&&(0,s.registerDataHook)("after","editor/documents/attach-preview",async()=>{n.forEach(({subscriber:e})=>{try{e()}catch{}})})}),(0,g.useMemo)(()=>Object.values(e).sort(rn).flatMap(({items:e})=>e),[e])}();if(!e)return null;const n=JSON.stringify(Array.isArray(t)?t:[]);return g.createElement(C.Portal,{container:e},g.createElement("script",{type:"application/json","data-e-interactions":"true",dangerouslySetInnerHTML:{__html:n}}))}const an="data-e-removed",ln="data-elementor-id",cn="elementor-post-",un="-css";function dn(e){const t=[...e.attributes].map(e=>[e.name,e.value]);return Object.fromEntries(t)}var mn=window.elementorV2.editorResponsive;function pn(e,t=[]){return{then:n=>(t.push(n),pn(e,t)),execute:async()=>{let n;for(const r of t){if(e.aborted)break;n=await r(n,e)}}}}const fn=e=>!!e&&"object"==typeof e&&"$$multi-props"in e&&!0===e["$$multi-props"],hn=e=>({"$$multi-props":!0,value:e}),gn=e=>e.value,yn=3;function vn({transformers:e,schema:t,onPropResolve:n}){async function r({props:e,schema:r,signal:i,renderContext:s}){r=r??t;const a=Promise.all(Object.entries(r).map(async([t,r])=>{const a=e[t]??r.default,l=await o({value:a,key:t,type:r,signal:i,renderContext:s});return n?.({key:t,value:l}),fn(l)?gn(l):{[t]:l}}));return Object.assign({},...(await a).filter(Boolean))}async function o({value:t,key:n,type:i,signal:s,depth:a=0,renderContext:l}){if(null==t)return null;if(!(0,u.isTransformable)(t))return t;if(a>yn)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:l})),"array"===c.kind&&(d=await Promise.all(d.map(e=>o({value:e,key:n,type:c.item_prop_type,depth:a,signal:s,renderContext:l}))));const m=e.get(t.$$type);if(!m)return null;try{return o({value:await m(d,{key:n,signal:s,renderContext:l,propType:i}),key:n,type:i,signal:s,depth:a+1,renderContext:l})}catch{return null}}return r}function bn(){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 wn=bn(),En=bn(),Tn=(0,w.createError)({code:"unknown_style_type",message:"Unknown style type"}),Sn=(0,w.createError)({code:"unknown_style_state",message:"Unknown style state"}),Cn={class:"."},xn="desktop",Rn="normal";function _n({resolve:e,breakpoints:t,selectorPrefix:n=""}){return async({styles:r,signal:o})=>{const i=new Set,s=r.filter(e=>{const t=function(e){const t=e.variants[0]?.meta?.breakpoint??xn,n=e.variants[0]?.meta?.state??Rn;return`${e.id}-${t}-${n}`}(e);return!i.has(t)&&(i.add(t),!0)}).map(async r=>{const i=Object.values(r.variants).map(async i=>{const s=await async function({props:e,resolve:t,signal:n}){const r=await t({props:e,signal:n});return Object.entries(r).reduce((e,[t,n])=>(null===n||e.push(t+":"+n+";"),e),[]).join("")}({props:i.props,resolve:e,signal:o}),a=function(e){const t=(0,w.decodeString)(e?.raw||"");return t.trim()?t+"\n":""}(i.custom_css);return An().for(r.cssName,r.type).withPrefix(n).withState(i.meta.state).withMediaQuery(i.meta.breakpoint?t[i.meta.breakpoint]:null).wrap(s+a)}),s=await Promise.all(i);return{id:r.id,breakpoint:r?.variants[0]?.meta?.breakpoint||"desktop",value:s.join(""),state:r?.variants[0]?.meta?.state||null}});return await Promise.all(s)}}function An(e="",t){return{for:(n,r)=>{const o=Cn[r];if(!o)throw new Tn({context:{type:r}});return An(`${e}${o}${n}`,t)},withPrefix:n=>An([n,e].filter(Boolean).join(" "),t),withState:n=>An((0,d.getSelectorWithState)(e,n),t),withMediaQuery:n=>{if(!n?.type)return An(e,t);const r=`${n.type}:${n.width}px`;return An(e,e=>`@media(${r}){${e}}`)},wrap:n=>{const r=`${e}{${n}}`;return t?t(r):r}}}const kn=".elementor";function On({provider:e},{provider:t}){return e.priority-t.priority}function In({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 Pn({provider:e,renderStyles:t,setStyleItems:n,getCache:r}){return function(){let i=null;return(...s)=>(i&&i.abort(),i=new AbortController,((i,s,a)=>pn(i.signal).then((n,i)=>{const l=r(),c=void 0!==a&&void 0!==s,u=l.orderedIds.length>0;return c&&u?async function(n,r,i,s){const a=function(e,t){const n=[];for(const r of Object.keys(t)){const o=t[r],i=e[r];i&&o===i||n.push(r)}return n}(r,i);if(n.orderedIds=e.actions.all().map(e=>e.id).reverse(),a.length>0){const r=a.map(t=>e.actions.get(t)).filter(e=>!!e).map(t=>({...t,cssName:e.actions.resolveCssName(t.id)}));return t({styles:o(r),signal:s}).then(e=>(function(e,t){for(const n of t){const t=e.itemsById.get(n.id);if(t){const e=t.findIndex(e=>e.breakpoint===n.breakpoint&&e.state===n.state);e>=0?t[e]=n:t.push(n)}else e.itemsById.set(n.id,[n])}}(n,e),Nn(n)))}return Nn(n)}(l,s,a,i):async function(n,r){const i=e.actions.all(),s=[...i].reverse().map(t=>({...t,cssName:e.actions.resolveCssName(t.id)}));return t({styles:o(s),signal:r}).then(e=>(function(e,t,n){e.orderedIds=t.map(e=>e.id).reverse(),e.itemsById.clear();for(const t of n){const n=e.itemsById.get(t.id)||[];n.push(t),e.itemsById.set(t.id,n)}}(n,i,e),Nn(n)))}(l,i)}).then(t=>{n(n=>({...n,[e.getKey()]:{provider:e,items:t}}))}).execute())(i,...s))}();function o(e){return Object.values(e.reduce((e,t)=>(t.variants.forEach(n=>{const r=n.meta.breakpoint||"desktop";e[t.id]||(e[t.id]={}),e[t.id][r]||(e[t.id][r]={...t,variants:[]}),e[t.id][r].variants.push(n)}),e),{})).flatMap(e=>Object.values(e))}}function Nn(e){return e.orderedIds.map(t=>e.itemsById.get(t)).filter(e=>void 0!==e).flat()}function Ln(){return Ln=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},Ln.apply(null,arguments)}function Mn(){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,mn.useBreakpointsMap)();return(0,g.useMemo)(()=>_n({selectorPrefix:kn,breakpoints:t,resolve:e}),[e,t])}((0,g.useMemo)(()=>vn({transformers:En,schema:(0,d.getStylesSchema)(),onPropResolve:({key:e,value:t})=>{"font-family"===e&&"string"==typeof t&&(0,s.enqueueFont)(t)}}),[])),t=(0,mn.useBreakpoints)(),[n,r]=(0,g.useState)({}),o=(0,g.useRef)(new Map),i=(0,g.useMemo)(()=>{const t=()=>({orderedIds:[],itemsById:new Map});return b.stylesRepository.getProviders().map(n=>({provider:n,subscriber:Pn({provider:n,renderStyles:e,setStyleItems:r,getCache:()=>(e=>{const n=function(e){try{return e.getKey()}catch{return null}}(e);return n?(o.current.has(n)||o.current.set(n,t()),o.current.get(n)):t()})(n)})}))},[e]);(0,g.useEffect)(()=>{const e=i.map(({provider:e,subscriber:t})=>e.subscribe(t));return()=>{e.forEach(e=>e())}},[i]),nn(()=>{(0,s.registerDataHook)("after","editor/documents/attach-preview",async()=>{const e=i.map(async({subscriber:e})=>e());await Promise.all(e)})});const a=(0,g.useMemo)(()=>{return e=t.map(e=>e.id),({breakpoint:t},{breakpoint:n})=>e.indexOf(t)-e.indexOf(n);var e},[t]);return(0,g.useMemo)(()=>Object.values(n).sort(On).flatMap(({items:e})=>e).sort(In).sort(a),[n,a])}(),n=(0,s.__privateUseListenTo)((0,s.commandEndEvent)("editor/documents/attach-preview"),()=>{const e=(0,s.getCanvasIframeDocument)();if(!e)return[];const t=function(e){return[...e.body.querySelectorAll(`[${ln}]`)??[]].map(e=>e.getAttribute(ln)||"")}(e).map(e=>`${cn}${e}${un}`),n=function(e){return[...e.head.querySelectorAll(`link[rel="stylesheet"][id^=${cn}][id$=${un}]`)??[]]}(e).filter(e=>t.includes(e.getAttribute("id")??""));return n.forEach(e=>{e.hasAttribute(an)||e.remove()}),n.map(e=>({...dn(e),id:e.getAttribute("id")??"",[an]:!0}))});return e?g.createElement(C.Portal,{container:e},function(e){const t=new Map;return e.filter(e=>{const n=t.get(e.id);return n?!n.find(t=>t.breakpoint===e.breakpoint&&t.state===e.state)&&(n.push(e),!0):(t.set(e.id,[e]),!0)})}(t).map(e=>g.createElement("style",{key:`${e.id}-${e.breakpoint}-${e.state??"normal"}`},e.value)),n.map(e=>g.createElement("link",Ln({},e,{key:e.id})))):null}var $n=window.elementorV2.editorNotifications,Dn=window.wp.i18n;const jn="e-form",zn=new Set(["e-form-input","e-form-textarea","e-form-label","e-form-checkbox","e-form-submit-button"]);function Vn(e){return e.model?.widgetType||e.model?.elType}function Un(e){return e?.model.get("widgetType")||e?.model.get("elType")}function Fn(e){return function(e){return!!e?.view?.el?.closest('form,[data-element_type="e-form"]')}(e)}function Bn(e,t){return e.some(e=>(e.widgetType||e.elType)===t||!!e.elements&&Bn(e.elements,t))}function Wn(e,t){return e.some(e=>{const n=e.widgetType||e.elType;return!(!n||!t.has(n))||!!e.elements&&Wn(e.elements,t)})}const Hn={type:"default",message:(0,Dn.__)("Form elements must be placed inside a form.","elementor"),id:"form-fields-outside-form-blocked"};function Gn(e){const t=Vn(e);return!(!t||!zn.has(t)||Fn(e.container)||(Xn(),0))}function Yn(e){const{containers:t=[e.container],target:n}=e;return!(!t.some(e=>{return!!e&&(t=e,n=zn,(0,l.getAllDescendants)(t).some(e=>{const t=Un(e);return!!t&&n.has(t)}));var t,n})||Fn(n)||(Xn(),0))}function qn(e){const{storageType:t}=e;if("localstorage"!==t)return!1;const n=window?.elementorCommon?.storage?.get();return!!n?.clipboard?.elements&&!(!Wn(n.clipboard.elements,zn)||Fn(e.container)||(Xn(),0))}function Xn(){(0,$n.notify)(Hn)}const Kn={type:"default",message:(0,Dn.__)("Forms can't be nested. Create separate forms instead.","elementor"),id:"form-nesting-blocked"};function Jn(e){const t=Vn(e);return!(!t||t!==jn||!Fn(e.container)||(er(),0))}function Zn(e){const{containers:t=[e.container],target:n}=e;return!(!t.some(e=>{return!!e&&(t=e,n=jn,(0,l.getAllDescendants)(t).some(e=>Un(e)===n));var t,n})||!Fn(n)||(er(),0))}function Qn(e){const{storageType:t}=e;if("localstorage"!==t)return!1;const n=window?.elementorCommon?.storage?.get();return!!n?.clipboard?.elements&&!(!Bn(n.clipboard.elements,jn)||!Fn(e.container)||(er(),0))}function er(){(0,$n.notify)(Kn)}const tr=bn();function nr(e){return e}const rr=()=>"";const or=e=>e.map(e=>{const t=(e.date||"").trim(),n=(e.time||"").trim();return t||n?`${t} ${n}`.trim():""}).join(" "),ir=e=>e?.content??"",sr=e=>e?.content??"",ar=({destination:e,isTargetBlank:t,tag:n})=>({href:"number"==typeof e?"#post-id-"+e:e,target:t?"_blank":"_self",tag:n??"a"}),lr=({id:e})=>e??null,cr=e=>({id:e.id??null,url:e.url??null});var ur=window.elementorV2.wpMedia;const dr=async e=>{const{src:t,size:n}=e;if(!t?.id)return t?.url?{src:t.url}:null;const r=await(0,ur.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},mr=e=>e,{entries:pr,setPrototypeOf:fr,isFrozen:hr,getPrototypeOf:gr,getOwnPropertyDescriptor:yr}=Object;let{freeze:vr,seal:br,create:wr}=Object,{apply:Er,construct:Tr}="undefined"!=typeof Reflect&&Reflect;vr||(vr=function(e){return e}),br||(br=function(e){return e}),Er||(Er=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),Tr||(Tr=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const Sr=jr(Array.prototype.forEach),Cr=jr(Array.prototype.lastIndexOf),xr=jr(Array.prototype.pop),Rr=jr(Array.prototype.push),_r=jr(Array.prototype.splice),Ar=jr(String.prototype.toLowerCase),kr=jr(String.prototype.toString),Or=jr(String.prototype.match),Ir=jr(String.prototype.replace),Pr=jr(String.prototype.indexOf),Nr=jr(String.prototype.trim),Lr=jr(Object.prototype.hasOwnProperty),Mr=jr(RegExp.prototype.test),$r=(Dr=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Tr(Dr,t)});var Dr;function jr(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Er(e,t,r)}}function zr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ar;fr&&fr(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(hr(t)||(t[r]=e),o=e)}e[o]=!0}return e}function Vr(e){for(let t=0;t<e.length;t++)Lr(e,t)||(e[t]=null);return e}function Ur(e){const t=wr(null);for(const[n,r]of pr(e))Lr(e,n)&&(Array.isArray(r)?t[n]=Vr(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=Ur(r):t[n]=r);return t}function Fr(e,t){for(;null!==e;){const n=yr(e,t);if(n){if(n.get)return jr(n.get);if("function"==typeof n.value)return jr(n.value)}e=gr(e)}return function(){return null}}const Br=vr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Wr=vr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Hr=vr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Gr=vr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Yr=vr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),qr=vr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Xr=vr(["#text"]),Kr=vr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Jr=vr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Zr=vr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Qr=vr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),eo=br(/\{\{[\w\W]*|[\w\W]*\}\}/gm),to=br(/<%[\w\W]*|[\w\W]*%>/gm),no=br(/\$\{[\w\W]*/gm),ro=br(/^data-[\-\w.\u00B7-\uFFFF]+$/),oo=br(/^aria-[\-\w]+$/),io=br(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),so=br(/^(?:\w+script|data):/i),ao=br(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),lo=br(/^html$/i),co=br(/^[a-z][.\w]*(-[.\w]+)+$/i);var uo=Object.freeze({__proto__:null,ARIA_ATTR:oo,ATTR_WHITESPACE:ao,CUSTOM_ELEMENT:co,DATA_ATTR:ro,DOCTYPE_NAME:lo,ERB_EXPR:to,IS_ALLOWED_URI:io,IS_SCRIPT_OR_DATA:so,MUSTACHE_EXPR:eo,TMPLIT_EXPR:no});const mo=function(){return"undefined"==typeof window?null:window};var po=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mo();const n=t=>e(t);if(n.version="3.3.0",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:p,trustedTypes:f}=t,h=c.prototype,g=Fr(h,"cloneNode"),y=Fr(h,"remove"),v=Fr(h,"nextSibling"),b=Fr(h,"childNodes"),w=Fr(h,"parentNode");if("function"==typeof a){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let E,T="";const{implementation:S,createNodeIterator:C,createDocumentFragment:x,getElementsByTagName:R}=r,{importNode:_}=o;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof pr&&"function"==typeof w&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:k,ERB_EXPR:O,TMPLIT_EXPR:I,DATA_ATTR:P,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:$}=uo;let{IS_ALLOWED_URI:D}=uo,j=null;const z=zr({},[...Br,...Wr,...Hr,...Yr,...Xr]);let V=null;const U=zr({},[...Kr,...Jr,...Zr,...Qr]);let F=Object.seal(wr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),B=null,W=null;const H=Object.seal(wr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let G=!0,Y=!0,q=!1,X=!0,K=!1,J=!0,Z=!1,Q=!1,ee=!1,te=!1,ne=!1,re=!1,oe=!0,ie=!1,se=!0,ae=!1,le={},ce=null;const ue=zr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const me=zr({},["audio","video","img","source","image","track"]);let pe=null;const fe=zr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let ve=ye,be=!1,we=null;const Ee=zr({},[he,ge,ye],kr);let Te=zr({},["mi","mo","mn","ms","mtext"]),Se=zr({},["annotation-xml"]);const Ce=zr({},["title","style","font","a","script"]);let xe=null;const Re=["application/xhtml+xml","text/html"];let _e=null,Ae=null;const ke=r.createElement("form"),Oe=function(e){return e instanceof RegExp||e instanceof Function},Ie=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ae||Ae!==e){if(e&&"object"==typeof e||(e={}),e=Ur(e),xe=-1===Re.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,_e="application/xhtml+xml"===xe?kr:Ar,j=Lr(e,"ALLOWED_TAGS")?zr({},e.ALLOWED_TAGS,_e):z,V=Lr(e,"ALLOWED_ATTR")?zr({},e.ALLOWED_ATTR,_e):U,we=Lr(e,"ALLOWED_NAMESPACES")?zr({},e.ALLOWED_NAMESPACES,kr):Ee,pe=Lr(e,"ADD_URI_SAFE_ATTR")?zr(Ur(fe),e.ADD_URI_SAFE_ATTR,_e):fe,de=Lr(e,"ADD_DATA_URI_TAGS")?zr(Ur(me),e.ADD_DATA_URI_TAGS,_e):me,ce=Lr(e,"FORBID_CONTENTS")?zr({},e.FORBID_CONTENTS,_e):ue,B=Lr(e,"FORBID_TAGS")?zr({},e.FORBID_TAGS,_e):Ur({}),W=Lr(e,"FORBID_ATTR")?zr({},e.FORBID_ATTR,_e):Ur({}),le=!!Lr(e,"USE_PROFILES")&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,Y=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,K=e.SAFE_FOR_TEMPLATES||!1,J=!1!==e.SAFE_FOR_XML,Z=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,re=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,oe=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,se=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,D=e.ALLOWED_URI_REGEXP||io,ve=e.NAMESPACE||ye,Te=e.MATHML_TEXT_INTEGRATION_POINTS||Te,Se=e.HTML_INTEGRATION_POINTS||Se,F=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(F.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(F.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(F.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&(Y=!1),ne&&(te=!0),le&&(j=zr({},Xr),V=[],!0===le.html&&(zr(j,Br),zr(V,Kr)),!0===le.svg&&(zr(j,Wr),zr(V,Jr),zr(V,Qr)),!0===le.svgFilters&&(zr(j,Hr),zr(V,Jr),zr(V,Qr)),!0===le.mathMl&&(zr(j,Yr),zr(V,Zr),zr(V,Qr))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?H.tagCheck=e.ADD_TAGS:(j===z&&(j=Ur(j)),zr(j,e.ADD_TAGS,_e))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?H.attributeCheck=e.ADD_ATTR:(V===U&&(V=Ur(V)),zr(V,e.ADD_ATTR,_e))),e.ADD_URI_SAFE_ATTR&&zr(pe,e.ADD_URI_SAFE_ATTR,_e),e.FORBID_CONTENTS&&(ce===ue&&(ce=Ur(ce)),zr(ce,e.FORBID_CONTENTS,_e)),se&&(j["#text"]=!0),Z&&zr(j,["html","head","body"]),j.table&&(zr(j,["tbody"]),delete B.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw $r('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw $r('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=e.TRUSTED_TYPES_POLICY,T=E.createHTML("")}else void 0===E&&(E=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(f,i)),null!==E&&"string"==typeof T&&(T=E.createHTML(""));vr&&vr(e),Ae=e}},Pe=zr({},[...Wr,...Hr,...Gr]),Ne=zr({},[...Yr,...qr]),Le=function(e){Rr(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){y(e)}},Me=function(e,t){try{Rr(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Rr(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ne)try{Le(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},$e=function(e){let t=null,n=null;if(ee)e="<remove></remove>"+e;else{const t=Or(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===xe&&ve===ye&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=E?E.createHTML(e):e;if(ve===ye)try{t=(new p).parseFromString(o,xe)}catch(e){}if(!t||!t.documentElement){t=S.createDocument(ve,"template",null);try{t.documentElement.innerHTML=be?T:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ve===ye?R.call(t,Z?"html":"body")[0]:Z?t.documentElement:i},De=function(e){return C.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},je=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},ze=function(e){return"function"==typeof l&&e instanceof l};function Ve(e,t,r){Sr(e,e=>{e.call(n,t,r,Ae)})}const Ue=function(e){let t=null;if(Ve(A.beforeSanitizeElements,e,null),je(e))return Le(e),!0;const r=_e(e.nodeName);if(Ve(A.uponSanitizeElement,e,{tagName:r,allowedTags:j}),J&&e.hasChildNodes()&&!ze(e.firstElementChild)&&Mr(/<[/\w!]/g,e.innerHTML)&&Mr(/<[/\w!]/g,e.textContent))return Le(e),!0;if(7===e.nodeType)return Le(e),!0;if(J&&8===e.nodeType&&Mr(/<[/\w]/g,e.data))return Le(e),!0;if(!(H.tagCheck instanceof Function&&H.tagCheck(r))&&(!j[r]||B[r])){if(!B[r]&&Be(r)){if(F.tagNameCheck instanceof RegExp&&Mr(F.tagNameCheck,r))return!1;if(F.tagNameCheck instanceof Function&&F.tagNameCheck(r))return!1}if(se&&!ce[r]){const t=w(e)||e.parentNode,n=b(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=g(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,v(e))}}return Le(e),!0}return e instanceof c&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:ve,tagName:"template"});const n=Ar(e.tagName),r=Ar(t.tagName);return!!we[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===ye?"svg"===n:t.namespaceURI===he?"svg"===n&&("annotation-xml"===r||Te[r]):Boolean(Pe[n]):e.namespaceURI===he?t.namespaceURI===ye?"math"===n:t.namespaceURI===ge?"math"===n&&Se[r]:Boolean(Ne[n]):e.namespaceURI===ye?!(t.namespaceURI===ge&&!Se[r])&&!(t.namespaceURI===he&&!Te[r])&&!Ne[n]&&(Ce[n]||!Pe[n]):!("application/xhtml+xml"!==xe||!we[e.namespaceURI]))}(e)?(Le(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!Mr(/<\/no(script|embed|frames)/i,e.innerHTML)?(K&&3===e.nodeType&&(t=e.textContent,Sr([k,O,I],e=>{t=Ir(t,e," ")}),e.textContent!==t&&(Rr(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ve(A.afterSanitizeElements,e,null),!1):(Le(e),!0)},Fe=function(e,t,n){if(oe&&("id"===t||"name"===t)&&(n in r||n in ke))return!1;if(Y&&!W[t]&&Mr(P,t));else if(G&&Mr(N,t));else if(H.attributeCheck instanceof Function&&H.attributeCheck(t,e));else if(!V[t]||W[t]){if(!(Be(e)&&(F.tagNameCheck instanceof RegExp&&Mr(F.tagNameCheck,e)||F.tagNameCheck instanceof Function&&F.tagNameCheck(e))&&(F.attributeNameCheck instanceof RegExp&&Mr(F.attributeNameCheck,t)||F.attributeNameCheck instanceof Function&&F.attributeNameCheck(t,e))||"is"===t&&F.allowCustomizedBuiltInElements&&(F.tagNameCheck instanceof RegExp&&Mr(F.tagNameCheck,n)||F.tagNameCheck instanceof Function&&F.tagNameCheck(n))))return!1}else if(pe[t]);else if(Mr(D,Ir(n,M,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Pr(n,"data:")||!de[e])if(q&&!Mr(L,Ir(n,M,"")));else if(n)return!1;return!0},Be=function(e){return"annotation-xml"!==e&&Or(e,$)},We=function(e){Ve(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||je(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:s,namespaceURI:a,value:l}=i,c=_e(s),u=l;let d="value"===s?u:Nr(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,Ve(A.uponSanitizeAttribute,e,r),d=r.attrValue,!ie||"id"!==c&&"name"!==c||(Me(s,e),d="user-content-"+d),J&&Mr(/((--!?|])>)|<\/(style|title|textarea)/i,d)){Me(s,e);continue}if("attributename"===c&&Or(d,"href")){Me(s,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Me(s,e);continue}if(!X&&Mr(/\/>/i,d)){Me(s,e);continue}K&&Sr([k,O,I],e=>{d=Ir(d,e," ")});const m=_e(e.nodeName);if(Fe(m,c,d)){if(E&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(a);else switch(f.getAttributeType(m,c)){case"TrustedHTML":d=E.createHTML(d);break;case"TrustedScriptURL":d=E.createScriptURL(d)}if(d!==u)try{a?e.setAttributeNS(a,s,d):e.setAttribute(s,d),je(e)?Le(e):xr(n.removed)}catch(t){Me(s,e)}}else Me(s,e)}Ve(A.afterSanitizeAttributes,e,null)},He=function e(t){let n=null;const r=De(t);for(Ve(A.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Ve(A.uponSanitizeShadowNode,n,null),Ue(n),We(n),n.content instanceof s&&e(n.content);Ve(A.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,c=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ze(e)){if("function"!=typeof e.toString)throw $r("toString is not a function");if("string"!=typeof(e=e.toString()))throw $r("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Q||Ie(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=_e(e.nodeName);if(!j[t]||B[t])throw $r("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=$e("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!te&&!K&&!Z&&-1===e.indexOf("<"))return E&&re?E.createHTML(e):e;if(r=$e(e),!r)return te?null:re?T:""}r&&ee&&Le(r.firstChild);const u=De(ae?e:r);for(;a=u.nextNode();)Ue(a),We(a),a.content instanceof s&&He(a.content);if(ae)return e;if(te){if(ne)for(c=x.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(V.shadowroot||V.shadowrootmode)&&(c=_.call(o,c,!0)),c}let d=Z?r.outerHTML:r.innerHTML;return Z&&j["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Mr(lo,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),K&&Sr([k,O,I],e=>{d=Ir(d,e," ")}),E&&re?E.createHTML(d):d},n.setConfig=function(){Ie(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){Ae=null,Q=!1},n.isValidAttribute=function(e,t,n){Ae||Ie({});const r=_e(e),o=_e(t);return Fe(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Rr(A[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Cr(A[e],t);return-1===n?void 0:_r(A[e],n,1)[0]}return xr(A[e])},n.removeHooks=function(e){A[e]=[]},n.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const fo="width: 100%; height: 100%; overflow: unset;",ho=async(e,{signal:t})=>{const n=function(e){return"number"!=typeof e||e<=0?null:e}(e.id),r="string"==typeof e.url?e.url:null;let o=r;if(n&&!r){const e=await(0,ur.getMediaAttachment)({id:n});o=e?.url??null}const i="string"==typeof o?o:null;if(!i)return{html:null,url:null};const s=await async function(e,t){try{const n=await fetch(e,{signal:t});if(!n.ok)return null;const r=n.headers.get("content-type")??"";return r.includes("svg")||r.includes("xml")||e.endsWith(".svg")?await n.text():null}catch{return null}}(i,t),a=s?function(e){const t=po.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0}}),n=(new DOMParser).parseFromString(t,"image/svg+xml").querySelector("svg");if(!n)return null;n.setAttribute("fill","currentColor");const r=(n.getAttribute("style")??"").trim(),o=r?`${r.replace(/;$/,"")}; ${fo}`:fo;return n.setAttribute("style",o),n.outerHTML}(s):null;return{html:a,url:i}},go=async e=>{const{id:t,url:n}=e;if(!t)return{id:null,url:n};const r=await(0,ur.getMediaAttachment)({id:t});return{id:t,url:r?.url??n}},yo=e=>{const{color:t=null}=e;return t?`linear-gradient(${t}, ${t})`:null},vo=e=>"radial"===e.type?`radial-gradient(circle at ${e.positions}, ${e.stops})`:`linear-gradient(${e.angle}deg, ${e.stops})`,bo=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},wo=({width:e,height:t})=>`${e??"auto"} ${t??"auto"}`,Eo=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":To(t,"src","none",!0),"background-repeat":To(t,"repeat","repeat"),"background-attachment":To(t,"attachment","scroll"),"background-size":To(t,"size","auto auto"),"background-position":To(t,"position","0% 0%")}};function To(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 So=e=>{const{color:t=null,"background-overlay":n=null,clip:r=null}=e;return hn({...n,"background-color":t,"background-clip":r})},Co=e=>`${e?.color} ${e?.offset??0}%`,xo=e=>t=>t?.length?t.filter(Boolean).join(e):null,Ro=(e,t)=>(n,{key:r})=>{const o=e.filter(e=>n[e]).map(e=>[t({propKey:r,key:e}),n[e]]);return hn(Object.fromEntries(o))},_o=e=>e?.length<1?null:e.filter(Boolean).map(Ao).join(" "),Ao=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})`:""},ko=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 Oo(e){return`${e??"0px"}`}const Io=e=>`${Oo(e?.x)} ${Oo(e?.y)}`,Po=({x:e,y:t})=>`${e??"0px"} ${t??"0px"}`,No=e=>[e.hOffset,e.vOffset,e.blur,e.spread,e.color,e.position].filter(Boolean).join(" "),Lo=e=>"auto"===e.unit?"auto":"custom"===e.unit?e.size:`${e.size}${e.unit}`,Mo=e=>{const t={"-webkit-text-stroke":`${e.width} ${e.color}`,stroke:`${e.color}`,"stroke-width":`${e.width}`};return hn(t)},$o=e=>e?.length<1?null:e.join(" "),Do="0px",jo=e=>`translate3d(${e.x??Do}, ${e.y??Do}, ${e.z??Do})`;function zo(e){return`${e??"0px"}`}const Vo=e=>{const t=zo(e.x),n=zo(e.y),r=zo(e.z);return"50%"===t&&"50%"===n&&"0px"===r?null:`${t} ${n} ${r}`},Uo="0deg",Fo=e=>[`rotateX(${e?.x??Uo})`,`rotateY(${e?.y??Uo})`,`rotateZ(${e?.z??Uo})`].join(" "),Bo=e=>`scale3d(${e.x??1}, ${e.y??1}, ${e.z??1})`,Wo="0deg",Ho=e=>`skew(${e?.x??Wo}, ${e?.y??Wo})`;var Go=window.elementorV2.editorControls;const Yo=e=>{if(e?.length<1)return null;const t=(()=>{const e=new Set;return Go.transitionProperties.forEach(t=>{t.properties.forEach(t=>{e.add(t.value)})}),e})(),n=e.map(e=>qo(e,t)).filter(Boolean);return 0===n.length?null:n.join(", ")},qo=(e,t)=>{if(!e.selection||!e.size)return"";const n=e.selection.value;return t.has(n)?`${n} ${e.size}`:""};var Xo=window.elementorV2.twing;function Ko(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 Jo(e){const t=["http:","https:","mailto:","tel:"];try{const n=new URL(e);return t.includes(n.protocol)?e:""}catch{return""}}function Zo(){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 Qo({renderer:e,element:t}){const n=t.twig_main_template,r=t.base_styles_dictionary;return Object.entries(t.twig_templates).forEach(([t,n])=>{e.register(t,n)}),{templateKey:n,baseStylesDictionary:r,resolveProps:vn({transformers:tr,schema:t.atomic_props_schema})}}function ei(e){e._ensureViewIsIntact(),e._isRendering=!0,e.resetChildViewContainer(),e.triggerMethod("before:render",e)}function ti(e){e._isRendering=!1,e.isRendered=!0,e.triggerMethod("render",e)}function ni(e){e.children?.each(e=>{e.render()})}async function ri(e){const t=[];e.children?.each(e=>{e._currentRenderPromise&&t.push(e._currentRenderPromise)}),t.length>0&&await Promise.all(t)}function oi(e){return!!(e.atomic_props_schema&&e.twig_templates&&e.twig_main_template&&e.base_styles_dictionary)}function ii({type:e,renderer:t,element:n}){const r=Zo(),{templateKey:o,baseStylesDictionary:i,resolveProps:s}=Qo({type:e,renderer:t,element:n});return class extends r{_abortController=null;_lastResolvedSettingsHash=null;_domUpdateWasSkipped=!1;getTemplateType(){return"twig"}getNamespaceKey(){return e}renderOnChange(){this.render()}getRenderContext(){return this._parent?.getRenderContext?.()}getResolverRenderContext(){return this._parent?.getResolverRenderContext?.()}invalidateRenderCache(){this._lastResolvedSettingsHash=null}render(){this._abortController?.abort(),this._abortController=new AbortController;const e=pn(this._abortController.signal).then(()=>this._beforeRender()).then(()=>this._renderTemplate()).then(()=>this._renderChildren()).then(()=>this._afterRender());return this._currentRenderPromise=e.execute(),this._currentRenderPromise}async _renderChildren(){this._shouldReuseChildren()?ni(this):super._renderChildren(),await ri(this)}_shouldReuseChildren(){return this._domUpdateWasSkipped&&this.children?.length>0}async _renderTemplate(){this.triggerMethod("before:render:template");const n=pn(this._abortController?.signal).then((e,t)=>{const n=this.model.get("settings").toJSON();return s({props:n,signal:t,renderContext:this.getResolverRenderContext()})}).then(e=>this.afterSettingsResolve(e)).then(async n=>{const r=JSON.stringify(n);if(r===this._lastResolvedSettingsHash&&this.isRendered)return this._domUpdateWasSkipped=!0,null;this._domUpdateWasSkipped=!1,this._lastResolvedSettingsHash=r;const s={id:this.model.get("id"),interaction_id:this.getInteractionId(),type:e,settings:n,base_styles:i};return t.render(o,s)}).then(e=>{null!==e&&this.$el.html(e)});await n.execute(),this.bindUIElements(),this.triggerMethod("render:template")}afterSettingsResolve(e){return e}_beforeRender(){ei(this)}_afterRender(){ti(this)}_doAfterRender(e){this.isRendered?e():this.once("render",e)}_openEditingPanel(e){this._doAfterRender(()=>super._openEditingPanel(e))}getInteractionId(){const e=this.model.get("originId"),t=this.model.get("id");return e??t}}}function si(e){return oi(e)&&"support_nesting"in e&&!!e.support_nesting}function ai({type:e,renderer:t,element:n,modelExtensions:r}){const o=window;return class extends o.elementor.modules.elements.types.Base{getType(){return e}getView(){return ui({type:e,renderer:t,element:n})}getModel(){const e=o.elementor.modules.elements.models.AtomicElementBase;return r&&Object.keys(r).length>0?e.extend(r):e}}}function li(e){const t=e.get("id"),n=e.get("originId"),r={"data-model-cid":e.cid??"","data-interaction-id":n??t,"x-ignore":"true"};return Object.entries(r).map(([e,t])=>`${e}="${t}"`).join(" ")}function ci(e){return["elementor-element","elementor-element-edit-mode",`elementor-element-${e.get("id")}`].join(" ")}function ui({type:e,renderer:t,element:n}){const r=window,{templateKey:o,baseStylesDictionary:i,resolveProps:s}=Qo({type:e,renderer:t,element:n}),a=r.elementor.modules.elements.views.createAtomicElementBase(e),c=a.prototype._renderChildren,u=a.prototype._openEditingPanel;return a.extend({_abortController:null,_lastResolvedSettingsHash:null,_domUpdateWasSkipped:!1,template:!1,getTemplateType(){return"twig"},invalidateRenderCache(){this._lastResolvedSettingsHash=null},renderOnChange(){this.render()},render(){this._abortController?.abort(),this._abortController=new AbortController;const e=pn(this._abortController.signal).then(()=>this._beforeRender()).then(()=>this._renderTemplate()).then(()=>this._onTemplateReady()).then(()=>this._renderChildren()).then(()=>this._afterRender());return this._currentRenderPromise=e.execute(),this._currentRenderPromise},_beforeRender(){ei(this)},_onTemplateReady(){this.dispatchPreviewEvent("elementor/element/render")},_afterRender(){ti(this),this.dispatchPreviewEvent("elementor/element/rendered"),requestAnimationFrame(()=>{this._initAlpine()}),this.model.trigger("render:complete"),window.dispatchEvent(new CustomEvent(l.ELEMENT_STYLE_CHANGE_EVENT))},async _renderTemplate(){const n=this.model;this.triggerMethod("before:render:template");const r=pn(this._abortController?.signal).then((e,t)=>{const r=n.get("settings").toJSON();return s({props:r,signal:t,renderContext:this.getResolverRenderContext?.()})}).then(async r=>{const s=JSON.stringify(r);if(s===this._lastResolvedSettingsHash&&this.isRendered)return this._domUpdateWasSkipped=!0,null;this._domUpdateWasSkipped=!1,this._lastResolvedSettingsHash=s;const a={id:n.get("id"),interaction_id:this.getInteractionId(),type:e,settings:r,base_styles:i,editor_attributes:li(n),editor_classes:ci(n)};return t.render(o,a)}).then(e=>{null!==e&&this._attachTwigContent(e)});await r.execute(),this.bindUIElements(),this.triggerMethod("render:template")},getRenderContext(){return this._parent?.getRenderContext?.()},getResolverRenderContext(){return this._parent?.getResolverRenderContext?.()},getChildType(){const e=n.allowed_child_types??[];return e&&e.length>0?e:a.prototype.getChildType.call(this)},_attachTwigContent(e){const t=r.jQuery(e),n=this.$el.get(0),o=t.get(0);if(!n||!o)return;this._destroyAlpine(),Array.from(o.attributes).forEach(e=>{n.setAttribute(e.name,e.value)}),n.setAttribute("draggable","true");const i=this.getHandlesOverlay()?.get(0)?.outerHTML??"";n.innerHTML=i+o.innerHTML},async _renderChildren(){this._shouldReuseChildren()?ni(this):c.call(this),await ri(this),this._removeChildrenPlaceholder()},_shouldReuseChildren(){return this._domUpdateWasSkipped&&this.children?.length>0},_removeChildrenPlaceholder(){const e=this.$el.get(0);if(!e)return;const t=Array.from(e.childNodes).find(e=>e.nodeType===Node.COMMENT_NODE&&"elementor-children-placeholder"===e.nodeValue?.trim());t?.remove()},getChildViewContainer(){return this.childViewContainer="",this.$el},attachBuffer(e,t){const n=this.$el.get(0);if(!n)return;const r=Array.from(n.childNodes).find(e=>e.nodeType===Node.COMMENT_NODE&&"elementor-children-placeholder"===e.nodeValue?.trim());r?(r.parentNode?.insertBefore(t,r),r.remove()):n.append(t)},getDomElement(){return this.$el},onBeforeDestroy(){this._abortController?.abort()},onDestroy(){this.dispatchPreviewEvent("elementor/element/destroy")},_destroyAlpine(){const e=this.$el.get(0);if(!e)return;if(!e.getAttribute("x-data"))return;const t=e.ownerDocument?.defaultView;t?.Alpine?.destroyTree(e)},_initAlpine(){const e=this.$el.get(0);if(!e)return;if(e.removeAttribute("x-ignore"),!e.getAttribute("x-data"))return;const t=e.ownerDocument?.defaultView;t?.Alpine?.initTree(e)},_doAfterRender(e){this.isRendered?e():this.once("render",e)},_openEditingPanel(e){this._doAfterRender(()=>u.call(this,e))},getInteractionId(){const e=this.model.get("originId"),t=this.model.get("id");return e??t}})}var di=o(5338);const mi="before",pi="after",fi="never";class hi{constructor(e){this.getSetting=e.getSetting,this.setSetting=e.setSetting,this.element=e.element,this.type=e.type,this.id=e.id,this.refreshView=e.refreshView,this.reactRoot=e.reactRoot,this.reactContainer=e.reactContainer}static getTypes(){return null}shouldRenderReplacement(){return!0}originalMethodsToTrigger(){return{_beforeRender:mi,_afterRender:pi,renderOnChange:fi,onDestroy:fi,render:fi}}}const gi=["#elementor-editor-wrapper-v2","#elementor-navigator","#elementor-panel"],yi={backgroundColor:"transparent",border:"none",outline:"none",boxShadow:"none",padding:"0",margin:"0",borderRadius:"0",overflow:"hidden",opacity:"0",pointerEvents:"none",position:"absolute",display:"block"},vi={"e-button":"text","e-form-label":"text","e-heading":"title","e-paragraph":"paragraph","e-form-submit-button":"text"},bi=(e,t)=>t?e.querySelector(t):null,wi=(e,t)=>{const n=Ti(e,t);n&&e.body.removeChild(n)},Ei=e=>`inline-editing-toolbar-anchor-${e}`,Ti=(e,t)=>e.getElementById(Ei(t)),Si=(e,t,n)=>{const{width:r,height:o}=t;Object.assign(e.style,{...yi,top:t.top-n.top+"px",left:t.left-n.left+"px",width:`${r}px`,height:`${o}px`})},Ci={name:"horizontalShifter",fn(e){const{x:t,y:n,elements:{reference:r,floating:o}}=e,i={...e,x:t,y:n};if(t<0)return i.x=0,i;const s=r.getBoundingClientRect(),a=t+o.offsetWidth,l=r.ownerDocument.body.offsetWidth;if(a>l&&s.right<a){const e=a-l;return i.x=t-e,i}return i}},xi=({elementClasses:e,initialValue:t,expectedTag:n,rootElement:r,contentElement:o,id:i,setValue:s,requestDestroy:a})=>{const[l,c]=(0,g.useState)(!0),[u,d]=(0,g.useState)(null),{onSelectionEnd:m,anchor:p,clearAnchor:f}=((e,t)=>{const[n,r]=(0,g.useState)(null);(0,g.useEffect)(()=>{n||wi(e,t)},[n,e,t]);const o=(0,g.useCallback)(()=>{r(null)},[]);return{onSelectionEnd:n=>{const o=!n.state.selection.empty;wi(e,t),r(o?((e,t)=>{const n=e.defaultView,r=n?.getSelection();if(!r)return null;const o=r.getRangeAt(0).getBoundingClientRect(),i=e.body.getBoundingClientRect(),s=e.createElement("span");return Si(s,o,i),s.setAttribute("id",Ei(t)),e.body.appendChild(s),s})(e,t):null)},anchor:n,clearAnchor:o}})(r.ownerDocument,i);(0,g.useEffect)(()=>{l||(f(),a())},[l,f,a]);const h=(0,g.useCallback)(()=>{d(null),c(!1)},[]);return(e=>{const t=(0,g.useCallback)(()=>queueMicrotask(e),[e]);(0,g.useEffect)(()=>(gi.forEach(e=>document?.querySelector(e)?.addEventListener("mousedown",t)),()=>gi.forEach(e=>document?.querySelector(e)?.removeEventListener("mousedown",t))),[])})(h),(0,g.useEffect)(()=>{const e=o.ownerDocument,t=e=>{o.contains(e.target)||h()};return e.addEventListener("mousedown",t),()=>e.removeEventListener("mousedown",t)},[o,h]),l?g.createElement(C.ThemeProvider,null,g.createElement(Ri,{expectedTag:n,rootElement:r,id:i}),g.createElement(Go.InlineEditor,{onEditorCreate:d,mountElement:o,editorProps:{attributes:{style:"outline: none; display: inherit; justify-content: inherit; align-items: inherit; flex-direction: inherit; text-align: inherit;"}},elementClasses:e,value:t,setValue:s,onBlur:h,autofocus:!0,onSelectionEnd:m}),p&&u&&g.createElement(_i,{anchor:p,editor:u,id:i})):null},Ri=({expectedTag:e,rootElement:t,id:n})=>{const r=bi(t,e),[o,i]=(0,g.useState)(r);return(0,g.useEffect)(()=>{i(bi(t,e))},[e,t]),o?g.createElement(Jt,{element:o,id:n,isSelected:!0}):null},_i=({anchor:e,editor:t,id:n})=>{const{refs:r,floatingStyles:o}=Ht({placement:"top",strategy:"fixed",transform:!1,whileElementsMounted:ct,middleware:[Ci,vt()]});return(0,g.useLayoutEffect)(()=>(r.setReference(e),()=>r.setReference(null)),[e,r]),g.createElement(Bt,{id:Xt},g.createElement(C.Box,{ref:r.setFloating,role:"presentation",style:{...o,pointerEvents:"none"}},g.createElement(Go.InlineEditorToolbar,{editor:t,elementId:n})))},Ai=new Set([u.htmlV3PropTypeUtil.key,u.stringPropTypeUtil.key]);class ki extends hi{handlerAttached=!1;editing=!1;getReplacementKey(){return"inline-editing"}static getTypes(){return Object.keys(vi)}isEditingModeActive(){return this.editing}shouldRenderReplacement(){return this.isInlineEditingEligible()&&"edit"===(0,s.getCurrentEditMode)()}handleRenderInlineEditor=()=>{!this.isEditingModeActive()&&this.isInlineEditingEligible()&&this.renderInlineEditor()};renderOnChange(){this.isEditingModeActive()||this.refreshView()}onDestroy(){this.resetInlineEditorRoot()}_beforeRender(){this.resetInlineEditorRoot()}_afterRender(){this.isInlineEditingEligible()&&!this.handlerAttached&&(this.element.addEventListener("click",this.handleRenderInlineEditor),this.handlerAttached=!0)}originalMethodsToTrigger(){const e=this.isEditingModeActive()?fi:mi,t=this.isEditingModeActive()?fi:pi;return{_beforeRender:e,_afterRender:t,renderOnChange:t,onDestroy:pi,render:e}}resetInlineEditorRoot(){this.element.removeEventListener("click",this.handleRenderInlineEditor),this.handlerAttached=!1,this.reactRoot.render(null),this.editing=!1}unmountInlineEditor(){this.resetInlineEditorRoot(),this.refreshView()}isInlineEditingEligible(){const e=this.getInlineEditablePropertyName();return(({rawValue:e,propTypeFromSchema:t})=>null==e?(e=>{return!!e&&(!(!("key"in e)||(t=e.key,!Ai.has(t)))||"union"===e.kind&&[...Ai].some(t=>e.prop_types[t]));var t})(t):u.htmlV3PropTypeUtil.isValid(e)||u.stringPropTypeUtil.isValid(e))({rawValue:this.getSetting(e),propTypeFromSchema:this.getInlineEditablePropType()})}getInlineEditablePropertyName(){return vi[this.type]??""}getInlineEditablePropType(){const e=(0,l.getElementType)(this.type)?.propsSchema,t=this.getInlineEditablePropertyName();return e?.[t]??null}getInlineEditablePropValue(){const e=this.getInlineEditablePropType(),t=this.getInlineEditablePropertyName();return this.getSetting(t)??e?.default??null}getExtractedContentValue(){const e=this.getInlineEditablePropValue(),t=u.htmlV3PropTypeUtil.extract(e);return u.stringPropTypeUtil.extract(t?.content??null)??""}setContentValue(e){const t=this.getInlineEditablePropertyName(),n=e||"",r=(0,u.parseHtmlChildren)(n),o=u.htmlV3PropTypeUtil.create({content:r.content?u.stringPropTypeUtil.create(r.content):null,children:r.children});(0,s.undoable)({do:()=>{const e=this.getInlineEditablePropValue();return this.runCommand(t,o),e},undo:(e,n)=>{this.runCommand(t,n??null)}},{title:(0,l.getElementLabel)(this.id),subtitle:(0,Dn.__)("%s edited","elementor").replace("%s",this.getInlineEditablePropTypeKey()??"Inline editing"),debounce:{wait:800}})()}getInlineEditablePropTypeKey(){const e=this.getInlineEditablePropType();if(!e)return null;if("union"===e.kind){const t=[u.htmlV3PropTypeUtil.key,u.stringPropTypeUtil.key];for(const n of t)if(e.prop_types[n])return n;return null}return"key"in e&&"string"==typeof e.key?e.key:null}runCommand(e,t){(0,s.__privateRunCommandSync)("document/elements/set-settings",{container:(0,l.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,l.getElementType)(this.type)?.propsSchema;if(!e?.tag)return null;const t=e.tag??null;return"union"===t.kind?t.prop_types.string??null:t}renderInlineEditor(){this.isEditingModeActive()&&this.resetInlineEditorRoot();const e=this.element.children?.[0];if(!e)return;const t=e.classList.toString(),n=this.getExtractedContentValue(),r=this.getExpectedTag();e.innerHTML="",this.editing=!0,this.reactRoot.render(g.createElement(xi,{elementClasses:t,initialValue:n,expectedTag:r,rootElement:this.element,contentElement:e,id:this.id,setValue:this.setContentValue.bind(this),requestDestroy:this.unmountInlineEditor.bind(this)}))}}const Oi=new Map,Ii=()=>{Pi(ki)},Pi=e=>{const t=e.getTypes();t&&t.forEach(t=>{Oi.set(t,e)})},Ni=e=>{const t=ii(e);return class extends t{#n=null;#r;#o;#i;constructor(...e){super(...e);const t=this.model.get("settings");this.#o=this.el.ownerDocument.createElement("div"),this.#o.style.display="none",this.el.ownerDocument.body.appendChild(this.#o),this.#i=(0,di.H)(this.#o),this.#r={getSetting:t.get.bind(t),setSetting:t.set.bind(t),element:this.el,type:this?.model?.get("widgetType")??this.container?.model?.get("elType")??null,id:this?.model?.get("id")??null,refreshView:this.refreshView.bind(this),reactRoot:this.#i,reactContainer:this.#o}}refreshView(){this.invalidateRenderCache?.(),this.render()}renderOnChange(){this.#s("renderOnChange")}render(){const e=this.#r,t=e.type,n=t?(r=t,Oi.get(r)??null):null;var r;n&&!this.#n&&(this.#n=new n(e)),this.#s("render")}onDestroy(){this.#s("onDestroy"),this.#i.unmount(),this.#o.remove()}_afterRender(){this.#s("_afterRender")}_beforeRender(){this.#s("_beforeRender")}#s(e){const n=t.prototype[e].bind(this),r=this.#n?.shouldRenderReplacement(),o=r&&this.#n?.[e]?.bind(this.#n);if(!o||!r)return n();const i=this.#n?.originalMethodsToTrigger()[e]??"never";"before"===i&&n(),o(),"after"===i&&n()}}},Li=({type:e,renderer:t,element:n})=>{const r=window,o=Ni({type:e,renderer:t,element:n});return class extends r.elementor.modules.elements.types.Widget{getType(){return e}getView(){return o}}},Mi={},$i={};function Di(e,t){$i[e]=t}function ji(e,t){Mi[e]=t}const zi={modifyDefaultChildren(e){if(!Array.isArray(e)||0===e.length)return e;const[t]=e,n=this.get("editor_settings")?.initial_position;if(!n||!t||"object"!=typeof t)return e;const r=t;return[{...r,settings:{...r.settings,paragraph:u.htmlV3PropTypeUtil.create({content:u.stringPropTypeUtil.create(`Tab ${n}`),children:[]})}},...e.slice(1)]}},Vi="elementor://document/structure";function Ui(){const e=window,t=e.elementor?.documents?.getCurrent?.();if(!t)return{error:"No active document found"};const n=(t.container?.children||[]).map(e=>Fi(e));return{documentId:t.id,documentType:t.config.type,title:t.config.settings?.post_title||"Untitled",elements:n.filter(e=>null!==e)}}function Fi(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=>Fi(e)).filter(e=>null!==e)),n}function Bi(e,t){const n=window.elementorV2.editorVariables.Utils;return u.Schema.adjustLlmPropValueSchema(e,{forceKey:t,transformers:n.globalVariablesLLMResolvers})}const Wi=e=>{const{elementId:t,propertyName:n,propertyValue:r,elementType:o}=e;if("_styles"===n){const e=(0,l.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,Bi(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 a=Object.values(e).find(e=>"local"===e.label);return void(a?(0,l.updateElementStyle)({elementId:t,styleId:a.id,meta:{breakpoint:"desktop",state:null},...void 0!==s?{custom_css:s}:{},props:{...i}}):(0,l.createElementStyle)({elementId:t,...void 0!==s?{custom_css:s}:{},classesProp:"classes",label:"local",meta:{breakpoint:"desktop",state:null},props:{...i}}))}const i=(0,l.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=Bi(r,i[n].key);(0,l.updateElementSettings)({id:t,props:{[n]:s},withHistory:!1})};let Hi=null;const Gi={get widgetsSchema(){if(!Hi){const e={},t=(0,l.getWidgetsCache)();if(!t)return{};Object.entries(t).forEach(([t,n])=>{n.atomic_props_schema&&(e[t]=structuredClone(n.atomic_props_schema))}),Hi=e}return Hi},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 [${p.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 Yi{elementConfig={};elementStylesConfig={};elementCusomCSS={};rootContainers=[];containerElements=[];api={createElement:l.createElement,getWidgetsCache:l.getWidgetsCache,generateElementId:l.generateElementId,getContainer:l.getContainer,doUpdateElementProperty:Wi};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 Yi({xml:n,api:t})}constructor(e){const{api:t={},elementConfig:n={},stylesConfig:r={},customCSS:o={},xml:i}=e;this.xml=i,Object.assign(this.api,t),this.setElementConfig(n),this.setStylesConfig(r),this.setCustomCSS(o)}setElementConfig(e){this.elementConfig=e}setStylesConfig(e){this.elementStylesConfig=e}setCustomCSS(e){this.elementCusomCSS=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]||t.children?.[1]:t;i||(i=t);const s=o?this.api.createElement({container:i,model:{elType:r,id:(0,l.generateElementId)(),editor_settings:{title:e.getAttribute("configuration-id")??void 0}},options:{useHistory:!1}}):this.api.createElement({container:i,model:{elType:"widget",widgetType:r,id:(0,l.generateElementId)(),editor_settings:{title:e.getAttribute("configuration-id")??void 0}},options:{useHistory:!1}});"document"===t.id&&this.rootContainers.push(s),e.setAttribute("id",s.id);let a=0;for(const t of Array.from(e.children))this.iterateBuild(t,s,a),a++}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={};for(const[n,r]of Object.entries(this.elementStylesConfig)){const{element:o,node:i}=this.matchNodeByConfigId(n),s={};for(const[n,i]of Object.entries(r)){const{valid:a,errors:l}=Gi.validateStyles({[n]:i});a?s[n]=i:(r.$intention&&(t[o.id]=t[o.id]||[],t[o.id].push(n)),e.push(...l||[]))}if(0!==Object.keys(s).length)try{this.api.doUpdateElementProperty({elementId:o.id,propertyName:"_styles",propertyValue:s,elementType:i.tagName})}catch(t){e.push(String(t))}}for(const[e,t]of Object.entries(this.elementCusomCSS)){const{element:n,node:r}=this.matchNodeByConfigId(e);this.api.doUpdateElementProperty({elementId:n.id,propertyName:"_styles",propertyValue:{custom_css:t},elementType:r.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=Gi.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 qi=()=>{const e=(0,c.toolPrompts)("build-compositions");return e.description('\n# RESOURCES (Read before use)\n- [elementor://global-classes] - Check FIRST for reusable classes\n- [elementor://global-variables] - ONLY use variables defined here\n\n# WORKFLOW\n1. Check/create global classes via "create-global-class" tool\n2. Build composition (THIS TOOL) - minimal inline styles\n3. Apply classes via "apply-global-class" tool\n\n# XML STRUCTURE\n- Use widget tags: `<e-button configuration-id="btn1"></e-button>`\n- Containers: "e-flexbox", "e-div-block", "e-tabs"\n- Every element needs unique "configuration-id"\n- No attributes, classes, IDs, or text nodes in XML\n\n# CONFIGURATION\n- Map configuration-id → elementConfig (props) + stylesConfig (layout only)\n- All PropValues require `$$type` matching schema\n- NO LINKS in configuration\n- Retry on errors up to 10x\n\nNote about configuration ids: These names are visible to the end-user, make sure they make sense, related and relevant.\n\n# DESIGN PHILOSOPHY: CONTEXT-DRIVEN CREATIVITY\n\n**Use the user\'s context aggressively.** Business type, brand personality, target audience, and purpose should drive every design decision. A law firm needs gravitas; a children\'s app needs playfulness. Don\'t default to generic.\n\n## SIZING: DEFAULT IS NO SIZE (CRITICAL)\n\n**DO NOT specify height or width unless you have a specific visual reason.**\n\nFlexbox and CSS already handle sizing automatically:\n- Containers grow to fit their content\n- Flex children distribute space via flex properties, not width/height\n- Text elements size to their content\n\nWHEN TO SPECIFY SIZE:\n- min-height on ROOT section for viewport-spanning hero (use min-height, NOT height)\n- max-width for contained content areas (e.g., max-width: 60rem)\n- Explicit aspect ratios for media containers\n\nNEVER SPECIFY:\n- height on nested containers (causes overflow)\n- width on flex children (use flex-basis or gap instead)\n- 100vh on anything except root-level sections\n- Any size "just to be safe" - if unsure, OMIT IT\n\nvh units are VIEWPORT-relative. Nested 100vh inside 100vh = 200vh overflow.\n\nGOOD: `<e-flexbox>content naturally sizes</e-flexbox>`\nBAD: `<e-flexbox style="height:100vh"><e-div-block style="height:100vh">overflow</e-div-block></e-flexbox>`\n\n## Layout Variety (Break the Template)\n- AVOID: Full-width 100vh hero → three columns → testimonials → CTA (every AI does this)\n- VARY heights: Use auto-height sections with generous padding (6rem+). Let content breathe\n- VARY widths: Not everything spans full width. Use contained sections (max-width: 960px) mixed with edge-to-edge\n- ASYMMETRIC grids: 2:1, 1:3, offset layouts. Avoid equal column widths\n- Negative space as design element: Large margins create focus and sophistication\n- Break alignment intentionally: Offset headings, overlapping elements, broken grids\n\n## Visual Depth & Effects\n- Layer elements: Overlapping cards, text over images, floating elements\n- Subtle shadows with color tint (not pure black): `box-shadow: 0 20px 60px rgba(<brand-color-here>, 0.15)`\n- Gradient overlays on images for text readability\n- Border radius variation: Mix sharp (0) and soft (1rem+) corners purposefully\n- Backdrop blur for glassmorphism where appropriate\n- Micro-interactions via CSS: hover transforms, transitions (0.3s ease)\n\n## Typography with Character\n- Display fonts for headlines (from user\'s brand or contextually appropriate)\n- Size contrast: 4rem+ headlines vs 1rem body. Make hierarchy unmistakable\n- Letter-spacing: Tight for large headlines (-0.02em), loose for small caps (0.1em)\n- Line-height: Tight for headlines (1.1), generous for body (1.6-1.8)\n- Text decoration: Underlines, highlights, gradient text for emphasis\n\n## Color with Purpose\n- Extract palette from user context (brand colors, industry norms, mood)\n- 60-30-10 rule: dominant, secondary, accent\n- Tinted neutrals over pure grays: warm (#faf8f5, #2d2a26) or cool (#f5f7fa, #1e2430)\n- Color blocking: Large colored sections create visual rhythm\n- Gradient directions: Diagonal (135deg, 225deg) feel more dynamic than vertical\n\n## Spacing Strategy\n- Section padding: 6rem-10rem vertical, creating breathing room\n- Rhythm variation: Tight groups (2rem) with generous gaps between (6rem)\n- Use rem/em exclusively for responsive scaling\n- Generous padding on CTAs: min 1rem 2.5rem\n\n# HARD CONSTRAINTS\n- Variables ONLY from [elementor://global-variables] (others throw errors)\n- Avoid SVG widgets unless assets are pre-uploaded\n- Check `llm_guidance` in widget schemas\n\n# PARAMETERS\n- **xmlStructure**: Valid XML with configuration-id attributes\n- **elementConfig**: configuration-id → widget PropValues\n- **stylesConfig**: configuration-id → style PropValues (layout only)\n- **customCSS**: configuration-id → CSS rules (no selectors, semicolon-separated)\n '),e.example('\nSection with heading + button (NO explicit heights - content sizes naturally):\n{\n xmlStructure: "<e-flexbox configuration-id="Main Section"><e-heading configuration-id="Section Title"></e-heading><e-button configuration-id="Call to Action"></e-button></e-flexbox>",\n elementConfig: {\n "section1": { "tag": { "$$type": "string", "value": "section" } }\n },\n customCSS: {\n "Section Title": "padding: 6rem 4rem; background: linear-gradient(135deg, #faf8f5 0%, #f0ebe4 100%);"\n },\n stylesConfig: {\n "Section Title": {\n "font-size": { "$$type": "size", "value": { "size": { "$$type": "number", "value": 3.5 }, "unit": { "$$type": "string", "value": "rem" } } },\n "color": { "$$type": "color", "value": { "$$type": "string", "value": "#2d2a26" } }\n }\n }\n}\nNote: No height/width specified on any element - flexbox handles layout automatically.\n'),e.parameter("xmlStructure","Valid XML structure with custom elementor tags and configuration-id attributes."),e.parameter("elementConfig","Record mapping configuration IDs to widget PropValues."),e.parameter("stylesConfig","Record mapping configuration IDs to style PropValues (layout/positioning only)."),e.instruction("Element IDs in the returned XML represent actual widgets. Use these IDs for subsequent styling or configuration changes."),e.prompt()};var Xi=window.elementorV2.schema;const Ki={xmlStructure:Xi.z.string().describe("The XML structure representing the composition to be built"),elementConfig:Xi.z.record(Xi.z.string().describe("The configuration id"),Xi.z.record(Xi.z.string().describe("property name"),Xi.z.any().describe(`The PropValue for the property, refer to ${m}`))).describe("A record mapping element IDs to their configuration objects. REQUIRED"),stylesConfig:Xi.z.record(Xi.z.string().describe("The configuration id"),Xi.z.record(Xi.z.string().describe("StyleSchema property name"),Xi.z.any().describe(`The PropValue for the style property. MANDATORY, refer to [${p}]`))).describe(`A record mapping element IDs to their styles configuration objects. Use the actual styles schema from [${p}].`).default({}),customCSS:Xi.z.record(Xi.z.string().describe("The configuration id"),Xi.z.string().describe("The custom CSS for the element. MANDATORY")).describe("A record mapping element IDs to their custom CSS.").default({})},Ji={errors:Xi.z.string().describe("Error message if the composition building failed").optional(),xmlStructure:Xi.z.string().describe("The built XML structure as a string. Must use this XML after completion of building the composition, it contains real IDs.").optional(),llm_instructions:Xi.z.string().describe("Instructions what to do next, Important to follow these instructions!").optional()},Zi=`Configure an existing element on the page.\n\n# **CRITICAL - REQUIRED INFORMATION (Must read before using this tool)**\n1. [${m}]\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. [${p}]\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 [${m}]\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`,Qi={propertiesToChange:Xi.z.record(Xi.z.string().describe("The property name."),Xi.z.any().describe(`PropValue, refer to [${m}] by correct type, as appears in elementType`),Xi.z.any()).describe("An object record containing property names and their new values to be set on the element"),stylePropertiesToChange:Xi.z.record(Xi.z.string().describe("The style property name"),Xi.z.any().describe(`The style PropValue, refer to [${p}] how to generate values`),Xi.z.any()).describe("An object record containing style property names and their new values to be set on the element").default({}),elementType:Xi.z.string().describe("The type of the element to retreive the schema"),elementId:Xi.z.string().describe("The unique id of the element to configure")},es={success:Xi.z.boolean().describe("Whether the configuration change was successful, only if propertyName and propertyValue are provided")};function ts(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 [${m.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 [${p.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 ns={elementId:Xi.z.string()},rs={properties:Xi.z.record(Xi.z.string(),Xi.z.any()).describe("A record mapping PropTypes to their corresponding PropValues"),style:Xi.z.record(Xi.z.string(),Xi.z.any()).describe("A record mapping StyleSchema properties to their corresponding PropValues"),childElements:Xi.z.array(Xi.z.object({id:Xi.z.string(),elementType:Xi.z.string(),childElements:Xi.z.array(Xi.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")},os=e=>(e.children||[]).map(e=>({id:e.id,elementType:e.model.get("elType")||e.model.get("widgetType")||"unknown",childElements:os(e)})),is=e=>{const{setMCPDescription:t}=e;t("Everything related to V4 ( Atomic ) canvas.\n# Canvas workflow for new compositions\n- Configure elements settings and styles\n- Build compositions/sections out of V4 atomic elements using context aware designs using the website resources\n- Get and retrieve element configuration values\n"),(e=>{const{mcpServer:t}=e;t.resource("styles-best-practices",f,async()=>({contents:[{uri:f,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 ${p}.\nThe css string must follow standard CSS syntax, with properties and values separated by semicolons, no selectors, or nesting rules allowed.\n\n** CRITICAL - VARIABLES **\nWhen using global variables, ensure that the variables are defined in the elementor://global-variables resource.\nVariables from the user context ARE NOT SUPPORTED AND WILL RESOLVE IN ERROR.\n\n`}]})),t.resource("styles-schema",new c.ResourceTemplate(p,{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(m,{list:()=>{const e=(0,l.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,l.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,a={},c=r?.base_styles;c&&Object.values(c).forEach(e=>{e.variants.forEach(e=>{Object.assign(a,e.props)})});const d=Object.keys(a).length>0,m={can_have_children:!!r?.meta?.is_container};return d&&(m.instructions="These are the default styles applied to the widget. Override only when necessary.",m.default_styles=a),{contents:[{uri:e.toString(),mimeType:"application/json",text:JSON.stringify({type:"object",properties:i,description:s,llm_guidance:m})}]}})})(e),(e=>{const{resource:t,sendResourceUpdated:n}=e;let r=null;const o=()=>{const e=Ui(),t=JSON.stringify(e,null,2);t!==r&&(r=t,n({uri:Vi}))};(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("document-structure",Vi,{description:"Document structure."},async()=>({contents:[{uri:Vi,text:JSON.stringify(Ui(),null,2)}]}))})(e),(e=>{const{addTool:t}=e;t({name:"build-compositions",description:qi(),schema:Ki,requiredResources:[{description:"Widgets schema",uri:m},{description:"Styles schema",uri:p},{description:"Global Classes",uri:"elementor://global-classes"},{description:"Global Variables",uri:"elementor://global-variables"},{description:"Styles best practices",uri:f}],outputSchema:Ji,modelPreferences:{hints:[{name:"claude-sonnet-4-5"}]},handler:async e=>{const{xmlStructure:t,elementConfig:n,stylesConfig:r,customCSS:o}=e;let i="";const s=[],a=[],c=(0,l.getContainer)("document"),u=(0,v.getCurrentDocument)(),d=function(e,t){const n=e.children?.[0];return t===v.COMPONENT_DOCUMENT_TYPE&&n?n:e}(c,u?.type.value);try{const e=Yi.fromXMLString(t,{createElement:l.createElement,getWidgetsCache:l.getWidgetsCache});e.setElementConfig(n),e.setStylesConfig(r),e.setCustomCSS(o);const{configErrors:c,invalidStyles:u,rootContainers:m}=e.build(d);if(a.push(...m),i=(new XMLSerializer).serializeToString(e.getXML()),c.length)throw s.push(...c.map(e=>new Error(e))),new Error("Configuration errors occurred during composition building.");Object.entries(u).forEach(([e,t])=>{const n={value:t.join(";\n")};Wi({elementId:e,propertyName:"_styles",propertyValue:{_styles:{custom_css:n}},elementType:"widget"})})}catch(e){s.push(e)}if(s.length){a.forEach(e=>{(0,l.deleteElement)({container:e,options:{useHistory:!1}})});const e=s.map(e=>"string"==typeof e?e:e instanceof Error?e.message||String(e):"object"==typeof e&&null!==e?JSON.stringify(e):String(e)).filter(e=>e&&""!==e.trim()&&"{}"!==e&&"null"!==e&&"undefined"!==e);if(0===e.length)throw new Error("Failed to build composition: Unknown error occurred. No error details available.");const t=`Failed to build composition with the following errors:\n\n${e.join("\n\n")}`;throw new Error(t)}return{xmlStructure:i,errors:s?.length?s.map(e=>"string"==typeof e?e:e.message).join("\n\n"):void 0,llm_instructions:'The composition was built successfully with element IDs embedded in the XML.\n\n**CRITICAL NEXT STEPS** (Follow in order):\n1. **Apply Global Classes**: Use "apply-global-class" tool to apply the global classes you created BEFORE building this composition\n - Check the created element IDs in the returned XML\n - Apply semantic classes (heading-primary, button-cta, etc.) to appropriate elements\n\n2. **Fine-tune if needed**: Use "configure-element" tool only for element-specific adjustments that don\'t warrant global classes\n\nRemember: Global classes ensure design consistency and reusability. Don\'t skip applying them!\n'}}})})(e),(e=>{const{addTool:t}=e;t({name:"get-element-configuration-values",description:"Retrieve the element's configuration PropValues for a specific element by unique ID.",schema:ns,outputSchema:rs,modelPreferences:{intelligencePriority:.6,speedPriority:.9},handler:async({elementId:e})=>{const t=(0,l.getContainer)(e);if(!t)throw new Error(`Element with ID ${e} not found.`);const n=t.settings,r=(0,l.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,l.getElementStyles)(e)||{},a=Object.values(s).find(e=>"local"===e.label);if(a){const e=a.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:os(t)}}})})(e),(e=>{const{addTool:t}=e;t({name:"configure-element",description:Zi,schema:Qi,outputSchema:es,requiredResources:[{description:"Widgets schema",uri:m},{description:"Styles schema",uri:p}],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}=Gi.validatePropSchema(n,t),{valid:a,errors:l}=Gi.validateStyles(r||{});if(!i){const t=`Failed to configure element "${e}" due to invalid properties: ${s?.join("\n- ")}`;throw new Error(t)}if(!a){const t=`Failed to configure element "${e}" due to invalid style properties: ${l?.join("\n- ")}`;throw new Error(t)}for(const[t,r]of o)try{Wi({elementId:e,elementType:n,propertyName:t,propertyValue:r})}catch(r){const o=ts({propertyName:t,elementId:e,elementType:n,error:r,propertyType:"prop"});throw new Error(o)}for(const[t,o]of Object.entries(r||{}))try{Wi({elementId:e,elementType:n,propertyName:"_styles",propertyValue:{[t]:o}})}catch(r){const o=ts({propertyName:`(style) ${t}`,elementId:e,elementType:n,propertyType:"style",error:r});throw new Error(o)}return{success:!0}}})})(e),(e=>{const{resource:t,sendResourceUpdated:n}=e,r=()=>{const{breakpoints:e}=window.elementor?.config?.responsive||{};return e?Object.values(e).filter(e=>e.is_enabled).map(e=>{const{direction:t,label:n,value:r}=e;return{label:n,constraint:t,value:r}}):[]},o=()=>({contents:[{uri:a,mimeType:"application/json",text:JSON.stringify(r())}]});t("breakpoints ",a,{description:"Breakpoints list."},()=>o()),window.addEventListener((0,s.v1ReadyEvent)().name,()=>{n({uri:a,...o()})})})(e)},ss=m.replace("{widgetType}","element-schema"),as=`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 (\`${m}\`)\n- **Style Schema**: Common styles shared across all widgets and containers (\`${p}\`)\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 \`${m}\` to see available widgets\n- Retrieve configuration schema from \`${ss}\` 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 \`${p}\`:\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`,ls={href:"https://go.elementor.com/element-link-inside-link-infotip",target:"_blank",color:"inherit",variant:"text",sx:{marginInlineStart:"20px"},children:"Learn more"};function cs(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,Dn.__)("To paste a link to this element, first remove the link from it's parent container.","elementor"),id:"paste-in-link-blocked",additionalActionProps:[ls]},a=ds(i,r);return a&&(0,$n.notify)(s),a}function us(e){const{containers:t=[e.container],target:n}=e,r=t,o=n,i={type:"default",message:(0,Dn.__)("To drag a link to this element, first remove the link from it's parent container.","elementor"),id:"move-in-link-blocked",additionalActionProps:[ls]},s=ds(r,[o]);return s&&(0,$n.notify)(i),s}function ds(e,t){return!(!e?.length||!t?.length)&&(!!e.some(e=>!!e?.id&&((0,l.isElementAnchored)(e.id)||!!(0,l.getAnchoredDescendantId)(e.id)))&&t.some(e=>!!e?.id&&((0,l.isElementAnchored)(e.id)||!!(0,l.getAnchoredAncestorId)(e.id))))}function ms(e){const{containers:t=[e.container]}=e;return t.some(ps)}function ps(e){return!!e&&Boolean(hs(e))}function fs(e){const t=hs(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 hs(e){const t=e?.model.get("widgetType")||e?.model.get("elType"),n=(0,l.getWidgetsCache)(),r=n?.[t];return r?.atomic_props_schema??null}function gs(e){return e.length>1?(0,Dn.__)("Elements","elementor"):(0,l.getElementLabel)(e[0].id)}const ys=()=>(0,s.undoable)({do:({containers:e,newStyle:t})=>e.map(e=>{const n=e.id,r=fs(e);if(!r)return null;const o=(0,l.getElementStyles)(e.id),[i,s]=Object.entries(o??{})[0]??[],a=Object.keys(s??{}).length?s:null,c={styleId:i,originalStyle:a};if(i)t.variants.forEach(({meta:e,props:t,custom_css:r})=>{(0,l.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,l.createElementStyle)({elementId:n,classesProp:r,label:b.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,l.deleteElementStyle)(e.id,r.styleId);const o=fs(e);if(!o)return;const[i]=r.originalStyle.variants,s=r.originalStyle.variants.slice(1);(0,l.createElementStyle)({elementId:e.id,classesProp:o,label:b.ELEMENTS_STYLES_RESERVED_LABEL,styleId:r.styleId,...i,additionalVariants:s})})}},{title:({containers:e})=>gs(e),subtitle:(0,Dn.__)("Style Pasted","elementor")});const vs=()=>(0,s.undoable)({do:({containers:e})=>e.map(e=>{const t=e.model.get("id"),n=(0,l.getElementStyles)(t);return Object.keys(n??{}).forEach(e=>(0,l.deleteElementStyle)(t,e)),n}),undo:({containers:e},t)=>{e.forEach((e,n)=>{const r=fs(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,l.createElementStyle)({elementId:o,classesProp:r,styleId:e,label:b.ELEMENTS_STYLES_RESERVED_LABEL,...n,additionalVariants:i})})})}},{title:({containers:e})=>gs(e),subtitle:(0,Dn.__)("Style Reset","elementor")});function bs(){En.register("size",Lo).register("shadow",No).register("stroke",Mo).register("dimensions",Ro(["block-start","block-end","inline-start","inline-end"],({propKey:e,key:t})=>`${e}-${t}`)).register("filter",_o).register("backdrop-filter",_o).register("box-shadow",xo(",")).register("background",So).register("background-overlay",Eo).register("background-color-overlay",yo).register("background-image-overlay",bo).register("background-gradient-overlay",vo).register("gradient-color-stop",xo(",")).register("color-stop",Co).register("background-image-position-offset",Po).register("background-image-size-scale",wo).register("image-src",cr).register("image",dr).register("object-position",Po).register("transform-origin",Vo).register("perspective-origin",Io).register("transform-move",jo).register("transform-scale",Bo).register("transform-rotate",Fo).register("transform-skew",Ho).register("transform-functions",$o).register("transform",Ro(["transform-functions","transform-origin","perspective","perspective-origin"],({key:e})=>"transform-functions"===e?"transform":e)).register("transition",Yo).register("layout-direction",Ro(["row","column"],({propKey:e,key:t})=>`${t}-${e}`)).register("flex",ko).register("border-width",Ro(["block-start","block-end","inline-start","inline-end"],({key:e})=>`border-${e}-width`)).register("border-radius",Ro(["start-start","start-end","end-start","end-end"],({key:e})=>`border-${e}-radius`)).registerFallback(mr),function(){const e=ys();(0,s.blockCommand)({command:"document/elements/paste-style",condition:ms}),(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(ps);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??[],a=(0,l.getContainer)(s.id);if(!s||!a||!ps(a))return;const c=s.styles,d=Object.values(c??{})[0],m=function(e,t){const n=fs(e);if(!n)return[];const r=(0,l.getElementSetting)(e.id,n);return r?.value.filter(e=>e!==t?.id)??[]}(a,d);m.length&&function(e,t){e.forEach(e=>{const n=fs(e);if(!n)return;const r=(0,l.getElementSetting)(e.id,n),o=u.classesPropTypeUtil.extract(r)??[],i=u.classesPropTypeUtil.create(Array.from(new Set([...t,...o])));(0,l.updateElementSettings)({id:e.id,props:{[n]:i}})})}(o,m),d&&t({containers:o,newStyle:d})}(t.args,e))}(),function(){const e=vs();(0,s.blockCommand)({command:"document/elements/reset-style",condition:ms}),(0,s.__privateListenTo)((0,s.commandStartEvent)("document/elements/reset-style"),t=>function(e,t){const{containers:n=[e.container]}=e,r=n.filter(ps);r.length&&t({containers:r})}(t.args,e))}(),(0,s.blockCommand)({command:"document/elements/paste",condition:cs}),(0,s.blockCommand)({command:"document/elements/move",condition:us}),(0,s.blockCommand)({command:"document/elements/create",condition:Jn}),(0,s.blockCommand)({command:"document/elements/move",condition:Zn}),(0,s.blockCommand)({command:"document/elements/paste",condition:Qn}),(0,s.blockCommand)({command:"document/elements/create",condition:Gn}),(0,s.blockCommand)({command:"document/elements/move",condition:Yn}),(0,s.blockCommand)({command:"document/elements/paste",condition:qn}),Ii(),(0,s.__privateListenTo)((0,s.v1ReadyEvent)(),()=>{const e=(0,l.getWidgetsCache)()??{},t=window,n=function(){const e=(0,Xo.createArrayLoader)({}),t=(0,Xo.createEnvironment)(e);return t.registerEscapingStrategy(Ko,"html_tag"),t.registerEscapingStrategy(Jo,"full_url"),{register:e.setTemplate,render:t.render}}();Object.entries(e).forEach(([e,r])=>{if(!r.atomic)return;const o=function(e,t,n){if(si(n))return function(e,t,n){return ai({type:e,renderer:t,element:n,modelExtensions:$i[e]})}(e,t,n);if(!oi(n))return function(e){const t=window;return class extends t.elementor.modules.elements.types.Widget{getType(){return e}getView(){return Zo()}}}(e);const r=Mi[e];return r?.({type:e,renderer:t,element:n})??Li({type:e,renderer:t,element:n})}(e,n,r);!function(e,t,n,r){if(!oi(n)&&!si(n))return;const o=e.elementor.elementsManager,i=Boolean(o.getElementTypeClass(t));try{o.registerElementType(new r)}catch{si(n)&&i&&(o._elementTypes[t]=new r)}}(t,e,r,o)})}),tr.register("classes",function(){const e=new Map;return t=>t.map(t=>function(e,t){if(!t.has(e)){const n=b.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=b.stylesRepository.getProviderByKey(n);return r?.actions.resolveCssName(e)??e}(t,e)).filter(Boolean)}()).register("link",ar).register("query",lr).register("image",dr).register("image-src",cr).register("svg-src",ho).register("video-src",go).register("attributes",rr).register("date-time",or).register("html-v2",ir).register("html-v3",sr).registerFallback(mr),(0,h.injectIntoTop)({id:"elements-overlays",component:en}),(0,h.injectIntoTop)({id:"canvas-style-render",component:Mn}),(0,h.injectIntoTop)({id:"canvas-interactions-render",component:sn}),(0,h.injectIntoLogic)({id:"classes-rename",component:E}),is((0,c.getMCPByDomain)("canvas",{instructions:as})),Di("e-tab",zi)}const ws=["elementor-element"],Es=()=>{xs()?.panelElements?.trigger("element:drag:end")},Ts=(e,t)=>{Ss(t);const n=xs();n?.editor.reply("element:dragged",null),n?.panelElements.reply("element:selected",Rs(e)).trigger("element:drag:start")},Ss=e=>{const t={groups:Cs(e)};e.dataTransfer?.setData(JSON.stringify(t),"true")},Cs=e=>{const t=e.dataTransfer?.getData("text/plain");return t?JSON.parse(t).groups:ws},xs=()=>{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},Rs=({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?.();