← Back
Editing: editor-canvas.min.js
/*! * tabbable 6.4.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */ /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */ (function(e,t){var n=Object.create,r=Object.defineProperty,__name=(e,t)=>r(e,`name`,{value:t,configurable:!0}),i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__esmMin=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},__commonJSMin=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),__exportAll=(e,t)=>{let n={};for(var i in e)r(n,i,{get:e[i],enumerable:!0});return t||r(n,Symbol.toStringTag,{value:`Module`}),n},__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e));let c=__toESM(e,1);e=__toESM(e);let l=__toESM(t,1);t=__toESM(t);function hasWindow(){return typeof window<`u`}function getNodeName(e){return isNode(e)?(e.nodeName||``).toLowerCase():`#document`}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){return((isNode(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function isNode(e){return hasWindow()?e instanceof Node||e instanceof getWindow(e).Node:!1}function isElement(e){return hasWindow()?e instanceof Element||e instanceof getWindow(e).Element:!1}function isHTMLElement(e){return hasWindow()?e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement:!1}function isShadowRoot(e){return!hasWindow()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}function isOverflowElement(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function isTableElement(e){return/^(table|td|th)$/.test(getNodeName(e))}function isTopLayer(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}function isContainingBlock(e){let t=isElement(e)?getComputedStyle$1(e):e;return isNotNone(t.transform)||isNotNone(t.translate)||isNotNone(t.scale)||isNotNone(t.rotate)||isNotNone(t.perspective)||!isWebKit()&&(isNotNone(t.backdropFilter)||isNotNone(t.filter))||u.test(t.willChange||``)||d.test(t.contain||``)}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return f??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),f}function isLastTraversableNode(e){return/^(html|body|#document)$/.test(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if(getNodeName(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){let t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=getNearestOverflowAncestor(e),i=r===e.ownerDocument?.body,a=getWindow(r);if(i){let e=getFrameElement(a);return t.concat(a,a.visualViewport||[],isOverflowElement(r)?r:[],e&&n?getOverflowAncestors(e):[])}else return t.concat(r,getOverflowAncestors(r,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var u,d,isNotNone,f,p=__esmMin((()=>{u=/transform|translate|scale|rotate|perspective|filter/,d=/paint|layout|strict|content/,isNotNone=e=>!!e&&e!==`none`,__name(getComputedStyle$1,`getComputedStyle`)}));function clamp(e,t,n){return v(e,_(t,n))}function evaluate(e,t){return typeof e==`function`?e(t):e}function getSide(e){return e.split(`-`)[0]}function getAlignment(e){return e.split(`-`)[1]}function getOppositeAxis(e){return e===`x`?`y`:`x`}function getAxisLength(e){return e===`y`?`height`:`width`}function getSideAxis(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){n===void 0&&(n=!1);let r=getAlignment(e),i=getAlignmentAxis(e),a=getAxisLength(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=getOppositePlacement(o)),[o,getOppositePlacement(o)]}function getExpandedPlacements(e){let t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}function getSideList(e,t,n){switch(e){case`top`:case`bottom`:return n?t?C:S:t?S:C;case`left`:case`right`:return t?w:T;default:return[]}}function getOppositeAxisPlacements(e,t,n,r){let i=getAlignment(e),a=getSideList(getSide(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(getOppositeAlignmentPlacement)))),a}function getOppositePlacement(e){let t=getSide(e);return x[t]+e.slice(t.length)}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:expandPaddingObject(e)}function rectToClientRect(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var m,h,g,_,v,y,b,createCoords,x,S,C,w,T,E=__esmMin((()=>{m=[`top`,`right`,`bottom`,`left`],h=[`start`,`end`],g=m.reduce((e,t)=>e.concat(t,t+`-`+h[0],t+`-`+h[1]),[]),_=Math.min,v=Math.max,y=Math.round,b=Math.floor,createCoords=e=>({x:e,y:e}),x={left:`right`,right:`left`,bottom:`top`,top:`bottom`},S=[`left`,`right`],C=[`right`,`left`],w=[`top`,`bottom`],T=[`bottom`,`top`]})),D,O,k,A,j,M,N,P,F,ee,I,te,L,R,z,ne,re,ie,ae,oe,se,ce,le,ue,de,fe,pe,B,V,me,he,ge=__esmMin((()=>{D=[`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] *)`],O=D.join(`,`),k=typeof Element>`u`,A=k?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,j=!k&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},M=function isInert(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):M(e.parentNode))},N=function isContentEditable(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},P=function getCandidates(e,t,n){if(M(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(O));return t&&A.call(e,O)&&r.unshift(e),r=r.filter(n),r},F=function getCandidatesIteratively(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!M(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=F(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{A.call(a,O)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!M(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=F(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},ee=function hasTabIndex(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},I=function getTabIndex(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||N(e))&&!ee(e)?0:e.tabIndex},te=function getSortOrderTabIndex(e,t){var n=I(e);return n<0&&t&&!ee(e)?0:n},L=function sortOrderedTabbables(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},R=function isInput(e){return e.tagName===`INPUT`},z=function isHiddenInput(e){return R(e)&&e.type===`hidden`},ne=function isDetailsWithSummary(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},re=function getCheckedRadio(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},ie=function isTabbableRadio(e){if(!e.name)return!0;var t=e.form||j(e),n=function queryRadios(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(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 i=re(r,e.form);return!i||i===e},ae=function isRadio(e){return R(e)&&e.type===`radio`},oe=function isNonTabbableRadio(e){return ae(e)&&!ie(e)},se=function isNodeAttached(e){var t=e&&j(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=j(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},ce=function isZeroArea(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},le=function isHidden(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=A.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(A.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=j(e);if(o&&!o.shadowRoot&&r(o)===!0)return ce(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(se(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return ce(e);return!1},ue=function isDisabledFromFieldset(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return A.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},de=function isNodeMatchingSelectorFocusable(e,t){return!(t.disabled||z(t)||le(t,e)||ne(t)||ue(t))},fe=function isNodeMatchingSelectorTabbable(e,t){return!(oe(t)||I(t)<0||!de(e,t))},pe=function isShadowRootTabbable(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},B=function sortByOrder(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=te(a,i),s=i?B(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(L).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},V=function tabbable(e,t){t||={};var n=t.getShadowRoot?F([e],t.includeContainer,{filter:fe.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:pe}):P(e,t.includeContainer,fe.bind(null,t));return B(n)},me=function focusable(e,t){return t||={},t.getShadowRoot?F([e],t.includeContainer,{filter:de.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):P(e,t.includeContainer,de.bind(null,t))},he=function isTabbable(e,t){if(t||={},!e)throw Error(`No node provided`);return A.call(e,O)!==!1&&fe(t,e)}}));function getPlatform(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function getUserAgent(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function isSafari(){return/apple/i.test(navigator.vendor)}function isAndroid(){let e=/android/i;return e.test(getPlatform())||e.test(getUserAgent())}function isMac(){return getPlatform().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function isJSDOM(){return getUserAgent().includes(`jsdom/`)}function activeElement(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function contains$1(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&isShadowRoot(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function getTarget$1(e){return`composedPath`in e?e.composedPath()[0]:e.target}function isEventTargetWithin(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function isRootElement(e){return e.matches(`html,body`)}function getDocument$1(e){return e?.ownerDocument||document}function isTypeableElement(e){return isHTMLElement(e)&&e.matches(ve)}function isTypeableCombobox(e){return e?e.getAttribute(`role`)===`combobox`&&isTypeableElement(e):!1}function matchesFocusVisible(e){if(!e||isJSDOM())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function getFloatingFocusElement(e){return e?e.hasAttribute(_e)?e:e.querySelector(`[data-floating-ui-focusable]`)||e:null}function getNodeChildren$1(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...getNodeChildren$1(e,t.id,n)])}function getDeepestNode(e,t){let n,r=-1;function findDeepest(t,i){i>r&&(n=t,r=i),getNodeChildren$1(e,t).forEach(e=>{findDeepest(e.id,i+1)})}return findDeepest(t,0),e.find(e=>e.id===n)}function getNodeAncestors(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function stopEvent(e){e.preventDefault(),e.stopPropagation()}function isReactEvent(e){return`nativeEvent`in e}function isVirtualClick(e){return e.mozInputSource===0&&e.isTrusted?!0:isAndroid()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function isVirtualPointerEvent(e){return isJSDOM()?!1:!isAndroid()&&e.width===0&&e.height===0||isAndroid()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function isMouseLikePointerType(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function useLatestRef$1(e){let t=c.useRef(e);return U(()=>{t.current=e}),t}function useEffectEvent(e){let t=c.useRef(()=>{});return Ce(()=>{t.current=e}),c.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}function isDifferentGridRow(e,t,n){return Math.floor(e/t)!==n}function isIndexOutOfListBounds(e,t){return t<0||t>=e.current.length}function getMinListIndex(e,t){return findNonDisabledListIndex(e,{disabledIndices:t})}function getMaxListIndex(e,t){return findNonDisabledListIndex(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function findNonDisabledListIndex(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:a=1}=t===void 0?{}:t,o=n;do o+=r?-a:a;while(o>=0&&o<=e.current.length-1&&isListIndexDisabled(e,o,i));return o}function getGridNavigatedIndex(e,t){let{event:n,orientation:r,loop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===be){if(d&&stopEvent(n),u===-1)f=l;else if(f=findNonDisabledListIndex(e,{startingIndex:f,amount:o,decrement:!0,disabledIndices:s}),i&&(u-o<c||f<0)){let e=u%o,t=l%o,n=l-(t-e);f=t===e?l:t>e?n:n-o}isIndexOutOfListBounds(e,f)&&(f=u)}if(n.key===xe&&(d&&stopEvent(n),u===-1?f=c:(f=findNonDisabledListIndex(e,{startingIndex:u,amount:o,disabledIndices:s}),i&&u+o>l&&(f=findNonDisabledListIndex(e,{startingIndex:u%o-o,amount:o,disabledIndices:s}))),isIndexOutOfListBounds(e,f)&&(f=u)),r===`both`){let t=b(u/o);n.key===(a?H:ye)&&(d&&stopEvent(n),u%o===o-1?i&&(f=findNonDisabledListIndex(e,{startingIndex:u-u%o-1,disabledIndices:s})):(f=findNonDisabledListIndex(e,{startingIndex:u,disabledIndices:s}),i&&isDifferentGridRow(f,o,t)&&(f=findNonDisabledListIndex(e,{startingIndex:u-u%o-1,disabledIndices:s}))),isDifferentGridRow(f,o,t)&&(f=u)),n.key===(a?ye:H)&&(d&&stopEvent(n),u%o===0?i&&(f=findNonDisabledListIndex(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s})):(f=findNonDisabledListIndex(e,{startingIndex:u,decrement:!0,disabledIndices:s}),i&&isDifferentGridRow(f,o,t)&&(f=findNonDisabledListIndex(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}))),isDifferentGridRow(f,o,t)&&(f=u));let r=b(l/o)===t;isIndexOutOfListBounds(e,f)&&(f=i&&r?n.key===(a?ye:H)?l:findNonDisabledListIndex(e,{startingIndex:u-u%o-1,disabledIndices:s}):u)}return f}function createGridCellMap(e,t,n){let r=[],i=0;return e.forEach((e,a)=>{let{width:o,height:s}=e,c=!1;for(n&&(i=0);!c;){let e=[];for(let n=0;n<o;n++)for(let r=0;r<s;r++)e.push(i+n+r*t);i%t+o<=t&&e.every(e=>r[e]==null)?(e.forEach(e=>{r[e]=a}),c=!0):i++}}),[...r]}function getGridCellIndexOfCorner(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e)}}function getGridCellIndices(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function isListIndexDisabled(e,t,n){if(typeof n==`function`)return n(t);if(n)return n.includes(t);let r=e.current[t];return r==null||r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`}function getTabbableIn(e,t){let n=V(e,getTabbableOptions()),r=n.length;if(r===0)return;let i=activeElement(getDocument$1(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function getNextTabbable(e){return getTabbableIn(getDocument$1(e).body,1)||e}function getPreviousTabbable(e){return getTabbableIn(getDocument$1(e).body,-1)||e}function isOutsideEvent(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!contains$1(n,r)}function disableFocusInside(e){V(e,getTabbableOptions()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function enableFocusInside(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var _e,ve,H,ye,be,xe,U,Se,Ce,getTabbableOptions,we=__esmMin((()=>{p(),E(),ge(),_e=`data-floating-ui-focusable`,ve=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,H=`ArrowLeft`,ye=`ArrowRight`,be=`ArrowUp`,xe=`ArrowDown`,__name(contains$1,`contains`),__name(getTarget$1,`getTarget`),__name(getDocument$1,`getDocument`),__name(getNodeChildren$1,`getNodeChildren`),U=typeof document<`u`?c.useLayoutEffect:function noop(){},Se={...c},__name(useLatestRef$1,`useLatestRef`),Ce=Se.useInsertionEffect||(e=>e()),getTabbableOptions=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`})})),Te=__commonJSMin((e=>{var t=globalThis.React,n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function q(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=q,e.jsxs=q})),Ee=__commonJSMin(((e,t)=>{t.exports=Te()}));function computeCoordsFromPlacement(e,t,n){let{reference:r,floating:i}=e,a=getSideAxis(t),o=getAlignmentAxis(t),s=getAxisLength(o),c=getSide(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.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-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(getAlignment(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function detectOverflow$1(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=evaluate(t,e),p=getPaddingObject(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=rectToClientRect(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=rectToClientRect(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}function getPlacementList(e,t,n){return(e?[...n.filter(t=>getAlignment(t)===e),...n.filter(t=>getAlignment(t)!==e)]:n.filter(e=>getSide(e)===e)).filter(n=>!e||getAlignment(n)===e||(t?getOppositeAlignmentPlacement(n)!==n:!1))}function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return m.some(t=>e[t]>=0)}function getBoundingRect(e){let t=_(...e.map(e=>e.left)),n=_(...e.map(e=>e.top)),r=v(...e.map(e=>e.right)),i=v(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function getRectsByLine(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>rectToClientRect(getBoundingRect(e)))}async function convertValueToCoords(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=getSide(n),s=getAlignment(n),c=getSideAxis(n)===`y`,l=je.has(o)?-1:1,u=a&&c?-1:1,d=evaluate(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var W,De,G,Oe,K,ke,Ae,je,Me,Ne,Pe,Fe,Ie=__esmMin((()=>{E(),__name(detectOverflow$1,`detectOverflow`),W=50,De=__name(async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:detectOverflow$1},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=computeCoordsFromPlacement(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<W&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=computeCoordsFromPlacement(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},`computePosition`),G=__name(e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=evaluate(e,t)||{};if(l==null)return{};let d=getPaddingObject(u),f={x:n,y:r},p=getAlignmentAxis(i),m=getAxisLength(p),h=await o.getDimensions(l),g=p===`y`,v=g?`top`:`left`,y=g?`bottom`:`right`,b=g?`clientHeight`:`clientWidth`,x=a.reference[m]+a.reference[p]-f[p]-a.floating[m],S=f[p]-a.reference[p],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),w=C?C[b]:0;(!w||!await(o.isElement==null?void 0:o.isElement(C)))&&(w=s.floating[b]||a.floating[m]);let T=x/2-S/2,E=w/2-h[m]/2-1,D=_(d[v],E),O=_(d[y],E),k=D,A=w-h[m]-O,j=w/2-h[m]/2+T,M=clamp(k,j,A),N=!c.arrow&&getAlignment(i)!=null&&j!==M&&a.reference[m]/2-(j<k?D:O)-h[m]/2<0,P=N?j<k?j-k:j-A:0;return{[p]:f[p]+P,data:{[p]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),`arrow`),Oe=__name(function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=g,autoAlignment:u=!0,...d}=evaluate(e,t),f=c!==void 0||l===g?getPlacementList(c||null,u,l):l,p=await a.detectOverflow(t,d),m=r.autoPlacement?.index||0,h=f[m];if(h==null)return{};let _=getAlignmentSides(h,n,await(a.isRTL==null?void 0:a.isRTL(o.floating)));if(i!==h)return{reset:{placement:f[0]}};let v=[p[getSide(h)],p[_[0]],p[_[1]]],y=[...r.autoPlacement?.overflows||[],{placement:h,overflows:v}],b=f[m+1];if(b)return{data:{index:m+1,overflows:y},reset:{placement:b}};let x=y.map(e=>{let t=getAlignment(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),S=x.filter(e=>e[2].slice(0,getAlignment(e[0])?2:3).every(e=>e<=0))[0]?.[0]||x[0][0];return S===i?{}:{data:{index:m+1,overflows:y},reset:{placement:S}}}}},`autoPlacement`),K=__name(function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=evaluate(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=getSide(r),_=getSideAxis(o),v=getSide(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[getOppositePlacement(o)]:getExpandedPlacements(o)),x=p!==`none`;!d&&x&&b.push(...getOppositeAxisPlacements(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=getAlignmentSides(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===getSideAxis(t)||T.every(e=>getSideAxis(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=getSideAxis(e.placement);return t===_||t===`y`}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]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}},`flip`),ke=__name(function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=evaluate(e,t);switch(i){case`referenceHidden`:{let e=getSideOffsets(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:isAnySideFullyClipped(e)}}}case`escaped`:{let e=getSideOffsets(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:isAnySideFullyClipped(e)}}}default:return{}}}}},`hide`),Ae=__name(function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=evaluate(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=getRectsByLine(u),f=rectToClientRect(getBoundingRect(u)),p=getPaddingObject(s);function getBoundingClientRect(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(getSideAxis(n)===`y`){let e=d[0],t=d[d.length-1],r=getSide(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=getSide(n)===`left`,t=v(...d.map(e=>e.right)),r=_(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let m=await a.getElementRects({reference:{getBoundingClientRect},floating:r.floating,strategy:o});return i.reference.x!==m.reference.x||i.reference.y!==m.reference.y||i.reference.width!==m.reference.width||i.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},`inline`),je=new Set([`left`,`top`]),Me=__name(function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await convertValueToCoords(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},`offset`),Ne=__name(function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=evaluate(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=getSideAxis(getSide(i)),p=getOppositeAxis(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=clamp(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=clamp(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},`shift`),Pe=__name(function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=evaluate(e,t),u={x:n,y:r},d=getSideAxis(i),f=getOppositeAxis(d),p=u[f],m=u[d],h=evaluate(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=je.has(getSide(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},`limitShift`),Fe=__name(function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply=()=>{},...c}=evaluate(e,t),l=await o.detectOverflow(t,c),u=getSide(i),d=getAlignment(i),f=getSideAxis(i)===`y`,{width:p,height:m}=a.floating,h,g;u===`top`||u===`bottom`?(h=u,g=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(g=u,h=d===`end`?`top`:`bottom`);let y=m-l.top-l.bottom,b=p-l.left-l.right,x=_(m-l[h],y),S=_(p-l[g],b),C=!t.middlewareData.shift,w=x,T=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=y),C&&!d){let e=v(l.left,0),t=v(l.right,0),n=v(l.top,0),r=v(l.bottom,0);f?T=p-2*(e!==0||t!==0?e+t:v(l.left,l.right)):w=m-2*(n!==0||r!==0?n+r:v(l.top,l.bottom))}await apply({...t,availableWidth:T,availableHeight:w});let E=await o.getDimensions(s.floating);return p!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},`size`)}));function getCssDimensions(e){let t=getComputedStyle$1(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=isHTMLElement(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=y(n)!==a||y(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){let t=unwrapElement(e);if(!isHTMLElement(t))return createCoords(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=getCssDimensions(t),o=(a?y(n.width):n.width)/r,s=(a?y(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}function getVisualOffsets(e){let t=getWindow(e);return!isWebKit()||!t.visualViewport?Le:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==getWindow(e)?!1:t}function getBoundingClientRect(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=unwrapElement(e),o=createCoords(1);t&&(r?isElement(r)&&(o=getScale(r)):o=getScale(e));let s=shouldAddVisualOffsets(a,n,r)?getVisualOffsets(a):createCoords(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=getWindow(a),t=r&&isElement(r)?getWindow(r):r,n=e,i=getFrameElement(n);for(;i&&r&&t!==n;){let e=getScale(i),t=i.getBoundingClientRect(),r=getComputedStyle$1(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=getWindow(i),i=getFrameElement(n)}}return rectToClientRect({width:u,height:d,x:c,y:l})}function getWindowScrollBarX(e,t){let n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getHTMLOffset(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-getWindowScrollBarX(e,n),y:n.top+t.scrollTop}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=getDocumentElement(r),s=t?isTopLayer(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=createCoords(1),u=createCoords(0),d=isHTMLElement(r);if((d||!d&&!a)&&((getNodeName(r)!==`body`||isOverflowElement(o))&&(c=getNodeScroll(r)),d)){let e=getBoundingClientRect(r);l=getScale(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?getHTMLOffset(o,c):createCoords(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){let t=getDocumentElement(e),n=getNodeScroll(e),r=e.ownerDocument.body,i=v(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=v(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+getWindowScrollBarX(e),s=-n.scrollTop;return getComputedStyle$1(r).direction===`rtl`&&(o+=v(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function getViewportRect(e,t){let n=getWindow(e),r=getDocumentElement(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=isWebKit();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=getWindowScrollBarX(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Re&&(a-=o)}else l<=Re&&(a+=l);return{width:a,height:o,x:s,y:c}}function getInnerBoundingClientRect(e,t){let n=getBoundingClientRect(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=isHTMLElement(e)?getScale(e):createCoords(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function getClientRectFromClippingAncestor(e,t,n){let r;if(t===`viewport`)r=getViewportRect(e,n);else if(t===`document`)r=getDocumentRect(getDocumentElement(e));else if(isElement(t))r=getInnerBoundingClientRect(t,n);else{let n=getVisualOffsets(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rectToClientRect(r)}function hasFixedPositionAncestor(e,t){let n=getParentNode(e);return n===t||!isElement(n)||isLastTraversableNode(n)?!1:getComputedStyle$1(n).position===`fixed`||hasFixedPositionAncestor(n,t)}function getClippingElementAncestors(e,t){let n=t.get(e);if(n)return n;let r=getOverflowAncestors(e,[],!1).filter(e=>isElement(e)&&getNodeName(e)!==`body`),i=null,a=getComputedStyle$1(e).position===`fixed`,o=a?getParentNode(e):e;for(;isElement(o)&&!isLastTraversableNode(o);){let t=getComputedStyle$1(o),n=isContainingBlock(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||isOverflowElement(o)&&!n&&hasFixedPositionAncestor(e,o))?r=r.filter(e=>e!==o):i=t,o=getParentNode(o)}return t.set(e,r),r}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),r],o=getClientRectFromClippingAncestor(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=getClientRectFromClippingAncestor(t,a[e],i);s=v(n.top,s),c=_(n.right,c),l=_(n.bottom,l),u=v(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function getDimensions(e){let{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){let r=isHTMLElement(t),i=getDocumentElement(t),a=n===`fixed`,o=getBoundingClientRect(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=createCoords(0);function setLeftRTLScrollbarOffset(){c.x=getWindowScrollBarX(i)}if(r||!r&&!a)if((getNodeName(t)!==`body`||isOverflowElement(i))&&(s=getNodeScroll(t)),r){let e=getBoundingClientRect(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&setLeftRTLScrollbarOffset();a&&!r&&i&&setLeftRTLScrollbarOffset();let l=i&&!r&&!a?getHTMLOffset(i,s):createCoords(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function isStaticPositioned(e){return getComputedStyle$1(e).position===`static`}function getTrueOffsetParent(e,t){if(!isHTMLElement(e)||getComputedStyle$1(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){let n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement(e)){let t=getParentNode(e);for(;t&&!isLastTraversableNode(t);){if(isElement(t)&&!isStaticPositioned(t))return t;t=getParentNode(t)}return n}let r=getTrueOffsetParent(e,t);for(;r&&isTableElement(r)&&isStaticPositioned(r);)r=getTrueOffsetParent(r,t);return r&&isLastTraversableNode(r)&&isStaticPositioned(r)&&!isContainingBlock(r)?n:r||getContainingBlock(e)||n}function isRTL(e){return getComputedStyle$1(e).direction===`rtl`}function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let n=null,r,i=getDocumentElement(e);function cleanup(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function refresh(a,o){a===void 0&&(a=!1),o===void 0&&(o=1),cleanup();let s=e.getBoundingClientRect(),{left:c,top:l,width:u,height:d}=s;if(a||t(),!u||!d)return;let f=b(l),p=b(i.clientWidth-(c+u)),m=b(i.clientHeight-(l+d)),h=b(c),g={rootMargin:-f+`px `+-p+`px `+-m+`px `+-h+`px`,threshold:v(0,_(1,o))||1},y=!0;function handleObserve(t){let n=t[0].intersectionRatio;if(n!==o){if(!y)return refresh();n?refresh(!1,n):r=setTimeout(()=>{refresh(!1,1e-7)},1e3)}n===1&&!rectsAreEqual(s,e.getBoundingClientRect())&&refresh(),y=!1}try{n=new IntersectionObserver(handleObserve,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(handleObserve,g)}n.observe(e)}return refresh(!0),cleanup}function autoUpdate(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=unwrapElement(e),u=i||a?[...l?getOverflowAncestors(l):[],...t?getOverflowAncestors(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?observeMove(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?getBoundingClientRect(e):null;c&&frameLoop();function frameLoop(){let t=getBoundingClientRect(e);h&&!rectsAreEqual(h,t)&&n(),h=t,m=requestAnimationFrame(frameLoop)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Le,Re,getElementRects,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,computePosition,Xe=__esmMin((()=>{Ie(),E(),p(),Le=createCoords(0),Re=25,getElementRects=async function(e){let t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,r=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ze={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL},Be=detectOverflow$1,Ve=Me,He=Oe,Ue=Ne,We=K,Ge=Fe,Ke=ke,qe=G,Je=Ae,Ye=Pe,computePosition=(e,t,n)=>{let r=new Map,i={platform:ze,...n},a={...i.platform,_c:r};return De(e,t,{...i,platform:a})}}));function deepEqual(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!deepEqual(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!deepEqual(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function getDPR(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e,t){let n=getDPR(e);return Math.round(t*n)/n}function useLatestRef(e){let t=c.useRef(e);return Ze(()=>{t.current=e}),t}function useFloating$1(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:u,open:d}=e,[f,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=c.useState(r);deepEqual(m,r)||h(r);let[g,_]=c.useState(null),[v,y]=c.useState(null),b=c.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=c.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=o||v,w=c.useRef(null),T=c.useRef(null),E=c.useRef(f),D=u!=null,O=useLatestRef(u),k=useLatestRef(i),A=useLatestRef(d),j=c.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};k.current&&(e.platform=k.current),computePosition(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!deepEqual(E.current,t)&&(E.current=t,l.flushSync(()=>{p(t)}))})},[m,t,n,k,A]);Ze(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let M=c.useRef(!1);Ze(()=>(M.current=!0,()=>{M.current=!1}),[]),Ze(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=c.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=c.useMemo(()=>({reference:S,floating:C}),[S,C]),F=c.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=roundByDPR(P.floating,f.x),r=roundByDPR(P.floating,f.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...getDPR(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:j,refs:N,elements:P,floatingStyles:F}),[f,j,N,P,F])}var Ze,arrow$1,offset,shift,limitShift,flip,size,autoPlacement,hide,inline,arrow,Qe=__esmMin((()=>{Xe(),Ze=typeof document<`u`?c.useLayoutEffect:function noop(){},__name(useFloating$1,`useFloating`),arrow$1=e=>{function isRef(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(t){let{element:n,padding:r}=typeof e==`function`?e(t):e;return n&&isRef(n)?n.current==null?{}:qe({element:n.current,padding:r}).fn(t):n?qe({element:n,padding:r}).fn(t):{}}}},offset=(e,t)=>{let n=Ve(e);return{name:n.name,fn:n.fn,options:[e,t]}},shift=(e,t)=>{let n=Ue(e);return{name:n.name,fn:n.fn,options:[e,t]}},limitShift=(e,t)=>({fn:Ye(e).fn,options:[e,t]}),flip=(e,t)=>{let n=We(e);return{name:n.name,fn:n.fn,options:[e,t]}},size=(e,t)=>{let n=Ge(e);return{name:n.name,fn:n.fn,options:[e,t]}},autoPlacement=(e,t)=>{let n=He(e);return{name:n.name,fn:n.fn,options:[e,t]}},hide=(e,t)=>{let n=Ke(e);return{name:n.name,fn:n.fn,options:[e,t]}},inline=(e,t)=>{let n=Je(e);return{name:n.name,fn:n.fn,options:[e,t]}},arrow=(e,t)=>{let n=arrow$1(e);return{name:n.name,fn:n.fn,options:[e,t]}}})),$e=__exportAll({Composite:()=>Z,CompositeItem:()=>Q,FloatingArrow:()=>mt,FloatingDelayGroup:()=>FloatingDelayGroup,FloatingFocusManager:()=>FloatingFocusManager,FloatingList:()=>FloatingList,FloatingNode:()=>FloatingNode,FloatingOverlay:()=>Ft,FloatingPortal:()=>FloatingPortal,FloatingTree:()=>FloatingTree,NextFloatingDelayGroup:()=>NextFloatingDelayGroup,arrow:()=>arrow,autoPlacement:()=>autoPlacement,autoUpdate:()=>autoUpdate,computePosition:()=>computePosition,detectOverflow:()=>Be,flip:()=>flip,getOverflowAncestors:()=>getOverflowAncestors,hide:()=>hide,inline:()=>inline,inner:()=>inner,limitShift:()=>limitShift,offset:()=>offset,platform:()=>ze,safePolygon:()=>safePolygon,shift:()=>shift,size:()=>size,useClick:()=>useClick,useClientPoint:()=>useClientPoint,useDelayGroup:()=>useDelayGroup,useDelayGroupContext:()=>useDelayGroupContext,useDismiss:()=>useDismiss,useFloating:()=>useFloating,useFloatingNodeId:()=>useFloatingNodeId,useFloatingParentNodeId:()=>useFloatingParentNodeId,useFloatingPortalNode:()=>useFloatingPortalNode,useFloatingRootContext:()=>useFloatingRootContext,useFloatingTree:()=>useFloatingTree,useFocus:()=>useFocus,useHover:()=>useHover,useId:()=>pt,useInnerOffset:()=>useInnerOffset,useInteractions:()=>useInteractions,useListItem:()=>useListItem,useListNavigation:()=>useListNavigation,useMergeRefs:()=>useMergeRefs,useNextDelayGroup:()=>useNextDelayGroup,useRole:()=>useRole,useTransitionStatus:()=>useTransitionStatus,useTransitionStyles:()=>useTransitionStyles,useTypeahead:()=>useTypeahead});function useMergeRefs(t){let n=e.useRef(void 0),r=e.useCallback(e=>{let n=t.map(t=>{if(t!=null){if(typeof t==`function`){let n=t,r=n(e);return typeof r==`function`?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>e==null)?null:e=>{n.current&&=(n.current(),void 0),e!=null&&(n.current=r(e))},t)}function sortByDocumentPosition(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function FloatingList(t){let{children:n,elementsRef:r,labelsRef:i}=t,[a,o]=e.useState(()=>new Set),s=e.useCallback(e=>{o(t=>new Set(t).add(e))},[]),c=e.useCallback(e=>{o(t=>{let n=new Set(t);return n.delete(e),n})},[]),l=e.useMemo(()=>{let e=new Map;return Array.from(a.keys()).sort(sortByDocumentPosition).forEach((t,n)=>{e.set(t,n)}),e},[a]);return(0,J.jsx)(et.Provider,{value:e.useMemo(()=>({register:s,unregister:c,map:l,elementsRef:r,labelsRef:i}),[s,c,l,r,i]),children:n})}function useListItem(t){t===void 0&&(t={});let{label:n}=t,{register:r,unregister:i,map:a,elementsRef:o,labelsRef:s}=e.useContext(et),[c,l]=e.useState(null),u=e.useRef(null),d=e.useCallback(e=>{if(u.current=e,c!==null&&(o.current[c]=e,s)){let t=n!==void 0;s.current[c]=t?n:e?.textContent??null}},[c,o,s,n]);return U(()=>{let e=u.current;if(e)return r(e),()=>{i(e)}},[r,i]),U(()=>{let e=u.current?a.get(u.current):null;e!=null&&l(e)},[a]),e.useMemo(()=>({ref:d,index:c??-1}),[c,d])}function renderJsx(t,n){return typeof t==`function`?t(n):t?e.cloneElement(t,n):(0,J.jsx)(`div`,{...n})}function useFloatingId(){let[t,n]=e.useState(()=>dt?genId():void 0);return U(()=>{t??n(genId())},[]),e.useEffect(()=>{dt=!0},[]),t}function createEventEmitter(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||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;(r=e.get(t))==null||r.delete(n)}}}function useFloatingNodeId(e){let t=pt(),n=useFloatingTree(),r=useFloatingParentNodeId(),i=e||r;return U(()=>{if(!t)return;let e={id:t,parentId:i};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,i]),t}function FloatingNode(t){let{children:n,id:r}=t,i=useFloatingParentNodeId();return(0,J.jsx)(ht.Provider,{value:e.useMemo(()=>({id:r,parentId:i}),[r,i]),children:n})}function FloatingTree(t){let{children:n}=t,r=e.useRef([]),i=e.useCallback(e=>{r.current=[...r.current,e]},[]),a=e.useCallback(e=>{r.current=r.current.filter(t=>t!==e)},[]),[o]=e.useState(()=>createEventEmitter());return(0,J.jsx)(gt.Provider,{value:e.useMemo(()=>({nodesRef:r,addNode:i,removeNode:a,events:o}),[i,a,o]),children:n})}function createAttribute(e){return`data-floating-ui-`+e}function clearTimeoutIfSet(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function getDelay(e,t,n){if(n&&!isMouseLikePointerType(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function getRestMs(e){return typeof e==`function`?e():e}function useHover(t,n){n===void 0&&(n={});let{open:r,onOpenChange:i,dataRef:a,events:o,elements:s}=t,{enabled:c=!0,delay:l=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:p=!0}=n,m=useFloatingTree(),h=useFloatingParentNodeId(),g=useLatestRef$1(u),_=useLatestRef$1(l),v=useLatestRef$1(r),y=useLatestRef$1(f),b=e.useRef(),x=e.useRef(-1),S=e.useRef(),C=e.useRef(-1),w=e.useRef(!0),T=e.useRef(!1),E=e.useRef(()=>{}),D=e.useRef(!1),O=useEffectEvent(()=>{let e=a.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});e.useEffect(()=>{if(!c)return;function onOpenChange(e){let{open:t}=e;t||(clearTimeoutIfSet(x),clearTimeoutIfSet(C),w.current=!0,D.current=!1)}return o.on(`openchange`,onOpenChange),()=>{o.off(`openchange`,onOpenChange)}},[c,o]),e.useEffect(()=>{if(!c||!g.current||!r)return;function onLeave(e){O()&&i(!1,e,`hover`)}let e=getDocument$1(s.floating).documentElement;return e.addEventListener(`mouseleave`,onLeave),()=>{e.removeEventListener(`mouseleave`,onLeave)}},[s.floating,r,i,c,g,O]);let k=e.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let r=getDelay(_.current,`close`,b.current);r&&!S.current?(clearTimeoutIfSet(x),x.current=window.setTimeout(()=>i(!1,e,n),r)):t&&(clearTimeoutIfSet(x),i(!1,e,n))},[_,i]),A=useEffectEvent(()=>{E.current(),S.current=void 0}),j=useEffectEvent(()=>{if(T.current){let e=getDocument$1(s.floating).body;e.style.pointerEvents=``,e.removeAttribute(_t),T.current=!1}}),M=useEffectEvent(()=>a.current.openEvent?[`click`,`mousedown`].includes(a.current.openEvent.type):!1);e.useEffect(()=>{if(!c)return;function onReferenceMouseEnter(e){if(clearTimeoutIfSet(x),w.current=!1,d&&!isMouseLikePointerType(b.current)||getRestMs(y.current)>0&&!getDelay(_.current,`open`))return;let t=getDelay(_.current,`open`,b.current);t?x.current=window.setTimeout(()=>{v.current||i(!0,e,`hover`)},t):r||i(!0,e,`hover`)}function onReferenceMouseLeave(e){if(M()){j();return}E.current();let t=getDocument$1(s.floating);if(clearTimeoutIfSet(C),D.current=!1,g.current&&a.current.floatingContext){r||clearTimeoutIfSet(x),S.current=g.current({...a.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e,!0,`safe-polygon`)}});let n=S.current;t.addEventListener(`mousemove`,n),E.current=()=>{t.removeEventListener(`mousemove`,n)};return}(b.current!==`touch`||!contains$1(s.floating,e.relatedTarget))&&k(e)}function onScrollMouseLeave(e){M()||a.current.floatingContext&&(g.current==null||g.current({...a.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e)}})(e))}function onFloatingMouseEnter(){clearTimeoutIfSet(x)}function onFloatingMouseLeave(e){M()||k(e,!1)}if(isElement(s.domReference)){let e=s.domReference,t=s.floating;return r&&e.addEventListener(`mouseleave`,onScrollMouseLeave),p&&e.addEventListener(`mousemove`,onReferenceMouseEnter,{once:!0}),e.addEventListener(`mouseenter`,onReferenceMouseEnter),e.addEventListener(`mouseleave`,onReferenceMouseLeave),t&&(t.addEventListener(`mouseleave`,onScrollMouseLeave),t.addEventListener(`mouseenter`,onFloatingMouseEnter),t.addEventListener(`mouseleave`,onFloatingMouseLeave)),()=>{r&&e.removeEventListener(`mouseleave`,onScrollMouseLeave),p&&e.removeEventListener(`mousemove`,onReferenceMouseEnter),e.removeEventListener(`mouseenter`,onReferenceMouseEnter),e.removeEventListener(`mouseleave`,onReferenceMouseLeave),t&&(t.removeEventListener(`mouseleave`,onScrollMouseLeave),t.removeEventListener(`mouseenter`,onFloatingMouseEnter),t.removeEventListener(`mouseleave`,onFloatingMouseLeave))}}},[s,c,t,d,p,k,A,j,i,r,v,m,_,g,a,M,y]),U(()=>{var e;if(c&&r&&(e=g.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&O()){T.current=!0;let e=s.floating;if(isElement(s.domReference)&&e){var t;let n=getDocument$1(s.floating).body;n.setAttribute(_t,``);let r=s.domReference,i=m==null||(t=m.nodesRef.current.find(e=>e.id===h))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[c,r,h,s,m,g,O]),U(()=>{r||(b.current=void 0,D.current=!1,A(),j())},[r,A,j]),e.useEffect(()=>()=>{A(),clearTimeoutIfSet(x),clearTimeoutIfSet(C),j()},[c,s.domReference,A,j]);let N=e.useMemo(()=>{function setPointerRef(e){b.current=e.pointerType}return{onPointerDown:setPointerRef,onPointerEnter:setPointerRef,onMouseMove(e){let{nativeEvent:t}=e;function handleMouseMove(){!w.current&&!v.current&&i(!0,t,`hover`)}d&&!isMouseLikePointerType(b.current)||r||getRestMs(y.current)===0||D.current&&e.movementX**2+e.movementY**2<2||(clearTimeoutIfSet(C),b.current===`touch`?handleMouseMove():(D.current=!0,C.current=window.setTimeout(handleMouseMove,getRestMs(y.current))))}}},[d,i,r,v,y]);return e.useMemo(()=>c?{reference:N}:{},[c,N])}function FloatingDelayGroup(t){let{children:n,delay:r,timeoutMs:i=0}=t,[a,o]=e.useReducer((e,t)=>({...e,...t}),{delay:r,timeoutMs:i,initialDelay:r,currentId:null,isInstantPhase:!1}),s=e.useRef(null),c=e.useCallback(e=>{o({currentId:e})},[]);return U(()=>{a.currentId?s.current===null?s.current=a.currentId:a.isInstantPhase||o({isInstantPhase:!0}):(a.isInstantPhase&&o({isInstantPhase:!1}),s.current=null)},[a.currentId,a.isInstantPhase]),(0,J.jsx)(vt.Provider,{value:e.useMemo(()=>({...a,setState:o,setCurrentId:c}),[a,c]),children:n})}function useDelayGroup(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=useDelayGroupContext(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return U(()=>{o&&l&&(f({delay:{open:1,close:getDelay(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),U(()=>{function unset(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let e=window.setTimeout(unset,p);return()=>{clearTimeout(e)}}unset()}},[o,n,f,l,s,r,d,p]),U(()=>{o&&(u===NOOP||!n||u(s))},[o,n,u,s]),c}function NextFloatingDelayGroup(t){let{children:n,delay:r,timeoutMs:i=0}=t,a=e.useRef(r),o=e.useRef(r),s=e.useRef(null),c=e.useRef(null),l=e.useRef(-1);return(0,J.jsx)(yt.Provider,{value:e.useMemo(()=>({hasProvider:!0,delayRef:a,initialDelayRef:o,currentIdRef:s,timeoutMs:i,currentContextRef:c,timeoutIdRef:l}),[i]),children:n})}function useNextDelayGroup(t,n){n===void 0&&(n={});let{open:r,onOpenChange:i,floatingId:a}=t,{enabled:o=!0}=n,{currentIdRef:s,delayRef:c,timeoutMs:l,initialDelayRef:u,currentContextRef:d,hasProvider:f,timeoutIdRef:p}=e.useContext(yt),[m,h]=e.useState(!1);return U(()=>{function unset(){var e;h(!1),(e=d.current)==null||e.setIsInstantPhase(!1),s.current=null,d.current=null,c.current=u.current}if(o&&s.current&&!r&&s.current===a){if(h(!1),l)return p.current=window.setTimeout(unset,l),()=>{clearTimeout(p.current)};unset()}},[o,r,a,s,c,l,u,d,p]),U(()=>{if(!o||!r)return;let e=d.current,t=s.current;d.current={onOpenChange:i,setIsInstantPhase:h},s.current=a,c.current={open:0,close:getDelay(u.current,`close`)},t!==null&&t!==a?(clearTimeoutIfSet(p),h(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1)):(h(!1),e?.setIsInstantPhase(!1))},[o,r,a,i,s,c,l,u,d,p]),U(()=>()=>{d.current=null},[d]),e.useMemo(()=>({hasProvider:f,delayRef:c,isInstantPhase:m}),[f,c,m])}function enqueueFocus(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(bt);let exec=()=>e?.focus({preventScroll:n});i?exec():bt=requestAnimationFrame(exec)}function contains(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&isShadowRoot(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function getTarget(e){return`composedPath`in e?e.composedPath()[0]:e.target}function getDocument(e){return e?.ownerDocument||document}function getCounterMap(e){return e===`inert`?xt.inert:e===`aria-hidden`?xt[`aria-hidden`]:xt.none}function unwrapHost(e){return e?isShadowRoot(e)?e.host:unwrapHost(e.parentNode):null}function applyAttributeToOthers(e,t,n,r){let i=`data-floating-ui-inert`,a=r?`inert`:n?`aria-hidden`:null,o=correctElements(t,e),s=new Set,c=new Set(o),l=[];Ct[i]||(Ct[i]=new WeakMap);let u=Ct[i];o.forEach(keep),deep(t),s.clear();function keep(e){!e||s.has(e)||(s.add(e),e.parentNode&&keep(e.parentNode))}function deep(e){!e||c.has(e)||[].forEach.call(e.children,e=>{if(getNodeName(e)!==`script`)if(s.has(e))deep(e);else{let t=a?e.getAttribute(a):null,n=t!==null&&t!==`false`,r=getCounterMap(a),o=(r.get(e)||0)+1,s=(u.get(e)||0)+1;r.set(e,o),u.set(e,s),l.push(e),o===1&&n&&St.add(e),s===1&&e.setAttribute(i,``),!n&&a&&e.setAttribute(a,a===`inert`?``:`true`)}})}return wt++,()=>{l.forEach(e=>{let t=getCounterMap(a),n=(t.get(e)||0)-1,r=(u.get(e)||0)-1;t.set(e,n),u.set(e,r),n||(!St.has(e)&&a&&e.removeAttribute(a),St.delete(e)),r||e.removeAttribute(i)}),wt--,wt||(xt.inert=new WeakMap,xt[`aria-hidden`]=new WeakMap,xt.none=new WeakMap,St=new WeakSet,Ct={})}}function markOthers(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=getDocument(e[0]).body;return applyAttributeToOthers(e.concat(Array.from(r.querySelectorAll(`[aria-live],[role="status"],output`))),r,t,n)}function useFloatingPortalNode(t){t===void 0&&(t={});let{id:n,root:r}=t,i=pt(),a=usePortalContext(),[o,s]=e.useState(null),c=e.useRef(null);return U(()=>()=>{o?.remove(),queueMicrotask(()=>{c.current=null})},[o]),U(()=>{if(!i||c.current)return;let e=n?document.getElementById(n):null;if(!e)return;let t=document.createElement(`div`);t.id=i,t.setAttribute(kt,``),e.appendChild(t),c.current=t,s(t)},[n,i]),U(()=>{if(r===null||!i||c.current)return;let e=r||a?.portalNode;e&&!isNode(e)&&(e=e.current),e||=document.body;let t=null;n&&(t=document.createElement(`div`),t.id=n,e.appendChild(t));let o=document.createElement(`div`);o.id=i,o.setAttribute(kt,``),e=t||e,e.appendChild(o),c.current=o,s(o)},[n,r,i,a]),o}function FloatingPortal(n){let{children:r,id:i,root:a,preserveTabOrder:o=!0}=n,s=useFloatingPortalNode({id:i,root:a}),[c,l]=e.useState(null),u=e.useRef(null),d=e.useRef(null),f=e.useRef(null),p=e.useRef(null),m=c?.modal,h=c?.open,g=!!c&&!c.modal&&c.open&&o&&!!(a||s);return e.useEffect(()=>{if(!s||!o||m)return;function onFocus(e){s&&isOutsideEvent(e)&&(e.type===`focusin`?enableFocusInside:disableFocusInside)(s)}return s.addEventListener(`focusin`,onFocus,!0),s.addEventListener(`focusout`,onFocus,!0),()=>{s.removeEventListener(`focusin`,onFocus,!0),s.removeEventListener(`focusout`,onFocus,!0)}},[s,o,m]),e.useEffect(()=>{s&&(h||enableFocusInside(s))},[h,s]),(0,J.jsxs)(Ot.Provider,{value:e.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:p,portalNode:s,setFocusManagerState:l}),[o,s]),children:[g&&s&&(0,J.jsx)(Et,{"data-type":`outside`,ref:u,onFocus:e=>{if(isOutsideEvent(e,s)){var t;(t=f.current)==null||t.focus()}else getPreviousTabbable(c?c.domReference:null)?.focus()}}),g&&s&&(0,J.jsx)(`span`,{"aria-owns":s.id,style:Dt}),s&&t.createPortal(r,s),g&&s&&(0,J.jsx)(Et,{"data-type":`outside`,ref:d,onFocus:e=>{if(isOutsideEvent(e,s)){var t;(t=p.current)==null||t.focus()}else getNextTabbable(c?c.domReference:null)?.focus(),c!=null&&c.closeOnFocusOut&&c?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}function useLiteMergeRefs(t){return e.useMemo(()=>e=>{t.forEach(t=>{t&&(t.current=e)})},t)}function clearDisconnectedPreviouslyFocusedElements(){jt=jt.filter(e=>e.deref()?.isConnected)}function addPreviouslyFocusedElement(e){clearDisconnectedPreviouslyFocusedElements(),e&&getNodeName(e)!==`body`&&(jt.push(new WeakRef(e)),jt.length>At&&(jt=jt.slice(-20)))}function getPreviouslyFocusedElement(){return clearDisconnectedPreviouslyFocusedElements(),jt[jt.length-1]?.deref()}function getFirstTabbableElement(e){let t=getTabbableOptions();return he(e,t)?e:V(e,t)[0]||e}function handleTabIndex(e,t){var n;if(!t.current.includes(`floating`)&&!((n=e.getAttribute(`role`))!=null&&n.includes(`dialog`)))return;let r=getTabbableOptions(),i=me(e,r).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return he(e,r)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),a=e.getAttribute(`tabindex`);t.current.includes(`floating`)||i.length===0?a!==`0`&&e.setAttribute(`tabindex`,`0`):(a!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function FloatingFocusManager(t){let{context:n,children:r,disabled:i=!1,order:a=[`content`],guards:o=!0,initialFocus:s=0,returnFocus:c=!0,restoreFocus:l=!1,modal:u=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:f=!0,outsideElementsInert:p=!1,getInsideElements:_getInsideElements=()=>[]}=t,{open:m,onOpenChange:h,events:g,dataRef:_,elements:{domReference:v,floating:y}}=n,b=useEffectEvent(()=>_.current.floatingContext?.nodeId),x=useEffectEvent(_getInsideElements),S=typeof s==`number`&&s<0,C=isTypeableCombobox(v)&&S,w=supportsInert(),T=!w||o,E=!T||w&&p,D=useLatestRef$1(a),O=useLatestRef$1(s),k=useLatestRef$1(c),A=useFloatingTree(),j=usePortalContext(),M=e.useRef(null),N=e.useRef(null),P=e.useRef(!1),F=e.useRef(!1),ee=e.useRef(-1),I=e.useRef(-1),te=j!=null,L=getFloatingFocusElement(y),R=useEffectEvent(function(e){return e===void 0&&(e=L),e?V(e,getTabbableOptions()):[]}),z=useEffectEvent(e=>{let t=R(e);return D.current.map(e=>v&&e===`reference`?v:L&&e===`floating`?L:t).filter(Boolean).flat()});e.useEffect(()=>{if(i||!u)return;function onKeyDown(e){if(e.key===`Tab`){contains$1(L,activeElement(getDocument$1(L)))&&R().length===0&&!C&&stopEvent(e);let t=z(),n=getTarget$1(e);D.current[0]===`reference`&&n===v&&(stopEvent(e),e.shiftKey?enqueueFocus(t[t.length-1]):enqueueFocus(t[1])),D.current[1]===`floating`&&n===L&&e.shiftKey&&(stopEvent(e),enqueueFocus(t[0]))}}let e=getDocument$1(L);return e.addEventListener(`keydown`,onKeyDown),()=>{e.removeEventListener(`keydown`,onKeyDown)}},[i,v,L,u,D,C,R,z]),e.useEffect(()=>{if(i||!y)return;function handleFocusIn(e){let t=getTarget$1(e),n=R().indexOf(t);n!==-1&&(ee.current=n)}return y.addEventListener(`focusin`,handleFocusIn),()=>{y.removeEventListener(`focusin`,handleFocusIn)}},[i,y,R]),e.useEffect(()=>{if(i||!f)return;function handlePointerDown(){F.current=!0,setTimeout(()=>{F.current=!1})}function handleFocusOutside(e){let t=e.relatedTarget,n=e.currentTarget,r=getTarget$1(e);queueMicrotask(()=>{let i=b(),a=!(contains$1(v,t)||contains$1(y,t)||contains$1(t,y)||contains$1(j?.portalNode,t)||t!=null&&t.hasAttribute(createAttribute(`focus-guard`))||A&&(getNodeChildren$1(A.nodesRef.current,i).find(e=>contains$1(e.context?.elements.floating,t)||contains$1(e.context?.elements.domReference,t))||getNodeAncestors(A.nodesRef.current,i).find(e=>[e.context?.elements.floating,getFloatingFocusElement(e.context?.elements.floating)].includes(t)||e.context?.elements.domReference===t)));if(n===v&&L&&handleTabIndex(L,D),l&&n!==v&&!(r!=null&&r.isConnected)&&activeElement(getDocument$1(L))===getDocument$1(L).body){isHTMLElement(L)&&L.focus();let e=ee.current,t=R(),n=t[e]||t[t.length-1]||L;isHTMLElement(n)&&n.focus()}if(_.current.insideReactTree){_.current.insideReactTree=!1;return}(C||!u)&&t&&a&&!F.current&&t!==getPreviouslyFocusedElement()&&(P.current=!0,h(!1,e,`focus-out`))})}let e=!!(!A&&j);function markInsideReactTree(){clearTimeoutIfSet(I),_.current.insideReactTree=!0,I.current=window.setTimeout(()=>{_.current.insideReactTree=!1})}if(y&&isHTMLElement(v))return v.addEventListener(`focusout`,handleFocusOutside),v.addEventListener(`pointerdown`,handlePointerDown),y.addEventListener(`focusout`,handleFocusOutside),e&&y.addEventListener(`focusout`,markInsideReactTree,!0),()=>{v.removeEventListener(`focusout`,handleFocusOutside),v.removeEventListener(`pointerdown`,handlePointerDown),y.removeEventListener(`focusout`,handleFocusOutside),e&&y.removeEventListener(`focusout`,markInsideReactTree,!0)}},[i,v,y,L,u,A,j,h,f,l,R,C,b,D,_]);let ne=e.useRef(null),re=e.useRef(null),ie=useLiteMergeRefs([ne,j?.beforeInsideRef]),ae=useLiteMergeRefs([re,j?.afterInsideRef]);e.useEffect(()=>{var e,t;if(i||!y)return;let n=Array.from((j==null||(e=j.portalNode)==null?void 0:e.querySelectorAll(`[`+createAttribute(`portal`)+`]`))||[]),r=(t=(A?getNodeAncestors(A.nodesRef.current,b()):[]).find(e=>isTypeableCombobox(e.context?.elements.domReference||null)))==null||(t=t.context)==null?void 0:t.elements.domReference,a=[y,r,...n,...x(),M.current,N.current,ne.current,re.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,D.current.includes(`reference`)||C?v:null].filter(e=>e!=null),o=u||C?markOthers(a,!E,E):markOthers(a);return()=>{o()}},[i,v,y,u,D,j,C,T,E,A,b,x]),U(()=>{if(i||!isHTMLElement(L))return;let e=activeElement(getDocument$1(L));queueMicrotask(()=>{let t=z(L),n=O.current,r=(typeof n==`number`?t[n]:n.current)||L,i=contains$1(L,e);!S&&!i&&m&&enqueueFocus(r,{preventScroll:r===L})})},[i,m,L,S,z,O]),U(()=>{if(i||!L)return;let e=getDocument$1(L);addPreviouslyFocusedElement(activeElement(e));function onOpenChange(e){let{reason:t,event:n,nested:r}=e;if([`hover`,`safe-polygon`].includes(t)&&n.type===`mouseleave`&&(P.current=!0),t===`outside-press`)if(r)P.current=!1;else if(isVirtualClick(n)||isVirtualPointerEvent(n))P.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?P.current=!1:P.current=!0}}g.on(`openchange`,onOpenChange);let t=e.createElement(`span`);t.setAttribute(`tabindex`,`-1`),t.setAttribute(`aria-hidden`,`true`),Object.assign(t.style,Tt),te&&v&&v.insertAdjacentElement(`afterend`,t);function getReturnElement(){if(typeof k.current==`boolean`){let e=v||getPreviouslyFocusedElement();return e&&e.isConnected?e:t}return k.current.current||t}return()=>{g.off(`openchange`,onOpenChange);let n=activeElement(e),r=contains$1(y,n)||A&&getNodeChildren$1(A.nodesRef.current,b(),!1).some(e=>contains$1(e.context?.elements.floating,n)),i=getReturnElement();queueMicrotask(()=>{let a=getFirstTabbableElement(i);k.current&&!P.current&&isHTMLElement(a)&&(a===n||n===e.body||r)&&a.focus({preventScroll:!0}),t.remove()})}},[i,y,L,k,_,g,A,te,v,b]),e.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(clearDisconnectedPreviouslyFocusedElements)}),[i]),U(()=>{if(!i&&j)return j.setFocusManagerState({modal:u,closeOnFocusOut:f,open:m,onOpenChange:h,domReference:v}),()=>{j.setFocusManagerState(null)}},[i,j,u,m,h,f,v]),U(()=>{i||L&&handleTabIndex(L,D)},[i,L,D]);function renderDismissButton(e){return i||!d||!u?null:(0,J.jsx)(Mt,{ref:e===`start`?M:N,onClick:e=>h(!1,e.nativeEvent),children:typeof d==`string`?d:`Dismiss`})}let oe=!i&&T&&(!u||!C)&&(te||u);return(0,J.jsxs)(J.Fragment,{children:[oe&&(0,J.jsx)(Et,{"data-type":`inside`,ref:ie,onFocus:e=>{if(u){let e=z();enqueueFocus(a[0]===`reference`?e[0]:e[e.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(P.current=!1,isOutsideEvent(e,j.portalNode))getNextTabbable(v)?.focus();else{var t;(t=j.beforeOutsideRef.current)==null||t.focus()}}}),!C&&renderDismissButton(`start`),r,renderDismissButton(`end`),oe&&(0,J.jsx)(Et,{"data-type":`inside`,ref:ae,onFocus:e=>{if(u)enqueueFocus(z()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(f&&(P.current=!0),isOutsideEvent(e,j.portalNode))getPreviousTabbable(v)?.focus();else{var t;(t=j.afterOutsideRef.current)==null||t.focus()}}})]})}function enableScrollLock(){let e=getPlatform(),t=/iP(hone|ad|od)|iOS/.test(e)||e===`MacIntel`&&navigator.maxTouchPoints>1,n=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?`paddingLeft`:`paddingRight`,i=window.innerWidth-document.documentElement.clientWidth,a=n.left?parseFloat(n.left):window.scrollX,o=n.top?parseFloat(n.top):window.scrollY;if(n.overflow=`hidden`,n.setProperty(Pt,i+`px`),i&&(n[r]=i+`px`),t){let e=window.visualViewport?.offsetLeft||0,t=window.visualViewport?.offsetTop||0;Object.assign(n,{position:`fixed`,top:-(o-Math.floor(t))+`px`,left:-(a-Math.floor(e))+`px`,right:`0`})}return()=>{Object.assign(n,{overflow:``,[r]:``}),n.removeProperty(Pt),t&&(Object.assign(n,{position:``,top:``,left:``,right:``}),window.scrollTo(a,o))}}function isButtonTarget(e){return isHTMLElement(e.target)&&e.target.tagName===`BUTTON`}function isAnchorTarget(e){return isHTMLElement(e.target)&&e.target.tagName===`A`}function isSpaceIgnored(e){return isTypeableElement(e)}function useClick(t,n){n===void 0&&(n={});let{open:r,onOpenChange:i,dataRef:a,elements:{domReference:o}}=t,{enabled:s=!0,event:c=`click`,toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:f=!0}=n,p=e.useRef(),m=e.useRef(!1),h=e.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){let t=p.current;e.button===0&&c!==`click`&&(isMouseLikePointerType(t,!0)&&u||(r&&l&&(!(a.current.openEvent&&f)||a.current.openEvent.type===`mousedown`)?i(!1,e.nativeEvent,`click`):(e.preventDefault(),i(!0,e.nativeEvent,`click`))))},onClick(e){let t=p.current;if(c===`mousedown`&&p.current){p.current=void 0;return}isMouseLikePointerType(t,!0)&&u||(r&&l&&(!(a.current.openEvent&&f)||a.current.openEvent.type===`click`)?i(!1,e.nativeEvent,`click`):i(!0,e.nativeEvent,`click`))},onKeyDown(e){p.current=void 0,!(e.defaultPrevented||!d||isButtonTarget(e))&&(e.key===` `&&!isSpaceIgnored(o)&&(e.preventDefault(),m.current=!0),!isAnchorTarget(e)&&e.key===`Enter`&&i(!(r&&l),e.nativeEvent,`click`))},onKeyUp(e){e.defaultPrevented||!d||isButtonTarget(e)||isSpaceIgnored(o)||e.key===` `&&m.current&&(m.current=!1,i(!(r&&l),e.nativeEvent,`click`))}}),[a,o,c,u,d,i,r,f,l]);return e.useMemo(()=>s?{reference:h}:{},[s,h])}function createVirtualElement(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function isMouseBasedEvent(e){return e!=null&&e.clientX!=null}function useClientPoint(t,n){n===void 0&&(n={});let{open:r,dataRef:i,elements:{floating:a,domReference:o},refs:s}=t,{enabled:c=!0,axis:l=`both`,x:u=null,y:d=null}=n,f=e.useRef(!1),p=e.useRef(null),[m,h]=e.useState(),[g,_]=e.useState([]),v=useEffectEvent((e,t)=>{f.current||i.current.openEvent&&!isMouseBasedEvent(i.current.openEvent)||s.setPositionReference(createVirtualElement(o,{x:e,y:t,axis:l,dataRef:i,pointerType:m}))}),y=useEffectEvent(e=>{u==null&&d==null&&(r?p.current||_([]):v(e.clientX,e.clientY))}),b=isMouseLikePointerType(m)?a:r,x=e.useCallback(()=>{if(!b||!c||u!=null||d!=null)return;let e=getWindow(a);function handleMouseMove(t){let n=getTarget$1(t);contains$1(a,n)?(e.removeEventListener(`mousemove`,handleMouseMove),p.current=null):v(t.clientX,t.clientY)}if(!i.current.openEvent||isMouseBasedEvent(i.current.openEvent)){e.addEventListener(`mousemove`,handleMouseMove);let cleanup=()=>{e.removeEventListener(`mousemove`,handleMouseMove),p.current=null};return p.current=cleanup,cleanup}s.setPositionReference(o)},[b,c,u,d,a,i,s,o,v]);e.useEffect(()=>x(),[x,g]),e.useEffect(()=>{c&&!a&&(f.current=!1)},[c,a]),e.useEffect(()=>{!c&&r&&(f.current=!0)},[c,r]),U(()=>{c&&(u!=null||d!=null)&&(f.current=!1,v(u,d))},[c,u,d,v]);let S=e.useMemo(()=>{function setPointerTypeRef(e){let{pointerType:t}=e;h(t)}return{onPointerDown:setPointerTypeRef,onPointerEnter:setPointerTypeRef,onMouseMove:y,onMouseEnter:y}},[y]);return e.useMemo(()=>c?{reference:S}:{},[c,S])}function useDismiss(t,n){n===void 0&&(n={});let{open:r,onOpenChange:i,elements:a,dataRef:o}=t,{enabled:s=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:u=`pointerdown`,referencePress:d=!1,referencePressEvent:f=`pointerdown`,ancestorScroll:p=!1,bubbles:m,capture:h}=n,g=useFloatingTree(),_=useEffectEvent(typeof l==`function`?l:()=>!1),v=typeof l==`function`?_:l,y=e.useRef(!1),{escapeKey:b,outsidePress:x}=normalizeProp(m),{escapeKey:S,outsidePress:C}=normalizeProp(h),w=e.useRef(!1),T=useEffectEvent(e=>{if(!r||!s||!c||e.key!==`Escape`||w.current)return;let t=o.current.floatingContext?.nodeId,n=g?getNodeChildren$1(g.nodesRef.current,t):[];if(!b&&(e.stopPropagation(),n.length>0)){let e=!0;if(n.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}i(!1,isReactEvent(e)?e.nativeEvent:e,`escape-key`)}),E=useEffectEvent(e=>{var t;let callback=()=>{var t;T(e),(t=getTarget$1(e))==null||t.removeEventListener(`keydown`,callback)};(t=getTarget$1(e))==null||t.addEventListener(`keydown`,callback)}),D=useEffectEvent(e=>{let t=o.current.insideReactTree;o.current.insideReactTree=!1;let n=y.current;if(y.current=!1,u===`click`&&n||t||typeof v==`function`&&!v(e))return;let r=getTarget$1(e),s=`[`+createAttribute(`inert`)+`]`,c=getDocument$1(a.floating).querySelectorAll(s),l=isElement(r)?r:null;for(;l&&!isLastTraversableNode(l);){let e=getParentNode(l);if(isLastTraversableNode(e)||!isElement(e))break;l=e}if(c.length&&isElement(r)&&!isRootElement(r)&&!contains$1(r,a.floating)&&Array.from(c).every(e=>!contains$1(l,e)))return;if(isHTMLElement(r)&&A){let t=isLastTraversableNode(r),n=getComputedStyle$1(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}let d=o.current.floatingContext?.nodeId,f=g&&getNodeChildren$1(g.nodesRef.current,d).some(t=>isEventTargetWithin(e,t.context?.elements.floating));if(isEventTargetWithin(e,a.floating)||isEventTargetWithin(e,a.domReference)||f)return;let p=g?getNodeChildren$1(g.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}i(!1,e,`outside-press`)}),O=useEffectEvent(e=>{var t;let callback=()=>{var t;D(e),(t=getTarget$1(e))==null||t.removeEventListener(u,callback)};(t=getTarget$1(e))==null||t.addEventListener(u,callback)});e.useEffect(()=>{if(!r||!s)return;o.current.__escapeKeyBubbles=b,o.current.__outsidePressBubbles=x;let e=-1;function onScroll(e){i(!1,e,`ancestor-scroll`)}function handleCompositionStart(){window.clearTimeout(e),w.current=!0}function handleCompositionEnd(){e=window.setTimeout(()=>{w.current=!1},isWebKit()?5:0)}let t=getDocument$1(a.floating);c&&(t.addEventListener(`keydown`,S?E:T,S),t.addEventListener(`compositionstart`,handleCompositionStart),t.addEventListener(`compositionend`,handleCompositionEnd)),v&&t.addEventListener(u,C?O:D,C);let n=[];return p&&(isElement(a.domReference)&&(n=getOverflowAncestors(a.domReference)),isElement(a.floating)&&(n=n.concat(getOverflowAncestors(a.floating))),!isElement(a.reference)&&a.reference&&a.reference.contextElement&&(n=n.concat(getOverflowAncestors(a.reference.contextElement)))),n=n.filter(e=>e!==t.defaultView?.visualViewport),n.forEach(e=>{e.addEventListener(`scroll`,onScroll,{passive:!0})}),()=>{c&&(t.removeEventListener(`keydown`,S?E:T,S),t.removeEventListener(`compositionstart`,handleCompositionStart),t.removeEventListener(`compositionend`,handleCompositionEnd)),v&&t.removeEventListener(u,C?O:D,C),n.forEach(e=>{e.removeEventListener(`scroll`,onScroll)}),window.clearTimeout(e)}},[o,a,c,v,u,r,i,p,s,b,x,T,S,E,D,C,O]),e.useEffect(()=>{o.current.insideReactTree=!1},[o,v,u]);let k=e.useMemo(()=>({onKeyDown:T,...d&&{[It[f]]:e=>{i(!1,e.nativeEvent,`reference-press`)},...f!==`click`&&{onClick(e){i(!1,e.nativeEvent,`reference-press`)}}}}),[T,i,d,f]),A=e.useMemo(()=>{function setMouseDownOrUpInside(e){e.button===0&&(y.current=!0)}return{onKeyDown:T,onMouseDown:setMouseDownOrUpInside,onMouseUp:setMouseDownOrUpInside,[Lt[u]]:()=>{o.current.insideReactTree=!0}}},[T,u,o]);return e.useMemo(()=>s?{reference:k,floating:A}:{},[s,k,A])}function useFloatingRootContext(t){let{open:n=!1,onOpenChange:r,elements:i}=t,a=pt(),o=e.useRef({}),[s]=e.useState(()=>createEventEmitter()),c=useFloatingParentNodeId()!=null,[l,u]=e.useState(i.reference),d=useEffectEvent((e,t,n)=>{o.current.openEvent=e?t:void 0,s.emit(`openchange`,{open:e,event:t,reason:n,nested:c}),r?.(e,t,n)}),f=e.useMemo(()=>({setPositionReference:u}),[]),p=e.useMemo(()=>({reference:l||i.reference||null,floating:i.floating||null,domReference:i.reference}),[l,i.reference,i.floating]);return e.useMemo(()=>({dataRef:o,open:n,onOpenChange:d,elements:p,events:s,floatingId:a,refs:f}),[n,d,p,s,a,f])}function useFloating(t){t===void 0&&(t={});let{nodeId:n}=t,r=useFloatingRootContext({...t,elements:{reference:null,floating:null,...t.elements}}),i=t.rootContext||r,a=i.elements,[o,s]=e.useState(null),[c,l]=e.useState(null),u=a?.domReference||o,d=e.useRef(null),f=useFloatingTree();U(()=>{u&&(d.current=u)},[u]);let p=useFloating$1({...t,elements:{...a,...c&&{reference:c}}}),m=e.useCallback(e=>{let t=isElement(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),p.refs.setReference(t)},[p.refs]),h=e.useCallback(e=>{(isElement(e)||e===null)&&(d.current=e,s(e)),(isElement(p.refs.reference.current)||p.refs.reference.current===null||e!==null&&!isElement(e))&&p.refs.setReference(e)},[p.refs]),g=e.useMemo(()=>({...p.refs,setReference:h,setPositionReference:m,domReference:d}),[p.refs,h,m]),_=e.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),v=e.useMemo(()=>({...p,...i,refs:g,elements:_,nodeId:n}),[p,g,_,n,i]);return U(()=>{i.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===n);e&&(e.context=v)}),e.useMemo(()=>({...p,context:v,refs:g,elements:_}),[p,g,_,v])}function isMacSafari(){return isMac()&&isSafari()}function useFocus(t,n){n===void 0&&(n={});let{open:r,onOpenChange:i,events:a,dataRef:o,elements:s}=t,{enabled:c=!0,visibleOnly:l=!0}=n,u=e.useRef(!1),d=e.useRef(-1),f=e.useRef(!0);e.useEffect(()=>{if(!c)return;let e=getWindow(s.domReference);function onBlur(){!r&&isHTMLElement(s.domReference)&&s.domReference===activeElement(getDocument$1(s.domReference))&&(u.current=!0)}function onKeyDown(){f.current=!0}function onPointerDown(){f.current=!1}return e.addEventListener(`blur`,onBlur),isMacSafari()&&(e.addEventListener(`keydown`,onKeyDown,!0),e.addEventListener(`pointerdown`,onPointerDown,!0)),()=>{e.removeEventListener(`blur`,onBlur),isMacSafari()&&(e.removeEventListener(`keydown`,onKeyDown,!0),e.removeEventListener(`pointerdown`,onPointerDown,!0))}},[s.domReference,r,c]),e.useEffect(()=>{if(!c)return;function onOpenChange(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(u.current=!0)}return a.on(`openchange`,onOpenChange),()=>{a.off(`openchange`,onOpenChange)}},[a,c]),e.useEffect(()=>()=>{clearTimeoutIfSet(d)},[]);let p=e.useMemo(()=>({onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;let t=getTarget$1(e.nativeEvent);if(l&&isElement(t)){if(isMacSafari()&&!e.relatedTarget){if(!f.current&&!isTypeableElement(t))return}else if(!matchesFocusVisible(t))return}i(!0,e.nativeEvent,`focus`)},onBlur(e){u.current=!1;let t=e.relatedTarget,n=e.nativeEvent,r=isElement(t)&&t.hasAttribute(createAttribute(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;d.current=window.setTimeout(()=>{let e=activeElement(s.domReference?s.domReference.ownerDocument:document);!t&&e===s.domReference||contains$1(o.current.floatingContext?.refs.floating.current,e)||contains$1(s.domReference,e)||r||i(!1,n,`focus`)})}}),[o,s.domReference,i,l]);return e.useMemo(()=>c?{reference:p}:{},[c,p])}function mergeProps(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[Y]:t,[nt]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[tt]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[Y,nt].includes(n)))if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return r.get(n)?.map(e=>e(...t)).find(e=>e!==void 0)}}}else e[n]=a}),e),{})}}function useInteractions(t){t===void 0&&(t=[]);let n=t.map(e=>e?.reference),r=t.map(e=>e?.floating),i=t.map(e=>e?.item),a=e.useCallback(e=>mergeProps(e,t,`reference`),n),o=e.useCallback(e=>mergeProps(e,t,`floating`),r),s=e.useCallback(e=>mergeProps(e,t,`item`),i);return e.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s}),[a,o,s])}function doSwitch(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function isMainOrientationKey(e,t){return doSwitch(t,e===it||e===at,e===X||e===rt)}function isMainOrientationToEndKey(e,t,n){return doSwitch(t,e===at,n?e===X:e===rt)||e===`Enter`||e===` `||e===``}function isCrossOrientationOpenKey(e,t,n){return doSwitch(t,n?e===X:e===rt,e===at)}function isCrossOrientationCloseKey(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Rt:doSwitch(t,n?e===rt:e===X,e===it)}function useListNavigation(t,n){let{open:r,onOpenChange:i,elements:a,floatingId:o}=t,{listRef:s,activeIndex:c,onNavigate:unstable_onNavigate=()=>{},enabled:l=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:m=!1,virtual:h=!1,focusItemOnOpen:g=`auto`,focusItemOnHover:_=!0,openOnArrowKeyDown:v=!0,disabledIndices:y=void 0,orientation:b=`vertical`,parentOrientation:x,cols:S=1,scrollItemIntoView:C=!0,virtualItemRef:w,itemSizes:T,dense:E=!1}=n,D=useLatestRef$1(getFloatingFocusElement(a.floating)),O=useFloatingParentNodeId(),k=useFloatingTree();U(()=>{t.dataRef.current.orientation=b},[t,b]);let A=useEffectEvent(()=>{unstable_onNavigate(N.current===-1?null:N.current)}),j=isTypeableCombobox(a.domReference),M=e.useRef(g),N=e.useRef(u??-1),P=e.useRef(null),F=e.useRef(!0),ee=e.useRef(A),I=e.useRef(!!a.floating),te=e.useRef(r),L=e.useRef(!1),R=e.useRef(!1),z=useLatestRef$1(y),ne=useLatestRef$1(r),re=useLatestRef$1(C),ie=useLatestRef$1(u),[ae,oe]=e.useState(),[se,ce]=e.useState(),le=useEffectEvent(()=>{function runFocus(e){if(h){var t;(t=e.id)!=null&&t.endsWith(`-fui-option`)&&(e.id=o+`-`+Math.random().toString(16).slice(2,10)),oe(e.id),k?.events.emit(`virtualfocus`,e),w&&(w.current=e)}else enqueueFocus(e,{sync:L.current,preventScroll:!0})}let e=s.current[N.current],t=R.current;e&&runFocus(e),(L.current?e=>e():requestAnimationFrame)(()=>{let n=s.current[N.current]||e;if(!n)return;e||runFocus(n);let r=re.current;r&&de&&(t||!F.current)&&(n.scrollIntoView==null||n.scrollIntoView(typeof r==`boolean`?{block:`nearest`,inline:`nearest`}:r))})});U(()=>{l&&(r&&a.floating?M.current&&u!=null&&(R.current=!0,N.current=u,A()):I.current&&(N.current=-1,ee.current()))},[l,r,a.floating,u,A]),U(()=>{if(l&&r&&a.floating)if(c==null){if(L.current=!1,ie.current!=null)return;if(I.current&&(N.current=-1,le()),(!te.current||!I.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,waitForListPopulated=()=>{s.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(waitForListPopulated),e++):(N.current=P.current==null||isMainOrientationToEndKey(P.current,b,m)||p?getMinListIndex(s,z.current):getMaxListIndex(s,z.current),P.current=null,A())};waitForListPopulated()}}else isIndexOutOfListBounds(s,c)||(N.current=c,le(),R.current=!1)},[l,r,a.floating,c,ie,p,s,b,m,A,le,z]),U(()=>{var e;if(!l||a.floating||!k||h||!I.current)return;let t=k.nodesRef.current,n=(e=t.find(e=>e.id===O))==null||(e=e.context)==null?void 0:e.elements.floating,r=activeElement(getDocument$1(a.floating)),i=t.some(e=>e.context&&contains$1(e.context.elements.floating,r));n&&!i&&F.current&&n.focus({preventScroll:!0})},[l,a.floating,k,O,h]),U(()=>{if(!l||!k||!h||O)return;function handleVirtualFocus(e){ce(e.id),w&&(w.current=e)}return k.events.on(`virtualfocus`,handleVirtualFocus),()=>{k.events.off(`virtualfocus`,handleVirtualFocus)}},[l,k,h,O,w]),U(()=>{ee.current=A,te.current=r,I.current=!!a.floating}),U(()=>{r||(P.current=null,M.current=g)},[r,g]);let ue=c!=null,de=e.useMemo(()=>{function syncCurrentTarget(e){if(!ne.current)return;let t=s.current.indexOf(e);t!==-1&&N.current!==t&&(N.current=t,A())}return{onFocus(e){let{currentTarget:t}=e;L.current=!0,syncCurrentTarget(t)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},onMouseMove(e){let{currentTarget:t}=e;L.current=!0,R.current=!1,_&&syncCurrentTarget(t)},onPointerLeave(e){let{pointerType:t}=e;if(!(!F.current||t===`touch`)&&(L.current=!0,_&&(N.current=-1,A(),!h))){var n;(n=D.current)==null||n.focus({preventScroll:!0})}}}},[ne,D,_,s,A,h]),fe=e.useCallback(()=>{var e;return x??(k==null||(e=k.nodesRef.current.find(e=>e.id===O))==null||(e=e.context)==null||(e=e.dataRef)==null?void 0:e.current.orientation)},[O,k,x]),pe=useEffectEvent(e=>{if(F.current=!1,L.current=!0,e.which===229||!ne.current&&e.currentTarget===D.current)return;if(p&&isCrossOrientationCloseKey(e.key,b,m,S)){isMainOrientationKey(e.key,fe())||stopEvent(e),i(!1,e.nativeEvent,`list-navigation`),isHTMLElement(a.domReference)&&(h?k?.events.emit(`virtualfocus`,a.domReference):a.domReference.focus());return}let t=N.current,n=getMinListIndex(s,y),o=getMaxListIndex(s,y);if(j||(e.key===`Home`&&(stopEvent(e),N.current=n,A()),e.key===`End`&&(stopEvent(e),N.current=o,A())),S>1){let t=T||Array.from({length:s.current.length},()=>({width:1,height:1})),r=createGridCellMap(t,S,E),i=r.findIndex(e=>e!=null&&!isListIndexDisabled(s,e,y)),a=r.reduce((e,t,n)=>t!=null&&!isListIndexDisabled(s,t,y)?n:e,-1),c=r[getGridNavigatedIndex({current:r.map(e=>e==null?null:s.current[e])},{event:e,orientation:b,loop:f,rtl:m,cols:S,disabledIndices:getGridCellIndices([...(typeof y==`function`?null:y)||s.current.map((e,t)=>isListIndexDisabled(s,t,y)?t:void 0),void 0],r),minIndex:i,maxIndex:a,prevIndex:getGridCellIndexOfCorner(N.current>o?n:N.current,t,r,S,e.key===at?`bl`:e.key===(m?X:rt)?`tr`:`tl`),stopEvent:!0})];if(c!=null&&(N.current=c,A()),b===`both`)return}if(isMainOrientationKey(e.key,b)){if(stopEvent(e),r&&!h&&activeElement(e.currentTarget.ownerDocument)===e.currentTarget){N.current=isMainOrientationToEndKey(e.key,b,m)?n:o,A();return}isMainOrientationToEndKey(e.key,b,m)?f?N.current=t>=o?d&&t!==s.current.length?-1:n:findNonDisabledListIndex(s,{startingIndex:t,disabledIndices:y}):N.current=Math.min(o,findNonDisabledListIndex(s,{startingIndex:t,disabledIndices:y})):f?N.current=t<=n?d&&t!==-1?s.current.length:o:findNonDisabledListIndex(s,{startingIndex:t,decrement:!0,disabledIndices:y}):N.current=Math.max(n,findNonDisabledListIndex(s,{startingIndex:t,decrement:!0,disabledIndices:y})),isIndexOutOfListBounds(s,N.current)&&(N.current=-1),A()}}),B=e.useMemo(()=>h&&r&&ue&&{"aria-activedescendant":se||ae},[h,r,ue,se,ae]),V=e.useMemo(()=>({"aria-orientation":b===`both`?void 0:b,...j?{}:B,onKeyDown:pe,onPointerMove(){F.current=!0}}),[B,pe,b,j]),me=e.useMemo(()=>{function checkVirtualMouse(e){g===`auto`&&isVirtualClick(e.nativeEvent)&&(M.current=!0)}function checkVirtualPointer(e){M.current=g,g===`auto`&&isVirtualPointerEvent(e.nativeEvent)&&(M.current=!0)}return{...B,onKeyDown(e){F.current=!1;let t=e.key.startsWith(`Arrow`),n=[`Home`,`End`].includes(e.key),a=t||n,o=isCrossOrientationOpenKey(e.key,b,m),c=isCrossOrientationCloseKey(e.key,b,m,S),l=isCrossOrientationOpenKey(e.key,fe(),m),d=isMainOrientationKey(e.key,b),f=(p?l:d)||e.key===`Enter`||e.key.trim()===``;if(h&&r){let t=k?.nodesRef.current.find(e=>e.parentId==null),r=k&&t?getDeepestNode(k.nodesRef.current,t.id):null;if(a&&r&&w){let t=new KeyboardEvent(`keydown`,{key:e.key,bubbles:!0});if(o||c){let n=r.context?.elements.domReference===e.currentTarget,i=c&&!n?r.context?.elements.domReference:o?s.current.find(e=>e?.id===ae):null;i&&(stopEvent(e),i.dispatchEvent(t),ce(void 0))}if((d||n)&&r.context&&r.context.open&&r.parentId&&e.currentTarget!==r.context.elements.domReference){var g;stopEvent(e),(g=r.context.elements.domReference)==null||g.dispatchEvent(t);return}}return pe(e)}if(!(!r&&!v&&t)){if(f){let t=isMainOrientationKey(e.key,fe());P.current=p&&t?null:e.key}if(p){l&&(stopEvent(e),r?(N.current=getMinListIndex(s,z.current),A()):i(!0,e.nativeEvent,`list-navigation`));return}d&&(u!=null&&(N.current=u),stopEvent(e),!r&&v?i(!0,e.nativeEvent,`list-navigation`):pe(e),r&&A())}},onFocus(){r&&!h&&(N.current=-1,A())},onPointerDown:checkVirtualPointer,onPointerEnter:checkVirtualPointer,onMouseDown:checkVirtualMouse,onClick:checkVirtualMouse}},[ae,B,S,pe,z,g,s,p,A,i,r,v,b,fe,m,u,k,h,w]);return e.useMemo(()=>l?{reference:me,floating:V,item:de}:{},[l,me,V,de])}function useRole(t,n){n===void 0&&(n={});let{open:r,elements:i,floatingId:a}=t,{enabled:o=!0,role:s=`dialog`}=n,c=pt(),l=i.domReference?.id||c,u=e.useMemo(()=>getFloatingFocusElement(i.floating)?.id||a,[i.floating,a]),d=zt.get(s)??s,f=useFloatingParentNodeId()!=null,p=e.useMemo(()=>d===`tooltip`||s===`label`?{[`aria-`+(s===`label`?`labelledby`:`describedby`)]:r?u:void 0}:{"aria-expanded":r?`true`:`false`,"aria-haspopup":d===`alertdialog`?`dialog`:d,"aria-controls":r?u:void 0,...d===`listbox`&&{role:`combobox`},...d===`menu`&&{id:l},...d===`menu`&&f&&{role:`menuitem`},...s===`select`&&{"aria-autocomplete":`none`},...s===`combobox`&&{"aria-autocomplete":`list`}},[d,u,f,r,l,s]),m=e.useMemo(()=>{let e={id:u,...d&&{role:d}};return d===`tooltip`||s===`label`?e:{...e,...d===`menu`&&{"aria-labelledby":l}}},[d,u,l,s]),h=e.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:u+`-fui-option`}};switch(s){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[u,s]);return e.useMemo(()=>o?{reference:p,floating:m,item:h}:{},[o,p,m,h])}function execWithArgsOrReturn(e,t){return typeof e==`function`?e(t):e}function useDelayUnmount(t,n){let[r,i]=e.useState(t);return t&&!r&&i(!0),e.useEffect(()=>{if(!t&&r){let e=setTimeout(()=>i(!1),n);return()=>clearTimeout(e)}},[t,r,n]),r}function useTransitionStatus(n,r){r===void 0&&(r={});let{open:i,elements:{floating:a}}=n,{duration:o=250}=r,s=(typeof o==`number`?o:o.close)||0,[c,l]=e.useState(`unmounted`),u=useDelayUnmount(i,s);return!u&&c===`close`&&l(`unmounted`),U(()=>{if(a){if(i){l(`initial`);let e=requestAnimationFrame(()=>{t.flushSync(()=>{l(`open`)})});return()=>{cancelAnimationFrame(e)}}l(`close`)}},[i,a]),{isMounted:u,status:c}}function useTransitionStyles(t,n){n===void 0&&(n={});let{initial:r={opacity:0},open:i,close:a,common:o,duration:s=250}=n,c=t.placement,l=c.split(`-`)[0],u=e.useMemo(()=>({side:l,placement:c}),[l,c]),d=typeof s==`number`,f=(d?s:s.open)||0,p=(d?s:s.close)||0,[m,h]=e.useState(()=>({...execWithArgsOrReturn(o,u),...execWithArgsOrReturn(r,u)})),{isMounted:g,status:_}=useTransitionStatus(t,{duration:s}),v=useLatestRef$1(r),y=useLatestRef$1(i),b=useLatestRef$1(a),x=useLatestRef$1(o);return U(()=>{let e=execWithArgsOrReturn(v.current,u),t=execWithArgsOrReturn(b.current,u),n=execWithArgsOrReturn(x.current,u),r=execWithArgsOrReturn(y.current,u)||Object.keys(e).reduce((e,t)=>(e[t]=``,e),{});if(_===`initial`&&h(t=>({transitionProperty:t.transitionProperty,...n,...e})),_===`open`&&h({transitionProperty:Object.keys(r).map(camelCaseToKebabCase).join(`,`),transitionDuration:f+`ms`,...n,...r}),_===`close`){let r=t||e;h({transitionProperty:Object.keys(r).map(camelCaseToKebabCase).join(`,`),transitionDuration:p+`ms`,...n,...r})}},[p,b,v,y,x,f,_,u]),{isMounted:g,styles:m}}function useTypeahead(t,n){let{open:r,dataRef:i}=t,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:c,enabled:l=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=n,m=e.useRef(-1),h=e.useRef(``),g=e.useRef(p??o??-1),_=e.useRef(null),v=useEffectEvent(s),y=useEffectEvent(c),b=useLatestRef$1(u),x=useLatestRef$1(f);U(()=>{r&&(clearTimeoutIfSet(m),_.current=null,h.current=``)},[r]),U(()=>{r&&h.current===``&&(g.current=p??o??-1)},[r,p,o]);let S=useEffectEvent(e=>{e?i.current.typing||(i.current.typing=e,y(e)):i.current.typing&&(i.current.typing=e,y(e))}),C=useEffectEvent(e=>{function getMatchingIndex(e,t,n){let r=b.current?b.current(t,n):t.find(e=>e?.toLocaleLowerCase().indexOf(n.toLocaleLowerCase())===0);return r?e.indexOf(r):-1}let t=a.current;if(h.current.length>0&&h.current[0]!==` `&&(getMatchingIndex(t,t,h.current)===-1?S(!1):e.key===` `&&stopEvent(e)),t==null||x.current.includes(e.key)||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;r&&e.key!==` `&&(stopEvent(e),S(!0)),t.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&h.current===e.key&&(h.current=``,g.current=_.current),h.current+=e.key,clearTimeoutIfSet(m),m.current=window.setTimeout(()=>{h.current=``,g.current=_.current,S(!1)},d);let n=g.current,i=getMatchingIndex(t,[...t.slice((n||0)+1),...t.slice(0,(n||0)+1)],h.current);i===-1?e.key!==` `&&(h.current=``,S(!1)):(v(i),_.current=i)}),w=e.useMemo(()=>({onKeyDown:C}),[C]),T=e.useMemo(()=>({onKeyDown:C,onKeyUp(e){e.key===` `&&S(!1)}}),[C,S]);return e.useMemo(()=>l?{reference:w,floating:T}:{},[l,w,T])}function getArgsWithCustomFloatingHeight(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function useInnerOffset(n,r){let{open:i,elements:a}=n,{enabled:o=!0,overflowRef:s,scrollRef:c,onChange:l}=r,u=useEffectEvent(l),d=e.useRef(!1),f=e.useRef(null),p=e.useRef(null);e.useEffect(()=>{if(!o)return;function onWheel(n){if(n.ctrlKey||!e||s.current==null)return;let r=n.deltaY,i=s.current.top>=-.5,a=s.current.bottom>=-.5,o=e.scrollHeight-e.clientHeight,c=r<0?-1:1,l=r<0?`max`:`min`;e.scrollHeight<=e.clientHeight||(!i&&r>0||!a&&r<0?(n.preventDefault(),t.flushSync(()=>{u(e=>e+Math[l](r,o*c))})):/firefox/i.test(getUserAgent())&&(e.scrollTop+=r))}let e=c?.current||a.floating;if(i&&e)return e.addEventListener(`wheel`,onWheel),requestAnimationFrame(()=>{f.current=e.scrollTop,s.current!=null&&(p.current={...s.current})}),()=>{f.current=null,p.current=null,e.removeEventListener(`wheel`,onWheel)}},[o,i,a.floating,s,c,u]);let m=e.useMemo(()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){let e=c?.current||a.floating;if(!(!s.current||!e||!d.current)){if(f.current!==null){let n=e.scrollTop-f.current;(s.current.bottom<-.5&&n<-1||s.current.top<-.5&&n>1)&&t.flushSync(()=>u(e=>e+n))}requestAnimationFrame(()=>{f.current=e.scrollTop})}}}),[a.floating,u,s,c]);return e.useMemo(()=>o?{floating:m}:{},[o,m])}function getNodeChildren(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...getNodeChildren(e,t.id,n)])}function isPointInPolygon(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function isInside(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function safePolygon(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function getCursorSpeed(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let fn=e=>{let{x:n,y:o,placement:s,elements:c,onClose:l,nodeId:u,tree:d}=e;return function onMouseMove(e){function close(){clearTimeoutIfSet(i),l()}if(clearTimeoutIfSet(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:f,clientY:p}=e,m=[f,p],h=getTarget(e),g=e.type===`mouseleave`,_=contains(c.floating,h),v=contains(c.domReference,h),y=c.domReference.getBoundingClientRect(),b=c.floating.getBoundingClientRect(),x=s.split(`-`)[0],S=n>b.right-b.width/2,C=o>b.bottom-b.height/2,w=isInside(m,y),T=b.width>y.width,E=b.height>y.height,D=(T?y:b).left,O=(T?y:b).right,k=(E?y:b).top,A=(E?y:b).bottom;if(_&&(a=!0,!g))return;if(v&&(a=!1),v&&!g){a=!0;return}if(g&&isElement(e.relatedTarget)&&contains(c.floating,e.relatedTarget)||d&&getNodeChildren(d.nodesRef.current,u).length)return;if(x===`top`&&o>=y.bottom-1||x===`bottom`&&o<=y.top+1||x===`left`&&n>=y.right-1||x===`right`&&n<=y.left+1)return close();let j=[];switch(x){case`top`:j=[[D,y.top+1],[D,b.bottom-1],[O,b.bottom-1],[O,y.top+1]];break;case`bottom`:j=[[D,b.top+1],[D,y.bottom-1],[O,y.bottom-1],[O,b.top+1]];break;case`left`:j=[[b.right-1,A],[b.right-1,k],[y.left+1,k],[y.left+1,A]];break;case`right`:j=[[y.right-1,A],[y.right-1,k],[b.left+1,k],[b.left+1,A]];break}function getPolygon(e){let[n,r]=e;switch(x){case`top`:return[[T?n+t/2:S?n+t*4:n-t*4,r+t+1],[T?n-t/2:S?n+t*4:n-t*4,r+t+1],[b.left,S||T?b.bottom-t:b.top],[b.right,S?T?b.bottom-t:b.top:b.bottom-t]];case`bottom`:return[[T?n+t/2:S?n+t*4:n-t*4,r-t],[T?n-t/2:S?n+t*4:n-t*4,r-t],[b.left,S||T?b.top+t:b.bottom],[b.right,S?T?b.top+t:b.bottom:b.top+t]];case`left`:{let e=[n+t+1,E?r+t/2:C?r+t*4:r-t*4],i=[n+t+1,E?r-t/2:C?r+t*4:r-t*4];return[[C||E?b.right-t:b.left,b.top],[C?E?b.right-t:b.left:b.right-t,b.bottom],e,i]}case`right`:return[[n-t,E?r+t/2:C?r+t*4:r-t*4],[n-t,E?r-t/2:C?r+t*4:r-t*4],[C||E?b.left+t:b.right,b.top],[C?E?b.left+t:b.right:b.left+t,b.bottom]]}}if(!isPointInPolygon([f,p],j)){if(a&&!w)return close();if(!g&&r){let t=getCursorSpeed(e.clientX,e.clientY);if(t!==null&&t<.1)return close()}isPointInPolygon([f,p],getPolygon([n,o]))?!a&&r&&(i.current=window.setTimeout(close,40)):close()}}};return fn.__options={blockPointerEvents:n},fn}var J,et,tt,Y,nt,X,rt,it,at,ot,st,ct,lt,Z,Q,ut,dt,ft,genId,pt,mt,ht,gt,useFloatingParentNodeId,useFloatingTree,_t,NOOP,vt,useDelayGroupContext,yt,bt,xt,St,Ct,wt,supportsInert,correctElements,Tt,Et,Dt,Ot,kt,usePortalContext,At,jt,Mt,Nt,Pt,cleanup,Ft,It,Lt,normalizeProp,Rt,zt,camelCaseToKebabCase,inner,Bt=__esmMin((()=>{we(),J=Ee(),p(),ge(),Qe(),E(),et=e.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}}),tt=`data-floating-ui-focusable`,Y=`active`,nt=`selected`,X=`ArrowLeft`,rt=`ArrowRight`,it=`ArrowUp`,at=`ArrowDown`,ot=e.createContext({activeIndex:0,onNavigate:()=>{}}),st=[X,rt],ct=[it,at],lt=[...st,...ct],Z=e.forwardRef(function Composite(t,n){let{render:r,orientation:i=`both`,loop:a=!0,rtl:o=!1,cols:s=1,disabledIndices:c,activeIndex:l,onNavigate:u,itemSizes:d,dense:f=!1,...p}=t,[m,h]=e.useState(0),g=l??m,_=useEffectEvent(u??h),v=e.useRef([]),y=r&&typeof r!=`function`?r.props:{},b=e.useMemo(()=>({activeIndex:g,onNavigate:_}),[g,_]),x=s>1;function handleKeyDown(e){if(!lt.includes(e.key))return;let t=g,n=getMinListIndex(v,c),r=getMaxListIndex(v,c),l=o?X:rt,u=o?rt:X;if(x){let u=d||Array.from({length:v.current.length},()=>({width:1,height:1})),p=createGridCellMap(u,s,f),m=p.findIndex(e=>e!=null&&!isListIndexDisabled(v,e,c)),h=p.reduce((e,t,n)=>t!=null&&!isListIndexDisabled(v,t,c)?n:e,-1),_=p[getGridNavigatedIndex({current:p.map(e=>e?v.current[e]:null)},{event:e,orientation:i,loop:a,rtl:o,cols:s,disabledIndices:getGridCellIndices([...(typeof c==`function`?null:c)||v.current.map((e,t)=>isListIndexDisabled(v,t,c)?t:void 0),void 0],p),minIndex:m,maxIndex:h,prevIndex:getGridCellIndexOfCorner(g>r?n:g,u,p,s,e.key===at?`bl`:e.key===l?`tr`:`tl`)})];_!=null&&(t=_)}let p={horizontal:[l],vertical:[at],both:[l,at]}[i],m={horizontal:[u],vertical:[it],both:[u,it]}[i],h=x?lt:{horizontal:st,vertical:ct,both:lt}[i];if(t===g&&[...p,...m].includes(e.key)&&(t=a&&t===r&&p.includes(e.key)?n:a&&t===n&&m.includes(e.key)?r:findNonDisabledListIndex(v,{startingIndex:t,decrement:m.includes(e.key),disabledIndices:c})),t!==g&&!isIndexOutOfListBounds(v,t)){var y;e.stopPropagation(),h.includes(e.key)&&e.preventDefault(),_(t),(y=v.current[t])==null||y.focus()}}let S={...p,...y,ref:n,"aria-orientation":i===`both`?void 0:i,onKeyDown(e){p.onKeyDown==null||p.onKeyDown(e),y.onKeyDown==null||y.onKeyDown(e),handleKeyDown(e)}};return(0,J.jsx)(ot.Provider,{value:b,children:(0,J.jsx)(FloatingList,{elementsRef:v,children:renderJsx(r,S)})})}),Q=e.forwardRef(function CompositeItem(t,n){let{render:r,...i}=t,a=r&&typeof r!=`function`?r.props:{},{activeIndex:o,onNavigate:s}=e.useContext(ot),{ref:c,index:l}=useListItem(),u=useMergeRefs([c,n,a.ref]),d=o===l;return renderJsx(r,{...i,...a,ref:u,tabIndex:d?0:-1,"data-active":d?``:void 0,onFocus(e){i.onFocus==null||i.onFocus(e),a.onFocus==null||a.onFocus(e),s(l)}})}),ut={...e},dt=!1,ft=0,genId=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+ft++,pt=ut.useId||useFloatingId,mt=e.forwardRef(function FloatingArrow(t,n){let{context:{placement:r,elements:{floating:i},middlewareData:{arrow:a,shift:o}},width:s=14,height:c=7,tipRadius:l=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:m,...h}={},...g}=t,_=pt(),[v,y]=e.useState(!1);if(U(()=>{i&&getComputedStyle$1(i).direction===`rtl`&&y(!0)},[i]),!i)return null;let[b,x]=r.split(`-`),S=b===`top`||b===`bottom`,C=d;(S&&o!=null&&o.x||!S&&o!=null&&o.y)&&(C=null);let w=u*2,T=w/2,E=s/2*(l/-8+1),D=c/2*l/4,O=!!p,k=C&&x===`end`?`bottom`:`top`,A=C&&x===`end`?`right`:`left`;C&&v&&(A=x===`end`?`left`:`right`);let j=a?.x==null?``:C||a.x,M=a?.y==null?``:C||a.y,N=p||`M0,0`+(` H`+s)+(` L`+(s-E)+`,`+(c-D))+(` Q`+s/2+`,`+c+` `+E+`,`+(c-D))+` Z`,P={top:O?`rotate(180deg)`:``,left:O?`rotate(90deg)`:`rotate(-90deg)`,bottom:O?``:`rotate(180deg)`,right:O?`rotate(-90deg)`:`rotate(90deg)`}[b];return(0,J.jsxs)(`svg`,{...g,"aria-hidden":!0,ref:n,width:O?s:s+w,height:s,viewBox:`0 0 `+s+` `+(c>s?c:s),style:{position:`absolute`,pointerEvents:`none`,[A]:j,[k]:M,[b]:S||O?`100%`:`calc(100% - `+w/2+`px)`,transform:[P,m].filter(e=>!!e).join(` `),...h},children:[w>0&&(0,J.jsx)(`path`,{clipPath:`url(#`+_+`)`,fill:`none`,stroke:f,strokeWidth:w+ +!p,d:N}),(0,J.jsx)(`path`,{stroke:w&&!p?g.fill:`none`,d:N}),(0,J.jsx)(`clipPath`,{id:_,children:(0,J.jsx)(`rect`,{x:-T,y:T*(O?-1:1),width:s+w,height:s})})]})}),ht=e.createContext(null),gt=e.createContext(null),useFloatingParentNodeId=()=>e.useContext(ht)?.id||null,useFloatingTree=()=>e.useContext(gt),_t=createAttribute(`safe-polygon`),NOOP=()=>{},vt=e.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:NOOP,setState:NOOP,isInstantPhase:!1}),useDelayGroupContext=()=>e.useContext(vt),yt=e.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeoutIdRef:{current:-1},currentIdRef:{current:null},currentContextRef:{current:null}}),bt=0,xt={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap},St=new WeakSet,Ct={},wt=0,supportsInert=()=>typeof HTMLElement<`u`&&`inert`in HTMLElement.prototype,correctElements=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=unwrapHost(t);return e.contains(n)?n:null}).filter(e=>e!=null),Tt={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},Et=e.forwardRef(function FocusGuard(t,n){let[r,i]=e.useState();U(()=>{isSafari()&&i(`button`)},[]);let a={ref:n,tabIndex:0,role:r,"aria-hidden":!r||void 0,[createAttribute(`focus-guard`)]:``,style:Tt};return(0,J.jsx)(`span`,{...t,...a})}),Dt={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Ot=e.createContext(null),kt=createAttribute(`portal`),usePortalContext=()=>e.useContext(Ot),At=20,jt=[],Mt=e.forwardRef(function VisuallyHiddenDismiss(e,t){return(0,J.jsx)(`button`,{...e,type:`button`,ref:t,tabIndex:-1,style:Tt})}),Nt=0,Pt=`--floating-ui-scrollbar-width`,cleanup=()=>{},Ft=e.forwardRef(function FloatingOverlay(e,t){let{lockScroll:n=!1,...r}=e;return U(()=>{if(n)return Nt++,Nt===1&&(cleanup=enableScrollLock()),()=>{Nt--,Nt===0&&cleanup()}},[n]),(0,J.jsx)(`div`,{ref:t,...r,style:{position:`fixed`,overflow:`auto`,top:0,right:0,bottom:0,left:0,...r.style}})}),It={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},Lt={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},normalizeProp=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}),Rt=`Escape`,zt=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]),camelCaseToKebabCase=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?`-`:``)+e.toLowerCase()),inner=e=>({name:`inner`,options:e,async fn(n){let{listRef:r,overflowRef:i,onFallbackChange:a,offset:o=0,index:s=0,minItemsVisible:c=4,referenceOverflowThreshold:l=0,scrollRef:u,...d}=evaluate(e,n),{rects:f,platform:p,elements:{floating:m}}=n,h=r.current[s],g=u?.current||m,b=m.clientTop||g.clientTop,x=m.clientTop!==0,S=g.clientTop!==0,C=m===g;if(!h)return{};let w={...n,...await offset(-h.offsetTop-m.clientTop-f.reference.height/2-h.offsetHeight/2-o).fn(n)},T=await p.detectOverflow(getArgsWithCustomFloatingHeight(w,g.scrollHeight+b+m.clientTop),d),E=await p.detectOverflow(w,{...d,elementContext:`reference`}),D=v(0,T.top),O=w.y+D,k=(g.scrollHeight>g.clientHeight?e=>e:y)(v(0,g.scrollHeight+(x&&C||S?b*2:0)-D-v(0,T.bottom)));if(g.style.maxHeight=k+`px`,g.scrollTop=D,a){let e=g.offsetHeight<h.offsetHeight*_(c,r.current.length)-1||E.top>=-l||E.bottom>=-l;t.flushSync(()=>a(e))}return i&&(i.current=await p.detectOverflow(getArgsWithCustomFloatingHeight({...w,y:O},g.offsetHeight+b+m.clientTop),d)),{y:O}}})})),Vt=__commonJSMin(((e,t)=>{var{entries:n,setPrototypeOf:r,isFrozen:i,getPrototypeOf:a,getOwnPropertyDescriptor:o}=Object,{freeze:s,seal:c,create:l}=Object,{apply:u,construct:d}=typeof Reflect<`u`&&Reflect;s||=function freeze(e){return e},c||=function seal(e){return e},u||=function apply(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},d||=function construct(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var f=unapply(Array.prototype.forEach),p=unapply(Array.prototype.lastIndexOf),m=unapply(Array.prototype.pop),h=unapply(Array.prototype.push),g=unapply(Array.prototype.splice),_=unapply(String.prototype.toLowerCase),v=unapply(String.prototype.toString),y=unapply(String.prototype.match),b=unapply(String.prototype.replace),x=unapply(String.prototype.indexOf),S=unapply(String.prototype.trim),C=unapply(Object.prototype.hasOwnProperty),w=unapply(RegExp.prototype.test),T=unconstruct(TypeError);function unapply(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return u(e,t,r)}}function unconstruct(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return d(e,n)}}function addToSet(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_;r&&r(e,null);let a=t.length;for(;a--;){let r=t[a];if(typeof r==`string`){let e=n(r);e!==r&&(i(t)||(t[a]=e),r=e)}e[r]=!0}return e}function cleanArray(e){for(let t=0;t<e.length;t++)C(e,t)||(e[t]=null);return e}function clone(e){let t=l(null);for(let[r,i]of n(e))C(e,r)&&(Array.isArray(i)?t[r]=cleanArray(i):i&&typeof i==`object`&&i.constructor===Object?t[r]=clone(i):t[r]=i);return t}function lookupGetter(e,t){for(;e!==null;){let n=o(e,t);if(n){if(n.get)return unapply(n.get);if(typeof n.value==`function`)return unapply(n.value)}e=a(e)}function fallbackValue(){return null}return fallbackValue}var E=s(`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`.split(`.`)),D=s(`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`.split(`.`)),O=s([`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`]),k=s([`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`]),A=s(`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`.split(`.`)),j=s([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),M=s([`#text`]),N=s(`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`.split(`.`)),P=s(`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`.split(`.`)),F=s(`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`.split(`.`)),ee=s([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),I=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),te=c(/<%[\w\W]*|[\w\W]*%>/gm),L=c(/\$\{[\w\W]*/gm),R=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),z=c(/^aria-[\-\w]+$/),ne=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),re=c(/^(?:\w+script|data):/i),ie=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ae=c(/^html$/i),oe=c(/^[a-z][.\w]*(-[.\w]+)+$/i),se=Object.freeze({__proto__:null,ARIA_ATTR:z,ATTR_WHITESPACE:ie,CUSTOM_ELEMENT:oe,DATA_ATTR:R,DOCTYPE_NAME:ae,ERB_EXPR:te,IS_ALLOWED_URI:ne,IS_SCRIPT_OR_DATA:re,MUSTACHE_EXPR:I,TMPLIT_EXPR:L}),ce={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},le=function getGlobal(){return typeof window>`u`?null:window},ue=function _createTrustedTypesPolicy(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},de=function _createHooksMap(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function createDOMPurify(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:le(),DOMPurify=e=>createDOMPurify(e);if(DOMPurify.version=`3.3.0`,DOMPurify.removed=[],!e||!e.document||e.document.nodeType!==ce.document||!e.Element)return DOMPurify.isSupported=!1,DOMPurify;let{document:t}=e,r=t,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:c,Element:u,NodeFilter:d,NamedNodeMap:I=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:te,DOMParser:L,trustedTypes:R}=e,z=u.prototype,re=lookupGetter(z,`cloneNode`),ie=lookupGetter(z,`remove`),oe=lookupGetter(z,`nextSibling`),fe=lookupGetter(z,`childNodes`),pe=lookupGetter(z,`parentNode`);if(typeof o==`function`){let e=t.createElement(`template`);e.content&&e.content.ownerDocument&&(t=e.content.ownerDocument)}let B,V=``,{implementation:me,createNodeIterator:he,createDocumentFragment:ge,getElementsByTagName:_e}=t,{importNode:ve}=r,H=de();DOMPurify.isSupported=typeof n==`function`&&typeof pe==`function`&&me&&me.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ye,ERB_EXPR:be,TMPLIT_EXPR:xe,DATA_ATTR:U,ARIA_ATTR:Se,IS_SCRIPT_OR_DATA:Ce,ATTR_WHITESPACE:we,CUSTOM_ELEMENT:Te}=se,{IS_ALLOWED_URI:Ee}=se,W=null,De=addToSet({},[...E,...D,...O,...A,...M]),G=null,Oe=addToSet({},[...N,...P,...F,...ee]),K=Object.seal(l(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}})),ke=null,Ae=null,je=Object.seal(l(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Me=!0,Ne=!0,Pe=!1,Fe=!0,Ie=!1,Le=!0,Re=!1,ze=!1,Be=!1,Ve=!1,He=!1,Ue=!1,We=!0,Ge=!1,Ke=!0,qe=!1,Je={},Ye=null,Xe=addToSet({},[`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`]),Ze=null,Qe=addToSet({},[`audio`,`video`,`img`,`source`,`image`,`track`]),$e=null,J=addToSet({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),et=`http://www.w3.org/1998/Math/MathML`,tt=`http://www.w3.org/2000/svg`,Y=`http://www.w3.org/1999/xhtml`,nt=Y,X=!1,rt=null,it=addToSet({},[et,tt,Y],v),at=addToSet({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),ot=addToSet({},[`annotation-xml`]),st=addToSet({},[`title`,`style`,`font`,`a`,`script`]),ct=null,lt=[`application/xhtml+xml`,`text/html`],Z=null,Q=null,ut=t.createElement(`form`),dt=function isRegexOrFunction(e){return e instanceof RegExp||e instanceof Function},ft=function _parseConfig(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Q&&Q===e)){if((!e||typeof e!=`object`)&&(e={}),e=clone(e),ct=lt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Z=ct===`application/xhtml+xml`?v:_,W=C(e,`ALLOWED_TAGS`)?addToSet({},e.ALLOWED_TAGS,Z):De,G=C(e,`ALLOWED_ATTR`)?addToSet({},e.ALLOWED_ATTR,Z):Oe,rt=C(e,`ALLOWED_NAMESPACES`)?addToSet({},e.ALLOWED_NAMESPACES,v):it,$e=C(e,`ADD_URI_SAFE_ATTR`)?addToSet(clone(J),e.ADD_URI_SAFE_ATTR,Z):J,Ze=C(e,`ADD_DATA_URI_TAGS`)?addToSet(clone(Qe),e.ADD_DATA_URI_TAGS,Z):Qe,Ye=C(e,`FORBID_CONTENTS`)?addToSet({},e.FORBID_CONTENTS,Z):Xe,ke=C(e,`FORBID_TAGS`)?addToSet({},e.FORBID_TAGS,Z):clone({}),Ae=C(e,`FORBID_ATTR`)?addToSet({},e.FORBID_ATTR,Z):clone({}),Je=C(e,`USE_PROFILES`)?e.USE_PROFILES:!1,Me=e.ALLOW_ARIA_ATTR!==!1,Ne=e.ALLOW_DATA_ATTR!==!1,Pe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ie=e.SAFE_FOR_TEMPLATES||!1,Le=e.SAFE_FOR_XML!==!1,Re=e.WHOLE_DOCUMENT||!1,Ve=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Ue=e.RETURN_TRUSTED_TYPE||!1,Be=e.FORCE_BODY||!1,We=e.SANITIZE_DOM!==!1,Ge=e.SANITIZE_NAMED_PROPS||!1,Ke=e.KEEP_CONTENT!==!1,qe=e.IN_PLACE||!1,Ee=e.ALLOWED_URI_REGEXP||ne,nt=e.NAMESPACE||Y,at=e.MATHML_TEXT_INTEGRATION_POINTS||at,ot=e.HTML_INTEGRATION_POINTS||ot,K=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(K.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Ne=!1),He&&(Ve=!0),Je&&(W=addToSet({},M),G=[],Je.html===!0&&(addToSet(W,E),addToSet(G,N)),Je.svg===!0&&(addToSet(W,D),addToSet(G,P),addToSet(G,ee)),Je.svgFilters===!0&&(addToSet(W,O),addToSet(G,P),addToSet(G,ee)),Je.mathMl===!0&&(addToSet(W,A),addToSet(G,F),addToSet(G,ee))),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?je.tagCheck=e.ADD_TAGS:(W===De&&(W=clone(W)),addToSet(W,e.ADD_TAGS,Z))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?je.attributeCheck=e.ADD_ATTR:(G===Oe&&(G=clone(G)),addToSet(G,e.ADD_ATTR,Z))),e.ADD_URI_SAFE_ATTR&&addToSet($e,e.ADD_URI_SAFE_ATTR,Z),e.FORBID_CONTENTS&&(Ye===Xe&&(Ye=clone(Ye)),addToSet(Ye,e.FORBID_CONTENTS,Z)),Ke&&(W[`#text`]=!0),Re&&addToSet(W,[`html`,`head`,`body`]),W.table&&(addToSet(W,[`tbody`]),delete ke.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw T(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw T(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);B=e.TRUSTED_TYPES_POLICY,V=B.createHTML(``)}else B===void 0&&(B=ue(R,i)),B!==null&&typeof V==`string`&&(V=B.createHTML(``));s&&s(e),Q=e}},pt=addToSet({},[...D,...O,...k]),mt=addToSet({},[...A,...j]),ht=function _checkValidNamespace(e){let t=pe(e);(!t||!t.tagName)&&(t={namespaceURI:nt,tagName:`template`});let n=_(e.tagName),r=_(t.tagName);return rt[e.namespaceURI]?e.namespaceURI===tt?t.namespaceURI===Y?n===`svg`:t.namespaceURI===et?n===`svg`&&(r===`annotation-xml`||at[r]):!!pt[n]:e.namespaceURI===et?t.namespaceURI===Y?n===`math`:t.namespaceURI===tt?n===`math`&&ot[r]:!!mt[n]:e.namespaceURI===Y?t.namespaceURI===tt&&!ot[r]||t.namespaceURI===et&&!at[r]?!1:!mt[n]&&(st[n]||!pt[n]):!!(ct===`application/xhtml+xml`&&rt[e.namespaceURI]):!1},gt=function _forceRemove(e){h(DOMPurify.removed,{element:e});try{pe(e).removeChild(e)}catch{ie(e)}},_t=function _removeAttribute(e,t){try{h(DOMPurify.removed,{attribute:t.getAttributeNode(e),from:t})}catch{h(DOMPurify.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e===`is`)if(Ve||He)try{gt(t)}catch{}else try{t.setAttribute(e,``)}catch{}},vt=function _initDocument(e){let n=null,r=null;if(Be)e=`<remove></remove>`+e;else{let t=y(e,/^[\r\n\t ]+/);r=t&&t[0]}ct===`application/xhtml+xml`&&nt===Y&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=B?B.createHTML(e):e;if(nt===Y)try{n=new L().parseFromString(i,ct)}catch{}if(!n||!n.documentElement){n=me.createDocument(nt,`template`,null);try{n.documentElement.innerHTML=X?V:i}catch{}}let a=n.body||n.documentElement;return e&&r&&a.insertBefore(t.createTextNode(r),a.childNodes[0]||null),nt===Y?_e.call(n,Re?`html`:`body`)[0]:Re?n.documentElement:a},yt=function _createNodeIterator(e){return he.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},bt=function _isClobbered(e){return e instanceof te&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof I)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},xt=function _isNode(e){return typeof c==`function`&&e instanceof c};function _executeHooks(e,t,n){f(e,e=>{e.call(DOMPurify,t,n,Q)})}let St=function _sanitizeElements(e){let t=null;if(_executeHooks(H.beforeSanitizeElements,e,null),bt(e))return gt(e),!0;let n=Z(e.nodeName);if(_executeHooks(H.uponSanitizeElement,e,{tagName:n,allowedTags:W}),Le&&e.hasChildNodes()&&!xt(e.firstElementChild)&&w(/<[/\w!]/g,e.innerHTML)&&w(/<[/\w!]/g,e.textContent)||e.nodeType===ce.progressingInstruction||Le&&e.nodeType===ce.comment&&w(/<[/\w]/g,e.data))return gt(e),!0;if(!(je.tagCheck instanceof Function&&je.tagCheck(n))&&(!W[n]||ke[n])){if(!ke[n]&&wt(n)&&(K.tagNameCheck instanceof RegExp&&w(K.tagNameCheck,n)||K.tagNameCheck instanceof Function&&K.tagNameCheck(n)))return!1;if(Ke&&!Ye[n]){let t=pe(e)||e.parentNode,n=fe(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=re(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,oe(e))}}}return gt(e),!0}return e instanceof u&&!ht(e)||(n===`noscript`||n===`noembed`||n===`noframes`)&&w(/<\/no(script|embed|frames)/i,e.innerHTML)?(gt(e),!0):(Ie&&e.nodeType===ce.text&&(t=e.textContent,f([ye,be,xe],e=>{t=b(t,e,` `)}),e.textContent!==t&&(h(DOMPurify.removed,{element:e.cloneNode()}),e.textContent=t)),_executeHooks(H.afterSanitizeElements,e,null),!1)},Ct=function _isValidAttribute(e,n,r){if(We&&(n===`id`||n===`name`)&&(r in t||r in ut))return!1;if(!(Ne&&!Ae[n]&&w(U,n))&&!(Me&&w(Se,n))&&!(je.attributeCheck instanceof Function&&je.attributeCheck(n,e))){if(!G[n]||Ae[n]){if(!(wt(e)&&(K.tagNameCheck instanceof RegExp&&w(K.tagNameCheck,e)||K.tagNameCheck instanceof Function&&K.tagNameCheck(e))&&(K.attributeNameCheck instanceof RegExp&&w(K.attributeNameCheck,n)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(n,e))||n===`is`&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&w(K.tagNameCheck,r)||K.tagNameCheck instanceof Function&&K.tagNameCheck(r))))return!1}else if(!$e[n]&&!w(Ee,b(r,we,``))&&!((n===`src`||n===`xlink:href`||n===`href`)&&e!==`script`&&x(r,`data:`)===0&&Ze[e])&&!(Pe&&!w(Ce,b(r,we,``)))&&r)return!1}return!0},wt=function _isBasicCustomElement(e){return e!==`annotation-xml`&&y(e,Te)},Tt=function _sanitizeAttributes(e){_executeHooks(H.beforeSanitizeAttributes,e,null);let{attributes:t}=e;if(!t||bt(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0},r=t.length;for(;r--;){let{name:i,namespaceURI:a,value:o}=t[r],s=Z(i),c=o,l=i===`value`?c:S(c);if(n.attrName=s,n.attrValue=l,n.keepAttr=!0,n.forceKeepAttr=void 0,_executeHooks(H.uponSanitizeAttribute,e,n),l=n.attrValue,Ge&&(s===`id`||s===`name`)&&(_t(i,e),l=`user-content-`+l),Le&&w(/((--!?|])>)|<\/(style|title|textarea)/i,l)){_t(i,e);continue}if(s===`attributename`&&y(l,`href`)){_t(i,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){_t(i,e);continue}if(!Fe&&w(/\/>/i,l)){_t(i,e);continue}Ie&&f([ye,be,xe],e=>{l=b(l,e,` `)});let u=Z(e.nodeName);if(!Ct(u,s,l)){_t(i,e);continue}if(B&&typeof R==`object`&&typeof R.getAttributeType==`function`&&!a)switch(R.getAttributeType(u,s)){case`TrustedHTML`:l=B.createHTML(l);break;case`TrustedScriptURL`:l=B.createScriptURL(l);break}if(l!==c)try{a?e.setAttributeNS(a,i,l):e.setAttribute(i,l),bt(e)?gt(e):m(DOMPurify.removed)}catch{_t(i,e)}}_executeHooks(H.afterSanitizeAttributes,e,null)},Et=function _sanitizeShadowDOM(e){let t=null,n=yt(e);for(_executeHooks(H.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)_executeHooks(H.uponSanitizeShadowNode,t,null),St(t),Tt(t),t.content instanceof a&&_sanitizeShadowDOM(t.content);_executeHooks(H.afterSanitizeShadowDOM,e,null)};return DOMPurify.sanitize=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=null,i=null,o=null,s=null;if(X=!e,X&&(e=`<!-->`),typeof e!=`string`&&!xt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw T(`dirty is not a string, aborting`)}else throw T(`toString is not a function`);if(!DOMPurify.isSupported)return e;if(ze||ft(t),DOMPurify.removed=[],typeof e==`string`&&(qe=!1),qe){if(e.nodeName){let t=Z(e.nodeName);if(!W[t]||ke[t])throw T(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof c)n=vt(`<!---->`),i=n.ownerDocument.importNode(e,!0),i.nodeType===ce.element&&i.nodeName===`BODY`||i.nodeName===`HTML`?n=i:n.appendChild(i);else{if(!Ve&&!Ie&&!Re&&e.indexOf(`<`)===-1)return B&&Ue?B.createHTML(e):e;if(n=vt(e),!n)return Ve?null:Ue?V:``}n&&Be&>(n.firstChild);let l=yt(qe?e:n);for(;o=l.nextNode();)St(o),Tt(o),o.content instanceof a&&Et(o.content);if(qe)return e;if(Ve){if(He)for(s=ge.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(G.shadowroot||G.shadowrootmode)&&(s=ve.call(r,s,!0)),s}let u=Re?n.outerHTML:n.innerHTML;return Re&&W[`!doctype`]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&w(ae,n.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+n.ownerDocument.doctype.name+`> `+u),Ie&&f([ye,be,xe],e=>{u=b(u,e,` `)}),B&&Ue?B.createHTML(u):u},DOMPurify.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ft(e),ze=!0},DOMPurify.clearConfig=function(){Q=null,ze=!1},DOMPurify.isValidAttribute=function(e,t,n){Q||ft({});let r=Z(e),i=Z(t);return Ct(r,i,n)},DOMPurify.addHook=function(e,t){typeof t==`function`&&h(H[e],t)},DOMPurify.removeHook=function(e,t){if(t!==void 0){let n=p(H[e],t);return n===-1?void 0:g(H[e],n,1)[0]}return m(H[e])},DOMPurify.removeHooks=function(e){H[e]=[]},DOMPurify.removeAllHooks=function(){H=de()},DOMPurify}t.exports=createDOMPurify()})),Ht=__commonJSMin((e=>{var t=globalThis.ReactDOM;e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),Ut=__toESM(__commonJSMin(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>__copyProps(r({},`__esModule`,{value:!0}),e),c={};__export(c,{BREAKPOINTS_SCHEMA_FULL_URI:()=>_,BREAKPOINTS_SCHEMA_URI:()=>g,DOCUMENT_STRUCTURE_URI:()=>Gr,ELEMENT_ADDED_EVENT:()=>la,GLOBAL_STYLES_IMPORTED_EVENT:()=>ia,SpotlightBackdrop:()=>SpotlightBackdrop,UnknownStyleStateError:()=>X,UnknownStyleTypeError:()=>nt,WIDGET_SCHEMA_FULL_URI:()=>m,WIDGET_SCHEMA_URI:()=>p,canBeNestedTemplated:()=>canBeNestedTemplated,convertCssToAtomic:()=>convertCssToAtomic,convertStyleBlocksToAtomic:()=>convertStyleBlocksToAtomic,createNestedTemplatedElementType:()=>createNestedTemplatedElementType,createNestedTemplatedElementView:()=>createNestedTemplatedElementView,createPropsResolver:()=>createPropsResolver,createTemplatedElementView:()=>createTemplatedElementView,createTransformer:()=>createTransformer,createTransformersRegistry:()=>createTransformersRegistry,doAfterRender:()=>doAfterRender,endDragElementFromPanel:()=>endDragElementFromPanel,formatGridTrackRepeat:()=>formatGridTrackRepeat,init:()=>init,isAtomicWidget:()=>isAtomicWidget,isGridTrackProperty:()=>isGridTrackProperty,registerElementType:()=>registerElementType,registerModelExtensions:()=>registerModelExtensions,settingsTransformersRegistry:()=>It,startDragElementFromPanel:()=>startDragElementFromPanel,styleTransformersRegistry:()=>Ze,stylesInheritanceTransformersRegistry:()=>Xe,useCanvasDocument:()=>useCanvasDocument,useEscapeOnCanvas:()=>useEscapeOnCanvas,waitForChildrenToComplete:()=>waitForChildrenToComplete}),t.exports=__toCommonJS(c);var l=globalThis.elementorV2.editorV1Adapters,u=globalThis.elementorV2.editorMcp,d=globalThis.elementorV2.httpClient,f=`editor-canvas`,p=`elementor://widgets/schema/{widgetType}`,m=`${f}_${p}`;`${f}`;var h=`elementor/v1/mcp-proxy`,listWidgetTypes=async()=>{let{data:e}=await(0,d.httpService)().post(h,{tool:`list-widget-schemas`,input:{summary:!0}});return(e.data?.widgets??[]).map(e=>e.type)},fetchWidgetSchema=async e=>{let{data:t}=await(0,d.httpService)().post(h,{tool:`get-widget-schemas`,input:{widget_type:[e]}}),n=t.data?.schemas?.[e];if(!n)throw Error(t.data?.errors?.[e]?.message??`No schema found for ${e}.`);return n},initWidgetsSchemaResource=e=>{let{resource:t}=e;t(`widget-schema-by-type`,new u.ResourceTemplate(p,{list:async()=>({resources:(await listWidgetTypes()).map(e=>({uri:`elementor://widgets/schema/${e}`,name:`Widget schema for `+e}))})}),{description:`PropType schema for the specified widget type`},async(e,t)=>{let n=typeof t.widgetType==`string`?t.widgetType:t.widgetType?.[0];if(!n)throw Error(`No widget type provided.`);let r=await fetchWidgetSchema(n);return{contents:[{uri:e.toString(),mimeType:`application/json`,text:JSON.stringify(r)}]}})},g=`elementor://breakpoints/list`,_=`${f}_${g}`,initBreakpointsResource=e=>{let{resource:t,sendResourceUpdated:n}=e,getBreakpointsList=()=>{let{breakpoints:e}=window.elementor?.config?.responsive||{};return e?Object.values(e).filter(e=>e.is_enabled).map(e=>{let{direction:t,label:n,value:r}=e;return{label:n,constraint:t,value:r}}):[]},buildResourceResponse=()=>({contents:[{uri:g,mimeType:`application/json`,text:JSON.stringify(getBreakpointsList())}]});t(`breakpoints `,g,{description:`Breakpoints list.`},()=>buildResourceResponse()),window.addEventListener((0,l.v1ReadyEvent)().name,()=>{n({uri:g,...buildResourceResponse()})})},v=globalThis.elementorV2.httpClient,y=`elementor/v1/css-to-atomic`,b=`default`,convertBlocks=async e=>{let{data:t}=await(0,v.httpService)().post(y,{blocks:e});return t.data},convertStyleBlocksToAtomic=async e=>convertBlocks(e),convertCssToAtomic=async e=>(await convertStyleBlocksToAtomic({[b]:e}))[b],x=globalThis.elementorV2.editor,S=globalThis.elementorV2.editorMcp,C=globalThis.React,w=globalThis.elementorV2.editorDocuments,T=globalThis.elementorV2.editorStylesRepository,E=globalThis.elementorV2.utils,ClassesRename=()=>((0,C.useEffect)(()=>{let e=subscribeToStylesRepository();return()=>{e()}},[]),null),subscribeToStylesRepository=()=>T.stylesRepository.subscribe((e,t)=>{!e||!t||Object.keys(t).forEach(n=>{if(!(e[n]&&(0,E.hash)(e[n])!==(0,E.hash)(t[n])))return;let r=e[n],i=t[n];r.label!==i.label&&renameClass(r.label,i.label)})}),renameClass=(e,t)=>{Object.values((0,w.getV1DocumentsManager)().documents).forEach(n=>{n.container.view?.el?.querySelectorAll(`.elementor .${e}`).forEach(n=>{n.classList.replace(e,t)})})},D=__toESM(globalThis.React),O=globalThis.elementorV2.editorElements,k=globalThis.elementorV2.editorV1Adapters,A=globalThis.React,j=globalThis.React,M=globalThis.elementorV2.utils;function useElementRect(e){let[t,n]=(0,j.useState)(new DOMRect(0,0,0,0)),r=(0,M.throttle)(()=>{n(e?.getBoundingClientRect()??new DOMRect(0,0,0,0))},20,!0);return useScrollListener({element:e,onChange:r}),useResizeListener({element:e,onChange:r}),useMutationsListener({element:e,onChange:r}),(0,j.useEffect)(()=>()=>{r.cancel()},[r]),t}function useScrollListener({element:e,onChange:t}){(0,j.useEffect)(()=>{if(!e)return;let n=e.ownerDocument?.defaultView;return n?.addEventListener(`scroll`,t,{passive:!0}),()=>{n?.removeEventListener(`scroll`,t)}},[e,t])}function useResizeListener({element:e,onChange:t}){(0,j.useEffect)(()=>{if(!e)return;let n=new ResizeObserver(t);n.observe(e);let r=e.ownerDocument?.defaultView;return r?.addEventListener(`resize`,t,{passive:!0}),()=>{n.disconnect(),r?.removeEventListener(`resize`,t)}},[e,t])}function useMutationsListener({element:e,onChange:t}){(0,j.useEffect)(()=>{if(!e)return;let n=new MutationObserver(t);return n.observe(e,{childList:!0,subtree:!0}),()=>{n.disconnect()}},[e,t])}var N=globalThis.React,P=globalThis.elementorV2.editorElements,F=globalThis.elementorV2.editorV1Adapters;function toGridTracks(e){return{columns:parseTrackList(e.gridTemplateColumns),rows:parseTrackList(e.gridTemplateRows),columnGap:resolveGapPx(e.columnGap,e.width),rowGap:resolveGapPx(e.rowGap,e.height),padding:{top:toPx(e.paddingTop),right:toPx(e.paddingRight),bottom:toPx(e.paddingBottom),left:toPx(e.paddingLeft)},borderColor:e.getPropertyValue(`--e-a-border-color-bold`).trim()}}function computeCellRects(e,t,n){let{columns:r,rows:i,columnGap:a,rowGap:o,padding:s}=e,c=r.length>0,l=i.length>0;if(!c&&!l)return[];let u=c?computeTrackSegments(r,a,s.left):[{start:s.left,size:t-s.left-s.right}],d=l?computeTrackSegments(i,o,s.top):[{start:s.top,size:n-s.top-s.bottom}],f=[];for(let e of d)for(let t of u)f.push({x:t.start,y:e.start,width:t.size,height:e.size});return f}function computeGridLines(e,t,n){let{columns:r,rows:i,columnGap:a,rowGap:o,padding:s}=e,c=r.length>0,l=i.length>0;if(!c&&!l)return{vertical:[],horizontal:[]};let u=c?computeTrackSegments(r,a,s.left):[{start:s.left,size:t-s.left-s.right}],d=l?computeTrackSegments(i,o,s.top):[{start:s.top,size:n-s.top-s.bottom}],f=uniqueSorted(u.flatMap(e=>[e.start,e.start+e.size])),p=uniqueSorted(d.flatMap(e=>[e.start,e.start+e.size])),m=p[0],h=p[p.length-1],g=f[0],_=f[f.length-1];return{vertical:f.map(e=>({x1:e,y1:m,x2:e,y2:h})),horizontal:p.map(e=>({x1:g,y1:e,x2:_,y2:e}))}}function uniqueSorted(e){return Array.from(new Set(e)).sort((e,t)=>e-t)}function computeTrackSegments(e,t,n){let r=[],i=n;for(let n=0;n<e.length;n++)r.push({start:i,size:e[n]}),i+=e[n],n<e.length-1&&(i+=t);return r}function snapToHalfPixel(e){return Math.round(e)+.5}function parseTrackList(e){return!e||e===`none`?[]:e.trim().split(/\s+/).map(toPx).filter(e=>e>0)}function toPx(e){let t=parseFloat(e);return Number.isFinite(t)?t:0}function resolveGapPx(e,t){if(e.trim().endsWith(`%`)){let n=parseFloat(e),r=parseFloat(t);return Number.isFinite(n)&&Number.isFinite(r)?n/100*r:0}return toPx(e)}var ee=globalThis.React;function useGridChildren(e){let[t,n]=(0,ee.useState)(0);return(0,ee.useEffect)(()=>{if(!e)return;let bump=()=>n(e=>e+1),t=new ResizeObserver(bump),r=new Set,syncChildren=()=>{for(let n of Array.from(e.children))r.has(n)||(t.observe(n),r.add(n));for(let n of r)n.parentElement!==e&&(t.unobserve(n),r.delete(n))};syncChildren();let i=new MutationObserver(()=>{syncChildren(),bump()});return i.observe(e,{childList:!0}),()=>{i.disconnect(),t.disconnect(),r.clear()}},[e]),t}var I={columns:[],rows:[],columnGap:0,rowGap:0,padding:{top:0,right:0,bottom:0,left:0},borderColor:``},te=`elementor/device-mode/change`;function useGridTracks(e,t){let[n,r]=(0,N.useState)(I),i=(0,F.__privateUseListenTo)([(0,F.windowEvent)(P.ELEMENT_STYLE_CHANGE_EVENT),(0,F.windowEvent)(te)],()=>({})),a=useGridChildren(e);return(0,N.useEffect)(()=>{let t=e?.ownerDocument?.defaultView;if(!e||!t){r(I);return}let n=t.requestAnimationFrame(()=>{r(toGridTracks(t.getComputedStyle(e)))});return()=>{t.cancelAnimationFrame(n)}},[e,t.width,t.height,i,a]),n}function findFirstEmptyCell(e,t,n){if(!e||t===0||n===0)return null;let r=e.ownerDocument?.defaultView;if(!r)return null;let i=r.getComputedStyle(e).gridAutoFlow.trim().startsWith(`column`),a=Array.from({length:n},()=>Array(t).fill(!1)),o=[],s=[];for(let t of Array.from(e.children)){if(!t.classList.contains(`elementor-element`))continue;let e=r.getComputedStyle(t);if(e.display===`none`)continue;let n=resolvePlacement(e.gridColumnStart,e.gridColumnEnd),i=resolvePlacement(e.gridRowStart,e.gridRowEnd);n.start!==null||i.start!==null?o.push({col:n.start,colSpan:n.span,row:i.start,rowSpan:i.span}):s.push({colSpan:n.span,rowSpan:i.span})}for(let e of o)fillMatrix(a,e.col??0,e.row??0,e.colSpan,e.rowSpan);for(let e of s){let t=findNextFreeSlot(a,e.colSpan,e.rowSpan,i);t&&fillMatrix(a,t.col,t.row,e.colSpan,e.rowSpan)}return scanFirstEmpty(a,i)}function resolvePlacement(e,t){let n=parseLineValue(e),r=parseLineValue(t);if(typeof n==`number`){let e=n-1;return typeof r==`number`?{start:e,span:Math.max(1,r-n)}:isSpan(r)?{start:e,span:r.n}:{start:e,span:1}}if(isSpan(n)){if(typeof r==`number`){let e=r-1-n.n;return{start:e>=0?e:null,span:n.n}}return{start:null,span:n.n}}if(typeof r==`number`){let e=r-2;return{start:e>=0?e:null,span:1}}return isSpan(r)?{start:null,span:r.n}:{start:null,span:1}}function parseLineValue(e){let t=e.trim();if(t===``||t===`auto`)return`auto`;let n=t.match(/^span\s+(\d+)$/);if(n){let e=parseInt(n[1],10);return{kind:`span`,n:Math.max(1,e)}}let r=parseInt(t,10);return Number.isFinite(r)&&r>0?r:`auto`}function isSpan(e){return typeof e==`object`&&!!e&&`kind`in e&&e.kind===`span`}function fillMatrix(e,t,n,r,i){let a=e.length,o=a>0?e[0].length:0,s=Math.max(0,n),c=Math.max(0,t),l=Math.min(a,n+i),u=Math.min(o,t+r);for(let t=s;t<l;t++)for(let n=c;n<u;n++)e[t][n]=!0}function findNextFreeSlot(e,t,n,r){let i=e.length,a=(i>0?e[0].length:0)-t,o=i-n;if(a<0||o<0)return null;if(r){for(let r=0;r<=a;r++)for(let i=0;i<=o;i++)if(canFit(e,r,i,t,n))return{row:i,col:r}}else for(let r=0;r<=o;r++)for(let i=0;i<=a;i++)if(canFit(e,i,r,t,n))return{row:r,col:i};return null}function canFit(e,t,n,r,i){for(let a=n;a<n+i;a++)for(let n=t;n<t+r;n++)if(e[a][n])return!1;return!0}function scanFirstEmpty(e,t){let n=e.length,r=n>0?e[0].length:0;if(t){for(let t=0;t<r;t++)for(let r=0;r<n;r++)if(!e[r][t])return{row:r,col:t}}else for(let t=0;t<n;t++)for(let n=0;n<r;n++)if(!e[t][n])return{row:t,col:n};return null}var L=`--e-grid-empty-cell-row`,R=`--e-grid-empty-cell-col`,z=`--e-grid-empty-cell-visibility`,clearGridEmptyCellStyles=e=>{e.style.removeProperty(L),e.style.removeProperty(R),e.style.removeProperty(z)},GridEmptyCellPositioner=({element:e})=>{let t=useGridTracks(e,useElementRect(e));return(0,A.useEffect)(()=>{if(!e)return;let n=findFirstEmptyCell(e,t.columns.length,t.rows.length);return n?(e.style.setProperty(L,String(n.row+1)),e.style.setProperty(R,String(n.col+1)),e.style.setProperty(z,`visible`),()=>{clearGridEmptyCellStyles(e)}):(e.style.removeProperty(L),e.style.removeProperty(R),e.style.setProperty(z,`hidden`),()=>clearGridEmptyCellStyles(e))},[e,t]),null},ne=__toESM(globalThis.React),re=globalThis.elementorV2.editorElements,ie=globalThis.elementorV2.ui,ae=(Bt(),__toCommonJS($e)),oe=globalThis.React,se=(Bt(),__toCommonJS($e));function useFloatingOnElement({element:e,isSelected:t}){let[n,r]=(0,oe.useState)(!1),{refs:i,floatingStyles:a,context:o}=(0,se.useFloating)({open:n||t,onOpenChange:r,whileElementsMounted:se.autoUpdate,middleware:[(0,se.size)(()=>({apply({elements:e,rects:t}){Object.assign(e.floating.style,{width:`${t.reference.width+2}px`,height:`${t.reference.height+2}px`})}})),(0,se.offset)(({rects:e})=>-e.reference.height/2-e.floating.height/2)]});return(0,oe.useEffect)(()=>{i.setReference(e)},[e,i]),{isVisible:n||t,context:o,floating:{setRef:i.setFloating,ref:i.floating,styles:a}}}var ce=__toESM(globalThis.React),le=globalThis.elementorV2.ui,ue=(Bt(),__toCommonJS($e)),de=globalThis.React;function useBindReactPropsToElement(e,t){(0,de.useEffect)(()=>{let n=e,{events:r,attrs:i}=groupProps(t());return r.forEach(([e,t])=>n.addEventListener(e,t)),i.forEach(([e,t])=>n.setAttribute(e,t)),()=>{r.forEach(([e,t])=>n.removeEventListener(e,t)),i.forEach(([e])=>n.removeAttribute(e))}},[t,e])}function groupProps(e){let t=/^on(?=[A-Z])/;return Object.entries(e).reduce((e,[n,r])=>{if(!t.test(n))return e.attrs.push([n,r]),e;let i=n.replace(t,``).toLowerCase(),a=r;return e.events.push([i,a]),e},{events:[],attrs:[]})}var fe=[`.e-off-canvas`],useHasOverlapping=()=>{let e=window.elementor?.$preview?.[0];return e?fe.map(t=>Array.from(e?.contentWindow?.document.body.querySelectorAll(t)??[])).flat().some(e=>e.checkVisibility({opacityProperty:!0,visibilityProperty:!0,contentVisibilityAuto:!0})):!1},pe=1,B=new Set([`e-form-input`]);function shouldUseSmallerOutlineOffset(e,t){return e.offsetHeight<=pe||t!==void 0&&B.has(t)}var V=`elementor-preview-responsive-wrapper`,me=(0,le.styled)(le.Box,{shouldForwardProp:e=>e!==`isSelected`&&e!==`isSmallerOffset`&&e!==`isGlobal`})(({theme:e,isSelected:t,isSmallerOffset:n,isGlobal:r})=>({outline:`${t?`2px`:`1px`} solid ${r?e.palette.global.main:e.palette.accent.light}`,outlineOffset:t&&!n?`-2px`:`-1px`,pointerEvents:`none`})),OutlineOverlay=({element:e,isSelected:t,id:n,isGlobal:r=!1,widgetType:i})=>{let{context:a,floating:o,isVisible:s}=useFloatingOnElement({element:e,isSelected:t}),{getFloatingProps:c,getReferenceProps:l}=(0,ue.useInteractions)([(0,ue.useHover)(a)]),u=useHasOverlapping();useBindReactPropsToElement(e,l);let d=shouldUseSmallerOutlineOffset(e,i);return s&&!u&&ce.createElement(ue.FloatingPortal,{id:V},ce.createElement(me,{ref:o.setRef,isSelected:t,isGlobal:r,style:o.styles,"data-element-overlay":n,role:`presentation`,isSmallerOffset:d,...c()}))},he=__toESM(globalThis.React),ge=globalThis.React,_e=__toESM(globalThis.React),ve=`rgba(0, 0, 0, 0.12)`;function Cell({x:e,y:t,width:n,height:r,color:i}){return _e.createElement(`rect`,{x:e,y:t,width:n,height:r,fill:`none`,stroke:i||ve,strokeWidth:1,strokeDasharray:`2 2`,vectorEffect:`non-scaling-stroke`})}var H=__toESM(globalThis.React),ye=19;function FirstEmptyCell({rect:e,color:t}){let n=Math.min(ye,e.width,e.height);if(n<=0)return null;let r=e.x+e.width/2,i=e.y+e.height/2;return H.createElement(`i`,{className:`eicon-plus`,"aria-hidden":`true`,style:{position:`absolute`,left:r,top:i,transform:`translate(-50%, -50%)`,fontSize:n,color:t,lineHeight:1,pointerEvents:`none`}})}var be=__toESM(globalThis.React),xe=`rgba(0, 0, 0, 0.12)`;function Line({x1:e,y1:t,x2:n,y2:r,color:i}){return be.createElement(`line`,{x1:e,y1:t,x2:n,y2:r,stroke:i||xe,strokeWidth:1,strokeDasharray:`2 2`,vectorEffect:`non-scaling-stroke`})}var renderCells=(e,t)=>e.map((e,n)=>he.createElement(Cell,{key:n,x:snapToHalfPixel(e.x),y:snapToHalfPixel(e.y),width:Math.round(e.width),height:Math.round(e.height),color:t})),renderLines=(e,t,n)=>{let{vertical:r,horizontal:i}=computeGridLines(e,t,n);return[...r.map((t,n)=>he.createElement(Line,{key:`v${n}`,x1:snapToHalfPixel(t.x1),y1:Math.round(t.y1),x2:snapToHalfPixel(t.x2),y2:Math.round(t.y2),color:e.borderColor})),...i.map((t,n)=>he.createElement(Line,{key:`h${n}`,x1:Math.round(t.x1),y1:snapToHalfPixel(t.y1),x2:Math.round(t.x2),y2:snapToHalfPixel(t.y2),color:e.borderColor}))]},isDragActiveFromDom=e=>!!e?.querySelector(`.e-dragging-over, .elementor-dragging-on-child, .elementor-draggable-over, .elementor-widget-placeholder, .elementor-sortable-placeholder`);function GridOutline({element:e,tracks:t,width:n,height:r}){let i=(0,ge.useMemo)(()=>computeCellRects(t,n,r),[t,n,r]),a=t.columnGap>0||t.rowGap>0,o=(0,ge.useMemo)(()=>findFirstEmptyCell(e,t.columns.length,t.rows.length),[e,t]),s=o&&t.columns.length>0?i[o.row*t.columns.length+o.col]:null;return he.createElement(he.Fragment,null,he.createElement(`svg`,{width:n,height:r,style:{position:`absolute`,inset:0,overflow:`visible`},xmlns:`http://www.w3.org/2000/svg`},a?renderCells(i,t.borderColor):renderLines(t,n,r)),s&&!isDragActiveFromDom(e)&&he.createElement(FirstEmptyCell,{rect:s,color:t.borderColor}))}var GridOutlineOverlay=({element:e,id:t,isSelected:n})=>{let r=(0,re.useElementEditorSettings)(t)?.grid_outline,i=useElementRect(e),a=useGridTracks(e,i),{floating:o}=useFloatingOnElement({element:e,isSelected:n});return r===!1||a.columns.length===0&&a.rows.length===0?null:ne.createElement(ae.FloatingPortal,{id:V},ne.createElement(ie.Box,{ref:o.setRef,style:{...o.styles,pointerEvents:`none`},"data-grid-outline":t,role:`presentation`},ne.createElement(GridOutline,{element:e,tracks:a,width:i.width,height:i.height})))},hasGridStyleDisplay=e=>e.computedStyleMap().get(`display`)?.toString()===`grid`,U=`atomic`,Se=[{component:OutlineOverlay,shouldRender:()=>!0},{component:GridEmptyCellPositioner,shouldRender:({element:e})=>hasGridStyleDisplay(e)},{component:GridOutlineOverlay,shouldRender:({isSelected:e,element:t})=>e&&hasGridStyleDisplay(t)}];function ElementsOverlays(){let e=(0,O.useSelectedElement)(),t=useElementsDom(),n=(0,k.useEditMode)()===`edit`,r=(0,k.__privateUseIsRouteActive)(`panel/global`);return n&&!r?t.map(({id:t,domElement:n,isGlobal:r,widgetType:i})=>{let a=e.element?.id===t;return Se.map(({shouldRender:e,component:o},s)=>e({id:t,element:n,isSelected:a,widgetType:i})&&D.createElement(o,{key:`${t}-${s}`,id:t,element:n,isSelected:a,isGlobal:r,widgetType:i}))}):null}function useElementsDom(){return(0,k.__privateUseListenTo)([(0,k.windowEvent)(`elementor/editor/element-rendered`),(0,k.windowEvent)(`elementor/editor/element-destroyed`)],()=>(0,O.getElements)().filter(e=>isV4Element(e.view?.el?.dataset)).map(e=>({id:e.id,domElement:e.view?.getDomElement?.()?.get?.(0),isGlobal:e.model.get(`isGlobal`)??!1,widgetType:e.model.get(`widgetType`)})).filter(e=>!!e.domElement))}function isV4Element(e){return e?U in e||`eType`in e:!1}var Ce=__toESM(globalThis.React),we=globalThis.elementorV2.editorV1Adapters,Te=globalThis.elementorV2.ui,Ee=globalThis.React,W=globalThis.elementorV2.editorInteractions,De=globalThis.elementorV2.editorV1Adapters,G=globalThis.React;function useOnMount(e){let t=(0,G.useRef)(!1);(0,G.useEffect)(()=>{t.current||(t.current=!0,e())},[])}function useInteractionsItems(){let[e,t]=(0,Ee.useState)({}),n=(0,Ee.useMemo)(()=>{try{return W.interactionsRepository.getProviders().map(e=>({provider:e,subscriber:createProviderSubscriber({provider:e,setInteractionItems:t})}))}catch{return[]}},[]);return(0,Ee.useEffect)(()=>{if(n.length===0)return;let e=n.map(({provider:e,subscriber:t})=>{let safeSubscriber=()=>{try{t()}catch{}};return e.subscribe(safeSubscriber)});return()=>{e.forEach(e=>e())}},[n]),useOnMount(()=>{n.length!==0&&(0,De.registerDataHook)(`after`,`editor/documents/attach-preview`,async()=>{n.forEach(({subscriber:e})=>{try{e()}catch{}})})}),(0,Ee.useMemo)(()=>Object.values(e).sort(sortByProviderPriority).flatMap(({items:e})=>e),[e])}function sortByProviderPriority({provider:e},{provider:t}){return e.priority-t.priority}function createProviderSubscriber({provider:e,setInteractionItems:t}){return()=>{try{let n=e.actions.all(),r=e.getKey();t(t=>({...t,[r]:{provider:e,items:n}}))}catch{}}}function InteractionsRenderer(){let e=usePortalContainer(),t=useInteractionsItems();if(!e)return null;let n=JSON.stringify(Array.isArray(t)?t:[]);return Ce.createElement(Te.Portal,{container:e},Ce.createElement(`script`,{type:`application/json`,"data-e-interactions":`true`,dangerouslySetInnerHTML:{__html:n}}))}function usePortalContainer(){return(0,we.__privateUseListenTo)((0,we.commandEndEvent)(`editor/documents/attach-preview`),()=>(0,we.getCanvasIframeDocument)()?.head)}var Oe=__toESM(globalThis.React),K=globalThis.elementorV2.editorV1Adapters,ke=globalThis.elementorV2.ui,Ae=globalThis.elementorV2.editorV1Adapters,je=`data-e-removed`,Me=`data-elementor-id`,Ne=`elementor-post-`,Pe=`-css`;function useDocumentsCssLinks(){return(0,Ae.__privateUseListenTo)((0,Ae.commandEndEvent)(`editor/documents/attach-preview`),()=>{let e=(0,Ae.getCanvasIframeDocument)();if(!e)return[];let t=getDocumentsIdsInCanvas(e).map(e=>`${Ne}${e}${Pe}`),n=getDocumentsCssLinks(e).filter(e=>t.includes(e.getAttribute(`id`)??``));return n.forEach(e=>{e.hasAttribute(je)||e.remove()}),n.map(e=>({...getLinkAttrs(e),id:e.getAttribute(`id`)??``,[je]:!0}))})}function getDocumentsIdsInCanvas(e){return[...e.body.querySelectorAll(`[${Me}]`)??[]].map(e=>e.getAttribute(Me)||``)}function getDocumentsCssLinks(e){return[...e.head.querySelectorAll(`link[rel="stylesheet"][id^=${Ne}][id$=${Pe}]`)??[]]}function getLinkAttrs(e){let t=[...e.attributes].map(e=>[e.name,e.value]);return Object.fromEntries(t)}var Fe=globalThis.React,Ie=globalThis.elementorV2.editorResponsive,Le=globalThis.elementorV2.editorStyles,Re=globalThis.elementorV2.editorStylesRepository,ze=globalThis.elementorV2.editorV1Adapters;function abortPreviousRuns(e){let t=null;return(...n)=>(t&&t.abort(),t=new AbortController,e(t,...n))}var Be=globalThis.elementorV2.editorV1Adapters,Ve=new Set;function removeProviderPregeneratedLinks(e,t){if(Ve.has(e))return;let n=(0,Be.getCanvasIframeDocument)();n&&(n.head.querySelectorAll(`link[rel="stylesheet"]`).forEach(e=>{let{id:n,href:r,media:i}=e;t({id:n,href:r,media:i})&&e.remove()}),Ve.add(e))}function resetRemovedProviders(){Ve.clear()}function signalizedProcess(e,t=[]){return{then:n=>(t.push(n),signalizedProcess(e,t)),execute:async()=>{let n;for(let r of t){if(e.aborted)break;n=await r(n,e)}}}}var He=globalThis.React,Ue=globalThis.elementorV2.editorV1Adapters;function usePregeneratedLinksHandoff(e,t){(0,He.useLayoutEffect)(()=>{isCurrentCanvasHead(e)&&Object.entries(t).forEach(([e,{provider:t,items:n}])=>{n.length>0&&t.isPregeneratedLink&&removeProviderPregeneratedLinks(e,t.isPregeneratedLink)})},[e,t])}function isCurrentCanvasHead(e){return!!e&&e===(0,Ue.getCanvasIframeDocument)()?.head}var We=globalThis.React,Ge=globalThis.elementorV2.editorStyles,Ke=globalThis.elementorV2.editorV1Adapters,qe=globalThis.elementorV2.editorProps,isMultiProps=e=>!!e&&typeof e==`object`&&`$$multi-props`in e&&e[`$$multi-props`]===!0,createMultiPropsValue=e=>({"$$multi-props":!0,value:e}),getMultiPropsValue=e=>e.value,Je=3;function createPropsResolver({transformers:e,schema:t,onPropResolve:n}){async function resolve({props:e,schema:r,signal:i,renderContext:a}){r??=t;let o=Promise.all(Object.entries(r).map(async([t,r])=>{let o=e[t]??r.default,s=await transform({value:o,key:t,type:r,signal:i,renderContext:a});return n?.({key:t,value:s,propValue:o,propType:r}),isMultiProps(s)?getMultiPropsValue(s):{[t]:s}}));return Object.assign({},...(await o).filter(Boolean))}async function transform({value:t,key:n,type:r,signal:i,depth:a=0,renderContext:o}){if(t==null)return null;if(!(0,qe.isTransformable)(t))return t;if(a>Je||t.disabled===!0)return null;let s=r;if(r.kind===`union`&&(s=r.prop_types[t.$$type],!s)||(s=s,t.$$type!==s.key))return null;let c=t.value;s.kind===`object`&&(c=await resolve({props:c,schema:s.shape,signal:i,renderContext:o})),s.kind===`array`&&(c=await Promise.all(c.map(e=>transform({value:e,key:n,type:s.item_prop_type,depth:a,signal:i,renderContext:o}))));let l=e.get(t.$$type);if(!l)return null;try{return transform({value:await l(c,{key:n,signal:i,renderContext:o,propType:r}),key:n,type:r,signal:i,depth:a+1,renderContext:o})}catch{return null}}return resolve}var Ye=globalThis.elementorV2.editorProps,maybeEnqueueFontFromStyleProp=(e,t,n)=>{if(!(0,Ye.isTransformable)(t)||t.disabled)return;let r=e.kind===`union`?t.$$type:e.key,i=(0,Ye.getPropSchemaFromCache)(r);if(!i||!(`getEnqueueFontFamily`in i)||typeof i.getEnqueueFontFamily!=`function`)return;let a=t.value;if(typeof a!=`string`)return;let o=i.getEnqueueFontFamily(a);o&&n(o)};function createTransformersRegistry(){let e={},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}}}}var Xe=createTransformersRegistry(),Ze=createTransformersRegistry();function useStylePropResolver(){return(0,We.useMemo)(()=>createPropsResolver({transformers:Ze,schema:(0,Ge.getStylesSchema)(),onPropResolve:({propValue:e,propType:t})=>{maybeEnqueueFontFromStyleProp(t,e,Ke.enqueueFont)}}),[])}var Qe=globalThis.React,J=globalThis.elementorV2.editorResponsive,et=globalThis.elementorV2.editorStyles,tt=globalThis.elementorV2.utils,Y=globalThis.elementorV2.utils,nt=(0,Y.createError)({code:`unknown_style_type`,message:`Unknown style type`}),X=(0,Y.createError)({code:`unknown_style_state`,message:`Unknown style state`}),rt={class:`.`},it=`desktop`,at=`normal`;function getStyleUniqueKey(e){let t=e.variants[0]?.meta?.breakpoint??it,n=e.variants[0]?.meta?.state??at;return`${e.id}-${t}-${n}`}function createStylesRenderer({resolve:e,breakpoints:t,selectorPrefix:n=``}){return async({styles:r,signal:i})=>{let a=new Set,o=r.filter(e=>{let t=getStyleUniqueKey(e);return a.has(t)?!1:(a.add(t),!0)}).map(async r=>{let a=Object.values(r.variants).map(async a=>{let o=await propsToCss({props:a.props,resolve:e,signal:i}),s=customCssToString(a.custom_css);return createStyleWrapper().for(r.cssName,r.type).withPrefix(n).withState(a.meta.state).withMediaQuery(a.meta.breakpoint?t[a.meta.breakpoint]:null).wrap(o+s)}),o=await Promise.all(a);return{id:r.id,breakpoint:r?.variants[0]?.meta?.breakpoint||`desktop`,value:o.join(``),state:r?.variants[0]?.meta?.state||null}});return await Promise.all(o)}}function createStyleWrapper(e=``,t){return{for:(n,r)=>{let i=rt[r];if(!i)throw new nt({context:{type:r}});return createStyleWrapper(`${e}${i}${n}`,t)},withPrefix:n=>createStyleWrapper([n,e].filter(Boolean).join(` `),t),withState:n=>createStyleWrapper((0,et.getSelectorWithState)(e,n),t),withMediaQuery:n=>{if(!n?.type)return createStyleWrapper(e,t);let r=`${n.type}:${n.width}px`;return createStyleWrapper(e,e=>`@media(${r}){${e}}`)},wrap:n=>{let r=`${e}{${n}}`;return t?t(r):r}}}async function propsToCss({props:e,resolve:t,signal:n}){let r=await t({props:e,signal:n});return Object.entries(r).reduce((e,[t,n])=>(n===null||e.push(t+`:`+n+`;`),e),[]).join(``)}function customCssToString(e){let t=(0,tt.decodeString)(e?.raw||``);return t.trim()?t+` `:``}var ot=`.elementor`;function useStyleRenderer(e){let t=(0,J.useBreakpointsMap)();return(0,Qe.useMemo)(()=>createStylesRenderer({selectorPrefix:ot,breakpoints:t,resolve:e}),[e,t])}function useStyleItems(e){let t=useStyleRenderer(useStylePropResolver()),n=(0,Ie.useBreakpoints)(),[r,i]=(0,Fe.useState)({}),a=(0,Fe.useRef)(new Map),o=(0,Fe.useMemo)(()=>{let createEmptyCache=()=>({orderedIds:[],itemsById:new Map}),getCache=e=>{let t=safeGetKey(e);return t?(a.current.has(t)||a.current.set(t,createEmptyCache()),a.current.get(t)):createEmptyCache()};return Re.stylesRepository.getProviders().map(e=>({provider:e,subscriber:createProviderSubscriber2({provider:e,renderStyles:t,setStyleItems:i,getCache:()=>getCache(e)})}))},[t]);(0,Fe.useEffect)(()=>{let e=o.map(({provider:e,subscriber:t})=>e.subscribe(t));return()=>{e.forEach(e=>e())}},[o]),useOnMount(()=>{(0,ze.registerDataHook)(`after`,`editor/documents/attach-preview`,async()=>{resetRemovedProviders();let e=o.map(async({subscriber:e})=>e());await Promise.all(e)})}),usePregeneratedLinksHandoff(e,r);let s=(0,Fe.useMemo)(()=>createBreakpointSorter(n.map(e=>e.id)),[n]);return(0,Fe.useMemo)(()=>Object.values(r).sort(prioritySorter).flatMap(({items:e})=>e).sort(stateSorter).sort(s),[r,s])}function prioritySorter({provider:e},{provider:t}){return e.priority-t.priority}function stateSorter({state:e},{state:t}){return(0,Le.isClassState)(e)&&!(0,Le.isClassState)(t)?-1:!(0,Le.isClassState)(e)&&(0,Le.isClassState)(t)?1:0}function createBreakpointSorter(e){return({breakpoint:t},{breakpoint:n})=>e.indexOf(t)-e.indexOf(n)}function safeGetKey(e){try{return e.getKey()}catch{return null}}function createProviderSubscriber2({provider:e,renderStyles:t,setStyleItems:n,getCache:r}){return abortPreviousRuns((t,i,a)=>signalizedProcess(t.signal).then((e,t)=>{let n=r(),o=a!==void 0&&i!==void 0,s=n.orderedIds.length>0;return o&&s?updateItems(n,i,a,t):createItems(n,t)}).then(t=>{n(n=>({...n,[e.getKey()]:{provider:e,items:t}}))}).execute());async function updateItems(n,r,i,a){let o=getChangedStyleIds(r,i);return n.orderedIds=e.actions.all().map(e=>e.id).reverse(),o.length>0?t({styles:breakToBreakpoints(o.map(t=>e.actions.get(t)).filter(e=>!!e).map(t=>({...t,cssName:e.actions.resolveCssName(t.id)}))),signal:a}).then(e=>(updateCacheItems(n,o,e),getOrderedItems(n))):getOrderedItems(n)}async function createItems(n,r){let i=e.actions.all();return t({styles:breakToBreakpoints([...i].reverse().map(t=>({...t,cssName:e.actions.resolveCssName(t.id)}))),signal:r}).then(e=>(rebuildCache(n,i,e),getOrderedItems(n)))}function breakToBreakpoints(e){return Object.values(e.reduce((e,t)=>(t.variants.forEach(n=>{let 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 getChangedStyleIds(e,t){let n=[];for(let r of Object.keys(t)){let i=t[r],a=e[r];(!a||i!==a)&&n.push(r)}return n}function getOrderedItems(e){return e.orderedIds.map(t=>e.itemsById.get(t)).filter(e=>e!==void 0).flat()}function updateCacheItems(e,t,n){for(let n of t)e.itemsById.delete(n);for(let t of n){let n=e.itemsById.get(t.id)||[];n.push(t),e.itemsById.set(t.id,n)}}function rebuildCache(e,t,n){e.orderedIds=t.map(e=>e.id).reverse(),e.itemsById.clear();for(let t of n){let n=e.itemsById.get(t.id)||[];n.push(t),e.itemsById.set(t.id,n)}}function StyleRenderer(){let e=usePortalContainer2(),t=useStyleItems(e),n=useDocumentsCssLinks();return e?Oe.createElement(ke.Portal,{container:e},filterUniqueStyleDefinitions(t).map(e=>Oe.createElement(`style`,{key:`${e.id}-${e.breakpoint}-${e.state??`normal`}`},e.value)),n.map(e=>Oe.createElement(`link`,{...e,key:e.id}))):null}function usePortalContainer2(){return(0,K.__privateUseListenTo)((0,K.commandEndEvent)(`editor/documents/attach-preview`),()=>(0,K.getCanvasIframeDocument)()?.head)}function filterUniqueStyleDefinitions(e){let t=new Map;return e.filter(e=>{let n=t.get(e.id);return n?n.find(t=>t.breakpoint===e.breakpoint&&t.state===e.state)?!1:(n.push(e),!0):(t.set(e.id,[e]),!0)})}var st=globalThis.elementorV2.editorNotifications,ct=globalThis.elementorV2.editorV1Adapters,lt=globalThis.wp.i18n,Z=globalThis.elementorV2.editorElements,Q=`e-form`,ut=`e-form-hidden`,dt=`e-form-honeypot`,ft=`e-form-recaptcha-score`,pt=new Set([`e-form-input`,`e-form-textarea`,`e-form-label`,`e-form-checkbox`,`e-form-submit-button`,`e-form-select`,`e-form-radio-button`,`e-form-file-upload`,`e-form-date-picker`,`e-form-time-picker`,ut,dt,ft]);function getArgsElementType(e){return e.model?.widgetType||e.model?.elType}function hasModelElementType(e,t){return e?(e.widgetType||e.elType)===t||(e.elements??[]).some(e=>hasModelElementType(e,t)):!1}function getFormContainer(e){let t=e;for(;t;){if(getElementType(t)===Q)return t;t=t.parent}}function getElementType(e){return e?.model.get(`widgetType`)||e?.model.get(`elType`)}function getClipboardElementType(e){return e?.widgetType||e?.elType}function isElementWithinFormSelector(e){return!!e?.view?.el?.closest(`form,[data-element_type="e-form"]`)}function isWithinForm(e){return isElementWithinFormSelector(e)}function hasElementType(e,t){return(0,Z.getAllDescendants)(e).some(e=>getElementType(e)===t)}function hasElementTypes(e,t){return(0,Z.getAllDescendants)(e).some(e=>{let n=getElementType(e);return n?t.has(n):!1})}function hasClipboardElementType(e,t){return e.some(e=>getClipboardElementType(e)===t?!0:e.elements?hasClipboardElementType(e.elements,t):!1)}function hasClipboardElementTypes(e,t){return e.some(e=>{let n=getClipboardElementType(e);return n&&t.has(n)?!0:e.elements?hasClipboardElementTypes(e.elements,t):!1})}function movedContainersIncludeAtomicFormRoot(e){return e.some(e=>getElementType(e)===Q)}function clipboardRootsAreAtomicForms(e){return e.length?e.every(e=>getClipboardElementType(e)===Q):!1}var mt={type:`default`,message:(0,lt.__)(`Form elements must be placed inside a form.`,`elementor`),id:`form-fields-outside-form-blocked`};function initFormAncestorEnforcement(){(0,ct.blockCommand)({command:`document/elements/create`,condition:blockFormFieldCreate}),(0,ct.blockCommand)({command:`document/elements/move`,condition:blockFormFieldMove}),(0,ct.blockCommand)({command:`document/elements/paste`,condition:blockFormFieldPaste})}function blockFormFieldCreate(e){let t=getArgsElementType(e);return!t||!pt.has(t)?!1:(e.containers??[e.container]).some(e=>!isWithinForm(e))?(handleBlockedFormField(),!0):!1}function blockFormFieldMove(e){let{containers:t=[e.container],target:n}=e;return t.some(e=>e?!hasElementType(e,Q)&&hasElementTypes(e,pt):!1)&&!isWithinForm(n)&&!movedContainersIncludeAtomicFormRoot(t)?(handleBlockedFormField(),!0):!1}function blockFormFieldPaste(e){let{storageType:t}=e;if(t!==`localstorage`)return!1;let n=window?.elementorCommon?.storage?.get();return n?.clipboard?.elements&&hasClipboardElementTypes(n.clipboard.elements,pt)&&!isWithinForm(e.container)&&!clipboardRootsAreAtomicForms(n.clipboard.elements)?(handleBlockedFormField(),!0):!1}function handleBlockedFormField(){(0,st.notify)(mt)}var ht=globalThis.elementorV2.editorNotifications,gt=globalThis.elementorV2.editorV1Adapters,_t=globalThis.wp.i18n,vt=`document/elements/move`,yt={[dt]:{idPrefix:`honeypot-added`,getMessage:()=>(0,_t.__)(`Honeypot added - invisible on your form. Reorder it in the Structure panel.`,`elementor`)},[ft]:{idPrefix:`recaptcha-score-added`,getMessage:()=>(0,_t.__)(`Score-based reCAPTCHA added - You can adjust its settings from the Structure panel.`,`elementor`)}},bt=0;function initFormAtomAddedHints(){(0,gt.registerDataHook)(`after`,`document/elements/create`,(e,t,n)=>{if(n?.commandsCurrentTrace?.includes(vt))return;let r=getArgsElementType(e),i=r?yt[r]:void 0;i&&(0,ht.notify)({type:`default`,message:i.getMessage(),id:`${i.idPrefix}-${++bt}`})})}var xt=globalThis.elementorV2.editorNotifications,St=globalThis.elementorV2.editorV1Adapters,Ct=globalThis.wp.i18n,wt=`document/elements/move`,Tt=0;function createHiddenFieldNotification(){return{type:`default`,message:(0,Ct.__)(`Hidden field added - invisible on your form. Manage it in the Structure panel.`,`elementor`),id:`hidden-field-added-${++Tt}`}}function initHiddenFieldHint(){(0,St.registerDataHook)(`after`,`document/elements/create`,(e,t,n)=>{n?.commandsCurrentTrace?.includes(wt)||getArgsElementType(e)===ut&&(0,xt.notify)(createHiddenFieldNotification())})}var Et=globalThis.elementorV2.editorElements,Dt=globalThis.elementorV2.editorNotifications,Ot=globalThis.elementorV2.editorV1Adapters,kt=globalThis.wp.i18n,At=`document/elements/move`,jt={[dt]:{type:`default`,message:(0,kt.__)(`Only one Honeypot can be added per form.`,`elementor`),id:`duplicate-honeypot-blocked`},[ft]:{type:`default`,message:(0,kt.__)(`Only one Score-based reCAPTCHA can be added per form.`,`elementor`),id:`duplicate-recaptcha-score-blocked`}},Mt=Object.keys(jt);function initDuplicateFormAtomsPrevention(){(0,Ot.registerDataHook)(`dependency`,`document/elements/create`,(e,t)=>!blockDuplicateCreate(e,t)),(0,Ot.blockCommand)({command:`document/elements/move`,condition:blockDuplicateMove})}function blockDuplicateCreate(e,t){if(t?.commandsCurrentTrace?.includes(At))return!1;let n=e.containers??[e.container],r=Mt.find(t=>hasModelElementType(e.model,t)&&n.some(e=>formHasElementType(getFormContainer(e),t)));return r?((0,Dt.notify)(jt[r]),!0):!1}function blockDuplicateMove(e){let{containers:t=[e.container],target:n}=e,r=t.filter(e=>!!e),i=new Set(r.flatMap(e=>(0,Et.getAllDescendants)(e))),a=getFormContainer(n),o=Mt.find(e=>r.some(t=>hasElementType(t,e))&&formHasElementType(a,e,i));return o?((0,Dt.notify)(jt[o]),!0):!1}function formHasElementType(e,t,n=new Set){return e?(0,Et.getAllDescendants)(e).some(e=>!n.has(e)&&getElementType(e)===t):!1}var Nt=globalThis.elementorV2.editorNotifications,Pt=globalThis.elementorV2.editorV1Adapters,Ft={type:`default`,message:(0,globalThis.wp.i18n.__)(`Forms can't be nested. Create separate forms instead.`,`elementor`),id:`form-nesting-blocked`};function initFormNestingPrevention(){(0,Pt.blockCommand)({command:`document/elements/create`,condition:blockFormCreate}),(0,Pt.blockCommand)({command:`document/elements/move`,condition:blockFormMove}),(0,Pt.blockCommand)({command:`document/elements/paste`,condition:blockFormPaste})}function blockFormCreate(e){let t=getArgsElementType(e);return t&&t===Q&&isWithinForm(e.container)?(handleBlockedFormField2(),!0):!1}function blockFormMove(e){let{containers:t=[e.container],target:n}=e;return t.some(e=>e?hasElementType(e,Q):!1)&&isWithinForm(n)?(handleBlockedFormField2(),!0):!1}function blockFormPaste(e){let{storageType:t}=e;if(t!==`localstorage`)return!1;let n=window?.elementorCommon?.storage?.get();return n?.clipboard?.elements&&hasClipboardElementType(n.clipboard.elements,Q)&&isWithinForm(e.container)?(handleBlockedFormField2(),!0):!1}function handleBlockedFormField2(){(0,Nt.notify)(Ft)}var It=createTransformersRegistry();function createTransformer(e){return e}var Lt=createTransformer(()=>``),Rt=globalThis.elementorV2.editorStylesRepository;function transformClassId(e,t){if(!t.has(e)){let n=Rt.stylesRepository.getProviders().find(t=>t.actions.all().find(t=>t.id===e));if(!n)return e;t.set(e,n.getKey())}let n=t.get(e);return Rt.stylesRepository.getProviderByKey(n)?.actions.resolveCssName(e)??e}function createClassesTransformer(){let e=new Map;return createTransformer(t=>t.map(t=>transformClassId(t,e)).filter(Boolean))}var zt=createTransformer(e=>!e||Object.keys(e).length===0?null:{min:e.min||null,max:e.max||null}),Ut=createTransformer(e=>e.map(e=>{let t=(e.date||``).trim(),n=(e.time||``).trim();return!t&&!n?``:`${t} ${n}`.trim()}).join(` `)),Wt=__toESM(Vt()),Gt=[`href`,`target`,`class`,`id`,`style`,`title`,`lang`,`dir`,`role`];function getAllowedHtmlWrapperTags(){return window.elementorCommon?.config?.allowedHTMLWrapperTags??[]}function sanitizeEscapedHtml(e){if(!e)return``;let t=[...getAllowedHtmlWrapperTags()];return Wt.default.sanitize(e,{ALLOWED_TAGS:t,ALLOWED_ATTR:[...Gt],ALLOW_DATA_ATTR:!0,ALLOW_ARIA_ATTR:!0})}var Kt=createTransformer(e=>sanitizeEscapedHtml(e)),qt=createTransformer(e=>e?.content??``),Jt=createTransformer(e=>e?.content??``),Yt=createTransformer(({destination:e,isTargetBlank:t,tag:n})=>({href:typeof e==`number`?`#post-id-`+e:e,target:t?`_blank`:`_self`,tag:n??`a`})),Xt=createTransformer(({id:e})=>e??null),Zt=createTransformer(e=>!e||Object.keys(e).length===0?null:{min:e.min||null,max:e.max||null}),Qt=globalThis.elementorV2.editorControls,$t=__toESM(Vt()),en=`width: 100%; height: 100%; overflow: unset;`;function processSvgContent(e){let t=$t.default.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`);let r=(n.getAttribute(`style`)??``).trim(),i=r?`${r.replace(/;$/,``)}; ${en}`:en;return n.setAttribute(`style`,i),n.outerHTML}var tn=globalThis.elementorV2.wpMedia;async function fetchSvgContent(e,t){try{let n=await fetch(e,{signal:t});if(!n.ok)return null;let r=n.headers.get(`content-type`)??``;return r.includes(`svg`)||r.includes(`xml`)||e.endsWith(`.svg`)?await n.text():null}catch{return null}}function resolveSvgSrcId(e){return typeof e!=`number`||e<=0?null:e}var nn=createTransformer(async(e,{signal:t})=>{let n=resolveSvgSrcId(e.id),r=typeof e.url==`string`?e.url:null,i=r;n&&!r&&(i=(await(0,tn.getMediaAttachment)({id:n}))?.url??null);let a=typeof i==`string`?i:null;if(!a)return{html:null,url:null};let o=await fetchSvgContent(a,t);return{html:o?processSvgContent(o):null,url:a}}),rn={html:null,url:null},an=`100%`,on=`visible`,sn=`eicons`,cn=`images/default-svg.svg`,ln=createTransformer(async(e,{signal:t})=>{let n=typeof e.value==`string`?e.value:null,r=typeof e.library==`string`?e.library:null;if(!n||!r)return rn;let i=await resolveFontAwesomeSvg(r,n,t);if(i)return{html:i,url:null};if(sn===r)return rn;let a=await resolveProviderSvg(r,n,t);return a?{html:a,url:null}:resolveDefaultSvg(t)});async function resolveDefaultSvg(e){let t=window.elementorCommon?.config?.urls?.assets;return typeof t!=`string`||t===``?rn:nn({id:null,url:`${t}${cn}`},{key:`svg`,signal:e})}async function resolveProviderSvg(e,t,n){let r=await(0,Qt.resolveProviderIconSvg)(e,t,n);return r?processIconSvgContent(r):null}async function resolveFontAwesomeSvg(e,t,n){let r=(0,Qt.getFontAwesome7IconName)(t);if(!r)return null;let i=await(0,Qt.resolveFontAwesome7Icon)(e,r,n);if(!i)return null;let a=buildPathSvg(i);return a?processIconSvgContent(a):null}function buildPathSvg(e){if(e.paths.length===0)return null;let t=e.paths.map(e=>`<path d="${escapeSvgPath(e)}"></path>`).join(``);return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${e.width} ${e.height}">${t}</svg>`}function escapeSvgPath(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function processIconSvgContent(e){let t=processSvgContent(e);if(!t)return null;let n=new DOMParser().parseFromString(t,`image/svg+xml`).querySelector(`svg`);return n?(n.setAttribute(`aria-hidden`,`true`),n.style.setProperty(`width`,an),n.style.setProperty(`height`,an),n.style.setProperty(`overflow`,on),n.outerHTML):null}var un=createTransformer(e=>({id:e.id??null,url:e.url??null,alt:e.alt??null})),dn=globalThis.elementorV2.wpMedia,pn=createTransformer(async e=>{let{src:t,size:n}=e;if(!t?.id)return t?.url?{src:t.url,alt:t.alt??``}:null;let r=await(0,dn.getMediaAttachment)({id:t.id}),i=r?.sizes?.[n??``];return i?{src:i.url,height:i.height,width:i.width,alt:r.alt}:r?{src:r.url,height:r.height,width:r.width,alt:r.alt}:null}),mn=createTransformer(e=>e),hn=globalThis.elementorV2.wpMedia,gn=createTransformer(async e=>{let{id:t,url:n}=e;return t?{id:t,url:(await(0,hn.getMediaAttachment)({id:t}))?.url??n}:{id:null,url:n}});function initSettingsTransformers(){It.register(`classes`,createClassesTransformer()).register(`link`,Yt).register(`query`,Xt).register(`image`,pn).register(`image-src`,un).register(`svg-src`,nn).register(`icon`,ln).register(`video-src`,gn).register(`attributes`,Lt).register(`date-time`,Ut).register(`html-v2`,qt).register(`html-v3`,Jt).register(`escaped-html`,Kt).register(`date-range`,zt).register(`time-range`,Zt).registerFallback(mn)}var _n=createTransformer(e=>{let{color:t=null}=e;return t?`linear-gradient(${t}, ${t})`:null}),vn=createTransformer(e=>e.type===`radial`?`radial-gradient(circle at ${e.positions}, ${e.stops})`:e.angle===null||e.angle===void 0?`linear-gradient(${e.stops})`:`linear-gradient(${e.angle}deg, ${e.stops})`),yn=createTransformer(e=>{let{image:t,size:n=null,position:r=null,repeat:i=null,attachment:a=null}=e;return t?{src:t.src?`url(${t.src})`:null,repeat:i,attachment:a,size:n,position:r}:null}),bn=createTransformer(({width:e,height:t})=>`${e??`auto`} ${t??`auto`}`),xn=createTransformer(e=>{if(!e||e.length===0)return null;let t=normalizeOverlayValues(e);return t.length===0?null:{"background-image":getValuesString(t,`src`,`none`,!0),"background-repeat":getValuesString(t,`repeat`,`repeat`),"background-attachment":getValuesString(t,`attachment`,`scroll`),"background-size":getValuesString(t,`size`,`auto auto`),"background-position":getValuesString(t,`position`,`0% 0%`)}});function normalizeOverlayValues(e){return e.map(e=>typeof e==`string`?{src:e,repeat:null,attachment:null,size:null,position:null}:e).filter(e=>e&&!!e.src)}function getValuesString(e,t,n,r=!1){if(e.filter(e=>e?.[t]).length===0)return n;let i=e.map(e=>e[t]??n);return!r&&i.every(e=>e===i[0])?i[0]:i.join(`,`)}var Sn=createTransformer(e=>{let{color:t=null,"background-overlay":n=null,clip:r=null}=e;return createMultiPropsValue({...n,"background-color":t,"background-clip":r})}),Cn=createTransformer(e=>`${e?.color} ${e?.offset??0}%`),createCombineArrayTransformer=e=>createTransformer(t=>t?.length?t.filter(Boolean).join(e):null),createMultiPropsTransformer=(e,t)=>createTransformer((n,{key:r})=>{let i=e.filter(e=>n[e]).map(e=>[t({propKey:r,key:e}),n[e]]);return createMultiPropsValue(Object.fromEntries(i))}),wn=createTransformer(e=>e?.length<1?null:e.filter(Boolean).map(mapToFilterFunctionString).join(` `)),mapToFilterFunctionString=e=>{if(e.func===`drop-shadow`){let{xAxis:t,yAxis:n,blur:r,color:i}=e.args;return`drop-shadow(${t||`0px`} ${n||`0px`} ${r||`10px`} ${i||`transparent`})`}let t=e.args?.size;return!e.func||!t?``:`${e.func}(${t})`},Tn=0,En=1,Dn=`auto`,formatBasis=e=>typeof e==`object`&&e.size!==void 0?`${e.size}${e.unit||``}`:e,On=createTransformer(e=>{let t=e.flexGrow,n=e.flexShrink,r=e.flexBasis,i=t!=null,a=n!=null,o=r!=null;return!i&&!a&&!o?null:`${i?t:Tn} ${a?n:En} ${o?formatBasis(r):Dn}`}),kn=createTransformer(e=>{if(typeof e!=`string`||!e.trim())return null;let t=e.trim();return t.startsWith(`"`)&&t.endsWith(`"`)||t.startsWith(`'`)&&t.endsWith(`'`)?t:`"${t}"`}),An=new Set([`grid-template-columns`,`grid-template-rows`]),isGridTrackProperty=e=>An.has(e),formatGridTrackRepeat=e=>!Number.isFinite(e)||e<1?null:`repeat(${e}, 1fr)`,jn=createTransformer(e=>e.unit===`custom`?e.size:e.unit===`fr`?formatGridTrackRepeat(Math.trunc(Number(e.size))):`${e.size}${e.unit}`),Mn=`0px`;function getVal(e){return`${e??Mn}`}var Nn=createTransformer(e=>`${getVal(e?.x)} ${getVal(e?.y)}`),Pn=createTransformer(({x:e,y:t})=>`${e??`0px`} ${t??`0px`}`),Fn=createTransformer(e=>[e.hOffset,e.vOffset,e.blur,e.spread,e.color,e.position].filter(Boolean).join(` `)),In=createTransformer(e=>e.unit===`auto`?`auto`:e.unit===`custom`?e.size:`${e.size}${e.unit}`),Ln=createTransformer(e=>e?.trim()||null),Rn=createTransformer(e=>createMultiPropsValue({"-webkit-text-stroke":`${e.width} ${e.color}`,stroke:`${e.color}`,"stroke-width":`${e.width}`})),zn=createTransformer(e=>e?.length<1?null:e.join(` `)),Bn=`0px`,Vn=createTransformer(e=>`translate3d(${e.x??Bn}, ${e.y??Bn}, ${e.z??Bn})`),Hn=`0px`,Un=`50%`,Wn=Hn;function getVal2(e){return`${e??Hn}`}var Gn=createTransformer(e=>{let t=getVal2(e.x),n=getVal2(e.y),r=getVal2(e.z);return t===Un&&n===Un&&r===Wn?null:`${t} ${n} ${r}`}),Kn=`0deg`,qn=createTransformer(e=>[`rotateX(${e?.x??Kn})`,`rotateY(${e?.y??Kn})`,`rotateZ(${e?.z??Kn})`].join(` `)),Jn=createTransformer(e=>`scale3d(${e.x??1}, ${e.y??1}, ${e.z??1})`),Yn=`0deg`,Xn=createTransformer(e=>`skew(${e?.x??Yn}, ${e?.y??Yn})`),Zn=globalThis.elementorV2.editorControls,getAllowedProperties=()=>{let e=new Set;return Zn.transitionProperties.forEach(t=>{t.properties.forEach(t=>{e.add(t.value)})}),e},Qn=createTransformer(e=>{if(e?.length<1)return null;let t=getAllowedProperties(),n=e.map(e=>mapToTransitionString(e,t)).filter(Boolean);return n.length===0?null:n.join(`, `)}),mapToTransitionString=(e,t)=>{if(!e.selection||!e.size)return``;let n=e.selection.value;return t.has(n)?`${n} ${e.size}`:``};function initStyleTransformers(){Ze.register(`font-family`,kn).register(`size`,In).register(`grid-track-size`,jn).register(`shadow`,Fn).register(`stroke`,Rn).register(`dimensions`,createMultiPropsTransformer([`block-start`,`block-end`,`inline-start`,`inline-end`],({propKey:e,key:t})=>`${e}-${t}`)).register(`filter`,wn).register(`backdrop-filter`,wn).register(`box-shadow`,createCombineArrayTransformer(`,`)).register(`background`,Sn).register(`background-overlay`,xn).register(`background-color-overlay`,_n).register(`background-image-overlay`,yn).register(`background-gradient-overlay`,vn).register(`gradient-color-stop`,createCombineArrayTransformer(`,`)).register(`color-stop`,Cn).register(`background-image-position-offset`,Pn).register(`background-image-size-scale`,bn).register(`image-src`,un).register(`image`,pn).register(`object-position`,Pn).register(`span`,Ln).register(`transform-origin`,Gn).register(`perspective-origin`,Nn).register(`transform-move`,Vn).register(`transform-scale`,Jn).register(`transform-rotate`,qn).register(`transform-skew`,Xn).register(`transform-functions`,zn).register(`transform`,createMultiPropsTransformer([`transform-functions`,`transform-origin`,`perspective`,`perspective-origin`],({key:e})=>e===`transform-functions`?`transform`:e)).register(`transition`,Qn).register(`layout-direction`,createMultiPropsTransformer([`row`,`column`],({propKey:e,key:t})=>`${t}-${e}`)).register(`flex`,On).register(`border-width-v2`,createMultiPropsTransformer([`block-start`,`block-end`,`inline-start`,`inline-end`],({key:e})=>`border-${e}-width`)).register(`border-radius-v2`,createMultiPropsTransformer([`start-start`,`start-end`,`end-start`,`end-end`],({key:e})=>`border-${e}-radius`)).registerFallback(mn)}var $n=globalThis.elementorV2.editorElements,er=globalThis.elementorV2.editorV1Adapters,tr=globalThis.elementorV2.twing;function createDomRenderer(){let e=(0,tr.createArrayLoader)({}),t=(0,tr.createEnvironment)(e);return t.registerEscapingStrategy(escapeHtmlTag,`html_tag`),t.registerEscapingStrategy(escapeURL,`full_url`),t.registerEscapingStrategy(escapeJsIdentifier,`js_identifier`),{register:e.setTemplate,render:t.render}}function getAllowedHtmlWrapperTags2(){return window.elementorCommon?.config?.allowedHTMLWrapperTags??[]}function escapeHtmlTag(e){let t=getAllowedHtmlWrapperTags2(),n=e?.toLowerCase?.()??``;return t.includes(n)?e:`div`}var nr=/^[A-Za-z0-9_]+$/;function escapeJsIdentifier(e){let t=String(e??``);return t.match(nr)?.[0]===t?t:``}function escapeURL(e){let t=[`http:`,`https:`,`mailto:`,`tel:`];try{let n=new URL(e);return t.includes(n.protocol)?e:``}catch{return``}}function createElementType(e){let t=window;return class extends t.elementor.modules.elements.types.Widget{getType(){return e}getView(){return createElementViewClassDeclaration()}}}function createElementViewClassDeclaration(){let 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(){let 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){let 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=>e.name!==`save`)}}}var rr=globalThis.elementorV2.editorElements,ir=`a`;function computeHtmlTag(e,t,n={}){if((n.followLink??!0)&&settingsHaveActiveLink(e)){let t=e.link;return extractLinkHtmlTag(isRecord(t)?t:{})}let r=extractHtmlTagValue(e.tag);return r!==null&&r!==``?r:t}function settingsHaveActiveLink(e){let t=e.link;if(!isRecord(t))return!1;let n=extractHtmlTagValue(t.href);if(n!==null&&n!==``)return!0;let r=t.attributes;return typeof r==`string`&&r!==``}function extractLinkHtmlTag(e){let t=extractHtmlTagValue(e.tag);return t!==null&&t!==``?t:ir}function extractHtmlTagValue(e){return isRecord(e)&&typeof e.value==`string`?e.value:typeof e==`string`?e:null}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ar=globalThis.elementorV2.editorElements;function createPendingElement(e,t,n={}){let r=e.getContainer(),i=n.clone?(0,ar.cloneElementTree)(t):{...t};if(!n.clone&&!i.id&&(i.id=(0,ar.generateElementId)()),i.elements||=[],!(0,ar.addModelToParent)(r.id,i,{...n,clone:!1}))return;let a=i.id,o=(0,ar.findModelInDocument)(a);if(!o)return;let s={id:a,settings:{get:()=>({}),set:()=>({}),toJSON:()=>({})},parent:r,model:o,view:void 0,lookup(){return(0,ar.getContainer)(a)??s}};return e.once(`render`,()=>{e.model?.trigger?.(`navigator:add`,o,n)}),n.edit!==!1&&selectChildWhenWrapperRenders(e,a),{getContainer:()=>s}}function selectChildWhenWrapperRenders(e,t){e.once(`render`,()=>{let n=(0,ar.getContainer)(t);if(n?.model?.trigger){n.model.trigger(`request:edit`);return}e.model?.trigger?.(`request:edit`)})}function setupTwigRenderer({renderer:e,element:t}){let 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:createPropsResolver({transformers:It,schema:t.atomic_props_schema}),defaultHtmlTag:t.default_html_tag??`div`,htmlTagFollowsLink:t.html_tag_follows_link??!0}}function createBeforeRender(e){e._ensureViewIsIntact(),e._isRendering=!0,e.resetChildViewContainer(),e.triggerMethod(`before:render`,e)}function createAfterRender(e){e._isRendering=!1,e.isRendered=!0,e.triggerMethod(`render`,e)}function rerenderExistingChildren(e){e.children?.each(e=>{e.render()})}async function waitForChildrenToComplete(e){let t=[];e.children?.each(e=>{e._currentRenderPromise&&t.push(e._currentRenderPromise)}),t.length>0&&await Promise.all(t)}function canBeTemplated(e){return!!(e.atomic_props_schema&&e.twig_templates&&e.twig_main_template&&e.base_styles_dictionary)}function createTemplatedElementView({type:e,renderer:t,element:n}){let r=createElementViewClassDeclaration(),{templateKey:i,baseStylesDictionary:a,resolveProps:o,defaultHtmlTag:s,htmlTagFollowsLink:c}=setupTwigRenderer({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;let e=signalizedProcess(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()?rerenderExistingChildren(this):super._renderChildren(),await waitForChildrenToComplete(this)}_shouldReuseChildren(){return this._domUpdateWasSkipped&&this.children?.length>0}async _renderTemplate(){this.triggerMethod(`before:render:template`),await signalizedProcess(this._abortController?.signal).then((e,t)=>{let n=this.model.get(`settings`).toJSON();return o({props:n,signal:t,renderContext:this.getResolverRenderContext()})}).then(e=>this.afterSettingsResolve(e)).then(async r=>{let o=JSON.stringify(r);if(o===this._lastResolvedSettingsHash&&this.isRendered)return this._domUpdateWasSkipped=!0,null;this._domUpdateWasSkipped=!1,this._lastResolvedSettingsHash=o;let l={...n.template_context??{},id:this.model.get(`id`),interaction_id:this.getInteractionId(),type:e,settings:r,tag:computeHtmlTag(r,s,{followLink:c}),base_styles:a,...this.getResolverRenderContext?.()??{}};return t.render(i,l)}).then(e=>{e!==null&&this.$el.html(e)}).execute(),this.bindUIElements(),this.triggerMethod(`render:template`)}afterSettingsResolve(e){return e}_beforeRender(){createBeforeRender(this)}_afterRender(){createAfterRender(this)}_doAfterRender(e){this.isRendered?e():this.once(`render`,e)}_openEditingPanel(e){this._doAfterRender(()=>super._openEditingPanel(e))}getInteractionId(){let e=this.model.get(`originId`),t=this.model.get(`id`);return e??t}}}var or=Symbol(`styles-reference-untracked`);function canBeNestedTemplated(e){return canBeTemplated(e)&&`support_nesting`in e&&!!e.support_nesting}function createNestedTemplatedElementType({type:e,renderer:t,element:n,modelExtensions:r}){let i=window;return class extends i.elementor.modules.elements.types.Base{getType(){return e}getView(){return createNestedTemplatedElementView({type:e,renderer:t,element:n})}getModel(){let e=i.elementor.modules.elements.models.AtomicElementBase;return r&&Object.keys(r).length>0?e.extend(r):e}}}function buildEditorAttributes(e){let t=e.get(`id`),n=e.get(`originId`),r=e.cid??``,i=e.get(`editor_settings`)?.decorative===!0,a={"data-model-cid":r,"data-interaction-id":n??t,"x-ignore":`true`,...i?{"data-e-decorative":`true`}:{}};return Object.entries(a).map(([e,t])=>`${e}="${t}"`).join(` `)}function buildEditorClasses(e){return[`elementor-element`,`elementor-element-edit-mode`,`elementor-element-${e.get(`id`)}`].join(` `)}function createNestedTemplatedElementView({type:e,renderer:t,element:n}){let r=window,{templateKey:i,baseStylesDictionary:a,resolveProps:o,defaultHtmlTag:s,htmlTagFollowsLink:c}=setupTwigRenderer({type:e,renderer:t,element:n}),l=r.elementor.modules.elements.views.createAtomicElementBase(e),u=l.prototype._renderChildren,d=l.prototype._openEditingPanel,f=l.prototype.addElement;return l.extend({_abortController:null,_lastResolvedSettingsHash:null,_lastRenderedStyles:or,_domUpdateWasSkipped:!1,template:!1,attributes(){return{"data-model-cid":this.model.cid}},getTemplateType(){return`twig`},invalidateRenderCache(){this._lastResolvedSettingsHash=null},renderOnChange(){this.render()},render(){this._abortController?.abort(),this._abortController=new AbortController;let e=signalizedProcess(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(){createBeforeRender(this)},_onTemplateReady(){this.dispatchPreviewEvent(`elementor/element/render`)},_afterRender(){createAfterRender(this),this.dispatchPreviewEvent(`elementor/element/rendered`),requestAnimationFrame(()=>{this._initAlpine()}),this.model.trigger(`render:complete`),this._notifyStylesChanged()},_notifyStylesChanged(){let e=this.model.get(`styles`);(this._lastRenderedStyles===or||e!==this._lastRenderedStyles)&&(this._lastRenderedStyles=e,window.dispatchEvent(new CustomEvent(rr.ELEMENT_STYLE_CHANGE_EVENT)))},async _renderTemplate(){let n=this.model;this.triggerMethod(`before:render:template`),await signalizedProcess(this._abortController?.signal).then((e,t)=>{let r=n.get(`settings`).toJSON();return o({props:r,signal:t,renderContext:this.getResolverRenderContext?.()})}).then(async r=>{let o=this.afterSettingsResolve(r),l=JSON.stringify(o);if(l===this._lastResolvedSettingsHash&&this.isRendered)return this._domUpdateWasSkipped=!0,null;this._domUpdateWasSkipped=!1,this._lastResolvedSettingsHash=l;let u={id:n.get(`id`),interaction_id:this.getInteractionId(),type:e,settings:o,tag:computeHtmlTag(o,s,{followLink:c}),base_styles:a,editor_attributes:buildEditorAttributes(n),editor_classes:buildEditorClasses(n),...this.getResolverRenderContext?.()??{}};return t.render(i,u)}).then(e=>{e!==null&&this._attachTwigContent(e)}).execute(),this.bindUIElements(),this.triggerMethod(`render:template`)},afterSettingsResolve(e){return e},getRenderContext(){return this._parent?.getRenderContext?.()},getResolverRenderContext(){return this._parent?.getResolverRenderContext?.()},getChildType(){let e=n.allowed_child_types??[];return e&&e.length>0?e:l.prototype.getChildType.call(this)},_attachTwigContent(e){let t=r.jQuery(e),n=this.$el.get(0),i=t.get(0);if(!n||!i)return;this._destroyAlpine();let a=this.getHandlesOverlay()?.get(0)?.outerHTML??``,o=n.tagName!==i.tagName,s=o?(n.ownerDocument??document).createElement(i.tagName):n;Array.from(i.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),s.innerHTML=a+i.innerHTML,o&&(n.replaceWith(s),this.setElement(r.jQuery(s)))},async _renderChildren(){this._shouldReuseChildren()?rerenderExistingChildren(this):u.call(this),await waitForChildrenToComplete(this),this._removeChildrenPlaceholder()},_shouldReuseChildren(){return this._domUpdateWasSkipped&&this.children?.length>0},_removeChildrenPlaceholder(){let e=this.$el.get(0);e&&Array.from(e.childNodes).find(e=>e.nodeType===Node.COMMENT_NODE&&e.nodeValue?.trim()===`elementor-children-placeholder`)?.remove()},getChildViewContainer(){return this.childViewContainer=``,this.$el},attachBuffer(e,t){let n=this.$el.get(0);if(!n)return;let r=Array.from(n.childNodes).find(e=>e.nodeType===Node.COMMENT_NODE&&e.nodeValue?.trim()===`elementor-children-placeholder`);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(){let e=this.$el.get(0);e&&e.getAttribute(`x-data`)&&(e.ownerDocument?.defaultView)?.Alpine?.destroyTree(e)},_initAlpine(){let e=this.$el.get(0);e&&(e.removeAttribute(`x-ignore`),e.getAttribute(`x-data`)&&(e.ownerDocument?.defaultView)?.Alpine?.initTree(e))},_doAfterRender(e){this.isRendered?e():this.once(`render`,e)},_openEditingPanel(e){this._doAfterRender(()=>d.call(this,e))},addElement(e,t){return this.isRendered?f.call(this,e,t):createPendingElement(this,e,t)},getInteractionId(){let e=this.model.get(`originId`),t=this.model.get(`id`);return e??t}})}function createProPromotionNestedType({type:e,renderer:t,element:n}){if(!canBeNestedTemplated(n))throw Error(`Element "${e}" is not a valid nested templated element.`);let r=createNestedTemplatedElementType({type:e,renderer:t,element:n}),i=null;return class extends r{getView(){return i||=createPromotionView(new r().getView()),i}}}function createPromotionView(e){return class extends e{_afterRender(){super._afterRender();let e=`.e-pro-promotion-placeholder__remove-btn`,t=`.e-pro-promotion-placeholder__unlock-btn`;this.$el.off(`click`,e),this.$el.on(`click`,e,e=>{e.preventDefault(),e.stopPropagation(),window.$e.run(`document/elements/delete`,{container:this.container})}),this.$el.off(`click`,t),this.$el.on(`click`,t,e=>{e.stopPropagation()})}async _renderChildren(){}behaviors(){let e=[`InlineEditing`,`Draggable`,`Resizable`],t=Object.entries(super.behaviors()).filter(([t])=>!e.includes(t));return Object.fromEntries(t)}getContextMenuGroups(){return super.getContextMenuGroups().filter(e=>e.name!==`save`)}onDestroy(...e){super.onDestroy(...e),this.$el.off(`click`,`.e-pro-promotion-placeholder__remove-btn`),this.$el.off(`click`,`.e-pro-promotion-placeholder__unlock-btn`)}}}var sr=Ht(),cr=__toESM(globalThis.React),lr=globalThis.elementorV2.editorElements,ur=globalThis.elementorV2.editorProps,dr=globalThis.elementorV2.editorV1Adapters,fr=globalThis.wp.i18n,pr={before:`before`,after:`after`,never:`never`},ReplacementBase=class{getSetting;setSetting;element;type;id;refreshView;reactRoot;reactContainer;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:pr.before,_afterRender:pr.after,renderOnChange:pr.never,onDestroy:pr.never,render:pr.never}}},mr=__toESM(globalThis.React),hr=globalThis.React,gr=globalThis.elementorV2.editorControls,_r=globalThis.elementorV2.editorUi,vr=globalThis.elementorV2.ui,yr=(Bt(),__toCommonJS($e)),br=globalThis.React,xr=[`#elementor-editor-wrapper-v2`,`#elementor-navigator`,`#elementor-panel`],Sr=`inline-editing-toolbar-anchor`,Cr={backgroundColor:`transparent`,border:`none`,outline:`none`,boxShadow:`none`,padding:`0`,margin:`0`,borderRadius:`0`,overflow:`hidden`,opacity:`0`,pointerEvents:`none`,position:`absolute`,display:`block`},wr={"e-button":`text`,"e-form-label":`text`,"e-heading":`title`,"e-paragraph":`paragraph`,"e-form-submit-button":`text`},getInlineEditorElement=(e,t)=>t?e.querySelector(t):null,useOnClickOutsideIframe=e=>{let t=(0,br.useCallback)(()=>queueMicrotask(e),[e]);(0,br.useEffect)(()=>(xr.forEach(e=>document?.querySelector(e)?.addEventListener(`mousedown`,t)),()=>xr.forEach(e=>document?.querySelector(e)?.removeEventListener(`mousedown`,t))),[])},useRenderToolbar=(e,t)=>{let[n,r]=(0,br.useState)(null);(0,br.useEffect)(()=>{n||removeToolbarAnchor(e,t)},[n,e,t]);let onSelectionEnd=n=>{let i=!n.state.selection.empty;removeToolbarAnchor(e,t),r(i?createAnchorBasedOnSelection(e,t):null)};return{onSelectionEnd,anchor:n,clearAnchor:(0,br.useCallback)(()=>{r(null)},[])}},createAnchorBasedOnSelection=(e,t)=>{let n=e.defaultView?.getSelection();if(!n)return null;let r=n.getRangeAt(0).getBoundingClientRect(),i=e.body.getBoundingClientRect(),a=e.createElement(`span`);return styleToolbarAnchor(a,r,i),a.setAttribute(`id`,getToolbarAnchorId(t)),e.body.appendChild(a),a},removeToolbarAnchor=(e,t)=>{let n=getToolbarAnchor(e,t);n&&e.body.removeChild(n)},getToolbarAnchorId=e=>`${Sr}-${e}`,getToolbarAnchor=(e,t)=>e.getElementById(getToolbarAnchorId(t)),styleToolbarAnchor=(e,t,n)=>{let{width:r,height:i}=t;Object.assign(e.style,{...Cr,top:`${t.top-n.top}px`,left:`${t.left-n.left}px`,width:`${r}px`,height:`${i}px`})},Tr={name:`horizontalShifter`,fn(e){let{x:t,y:n,elements:{reference:r,floating:i}}=e,a={...e,x:t,y:n};if(t<0)return a.x=0,a;let o=r.getBoundingClientRect(),s=t+i.offsetWidth,c=r.ownerDocument.body.offsetWidth;return s>c&&o.right<s&&(a.x=t-(s-c)),a}},CanvasInlineEditor=({elementClasses:e,initialValue:t,expectedTag:n,rootElement:r,contentElement:i,id:a,setValue:o,requestDestroy:s})=>{let[c,l]=(0,hr.useState)(!0),[u,d]=(0,hr.useState)(null),{onSelectionEnd:f,anchor:p,clearAnchor:m}=useRenderToolbar(r.ownerDocument,a);(0,hr.useEffect)(()=>{c||(m(),s())},[c,m,s]);let h=(0,hr.useCallback)(()=>{d(null),l(!1)},[]);return useOnClickOutsideIframe(h),(0,hr.useEffect)(()=>{let e=i.ownerDocument,handleClickAway=e=>{i.contains(e.target)||h()};return e.addEventListener(`mousedown`,handleClickAway),()=>e.removeEventListener(`mousedown`,handleClickAway)},[i,h]),c?mr.createElement(_r.ThemeProvider,null,mr.createElement(InlineEditingOverlay,{expectedTag:n,rootElement:r,id:a}),mr.createElement(gr.InlineEditor,{onEditorCreate:d,mountElement:i,editorProps:{attributes:{style:`outline: none; display: inherit; justify-content: inherit; align-items: inherit; flex-direction: inherit; text-align: inherit;`}},elementClasses:e,value:t,setValue:o,onBlur:h,autofocus:!0,onSelectionEnd:f}),p&&u&&mr.createElement(InlineEditingToolbar,{anchor:p,editor:u,id:a})):null},InlineEditingOverlay=({expectedTag:e,rootElement:t,id:n})=>{let r=getInlineEditorElement(t,e),[i,a]=(0,hr.useState)(r);return(0,hr.useEffect)(()=>{a(getInlineEditorElement(t,e))},[e,t]),i?mr.createElement(OutlineOverlay,{element:i,id:n,isSelected:!0}):null},InlineEditingToolbar=({anchor:e,editor:t,id:n})=>{let{refs:r,floatingStyles:i}=(0,yr.useFloating)({placement:`top`,strategy:`fixed`,transform:!1,whileElementsMounted:yr.autoUpdate,middleware:[Tr,(0,yr.flip)()]});return(0,hr.useLayoutEffect)(()=>(r.setReference(e),()=>r.setReference(null)),[e,r]),mr.createElement(yr.FloatingPortal,{id:V},mr.createElement(vr.Box,{ref:r.setFloating,role:`presentation`,style:{...i,pointerEvents:`none`}},mr.createElement(gr.InlineEditorToolbar,{editor:t,elementId:n})))},Er=globalThis.elementorV2.editorProps,hasKey=e=>`key`in e,Dr=new Set([Er.escapedHtmlPropTypeUtil.key,Er.htmlV3PropTypeUtil.key,Er.stringPropTypeUtil.key]),isCoreTextPropTypeKey=e=>Dr.has(e),isAllowedBySchema=e=>e?hasKey(e)&&isCoreTextPropTypeKey(e.key)?!0:e.kind===`union`&&[...Dr].some(t=>e.prop_types[t]):!1,isInlineEditingAllowed=({rawValue:e,propTypeFromSchema:t})=>e==null?isAllowedBySchema(t):Er.escapedHtmlPropTypeUtil.isValid(e)||Er.htmlV3PropTypeUtil.isValid(e)||Er.stringPropTypeUtil.isValid(e),Or=800,InlineEditingReplacement=class extends ReplacementBase{handlerAttached=!1;editing=!1;getReplacementKey(){return`inline-editing`}static getTypes(){return Object.keys(wr)}isEditingModeActive(){return this.editing}shouldRenderReplacement(){return this.isInlineEditingEligible()&&(0,dr.getCurrentEditMode)()===`edit`}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(){let e=this.isEditingModeActive()?pr.never:pr.before,t=this.isEditingModeActive()?pr.never:pr.after;return{_beforeRender:e,_afterRender:t,renderOnChange:t,onDestroy:pr.after,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(){let e=this.getInlineEditablePropertyName();return isInlineEditingAllowed({rawValue:this.getSetting(e),propTypeFromSchema:this.getInlineEditablePropType()})}getInlineEditablePropertyName(){return wr[this.type]??``}getInlineEditablePropType(){let e=(0,lr.getElementType)(this.type)?.propsSchema,t=this.getInlineEditablePropertyName();return e?.[t]??null}getInlineEditablePropValue(){let e=this.getInlineEditablePropType(),t=this.getInlineEditablePropertyName();return this.getSetting(t)??e?.default??null}getExtractedContentValue(){let e=this.getInlineEditablePropValue();if(ur.escapedHtmlPropTypeUtil.isValid(e))return ur.escapedHtmlPropTypeUtil.extract(e)??``;let t=ur.htmlV3PropTypeUtil.extract(e);return ur.stringPropTypeUtil.extract(t?.content??null)??``}createContentPropValue(e){let t=e||``;return this.getInlineEditablePropTypeKey()===ur.htmlV3PropTypeUtil.key?ur.htmlV3PropTypeUtil.create({content:ur.stringPropTypeUtil.create(t),children:[]}):ur.escapedHtmlPropTypeUtil.create(t)}setContentValue(e){let t=this.getInlineEditablePropertyName(),n=this.createContentPropValue(e);(0,dr.undoable)({do:()=>{let e=this.getInlineEditablePropValue();return this.runCommand(t,n),e},undo:(e,n)=>{this.runCommand(t,n??null)}},{title:(0,lr.getElementLabel)(this.id),subtitle:(0,fr.__)(`%s edited`,`elementor`).replace(`%s`,this.getInlineEditablePropTypeKey()??`Inline editing`),debounce:{wait:Or}})()}getInlineEditablePropTypeKey(){let e=this.getInlineEditablePropType();if(!e)return null;if(e.kind===`union`){let t=[ur.escapedHtmlPropTypeUtil.key,ur.htmlV3PropTypeUtil.key,ur.stringPropTypeUtil.key];for(let n of t)if(e.prop_types[n])return n;return null}return`key`in e&&typeof e.key==`string`?e.key:null}runCommand(e,t){(0,dr.__privateRunCommandSync)(`document/elements/set-settings`,{container:(0,lr.getContainer)(this.id),settings:{[e]:t}},{internal:!0}),(0,dr.__privateRunCommandSync)(`document/save/set-is-modified`,{status:!0},{internal:!0})}getExpectedTag(){let e=this.getTagPropType();return ur.stringPropTypeUtil.extract(this.getSetting(`tag`)??null)??ur.stringPropTypeUtil.extract(e?.default??null)??null}getTagPropType(){let e=(0,lr.getElementType)(this.type)?.propsSchema;if(!e?.tag)return null;let t=e.tag??null;return t.kind===`union`?t.prop_types.string??null:t}renderInlineEditor(){this.isEditingModeActive()&&this.resetInlineEditorRoot();let e=this.element.children?.[0];if(!e)return;let t=e.classList.toString(),n=this.getExtractedContentValue(),r=this.getExpectedTag();e.innerHTML=``,this.editing=!0,this.reactRoot.render(cr.createElement(CanvasInlineEditor,{elementClasses:t,initialValue:n,expectedTag:r,rootElement:this.element,contentElement:e,id:this.id,setValue:this.setContentValue.bind(this),requestDestroy:this.unmountInlineEditor.bind(this)}))}},kr=new Map,initViewReplacements=()=>{registerReplacement(InlineEditingReplacement)},registerReplacement=e=>{let t=e.getTypes();t&&t.forEach(t=>{kr.set(t,e)})},getReplacement=e=>kr.get(e)??null,createViewWithReplacements=e=>{let t=createTemplatedElementView(e);return class extends t{#e=null;#t;#n;#r;constructor(...e){super(...e);let t=this.model.get(`settings`);this.#n=this.el.ownerDocument.createElement(`div`),this.#n.style.display=`none`,this.el.ownerDocument.body.appendChild(this.#n),this.#r=(0,sr.createRoot)(this.#n),this.#t={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.#r,reactContainer:this.#n}}refreshView(){this.invalidateRenderCache?.(),this.render()}renderOnChange(){this.#i(`renderOnChange`)}render(){let e=this.#t,t=e.type,n=t?getReplacement(t):null;n&&!this.#e&&(this.#e=new n(e)),this.#i(`render`)}onDestroy(){this.#i(`onDestroy`),this.#r.unmount(),this.#n.remove()}_afterRender(){this.#i(`_afterRender`)}_beforeRender(){this.#i(`_beforeRender`)}#i(e){let n=t.prototype[e].bind(this),r=this.#e?.shouldRenderReplacement(),i=r&&this.#e?.[e]?.bind(this.#e);if(!i||!r)return n();let a=this.#e?.originalMethodsToTrigger()[e]??`never`;a===`before`&&n(),i(),a===`after`&&n()}}},createTemplatedElementTypeWithReplacements=({type:e,renderer:t,element:n})=>{let r=window,i=createViewWithReplacements({type:e,renderer:t,element:n});return class extends r.elementor.modules.elements.types.Widget{getType(){return e}getView(){return i}}},Ar={},jr={};function registerModelExtensions(e,t){jr[e]=t}function registerElementType(e,t){Ar[e]=t,(0,er.__privateIsReady)()&®isterElementInLegacyManager(e,createDomRenderer())}function initLegacyViews(){(0,er.__privateListenTo)((0,er.v1ReadyEvent)(),()=>{let e=(0,$n.getWidgetsCache)()??{},t=createDomRenderer();registerProPromotionTypes(e),Object.keys(e).forEach(e=>{registerElementInLegacyManager(e,t)})})}function registerElementInLegacyManager(e,t){let n=((0,$n.getWidgetsCache)()??{})[e];n?.atomic&&tryRegisterElement(window,e,n,resolveElementType(e,t,n))}function registerProPromotionTypes(e){Object.entries(e).forEach(([e,t])=>{t.meta?.is_pro_promotion&®isterElementType(e,e=>createProPromotionNestedType(e))})}function resolveElementType(e,t,n){if(canBeNestedTemplated(n)){let r=Ar[e];return r?r({type:e,renderer:t,element:n}):createNestedTemplatedType(e,t,n)}if(!canBeTemplated(n))return createElementType(e);let r=Ar[e];return r?r({type:e,renderer:t,element:n}):createTemplatedElementTypeWithReplacements({type:e,renderer:t,element:n})}function tryRegisterElement(e,t,n,r){if(!(canBeTemplated(n)||canBeNestedTemplated(n)))return;let i=e.elementor.elementsManager,a=!!i.getElementTypeClass(t);try{i.registerElementType(new r)}catch{canBeNestedTemplated(n)&&a&&(i.elementTypes[t]=new r)}}function createNestedTemplatedType(e,t,n){return createNestedTemplatedElementType({type:e,renderer:t,element:n,modelExtensions:jr[e]})}var Mr=`e-list`;function initListType(){registerElementType(Mr,e=>createListType(e))}function createListType(e){let t=createNestedTemplatedElementType(e),n=null;return class extends t{getView(){return n||=createListView(e),n}}}function createListView(e){return createNestedTemplatedElementView(e).extend({getRenderContext(){let e=this._parent?.getRenderContext?.(),t=this.model.get(`settings`)?.get?.(`show_markers`),n=t?.value??t??!0;return{...e,show_markers:n}},getResolverRenderContext(){let e=this._parent?.getResolverRenderContext?.(),t=this.model.get(`settings`)?.get?.(`show_markers`),n=t?.value??t??!0;return{...e,show_markers:n}}})}var Nr=globalThis.elementorV2.editorProps,Pr={modifyDefaultChildren(e){if(!Array.isArray(e)||e.length===0)return e;let[t]=e,n=this.get(`editor_settings`)?.initial_position;if(!n||!t||typeof t!=`object`)return e;let r=t;return[{...r,settings:{...r.settings,paragraph:Nr.escapedHtmlPropTypeUtil.create(`Tab ${n}`)}},...e.slice(1)]}};function initTabsModelExtensions(){registerModelExtensions(`e-tab`,Pr)}var Fr=globalThis.elementorV2.editorProps,Ir=globalThis.elementorV2.httpClient,Lr=`elementor/v1/mcp-proxy`,Rr=`elementor://context/available-widgets`,zr=`elementor://context/available-widgets/v4`,fetchWidgets=async()=>{let{data:e}=await(0,Ir.httpService)().post(Lr,{tool:`list-widget-schemas`,input:{summary:!0}});return e.data?.widgets??[]},buildContents=async e=>{let t=await fetchWidgets();return{contents:[{uri:e,mimeType:`application/json`,text:JSON.stringify(t,null,2)}]}},initAvailableWidgetsResource=e=>{let{resource:t}=e;t(`available-widgets-v4`,zr,{description:`All registered v4 version widgets`},async()=>buildContents(zr)),t(`available-widgets`,Rr,{description:`All registered v4 widget types with description.`},async()=>buildContents(Rr))},Br=globalThis.elementorV2.httpClient,Vr=`elementor/v1/mcp-proxy`,Hr=`elementor://style/best-practices`,initBestPracticesResource=e=>{let{resource:t}=e;t(`style-best-practices`,Hr,{description:`Design quality guidelines for avoiding generic AI output: typography, color strategy, spacing, motion, and visual hierarchy best practices.`,mimeType:`text/markdown`},async e=>{let{data:t}=await(0,Br.httpService)().get(Vr,{params:{uri:e.href}});return{contents:[{uri:e.href,mimeType:`text/markdown`,text:t.data}]}})},Ur=globalThis.elementorV2.editorElements,Wr=globalThis.elementorV2.editorV1Adapters,Gr=`elementor://document/structure`,initDocumentStructureResource=e=>{let{resource:t,sendResourceUpdated:n}=e,r=null,updateDocumentStructure=()=>{let e=getDocumentStructure(),t=JSON.stringify(e,null,2);t!==r&&(r=t,n({uri:Gr}))};(0,Wr.__privateListenTo)([(0,Wr.commandEndEvent)(`document/elements/create`),(0,Wr.commandEndEvent)(`document/elements/delete`),(0,Wr.commandEndEvent)(`document/elements/move`),(0,Wr.commandEndEvent)(`document/elements/copy`),(0,Wr.commandEndEvent)(`document/elements/paste`),(0,Wr.commandEndEvent)(`editor/documents/attach-preview`),(0,Wr.commandEndEvent)(`editor/documents/switch`)],updateDocumentStructure),updateDocumentStructure(),t(`document-structure`,Gr,{description:`Document structure.`},async()=>({contents:[{uri:Gr,text:JSON.stringify(getDocumentStructure(),null,2)}]}))};function getDocumentStructure(){let e=window.elementor?.documents?.getCurrent?.();if(!e)return{error:`No active document found`};let t=(e.container?.children||[]).map(e=>extractElementData(e));return{documentId:e.id,documentType:e.config.type,title:e.config.settings?.post_title||`Untitled`,elements:t.filter(e=>e!==null)}}function resolveElementVersion(e){if(e.model?.config?.atomic)return`v4`;let t=e.model?.attributes?.widgetType;return t&&(0,Ur.getWidgetsCache)()?.[t]?.atomic_props_schema?`v4`:`v3`}function extractElementData(e){if(!e||!e.model)return null;let t=e.model.attributes,n={id:t.id,elType:t.elType,widgetType:t.widgetType||void 0,version:resolveElementVersion(e)},r=t.title||e.model?.editor_settings?.title||e.model.getTitle?.();return r&&(n.title=r),e.children&&e.children.length>0&&(n.children=e.children.map(e=>extractElementData(e)).filter(e=>e!==null)),n}var Kr=globalThis.elementorV2.httpClient,qr=`elementor://dynamic-tags`,Jr=`elementor/v1/mcp-proxy`,fetchDynamicTags=async()=>{let{data:e}=await(0,Kr.httpService)().get(Jr,{params:{uri:qr}});return e.data??`[]`},initDynamicTagsResource=e=>{let{resource:t}=e;t(`dynamic-tags`,qr,{description:`List of available dynamic tags. To bind a property to a dynamic source, set its value to { "$$type": "dynamic", "value": { "name": <tag name>, "settings": { ... } } } using a tag whose name appears in that property's allowed list, and populate "settings" per the tag entry here.`,mimeType:`application/json`},async e=>({contents:[{uri:e.href,mimeType:`application/json`,text:await fetchDynamicTags()}]}))},Yr=globalThis.elementorV2.editorV1Adapters,Xr=`The user is currently viewing the Elementor editor`,Zr=500,Qr=2,$r=`elementor://context/editor-state`,initEditorStateResource=e=>{let{resource:t,sendResourceUpdated:n}=e,r=``,buildState=()=>({currentlyViewedScreen:Xr,pageContent:getPageContentFromPreview(),pageTitle:getPageTitle()}),notifyIfChanged=()=>{let e=JSON.stringify(buildState());e!==r&&(r=e,n({uri:$r}))};(0,Yr.__privateListenTo)([(0,Yr.commandEndEvent)(`editor/documents/switch`),(0,Yr.commandEndEvent)(`editor/documents/attach-preview`)],notifyIfChanged),r=JSON.stringify(buildState()),t(`editor-state`,$r,{description:`Editor page title, preview text snapshot, and viewed screen label.`},async()=>({contents:[{uri:$r,text:JSON.stringify(buildState(),null,2)}]}))};function getPageContentFromPreview(){try{let e=window.elementor?.$previewContents?.[0];if(!e)return null;let t=[],n=e.cloneNode(!0);n.querySelectorAll(`.elementor-editor-element-settings, #elementor-add-new-section`).forEach(e=>{e.remove()});let walk=(e,n=!1)=>{let r=e.classList?.contains(`elementor-element`)||n;if(e.nodeType===Node.TEXT_NODE&&r){let n=e.textContent?.trim().replace(/\s+/g,` `);n&&n.length>Qr&&t.push(n)}else e.childNodes.forEach(e=>{walk(e,r)})};walk(n);let r=t.join(` `);return r.length>Zr?r.slice(0,Zr)+`...`:r}catch{return null}}function getPageTitle(){try{let e=(window.elementor?.documents?.getCurrent?.())?.config?.settings?.post_title;if(e)return e;let t=document.title||`Page`;return t=t.split(/\s*[‹»|–—-]\s*/)[0],t.trim()||`Page`}catch{return`Page`}}var ei=globalThis.elementorV2.editorV1Adapters,ti=`elementor://context/general`,initGeneralContextResource=e=>{let{resource:t,sendResourceUpdated:n}=e,r=null,getPageTitle2=()=>{let e=window.elementor?.documents?.getCurrent?.()?.config?.settings?.post_title;return e?.trim()?e:null},buildPayload=()=>{let e=window,t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new URLSearchParams(location.search).get(`post`),r=n?Number(n):null,i=r!==null&&Number.isFinite(r)?r:null,a=getPageTitle2(),o=new URL(window.location.href),s=o.pathname+o.search,c=a||`Elementor Editor`,l=e.angieConfig?.plugins;return{timezone:t,postId:i,currentPage:{pageName:c,pageTitle:a,pageUrl:s},...l&&{plugins:l}}},pushUpdateIfChanged=()=>{let e=JSON.stringify(buildPayload());e!==r&&(r=e,n({uri:ti}))};t(`general-context`,ti,{description:`General context: timezone, post id, and current page.`},async()=>({contents:[{uri:ti,mimeType:`application/json`,text:JSON.stringify(buildPayload(),null,2)}]})),(0,ei.__privateListenTo)([(0,ei.commandEndEvent)(`editor/documents/switch`),(0,ei.commandEndEvent)(`editor/documents/attach-preview`),(0,ei.commandEndEvent)(`document/elements/settings`)],pushUpdateIfChanged),pushUpdateIfChanged()},ni=globalThis.elementorV2.editorElements,ri=globalThis.elementorV2.editorProps,ii=globalThis.elementorV2.editorV1Adapters,ai=`elementor://context/selected-element`,initSelectedElementResource=e=>{let{resource:t,sendResourceUpdated:n}=e,r=null,publishIfChanged=e=>{let t=JSON.stringify(e);t!==r&&(r=t,n({uri:ai}))},onCommand=e=>{if(e.type!==`command`)return;let t=e;if(t.command===`document/elements/deselect-all`){publishIfChanged(createEmptySelectedElementPayload());return}if(t.command!==`document/elements/select`&&t.command!==`document/elements/settings`)return;let{container:n}=t.args||{};if(n?.id){publishIfChanged(buildPayloadFromContainer(n));return}publishIfChanged(readSelectionFromEditor())};(0,ii.__privateListenTo)([(0,ii.commandEndEvent)(`document/elements/select`),(0,ii.commandEndEvent)(`document/elements/deselect-all`),(0,ii.commandEndEvent)(`document/elements/settings`)],onCommand),publishIfChanged(readSelectionFromEditor()),t(`selected-element`,ai,{description:`Currently selected Elementor element context.`},async()=>({contents:[{uri:ai,text:JSON.stringify(readSelectionFromEditor(),null,2)}]}))};function createEmptySelectedElementPayload(){return{elementDisplayName:null,elementType:null,properties:null,selectedElementId:null,selectedParentId:null,version:null,widgetType:null}}function readSelectionFromEditor(){let e=(0,ni.getSelectedElements)();return e.length===1?buildPayloadFromContainer((0,ni.getContainer)(e[0].id)):createEmptySelectedElementPayload()}function buildPayloadFromContainer(e){if(!e?.id)return createEmptySelectedElementPayload();let t=e.model.get(`widgetType`)??null,n=e.type??`widget`;return{elementDisplayName:getElementDisplayName(e),elementType:n,properties:getElementProperties(e,t),selectedElementId:e.id,selectedParentId:e.parent?.id??null,version:resolveElementVersion2(e,t),widgetType:t}}function resolveElementVersion2(e,t){return e.model?.config?.atomic||t&&(0,ni.getWidgetsCache)()?.[t]?.atomic_props_schema?`v4`:`v3`}function getElementProperties(e,t){let n=e.settings?.toJSON?.();if(!n||typeof n!=`object`)return null;let r=(0,ni.getWidgetsCache)(),i=(t?r?.[t]:null)?.controls,a=t??e.model.get(`elType`)??null,o=a?r?.[a]?.atomic_props_schema:void 0,s={};for(let[e,t]of Object.entries(n)){if(t==null||t===``||ri.Schema.isPropSensitive(o?.[e]))continue;let n=i?.[e]?.default;(n===void 0||JSON.stringify(t)!==JSON.stringify(n))&&(s[e]=t)}return Object.keys(s).length>0?s:null}function getElementDisplayName(e){try{if(e.label)return e.label;let t=e.model?.get?.(`widgetType`);return t?(t.charAt(0).toUpperCase()+t.slice(1)).replace(/-/g,` `):e.type===`container`?`Container`:e.type===`section`?`Section`:`Element ${e.id}`}catch{return`Element ${e.id}`}}var oi=globalThis.elementorV2.editorElements,si=globalThis.elementorV2.editorMcp,ci=globalThis.elementorV2.editorProps,li=globalThis.elementorV2.editorElements,ui=globalThis.elementorV2.editorProps,di=globalThis.elementorV2.editorStyles,fi=globalThis.elementorV2.editorV1Adapters,pi=` `,mergeCustomCssText=(...e)=>e.map(e=>e?.trim()).filter(e=>!!e).join(pi),readStoredCustomCssText=e=>{if(!e)return``;try{return atob(e)}catch{return``}},mi=globalThis.elementorV2.editorElements;function buildAliasToCanonicalMap(e){let t={};for(let[n,r]of Object.entries(e)){let e=r.meta?.aliases;if(Array.isArray(e))for(let r of e)typeof r==`string`&&r&&(t[r]=n)}return t}function resolveCanonicalPropName(e,t){let n=(0,mi.getWidgetsCache)()?.[e]?.atomic_props_schema;return!n||n[t]?t:buildAliasToCanonicalMap(n)[t]??t}function resolveCanonicalPropKeys(e,t){let n=(0,mi.getWidgetsCache)()?.[e]?.atomic_props_schema;if(!n)return{...t};let r=buildAliasToCanonicalMap(n),i={};for(let[e,r]of Object.entries(t))n[e]&&(i[e]=r);for(let[e,a]of Object.entries(t)){if(n[e])continue;let t=r[e];if(!t){i[e]=a;continue}Object.prototype.hasOwnProperty.call(i,t)||(i[t]=a)}return i}var hi=globalThis.elementorV2.editorV1Adapters,gi=`dynamic`,_i=[`fallback`],getAtomicDynamicTags=()=>(0,hi.getElementorConfig)().atomicDynamicTags?.tags??{},getDynamicTagNamesByCategories=e=>{if(!e.length)return[];let t=new Set(e);return Object.values(getAtomicDynamicTags()).filter(e=>e.categories?.some(e=>t.has(e))).map(e=>e.name)},dynamicTagLLMResolver=e=>{let t=e??{},n=t.name?getAtomicDynamicTags()[t.name]:void 0;return n?{$$type:gi,value:{name:n.name,group:n.group,settings:buildStrictSettings(n.props_schema??{},t.settings??{})}}:{$$type:gi,value:{name:t.name??``,group:``,settings:{}}}},buildStrictSettings=(e,t)=>{let n={};for(let[r,i]of Object.entries(e)){if(_i.includes(r))continue;let e=t[r]===void 0?defaultSettingValue(i):wrapSettingValue(t[r],i);e!=null&&(n[r]=e)}return n},wrapSettingValue=(e,t)=>typeof e==`object`&&e?e:t.key?{$$type:t.key,value:e}:e,defaultSettingValue=e=>{if(e.initial_value!==null&&e.initial_value!==void 0)return e.initial_value;if(e.default!==null&&e.default!==void 0)return wrapSettingValue(e.default,e)},vi={breakpoint:`desktop`,state:null},UnsupportedPropertyError=class extends Error{elementType;propertyName;constructor(e,t,n){super(`Property "${t}" does not exist on element type "${e}". Available properties are: ${n.join(`, `)}`),this.name=`UnsupportedPropertyError`,this.elementType=e,this.propertyName=t}};function resolvePropValue(e,t){let n=window.elementorV2.editorVariables.Utils;return ui.Schema.adjustLlmPropValueSchema(e,{forceKey:t,transformers:{...n.globalVariablesLLMResolvers,[gi]:dynamicTagLLMResolver}})}var doUpdateElementProperty=e=>{let{elementId:t,propertyValue:n,elementType:r,customCssWriteMode:i=`replace`}=e,a=e.propertyName===`_styles`?e.propertyName:resolveCanonicalPropName(r,e.propertyName);if(a===`_styles`){let e=(0,li.getElementStyles)(t)||{},r=n,a=(0,di.getStylesSchema)(),o=Object.fromEntries(Object.entries(r).map(([e,t])=>{if(e===`custom_css`)return[e,t];let{key:n,kind:r}=a?.[e]||{};if(!n&&r!==`union`)throw Error(`_styles property ${e} is not supported.`);return t===null?[e,null]:[e,resolvePropValue(t,n)]})),s=Object.values(e).find(e=>e.label===`local`),c=s?readStoredCustomCssText((0,di.getVariantByMeta)(s,vi)?.custom_css?.raw):``,l;Object.keys(r).forEach(e=>{let t=a[e];if(e===`custom_css`){let t=r[e];typeof t==`object`&&t&&t.value&&(t=String(t.value)),t||=``;let n=i===`merge-with-stored`?mergeCustomCssText(c,t):String(t);l=n?{raw:btoa(n)}:{raw:btoa(``)};return}if(!t)throw Error(`Style property ${e} is not supported.`);if(t.kind===`plain`&&typeof r[e]!=`object`){let n=(0,ui.getPropSchemaFromCache)(t.key);if(n){let t=n.create(r[e]);r[e]=t}}}),delete o.custom_css,s?(0,li.updateElementStyle)({elementId:t,styleId:s.id,meta:{breakpoint:`desktop`,state:null},...l===void 0?{}:{custom_css:l},props:{...o}}):(0,li.createElementStyle)({elementId:t,...l===void 0?{}:{custom_css:l},classesProp:`classes`,label:`local`,meta:{breakpoint:`desktop`,state:null},props:{...o}});return}let o=(0,li.getWidgetsCache)()?.[r]?.atomic_props_schema;if(!o)throw Error(`No prop schema found for element type: ${r}`);if(!o[a])throw new UnsupportedPropertyError(r,a,Object.keys(o));let s=o[a].key,c=resolvePropValue(n,s),{valid:l,jsonSchema:u}=ui.Schema.validatePropValue(o[a],n);if(!l)throw Error(`Invalid PropValue for elementId: ${t}. PropKey: ${s}, PropValue: ${JSON.stringify(n)} Expected Schema: ${u}`);(0,li.updateElementSettings)({id:t,props:{[a]:c},withHistory:!1}),(0,fi.__privateRunCommandSync)(`document/save/set-is-modified`,{status:!0},{internal:!0})},yi=globalThis.elementorV2.editorMcp,bi='# Icons (the `svg` property on e-svg)\nThe `svg` property accepts two variants. Prefer a library icon for iconography (carts, arrows, social marks, check marks) — it needs no upload and inherits `color` via `currentColor`. Use an uploaded file only for custom artwork such as a brand logo.\n\nResolve the icon with the `find-icons` tool FIRST, then copy its `value` and `library` verbatim. Never assemble those strings yourself: Font Awesome renamed many icons between major versions (`shopping-cart` became `cart-shopping`), so a plausible guess renders nothing. `find-icons` matches on names, aliases, human search terms, and categories, so describe the intent — "add to cart" finds `cart-shopping`. It takes a batch of `queries`, so resolve every icon you need in one call.\n\nLibrary icon (note the nested PropValues — `value` and `library` are each a `string` PropValue):\n{ "$$type": "icon", "value": { "value": { "$$type": "string", "value": "fa-solid fa-cart-shopping" }, "library": { "$$type": "string", "value": "fa-solid" } } }\n\nUploaded SVG file:\n{ "$$type": "svg-src", "value": { "id": { "$$type": "image-attachment-id", "value": 123 } } }\n\nSize and colour an e-svg through `style` (`width`, `height`, `color`), never through `propertiesToChange`.\n',xi=` Setting a Font Awesome icon on an e-svg, after resolving it with \`find-icons\`: \`\`\`json { propertiesToChange: { svg: { $$type: 'icon', value: { value: { $$type: 'string', value: 'fa-solid fa-cart-shopping' }, library: { $$type: 'string', value: 'fa-solid' } } } }, style: { 'width': '1.25rem', 'height': '1.25rem', 'color': '#1a1a1a' }, elementId: 'element-id', elementType: 'e-svg' }; \`\`\` `,Si=`elementor://canvas/tools/configure-element-guide`,generatePrompt=()=>{let e=(0,yi.toolPrompts)(`configure-element`);return e.description(` Configure an existing element on the page. # **CRITICAL - REQUIRED INFORMATION (Must read before using this tool)** 1. [${p}] \u2014 **Widget properties** (\`propertiesToChange\`): each widgetType (e.g. e-heading, e-button) has its own PropType schema; values must be PropValues with \`$$type\`. 2. [elementor://global-variables] \u2014 **Design tokens for styling**: use labels in CSS as \`var(--label)\` or \`var(--label, fallback)\`; only variables listed here are valid. 3. **Styling** (\`style\` parameter): flat map of CSS property \u2192 value strings \u2014 **not** PropValues. The server converts to native styles; unconvertible declarations become custom CSS. 4. **Current state**: \`get-element-configuration-values\` returns \`properties\` as PropValues and \`style\` in stored form; when writing, send raw CSS in \`style\`, not copied PropValues. Before using this tool, read the widget PropType schema at editor-canvas__elementor://widgets/schema/{widgetType} # When to use this tool When a user requires to change anything in an element, such as updating text, colors, sizes, or other configurable properties. This tool handles elements of type "widget". This tool handles styling elements, using the "style" parameter (raw CSS as a property \u2192 value map). To CLEAR a property (i.e., set it to default or none), provide null as a value - example: \`background-color: null\`. The element's schema must be known before using this tool. **PropValue structure (for \`propertiesToChange\` only \u2014 not for \`style\`):** { "$$type": string, // MANDATORY as defined in the PropType schema under the "key" property 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. } <IMPORTANT> ALWAYS MAKE SURE you have the PropType schemas for the element you are configuring. If you are not sure, retrieve the schema from the resources mentioned above. </IMPORTANT> You can use multiple property changes at once by providing multiple entries in the propertiesToChange object. Some properties are nested, use the root property name, then objects with nested values inside, as the complete schema suggests. Make sure you have the "widget-schema-by-type" resource available to retrieve the PropType schema for the element type you are configuring. # How to configure elements We use a dedicated PropType Schema for configuring element properties (propertiesToChange). When you configure an element property, you must use the EXACT PropType Value as defined in the schema. For styling, use the "style" parameter with raw CSS declarations (property \u2192 value strings) - e.g. \`color: var(--primary-text, #000); height: 4rem;\`; For all non-primitive entries in \`propertiesToChange\`, provide the schema \`key\` as \`$$type\` in the generated object, as it is MANDATORY for parsing. Use the EXACT PropType schema given, and ALWAYS include the \`key\` from the schema for every property you are changing in \`propertiesToChange\`. # Dynamic tags A value can be made dynamic wherever its schema exposes a variant with "$$type": "dynamic". This may be the property root OR a NESTED field: for example an image is made dynamic on its "src" (the root stays "image"), NOT on the whole "image" value. Put the dynamic object EXACTLY at the node whose schema offers the "dynamic" variant, in place of the static variant. The variant's "name" enumerates the tags allowed at that node. 1. Read the [${qr}] resource for each allowed tag's settings schema. 2. Provide, at that node: { "$$type": "dynamic", "value": { "name": "<allowed tag name>", "settings": { /* strictly per the tag's settings schema */ } } } Image example: { "$$type": "image", "value": { "src": { "$$type": "dynamic", "value": { "name": "<image tag>", "settings": { ... } } } } } Do NOT send "group" (it is resolved automatically). Use { "settings": {} } only when the tag has no settings. ${bi}`),e.parameter(`elementId`,`The ID of the element to configure. MANDATORY.`),e.parameter(`elementType`,`The type of the element to configure (i.e. e-heading, e-button). MANDATORY.`),e.parameter(`propertiesToChange`,`An object containing the properties to change, with their new values. MANDATORY. When updating a style only, provide an empty object.`),e.parameter(`style`,`A flat map of raw CSS declarations (property → value), e.g. { "line-height": "1.25rem", "color": "var(--primary-text, #000)" }. font-family must be a single Google Font name or a var(--label) — no fallback stacks. Set a value to null to reset that property to its default. OPTIONAL.`),e.example(` \`\`\`json { propertiesToChange: { // List of properties TO CHANGE, following the PropType schema for the element as defined in the resource [${p}] title: { $$type: 'string', value: 'New Title Text' }, border: { $$type: 'boolean', value: false }, }, style: { 'line-height': '1.25rem', 'color': 'var(--primary-text, #000)' }, elementId: 'element-id', elementType: 'element-type' }; \`\`\` `),e.example(xi),e.instruction(`The $$type property is MANDATORY for every value in propertiesToChange; it is not used in the style parameter (raw CSS only).`),e.instruction("\nV4 only: If MCP fails, give manual steps using V4 UI.\n\nV4 Editor structure:\nPanel tabs: General (→ Settings section: ID, Tag, and Link where the widget supports it), Style, Interactions.\nNO Advanced tab. Never mention Advanced tab.\nNote: `link` is valid only when the element's PropType schema (which you must already have) includes a `link` property. Sending `link` to a widget whose schema lacks it is skipped and reported in the response `warnings` (other changes still apply) and the link is lost.\n"),e.prompt()},Ci=globalThis.elementorV2.schema,wi={propertiesToChange:Ci.z.record(Ci.z.string().describe(`The property name.`),Ci.z.any().describe(`PropValue, refer to [${p}] by correct type, as appears in elementType`),Ci.z.any()).describe(`An object record containing property names and their new values to be set on the element`),style:Ci.z.record(Ci.z.string().describe(`A CSS property name, e.g. "color", "margin-top".`),Ci.z.string().nullable().describe(`A CSS value, e.g. "red", "10px", "1px solid #000". Use null to reset the property to its default.`)).describe(`Raw CSS declarations as a flat property→value map. Converted to native styles server-side; any declaration that cannot be converted is stored as the element custom CSS. A null value resets that property to its default.`).default({}),elementType:Ci.z.string().describe(`The type of the element to retrieve the schema`),elementId:Ci.z.string().describe(`The unique id of the element to configure`)},Ti={success:Ci.z.boolean().describe(`Whether the configuration change was successful, only if propertyName and propertyValue are provided`),warnings:Ci.z.string().describe(`Non-fatal notices. Present when some props were skipped because they are not in the element schema (e.g. a "link" on a widget with no link prop). Other changes were still applied.`).optional()},initConfigureElementTool=e=>{let{addTool:t,resource:n}=e;n(`configure-element-guide`,Si,{title:`Configure Element Guide`,description:`Detailed guide for using the configure-element tool`,mimeType:`text/plain`},async e=>({contents:[{uri:e.href,mimeType:`text/plain`,text:generatePrompt()}]})),t({name:`configure-element`,description:`Configure an existing V4 element's properties and styles. Read the guide resource before use.`,schema:wi,outputSchema:Ti,requiredResources:[{description:`Widgets schema`,uri:p},{description:`Configure element guide`,uri:Si},{description:`Dynamic tags catalog`,uri:qr}],handler:async({elementId:e,propertiesToChange:t,elementType:n,style:r})=>{let i=(0,oi.getWidgetsCache)()?.[n];if(!i)throw Error(`Unknown element type: ${n}. Check the available-widgets resource for valid types.`);let a=(0,oi.getContainer)(e);if(!a)throw Error(`Element with id ${e} not found`);if(a.settings.get(`widgetType`)!==n&&a.type!==n)throw Error(`Element with ID ${e} is not of type ${n}`);if(!i.atomic_props_schema)throw Error(`This tool does not support V3 elements. Please use the elementor-v3-mcp tools instead for element type: ${n}`);let o=resolveCanonicalPropKeys(n,t),s=Object.entries(o),c=[];for(let[t,r]of s){if(!ci.Schema.isPropKeyConfigurable(t,i.atomic_props_schema[t]))throw Error(`Not allowed to update ${t}`);try{doUpdateElementProperty({elementId:e,elementType:n,propertyName:t,propertyValue:r})}catch(r){if(r instanceof UnsupportedPropertyError){c.push(r.propertyName);continue}let i=createUpdateErrorMessage({propertyName:t,elementId:e,elementType:n,error:r,propertyType:`prop`});throw Error(i)}}return await applyStyleFromCss({elementId:e,elementType:n,style:r}),{success:!0,warnings:c.length?`Skipped unsupported props (not in the "${n}" schema; other changes were applied): ${c.join(`, `)}.`:void 0}}})};async function applyStyleFromCss(e){let{elementId:t,elementType:n,style:r}=e;if(!r||Object.keys(r).length===0)return;let{props:i,customCss:a}=await convertCssToAtomic(r),o={...i};if(a&&(o.custom_css=a),Object.keys(o).length!==0)try{doUpdateElementProperty({elementId:t,elementType:n,propertyName:`_styles`,propertyValue:o,customCssWriteMode:`merge-with-stored`}),(0,si.dispatchMcpStylesAppliedEvent)({styleValue:o})}catch(e){throw Error(createUpdateErrorMessage({propertyName:`(style)`,elementId:t,elementType:n,propertyType:`style`,error:e}))}}function createUpdateErrorMessage(e){let{propertyName:t,elementId:n,elementType:r,error:i,propertyType:a}=e;return`Failed to update property "${t}" on element "${n}": ${i.message}. ${a===`prop`?` Check the element's PropType schema at the resource [${p.replace(`{widgetType}`,r)}] for type "${r}" to ensure the property exists and the value matches the expected PropType. Now that you have this information, ensure you have the schema and try again.`:` Provide styling as raw CSS via the "style" parameter (a flat map of CSS property → value). Declarations that cannot be converted are stored as the element custom CSS.`}; }`}var Ei=globalThis.elementorV2.httpClient,$=globalThis.elementorV2.schema,Di=globalThis.elementorV2.httpClient;function getMcpErrorMessage(e,t){if(e instanceof Di.AxiosError){let t=e.response?.data;if(t?.message)return t.code?`${t.code}: ${t.message}`:t.message}return e instanceof Error?e.message:`${t} failed with an unknown error.`}var Oi=(0,globalThis.elementorV2.editorMcp.toolPrompts)(`find-icons`);Oi.description("Finds icons for the `svg` property of an `e-svg` element, across Font Awesome and any icon packs uploaded to this site. Returns the exact `value` and `library` pair to write - never assemble those strings yourself, and never guess an icon name. Call this before placing or configuring an `e-svg`. Nothing has to be uploaded to the Media Library for an icon to work."),Oi.instruction('Call it when the user names an icon ("use the cart-shopping icon") and take the first exact `name` match, and also when the user describes a page and you decide icons belong in it ("create a product page") - in that case pass one query per icon you intend to place, in a single call.'),Oi.instruction(`Write queries the way a person would describe the icon ("shopping cart", "credit card", "phone"). Icons are matched on their name, aliases, Font Awesome search terms and category, so plain language works better than guessed icon names.`),Oi.instruction('Results are ordered best first; `matched_on: "name"` is a stronger signal than `matched_on: "term"`. Check each result\'s `license` and only use `free` icons; skip any `pro` entry. Prefer `fa-solid` for UI iconography and keep one style across a page; brand marks only exist in `fa-brands`. An empty `matches` array means no match was found: broaden the phrase instead of inventing a value.'),Oi.instruction('Pass the chosen pair to `configure-element` as the `svg` property: { "$$type": "icon", "value": { "value": { "$$type": "string", "value": "fa-solid fa-cart-shopping" }, "library": { "$$type": "string", "value": "fa-solid" } } }. An `e-svg` has no colour or size of its own, so set `width`, `height` and `color` in the same `configure-element` call.'),Oi.example(`Icon named by the user: { "queries": ["cart-shopping"] }`),Oi.example(`Every icon a product page needs, in one call: { "queries": ["add to cart", "free shipping", "secure payment", "instagram"] }`),Oi.example(`Browse a category, one style only: { "category": "shopping", "library": "fa-solid", "perPage": 25 }`);var ki=`elementor/v1/mcp-proxy`,Ai=10,ji=25,initFindIconsTool=e=>{let{addTool:t}=e;t({name:`find-icons`,description:Oi.prompt(),schema:{queries:$.z.array($.z.string()).max(Ai).optional().describe(`One plain-language phrase per icon you need, for example ["add to cart", "free shipping"]. Batch every icon a page needs into a single call.`),library:$.z.string().optional().describe(`Restrict results to one library key reported in "libraries", for example "fa-solid". Omit to search every library installed on the site.`),category:$.z.string().optional().describe(`Restrict results to one Font Awesome category reported in "categories", for example "shopping". May be used without a query to browse that category.`),page:$.z.number().int().min(1).optional(),perPage:$.z.number().int().min(1).max(ji).optional()},outputSchema:{results:$.z.array($.z.object({query:$.z.string(),matches:$.z.array($.z.object({value:$.z.string(),library:$.z.string(),name:$.z.string(),label:$.z.string(),matched_on:$.z.enum([`name`,`alias`,`term`,`category`,`library`]),license:$.z.enum([`free`,`pro`])})),total:$.z.number(),page:$.z.number(),per_page:$.z.number(),truncated:$.z.boolean()})).describe(`One entry per query, each with ranked "matches". Every match carries the "value" and "library" pair to write on the e-svg icon prop, plus "matched_on" and "license".`),libraries:$.z.array($.z.string()).optional().describe(`Icon library keys installed on this site. Only sent when nothing matched or when browsing.`),customLibraries:$.z.record($.z.string(),$.z.string()).optional().describe(`Custom (uploaded) icon libraries keyed by library. Only sent when nothing matched or when browsing.`),categories:$.z.array($.z.string()).optional().describe(`Icon categories for the "category" filter. Only sent when nothing matched or when browsing.`),truncatedCustomLibraries:$.z.array($.z.string()).optional().describe(`Custom libraries with more than 250 icons; only their first 250 icons are searchable.`),fontAwesomeVersion:$.z.string().nullable().describe(`Font Awesome version the site renders icons from.`),llmInstructions:$.z.string().optional().describe(`Present only when nothing matched, explaining what to do next.`)},handler:async({queries:e,library:t,category:n,page:r,perPage:i})=>{try{let{data:a}=await(0,Ei.httpService)().post(ki,{tool:`find-icons`,input:{...e?{queries:e}:{},...t?{library:t}:{},...n?{category:n}:{},...r?{page:r}:{},...i?{per_page:i}:{}}});return{results:a.data.results,...a.data.libraries?{libraries:a.data.libraries}:{},...a.data.custom_libraries?{customLibraries:a.data.custom_libraries}:{},...a.data.categories?{categories:a.data.categories}:{},...a.data.truncated_custom_libraries?{truncatedCustomLibraries:a.data.truncated_custom_libraries}:{},fontAwesomeVersion:a.data.font_awesome_version,...a.data.llm_instructions?{llmInstructions:a.data.llm_instructions}:{}}}catch(e){throw Error(getMcpErrorMessage(e,`find-icons`))}}})},Mi=globalThis.elementorV2.editorDocuments,Ni=globalThis.elementorV2.httpClient,Pi=globalThis.elementorV2.schema,Fi=`elementor/v1/mcp-proxy`,initGetPageStructureTool=e=>{let{addTool:t}=e;t({name:`get-page-structure`,description:`Returns a lean Elementor element tree skeleton (id, elType, widgetType, title, nested elements) for a post or page. If no postId is provided, uses the currently open document. Optionally scope to a subtree with elementId. Set includeContent=true (requires elementId) to also return each node's settings and styles.`,schema:{postId:Pi.z.number().optional().describe(`WordPress post ID of the Elementor document. If omitted, uses the currently open document.`),elementId:Pi.z.string().optional().describe(`If provided, returns only the subtree rooted at that element id.`),includeContent:Pi.z.boolean().optional().describe(`If true, includes each node's settings and styles (same shape build-composition accepts as input). Requires elementId.`)},outputSchema:{elements:Pi.z.array(Pi.z.any()).describe(`Skeleton of Elementor elements (id, elType, widgetType, title, nested elements). When includeContent is true, each node also includes settings and styles.`)},handler:async({postId:e,elementId:t,includeContent:n})=>{let r=e??(0,Mi.getCurrentDocument)()?.id;if(!r)throw Error(`No post ID provided and no active document found.`);try{let{data:e}=await(0,Ni.httpService)().post(Fi,{tool:`get-page-structure`,input:{post_id:r,...t?{element_id:t}:{},...n?{include_content:!0}:{}}});return{elements:e.data.elements}}catch(e){throw Error(getMcpErrorMessage(e,`get-page-structure`))}}})},initCanvasMcp=e=>{Fr.Schema.setDynamicTagNamesResolver(getDynamicTagNamesByCategories),initWidgetsSchemaResource(e),initAvailableWidgetsResource(e),initDocumentStructureResource(e),initDynamicTagsResource(e),initSelectedElementResource(e),initEditorStateResource(e),initGeneralContextResource(e),initBestPracticesResource(e),initConfigureElementTool(e),initFindIconsTool(e),initGetPageStructureTool(e),initBreakpointsResource(e)},Ii=`Elementor Canvas MCP This MCP enables configuration and styling of existing V4 elements on the Elementor canvas using the configure-element tool. # Core Concepts ## PropValues Structure All data in Elementor uses PropValues - a typed wrapper for values: \`\`\`json { "$$type": "the-prop-type-schema-kind", "value": "the-actual-value-as-defined-for-the-propType" } \`\`\` The \`$$type\` defines how Elementor interprets the value. Providing the correct \`$$type\` is critical - incorrect types will be rejected. ## Design System Resources - **Global Variables**: Reusable colors, sizes, and fonts (\`elementor://global-variables\`) - **Global Classes**: Reusable style sets that can be applied to elements (\`elementor://global-classes\`) - **Widget Schemas**: Configuration options for each widget type (\`${p}\`) # Configuring Elements with configure-element The \`configure-element\` tool updates settings and styles on existing V4 elements. Read the configure-element guide resource before use. ## Complete Workflow ### 1. Parse User Requirements Understand what needs to change: content, settings, or styling on existing elements. ### 2. Check Global Resources FIRST Always check existing resources before styling: - List \`elementor://global-variables\` for available variables (colors, sizes, fonts) - List \`elementor://global-classes\` for available style sets - **Always prefer using existing global resources over creating inline styles** ### 3. Retrieve Widget Schemas For each element you will configure: - List \`${p}\` to see available widgets - Retrieve configuration schema from \`${p.replace(`{widgetType}`,`element-schema`)}\` for each widget - Check the \`llm_guidance\` property for container nesting, \`default_styles\`, and \`default_settings\` ### 4. Get Current Element State Use page structure and element configuration resources to find element IDs and current values. ### 5. Create propertiesToChange Map property names to PropValues using the widget schema: - Use correct \`$$type\` matching the widget's schema - Use global variables in PropValues where applicable - Example: \`\`\`json { "text": { "$$type": "string", "value": "Welcome" }, "tag": { "$$type": "string", "value": "h1" } } \`\`\` ### 6. Create style Provide raw CSS declarations (property \u2192 value strings). The server converts them to native styles and stores any unconvertible declarations as the element custom CSS. - Example: \`\`\`json { "color": "#1a1a1a", "font-size": "2rem" } \`\`\` ### 7. Execute configure-element Call the tool with elementId, elementType, propertiesToChange, and style as needed. ## Key Points - **PropValue Types**: Arrays that accept union types are typed as mixed arrays - **Visual Sizing**: Widget sizes MUST be defined via the style parameter (raw CSS). Widget properties like image "size" control resolution, not visual appearance - **Global Variables**: Reference by label/name: (e.g. var(--card-background-color) - **Naming Conventions**: Use meaningful, purpose-based names (e.g., "primary-button", "heading-large"), not value-based names (e.g., "blue-style", "20px-padding") ## Example: e-image PropValue Structure \`\`\`json { "$$type": "image", "value": { "src": { "$$type": "image-src", "value": { "url": { "$$type": "url", "value": "https://example.com/image.jpg" } } }, "size": { "$$type": "string", "value": "full" } } } \`\`\` Note: The "size" property controls image resolution/loading, not visual size. Set visual dimensions via the style parameter (raw CSS). `,Li=globalThis.elementorV2.editorElements,Ri=globalThis.elementorV2.editorNotifications,zi=globalThis.elementorV2.editorV1Adapters,Bi=globalThis.wp.i18n;function initLinkInLinkPrevention(){(0,zi.blockCommand)({command:`document/elements/paste`,condition:blockLinkInLinkPaste}),(0,zi.blockCommand)({command:`document/elements/move`,condition:blockLinkInLinkMove})}var Vi={href:`https://go.elementor.com/element-link-inside-link-infotip`,target:`_blank`,color:`inherit`,variant:`text`,sx:{marginInlineStart:`20px`},children:`Learn more`};function blockLinkInLinkPaste(e){let{containers:t=[e.container],storageType:n}=e,r=t;if(n!==`localstorage`)return!1;let i=window?.elementorCommon?.storage?.get();if(!i?.clipboard?.elements)return!1;let a=i.clipboard.elements,o={type:`default`,message:(0,Bi.__)(`To paste a link to this element, first remove the link from it's parent container.`,`elementor`),id:`paste-in-link-blocked`,additionalActionProps:[Vi]},s=shouldBlock(a,r);return s&&(0,Ri.notify)(o),s}function blockLinkInLinkMove(e){let{containers:t=[e.container],target:n}=e,r=t,i=n,a={type:`default`,message:(0,Bi.__)(`To drag a link to this element, first remove the link from it's parent container.`,`elementor`),id:`move-in-link-blocked`,additionalActionProps:[Vi]},o=shouldBlock(r,[i]);return o&&(0,Ri.notify)(a),o}function shouldBlock(e,t){return!e?.length||!t?.length||!e.some(e=>e?.id?(0,Li.isElementAnchored)(e.id)||!!(0,Li.getAnchoredDescendantId)(e.id):!1)?!1:t.some(e=>e?.id?(0,Li.isElementAnchored)(e.id)||!!(0,Li.getAnchoredAncestorId)(e.id):!1)}var Hi=globalThis.elementorV2.editorElements,Ui=globalThis.elementorV2.editorProps,Wi=globalThis.elementorV2.editorV1Adapters,Gi=globalThis.elementorV2.editorElements,Ki=globalThis.elementorV2.editorProps,qi=globalThis.wp.i18n;function hasAtomicWidgets(e){let{containers:t=[e.container]}=e;return t.some(isAtomicWidget)}function isAtomicWidget(e){return e?!!getContainerSchema(e):!1}function getClassesProp(e){let t=getContainerSchema(e);if(!t)return null;let[n]=Object.entries(t).find(([,e])=>e.kind===`plain`&&e.key===Ki.CLASSES_PROP_KEY)??[];return n??null}function getContainerSchema(e){let t=e?.model.get(`widgetType`)||e?.model.get(`elType`);return(0,Gi.getWidgetsCache)()?.[t]?.atomic_props_schema??null}function getClipboardElements(e=`clipboard`){try{return JSON.parse(localStorage.getItem(`elementor`)??`{}`)[e]?.elements}catch{return}}function getTitleForContainers(e){return e.length>1?(0,qi.__)(`Elements`,`elementor`):(0,Gi.getElementLabel)(e[0].id)}var Ji=globalThis.elementorV2.editorElements,Yi=globalThis.elementorV2.editorStylesRepository,Xi=globalThis.elementorV2.editorV1Adapters,Zi=globalThis.wp.i18n,undoablePasteElementStyle=()=>(0,Xi.undoable)({do:({containers:e,newStyle:t})=>e.map(e=>{let n=e.id,r=getClassesProp(e);if(!r)return null;let i=(0,Ji.getElementStyles)(e.id),[a,o]=Object.entries(i??{})[0]??[],s={styleId:a,originalStyle:Object.keys(o??{}).length?o:null};if(a)t.variants.forEach(({meta:e,props:t,custom_css:r})=>{(0,Ji.updateElementStyle)({elementId:n,styleId:a,meta:e,props:t,custom_css:r})});else{let[e]=t.variants,i=t.variants.slice(1);s.styleId=(0,Ji.createElementStyle)({elementId:n,classesProp:r,label:Yi.ELEMENTS_STYLES_RESERVED_LABEL,...e,additionalVariants:i})}return s}),undo:({containers:e},t)=>{e.forEach((e,n)=>{let r=t[n];if(!r)return;if(!r.originalStyle){(0,Ji.deleteElementStyle)(e.id,r.styleId);return}let i=getClassesProp(e);if(!i)return;let[a]=r.originalStyle.variants,o=r.originalStyle.variants.slice(1);(0,Ji.createElementStyle)({elementId:e.id,classesProp:i,label:Yi.ELEMENTS_STYLES_RESERVED_LABEL,styleId:r.styleId,...a,additionalVariants:o})})}},{title:({containers:e})=>getTitleForContainers(e),subtitle:(0,Zi.__)(`Style Pasted`,`elementor`)});function initPasteStyleCommand(){let e=undoablePasteElementStyle();(0,Wi.blockCommand)({command:`document/elements/paste-style`,condition:hasAtomicWidgets}),(0,Wi.__privateListenTo)((0,Wi.commandStartEvent)(`document/elements/paste-style`),t=>pasteStyles(t.args,e))}function pasteStyles(e,t){let{containers:n=[e.container],storageKey:r}=e,i=n.filter(isAtomicWidget);if(!i.length)return;let[a]=getClipboardElements(r)??[],o=(0,Hi.getContainer)(a.id);if(!a||!o||!isAtomicWidget(o))return;let s=a.styles,c=Object.values(s??{})[0],l=getClassesWithoutLocalStyle(o,c);l.length&&pasteClasses(i,l),c&&t({containers:i,newStyle:c})}function getClassesWithoutLocalStyle(e,t){let n=getClassesProp(e);return n?(0,Hi.getElementSetting)(e.id,n)?.value.filter(e=>e!==t?.id)??[]:[]}function pasteClasses(e,t){e.forEach(e=>{let n=getClassesProp(e);if(!n)return;let r=(0,Hi.getElementSetting)(e.id,n),i=Ui.classesPropTypeUtil.extract(r)??[],a=Ui.classesPropTypeUtil.create(Array.from(new Set([...t,...i])));(0,Hi.updateElementSettings)({id:e.id,props:{[n]:a}})})}var Qi=globalThis.elementorV2.editorV1Adapters,$i=globalThis.elementorV2.editorElements,ea=globalThis.elementorV2.editorStylesRepository,ta=globalThis.elementorV2.editorV1Adapters,na=globalThis.wp.i18n,undoableResetElementStyle=()=>(0,ta.undoable)({do:({containers:e})=>e.map(e=>{let t=e.model.get(`id`),n=(0,$i.getElementStyles)(t);return Object.keys(n??{}).forEach(e=>(0,$i.deleteElementStyle)(t,e)),n}),undo:({containers:e},t)=>{e.forEach((e,n)=>{let r=getClassesProp(e);if(!r)return;let i=e.model.get(`id`),a=t[n];Object.entries(a??{}).forEach(([e,t])=>{let[n]=t.variants,a=t.variants.slice(1);(0,$i.createElementStyle)({elementId:i,classesProp:r,styleId:e,label:ea.ELEMENTS_STYLES_RESERVED_LABEL,...n,additionalVariants:a})})})}},{title:({containers:e})=>getTitleForContainers(e),subtitle:(0,na.__)(`Style Reset`,`elementor`)});function initResetStyleCommand(){let e=undoableResetElementStyle();(0,Qi.blockCommand)({command:`document/elements/reset-style`,condition:hasAtomicWidgets}),(0,Qi.__privateListenTo)((0,Qi.commandStartEvent)(`document/elements/reset-style`),t=>resetStyles(t.args,e))}function resetStyles(e,t){let{containers:n=[e.container]}=e,r=n.filter(isAtomicWidget);r.length&&t({containers:r})}function initStyleCommands(){initPasteStyleCommand(),initResetStyleCommand()}function init(){initStyleTransformers(),initStyleCommands(),initLinkInLinkPrevention(),initFormNestingPrevention(),initFormAncestorEnforcement(),initHiddenFieldHint(),initDuplicateFormAtomsPrevention(),initFormAtomAddedHints(),initViewReplacements(),initLegacyViews(),initSettingsTransformers(),(0,x.injectIntoTop)({id:`elements-overlays`,component:ElementsOverlays}),(0,x.injectIntoTop)({id:`canvas-style-render`,component:StyleRenderer}),(0,x.injectIntoTop)({id:`canvas-interactions-render`,component:InteractionsRenderer}),(0,x.injectIntoLogic)({id:`classes-rename`,component:ClassesRename}),initCanvasMcp((0,S.getMCPByDomain)(`canvas`,{instructions:`Everything related to V4 ( Atomic ) canvas. # Canvas workflow - Configure element settings and styles with configure-element - Get page structure and element configuration values `,docs:Ii})),initTabsModelExtensions(),initListType()}var ra=[`elementor-element`],endDragElementFromPanel=()=>{getElementorChannels()?.panelElements?.trigger(`element:drag:end`)},startDragElementFromPanel=(e,t)=>{setDragGroups(t);let n=getElementorChannels();n?.editor.reply(`element:dragged`,null),n?.panelElements.reply(`element:selected`,getLegacyPanelElementView(e)).trigger(`element:drag:start`)},setDragGroups=e=>{let t={groups:getDragGroups(e)};e.dataTransfer?.setData(JSON.stringify(t),`true`)},getDragGroups=e=>{let t=e.dataTransfer?.getData(`text/plain`);return t?JSON.parse(t).groups:ra},getElementorChannels=()=>{let e=window.elementor?.channels;if(!e)throw Error(`Elementor channels not found: Elementor editor is not initialized or channels are unavailable.`);return e},getLegacyPanelElementView=({settings:e,...t})=>{let n=window.elementor?.modules?.elements?.models?.Element;if(!n)throw Error(`Elementor legacy Element model not found in editor modules`);return{model:new n({...t,custom:{isPreset:!!e,preset_settings:e}})}},ia=`elementor/global-styles/imported`,aa=__toESM(globalThis.React);function SpotlightBackdrop({canvas:e,element:t,onExit:n,ariaLabel:r}){let i=useElementRect(t),a={position:`fixed`,top:0,left:0,width:`100vw`,height:`100vh`,backgroundColor:`rgba(0, 0, 0, 0.5)`,zIndex:999,pointerEvents:`painted`,cursor:`pointer`,clipPath:t?getRectClipPath(i,e.defaultView):void 0},handleKeyDown=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())};return aa.createElement(`div`,{style:a,onClick:n,onKeyDown:handleKeyDown,role:`button`,tabIndex:0,"aria-label":r})}function getRectClipPath(e,t){let{x:n,y:r,width:i,height:a}=e,{innerWidth:o,innerHeight:s}=t;return`path(evenodd, 'M 0 0 L ${o} 0 L ${o} ${s} L 0 ${s} Z M ${n} ${r} L ${n+i} ${r} L ${n+i} ${r+a} L ${n} ${r+a} L ${n} ${r} Z')`}var oa=globalThis.elementorV2.editorV1Adapters;function useCanvasDocument(){return(0,oa.__privateUseListenTo)((0,oa.commandEndEvent)(`editor/documents/attach-preview`),()=>(0,oa.getCanvasIframeDocument)())}var sa=globalThis.React;function useEscapeOnCanvas(e,t){(0,sa.useEffect)(()=>{if(!e)return;let handleEsc=e=>{e.key===`Escape`&&t()};return e.body.addEventListener(`keydown`,handleEsc),()=>{e.body.removeEventListener(`keydown`,handleEsc)}},[e,t])}var ca=globalThis.elementorV2.editorElements;function doAfterRender(e,t){let n=e.map(e=>{let t=(0,ca.getContainer)(e)?.view;if(!(!t||!hasDoAfterRender(t)))return new Promise(e=>t._doAfterRender(e))}).filter(Boolean);n.length>0?Promise.all(n).then(()=>t(e)):t(e)}function hasDoAfterRender(e){return typeof e?._doAfterRender==`function`}var la=`elementor/canvas/element-added`;0&&(t.exports={BREAKPOINTS_SCHEMA_FULL_URI:_,BREAKPOINTS_SCHEMA_URI:g,DOCUMENT_STRUCTURE_URI:Gr,ELEMENT_ADDED_EVENT:la,GLOBAL_STYLES_IMPORTED_EVENT:ia,SpotlightBackdrop,UnknownStyleStateError:X,UnknownStyleTypeError:nt,WIDGET_SCHEMA_FULL_URI:m,WIDGET_SCHEMA_URI:p,canBeNestedTemplated,convertCssToAtomic,convertStyleBlocksToAtomic,createNestedTemplatedElementType,createNestedTemplatedElementView,createPropsResolver,createTemplatedElementView,createTransformer,createTransformersRegistry,doAfterRender,endDragElementFromPanel,formatGridTrackRepeat,init,isAtomicWidget,isGridTrackProperty,registerElementType,registerModelExtensions,settingsTransformersRegistry:It,startDragElementFromPanel,styleTransformersRegistry:Ze,stylesInheritanceTransformersRegistry:Xe,useCanvasDocument,useEscapeOnCanvas,waitForChildrenToComplete})}))());(window.elementorV2=window.elementorV2||{}).editorCanvas=Ut})(React,ReactDOM),window.elementorV2.editorCanvas?.init?.();
Save File
Cancel