@openpawlabs/diy-guides-ui 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/bin/diy-guide-images.mjs +317 -0
- package/dist/components/GuideLayout/GuideLayout.d.ts.map +1 -1
- package/dist/components/GuideLayout/GuideLayout.stories.d.ts.map +1 -1
- package/dist/components/GuideResponsiveImage/GuideResponsiveImage.d.ts +23 -0
- package/dist/components/GuideResponsiveImage/GuideResponsiveImage.d.ts.map +1 -0
- package/dist/components/MediaFigure/MediaCropEditor.d.ts +9 -7
- package/dist/components/MediaFigure/MediaCropEditor.d.ts.map +1 -1
- package/dist/components/MediaFigure/MediaFigure.d.ts +6 -4
- package/dist/components/MediaFigure/MediaFigure.d.ts.map +1 -1
- package/dist/components/MediaFigure/MediaFigure.stories.d.ts.map +1 -1
- package/dist/components/MediaFigure/MediaFigureClipFrame.d.ts +13 -1
- package/dist/components/MediaFigure/MediaFigureClipFrame.d.ts.map +1 -1
- package/dist/components/MediaFigure/MediaFigureThumbnail.d.ts +2 -2
- package/dist/components/MediaFigure/MediaFigureThumbnail.d.ts.map +1 -1
- package/dist/components/ToolList/ToolList.d.ts.map +1 -1
- package/dist/context/guideImageVariants.d.ts +16 -0
- package/dist/context/guideImageVariants.d.ts.map +1 -0
- package/dist/diy-guides-ui.cjs +6 -6
- package/dist/diy-guides-ui.cjs.map +1 -1
- package/dist/diy-guides-ui.js +3106 -2905
- package/dist/diy-guides-ui.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/utils/guideImageSources.d.ts +73 -0
- package/dist/utils/guideImageSources.d.ts.map +1 -0
- package/dist/utils/guideImageSources.test.d.ts +2 -0
- package/dist/utils/guideImageSources.test.d.ts.map +1 -0
- package/dist/utils/mediaCrop.d.ts +40 -13
- package/dist/utils/mediaCrop.d.ts.map +1 -1
- package/package.json +17 -3
package/dist/diy-guides-ui.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";var uu=Object.create;var Xo=Object.defineProperty;var du=Object.getOwnPropertyDescriptor;var fu=Object.getOwnPropertyNames;var pu=Object.getPrototypeOf,hu=Object.prototype.hasOwnProperty;var Zo=t=>{throw TypeError(t)};var bu=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of fu(e))!hu.call(t,o)&&o!==n&&Xo(t,o,{get:()=>e[o],enumerable:!(r=du(e,o))||r.enumerable});return t};var mu=(t,e,n)=>(n=t!=null?uu(pu(t)):{},bu(e||!t||!t.__esModule?Xo(n,"default",{value:t,enumerable:!0}):n,t));var Jo=(t,e,n)=>e.has(t)||Zo("Cannot "+n);var Qo=(t,e,n)=>(Jo(t,e,"read from private field"),n?n.call(t):e.get(t)),ei=(t,e,n)=>e.has(t)?Zo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),dr=(t,e,n,r)=>(Jo(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),p=require("react/jsx-runtime"),Xt=require("react-dom"),je={GREY:"#7A8090",RED:"#E7320D",ORANGE:"#FF850A",YELLOW:"#F5E429",GREEN:"#14CC76",LIGHT_BLUE:"#20B3E9",BLUE:"#1738DE",MAGENTA:"#D945B1"};function ot(t,e){const n=t.replace("#",""),r=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),i=parseInt(n.slice(4,6),16);return`rgba(${r}, ${o}, ${i}, ${e})`}function Un(t){const e=t.replace("#",""),n=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16);return(.299*n+.587*r+.114*o)/255>.55?"#111111":"#ffffff"}const Rl={note:"GREY",info:"LIGHT_BLUE",tip:"GREEN",caution:"ORANGE",danger:"RED"};function Nl(t){return je[Rl[t]]}const Pn={note:"Note",info:"Info",tip:"Tip",caution:"Caution",danger:"Danger"},gu="react-aria-clear-focus",yu="react-aria-focus";function Wn(t){var n;if(typeof window>"u"||window.navigator==null)return!1;let e=(n=window.navigator.userAgentData)==null?void 0:n.brands;return Array.isArray(e)&&e.some(r=>t.test(r.brand))||t.test(window.navigator.userAgent)}function fo(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)==null?void 0:e.platform)||window.navigator.platform):!1}function Ve(t){if(process.env.NODE_ENV==="test")return t;let e=null;return()=>(e==null&&(e=t()),e)}const it=Ve(function(){return fo(/^Mac/i)}),vu=Ve(function(){return fo(/^iPhone/i)}),Ll=Ve(function(){return fo(/^iPad/i)||it()&&navigator.maxTouchPoints>1}),lt=Ve(function(){return vu()||Ll()}),xu=Ve(function(){return it()||lt()}),Il=Ve(function(){return Wn(/AppleWebKit/i)&&!Kl()}),Kl=Ve(function(){return Wn(/Chrome/i)}),po=Ve(function(){return Wn(/Android/i)}),$u=Ve(function(){return Wn(/Firefox/i)});function de(t){if(wu())t.focus({preventScroll:!0});else{let e=Eu(t);t.focus(),Cu(e)}}let ln=null;function wu(){if(ln==null){ln=!1;try{document.createElement("div").focus({get preventScroll(){return ln=!0,!0}})}catch{}}return ln}function Eu(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Cu(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}const Su=s.createContext({isNative:!0,open:Tu,useHref:t=>t});function Zt(){return s.useContext(Su)}function Pu(t,e){let n=t.getAttribute("target");return(!n||n==="_self")&&t.origin===location.origin&&!t.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function _e(t,e,n=!0){var c,u;let{metaKey:r,ctrlKey:o,altKey:i,shiftKey:l}=e;$u()&&((u=(c=window.event)==null?void 0:c.type)!=null&&u.startsWith("key"))&&t.target==="_blank"&&(it()?r=!0:o=!0);let a=Il()&&it()&&!Ll()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:o,altKey:i,shiftKey:l}):new MouseEvent("click",{metaKey:r,ctrlKey:o,altKey:i,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});_e.isOpening=n,de(t),t.dispatchEvent(a),_e.isOpening=!1}_e.isOpening=!1;function ku(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function Tu(t,e){ku(t,n=>_e(n,e))}function Ol(t){const n=Zt().useHref((t==null?void 0:t.href)??"");let r={};if(t)for(let o of["href","target","rel","download","ping","referrerPolicy"])o in t&&(r[o]=o==="href"?n:t[o]);return r}function Al(t,e,n,r){!e.isNative&&t.currentTarget instanceof HTMLAnchorElement&&t.currentTarget.href&&!t.isDefaultPrevented()&&Pu(t.currentTarget,t)&&n&&(t.preventDefault(),e.open(t.currentTarget,t,n,r))}const J=typeof document<"u"?s.useLayoutEffect:()=>{},kn={prefix:String(Math.round(Math.random()*1e10)),current:0},Fl=s.createContext(kn),Mu=s.createContext(!1);let Du=!!(typeof window<"u"&&window.document&&window.document.createElement),fr=new WeakMap;function Ru(t=!1){var r,o;let e=s.useContext(Fl),n=s.useRef(null);if(n.current===null&&!t){let i=(o=(r=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)==null?void 0:r.ReactCurrentOwner)==null?void 0:o.current;if(i){let l=fr.get(i);l==null?fr.set(i,{id:e.current,state:i.memoizedState}):i.memoizedState!==l.state&&(e.current=l.id,fr.delete(i))}n.current=++e.current}return n.current}function Nu(t){let e=s.useContext(Fl);e===kn&&!Du&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Ru(!!t),r=e===kn&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function Lu(t){let e=s.useId(),[n]=s.useState(Ze()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${kn.prefix}`;return t||`${r}-${e}`}const Iu=typeof s.useId=="function"?Lu:Nu;function Ku(){return!1}function Ou(){return!0}function Au(t){return()=>{}}function Ze(){return typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore(Au,Ku,Ou):s.useContext(Mu)}function Fu(t){let[e,n]=s.useState(t),r=s.useRef(e),o=s.useRef(null),i=s.useRef(()=>{if(!o.current)return;let a=o.current.next();if(a.done){o.current=null;return}r.current===a.value?i.current():n(a.value)});J(()=>{r.current=e,o.current&&i.current()});let l=s.useCallback(a=>{o.current=a(r.current),i.current()},[i]);return[e,l]}let ju=!!(typeof window<"u"&&window.document&&window.document.createElement),yt=new Map,Nt;typeof FinalizationRegistry<"u"&&(Nt=new FinalizationRegistry(t=>{yt.delete(t)}));function pe(t){let[e,n]=s.useState(t),r=s.useRef(null),o=Iu(e),i=s.useRef(null);if(Nt&&Nt.register(i,o),ju){const l=yt.get(o);l&&!l.includes(r)?l.push(r):yt.set(o,[r])}return J(()=>{let l=o;return()=>{Nt&&Nt.unregister(i),yt.delete(l)}},[o]),s.useEffect(()=>{let l=r.current;return l&&n(l),()=>{l&&(r.current=null)}}),o}function _u(t,e){if(t===e)return t;let n=yt.get(t);if(n)return n.forEach(o=>o.current=e),e;let r=yt.get(e);return r?(r.forEach(o=>o.current=t),t):e}function xn(t=[]){let e=pe(),[n,r]=Fu(e),o=s.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return J(o,[e,o,...t]),n}function Jt(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Q=t=>(t==null?void 0:t.ownerDocument)??document,fe=t=>t&&"window"in t&&t.window===t?t:Q(t).defaultView||window;function Bu(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function Vu(t){return Bu(t)&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}let zu=!1;function Oe(){return zu}function H(t,e){if(!Oe())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let n=e;for(;n!==null;){if(n===t)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Vu(n)?n=n.host:n=n.parentNode}return!1}const ne=(t=document)=>{var n;if(!Oe())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&((n=e.shadowRoot)!=null&&n.activeElement);)e=e.shadowRoot.activeElement;return e};function F(t){if(Oe()&&t.target instanceof Element&&t.target.shadowRoot){if("composedPath"in t)return t.composedPath()[0]??null;if("composedPath"in t.nativeEvent)return t.nativeEvent.composedPath()[0]??null}return t.target}function $t(t){if(!t)return!1;let e=t.getRootNode(),n=fe(t);if(!(e instanceof n.Document||e instanceof n.ShadowRoot))return!1;let r=e.activeElement;return r!=null&&t.contains(r)}class Hu{constructor(e,n,r,o){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=l=>{var a;if(l.nodeType===Node.ELEMENT_NODE){const c=l.shadowRoot;if(c){const u=this._doc.createTreeWalker(c,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(u),NodeFilter.FILTER_ACCEPT}else{if(typeof this.filter=="function")return this.filter(l);if((a=this.filter)!=null&&a.acceptNode)return this.filter.acceptNode(l);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=n,this.filter=o??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(e.createTreeWalker(n,r,this._acceptNode));const i=n.shadowRoot;if(i){const l=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(l)}}get currentNode(){return this._currentNode}set currentNode(e){if(!H(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=e,o=e;for(this._currentNode=e;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const l=r,a=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});n.push(a),a.currentNode=o,this._currentSetFor.add(a),r=o=l.host}else r=r.parentNode;const i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(i),i.currentNode=o,this._currentSetFor.add(i),this._walkerStack=n}get doc(){return this._doc}firstChild(){let e=this.currentNode,n=this.nextNode();return H(e,n)?(n&&(this.currentNode=n),n):(this.currentNode=e,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){var n;const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let o;if(typeof this.filter=="function"?o=this.filter(e):(n=this.filter)!=null&&n.acceptNode&&(o=this.filter.acceptNode(e)),o===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let i=this.nextNode();return i&&(this.currentNode=i),i}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){var r;const e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let o=this.previousNode();return o&&(this.currentNode=o),o}else return null;return null}const n=e.previousNode();if(n){if(n.shadowRoot){let i;if(typeof this.filter=="function"?i=this.filter(n):(r=this.filter)!=null&&r.acceptNode&&(i=this.filter.acceptNode(n)),i===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let l=this.lastChild();return l&&(this.currentNode=l),l}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let o=this.previousNode();return o&&(this.currentNode=o),o}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function jl(t,e,n,r){return Oe()?new Hu(t,e,n,r):t.createTreeWalker(e,n,r)}function ut(...t){return t.length===1&&t[0]?t[0]:e=>{let n=!1;const r=t.map(o=>{const i=ti(o,e);return n||(n=typeof i=="function"),i});if(n)return()=>{r.forEach((o,i)=>{typeof o=="function"?o():ti(t[i],null)})}}}function ti(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function _l(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=_l(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Gu(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=_l(t))&&(r&&(r+=" "),r+=e);return r}function Y(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let o in r){let i=e[o],l=r[o];typeof i=="function"&&typeof l=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?e[o]=Jt(i,l):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof l=="string"?e[o]=Gu(i,l):o==="id"&&i&&l?e.id=_u(i,l):o==="ref"&&i&&l?e.ref=ut(i,l):e[o]=l!==void 0?l:i}}return e}const Uu=new Set(["id"]),Wu=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),qu=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Yu=new Set(["dir","lang","hidden","inert","translate"]),ni=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),Xu=/^(data-.*)$/;function ae(t,e={}){let{labelable:n,isLink:r,global:o,events:i=o,propNames:l}=e,a={};for(const c in t)Object.prototype.hasOwnProperty.call(t,c)&&(Uu.has(c)||n&&Wu.has(c)||r&&qu.has(c)||o&&Yu.has(c)||i&&(ni.has(c)||c.endsWith("Capture")&&ni.has(c.slice(0,-7)))||l!=null&&l.has(c)||Xu.test(c))&&(a[c]=t[c]);return a}let Ue=new Map,Nr=new Set;function ri(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{let o=F(r);if(!t(r)||!o)return;let i=Ue.get(o);i||(i=new Set,Ue.set(o,i),o.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{let o=F(r);if(!t(r)||!o)return;let i=Ue.get(o);if(i&&(i.delete(r.propertyName),i.size===0&&(o.removeEventListener("transitioncancel",n),Ue.delete(o)),Ue.size===0)){for(let l of Nr)l();Nr.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?ri():document.addEventListener("DOMContentLoaded",ri));function Zu(){for(const[t]of Ue)"isConnected"in t&&!t.isConnected&&Ue.delete(t)}function Bl(t){requestAnimationFrame(()=>{Zu(),Ue.size===0?t():Nr.add(t)})}function qn(){let t=s.useRef(new Map),e=s.useCallback((o,i,l,a)=>{let c=a!=null&&a.once?(...u)=>{t.current.delete(l),l(...u)}:l;t.current.set(l,{type:i,eventTarget:o,fn:c,options:a}),o.addEventListener(i,c,a)},[]),n=s.useCallback((o,i,l,a)=>{var u;let c=((u=t.current.get(l))==null?void 0:u.fn)||l;o.removeEventListener(i,c,a),t.current.delete(l)},[]),r=s.useCallback(()=>{t.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return s.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function Vl(t,e){let{id:n,"aria-label":r,"aria-labelledby":o}=t;return n=pe(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!r&&!o&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":o}}function Je(t){const e=s.useRef(null),n=s.useRef(void 0),r=s.useCallback(o=>{if(typeof t=="function"){const i=t,l=i(o);return()=>{typeof l=="function"?l():i(null)}}else if(t)return t.current=o,()=>{t.current=null}},[t]);return s.useMemo(()=>({get current(){return e.current},set current(o){e.current=o,n.current&&(n.current(),n.current=void 0),o!=null&&(n.current=r(o))}}),[r])}const Ju=s.useInsertionEffect??J;function Pe(t){const e=s.useRef(null);return Ju(()=>{e.current=t},[t]),s.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function oi(t,e){const n=s.useRef(!0),r=s.useRef(null);J(()=>(n.current=!0,()=>{n.current=!1}),[]),J(()=>{n.current?n.current=!1:(!r.current||e.some((o,i)=>!Object.is(o,r[i])))&&t(),r.current=e},e)}function Qu(){return typeof window.ResizeObserver<"u"}function Tn(t){const{ref:e,box:n,onResize:r}=t;let o=Pe(r);s.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(Qu()){const l=new window.ResizeObserver(a=>{a.length&&o()});return l.observe(i,{box:n}),()=>{i&&l.unobserve(i)}}else return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)}},[e,n])}function ho(t,e){J(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function st(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return t===r&&n.overflow!=="hidden"&&(o=!0),o&&e&&(o=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),o}function zl(t,e){let n=t;for(st(n,e)&&(n=n.parentElement);n&&!st(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function pr(t,e){let n=[],r=document.scrollingElement||document.documentElement;for(;t&&(st(t,e)&&n.push(t),t!==r);)t=t.parentElement;return n}function bt(t){return it()?t.metaKey:t.ctrlKey}const ed=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function jt(t){return t instanceof HTMLInputElement&&!ed.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}let ve=typeof document<"u"&&window.visualViewport;function td(){let t=Ze(),[e,n]=s.useState(()=>t?{width:0,height:0}:hr());return s.useEffect(()=>{let r=a=>{n(c=>a.width===c.width&&a.height===c.height?c:a)},o=()=>{ve&&ve.scale>1||r(hr())},i,l=a=>{ve&&ve.scale>1||jt(F(a))&&(i=requestAnimationFrame(()=>{let c=ne();(!c||!jt(c))&&r({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})}))};return r(hr()),lt()&&window.addEventListener("blur",l,!0),ve?ve.addEventListener("resize",o):window.addEventListener("resize",o),()=>{cancelAnimationFrame(i),lt()&&window.removeEventListener("blur",l,!0),ve?ve.removeEventListener("resize",o):window.removeEventListener("resize",o)}},[]),e}function hr(){return{width:ve?Math.min(ve.width*ve.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:ve?ve.height*ve.scale:document.documentElement.clientHeight}}let nd=0;const br=new Map;function rd(t){let[e,n]=s.useState();return J(()=>{if(!t)return;let r=br.get(t);if(r)n(r.element.id);else{let o=`react-aria-description-${nd++}`;n(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=t,document.body.appendChild(i),r={refCount:0,element:i},br.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),br.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function Lt(t,e,n,r){let o=Pe(n),i=n==null;s.useEffect(()=>{if(i||!t.current)return;let l=t.current;return l.addEventListener(e,o,r),()=>{l.removeEventListener(e,o,r)}},[t,e,r,i])}function $n(t,e,n={}){let{block:r="nearest",inline:o="nearest"}=n;if(t===e)return;let i=t.scrollTop,l=t.scrollLeft,a=e.getBoundingClientRect(),c=t.getBoundingClientRect(),u=window.getComputedStyle(e),d=window.getComputedStyle(t),f=document.scrollingElement||document.documentElement,b=t===f,h=t===f?0:c.top,g=t===f?t.clientHeight:c.bottom,y=t===f?0:c.left,v=t===f?t.clientWidth:c.right,w=parseFloat(u.scrollMarginTop)||0,x=parseFloat(u.scrollMarginBottom)||0,M=parseFloat(u.scrollMarginLeft)||0,D=parseFloat(u.scrollMarginRight)||0,L=parseFloat(d.scrollPaddingTop)||0,_=parseFloat(d.scrollPaddingBottom)||0,E=parseFloat(d.scrollPaddingLeft)||0,P=parseFloat(d.scrollPaddingRight)||0,N=parseFloat(d.borderTopWidth)||0,C=parseFloat(d.borderBottomWidth)||0,K=parseFloat(d.borderLeftWidth)||0,j=parseFloat(d.borderRightWidth)||0,A=a.top-w,m=a.bottom+x,S=a.left-M,I=a.right+D,k=t===f?0:K+j,R=t===f?0:N+C,$=t===f?0:t.offsetWidth-t.clientWidth-k,T=t===f?0:t.offsetHeight-t.clientHeight-R,O=h+(b?0:N)+L,G=g-(b?0:C)-_-T,W=y+(b?0:K)+E,q=v-(b?0:j)-P;d.direction==="rtl"&&!lt()?W+=$:q-=$;let ee=A<O||m>G,le=S<W||I>q;if(ee&&r==="start")i+=A-O;else if(ee&&r==="center")i+=(A+m)/2-(O+G)/2;else if(ee&&r==="end")i+=m-G;else if(ee&&r==="nearest"){let Z=A-O,be=m-G;i+=Math.abs(Z)<=Math.abs(be)?Z:be}if(le&&o==="start")l+=S-W;else if(le&&o==="center")l+=(S+I)/2-(W+q)/2;else if(le&&o==="end")l+=I-q;else if(le&&o==="nearest"){let Z=S-W,be=I-q;l+=Math.abs(Z)<=Math.abs(be)?Z:be}if(process.env.NODE_ENV==="test"){t.scrollLeft=l,t.scrollTop=i;return}t.scrollTo({left:l,top:i})}function ii(t,e={}){var r,o,i;let{containingElement:n}=e;if(t&&t.isConnected){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let{left:c,top:u}=t.getBoundingClientRect(),d=pr(t,!0);for(let h of d)$n(h,t);let{left:f,top:b}=t.getBoundingClientRect();if(Math.abs(c-f)>1||Math.abs(u-b)>1){d=n?pr(n,!0):[];for(let h of d)$n(h,n,{block:"center",inline:"center"});for(let h of pr(t,!0))$n(h,t)}}else{let{left:c,top:u}=t.getBoundingClientRect();(r=t==null?void 0:t.scrollIntoView)==null||r.call(t,{block:"nearest"});let{left:d,top:f}=t.getBoundingClientRect();(Math.abs(c-d)>1||Math.abs(u-f)>1)&&((o=n==null?void 0:n.scrollIntoView)==null||o.call(n,{block:"center",inline:"center"}),(i=t.scrollIntoView)==null||i.call(t,{block:"nearest"}))}}}function Lr(t){return t.pointerType===""&&t.isTrusted?!0:po()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function od(t){return!po()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function id(t,e,n){let r=Pe(o=>{n&&!o.defaultPrevented&&n(e)});s.useEffect(()=>{var i;let o=(i=t==null?void 0:t.current)==null?void 0:i.form;return o==null||o.addEventListener("reset",r),()=>{o==null||o.removeEventListener("reset",r)}},[t])}function bo(t,e=!0){let[n,r]=s.useState(!0),o=n&&e;return J(()=>{if(o&&t.current&&"getAnimations"in t.current)for(let i of t.current.getAnimations())i instanceof CSSTransition&&i.cancel()},[t,o]),Hl(t,o,s.useCallback(()=>r(!1),[])),o}function Ir(t,e){let[n,r]=s.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let o=n==="exiting";return Hl(t,o,s.useCallback(()=>{r(i=>i==="exiting"?"closed":i)},[])),o}function Hl(t,e,n){J(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let o=!1;return Promise.allSettled(r.map(i=>i.finished)).then(()=>{o||Xt.flushSync(()=>{n()})}),()=>{o=!0}}},[t,e,n])}const ld=typeof Element<"u"&&"checkVisibility"in Element.prototype;function sd(t){const e=fe(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,o=n!=="none"&&r!=="hidden"&&r!=="collapse";if(o){const{getComputedStyle:i}=t.ownerDocument.defaultView;let{display:l,visibility:a}=i(t);o=l!=="none"&&a!=="hidden"&&a!=="collapse"}return o}function ad(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function mo(t,e){return ld?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):t.nodeName!=="#comment"&&sd(t)&&ad(t,e)&&(!t.parentElement||mo(t.parentElement,t))}const go=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],cd=go.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";go.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const ud=go.join(':not([hidden]):not([tabindex="-1"]),');function yo(t,e){return t.matches(cd)&&!Ul(t)&&((e==null?void 0:e.skipVisibilityCheck)||mo(t))}function Gl(t){return t.matches(ud)&&mo(t)&&!Ul(t)}function Ul(t){let e=t;for(;e!=null;){if(e instanceof e.ownerDocument.defaultView.HTMLElement&&e.inert)return!0;e=e.parentElement}return!1}function li(t){let e=t==null?void 0:t.defaultView;return(e==null?void 0:e.__webpack_nonce__)||globalThis.__webpack_nonce__||void 0}let mr=new WeakMap;function Wl(t){let e=t??(typeof document<"u"?document:void 0);if(!e)return li(e);if(mr.has(e))return mr.get(e);let n=e.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof fe(n).HTMLMetaElement&&(n.nonce||n.content)||li(e)||void 0;return r!==void 0&&mr.set(e,r),r}function dd(t,e,n){const{render:r,...o}=e,i=s.useRef(null),l=s.useMemo(()=>ut(n,i),[n,i]);J(()=>{var c;typeof process<"u"&&((c=process.env)==null?void 0:c.NODE_ENV)!=="production"&&r&&(i.current||console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?"))},[t,r]);const a={...o,ref:l};return r?r(a,void 0):p.jsx(t,{...a})}const si={},oe=new Proxy({},{get(t,e){if(typeof e!="string")return;let n=si[e];return n||(n=s.forwardRef(dd.bind(null,e)),si[e]=n),n}});var fd=/\s+/g,pd=t=>typeof t!="string"||!t?t:t.replace(fd," ").trim(),Vt=(...t)=>{const e=[],n=r=>{if(!r&&r!==0&&r!==0n)return;if(Array.isArray(r)){for(let i=0,l=r.length;i<l;i++)n(r[i]);return}const o=typeof r;if(o==="string"||o==="number"||o==="bigint"){if(o==="number"&&r!==r)return;e.push(String(r))}else if(o==="object"){const i=Object.keys(r);for(let l=0,a=i.length;l<a;l++){const c=i[l];r[c]&&e.push(c)}}};for(let r=0,o=t.length;r<o;r++){const i=t[r];i!=null&&n(i)}return e.length>0?pd(e.join(" ")):void 0},ai=t=>t===!1?"false":t===!0?"true":t===0?"0":t,ge=t=>{if(!t||typeof t!="object")return!0;for(const e in t)return!1;return!0},hd=(t,e)=>{if(t===e)return!0;if(!t||!e)return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){const i=n[o];if(!r.includes(i)||t[i]!==e[i])return!1}return!0},bd=(t,e)=>{for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const r=e[n];n in t?t[n]=Vt(t[n],r):t[n]=r}return t},ql=(t,e)=>{for(let n=0;n<t.length;n++){const r=t[n];Array.isArray(r)?ql(r,e):r&&e.push(r)}},Yl=(...t)=>{const e=[];ql(t,e);const n=[];for(let r=0;r<e.length;r++)e[r]&&n.push(e[r]);return n},Kr=(t,e)=>{const n={};for(const r in t){const o=t[r];if(r in e){const i=e[r];Array.isArray(o)||Array.isArray(i)?n[r]=Yl(i,o):typeof o=="object"&&typeof i=="object"&&o&&i?n[r]=Kr(o,i):n[r]=i+" "+o}else n[r]=o}for(const r in e)r in t||(n[r]=e[r]);return n},md={twMerge:!0,twMergeConfig:{}};function gd(){let t=null,e={},n=!1;return{get cachedTwMerge(){return t},set cachedTwMerge(r){t=r},get cachedTwMergeConfig(){return e},set cachedTwMergeConfig(r){e=r},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(r){n=r},reset(){t=null,e={},n=!1}}}var Ke=gd(),yd=t=>{const e=(r,o)=>{const{extend:i=null,slots:l={},variants:a={},compoundVariants:c=[],compoundSlots:u=[],defaultVariants:d={}}=r,f={...md,...o},b=i!=null&&i.base?Vt(i.base,r==null?void 0:r.base):r==null?void 0:r.base,h=i!=null&&i.variants&&!ge(i.variants)?Kr(a,i.variants):a,g=i!=null&&i.defaultVariants&&!ge(i.defaultVariants)?{...i.defaultVariants,...d}:d;!ge(f.twMergeConfig)&&!hd(f.twMergeConfig,Ke.cachedTwMergeConfig)&&(Ke.didTwMergeConfigChange=!0,Ke.cachedTwMergeConfig=f.twMergeConfig);const y=ge(i==null?void 0:i.slots),v=ge(l)?{}:{base:Vt(r==null?void 0:r.base,y&&(i==null?void 0:i.base)),...l},w=y?v:bd({...i==null?void 0:i.slots},ge(v)?{base:r==null?void 0:r.base}:v),x=ge(i==null?void 0:i.compoundVariants)?c:Yl(i==null?void 0:i.compoundVariants,c),M=L=>{if(ge(h)&&ge(l)&&y)return t(b,L==null?void 0:L.class,L==null?void 0:L.className)(f);if(x&&!Array.isArray(x))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof x}`);if(u&&!Array.isArray(u))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof u}`);const _=(m,S=h,I=null,k=null)=>{const R=S[m];if(!R||ge(R))return null;const $=(k==null?void 0:k[m])??(L==null?void 0:L[m]);if($===null)return null;const T=ai($);if(typeof T=="object")return null;const O=g==null?void 0:g[m],G=T??ai(O);return R[G||"false"]},E=()=>{if(!h)return null;const m=Object.keys(h),S=[];for(let I=0;I<m.length;I++){const k=_(m[I],h);k&&S.push(k)}return S},P=(m,S)=>{if(!h||typeof h!="object")return null;const I=[];for(const k in h){const R=_(k,h,m,S),$=m==="base"&&typeof R=="string"?R:R&&R[m];$&&I.push($)}return I},N={};for(const m in L){const S=L[m];S!==void 0&&(N[m]=S)}const C=(m,S)=>{var k;const I=typeof(L==null?void 0:L[m])=="object"?{[m]:(k=L[m])==null?void 0:k.initial}:{};return{...g,...N,...I,...S}},K=(m=[],S)=>{const I=[],k=m.length;for(let R=0;R<k;R++){const{class:$,className:T,...O}=m[R];let G=!0;const W=C(null,S);for(const q in O){const ee=O[q],le=W[q];if(Array.isArray(ee)){if(!ee.includes(le)){G=!1;break}}else{if((ee==null||ee===!1)&&(le==null||le===!1))continue;if(le!==ee){G=!1;break}}}G&&($&&I.push($),T&&I.push(T))}return I},j=m=>{const S=K(x,m);if(!Array.isArray(S))return S;const I={},k=t;for(let R=0;R<S.length;R++){const $=S[R];if(typeof $=="string")I.base=k(I.base,$)(f);else if(typeof $=="object")for(const T in $)I[T]=k(I[T],$[T])(f)}return I},A=m=>{if(u.length<1)return null;const S={},I=C(null,m);for(let k=0;k<u.length;k++){const{slots:R=[],class:$,className:T,...O}=u[k];if(!ge(O)){let G=!0;for(const W in O){const q=I[W],ee=O[W];if(q===void 0||(Array.isArray(ee)?!ee.includes(q):ee!==q)){G=!1;break}}if(!G)continue}for(let G=0;G<R.length;G++){const W=R[G];S[W]||(S[W]=[]),S[W].push([$,T])}}return S};if(!ge(l)||!y){const m={};if(typeof w=="object"&&!ge(w)){const S=t;for(const I in w)m[I]=k=>{const R=j(k),$=A(k);return S(w[I],P(I,k),R?R[I]:void 0,$?$[I]:void 0,k==null?void 0:k.class,k==null?void 0:k.className)(f)}}return m}return t(b,E(),K(x),L==null?void 0:L.class,L==null?void 0:L.className)(f)},D=()=>{if(!(!h||typeof h!="object"))return Object.keys(h)};return M.variantKeys=D(),M.extend=i,M.base=b,M.slots=w,M.variants=h,M.defaultVariants=g,M.compoundSlots=u,M.compoundVariants=x,M};return{tv:e,createTV:r=>(o,i)=>e(o,i?Kr(r,i):r)}};const vd=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},xd=(t,e)=>({classGroupId:t,validator:e}),Xl=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Mn="-",ci=[],$d="arbitrary..",wd=t=>{const e=Cd(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Ed(l);const a=l.split(Mn),c=a[0]===""&&a.length>1?1:0;return Zl(a,c,e)},getConflictingClassGroupIds:(l,a)=>{if(a){const c=r[l],u=n[l];return c?u?vd(u,c):c:u||ci}return n[l]||ci}}},Zl=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],i=n.nextPart.get(o);if(i){const u=Zl(t,e+1,i);if(u)return u}const l=n.validators;if(l===null)return;const a=e===0?t.join(Mn):t.slice(e).join(Mn),c=l.length;for(let u=0;u<c;u++){const d=l[u];if(d.validator(a))return d.classGroupId}},Ed=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?$d+r:void 0})(),Cd=t=>{const{theme:e,classGroups:n}=t;return Sd(n,e)},Sd=(t,e)=>{const n=Xl();for(const r in t){const o=t[r];vo(o,n,r,e)}return n},vo=(t,e,n,r)=>{const o=t.length;for(let i=0;i<o;i++){const l=t[i];Pd(l,e,n,r)}},Pd=(t,e,n,r)=>{if(typeof t=="string"){kd(t,e,n);return}if(typeof t=="function"){Td(t,e,n,r);return}Md(t,e,n,r)},kd=(t,e,n)=>{const r=t===""?e:Jl(e,t);r.classGroupId=n},Td=(t,e,n,r)=>{if(Dd(t)){vo(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(xd(n,t))},Md=(t,e,n,r)=>{const o=Object.entries(t),i=o.length;for(let l=0;l<i;l++){const[a,c]=o[l];vo(c,Jl(e,a),n,r)}},Jl=(t,e)=>{let n=t;const r=e.split(Mn),o=r.length;for(let i=0;i<o;i++){const l=r[i];let a=n.nextPart.get(l);a||(a=Xl(),n.nextPart.set(l,a)),n=a}return n},Dd=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Rd=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const o=(i,l)=>{n[i]=l,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return o(i,l),l},set(i,l){i in n?n[i]=l:o(i,l)}}},Or="!",ui=":",Nd=[],di=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Ld=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=o=>{const i=[];let l=0,a=0,c=0,u;const d=o.length;for(let y=0;y<d;y++){const v=o[y];if(l===0&&a===0){if(v===ui){i.push(o.slice(c,y)),c=y+1;continue}if(v==="/"){u=y;continue}}v==="["?l++:v==="]"?l--:v==="("?a++:v===")"&&a--}const f=i.length===0?o:o.slice(c);let b=f,h=!1;f.endsWith(Or)?(b=f.slice(0,-1),h=!0):f.startsWith(Or)&&(b=f.slice(1),h=!0);const g=u&&u>c?u-c:void 0;return di(i,h,b,g)};if(e){const o=e+ui,i=r;r=l=>l.startsWith(o)?i(l.slice(o.length)):di(Nd,!1,l,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Id=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const l=n[i],a=l[0]==="[",c=e.has(l);a||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},Kd=t=>({cache:Rd(t.cacheSize),parseClassName:Ld(t),sortModifiers:Id(t),...wd(t)}),Od=/\s+/,Ad=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=e,l=[],a=t.trim().split(Od);let c="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:f,modifiers:b,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:y}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let v=!!y,w=r(v?g.substring(0,y):g);if(!w){if(!v){c=d+(c.length>0?" "+c:c);continue}if(w=r(g),!w){c=d+(c.length>0?" "+c:c);continue}v=!1}const x=b.length===0?"":b.length===1?b[0]:i(b).join(":"),M=h?x+Or:x,D=M+w;if(l.indexOf(D)>-1)continue;l.push(D);const L=o(w,v);for(let _=0;_<L.length;++_){const E=L[_];l.push(M+E)}c=d+(c.length>0?" "+c:c)}return c},Fd=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=Ql(n))&&(o&&(o+=" "),o+=r);return o},Ql=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=Ql(t[r]))&&(n&&(n+=" "),n+=e);return n},Ar=(t,...e)=>{let n,r,o,i;const l=c=>{const u=e.reduce((d,f)=>f(d),t());return n=Kd(u),r=n.cache.get,o=n.cache.set,i=a,a(c)},a=c=>{const u=r(c);if(u)return u;const d=Ad(c,n);return o(c,d),d};return i=l,(...c)=>i(Fd(...c))},jd=[],ue=t=>{const e=n=>n[t]||jd;return e.isThemeGetter=!0,e},es=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ts=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_d=/^\d+\/\d+$/,Bd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Hd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ft=t=>_d.test(t),X=t=>!!t&&!Number.isNaN(Number(t)),He=t=>!!t&&Number.isInteger(Number(t)),gr=t=>t.endsWith("%")&&X(t.slice(0,-1)),Ie=t=>Bd.test(t),Ud=()=>!0,Wd=t=>Vd.test(t)&&!zd.test(t),ns=()=>!1,qd=t=>Hd.test(t),Yd=t=>Gd.test(t),Xd=t=>!B(t)&&!V(t),Zd=t=>Et(t,is,ns),B=t=>es.test(t),tt=t=>Et(t,ls,Wd),yr=t=>Et(t,nf,X),fi=t=>Et(t,rs,ns),Jd=t=>Et(t,os,Yd),sn=t=>Et(t,ss,qd),V=t=>ts.test(t),Tt=t=>Ct(t,ls),Qd=t=>Ct(t,rf),pi=t=>Ct(t,rs),ef=t=>Ct(t,is),tf=t=>Ct(t,os),an=t=>Ct(t,ss,!0),Et=(t,e,n)=>{const r=es.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Ct=(t,e,n=!1)=>{const r=ts.exec(t);return r?r[1]?e(r[1]):n:!1},rs=t=>t==="position"||t==="percentage",os=t=>t==="image"||t==="url",is=t=>t==="length"||t==="size"||t==="bg-size",ls=t=>t==="length",nf=t=>t==="number",rf=t=>t==="family-name",ss=t=>t==="shadow",Fr=()=>{const t=ue("color"),e=ue("font"),n=ue("text"),r=ue("font-weight"),o=ue("tracking"),i=ue("leading"),l=ue("breakpoint"),a=ue("container"),c=ue("spacing"),u=ue("radius"),d=ue("shadow"),f=ue("inset-shadow"),b=ue("text-shadow"),h=ue("drop-shadow"),g=ue("blur"),y=ue("perspective"),v=ue("aspect"),w=ue("ease"),x=ue("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...D(),V,B],_=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],P=()=>[V,B,c],N=()=>[ft,"full","auto",...P()],C=()=>[He,"none","subgrid",V,B],K=()=>["auto",{span:["full",He,V,B]},He,V,B],j=()=>[He,"auto",V,B],A=()=>["auto","min","max","fr",V,B],m=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],S=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...P()],k=()=>[ft,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],R=()=>[t,V,B],$=()=>[...D(),pi,fi,{position:[V,B]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",ef,Zd,{size:[V,B]}],G=()=>[gr,Tt,tt],W=()=>["","none","full",u,V,B],q=()=>["",X,Tt,tt],ee=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[X,gr,pi,fi],be=()=>["","none",g,V,B],Le=()=>["none",X,V,B],z=()=>["none",X,V,B],$e=()=>[X,V,B],me=()=>[ft,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ie],breakpoint:[Ie],color:[Ud],container:[Ie],"drop-shadow":[Ie],ease:["in","out","in-out"],font:[Xd],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ie],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ie],shadow:[Ie],spacing:["px",X],text:[Ie],"text-shadow":[Ie],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ft,B,V,v]}],container:["container"],columns:[{columns:[X,B,V,a]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[He,"auto",V,B]}],basis:[{basis:[ft,"full","auto",a,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[X,ft,"auto","initial","none",B]}],grow:[{grow:["",X,V,B]}],shrink:[{shrink:["",X,V,B]}],order:[{order:[He,"first","last","none",V,B]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...m(),"normal"]}],"justify-items":[{"justify-items":[...S(),"normal"]}],"justify-self":[{"justify-self":["auto",...S()]}],"align-content":[{content:["normal",...m()]}],"align-items":[{items:[...S(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...S(),{baseline:["","last"]}]}],"place-content":[{"place-content":m()}],"place-items":[{"place-items":[...S(),"baseline"]}],"place-self":[{"place-self":["auto",...S()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:k()}],w:[{w:[a,"screen",...k()]}],"min-w":[{"min-w":[a,"screen","none",...k()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[l]},...k()]}],h:[{h:["screen","lh",...k()]}],"min-h":[{"min-h":["screen","lh","none",...k()]}],"max-h":[{"max-h":["screen","lh",...k()]}],"font-size":[{text:["base",n,Tt,tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,V,yr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gr,B]}],"font-family":[{font:[Qd,B,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,V,B]}],"line-clamp":[{"line-clamp":[X,"none",V,yr]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",V,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",V,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[X,"from-font","auto",V,tt]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[X,"auto",V,B]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",V,B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",V,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},He,V,B],radial:["",V,B],conic:[He,V,B]},tf,Jd]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[X,V,B]}],"outline-w":[{outline:["",X,Tt,tt]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,an,sn]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",f,an,sn]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[X,tt]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",b,an,sn]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[X,V,B]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[X]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[V,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[X]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",V,B]}],filter:[{filter:["","none",V,B]}],blur:[{blur:be()}],brightness:[{brightness:[X,V,B]}],contrast:[{contrast:[X,V,B]}],"drop-shadow":[{"drop-shadow":["","none",h,an,sn]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",X,V,B]}],"hue-rotate":[{"hue-rotate":[X,V,B]}],invert:[{invert:["",X,V,B]}],saturate:[{saturate:[X,V,B]}],sepia:[{sepia:["",X,V,B]}],"backdrop-filter":[{"backdrop-filter":["","none",V,B]}],"backdrop-blur":[{"backdrop-blur":be()}],"backdrop-brightness":[{"backdrop-brightness":[X,V,B]}],"backdrop-contrast":[{"backdrop-contrast":[X,V,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",X,V,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,V,B]}],"backdrop-invert":[{"backdrop-invert":["",X,V,B]}],"backdrop-opacity":[{"backdrop-opacity":[X,V,B]}],"backdrop-saturate":[{"backdrop-saturate":[X,V,B]}],"backdrop-sepia":[{"backdrop-sepia":["",X,V,B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",V,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[X,"initial",V,B]}],ease:[{ease:["linear","initial",w,V,B]}],delay:[{delay:[X,V,B]}],animate:[{animate:["none",x,V,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,V,B]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:Le()}],"rotate-x":[{"rotate-x":Le()}],"rotate-y":[{"rotate-y":Le()}],"rotate-z":[{"rotate-z":Le()}],scale:[{scale:z()}],"scale-x":[{"scale-x":z()}],"scale-y":[{"scale-y":z()}],"scale-z":[{"scale-z":z()}],"scale-3d":["scale-3d"],skew:[{skew:$e()}],"skew-x":[{"skew-x":$e()}],"skew-y":[{"skew-y":$e()}],transform:[{transform:[V,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",V,B]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",V,B]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[X,Tt,tt,yr]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},of=(t,{cacheSize:e,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>(It(t,"cacheSize",e),It(t,"prefix",n),It(t,"experimentalParseClassName",r),cn(t.theme,i.theme),cn(t.classGroups,i.classGroups),cn(t.conflictingClassGroups,i.conflictingClassGroups),cn(t.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),It(t,"orderSensitiveModifiers",i.orderSensitiveModifiers),un(t.theme,o.theme),un(t.classGroups,o.classGroups),un(t.conflictingClassGroups,o.conflictingClassGroups),un(t.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),as(t,o,"orderSensitiveModifiers"),t),It=(t,e,n)=>{n!==void 0&&(t[e]=n)},cn=(t,e)=>{if(e)for(const n in e)It(t,n,e[n])},un=(t,e)=>{if(e)for(const n in e)as(t,e,n)},as=(t,e,n)=>{const r=e[n];r!==void 0&&(t[n]=t[n]?t[n].concat(r):r)},lf=(t,...e)=>typeof t=="function"?Ar(Fr,t,...e):Ar(()=>of(Fr(),t),...e),sf=Ar(Fr);var af=t=>ge(t)?sf:lf({...t,extend:{theme:t.theme,classGroups:t.classGroups,conflictingClassGroupModifiers:t.conflictingClassGroupModifiers,conflictingClassGroups:t.conflictingClassGroups,...t.extend}}),cs=(t,e)=>{const n=Vt(t);return!n||!((e==null?void 0:e.twMerge)??!0)?n:((!Ke.cachedTwMerge||Ke.didTwMergeConfigChange)&&(Ke.didTwMergeConfigChange=!1,Ke.cachedTwMerge=af(Ke.cachedTwMergeConfig)),Ke.cachedTwMerge(n)||void 0)},U=(...t)=>cs(t,{}),cf=(...t)=>e=>cs(t,e),{tv:xe}=yd(cf);const uf=xe({defaultVariants:{status:"default"},slots:{base:"alert",content:"alert__content",description:"alert__description",indicator:"alert__indicator",title:"alert__title"},variants:{status:{accent:{base:"alert--accent"},danger:{base:"alert--danger"},default:{base:"alert--default"},success:{base:"alert--success"},warning:{base:"alert--warning"}}}}),qe=xe({base:"button",defaultVariants:{fullWidth:!1,isIconOnly:!1,size:"md",variant:"primary"},variants:{fullWidth:{false:"",true:"button--full-width"},isIconOnly:{true:"button--icon-only"},size:{lg:"button--lg",md:"button--md",sm:"button--sm"},variant:{danger:"button--danger","danger-soft":"button--danger-soft",ghost:"button--ghost",outline:"button--outline",primary:"button--primary",secondary:"button--secondary",tertiary:"button--tertiary"}}}),xo=xe({defaultVariants:{fullWidth:!1,orientation:"horizontal"},slots:{base:"button-group",separator:"button-group__separator"},variants:{fullWidth:{false:{},true:{base:"button-group--full-width"}},orientation:{horizontal:{base:"button-group--horizontal"},vertical:{base:"button-group--vertical"}}}}),df=xe({defaultVariants:{variant:"default"},slots:{base:"card",content:"card__content",description:"card__description",footer:"card__footer",header:"card__header",title:"card__title"},variants:{variant:{default:{base:"card--default"},secondary:{base:"card--secondary"},tertiary:{base:"card--tertiary"},transparent:{base:"card--transparent"}}}}),ff=xe({defaultVariants:{variant:"primary"},slots:{base:"checkbox",content:"checkbox__content",control:"checkbox__control",indicator:"checkbox__indicator"},variants:{variant:{primary:{base:"checkbox--primary"},secondary:{base:"checkbox--secondary"}}}}),pf=xe({defaultVariants:{color:"default",variant:"secondary"},slots:{base:"chip",label:"chip__label"},variants:{color:{accent:{base:"chip--accent"},danger:{base:"chip--danger"},default:{base:"chip--default"},success:{base:"chip--success"},warning:{base:"chip--warning"}},size:{lg:{base:"chip--lg"},md:{base:"chip--md"},sm:{base:"chip--sm"}},variant:{primary:{base:"chip--primary"},secondary:{base:"chip--secondary"},soft:{base:"chip--soft"},tertiary:{base:"chip--tertiary"}}}}),hf=xe({base:"close-button",defaultVariants:{variant:"default"},variants:{variant:{default:"close-button--default"}}}),bf=xe({slots:{menu:"dropdown__menu",popover:"dropdown__popover",root:"dropdown",trigger:"dropdown__trigger"}}),mf=xe({slots:{base:"link",icon:"link__icon"}}),gf=xe({defaultVariants:{color:"accent",size:"md"},slots:{base:"progress-bar",fill:"progress-bar__fill",output:"progress-bar__output",track:"progress-bar__track"},variants:{color:{accent:{base:"progress-bar--accent"},danger:{base:"progress-bar--danger"},default:{base:"progress-bar--default"},success:{base:"progress-bar--success"},warning:{base:"progress-bar--warning"}},size:{lg:{base:"progress-bar--lg"},md:{base:"progress-bar--md"},sm:{base:"progress-bar--sm"}}}}),yf=xe({defaultVariants:{variant:"default"},slots:{indicator:"menu-item__indicator",item:"menu-item",submenuIndicator:"menu-item__indicator menu-item__indicator--submenu"},variants:{variant:{danger:{item:"menu-item--danger"},default:{item:"menu-item--default"}}}}),vf=xe({base:"menu-section"}),$o=xe({defaultVariants:{scroll:"inside",size:"md",variant:"opaque"},slots:{backdrop:"modal__backdrop",body:"modal__body",closeTrigger:"modal__close-trigger",container:"modal__container",dialog:"modal__dialog",footer:"modal__footer",header:"modal__header",heading:"modal__heading",icon:"modal__icon",trigger:"modal__trigger"},variants:{scroll:{inside:{body:"modal__body--scroll-inside",dialog:"modal__dialog--scroll-inside"},outside:{body:"modal__body--scroll-outside",container:"modal__container--scroll-outside",dialog:"modal__dialog--scroll-outside"}},size:{cover:{dialog:"modal__dialog--cover"},full:{container:"modal__container--full",dialog:"modal__dialog--full"},lg:{dialog:"modal__dialog--lg"},md:{dialog:"modal__dialog--md"},sm:{dialog:"modal__dialog--sm"},xs:{dialog:"modal__dialog--xs"}},variant:{blur:{backdrop:"modal__backdrop--blur"},opaque:{backdrop:"modal__backdrop--opaque"},transparent:{backdrop:"modal__backdrop--transparent"}}}}),xf=xe({base:"separator",defaultVariants:{orientation:"horizontal",variant:"default"},variants:{orientation:{horizontal:"separator--horizontal",vertical:"separator--vertical"},variant:{default:"separator--default",secondary:"separator--secondary",tertiary:"separator--tertiary"}}}),Dn=Symbol("default");function ze({values:t,children:e}){for(let[n,r]of t)e=s.createElement(n.Provider,{value:r},e);return e}function Te(t){let{className:e,style:n,children:r,defaultClassName:o,defaultChildren:i,defaultStyle:l,values:a,render:c}=t;return s.useMemo(()=>{let u,d,f;return typeof e=="function"?u=e({...a,defaultClassName:o}):u=e,typeof n=="function"?d=n({...a,defaultStyle:l||{}}):d=n,typeof r=="function"?f=r({...a,defaultChildren:i}):r==null?f=i:f=r,{className:u??o,style:d||l?{...l,...d}:void 0,children:f??i,"data-rac":"",render:c?b=>c(b,a):void 0}},[e,n,r,o,i,l,a,c])}function $f(t,e){return n=>e(typeof t=="function"?t(n):t,n)}function Qt(t,e){let n=s.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=e||Dn;if(!n.slots[r]){let o=new Intl.ListFormat().format(Object.keys(n.slots).map(l=>`"${l}"`)),i=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${i} Valid slot names are ${o}.`)}return n.slots[r]}return n}function Me(t,e,n){let r=Qt(n,t.slot)||{},{ref:o,...i}=r,l=Je(s.useMemo(()=>ut(e,o),[e,o])),a=Y(i,t);return"style"in i&&i.style&&"style"in t&&t.style&&(typeof i.style=="function"||typeof t.style=="function"?a.style=c=>{let u=typeof i.style=="function"?i.style(c):i.style,d={...c.defaultStyle,...u},f=typeof t.style=="function"?t.style({...c,defaultStyle:d}):t.style;return{...d,...f}}:a.style={...i.style,...t.style}),[a,l]}function us(t=!0){let[e,n]=s.useState(t),r=s.useRef(!1),o=s.useCallback(i=>{r.current=!0,n(!!i)},[]);return J(()=>{r.current||n(!1)},[]),[o,e]}function wf(t){const e=/^(data-.*)$/;let n={};for(const r in t)e.test(r)||(n[r]=t[r]);return n}function Ef(t,e,n){let{render:r,...o}=e,i=s.useRef(null),l=s.useMemo(()=>ut(n,i),[n,i]);J(()=>{process.env.NODE_ENV!=="production"&&r&&(i.current?i.current.localName!==t&&console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${t}>, got <${i.current.localName}>. This may break the component behavior and accessibility.`):console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?"))},[t,r]);let a={...o,ref:l};return r?r(a,void 0):s.createElement(t,a)}const hi={},he=new Proxy({},{get(t,e){if(typeof e!="string")return;let n=hi[e];return n||(n=s.forwardRef(Ef.bind(null,e)),hi[e]=n),n}});typeof HTMLTemplateElement<"u"&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.appendChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.removeChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(t,e){return this.content.insertBefore(t,e)}}));const Rn=s.createContext(!1);function Cf(t){if(s.useContext(Rn))return s.createElement(s.Fragment,null,t.children);let n=s.createElement(Rn.Provider,{value:!0},t.children);return s.createElement("template",null,n)}function Sf(t){let e=(n,r)=>s.useContext(Rn)?null:t(n,r);return e.displayName=t.displayName||t.name,s.forwardRef(e)}function ds(){return s.useContext(Rn)}const Pf=s.createContext({});function kf(t){let{id:e,label:n,"aria-labelledby":r,"aria-label":o,labelElementType:i="label"}=t;e=pe(e);let l=pe(),a={};n?(r=r?`${l} ${r}`:l,a={id:l,htmlFor:i==="label"?e:void 0}):!r&&!o&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let c=Vl({id:e,"aria-label":o,"aria-labelledby":r});return{labelProps:a,fieldProps:c}}const Tf=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Mf=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Df(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return Tf.has(n.script)}let e=t.split("-")[0];return Mf.has(e)}const fs=Symbol.for("react-aria.i18n.locale");function ps(){let t=typeof window<"u"&&window[fs]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:Df(t)?"rtl":"ltr"}}let jr=ps(),Kt=new Set;function bi(){jr=ps();for(let t of Kt)t(jr)}function Rf(){let t=Ze(),[e,n]=s.useState(jr);return s.useEffect(()=>(Kt.size===0&&window.addEventListener("languagechange",bi),Kt.add(n),()=>{Kt.delete(n),Kt.size===0&&window.removeEventListener("languagechange",bi)}),[]),t?{locale:typeof window<"u"&&window[fs]||"en-US",direction:"ltr"}:e}const Nf=s.createContext(null);function dt(){let t=Rf();return s.useContext(Nf)||t}let vr=new Map,_r=!1;try{_r=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Nn=!1;try{Nn=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const hs={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Lf{constructor(e,n={}){this.numberFormatter=If(e,n),this.options=n}format(e){var r;let n="";if(!_r&&this.options.signDisplay!=null?n=Kf(this.numberFormatter,this.options.signDisplay,e):n=this.numberFormatter.format(e),this.options.style==="unit"&&!Nn){let{unit:o,unitDisplay:i="short",locale:l}=this.resolvedOptions();if(!o)return n;let a=(r=hs[o])==null?void 0:r[i];n+=a[l]||a.default}return n}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,n);if(n<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(n)}`}formatRangeToParts(e,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,n);if(n<e)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),o=this.numberFormatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!_r&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Nn&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}}function If(t,e={}){var i;let{numberingSystem:n}=e;if(n&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${n}`),e.style==="unit"&&!Nn){let{unit:l,unitDisplay:a="short"}=e;if(!l)throw new Error('unit option must be provided with style: "unit"');if(!((i=hs[l])!=null&&i[a]))throw new Error(`Unsupported unit ${l} with unitDisplay = ${a}`);e={...e,style:"decimal"}}let r=t+(e?Object.entries(e).sort((l,a)=>l[0]<a[0]?-1:1).join():"");if(vr.has(r))return vr.get(r);let o=new Intl.NumberFormat(t,e);return vr.set(r,o),o}function Kf(t,e,n){if(e==="auto")return t.format(n);if(e==="never")return t.format(Math.abs(n));{let r=!1;if(e==="always"?r=n>0||Object.is(n,0):e==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let o=t.format(-n),i=t.format(n),l=o.replace(i,"").replace(/\u200e|\u061C/,"");return[...l].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),o.replace(i,"!!!").replace(l,"+").replace("!!!",i)}else return t.format(n)}}function Of(t={}){let{locale:e}=dt();return s.useMemo(()=>new Lf(e,t),[e,t])}function Ln(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}function Af(t){let{value:e=0,minValue:n=0,maxValue:r=100,valueLabel:o,isIndeterminate:i,formatOptions:l={style:"percent"}}=t,a=ae(t,{labelable:!0}),{labelProps:c,fieldProps:u}=kf({...t,labelElementType:"span"});e=Ln(e,n,r);let d=(e-n)/(r-n),f=Of(l);if(!i&&!o){let b=l.style==="percent"?d:e;o=f.format(b)}return{progressBarProps:Y(a,{...u,"aria-valuenow":i?void 0:e,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":i?void 0:o,role:"progressbar"}),labelProps:c}}function Ff(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const bs=s.createContext(null),jf=s.forwardRef(function(e,n){[e,n]=Me(e,n,bs);let{value:r=0,minValue:o=0,maxValue:i=100,isIndeterminate:l=!1}=e;r=Ff(r,o,i);let[a,c]=us(!e["aria-label"]&&!e["aria-labelledby"]),{progressBarProps:u,labelProps:d}=Af({...e,label:c}),f=l?void 0:(r-o)/(i-o)*100,b=Te({...e,defaultClassName:"react-aria-ProgressBar",values:{percentage:f,valueText:u["aria-valuetext"],isIndeterminate:l}}),h=ae(e,{global:!0});return s.createElement(he.div,{...Y(h,b,u),ref:n,slot:e.slot||void 0},s.createElement(Pf.Provider,{value:{...d,ref:a,elementType:"span"}},b.children))}),ms=7e3;let Re=null;function mi(t,e="assertive",n=ms){Re?Re.announce(t,e,n):(Re=new _f,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?Re.announce(t,e,n):setTimeout(()=>{Re!=null&&Re.isAttached()&&(Re==null||Re.announce(t,e,n))},100))}class _f{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){var e;return(e=this.node)==null?void 0:e.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",r=ms){var i,l;if(!this.node)return;let o=document.createElement("div");typeof e=="object"?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,n==="assertive"?(i=this.assertiveLog)==null||i.appendChild(o):(l=this.politeLog)==null||l.appendChild(o),e!==""&&setTimeout(()=>{o.remove()},r)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}}function wo(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function gs(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function ys(t){let e=s.useRef({isFocused:!1,observer:null});return J(()=>{const n=e.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),s.useCallback(n=>{let r=F(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){e.current.isFocused=!0;let o=r,i=l=>{if(e.current.isFocused=!1,o.disabled){let a=wo(l);t==null||t(a)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver(()=>{var l;if(e.current.isFocused&&o.disabled){(l=e.current.observer)==null||l.disconnect();let a=o===ne()?null:ne();o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let In=!1;function gi(t){for(;t&&!yo(t,{skipVisibilityCheck:!0});)t=t.parentElement;let e=fe(t),n=e.document.activeElement;if(!n||n===t)return;In=!0;let r=!1,o=d=>{(F(d)===n||r)&&d.stopImmediatePropagation()},i=d=>{(F(d)===n||r)&&(d.stopImmediatePropagation(),!t&&!r&&(r=!0,de(n),c()))},l=d=>{(F(d)===t||r)&&d.stopImmediatePropagation()},a=d=>{(F(d)===t||r)&&(d.stopImmediatePropagation(),r||(r=!0,de(n),c()))};e.addEventListener("blur",o,!0),e.addEventListener("focusout",i,!0),e.addEventListener("focusin",a,!0),e.addEventListener("focus",l,!0);let c=()=>{cancelAnimationFrame(u),e.removeEventListener("blur",o,!0),e.removeEventListener("focusout",i,!0),e.removeEventListener("focusin",a,!0),e.removeEventListener("focus",l,!0),In=!1,r=!1},u=requestAnimationFrame(c);return c}let Be=null;const zt=new Set;let _t=new Map,at=!1,Br=!1;const Bf={Tab:!0,Escape:!0};function Yn(t,e){for(let n of zt)n(t,e)}function Vf(t){return!(t.metaKey||!it()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Kn(t){at=!0,!_e.isOpening&&Vf(t)&&(Be="keyboard",Yn("keyboard",t))}function Ce(t){Be="pointer","pointerType"in t&&t.pointerType,(t.type==="mousedown"||t.type==="pointerdown")&&(at=!0,Yn("pointer",t))}function vs(t){!_e.isOpening&&Lr(t)&&(at=!0,Be="virtual")}function xs(t){let e=fe(F(t)),n=Q(F(t));F(t)===e||F(t)===n||In||!t.isTrusted||(!at&&!Br&&(Be="virtual",Yn("virtual",t)),at=!1,Br=!1)}function $s(){In||(at=!1,Br=!0)}function On(t){if(typeof window>"u"||typeof document>"u")return;const e=fe(t),n=Q(t);if(_t.get(e))return;let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){at=!0,r.apply(this,arguments)},n.addEventListener("keydown",Kn,!0),n.addEventListener("keyup",Kn,!0),n.addEventListener("click",vs,!0),e.addEventListener("focus",xs,!0),e.addEventListener("blur",$s,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ce,!0),n.addEventListener("pointermove",Ce,!0),n.addEventListener("pointerup",Ce,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Ce,!0),n.addEventListener("mousemove",Ce,!0),n.addEventListener("mouseup",Ce,!0)),e.addEventListener("beforeunload",()=>{ws(t)},{once:!0}),_t.set(e,{focus:r})}const ws=(t,e)=>{const n=fe(t),r=Q(t);e&&r.removeEventListener("DOMContentLoaded",e),_t.has(n)&&(n.HTMLElement.prototype.focus=_t.get(n).focus,r.removeEventListener("keydown",Kn,!0),r.removeEventListener("keyup",Kn,!0),r.removeEventListener("click",vs,!0),n.removeEventListener("focus",xs,!0),n.removeEventListener("blur",$s,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ce,!0),r.removeEventListener("pointermove",Ce,!0),r.removeEventListener("pointerup",Ce,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Ce,!0),r.removeEventListener("mousemove",Ce,!0),r.removeEventListener("mouseup",Ce,!0)),_t.delete(n))};function zf(t){const e=Q(t);let n;return e.readyState!=="loading"?On(t):(n=()=>{On(t)},e.addEventListener("DOMContentLoaded",n)),()=>ws(t,n)}typeof document<"u"&&zf();function Ht(){return Be!=="pointer"}function Gt(){return Be}function Vr(t){Be=t,Yn(t,null)}function Hf(){On();let[t,e]=s.useState(Be);return s.useEffect(()=>{let n=()=>{e(Be)};return zt.add(n),()=>{zt.delete(n)}},[]),Ze()?null:t}const Gf=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Uf(t,e,n){let r=n?F(n):void 0,o=Q(r),i=fe(r);const l=typeof i<"u"?i.HTMLInputElement:HTMLInputElement,a=typeof i<"u"?i.HTMLTextAreaElement:HTMLTextAreaElement,c=typeof i<"u"?i.HTMLElement:HTMLElement,u=typeof i<"u"?i.KeyboardEvent:KeyboardEvent;let d=ne(o);return t=t||d instanceof l&&!Gf.has(d.type)||d instanceof a||d instanceof c&&d.isContentEditable,!(t&&e==="keyboard"&&n instanceof u&&!Bf[n.key])}function Wf(t,e,n){On(),s.useEffect(()=>{if((n==null?void 0:n.enabled)===!1)return;let r=(o,i)=>{Uf(!!(n!=null&&n.isTextInput),o,i)&&t(Ht())};return zt.add(r),()=>{zt.delete(r)}},e)}function Ye(t){if(!t.isConnected)return;const e=Q(t);if(Gt()==="virtual"){let n=ne(e);Bl(()=>{const r=ne(e);(r===n||r===e.body)&&t.isConnected&&de(t)})}else de(t)}function Es(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:o}=t;const i=s.useCallback(c=>{if(F(c)===c.currentTarget)return r&&r(c),o&&o(!1),!0},[r,o]),l=ys(i),a=s.useCallback(c=>{let u=F(c);const d=Q(u),f=d?ne(d):ne();u===c.currentTarget&&u===f&&(n&&n(c),o&&o(!0),l(c))},[o,n,l]);return{focusProps:{onFocus:!e&&(n||o||r)?a:void 0,onBlur:!e&&(r||o)?i:void 0}}}function yi(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){e&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):e=!0},continuePropagation(){e=!1},isPropagationStopped(){return e}};t(r),e&&n.stopPropagation()}}function Cs(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:yi(t.onKeyDown),onKeyUp:yi(t.onKeyUp)}}}let zr=s.createContext(null);function qf(t){let e=s.useContext(zr)||{};ho(e,t);let{ref:n,...r}=e;return r}function en(t,e){let{focusProps:n}=Es(t),{keyboardProps:r}=Cs(t),o=Y(n,r),i=qf(e),l=t.isDisabled?{}:i,a=s.useRef(t.autoFocus);s.useEffect(()=>{a.current&&e.current&&Ye(e.current),a.current=!1},[e]);let c=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(c=void 0),{focusableProps:Y({...o,tabIndex:c},l)}}let gt="default",Hr="",wn=new WeakMap;function vi(t){if(lt()){if(gt==="default"){const e=Q(t);Hr=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}gt="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";wn.set(t,t.style[e]),t.style[e]="none"}}function xr(t){if(lt()){if(gt!=="disabled")return;gt="restoring",setTimeout(()=>{Bl(()=>{if(gt==="restoring"){const e=Q(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Hr||""),Hr="",gt="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&wn.has(t)){let e=wn.get(t),n="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[n]==="none"&&(t.style[n]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),wn.delete(t)}}const Ut=s.createContext({register:()=>{}});Ut.displayName="PressResponderContext";function Yf(t){let e=s.useContext(Ut);if(e){let{register:n,ref:r,...o}=e;t=Y(o,t),n()}return ho(e,t.ref),t}var xt;class dn{constructor(e,n,r,o){ei(this,xt);dr(this,xt,!0);let i=(o==null?void 0:o.target)??r.currentTarget;const l=i==null?void 0:i.getBoundingClientRect();let a,c=0,u,d=null;r.clientX!=null&&r.clientY!=null&&(u=r.clientX,d=r.clientY),l&&(u!=null&&d!=null?(a=u-l.left,c=d-l.top):(a=l.width/2,c=l.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=a,this.y=c,this.key=r.key}continuePropagation(){dr(this,xt,!1)}get shouldStopPropagation(){return Qo(this,xt)}}xt=new WeakMap;const xi=Symbol("linkClicked"),$i="react-aria-pressable-style",wi="data-react-aria-pressable";function Xe(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:i,onClick:l,isDisabled:a,isPressed:c,preventFocusOnPress:u,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:f,ref:b,...h}=Yf(t),[g,y]=s.useState(!1),v=s.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:w,removeAllGlobalListeners:x}=qn(),M=s.useCallback((m,S)=>{let I=v.current;if(a||I.didFirePressStart)return!1;let k=!0;if(I.isTriggeringEvent=!0,r){let R=new dn("pressstart",S,m);r(R),k=R.shouldStopPropagation}return n&&n(!0),I.isTriggeringEvent=!1,I.didFirePressStart=!0,y(!0),k},[a,r,n]),D=s.useCallback((m,S,I=!0)=>{let k=v.current;if(!k.didFirePressStart)return!1;k.didFirePressStart=!1,k.isTriggeringEvent=!0;let R=!0;if(o){let $=new dn("pressend",S,m);o($),R=$.shouldStopPropagation}if(n&&n(!1),y(!1),e&&I&&!a){let $=new dn("press",S,m);e($),R&&(R=$.shouldStopPropagation)}return k.isTriggeringEvent=!1,R},[a,o,n,e]),L=Pe(D),_=s.useCallback((m,S)=>{let I=v.current;if(a)return!1;if(i){I.isTriggeringEvent=!0;let k=new dn("pressup",S,m);return i(k),I.isTriggeringEvent=!1,k.shouldStopPropagation}return!0},[a,i]),E=Pe(_),P=s.useCallback(m=>{let S=v.current;if(S.isPressed&&S.target){S.didFirePressStart&&S.pointerType!=null&&D(nt(S.target,m),S.pointerType,!1),S.isPressed=!1,S.isOverTarget=!1,S.activePointerId=null,S.pointerType=null,x(),f||xr(S.target);for(let I of S.disposables)I();S.disposables=[]}},[f,x,D]),N=Pe(P);s.useEffect(()=>{a&&v.current.isPressed&&N({currentTarget:v.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[a]);let C=s.useCallback(m=>{d&&P(m)},[d,P]),K=s.useCallback(m=>{a||l==null||l(m)},[a,l]),j=s.useCallback((m,S)=>{if(!a&&l){let I=new MouseEvent("click",m);gs(I,S),l(wo(I))}},[a,l]),A=s.useMemo(()=>{let m=v.current,S={onKeyDown(k){var R;if($r(k.nativeEvent,k.currentTarget)&&H(k.currentTarget,F(k))){Si(F(k),k.key)&&k.preventDefault();let $=!0;!m.isPressed&&!k.repeat&&(m.target=k.currentTarget,m.isPressed=!0,m.pointerType="keyboard",$=M(k,"keyboard"));let T=k.currentTarget,O=G=>{$r(G,T)&&!G.repeat&&H(T,F(G))&&m.target&&E(nt(m.target,G),"keyboard")};w(Q(k.currentTarget),"keyup",Jt(O,I),!0),$&&k.stopPropagation(),k.metaKey&&it()&&((R=m.metaKeyEvents)==null||R.set(k.key,k.nativeEvent))}else k.key==="Meta"&&(m.metaKeyEvents=new Map)},onClick(k){if(!(k&&!H(k.currentTarget,F(k)))&&k&&k.button===0&&!m.isTriggeringEvent&&!_e.isOpening){let R=!0;if(a&&k.preventDefault(),!m.ignoreEmulatedMouseEvents&&!m.isPressed&&(m.pointerType==="virtual"||Lr(k.nativeEvent))){let $=M(k,"virtual"),T=E(k,"virtual"),O=L(k,"virtual");K(k),R=$&&T&&O}else if(m.isPressed&&m.pointerType!=="keyboard"){let $=m.pointerType||k.nativeEvent.pointerType||"virtual",T=E(nt(k.currentTarget,k),$),O=L(nt(k.currentTarget,k),$,!0);R=T&&O,m.isOverTarget=!1,K(k),N(k)}m.ignoreEmulatedMouseEvents=!1,R&&k.stopPropagation()}}},I=k=>{var R,$,T;if(m.isPressed&&m.target&&$r(k,m.target)){Si(F(k),k.key)&&k.preventDefault();let O=F(k),G=H(m.target,O);L(nt(m.target,k),"keyboard",G),G&&j(k,m.target),x(),k.key!=="Enter"&&Eo(m.target)&&H(m.target,O)&&!k[xi]&&(k[xi]=!0,_e(m.target,k,!1)),m.isPressed=!1,(R=m.metaKeyEvents)==null||R.delete(k.key)}else if(k.key==="Meta"&&(($=m.metaKeyEvents)!=null&&$.size)){let O=m.metaKeyEvents;m.metaKeyEvents=void 0;for(let G of O.values())(T=m.target)==null||T.dispatchEvent(new KeyboardEvent("keyup",G))}};if(typeof PointerEvent<"u"){S.onPointerDown=$=>{if($.button!==0||!H($.currentTarget,F($)))return;if(od($.nativeEvent)){m.pointerType="virtual";return}m.pointerType=$.pointerType;let T=!0;if(!m.isPressed){m.isPressed=!0,m.isOverTarget=!0,m.activePointerId=$.pointerId,m.target=$.currentTarget,f||vi(m.target),T=M($,m.pointerType);let O=F($);"releasePointerCapture"in O&&("hasPointerCapture"in O?O.hasPointerCapture($.pointerId)&&O.releasePointerCapture($.pointerId):O.releasePointerCapture($.pointerId)),w(Q($.currentTarget),"pointerup",k,!1),w(Q($.currentTarget),"pointercancel",R,!1)}T&&$.stopPropagation()},S.onMouseDown=$=>{if(H($.currentTarget,F($))&&$.button===0){if(u){let T=gi($.target);T&&m.disposables.push(T)}$.stopPropagation()}},S.onPointerUp=$=>{!H($.currentTarget,F($))||m.pointerType==="virtual"||$.button===0&&!m.isPressed&&E($,m.pointerType||$.pointerType)},S.onPointerEnter=$=>{$.pointerId===m.activePointerId&&m.target&&!m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!0,M(nt(m.target,$),m.pointerType))},S.onPointerLeave=$=>{$.pointerId===m.activePointerId&&m.target&&m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!1,L(nt(m.target,$),m.pointerType,!1),C($))};let k=$=>{if($.pointerId===m.activePointerId&&m.isPressed&&$.button===0&&m.target){if(H(m.target,F($))&&m.pointerType!=null){let T=!1,O=setTimeout(()=>{m.isPressed&&m.target instanceof HTMLElement&&(T?N($):(de(m.target),m.target.click()))},80);w($.currentTarget,"click",()=>T=!0,!0),m.disposables.push(()=>clearTimeout(O))}else N($);m.isOverTarget=!1}},R=$=>{N($)};S.onDragStart=$=>{H($.currentTarget,F($))&&N($)}}else if(process.env.NODE_ENV==="test"){S.onMouseDown=$=>{if($.button!==0||!H($.currentTarget,F($)))return;if(m.ignoreEmulatedMouseEvents){$.stopPropagation();return}if(m.isPressed=!0,m.isOverTarget=!0,m.target=$.currentTarget,m.pointerType=Lr($.nativeEvent)?"virtual":"mouse",Xt.flushSync(()=>M($,m.pointerType))&&$.stopPropagation(),u){let O=gi($.target);O&&m.disposables.push(O)}w(Q($.currentTarget),"mouseup",k,!1)},S.onMouseEnter=$=>{if(!H($.currentTarget,F($)))return;let T=!0;m.isPressed&&!m.ignoreEmulatedMouseEvents&&m.pointerType!=null&&(m.isOverTarget=!0,T=M($,m.pointerType)),T&&$.stopPropagation()},S.onMouseLeave=$=>{if(!H($.currentTarget,F($)))return;let T=!0;m.isPressed&&!m.ignoreEmulatedMouseEvents&&m.pointerType!=null&&(m.isOverTarget=!1,T=L($,m.pointerType,!1),C($)),T&&$.stopPropagation()},S.onMouseUp=$=>{H($.currentTarget,F($))&&!m.ignoreEmulatedMouseEvents&&$.button===0&&!m.isPressed&&E($,m.pointerType||"mouse")};let k=$=>{if($.button===0){if(m.ignoreEmulatedMouseEvents){m.ignoreEmulatedMouseEvents=!1;return}m.target&&H(m.target,F($))&&m.pointerType!=null||N($),m.isOverTarget=!1}};S.onTouchStart=$=>{if(!H($.currentTarget,F($)))return;let T=Xf($.nativeEvent);if(!T)return;m.activePointerId=T.identifier,m.ignoreEmulatedMouseEvents=!0,m.isOverTarget=!0,m.isPressed=!0,m.target=$.currentTarget,m.pointerType="touch",f||vi(m.target),M(Ge(m.target,$),m.pointerType)&&$.stopPropagation(),w(fe($.currentTarget),"scroll",R,!0)},S.onTouchMove=$=>{if(!H($.currentTarget,F($)))return;if(!m.isPressed){$.stopPropagation();return}let T=Ei($.nativeEvent,m.activePointerId),O=!0;T&&Ci(T,$.currentTarget)?!m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!0,O=M(Ge(m.target,$),m.pointerType)):m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!1,O=L(Ge(m.target,$),m.pointerType,!1),C(Ge(m.target,$))),O&&$.stopPropagation()},S.onTouchEnd=$=>{if(!H($.currentTarget,F($)))return;if(!m.isPressed){$.stopPropagation();return}let T=Ei($.nativeEvent,m.activePointerId),O=!0;T&&Ci(T,$.currentTarget)&&m.pointerType!=null?(E(Ge(m.target,$),m.pointerType),O=L(Ge(m.target,$),m.pointerType),j($.nativeEvent,m.target)):m.isOverTarget&&m.pointerType!=null&&(O=L(Ge(m.target,$),m.pointerType,!1)),O&&$.stopPropagation(),m.isPressed=!1,m.activePointerId=null,m.isOverTarget=!1,m.ignoreEmulatedMouseEvents=!0,m.target&&!f&&xr(m.target),x()},S.onTouchCancel=$=>{H($.currentTarget,F($))&&($.stopPropagation(),m.isPressed&&N(Ge(m.target,$)))};let R=$=>{m.isPressed&&H(F($),m.target)&&N({currentTarget:m.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};S.onDragStart=$=>{H($.currentTarget,F($))&&N($)}}return S},[w,a,u,x,f,C,M,K,j]);return s.useEffect(()=>{if(!b||process.env.NODE_ENV==="test")return;const m=Q(b.current);if(!m||!m.head||m.getElementById($i))return;const S=m.createElement("style");S.id=$i;let I=Wl(m);I&&(S.nonce=I),S.textContent=`
|
|
1
|
+
"use strict";var Cu=Object.create;var ii=Object.defineProperty;var Pu=Object.getOwnPropertyDescriptor;var ku=Object.getOwnPropertyNames;var Tu=Object.getPrototypeOf,Mu=Object.prototype.hasOwnProperty;var li=t=>{throw TypeError(t)};var Ru=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ku(e))!Mu.call(t,o)&&o!==n&&ii(t,o,{get:()=>e[o],enumerable:!(r=Pu(e,o))||r.enumerable});return t};var Du=(t,e,n)=>(n=t!=null?Cu(Tu(t)):{},Ru(e||!t||!t.__esModule?ii(n,"default",{value:t,enumerable:!0}):n,t));var si=(t,e,n)=>e.has(t)||li("Cannot "+n);var ai=(t,e,n)=>(si(t,e,"read from private field"),n?n.call(t):e.get(t)),ci=(t,e,n)=>e.has(t)?li("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),pr=(t,e,n,r)=>(si(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),s=require("react"),Zt=require("react-dom"),je={GREY:"#7A8090",RED:"#E7320D",ORANGE:"#FF850A",YELLOW:"#F5E429",GREEN:"#14CC76",LIGHT_BLUE:"#20B3E9",BLUE:"#1738DE",MAGENTA:"#D945B1"};function ot(t,e){const n=t.replace("#",""),r=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),i=parseInt(n.slice(4,6),16);return`rgba(${r}, ${o}, ${i}, ${e})`}function Wn(t){const e=t.replace("#",""),n=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16);return(.299*n+.587*r+.114*o)/255>.55?"#111111":"#ffffff"}const _l={note:"GREY",info:"LIGHT_BLUE",tip:"GREEN",caution:"ORANGE",danger:"RED"};function Bl(t){return je[_l[t]]}const Pn={note:"Note",info:"Info",tip:"Tip",caution:"Caution",danger:"Danger"},Iu="react-aria-clear-focus",Nu="react-aria-focus";function qn(t){var n;if(typeof window>"u"||window.navigator==null)return!1;let e=(n=window.navigator.userAgentData)==null?void 0:n.brands;return Array.isArray(e)&&e.some(r=>t.test(r.brand))||t.test(window.navigator.userAgent)}function go(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)==null?void 0:e.platform)||window.navigator.platform):!1}function Ve(t){if(process.env.NODE_ENV==="test")return t;let e=null;return()=>(e==null&&(e=t()),e)}const it=Ve(function(){return go(/^Mac/i)}),Lu=Ve(function(){return go(/^iPhone/i)}),Vl=Ve(function(){return go(/^iPad/i)||it()&&navigator.maxTouchPoints>1}),lt=Ve(function(){return Lu()||Vl()}),Ku=Ve(function(){return it()||lt()}),zl=Ve(function(){return qn(/AppleWebKit/i)&&!Hl()}),Hl=Ve(function(){return qn(/Chrome/i)}),yo=Ve(function(){return qn(/Android/i)}),Au=Ve(function(){return qn(/Firefox/i)});function de(t){if(Ou())t.focus({preventScroll:!0});else{let e=Fu(t);t.focus(),ju(e)}}let ln=null;function Ou(){if(ln==null){ln=!1;try{document.createElement("div").focus({get preventScroll(){return ln=!0,!0}})}catch{}}return ln}function Fu(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function ju(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}const _u=s.createContext({isNative:!0,open:zu,useHref:t=>t});function Jt(){return s.useContext(_u)}function Bu(t,e){let n=t.getAttribute("target");return(!n||n==="_self")&&t.origin===location.origin&&!t.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function _e(t,e,n=!0){var c,u;let{metaKey:r,ctrlKey:o,altKey:i,shiftKey:l}=e;Au()&&((u=(c=window.event)==null?void 0:c.type)!=null&&u.startsWith("key"))&&t.target==="_blank"&&(it()?r=!0:o=!0);let a=zl()&&it()&&!Vl()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:o,altKey:i,shiftKey:l}):new MouseEvent("click",{metaKey:r,ctrlKey:o,altKey:i,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});_e.isOpening=n,de(t),t.dispatchEvent(a),_e.isOpening=!1}_e.isOpening=!1;function Vu(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function zu(t,e){Vu(t,n=>_e(n,e))}function Gl(t){const n=Jt().useHref((t==null?void 0:t.href)??"");let r={};if(t)for(let o of["href","target","rel","download","ping","referrerPolicy"])o in t&&(r[o]=o==="href"?n:t[o]);return r}function Ul(t,e,n,r){!e.isNative&&t.currentTarget instanceof HTMLAnchorElement&&t.currentTarget.href&&!t.isDefaultPrevented()&&Bu(t.currentTarget,t)&&n&&(t.preventDefault(),e.open(t.currentTarget,t,n,r))}const J=typeof document<"u"?s.useLayoutEffect:()=>{},kn={prefix:String(Math.round(Math.random()*1e10)),current:0},Wl=s.createContext(kn),Hu=s.createContext(!1);let Gu=!!(typeof window<"u"&&window.document&&window.document.createElement),hr=new WeakMap;function Uu(t=!1){var r,o;let e=s.useContext(Wl),n=s.useRef(null);if(n.current===null&&!t){let i=(o=(r=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)==null?void 0:r.ReactCurrentOwner)==null?void 0:o.current;if(i){let l=hr.get(i);l==null?hr.set(i,{id:e.current,state:i.memoizedState}):i.memoizedState!==l.state&&(e.current=l.id,hr.delete(i))}n.current=++e.current}return n.current}function Wu(t){let e=s.useContext(Wl);e===kn&&!Gu&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Uu(!!t),r=e===kn&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function qu(t){let e=s.useId(),[n]=s.useState(Ze()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${kn.prefix}`;return t||`${r}-${e}`}const Yu=typeof s.useId=="function"?qu:Wu;function Xu(){return!1}function Zu(){return!0}function Ju(t){return()=>{}}function Ze(){return typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore(Ju,Xu,Zu):s.useContext(Hu)}function Qu(t){let[e,n]=s.useState(t),r=s.useRef(e),o=s.useRef(null),i=s.useRef(()=>{if(!o.current)return;let a=o.current.next();if(a.done){o.current=null;return}r.current===a.value?i.current():n(a.value)});J(()=>{r.current=e,o.current&&i.current()});let l=s.useCallback(a=>{o.current=a(r.current),i.current()},[i]);return[e,l]}let ed=!!(typeof window<"u"&&window.document&&window.document.createElement),gt=new Map,Nt;typeof FinalizationRegistry<"u"&&(Nt=new FinalizationRegistry(t=>{gt.delete(t)}));function pe(t){let[e,n]=s.useState(t),r=s.useRef(null),o=Yu(e),i=s.useRef(null);if(Nt&&Nt.register(i,o),ed){const l=gt.get(o);l&&!l.includes(r)?l.push(r):gt.set(o,[r])}return J(()=>{let l=o;return()=>{Nt&&Nt.unregister(i),gt.delete(l)}},[o]),s.useEffect(()=>{let l=r.current;return l&&n(l),()=>{l&&(r.current=null)}}),o}function td(t,e){if(t===e)return t;let n=gt.get(t);if(n)return n.forEach(o=>o.current=e),e;let r=gt.get(e);return r?(r.forEach(o=>o.current=t),t):e}function xn(t=[]){let e=pe(),[n,r]=Qu(e),o=s.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return J(o,[e,o,...t]),n}function Qt(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Q=t=>(t==null?void 0:t.ownerDocument)??document,fe=t=>t&&"window"in t&&t.window===t?t:Q(t).defaultView||window;function nd(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function rd(t){return nd(t)&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}let od=!1;function Ae(){return od}function H(t,e){if(!Ae())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let n=e;for(;n!==null;){if(n===t)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:rd(n)?n=n.host:n=n.parentNode}return!1}const ne=(t=document)=>{var n;if(!Ae())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&((n=e.shadowRoot)!=null&&n.activeElement);)e=e.shadowRoot.activeElement;return e};function F(t){if(Ae()&&t.target instanceof Element&&t.target.shadowRoot){if("composedPath"in t)return t.composedPath()[0]??null;if("composedPath"in t.nativeEvent)return t.nativeEvent.composedPath()[0]??null}return t.target}function xt(t){if(!t)return!1;let e=t.getRootNode(),n=fe(t);if(!(e instanceof n.Document||e instanceof n.ShadowRoot))return!1;let r=e.activeElement;return r!=null&&t.contains(r)}class id{constructor(e,n,r,o){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=l=>{var a;if(l.nodeType===Node.ELEMENT_NODE){const c=l.shadowRoot;if(c){const u=this._doc.createTreeWalker(c,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(u),NodeFilter.FILTER_ACCEPT}else{if(typeof this.filter=="function")return this.filter(l);if((a=this.filter)!=null&&a.acceptNode)return this.filter.acceptNode(l);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=n,this.filter=o??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(e.createTreeWalker(n,r,this._acceptNode));const i=n.shadowRoot;if(i){const l=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(l)}}get currentNode(){return this._currentNode}set currentNode(e){if(!H(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=e,o=e;for(this._currentNode=e;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const l=r,a=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});n.push(a),a.currentNode=o,this._currentSetFor.add(a),r=o=l.host}else r=r.parentNode;const i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(i),i.currentNode=o,this._currentSetFor.add(i),this._walkerStack=n}get doc(){return this._doc}firstChild(){let e=this.currentNode,n=this.nextNode();return H(e,n)?(n&&(this.currentNode=n),n):(this.currentNode=e,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){var n;const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let o;if(typeof this.filter=="function"?o=this.filter(e):(n=this.filter)!=null&&n.acceptNode&&(o=this.filter.acceptNode(e)),o===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let i=this.nextNode();return i&&(this.currentNode=i),i}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){var r;const e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let o=this.previousNode();return o&&(this.currentNode=o),o}else return null;return null}const n=e.previousNode();if(n){if(n.shadowRoot){let i;if(typeof this.filter=="function"?i=this.filter(n):(r=this.filter)!=null&&r.acceptNode&&(i=this.filter.acceptNode(n)),i===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let l=this.lastChild();return l&&(this.currentNode=l),l}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let o=this.previousNode();return o&&(this.currentNode=o),o}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function ql(t,e,n,r){return Ae()?new id(t,e,n,r):t.createTreeWalker(e,n,r)}function ct(...t){return t.length===1&&t[0]?t[0]:e=>{let n=!1;const r=t.map(o=>{const i=ui(o,e);return n||(n=typeof i=="function"),i});if(n)return()=>{r.forEach((o,i)=>{typeof o=="function"?o():ui(t[i],null)})}}}function ui(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Yl(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Yl(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function ld(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Yl(t))&&(r&&(r+=" "),r+=e);return r}function Y(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let o in r){let i=e[o],l=r[o];typeof i=="function"&&typeof l=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?e[o]=Qt(i,l):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof l=="string"?e[o]=ld(i,l):o==="id"&&i&&l?e.id=td(i,l):o==="ref"&&i&&l?e.ref=ct(i,l):e[o]=l!==void 0?l:i}}return e}const sd=new Set(["id"]),ad=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),cd=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),ud=new Set(["dir","lang","hidden","inert","translate"]),di=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),dd=/^(data-.*)$/;function ae(t,e={}){let{labelable:n,isLink:r,global:o,events:i=o,propNames:l}=e,a={};for(const c in t)Object.prototype.hasOwnProperty.call(t,c)&&(sd.has(c)||n&&ad.has(c)||r&&cd.has(c)||o&&ud.has(c)||i&&(di.has(c)||c.endsWith("Capture")&&di.has(c.slice(0,-7)))||l!=null&&l.has(c)||dd.test(c))&&(a[c]=t[c]);return a}let Ue=new Map,Kr=new Set;function fi(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{let o=F(r);if(!t(r)||!o)return;let i=Ue.get(o);i||(i=new Set,Ue.set(o,i),o.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{let o=F(r);if(!t(r)||!o)return;let i=Ue.get(o);if(i&&(i.delete(r.propertyName),i.size===0&&(o.removeEventListener("transitioncancel",n),Ue.delete(o)),Ue.size===0)){for(let l of Kr)l();Kr.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?fi():document.addEventListener("DOMContentLoaded",fi));function fd(){for(const[t]of Ue)"isConnected"in t&&!t.isConnected&&Ue.delete(t)}function Xl(t){requestAnimationFrame(()=>{fd(),Ue.size===0?t():Kr.add(t)})}function Yn(){let t=s.useRef(new Map),e=s.useCallback((o,i,l,a)=>{let c=a!=null&&a.once?(...u)=>{t.current.delete(l),l(...u)}:l;t.current.set(l,{type:i,eventTarget:o,fn:c,options:a}),o.addEventListener(i,c,a)},[]),n=s.useCallback((o,i,l,a)=>{var u;let c=((u=t.current.get(l))==null?void 0:u.fn)||l;o.removeEventListener(i,c,a),t.current.delete(l)},[]),r=s.useCallback(()=>{t.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return s.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function Zl(t,e){let{id:n,"aria-label":r,"aria-labelledby":o}=t;return n=pe(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!r&&!o&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":o}}function Je(t){const e=s.useRef(null),n=s.useRef(void 0),r=s.useCallback(o=>{if(typeof t=="function"){const i=t,l=i(o);return()=>{typeof l=="function"?l():i(null)}}else if(t)return t.current=o,()=>{t.current=null}},[t]);return s.useMemo(()=>({get current(){return e.current},set current(o){e.current=o,n.current&&(n.current(),n.current=void 0),o!=null&&(n.current=r(o))}}),[r])}const pd=s.useInsertionEffect??J;function Pe(t){const e=s.useRef(null);return pd(()=>{e.current=t},[t]),s.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function pi(t,e){const n=s.useRef(!0),r=s.useRef(null);J(()=>(n.current=!0,()=>{n.current=!1}),[]),J(()=>{n.current?n.current=!1:(!r.current||e.some((o,i)=>!Object.is(o,r[i])))&&t(),r.current=e},e)}function hd(){return typeof window.ResizeObserver<"u"}function Tn(t){const{ref:e,box:n,onResize:r}=t;let o=Pe(r);s.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(hd()){const l=new window.ResizeObserver(a=>{a.length&&o()});return l.observe(i,{box:n}),()=>{i&&l.unobserve(i)}}else return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)}},[e,n])}function vo(t,e){J(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function st(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return t===r&&n.overflow!=="hidden"&&(o=!0),o&&e&&(o=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),o}function Jl(t,e){let n=t;for(st(n,e)&&(n=n.parentElement);n&&!st(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function mr(t,e){let n=[],r=document.scrollingElement||document.documentElement;for(;t&&(st(t,e)&&n.push(t),t!==r);)t=t.parentElement;return n}function ht(t){return it()?t.metaKey:t.ctrlKey}const md=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function _t(t){return t instanceof HTMLInputElement&&!md.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}let ve=typeof document<"u"&&window.visualViewport;function bd(){let t=Ze(),[e,n]=s.useState(()=>t?{width:0,height:0}:br());return s.useEffect(()=>{let r=a=>{n(c=>a.width===c.width&&a.height===c.height?c:a)},o=()=>{ve&&ve.scale>1||r(br())},i,l=a=>{ve&&ve.scale>1||_t(F(a))&&(i=requestAnimationFrame(()=>{let c=ne();(!c||!_t(c))&&r({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})}))};return r(br()),lt()&&window.addEventListener("blur",l,!0),ve?ve.addEventListener("resize",o):window.addEventListener("resize",o),()=>{cancelAnimationFrame(i),lt()&&window.removeEventListener("blur",l,!0),ve?ve.removeEventListener("resize",o):window.removeEventListener("resize",o)}},[]),e}function br(){return{width:ve?Math.min(ve.width*ve.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:ve?ve.height*ve.scale:document.documentElement.clientHeight}}let gd=0;const gr=new Map;function yd(t){let[e,n]=s.useState();return J(()=>{if(!t)return;let r=gr.get(t);if(r)n(r.element.id);else{let o=`react-aria-description-${gd++}`;n(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=t,document.body.appendChild(i),r={refCount:0,element:i},gr.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),gr.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function Lt(t,e,n,r){let o=Pe(n),i=n==null;s.useEffect(()=>{if(i||!t.current)return;let l=t.current;return l.addEventListener(e,o,r),()=>{l.removeEventListener(e,o,r)}},[t,e,r,i])}function $n(t,e,n={}){let{block:r="nearest",inline:o="nearest"}=n;if(t===e)return;let i=t.scrollTop,l=t.scrollLeft,a=e.getBoundingClientRect(),c=t.getBoundingClientRect(),u=window.getComputedStyle(e),d=window.getComputedStyle(t),f=document.scrollingElement||document.documentElement,m=t===f,h=t===f?0:c.top,g=t===f?t.clientHeight:c.bottom,y=t===f?0:c.left,v=t===f?t.clientWidth:c.right,w=parseFloat(u.scrollMarginTop)||0,x=parseFloat(u.scrollMarginBottom)||0,M=parseFloat(u.scrollMarginLeft)||0,R=parseFloat(u.scrollMarginRight)||0,L=parseFloat(d.scrollPaddingTop)||0,j=parseFloat(d.scrollPaddingBottom)||0,E=parseFloat(d.scrollPaddingLeft)||0,S=parseFloat(d.scrollPaddingRight)||0,I=parseFloat(d.borderTopWidth)||0,C=parseFloat(d.borderBottomWidth)||0,K=parseFloat(d.borderLeftWidth)||0,_=parseFloat(d.borderRightWidth)||0,O=a.top-w,b=a.bottom+x,P=a.left-M,N=a.right+R,k=t===f?0:K+_,D=t===f?0:I+C,$=t===f?0:t.offsetWidth-t.clientWidth-k,T=t===f?0:t.offsetHeight-t.clientHeight-D,A=h+(m?0:I)+L,G=g-(m?0:C)-j-T,W=y+(m?0:K)+E,q=v-(m?0:_)-S;d.direction==="rtl"&&!lt()?W+=$:q-=$;let ee=O<A||b>G,le=P<W||N>q;if(ee&&r==="start")i+=O-A;else if(ee&&r==="center")i+=(O+b)/2-(A+G)/2;else if(ee&&r==="end")i+=b-G;else if(ee&&r==="nearest"){let Z=O-A,me=b-G;i+=Math.abs(Z)<=Math.abs(me)?Z:me}if(le&&o==="start")l+=P-W;else if(le&&o==="center")l+=(P+N)/2-(W+q)/2;else if(le&&o==="end")l+=N-q;else if(le&&o==="nearest"){let Z=P-W,me=N-q;l+=Math.abs(Z)<=Math.abs(me)?Z:me}if(process.env.NODE_ENV==="test"){t.scrollLeft=l,t.scrollTop=i;return}t.scrollTo({left:l,top:i})}function hi(t,e={}){var r,o,i;let{containingElement:n}=e;if(t&&t.isConnected){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let{left:c,top:u}=t.getBoundingClientRect(),d=mr(t,!0);for(let h of d)$n(h,t);let{left:f,top:m}=t.getBoundingClientRect();if(Math.abs(c-f)>1||Math.abs(u-m)>1){d=n?mr(n,!0):[];for(let h of d)$n(h,n,{block:"center",inline:"center"});for(let h of mr(t,!0))$n(h,t)}}else{let{left:c,top:u}=t.getBoundingClientRect();(r=t==null?void 0:t.scrollIntoView)==null||r.call(t,{block:"nearest"});let{left:d,top:f}=t.getBoundingClientRect();(Math.abs(c-d)>1||Math.abs(u-f)>1)&&((o=n==null?void 0:n.scrollIntoView)==null||o.call(n,{block:"center",inline:"center"}),(i=t.scrollIntoView)==null||i.call(t,{block:"nearest"}))}}}function Ar(t){return t.pointerType===""&&t.isTrusted?!0:yo()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function vd(t){return!yo()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function xd(t,e,n){let r=Pe(o=>{n&&!o.defaultPrevented&&n(e)});s.useEffect(()=>{var i;let o=(i=t==null?void 0:t.current)==null?void 0:i.form;return o==null||o.addEventListener("reset",r),()=>{o==null||o.removeEventListener("reset",r)}},[t])}function xo(t,e=!0){let[n,r]=s.useState(!0),o=n&&e;return J(()=>{if(o&&t.current&&"getAnimations"in t.current)for(let i of t.current.getAnimations())i instanceof CSSTransition&&i.cancel()},[t,o]),Ql(t,o,s.useCallback(()=>r(!1),[])),o}function Or(t,e){let[n,r]=s.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let o=n==="exiting";return Ql(t,o,s.useCallback(()=>{r(i=>i==="exiting"?"closed":i)},[])),o}function Ql(t,e,n){J(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let o=!1;return Promise.allSettled(r.map(i=>i.finished)).then(()=>{o||Zt.flushSync(()=>{n()})}),()=>{o=!0}}},[t,e,n])}const $d=typeof Element<"u"&&"checkVisibility"in Element.prototype;function wd(t){const e=fe(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,o=n!=="none"&&r!=="hidden"&&r!=="collapse";if(o){const{getComputedStyle:i}=t.ownerDocument.defaultView;let{display:l,visibility:a}=i(t);o=l!=="none"&&a!=="hidden"&&a!=="collapse"}return o}function Ed(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function $o(t,e){return $d?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):t.nodeName!=="#comment"&&wd(t)&&Ed(t,e)&&(!t.parentElement||$o(t.parentElement,t))}const wo=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],Sd=wo.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";wo.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Cd=wo.join(':not([hidden]):not([tabindex="-1"]),');function Eo(t,e){return t.matches(Sd)&&!ts(t)&&((e==null?void 0:e.skipVisibilityCheck)||$o(t))}function es(t){return t.matches(Cd)&&$o(t)&&!ts(t)}function ts(t){let e=t;for(;e!=null;){if(e instanceof e.ownerDocument.defaultView.HTMLElement&&e.inert)return!0;e=e.parentElement}return!1}function mi(t){let e=t==null?void 0:t.defaultView;return(e==null?void 0:e.__webpack_nonce__)||globalThis.__webpack_nonce__||void 0}let yr=new WeakMap;function ns(t){let e=t??(typeof document<"u"?document:void 0);if(!e)return mi(e);if(yr.has(e))return yr.get(e);let n=e.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof fe(n).HTMLMetaElement&&(n.nonce||n.content)||mi(e)||void 0;return r!==void 0&&yr.set(e,r),r}function Pd(t,e,n){const{render:r,...o}=e,i=s.useRef(null),l=s.useMemo(()=>ct(n,i),[n,i]);J(()=>{var c;typeof process<"u"&&((c=process.env)==null?void 0:c.NODE_ENV)!=="production"&&r&&(i.current||console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?"))},[t,r]);const a={...o,ref:l};return r?r(a,void 0):p.jsx(t,{...a})}const bi={},oe=new Proxy({},{get(t,e){if(typeof e!="string")return;let n=bi[e];return n||(n=s.forwardRef(Pd.bind(null,e)),bi[e]=n),n}});var kd=/\s+/g,Td=t=>typeof t!="string"||!t?t:t.replace(kd," ").trim(),zt=(...t)=>{const e=[],n=r=>{if(!r&&r!==0&&r!==0n)return;if(Array.isArray(r)){for(let i=0,l=r.length;i<l;i++)n(r[i]);return}const o=typeof r;if(o==="string"||o==="number"||o==="bigint"){if(o==="number"&&r!==r)return;e.push(String(r))}else if(o==="object"){const i=Object.keys(r);for(let l=0,a=i.length;l<a;l++){const c=i[l];r[c]&&e.push(c)}}};for(let r=0,o=t.length;r<o;r++){const i=t[r];i!=null&&n(i)}return e.length>0?Td(e.join(" ")):void 0},gi=t=>t===!1?"false":t===!0?"true":t===0?"0":t,ge=t=>{if(!t||typeof t!="object")return!0;for(const e in t)return!1;return!0},Md=(t,e)=>{if(t===e)return!0;if(!t||!e)return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){const i=n[o];if(!r.includes(i)||t[i]!==e[i])return!1}return!0},Rd=(t,e)=>{for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const r=e[n];n in t?t[n]=zt(t[n],r):t[n]=r}return t},rs=(t,e)=>{for(let n=0;n<t.length;n++){const r=t[n];Array.isArray(r)?rs(r,e):r&&e.push(r)}},os=(...t)=>{const e=[];rs(t,e);const n=[];for(let r=0;r<e.length;r++)e[r]&&n.push(e[r]);return n},Fr=(t,e)=>{const n={};for(const r in t){const o=t[r];if(r in e){const i=e[r];Array.isArray(o)||Array.isArray(i)?n[r]=os(i,o):typeof o=="object"&&typeof i=="object"&&o&&i?n[r]=Fr(o,i):n[r]=i+" "+o}else n[r]=o}for(const r in e)r in t||(n[r]=e[r]);return n},Dd={twMerge:!0,twMergeConfig:{}};function Id(){let t=null,e={},n=!1;return{get cachedTwMerge(){return t},set cachedTwMerge(r){t=r},get cachedTwMergeConfig(){return e},set cachedTwMergeConfig(r){e=r},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(r){n=r},reset(){t=null,e={},n=!1}}}var Ke=Id(),Nd=t=>{const e=(r,o)=>{const{extend:i=null,slots:l={},variants:a={},compoundVariants:c=[],compoundSlots:u=[],defaultVariants:d={}}=r,f={...Dd,...o},m=i!=null&&i.base?zt(i.base,r==null?void 0:r.base):r==null?void 0:r.base,h=i!=null&&i.variants&&!ge(i.variants)?Fr(a,i.variants):a,g=i!=null&&i.defaultVariants&&!ge(i.defaultVariants)?{...i.defaultVariants,...d}:d;!ge(f.twMergeConfig)&&!Md(f.twMergeConfig,Ke.cachedTwMergeConfig)&&(Ke.didTwMergeConfigChange=!0,Ke.cachedTwMergeConfig=f.twMergeConfig);const y=ge(i==null?void 0:i.slots),v=ge(l)?{}:{base:zt(r==null?void 0:r.base,y&&(i==null?void 0:i.base)),...l},w=y?v:Rd({...i==null?void 0:i.slots},ge(v)?{base:r==null?void 0:r.base}:v),x=ge(i==null?void 0:i.compoundVariants)?c:os(i==null?void 0:i.compoundVariants,c),M=L=>{if(ge(h)&&ge(l)&&y)return t(m,L==null?void 0:L.class,L==null?void 0:L.className)(f);if(x&&!Array.isArray(x))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof x}`);if(u&&!Array.isArray(u))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof u}`);const j=(b,P=h,N=null,k=null)=>{const D=P[b];if(!D||ge(D))return null;const $=(k==null?void 0:k[b])??(L==null?void 0:L[b]);if($===null)return null;const T=gi($);if(typeof T=="object")return null;const A=g==null?void 0:g[b],G=T??gi(A);return D[G||"false"]},E=()=>{if(!h)return null;const b=Object.keys(h),P=[];for(let N=0;N<b.length;N++){const k=j(b[N],h);k&&P.push(k)}return P},S=(b,P)=>{if(!h||typeof h!="object")return null;const N=[];for(const k in h){const D=j(k,h,b,P),$=b==="base"&&typeof D=="string"?D:D&&D[b];$&&N.push($)}return N},I={};for(const b in L){const P=L[b];P!==void 0&&(I[b]=P)}const C=(b,P)=>{var k;const N=typeof(L==null?void 0:L[b])=="object"?{[b]:(k=L[b])==null?void 0:k.initial}:{};return{...g,...I,...N,...P}},K=(b=[],P)=>{const N=[],k=b.length;for(let D=0;D<k;D++){const{class:$,className:T,...A}=b[D];let G=!0;const W=C(null,P);for(const q in A){const ee=A[q],le=W[q];if(Array.isArray(ee)){if(!ee.includes(le)){G=!1;break}}else{if((ee==null||ee===!1)&&(le==null||le===!1))continue;if(le!==ee){G=!1;break}}}G&&($&&N.push($),T&&N.push(T))}return N},_=b=>{const P=K(x,b);if(!Array.isArray(P))return P;const N={},k=t;for(let D=0;D<P.length;D++){const $=P[D];if(typeof $=="string")N.base=k(N.base,$)(f);else if(typeof $=="object")for(const T in $)N[T]=k(N[T],$[T])(f)}return N},O=b=>{if(u.length<1)return null;const P={},N=C(null,b);for(let k=0;k<u.length;k++){const{slots:D=[],class:$,className:T,...A}=u[k];if(!ge(A)){let G=!0;for(const W in A){const q=N[W],ee=A[W];if(q===void 0||(Array.isArray(ee)?!ee.includes(q):ee!==q)){G=!1;break}}if(!G)continue}for(let G=0;G<D.length;G++){const W=D[G];P[W]||(P[W]=[]),P[W].push([$,T])}}return P};if(!ge(l)||!y){const b={};if(typeof w=="object"&&!ge(w)){const P=t;for(const N in w)b[N]=k=>{const D=_(k),$=O(k);return P(w[N],S(N,k),D?D[N]:void 0,$?$[N]:void 0,k==null?void 0:k.class,k==null?void 0:k.className)(f)}}return b}return t(m,E(),K(x),L==null?void 0:L.class,L==null?void 0:L.className)(f)},R=()=>{if(!(!h||typeof h!="object"))return Object.keys(h)};return M.variantKeys=R(),M.extend=i,M.base=m,M.slots=w,M.variants=h,M.defaultVariants=g,M.compoundSlots=u,M.compoundVariants=x,M};return{tv:e,createTV:r=>(o,i)=>e(o,i?Fr(r,i):r)}};const Ld=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},Kd=(t,e)=>({classGroupId:t,validator:e}),is=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Mn="-",yi=[],Ad="arbitrary..",Od=t=>{const e=jd(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Fd(l);const a=l.split(Mn),c=a[0]===""&&a.length>1?1:0;return ls(a,c,e)},getConflictingClassGroupIds:(l,a)=>{if(a){const c=r[l],u=n[l];return c?u?Ld(u,c):c:u||yi}return n[l]||yi}}},ls=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],i=n.nextPart.get(o);if(i){const u=ls(t,e+1,i);if(u)return u}const l=n.validators;if(l===null)return;const a=e===0?t.join(Mn):t.slice(e).join(Mn),c=l.length;for(let u=0;u<c;u++){const d=l[u];if(d.validator(a))return d.classGroupId}},Fd=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?Ad+r:void 0})(),jd=t=>{const{theme:e,classGroups:n}=t;return _d(n,e)},_d=(t,e)=>{const n=is();for(const r in t){const o=t[r];So(o,n,r,e)}return n},So=(t,e,n,r)=>{const o=t.length;for(let i=0;i<o;i++){const l=t[i];Bd(l,e,n,r)}},Bd=(t,e,n,r)=>{if(typeof t=="string"){Vd(t,e,n);return}if(typeof t=="function"){zd(t,e,n,r);return}Hd(t,e,n,r)},Vd=(t,e,n)=>{const r=t===""?e:ss(e,t);r.classGroupId=n},zd=(t,e,n,r)=>{if(Gd(t)){So(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(Kd(n,t))},Hd=(t,e,n,r)=>{const o=Object.entries(t),i=o.length;for(let l=0;l<i;l++){const[a,c]=o[l];So(c,ss(e,a),n,r)}},ss=(t,e)=>{let n=t;const r=e.split(Mn),o=r.length;for(let i=0;i<o;i++){const l=r[i];let a=n.nextPart.get(l);a||(a=is(),n.nextPart.set(l,a)),n=a}return n},Gd=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Ud=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const o=(i,l)=>{n[i]=l,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return o(i,l),l},set(i,l){i in n?n[i]=l:o(i,l)}}},jr="!",vi=":",Wd=[],xi=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),qd=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=o=>{const i=[];let l=0,a=0,c=0,u;const d=o.length;for(let y=0;y<d;y++){const v=o[y];if(l===0&&a===0){if(v===vi){i.push(o.slice(c,y)),c=y+1;continue}if(v==="/"){u=y;continue}}v==="["?l++:v==="]"?l--:v==="("?a++:v===")"&&a--}const f=i.length===0?o:o.slice(c);let m=f,h=!1;f.endsWith(jr)?(m=f.slice(0,-1),h=!0):f.startsWith(jr)&&(m=f.slice(1),h=!0);const g=u&&u>c?u-c:void 0;return xi(i,h,m,g)};if(e){const o=e+vi,i=r;r=l=>l.startsWith(o)?i(l.slice(o.length)):xi(Wd,!1,l,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Yd=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const l=n[i],a=l[0]==="[",c=e.has(l);a||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},Xd=t=>({cache:Ud(t.cacheSize),parseClassName:qd(t),sortModifiers:Yd(t),...Od(t)}),Zd=/\s+/,Jd=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=e,l=[],a=t.trim().split(Zd);let c="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:f,modifiers:m,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:y}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let v=!!y,w=r(v?g.substring(0,y):g);if(!w){if(!v){c=d+(c.length>0?" "+c:c);continue}if(w=r(g),!w){c=d+(c.length>0?" "+c:c);continue}v=!1}const x=m.length===0?"":m.length===1?m[0]:i(m).join(":"),M=h?x+jr:x,R=M+w;if(l.indexOf(R)>-1)continue;l.push(R);const L=o(w,v);for(let j=0;j<L.length;++j){const E=L[j];l.push(M+E)}c=d+(c.length>0?" "+c:c)}return c},Qd=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=as(n))&&(o&&(o+=" "),o+=r);return o},as=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=as(t[r]))&&(n&&(n+=" "),n+=e);return n},_r=(t,...e)=>{let n,r,o,i;const l=c=>{const u=e.reduce((d,f)=>f(d),t());return n=Xd(u),r=n.cache.get,o=n.cache.set,i=a,a(c)},a=c=>{const u=r(c);if(u)return u;const d=Jd(c,n);return o(c,d),d};return i=l,(...c)=>i(Qd(...c))},ef=[],ue=t=>{const e=n=>n[t]||ef;return e.isThemeGetter=!0,e},cs=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,us=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tf=/^\d+\/\d+$/,nf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rf=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,of=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,dt=t=>tf.test(t),X=t=>!!t&&!Number.isNaN(Number(t)),He=t=>!!t&&Number.isInteger(Number(t)),vr=t=>t.endsWith("%")&&X(t.slice(0,-1)),Le=t=>nf.test(t),af=()=>!0,cf=t=>rf.test(t)&&!of.test(t),ds=()=>!1,uf=t=>lf.test(t),df=t=>sf.test(t),ff=t=>!B(t)&&!V(t),pf=t=>Et(t,hs,ds),B=t=>cs.test(t),tt=t=>Et(t,ms,cf),xr=t=>Et(t,yf,X),$i=t=>Et(t,fs,ds),hf=t=>Et(t,ps,df),sn=t=>Et(t,bs,uf),V=t=>us.test(t),Mt=t=>St(t,ms),mf=t=>St(t,vf),wi=t=>St(t,fs),bf=t=>St(t,hs),gf=t=>St(t,ps),an=t=>St(t,bs,!0),Et=(t,e,n)=>{const r=cs.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},St=(t,e,n=!1)=>{const r=us.exec(t);return r?r[1]?e(r[1]):n:!1},fs=t=>t==="position"||t==="percentage",ps=t=>t==="image"||t==="url",hs=t=>t==="length"||t==="size"||t==="bg-size",ms=t=>t==="length",yf=t=>t==="number",vf=t=>t==="family-name",bs=t=>t==="shadow",Br=()=>{const t=ue("color"),e=ue("font"),n=ue("text"),r=ue("font-weight"),o=ue("tracking"),i=ue("leading"),l=ue("breakpoint"),a=ue("container"),c=ue("spacing"),u=ue("radius"),d=ue("shadow"),f=ue("inset-shadow"),m=ue("text-shadow"),h=ue("drop-shadow"),g=ue("blur"),y=ue("perspective"),v=ue("aspect"),w=ue("ease"),x=ue("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...R(),V,B],j=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],S=()=>[V,B,c],I=()=>[dt,"full","auto",...S()],C=()=>[He,"none","subgrid",V,B],K=()=>["auto",{span:["full",He,V,B]},He,V,B],_=()=>[He,"auto",V,B],O=()=>["auto","min","max","fr",V,B],b=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...S()],k=()=>[dt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],D=()=>[t,V,B],$=()=>[...R(),wi,$i,{position:[V,B]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",bf,pf,{size:[V,B]}],G=()=>[vr,Mt,tt],W=()=>["","none","full",u,V,B],q=()=>["",X,Mt,tt],ee=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[X,vr,wi,$i],me=()=>["","none",g,V,B],Ne=()=>["none",X,V,B],z=()=>["none",X,V,B],$e=()=>[X,V,B],be=()=>[dt,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Le],breakpoint:[Le],color:[af],container:[Le],"drop-shadow":[Le],ease:["in","out","in-out"],font:[ff],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Le],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Le],shadow:[Le],spacing:["px",X],text:[Le],"text-shadow":[Le],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",dt,B,V,v]}],container:["container"],columns:[{columns:[X,B,V,a]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[He,"auto",V,B]}],basis:[{basis:[dt,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[X,dt,"auto","initial","none",B]}],grow:[{grow:["",X,V,B]}],shrink:[{shrink:["",X,V,B]}],order:[{order:[He,"first","last","none",V,B]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...b(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...b()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":b()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:k()}],w:[{w:[a,"screen",...k()]}],"min-w":[{"min-w":[a,"screen","none",...k()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[l]},...k()]}],h:[{h:["screen","lh",...k()]}],"min-h":[{"min-h":["screen","lh","none",...k()]}],"max-h":[{"max-h":["screen","lh",...k()]}],"font-size":[{text:["base",n,Mt,tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,V,xr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vr,B]}],"font-family":[{font:[mf,B,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,V,B]}],"line-clamp":[{"line-clamp":[X,"none",V,xr]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",V,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",V,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[X,"from-font","auto",V,tt]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[X,"auto",V,B]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",V,B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",V,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},He,V,B],radial:["",V,B],conic:[He,V,B]},gf,hf]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[X,V,B]}],"outline-w":[{outline:["",X,Mt,tt]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",d,an,sn]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",f,an,sn]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[X,tt]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",m,an,sn]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[X,V,B]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[X]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[V,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[X]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",V,B]}],filter:[{filter:["","none",V,B]}],blur:[{blur:me()}],brightness:[{brightness:[X,V,B]}],contrast:[{contrast:[X,V,B]}],"drop-shadow":[{"drop-shadow":["","none",h,an,sn]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",X,V,B]}],"hue-rotate":[{"hue-rotate":[X,V,B]}],invert:[{invert:["",X,V,B]}],saturate:[{saturate:[X,V,B]}],sepia:[{sepia:["",X,V,B]}],"backdrop-filter":[{"backdrop-filter":["","none",V,B]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[X,V,B]}],"backdrop-contrast":[{"backdrop-contrast":[X,V,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",X,V,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,V,B]}],"backdrop-invert":[{"backdrop-invert":["",X,V,B]}],"backdrop-opacity":[{"backdrop-opacity":[X,V,B]}],"backdrop-saturate":[{"backdrop-saturate":[X,V,B]}],"backdrop-sepia":[{"backdrop-sepia":["",X,V,B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",V,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[X,"initial",V,B]}],ease:[{ease:["linear","initial",w,V,B]}],delay:[{delay:[X,V,B]}],animate:[{animate:["none",x,V,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,V,B]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:Ne()}],"rotate-x":[{"rotate-x":Ne()}],"rotate-y":[{"rotate-y":Ne()}],"rotate-z":[{"rotate-z":Ne()}],scale:[{scale:z()}],"scale-x":[{"scale-x":z()}],"scale-y":[{"scale-y":z()}],"scale-z":[{"scale-z":z()}],"scale-3d":["scale-3d"],skew:[{skew:$e()}],"skew-x":[{"skew-x":$e()}],"skew-y":[{"skew-y":$e()}],transform:[{transform:[V,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",V,B]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",V,B]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[X,Mt,tt,xr]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},xf=(t,{cacheSize:e,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>(Kt(t,"cacheSize",e),Kt(t,"prefix",n),Kt(t,"experimentalParseClassName",r),cn(t.theme,i.theme),cn(t.classGroups,i.classGroups),cn(t.conflictingClassGroups,i.conflictingClassGroups),cn(t.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Kt(t,"orderSensitiveModifiers",i.orderSensitiveModifiers),un(t.theme,o.theme),un(t.classGroups,o.classGroups),un(t.conflictingClassGroups,o.conflictingClassGroups),un(t.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),gs(t,o,"orderSensitiveModifiers"),t),Kt=(t,e,n)=>{n!==void 0&&(t[e]=n)},cn=(t,e)=>{if(e)for(const n in e)Kt(t,n,e[n])},un=(t,e)=>{if(e)for(const n in e)gs(t,e,n)},gs=(t,e,n)=>{const r=e[n];r!==void 0&&(t[n]=t[n]?t[n].concat(r):r)},$f=(t,...e)=>typeof t=="function"?_r(Br,t,...e):_r(()=>xf(Br(),t),...e),wf=_r(Br);var Ef=t=>ge(t)?wf:$f({...t,extend:{theme:t.theme,classGroups:t.classGroups,conflictingClassGroupModifiers:t.conflictingClassGroupModifiers,conflictingClassGroups:t.conflictingClassGroups,...t.extend}}),ys=(t,e)=>{const n=zt(t);return!n||!((e==null?void 0:e.twMerge)??!0)?n:((!Ke.cachedTwMerge||Ke.didTwMergeConfigChange)&&(Ke.didTwMergeConfigChange=!1,Ke.cachedTwMerge=Ef(Ke.cachedTwMergeConfig)),Ke.cachedTwMerge(n)||void 0)},U=(...t)=>ys(t,{}),Sf=(...t)=>e=>ys(t,e),{tv:xe}=Nd(Sf);const Cf=xe({defaultVariants:{status:"default"},slots:{base:"alert",content:"alert__content",description:"alert__description",indicator:"alert__indicator",title:"alert__title"},variants:{status:{accent:{base:"alert--accent"},danger:{base:"alert--danger"},default:{base:"alert--default"},success:{base:"alert--success"},warning:{base:"alert--warning"}}}}),qe=xe({base:"button",defaultVariants:{fullWidth:!1,isIconOnly:!1,size:"md",variant:"primary"},variants:{fullWidth:{false:"",true:"button--full-width"},isIconOnly:{true:"button--icon-only"},size:{lg:"button--lg",md:"button--md",sm:"button--sm"},variant:{danger:"button--danger","danger-soft":"button--danger-soft",ghost:"button--ghost",outline:"button--outline",primary:"button--primary",secondary:"button--secondary",tertiary:"button--tertiary"}}}),Co=xe({defaultVariants:{fullWidth:!1,orientation:"horizontal"},slots:{base:"button-group",separator:"button-group__separator"},variants:{fullWidth:{false:{},true:{base:"button-group--full-width"}},orientation:{horizontal:{base:"button-group--horizontal"},vertical:{base:"button-group--vertical"}}}}),Pf=xe({defaultVariants:{variant:"default"},slots:{base:"card",content:"card__content",description:"card__description",footer:"card__footer",header:"card__header",title:"card__title"},variants:{variant:{default:{base:"card--default"},secondary:{base:"card--secondary"},tertiary:{base:"card--tertiary"},transparent:{base:"card--transparent"}}}}),kf=xe({defaultVariants:{variant:"primary"},slots:{base:"checkbox",content:"checkbox__content",control:"checkbox__control",indicator:"checkbox__indicator"},variants:{variant:{primary:{base:"checkbox--primary"},secondary:{base:"checkbox--secondary"}}}}),Tf=xe({defaultVariants:{color:"default",variant:"secondary"},slots:{base:"chip",label:"chip__label"},variants:{color:{accent:{base:"chip--accent"},danger:{base:"chip--danger"},default:{base:"chip--default"},success:{base:"chip--success"},warning:{base:"chip--warning"}},size:{lg:{base:"chip--lg"},md:{base:"chip--md"},sm:{base:"chip--sm"}},variant:{primary:{base:"chip--primary"},secondary:{base:"chip--secondary"},soft:{base:"chip--soft"},tertiary:{base:"chip--tertiary"}}}}),Mf=xe({base:"close-button",defaultVariants:{variant:"default"},variants:{variant:{default:"close-button--default"}}}),Rf=xe({slots:{menu:"dropdown__menu",popover:"dropdown__popover",root:"dropdown",trigger:"dropdown__trigger"}}),Df=xe({slots:{base:"link",icon:"link__icon"}}),If=xe({defaultVariants:{color:"accent",size:"md"},slots:{base:"progress-bar",fill:"progress-bar__fill",output:"progress-bar__output",track:"progress-bar__track"},variants:{color:{accent:{base:"progress-bar--accent"},danger:{base:"progress-bar--danger"},default:{base:"progress-bar--default"},success:{base:"progress-bar--success"},warning:{base:"progress-bar--warning"}},size:{lg:{base:"progress-bar--lg"},md:{base:"progress-bar--md"},sm:{base:"progress-bar--sm"}}}}),Nf=xe({defaultVariants:{variant:"default"},slots:{indicator:"menu-item__indicator",item:"menu-item",submenuIndicator:"menu-item__indicator menu-item__indicator--submenu"},variants:{variant:{danger:{item:"menu-item--danger"},default:{item:"menu-item--default"}}}}),Lf=xe({base:"menu-section"}),Po=xe({defaultVariants:{scroll:"inside",size:"md",variant:"opaque"},slots:{backdrop:"modal__backdrop",body:"modal__body",closeTrigger:"modal__close-trigger",container:"modal__container",dialog:"modal__dialog",footer:"modal__footer",header:"modal__header",heading:"modal__heading",icon:"modal__icon",trigger:"modal__trigger"},variants:{scroll:{inside:{body:"modal__body--scroll-inside",dialog:"modal__dialog--scroll-inside"},outside:{body:"modal__body--scroll-outside",container:"modal__container--scroll-outside",dialog:"modal__dialog--scroll-outside"}},size:{cover:{dialog:"modal__dialog--cover"},full:{container:"modal__container--full",dialog:"modal__dialog--full"},lg:{dialog:"modal__dialog--lg"},md:{dialog:"modal__dialog--md"},sm:{dialog:"modal__dialog--sm"},xs:{dialog:"modal__dialog--xs"}},variant:{blur:{backdrop:"modal__backdrop--blur"},opaque:{backdrop:"modal__backdrop--opaque"},transparent:{backdrop:"modal__backdrop--transparent"}}}}),Kf=xe({base:"separator",defaultVariants:{orientation:"horizontal",variant:"default"},variants:{orientation:{horizontal:"separator--horizontal",vertical:"separator--vertical"},variant:{default:"separator--default",secondary:"separator--secondary",tertiary:"separator--tertiary"}}}),Rn=Symbol("default");function ze({values:t,children:e}){for(let[n,r]of t)e=s.createElement(n.Provider,{value:r},e);return e}function Te(t){let{className:e,style:n,children:r,defaultClassName:o,defaultChildren:i,defaultStyle:l,values:a,render:c}=t;return s.useMemo(()=>{let u,d,f;return typeof e=="function"?u=e({...a,defaultClassName:o}):u=e,typeof n=="function"?d=n({...a,defaultStyle:l||{}}):d=n,typeof r=="function"?f=r({...a,defaultChildren:i}):r==null?f=i:f=r,{className:u??o,style:d||l?{...l,...d}:void 0,children:f??i,"data-rac":"",render:c?m=>c(m,a):void 0}},[e,n,r,o,i,l,a,c])}function Af(t,e){return n=>e(typeof t=="function"?t(n):t,n)}function en(t,e){let n=s.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=e||Rn;if(!n.slots[r]){let o=new Intl.ListFormat().format(Object.keys(n.slots).map(l=>`"${l}"`)),i=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${i} Valid slot names are ${o}.`)}return n.slots[r]}return n}function Me(t,e,n){let r=en(n,t.slot)||{},{ref:o,...i}=r,l=Je(s.useMemo(()=>ct(e,o),[e,o])),a=Y(i,t);return"style"in i&&i.style&&"style"in t&&t.style&&(typeof i.style=="function"||typeof t.style=="function"?a.style=c=>{let u=typeof i.style=="function"?i.style(c):i.style,d={...c.defaultStyle,...u},f=typeof t.style=="function"?t.style({...c,defaultStyle:d}):t.style;return{...d,...f}}:a.style={...i.style,...t.style}),[a,l]}function vs(t=!0){let[e,n]=s.useState(t),r=s.useRef(!1),o=s.useCallback(i=>{r.current=!0,n(!!i)},[]);return J(()=>{r.current||n(!1)},[]),[o,e]}function Of(t){const e=/^(data-.*)$/;let n={};for(const r in t)e.test(r)||(n[r]=t[r]);return n}function Ff(t,e,n){let{render:r,...o}=e,i=s.useRef(null),l=s.useMemo(()=>ct(n,i),[n,i]);J(()=>{process.env.NODE_ENV!=="production"&&r&&(i.current?i.current.localName!==t&&console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${t}>, got <${i.current.localName}>. This may break the component behavior and accessibility.`):console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?"))},[t,r]);let a={...o,ref:l};return r?r(a,void 0):s.createElement(t,a)}const Ei={},he=new Proxy({},{get(t,e){if(typeof e!="string")return;let n=Ei[e];return n||(n=s.forwardRef(Ff.bind(null,e)),Ei[e]=n),n}});typeof HTMLTemplateElement<"u"&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.appendChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.removeChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(t,e){return this.content.insertBefore(t,e)}}));const Dn=s.createContext(!1);function jf(t){if(s.useContext(Dn))return s.createElement(s.Fragment,null,t.children);let n=s.createElement(Dn.Provider,{value:!0},t.children);return s.createElement("template",null,n)}function _f(t){let e=(n,r)=>s.useContext(Dn)?null:t(n,r);return e.displayName=t.displayName||t.name,s.forwardRef(e)}function xs(){return s.useContext(Dn)}const Bf=s.createContext({});function Vf(t){let{id:e,label:n,"aria-labelledby":r,"aria-label":o,labelElementType:i="label"}=t;e=pe(e);let l=pe(),a={};n?(r=r?`${l} ${r}`:l,a={id:l,htmlFor:i==="label"?e:void 0}):!r&&!o&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let c=Zl({id:e,"aria-label":o,"aria-labelledby":r});return{labelProps:a,fieldProps:c}}const zf=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Hf=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Gf(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return zf.has(n.script)}let e=t.split("-")[0];return Hf.has(e)}const $s=Symbol.for("react-aria.i18n.locale");function ws(){let t=typeof window<"u"&&window[$s]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:Gf(t)?"rtl":"ltr"}}let Vr=ws(),At=new Set;function Si(){Vr=ws();for(let t of At)t(Vr)}function Uf(){let t=Ze(),[e,n]=s.useState(Vr);return s.useEffect(()=>(At.size===0&&window.addEventListener("languagechange",Si),At.add(n),()=>{At.delete(n),At.size===0&&window.removeEventListener("languagechange",Si)}),[]),t?{locale:typeof window<"u"&&window[$s]||"en-US",direction:"ltr"}:e}const Wf=s.createContext(null);function ut(){let t=Uf();return s.useContext(Wf)||t}let $r=new Map,zr=!1;try{zr=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let In=!1;try{In=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Es={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class qf{constructor(e,n={}){this.numberFormatter=Yf(e,n),this.options=n}format(e){var r;let n="";if(!zr&&this.options.signDisplay!=null?n=Xf(this.numberFormatter,this.options.signDisplay,e):n=this.numberFormatter.format(e),this.options.style==="unit"&&!In){let{unit:o,unitDisplay:i="short",locale:l}=this.resolvedOptions();if(!o)return n;let a=(r=Es[o])==null?void 0:r[i];n+=a[l]||a.default}return n}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,n);if(n<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(n)}`}formatRangeToParts(e,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,n);if(n<e)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),o=this.numberFormatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!zr&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!In&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}}function Yf(t,e={}){var i;let{numberingSystem:n}=e;if(n&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${n}`),e.style==="unit"&&!In){let{unit:l,unitDisplay:a="short"}=e;if(!l)throw new Error('unit option must be provided with style: "unit"');if(!((i=Es[l])!=null&&i[a]))throw new Error(`Unsupported unit ${l} with unitDisplay = ${a}`);e={...e,style:"decimal"}}let r=t+(e?Object.entries(e).sort((l,a)=>l[0]<a[0]?-1:1).join():"");if($r.has(r))return $r.get(r);let o=new Intl.NumberFormat(t,e);return $r.set(r,o),o}function Xf(t,e,n){if(e==="auto")return t.format(n);if(e==="never")return t.format(Math.abs(n));{let r=!1;if(e==="always"?r=n>0||Object.is(n,0):e==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let o=t.format(-n),i=t.format(n),l=o.replace(i,"").replace(/\u200e|\u061C/,"");return[...l].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),o.replace(i,"!!!").replace(l,"+").replace("!!!",i)}else return t.format(n)}}function Zf(t={}){let{locale:e}=ut();return s.useMemo(()=>new qf(e,t),[e,t])}function Nn(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}function Jf(t){let{value:e=0,minValue:n=0,maxValue:r=100,valueLabel:o,isIndeterminate:i,formatOptions:l={style:"percent"}}=t,a=ae(t,{labelable:!0}),{labelProps:c,fieldProps:u}=Vf({...t,labelElementType:"span"});e=Nn(e,n,r);let d=(e-n)/(r-n),f=Zf(l);if(!i&&!o){let m=l.style==="percent"?d:e;o=f.format(m)}return{progressBarProps:Y(a,{...u,"aria-valuenow":i?void 0:e,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":i?void 0:o,role:"progressbar"}),labelProps:c}}function Qf(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const Ss=s.createContext(null),ep=s.forwardRef(function(e,n){[e,n]=Me(e,n,Ss);let{value:r=0,minValue:o=0,maxValue:i=100,isIndeterminate:l=!1}=e;r=Qf(r,o,i);let[a,c]=vs(!e["aria-label"]&&!e["aria-labelledby"]),{progressBarProps:u,labelProps:d}=Jf({...e,label:c}),f=l?void 0:(r-o)/(i-o)*100,m=Te({...e,defaultClassName:"react-aria-ProgressBar",values:{percentage:f,valueText:u["aria-valuetext"],isIndeterminate:l}}),h=ae(e,{global:!0});return s.createElement(he.div,{...Y(h,m,u),ref:n,slot:e.slot||void 0},s.createElement(Bf.Provider,{value:{...d,ref:a,elementType:"span"}},m.children))}),Cs=7e3;let De=null;function Ci(t,e="assertive",n=Cs){De?De.announce(t,e,n):(De=new tp,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?De.announce(t,e,n):setTimeout(()=>{De!=null&&De.isAttached()&&(De==null||De.announce(t,e,n))},100))}class tp{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){var e;return(e=this.node)==null?void 0:e.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",r=Cs){var i,l;if(!this.node)return;let o=document.createElement("div");typeof e=="object"?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,n==="assertive"?(i=this.assertiveLog)==null||i.appendChild(o):(l=this.politeLog)==null||l.appendChild(o),e!==""&&setTimeout(()=>{o.remove()},r)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}}function ko(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function Ps(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function ks(t){let e=s.useRef({isFocused:!1,observer:null});return J(()=>{const n=e.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),s.useCallback(n=>{let r=F(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){e.current.isFocused=!0;let o=r,i=l=>{if(e.current.isFocused=!1,o.disabled){let a=ko(l);t==null||t(a)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver(()=>{var l;if(e.current.isFocused&&o.disabled){(l=e.current.observer)==null||l.disconnect();let a=o===ne()?null:ne();o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let Ln=!1;function Pi(t){for(;t&&!Eo(t,{skipVisibilityCheck:!0});)t=t.parentElement;let e=fe(t),n=e.document.activeElement;if(!n||n===t)return;Ln=!0;let r=!1,o=d=>{(F(d)===n||r)&&d.stopImmediatePropagation()},i=d=>{(F(d)===n||r)&&(d.stopImmediatePropagation(),!t&&!r&&(r=!0,de(n),c()))},l=d=>{(F(d)===t||r)&&d.stopImmediatePropagation()},a=d=>{(F(d)===t||r)&&(d.stopImmediatePropagation(),r||(r=!0,de(n),c()))};e.addEventListener("blur",o,!0),e.addEventListener("focusout",i,!0),e.addEventListener("focusin",a,!0),e.addEventListener("focus",l,!0);let c=()=>{cancelAnimationFrame(u),e.removeEventListener("blur",o,!0),e.removeEventListener("focusout",i,!0),e.removeEventListener("focusin",a,!0),e.removeEventListener("focus",l,!0),Ln=!1,r=!1},u=requestAnimationFrame(c);return c}let Be=null;const Ht=new Set;let Bt=new Map,at=!1,Hr=!1;const np={Tab:!0,Escape:!0};function Xn(t,e){for(let n of Ht)n(t,e)}function rp(t){return!(t.metaKey||!it()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Kn(t){at=!0,!_e.isOpening&&rp(t)&&(Be="keyboard",Xn("keyboard",t))}function Se(t){Be="pointer","pointerType"in t&&t.pointerType,(t.type==="mousedown"||t.type==="pointerdown")&&(at=!0,Xn("pointer",t))}function Ts(t){!_e.isOpening&&Ar(t)&&(at=!0,Be="virtual")}function Ms(t){let e=fe(F(t)),n=Q(F(t));F(t)===e||F(t)===n||Ln||!t.isTrusted||(!at&&!Hr&&(Be="virtual",Xn("virtual",t)),at=!1,Hr=!1)}function Rs(){Ln||(at=!1,Hr=!0)}function An(t){if(typeof window>"u"||typeof document>"u")return;const e=fe(t),n=Q(t);if(Bt.get(e))return;let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){at=!0,r.apply(this,arguments)},n.addEventListener("keydown",Kn,!0),n.addEventListener("keyup",Kn,!0),n.addEventListener("click",Ts,!0),e.addEventListener("focus",Ms,!0),e.addEventListener("blur",Rs,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Se,!0),n.addEventListener("pointermove",Se,!0),n.addEventListener("pointerup",Se,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Se,!0),n.addEventListener("mousemove",Se,!0),n.addEventListener("mouseup",Se,!0)),e.addEventListener("beforeunload",()=>{Ds(t)},{once:!0}),Bt.set(e,{focus:r})}const Ds=(t,e)=>{const n=fe(t),r=Q(t);e&&r.removeEventListener("DOMContentLoaded",e),Bt.has(n)&&(n.HTMLElement.prototype.focus=Bt.get(n).focus,r.removeEventListener("keydown",Kn,!0),r.removeEventListener("keyup",Kn,!0),r.removeEventListener("click",Ts,!0),n.removeEventListener("focus",Ms,!0),n.removeEventListener("blur",Rs,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Se,!0),r.removeEventListener("pointermove",Se,!0),r.removeEventListener("pointerup",Se,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Se,!0),r.removeEventListener("mousemove",Se,!0),r.removeEventListener("mouseup",Se,!0)),Bt.delete(n))};function op(t){const e=Q(t);let n;return e.readyState!=="loading"?An(t):(n=()=>{An(t)},e.addEventListener("DOMContentLoaded",n)),()=>Ds(t,n)}typeof document<"u"&&op();function Gt(){return Be!=="pointer"}function Ut(){return Be}function Gr(t){Be=t,Xn(t,null)}function ip(){An();let[t,e]=s.useState(Be);return s.useEffect(()=>{let n=()=>{e(Be)};return Ht.add(n),()=>{Ht.delete(n)}},[]),Ze()?null:t}const lp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function sp(t,e,n){let r=n?F(n):void 0,o=Q(r),i=fe(r);const l=typeof i<"u"?i.HTMLInputElement:HTMLInputElement,a=typeof i<"u"?i.HTMLTextAreaElement:HTMLTextAreaElement,c=typeof i<"u"?i.HTMLElement:HTMLElement,u=typeof i<"u"?i.KeyboardEvent:KeyboardEvent;let d=ne(o);return t=t||d instanceof l&&!lp.has(d.type)||d instanceof a||d instanceof c&&d.isContentEditable,!(t&&e==="keyboard"&&n instanceof u&&!np[n.key])}function ap(t,e,n){An(),s.useEffect(()=>{if((n==null?void 0:n.enabled)===!1)return;let r=(o,i)=>{sp(!!(n!=null&&n.isTextInput),o,i)&&t(Gt())};return Ht.add(r),()=>{Ht.delete(r)}},e)}function Ye(t){if(!t.isConnected)return;const e=Q(t);if(Ut()==="virtual"){let n=ne(e);Xl(()=>{const r=ne(e);(r===n||r===e.body)&&t.isConnected&&de(t)})}else de(t)}function Is(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:o}=t;const i=s.useCallback(c=>{if(F(c)===c.currentTarget)return r&&r(c),o&&o(!1),!0},[r,o]),l=ks(i),a=s.useCallback(c=>{let u=F(c);const d=Q(u),f=d?ne(d):ne();u===c.currentTarget&&u===f&&(n&&n(c),o&&o(!0),l(c))},[o,n,l]);return{focusProps:{onFocus:!e&&(n||o||r)?a:void 0,onBlur:!e&&(r||o)?i:void 0}}}function ki(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){e&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):e=!0},continuePropagation(){e=!1},isPropagationStopped(){return e}};t(r),e&&n.stopPropagation()}}function Ns(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:ki(t.onKeyDown),onKeyUp:ki(t.onKeyUp)}}}let Ur=s.createContext(null);function cp(t){let e=s.useContext(Ur)||{};vo(e,t);let{ref:n,...r}=e;return r}function tn(t,e){let{focusProps:n}=Is(t),{keyboardProps:r}=Ns(t),o=Y(n,r),i=cp(e),l=t.isDisabled?{}:i,a=s.useRef(t.autoFocus);s.useEffect(()=>{a.current&&e.current&&Ye(e.current),a.current=!1},[e]);let c=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(c=void 0),{focusableProps:Y({...o,tabIndex:c},l)}}let bt="default",Wr="",wn=new WeakMap;function Ti(t){if(lt()){if(bt==="default"){const e=Q(t);Wr=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}bt="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";wn.set(t,t.style[e]),t.style[e]="none"}}function wr(t){if(lt()){if(bt!=="disabled")return;bt="restoring",setTimeout(()=>{Xl(()=>{if(bt==="restoring"){const e=Q(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Wr||""),Wr="",bt="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&wn.has(t)){let e=wn.get(t),n="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[n]==="none"&&(t.style[n]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),wn.delete(t)}}const Wt=s.createContext({register:()=>{}});Wt.displayName="PressResponderContext";function up(t){let e=s.useContext(Wt);if(e){let{register:n,ref:r,...o}=e;t=Y(o,t),n()}return vo(e,t.ref),t}var vt;class dn{constructor(e,n,r,o){ci(this,vt);pr(this,vt,!0);let i=(o==null?void 0:o.target)??r.currentTarget;const l=i==null?void 0:i.getBoundingClientRect();let a,c=0,u,d=null;r.clientX!=null&&r.clientY!=null&&(u=r.clientX,d=r.clientY),l&&(u!=null&&d!=null?(a=u-l.left,c=d-l.top):(a=l.width/2,c=l.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=a,this.y=c,this.key=r.key}continuePropagation(){pr(this,vt,!1)}get shouldStopPropagation(){return ai(this,vt)}}vt=new WeakMap;const Mi=Symbol("linkClicked"),Ri="react-aria-pressable-style",Di="data-react-aria-pressable";function Xe(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:i,onClick:l,isDisabled:a,isPressed:c,preventFocusOnPress:u,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:f,ref:m,...h}=up(t),[g,y]=s.useState(!1),v=s.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:w,removeAllGlobalListeners:x}=Yn(),M=s.useCallback((b,P)=>{let N=v.current;if(a||N.didFirePressStart)return!1;let k=!0;if(N.isTriggeringEvent=!0,r){let D=new dn("pressstart",P,b);r(D),k=D.shouldStopPropagation}return n&&n(!0),N.isTriggeringEvent=!1,N.didFirePressStart=!0,y(!0),k},[a,r,n]),R=s.useCallback((b,P,N=!0)=>{let k=v.current;if(!k.didFirePressStart)return!1;k.didFirePressStart=!1,k.isTriggeringEvent=!0;let D=!0;if(o){let $=new dn("pressend",P,b);o($),D=$.shouldStopPropagation}if(n&&n(!1),y(!1),e&&N&&!a){let $=new dn("press",P,b);e($),D&&(D=$.shouldStopPropagation)}return k.isTriggeringEvent=!1,D},[a,o,n,e]),L=Pe(R),j=s.useCallback((b,P)=>{let N=v.current;if(a)return!1;if(i){N.isTriggeringEvent=!0;let k=new dn("pressup",P,b);return i(k),N.isTriggeringEvent=!1,k.shouldStopPropagation}return!0},[a,i]),E=Pe(j),S=s.useCallback(b=>{let P=v.current;if(P.isPressed&&P.target){P.didFirePressStart&&P.pointerType!=null&&R(nt(P.target,b),P.pointerType,!1),P.isPressed=!1,P.isOverTarget=!1,P.activePointerId=null,P.pointerType=null,x(),f||wr(P.target);for(let N of P.disposables)N();P.disposables=[]}},[f,x,R]),I=Pe(S);s.useEffect(()=>{a&&v.current.isPressed&&I({currentTarget:v.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[a]);let C=s.useCallback(b=>{d&&S(b)},[d,S]),K=s.useCallback(b=>{a||l==null||l(b)},[a,l]),_=s.useCallback((b,P)=>{if(!a&&l){let N=new MouseEvent("click",b);Ps(N,P),l(ko(N))}},[a,l]),O=s.useMemo(()=>{let b=v.current,P={onKeyDown(k){var D;if(Er(k.nativeEvent,k.currentTarget)&&H(k.currentTarget,F(k))){Li(F(k),k.key)&&k.preventDefault();let $=!0;!b.isPressed&&!k.repeat&&(b.target=k.currentTarget,b.isPressed=!0,b.pointerType="keyboard",$=M(k,"keyboard"));let T=k.currentTarget,A=G=>{Er(G,T)&&!G.repeat&&H(T,F(G))&&b.target&&E(nt(b.target,G),"keyboard")};w(Q(k.currentTarget),"keyup",Qt(A,N),!0),$&&k.stopPropagation(),k.metaKey&&it()&&((D=b.metaKeyEvents)==null||D.set(k.key,k.nativeEvent))}else k.key==="Meta"&&(b.metaKeyEvents=new Map)},onClick(k){if(!(k&&!H(k.currentTarget,F(k)))&&k&&k.button===0&&!b.isTriggeringEvent&&!_e.isOpening){let D=!0;if(a&&k.preventDefault(),!b.ignoreEmulatedMouseEvents&&!b.isPressed&&(b.pointerType==="virtual"||Ar(k.nativeEvent))){let $=M(k,"virtual"),T=E(k,"virtual"),A=L(k,"virtual");K(k),D=$&&T&&A}else if(b.isPressed&&b.pointerType!=="keyboard"){let $=b.pointerType||k.nativeEvent.pointerType||"virtual",T=E(nt(k.currentTarget,k),$),A=L(nt(k.currentTarget,k),$,!0);D=T&&A,b.isOverTarget=!1,K(k),I(k)}b.ignoreEmulatedMouseEvents=!1,D&&k.stopPropagation()}}},N=k=>{var D,$,T;if(b.isPressed&&b.target&&Er(k,b.target)){Li(F(k),k.key)&&k.preventDefault();let A=F(k),G=H(b.target,A);L(nt(b.target,k),"keyboard",G),G&&_(k,b.target),x(),k.key!=="Enter"&&To(b.target)&&H(b.target,A)&&!k[Mi]&&(k[Mi]=!0,_e(b.target,k,!1)),b.isPressed=!1,(D=b.metaKeyEvents)==null||D.delete(k.key)}else if(k.key==="Meta"&&(($=b.metaKeyEvents)!=null&&$.size)){let A=b.metaKeyEvents;b.metaKeyEvents=void 0;for(let G of A.values())(T=b.target)==null||T.dispatchEvent(new KeyboardEvent("keyup",G))}};if(typeof PointerEvent<"u"){P.onPointerDown=$=>{if($.button!==0||!H($.currentTarget,F($)))return;if(vd($.nativeEvent)){b.pointerType="virtual";return}b.pointerType=$.pointerType;let T=!0;if(!b.isPressed){b.isPressed=!0,b.isOverTarget=!0,b.activePointerId=$.pointerId,b.target=$.currentTarget,f||Ti(b.target),T=M($,b.pointerType);let A=F($);"releasePointerCapture"in A&&("hasPointerCapture"in A?A.hasPointerCapture($.pointerId)&&A.releasePointerCapture($.pointerId):A.releasePointerCapture($.pointerId)),w(Q($.currentTarget),"pointerup",k,!1),w(Q($.currentTarget),"pointercancel",D,!1)}T&&$.stopPropagation()},P.onMouseDown=$=>{if(H($.currentTarget,F($))&&$.button===0){if(u){let T=Pi($.target);T&&b.disposables.push(T)}$.stopPropagation()}},P.onPointerUp=$=>{!H($.currentTarget,F($))||b.pointerType==="virtual"||$.button===0&&!b.isPressed&&E($,b.pointerType||$.pointerType)},P.onPointerEnter=$=>{$.pointerId===b.activePointerId&&b.target&&!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,M(nt(b.target,$),b.pointerType))},P.onPointerLeave=$=>{$.pointerId===b.activePointerId&&b.target&&b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,L(nt(b.target,$),b.pointerType,!1),C($))};let k=$=>{if($.pointerId===b.activePointerId&&b.isPressed&&$.button===0&&b.target){if(H(b.target,F($))&&b.pointerType!=null){let T=!1,A=setTimeout(()=>{b.isPressed&&b.target instanceof HTMLElement&&(T?I($):(de(b.target),b.target.click()))},80);w($.currentTarget,"click",()=>T=!0,!0),b.disposables.push(()=>clearTimeout(A))}else I($);b.isOverTarget=!1}},D=$=>{I($)};P.onDragStart=$=>{H($.currentTarget,F($))&&I($)}}else if(process.env.NODE_ENV==="test"){P.onMouseDown=$=>{if($.button!==0||!H($.currentTarget,F($)))return;if(b.ignoreEmulatedMouseEvents){$.stopPropagation();return}if(b.isPressed=!0,b.isOverTarget=!0,b.target=$.currentTarget,b.pointerType=Ar($.nativeEvent)?"virtual":"mouse",Zt.flushSync(()=>M($,b.pointerType))&&$.stopPropagation(),u){let A=Pi($.target);A&&b.disposables.push(A)}w(Q($.currentTarget),"mouseup",k,!1)},P.onMouseEnter=$=>{if(!H($.currentTarget,F($)))return;let T=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!0,T=M($,b.pointerType)),T&&$.stopPropagation()},P.onMouseLeave=$=>{if(!H($.currentTarget,F($)))return;let T=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!1,T=L($,b.pointerType,!1),C($)),T&&$.stopPropagation()},P.onMouseUp=$=>{H($.currentTarget,F($))&&!b.ignoreEmulatedMouseEvents&&$.button===0&&!b.isPressed&&E($,b.pointerType||"mouse")};let k=$=>{if($.button===0){if(b.ignoreEmulatedMouseEvents){b.ignoreEmulatedMouseEvents=!1;return}b.target&&H(b.target,F($))&&b.pointerType!=null||I($),b.isOverTarget=!1}};P.onTouchStart=$=>{if(!H($.currentTarget,F($)))return;let T=dp($.nativeEvent);if(!T)return;b.activePointerId=T.identifier,b.ignoreEmulatedMouseEvents=!0,b.isOverTarget=!0,b.isPressed=!0,b.target=$.currentTarget,b.pointerType="touch",f||Ti(b.target),M(Ge(b.target,$),b.pointerType)&&$.stopPropagation(),w(fe($.currentTarget),"scroll",D,!0)},P.onTouchMove=$=>{if(!H($.currentTarget,F($)))return;if(!b.isPressed){$.stopPropagation();return}let T=Ii($.nativeEvent,b.activePointerId),A=!0;T&&Ni(T,$.currentTarget)?!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,A=M(Ge(b.target,$),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,A=L(Ge(b.target,$),b.pointerType,!1),C(Ge(b.target,$))),A&&$.stopPropagation()},P.onTouchEnd=$=>{if(!H($.currentTarget,F($)))return;if(!b.isPressed){$.stopPropagation();return}let T=Ii($.nativeEvent,b.activePointerId),A=!0;T&&Ni(T,$.currentTarget)&&b.pointerType!=null?(E(Ge(b.target,$),b.pointerType),A=L(Ge(b.target,$),b.pointerType),_($.nativeEvent,b.target)):b.isOverTarget&&b.pointerType!=null&&(A=L(Ge(b.target,$),b.pointerType,!1)),A&&$.stopPropagation(),b.isPressed=!1,b.activePointerId=null,b.isOverTarget=!1,b.ignoreEmulatedMouseEvents=!0,b.target&&!f&&wr(b.target),x()},P.onTouchCancel=$=>{H($.currentTarget,F($))&&($.stopPropagation(),b.isPressed&&I(Ge(b.target,$)))};let D=$=>{b.isPressed&&H(F($),b.target)&&I({currentTarget:b.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};P.onDragStart=$=>{H($.currentTarget,F($))&&I($)}}return P},[w,a,u,x,f,C,M,K,_]);return s.useEffect(()=>{if(!m||process.env.NODE_ENV==="test")return;const b=Q(m.current);if(!b||!b.head||b.getElementById(Ri))return;const P=b.createElement("style");P.id=Ri;let N=ns(b);N&&(P.nonce=N),P.textContent=`
|
|
2
2
|
@layer {
|
|
3
|
-
[${
|
|
3
|
+
[${Di}] {
|
|
4
4
|
touch-action: pan-x pan-y pinch-zoom;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
`.trim(),m.head.prepend(S)},[b]),s.useEffect(()=>{let m=v.current;return()=>{f||xr(m.target??void 0);for(let S of m.disposables)S();m.disposables=[]}},[f]),{isPressed:c||g,pressProps:Y(h,A,{[wi]:!0})}}function Eo(t){return t.tagName==="A"&&t.hasAttribute("href")}function $r(t,e){const{key:n,code:r}=t,o=e,i=o.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(o instanceof fe(o).HTMLInputElement&&!Ss(o,n)||o instanceof fe(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&Eo(o))&&n!=="Enter")}function Xf(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function Ei(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const o=n[r];if(o.identifier===e)return o}return null}function Ge(t,e){let n=0,r=0;return e.targetTouches&&e.targetTouches.length===1&&(n=e.targetTouches[0].clientX,r=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function nt(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r,key:e.key}}function Zf(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function Jf(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Ci(t,e){let n=e.getBoundingClientRect(),r=Zf(t);return Jf(n,r)}function Qf(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!Eo(t)}function Si(t,e){return t instanceof HTMLInputElement?!Ss(t,e):Qf(t)}const ep=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ss(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":ep.has(t.type)}function tp(t,e){let{elementType:n="button",isDisabled:r,onPress:o,onPressStart:i,onPressEnd:l,onPressUp:a,onPressChange:c,preventFocusOnPress:u,allowFocusWhenDisabled:d,onClick:f,href:b,target:h,rel:g,type:y="button"}=t,v;n==="button"?v={type:y,disabled:r,form:t.form,formAction:t.formAction,formEncType:t.formEncType,formMethod:t.formMethod,formNoValidate:t.formNoValidate,formTarget:t.formTarget,name:t.name,value:t.value}:v={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?h:void 0,type:n==="input"?y:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?g:void 0};let{pressProps:w,isPressed:x}=Xe({onPressStart:i,onPressEnd:l,onPressChange:c,onPress:o,onPressUp:a,onClick:f,isDisabled:r,preventFocusOnPress:u,ref:e}),{focusableProps:M}=en(t,e);d&&(M.tabIndex=r?-1:M.tabIndex);let D=Y(M,w,ae(t,{labelable:!0}));return{isPressed:x,buttonProps:Y(v,D,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],"aria-current":t["aria-current"],"aria-disabled":t["aria-disabled"]})}}function Co(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=t,i=s.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:a}=qn(),c=s.useCallback(f=>{H(f.currentTarget,F(f))&&i.current.isFocusWithin&&!H(f.currentTarget,f.relatedTarget)&&(i.current.isFocusWithin=!1,a(),n&&n(f),o&&o(!1))},[n,o,i,a]),u=ys(c),d=s.useCallback(f=>{if(!H(f.currentTarget,F(f)))return;let b=F(f);const h=Q(b),g=ne(h);if(!i.current.isFocusWithin&&g===b){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,u(f);let y=f.currentTarget;l(h,"focus",v=>{let w=F(v);if(i.current.isFocusWithin&&!H(y,w)){let x=new h.defaultView.FocusEvent("blur",{relatedTarget:w});gs(x,y);let M=wo(x);c(M)}},{capture:!0})}},[r,o,u,l,c]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:c}}}function So(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,o=s.useRef({isFocused:!1,isFocusVisible:e||Ht()}),[i,l]=s.useState(!1),[a,c]=s.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=s.useCallback(()=>c(o.current.isFocused&&o.current.isFocusVisible),[]),d=s.useCallback(h=>{o.current.isFocused=h,o.current.isFocusVisible=Ht(),l(h),u()},[u]);Wf(h=>{o.current.isFocusVisible=h,u()},[n,i],{enabled:i,isTextInput:n});let{focusProps:f}=Es({isDisabled:r,onFocusChange:d}),{focusWithinProps:b}=Co({isDisabled:!r,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:a,focusProps:r?b:f}}let An=!1,fn=0;function Gr(){An=!0,setTimeout(()=>{An=!1},500)}function Pi(t){t.pointerType==="touch"&&Gr()}function np(){let t=Q(null);if(!(typeof t>"u"))return fn===0&&(typeof PointerEvent<"u"?t.addEventListener("pointerup",Pi):process.env.NODE_ENV==="test"&&t.addEventListener("touchend",Gr)),fn++,()=>{fn--,!(fn>0)&&(typeof PointerEvent<"u"?t.removeEventListener("pointerup",Pi):process.env.NODE_ENV==="test"&&t.removeEventListener("touchend",Gr))}}function tn(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:o}=t,[i,l]=s.useState(!1),a=s.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;s.useEffect(np,[]);let{addGlobalListener:c,removeAllGlobalListeners:u}=qn(),{hoverProps:d,triggerHoverEnd:f}=s.useMemo(()=>{let b=(y,v)=>{if(a.pointerType=v,o||v==="touch"||a.isHovered||!H(y.currentTarget,F(y)))return;a.isHovered=!0;let w=y.currentTarget;a.target=w,c(Q(F(y)),"pointerover",x=>{a.isHovered&&a.target&&!H(a.target,F(x))&&h(x,x.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:w,pointerType:v}),n&&n(!0),l(!0)},h=(y,v)=>{let w=a.target;a.pointerType="",a.target=null,!(v==="touch"||!a.isHovered||!w)&&(a.isHovered=!1,u(),r&&r({type:"hoverend",target:w,pointerType:v}),n&&n(!1),l(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=y=>{An&&y.pointerType==="mouse"||b(y,y.pointerType)},g.onPointerLeave=y=>{!o&&H(y.currentTarget,F(y))&&h(y,y.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=y=>{!a.ignoreEmulatedMouseEvents&&!An&&b(y,"mouse"),a.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=y=>{!o&&H(y.currentTarget,F(y))&&h(y,"mouse")}),{hoverProps:g,triggerHoverEnd:h}},[e,n,r,o,a,c,u]);return s.useEffect(()=>{o&&f({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:d,isHovered:i}}const Ps=s.createContext({}),Po=Sf(function(e,n){[e,n]=Me(e,n,Ps);let r=e,{isPending:o}=r,{buttonProps:i,isPressed:l}=tp(e,n);i=op(i,o);let{focusProps:a,isFocused:c,isFocusVisible:u}=So(e),{hoverProps:d,isHovered:f}=tn({...e,isDisabled:e.isDisabled||o}),b={isHovered:f,isPressed:(r.isPressed||l)&&!o,isFocused:c,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:o??!1},h=Te({...e,values:b,defaultClassName:"react-aria-Button"}),g=pe(i.id),y=pe(),v=i["aria-labelledby"];o&&(v?v=`${v} ${y}`:i["aria-label"]&&(v=`${g} ${y}`));let w=s.useRef(o);s.useEffect(()=>{let M={"aria-labelledby":v||g};(!w.current&&c&&o||w.current&&c&&!o)&&mi(M,"assertive"),w.current=o},[o,c,v,g]);let x=ae(e,{global:!0});return delete x.onClick,s.createElement(he.button,{...Y(x,h,i,a,d),type:i.type==="submit"&&o?"button":i.type,id:g,ref:n,"aria-labelledby":v,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":b.isPressed||void 0,"data-hovered":f||void 0,"data-focused":c||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},s.createElement(bs.Provider,{value:{id:y}},h.children))}),rp=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function op(t,e){if(e){for(const n in t)n.startsWith("on")&&!rp.test(n)&&(t[n]=void 0);t.href=void 0,t.target=void 0}return t}const ip=typeof document<"u"?s.useInsertionEffect??s.useLayoutEffect:()=>{};function Xn(t,e,n){let[r,o]=s.useState(t||e),i=s.useRef(r),l=s.useRef(t!==void 0),a=t!==void 0;s.useEffect(()=>{let f=l.current;f!==a&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),l.current=a},[a]);let c=a?t:r;ip(()=>{i.current=c});let[,u]=s.useReducer(()=>({}),{}),d=s.useCallback((f,...b)=>{let h=typeof f=="function"?f(i.current):f;Object.is(i.current,h)||(i.current=h,o(h),u(),n==null||n(h,...b))},[n]);return[c,d]}const ks=s.createContext({}),lp=s.forwardRef(function(e,n){[e,n]=Me(e,n,ks);let{children:r,level:o=3,className:i,...l}=e,a=he[`h${o}`];return s.createElement(a,{...l,ref:n,className:i??"react-aria-Heading"},r)}),sp=t=>t?"true":void 0;function Ee(t,e){return $f(t,(n,r)=>{const o=typeof e=="function"?e(r)??"":e??"";return Vt(o,n??"")??""})}const ie=(t,e,n)=>typeof t=="function"?t({className:e}):e,ap=t=>p.jsx("svg",{"aria-hidden":"true","aria-label":"Chevron right icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:p.jsx("path",{clipRule:"evenodd",d:"M5.47 2.97a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06L9.44 8 5.47 4.03a.75.75 0 0 1 0-1.06Z",fill:"currentColor",fillRule:"evenodd"})}),cp=({height:t=9,width:e=9,...n})=>p.jsx("svg",{"aria-hidden":"true","aria-label":"External link icon",fill:"none",height:t,role:"presentation",viewBox:"0 0 7 7",width:e,xmlns:"http://www.w3.org/2000/svg",...n,children:p.jsx("path",{d:"M1.20592 6.84333L0.379822 6.01723L4.52594 1.8672H1.37819L1.38601 0.731812H6.48742V5.83714H5.34421L5.35203 2.6933L1.20592 6.84333Z",fill:"currentColor"})}),up=t=>p.jsx("svg",{"aria-hidden":"true","aria-label":"Close icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:p.jsx("path",{clipRule:"evenodd",d:"M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06Z",fill:"currentColor",fillRule:"evenodd"})}),ki=t=>p.jsx("svg",{"aria-hidden":"true","aria-label":"Info icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:p.jsx("path",{clipRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z",fill:"currentColor",fillRule:"evenodd"})}),dp=t=>p.jsx("svg",{"aria-hidden":"true","aria-label":"Warning icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:p.jsx("path",{clipRule:"evenodd",d:"M7.134 2.994L2.217 11.5a1 1 0 0 0 .866 1.5h9.834a1 1 0 0 0 .866-1.5L8.866 2.993a1 1 0 0 0-1.732 0m3.03-.75c-.962-1.665-3.366-1.665-4.329 0L.918 10.749c-.963 1.666.24 3.751 2.165 3.751h9.834c1.925 0 3.128-2.085 2.164-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0a1 1 0 0 1 2 0",fill:"currentColor",fillRule:"evenodd"})}),fp=t=>p.jsx("svg",{"aria-hidden":"true","aria-label":"Danger icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:p.jsx("path",{clipRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0M8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0z",fill:"currentColor",fillRule:"evenodd"})}),pp=t=>p.jsx("svg",{"aria-hidden":"true","aria-label":"Success icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:p.jsx("path",{clipRule:"evenodd",d:"M13.5 8a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0m-3.9-1.55a.75.75 0 1 0-1.2-.9L7.419 8.858L6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08z",fill:"currentColor",fillRule:"evenodd"})}),Zn=s.createContext({}),hp=s.createContext({placement:"bottom"}),bp=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function Ti(t){return t.dataset.liveAnnouncer==="true"||t.dataset.reactAriaTopLayer!==void 0}let Mt=new WeakMap,ye=[];function Ts(t,e){let n=fe(t==null?void 0:t[0]),r=e instanceof n.Element?{root:e}:e,o=(r==null?void 0:r.root)??document.body,i=(r==null?void 0:r.shouldUseInert)&&bp,l=new Set(t),a=new Set,c=v=>i&&v instanceof n.HTMLElement?v.inert:v.getAttribute("aria-hidden")==="true",u=(v,w)=>{i&&v instanceof n.HTMLElement?v.inert=w:w?v.setAttribute("aria-hidden","true"):(v.removeAttribute("aria-hidden"),v instanceof n.HTMLElement&&(v.inert=!1))},d=new Set;if(Oe())for(let v of t){let w=v;for(;w&&w!==o;){let x=w.getRootNode();"shadowRoot"in x&&d.add(x.shadowRoot),w=x.parentNode}}let f=v=>{for(let D of v.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(D);let w=D=>{if(a.has(D)||l.has(D)||D.parentElement&&a.has(D.parentElement)&&D.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let L of l)if(H(D,L))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},x=jl(Q(v),v,NodeFilter.SHOW_ELEMENT,{acceptNode:w}),M=w(v);if(M===NodeFilter.FILTER_ACCEPT&&b(v),M!==NodeFilter.FILTER_REJECT){let D=x.nextNode();for(;D!=null;)b(D),D=x.nextNode()}},b=v=>{let w=Mt.get(v)??0;c(v)&&w===0||(w===0&&u(v,!0),a.add(v),Mt.set(v,w+1))};ye.length&&ye[ye.length-1].disconnect(),f(o);let h=new MutationObserver(v=>{for(let w of v)if(w.type==="childList"){if(w.target.isConnected&&![...l,...a].some(x=>H(x,w.target)))for(let x of w.addedNodes)(x instanceof HTMLElement||x instanceof SVGElement)&&Ti(x)?l.add(x):x instanceof Element&&f(x);if(Oe()){for(let x of d)if(!x.isConnected){h.disconnect();break}}}});h.observe(o,{childList:!0,subtree:!0});let g=new Set;if(Oe())for(let v of d){let w=new MutationObserver(x=>{for(let M of x)if(M.type==="childList"){if(M.target.isConnected&&![...l,...a].some(D=>H(D,M.target)))for(let D of M.addedNodes)(D instanceof HTMLElement||D instanceof SVGElement)&&Ti(D)?l.add(D):D instanceof Element&&f(D);if(Oe()){for(let D of d)if(!D.isConnected){h.disconnect();break}}}});w.observe(v,{childList:!0,subtree:!0}),g.add(w)}let y={visibleNodes:l,hiddenNodes:a,observe(){h.observe(o,{childList:!0,subtree:!0})},disconnect(){h.disconnect()}};return ye.push(y),()=>{if(h.disconnect(),Oe())for(let v of g)v.disconnect();for(let v of a){let w=Mt.get(v);w!=null&&(w===1?(u(v,!1),Mt.delete(v)):Mt.set(v,w-1))}y===ye[ye.length-1]?(ye.pop(),ye.length&&ye[ye.length-1].observe()):ye.splice(ye.indexOf(y),1)}}function mp(t){let e=ye[ye.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const Se={top:"top",bottom:"top",left:"left",right:"left"},Fn={top:"bottom",bottom:"top",left:"right",right:"left"},gp={top:"left",left:"top"},Ur={top:"height",left:"width"},Ms={width:"totalWidth",height:"totalHeight"},pn={};let yp=()=>typeof document<"u"?window.visualViewport:null;function Mi(t,e){let n=0,r=0,o=0,i=0,l=0,a=0,c={},u=((e==null?void 0:e.scale)??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let d=document.documentElement;o=d.clientWidth,i=d.clientHeight,n=(e==null?void 0:e.width)??o,r=(e==null?void 0:e.height)??i,c.top=d.scrollTop||t.scrollTop,c.left=d.scrollLeft||t.scrollLeft,e&&(l=e.offsetTop,a=e.offsetLeft)}else({width:n,height:r,top:l,left:a}=Wt(t,!1)),c.top=t.scrollTop,c.left=t.scrollLeft,o=n,i=r;return Il()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u&&(c.top=0,c.left=0,l=(e==null?void 0:e.pageTop)??0,a=(e==null?void 0:e.pageLeft)??0),{width:n,height:r,totalWidth:o,totalHeight:i,scroll:c,top:l,left:a}}function vp(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Di(t,e,n,r,o,i,l){let a=o.scroll[t]??0,c=r[Ur[t]],u=l[t]+r.scroll[Se[t]]+i,d=l[t]+r.scroll[Se[t]]+c-i,f=e-a+r.scroll[Se[t]]+l[t]-r[Se[t]],b=e-a+n+r.scroll[Se[t]]+l[t]-r[Se[t]];return f<u?u-f:b>d?Math.max(d-b,u-f):0}function xp(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function Ri(t){if(pn[t])return pn[t];let[e,n]=t.split(" "),r=Se[e]||"right",o=gp[r];Se[n]||(n="center");let i=Ur[r],l=Ur[o];return pn[t]={placement:e,crossPlacement:n,axis:r,crossAxis:o,size:i,crossSize:l},pn[t]}function wr(t,e,n,r,o,i,l,a,c,u,d){let{placement:f,crossPlacement:b,axis:h,crossAxis:g,size:y,crossSize:v}=r,w={};w[g]=t[g]??0,b==="center"?w[g]+=((t[v]??0)-(n[v]??0))/2:b!==g&&(w[g]+=(t[v]??0)-(n[v]??0)),w[g]+=i;const x=t[g]-n[v]+c+u,M=t[g]+t[v]-c-u;if(w[g]=Ln(w[g],x,M),f===h){let D=a?d[y]:d[Ms[y]];w[Fn[h]]=Math.floor(D-t[h]+o)}else w[h]=Math.floor(t[h]+t[y]+o);return w}function $p(t,e,n,r,o,i,l,a,c,u,d){let f=(t.top!=null?t.top:c[Ms.height]-(t.bottom??0)-l)-(c.scroll.top??0),b=u?n.top:0,h={top:Math.max(e.top+b,((d==null?void 0:d.offsetTop)??e.top)+b),bottom:Math.min(e.top+e.height+b,((d==null?void 0:d.offsetTop)??0)+((d==null?void 0:d.height)??0))};return a!=="top"?Math.max(0,h.bottom-f-((o.top??0)+(o.bottom??0)+i)):Math.max(0,f+l-h.top-((o.top??0)+(o.bottom??0)+i))}function Ni(t,e,n,r,o,i,l,a){let{placement:c,axis:u,size:d}=i;return c===u?Math.max(0,n[u]-(l.scroll[u]??0)-(t[u]+(a?e[u]:0))-(r[u]??0)-r[Fn[u]]-o):Math.max(0,t[d]+t[u]+(a?e[u]:0)-n[u]-n[d]+(l.scroll[u]??0)-(r[u]??0)-r[Fn[u]]-o)}function wp(t,e,n,r,o,i,l,a,c,u,d,f,b,h,g,y,v,w){let x=Ri(t),{size:M,crossAxis:D,crossSize:L,placement:_,crossPlacement:E}=x,P=wr(e,a,n,x,d,f,u,b,g,y,c),N=d,C=Ni(a,u,e,o,i+d,x,c,v);if(l&&n[M]>C){let ee=Ri(`${Fn[_]} ${E}`),le=wr(e,a,n,ee,d,f,u,b,g,y,c);Ni(a,u,e,o,i+d,ee,c,v)>C&&(x=ee,P=le,N=d)}let K="bottom";x.axis==="top"?x.placement==="top"?K="top":x.placement==="bottom"&&(K="bottom"):x.crossAxis==="top"&&(x.crossPlacement==="top"?K="bottom":x.crossPlacement==="bottom"&&(K="top"));let j=Di(D,P[D],n[L],a,c,i,u);P[D]+=j;let A=$p(P,a,u,b,o,i,n.height,K,c,v,w);h&&h<A&&(A=h),n.height=Math.min(n.height,A),P=wr(e,a,n,x,N,f,u,b,g,y,c),j=Di(D,P[D],n[L],a,c,i,u),P[D]+=j;let m={},S=e[D]-P[D]-o[Se[D]],I=S+.5*e[L];const k=g/2+y,R=Se[D]==="left"?(o.left??0)+(o.right??0):(o.top??0)+(o.bottom??0),$=n[L]-R-g/2-y,T=e[D]+g/2-(P[D]+o[Se[D]]),O=e[D]+e[L]-g/2-(P[D]+o[Se[D]]),G=Ln(I,T,O);m[D]=Ln(G,k,$),{placement:_,crossPlacement:E}=x,g?S=m[D]:E==="right"?S+=e[L]:E==="center"&&(S+=e[L]/2);let W=_==="left"||_==="top"?n[M]:0,q={x:_==="top"||_==="bottom"?S:W,y:_==="left"||_==="right"?S:W};return{position:P,maxHeight:A,arrowOffsetLeft:m.left,arrowOffsetTop:m.top,placement:_,triggerAnchorPoint:q}}function Ep(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:o,padding:i,shouldFlip:l,boundaryElement:a,offset:c,crossOffset:u,maxHeight:d,arrowSize:f=0,arrowBoundaryOffset:b=0}=t,h=yp(),g=r instanceof HTMLElement?Cp(r):document.documentElement,y=g===document.documentElement;const v=window.getComputedStyle(g).position;let w=!!v&&v!=="static",x=y?Wt(n,!1):Li(n,g,!1);if(!y){let{marginTop:C,marginLeft:K}=window.getComputedStyle(n);x.top+=parseInt(C,10)||0,x.left+=parseInt(K,10)||0}let M=Wt(r,!0),D=xp(r);M.width+=(D.left??0)+(D.right??0),M.height+=(D.top??0)+(D.bottom??0);let L=vp(o),_=Mi(a,h),E=Mi(g,h),P;if((a.tagName==="BODY"||a.tagName==="HTML")&&!y){let C=Jn(g,!1);P={top:-(C.top-_.top),left:-(C.left-_.left),width:0,height:0}}else(a.tagName==="BODY"||a.tagName==="HTML")&&y?P={top:0,left:0,width:0,height:0}:P=Li(a,g,!1);let N=H(a,g);return wp(e,x,M,L,D,i,l,_,E,P,c,u,w,d,f,b,N,h)}function Jn(t,e){let{top:n,left:r,width:o,height:i}=t.getBoundingClientRect();return e&&t instanceof t.ownerDocument.defaultView.HTMLElement&&(o=t.offsetWidth,i=t.offsetHeight),{top:n,left:r,width:o,height:i}}function Wt(t,e){let{top:n,left:r,width:o,height:i}=Jn(t,e),{scrollTop:l,scrollLeft:a,clientTop:c,clientLeft:u}=document.documentElement;return{top:n+l-c,left:r+a-u,width:o,height:i}}function Li(t,e,n){let r=window.getComputedStyle(t),o;if(r.position==="fixed")o=Jn(t,n);else{o=Wt(t,n);let i=Wt(e,n),l=window.getComputedStyle(e);i.top+=(parseInt(l.borderTopWidth,10)||0)-e.scrollTop,i.left+=(parseInt(l.borderLeftWidth,10)||0)-e.scrollLeft,o.top-=i.top,o.left-=i.left}return o.top-=parseInt(r.marginTop,10)||0,o.left-=parseInt(r.marginLeft,10)||0,o}function Cp(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Ii(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Ii(e);)e=e.parentElement;return e||document.documentElement}function Ii(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const Ds=new WeakMap;function Sp(t){let{triggerRef:e,isOpen:n,onClose:r}=t;s.useEffect(()=>{if(!n||r===null)return;let o=i=>{let l=F(i);if(!e.current||l instanceof Node&&!H(l,e.current)||l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)return;let a=r||Ds.get(e.current);a&&a()};return window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("scroll",o,!0)}},[n,r,e])}let se=typeof document<"u"?window.visualViewport:null;function Pp(t){let{direction:e}=dt(),{arrowSize:n,targetRef:r,overlayRef:o,arrowRef:i,scrollRef:l=o,placement:a="bottom",containerPadding:c=12,shouldFlip:u=!0,boundaryElement:d=typeof document<"u"?document.body:null,offset:f=0,crossOffset:b=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:v,arrowBoundaryOffset:w=0}=t,[x,M]=s.useState(null),D=[h,a,o.current,r.current,i==null?void 0:i.current,l.current,c,u,d,f,b,g,e,v,w,n],L=s.useRef(se==null?void 0:se.scale);s.useEffect(()=>{g&&(L.current=se==null?void 0:se.scale)},[g]);let _=s.useCallback(()=>{var A,m;if(h===!1||!g||!o.current||!r.current||!d||(se==null?void 0:se.scale)!==L.current)return;let N=null;if(l.current&&$t(l.current)){let S=(A=ne())==null?void 0:A.getBoundingClientRect(),I=l.current.getBoundingClientRect();N={type:"top",offset:((S==null?void 0:S.top)??0)-I.top},N.offset>I.height/2&&(N.type="bottom",N.offset=((S==null?void 0:S.bottom)??0)-I.bottom)}let C=o.current;!v&&o.current&&(C.style.top="0px",C.style.bottom="",C.style.maxHeight=(((m=window.visualViewport)==null?void 0:m.height)??window.innerHeight)+"px");let K=Ep({placement:Tp(a,e),overlayNode:o.current,targetNode:r.current,scrollNode:l.current||o.current,padding:c,shouldFlip:u,boundaryElement:d,offset:f,crossOffset:b,maxHeight:v,arrowSize:n??(i!=null&&i.current?Jn(i.current,!0).width:0),arrowBoundaryOffset:w});if(!K.position)return;C.style.top="",C.style.bottom="",C.style.left="",C.style.right="",Object.keys(K.position).forEach(S=>C.style[S]=K.position[S]+"px"),C.style.maxHeight=K.maxHeight!=null?K.maxHeight+"px":"";let j=ne();if(N&&j&&l.current){let S=j.getBoundingClientRect(),I=l.current.getBoundingClientRect(),k=S[N.type]-I[N.type];l.current.scrollTop+=k-N.offset}M(K)},D);J(_,D),kp(_),Tn({ref:o,onResize:_}),Tn({ref:r,onResize:_});let E=s.useRef(!1);J(()=>{let N,C=()=>{E.current=!0,clearTimeout(N),N=setTimeout(()=>{E.current=!1},500),_()},K=()=>{E.current&&C()};return se==null||se.addEventListener("resize",C),se==null||se.addEventListener("scroll",K),()=>{se==null||se.removeEventListener("resize",C),se==null||se.removeEventListener("scroll",K)}},[_]);let P=s.useCallback(()=>{E.current||y==null||y()},[y,E]);return Sp({triggerRef:r,isOpen:g,onClose:y&&P}),{overlayProps:{style:{position:x?"absolute":"fixed",top:x?void 0:0,left:x?void 0:0,zIndex:1e5,...x==null?void 0:x.position,maxHeight:(x==null?void 0:x.maxHeight)??"100vh"}},placement:(x==null?void 0:x.placement)??null,triggerAnchorPoint:(x==null?void 0:x.triggerAnchorPoint)??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:x==null?void 0:x.arrowOffsetLeft,top:x==null?void 0:x.arrowOffsetTop}},updatePosition:_}}function kp(t){J(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function Tp(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const Ki=s.createContext(null),Wr="react-aria-focus-scope-restore";let re=null;function Rs(t){let{children:e,contain:n,restoreFocus:r,autoFocus:o}=t,i=s.useRef(null),l=s.useRef(null),a=s.useRef([]),{parentNode:c}=s.useContext(Ki)||{},u=s.useMemo(()=>new Yr({scopeRef:a}),[a]);J(()=>{let b=c||ce.root;if(ce.getTreeNode(b.scopeRef)&&re&&!jn(re,b.scopeRef)){let h=ce.getTreeNode(re);h&&(b=h)}b.addChild(u),ce.addNode(u)},[u,c]),J(()=>{let b=ce.getTreeNode(a);b&&(b.contain=!!n)},[n]),J(()=>{var y;let b=(y=i.current)==null?void 0:y.nextSibling,h=[],g=v=>v.stopPropagation();for(;b&&b!==l.current;)h.push(b),b.addEventListener(Wr,g),b=b.nextSibling;return a.current=h,()=>{for(let v of h)v.removeEventListener(Wr,g)}},[e]),Kp(a,r,n),Np(a,n),Op(a,r,n),Ip(a,o),s.useEffect(()=>{const b=ne(Q(a.current?a.current[0]:void 0));let h=null;if(ke(b,a.current)){for(let g of ce.traverse())g.scopeRef&&ke(b,g.scopeRef.current)&&(h=g);h===ce.getTreeNode(a)&&(re=h.scopeRef)}},[a]),J(()=>()=>{var h,g;let b=((g=(h=ce.getTreeNode(a))==null?void 0:h.parent)==null?void 0:g.scopeRef)??null;(a===re||jn(a,re))&&(!b||ce.getTreeNode(b))&&(re=b),ce.removeTreeNode(a)},[a]);let d=s.useMemo(()=>Mp(a),[]),f=s.useMemo(()=>({focusManager:d,parentNode:u}),[u,d]);return s.createElement(Ki.Provider,{value:f},s.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),e,s.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:l}))}function Mp(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:o,wrap:i,accept:l}=e,a=r||ne(Q(n[0]??void 0)),c=n[0].previousElementSibling,u=rt(n),d=Fe(u,{tabbable:o,accept:l},n);d.currentNode=ke(a,n)?a:c;let f=d.nextNode();return!f&&i&&(d.currentNode=c,f=d.nextNode()),f&&Ae(f,!0),f},focusPrevious(e={}){let n=t.current,{from:r,tabbable:o,wrap:i,accept:l}=e,a=r||ne(Q(n[0]??void 0)),c=n[n.length-1].nextElementSibling,u=rt(n),d=Fe(u,{tabbable:o,accept:l},n);d.currentNode=ke(a,n)?a:c;let f=d.previousNode();return!f&&i&&(d.currentNode=c,f=d.previousNode()),f&&Ae(f,!0),f},focusFirst(e={}){let n=t.current,{tabbable:r,accept:o}=e,i=rt(n),l=Fe(i,{tabbable:r,accept:o},n);l.currentNode=n[0].previousElementSibling;let a=l.nextNode();return a&&Ae(a,!0),a},focusLast(e={}){let n=t.current,{tabbable:r,accept:o}=e,i=rt(n),l=Fe(i,{tabbable:r,accept:o},n);l.currentNode=n[n.length-1].nextElementSibling;let a=l.previousNode();return a&&Ae(a,!0),a}}}function rt(t){return t[0].parentElement}function Ot(t){let e=ce.getTreeNode(re);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function Dp(t){if(!t.form)return Array.from(Q(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter(r=>!r.form);const e=t.form.elements.namedItem(t.name);let n=fe(t);return e instanceof n.RadioNodeList?Array.from(e).filter(r=>r instanceof n.HTMLInputElement):e instanceof n.HTMLInputElement?[e]:[]}function Rp(t){if(t.checked)return!0;const e=Dp(t);return e.length>0&&!e.some(n=>n.checked)}function Np(t,e){let n=s.useRef(void 0),r=s.useRef(void 0);J(()=>{let o=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const i=Q(o?o[0]:void 0);let l=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!Ot(t)||u.isComposing)return;let d=ne(i),f=t.current;if(!f||!ke(d,f))return;let b=rt(f),h=Fe(b,{tabbable:!0},f);if(!d)return;h.currentNode=d;let g=u.shiftKey?h.previousNode():h.nextNode();g||(h.currentNode=u.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,g=u.shiftKey?h.previousNode():h.nextNode()),u.preventDefault(),g&&(Ae(g,!0),g instanceof fe(g).HTMLInputElement&&g.select())},a=u=>{(!re||jn(re,t))&&ke(F(u),t.current)?(re=t,n.current=F(u)):Ot(t)&&!We(F(u),t)?n.current?n.current.focus():re&&re.current&&qr(re.current):Ot(t)&&(n.current=F(u))},c=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{var h;let d=Gt(),f=(d==="virtual"||d===null)&&po()&&Kl(),b=ne(i);if(!f&&b&&Ot(t)&&!We(b,t)){re=t;let g=F(u);g&&g.isConnected?(n.current=g,(h=n.current)==null||h.focus()):re.current&&qr(re.current)}})};return i.addEventListener("keydown",l,!1),i.addEventListener("focusin",a,!1),o==null||o.forEach(u=>u.addEventListener("focusin",a,!1)),o==null||o.forEach(u=>u.addEventListener("focusout",c,!1)),()=>{i.removeEventListener("keydown",l,!1),i.removeEventListener("focusin",a,!1),o==null||o.forEach(u=>u.removeEventListener("focusin",a,!1)),o==null||o.forEach(u=>u.removeEventListener("focusout",c,!1))}},[t,e]),J(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Ns(t){return We(t)}function ke(t,e){return!t||!e?!1:e.some(n=>H(n,t))}function We(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ce.traverse(ce.getTreeNode(e)))if(n&&ke(t,n.current))return!0;return!1}function Lp(t){return We(t,re)}function jn(t,e){var r;let n=(r=ce.getTreeNode(e))==null?void 0:r.parent;for(;n;){if(n.scopeRef===t)return!0;n=n.parent}return!1}function Ae(t,e=!1){if(t!=null&&!e)try{Ye(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Ls(t,e=!0){let n=t[0].previousElementSibling,r=rt(t),o=Fe(r,{tabbable:e},t);o.currentNode=n;let i=o.nextNode();return e&&!i&&(r=rt(t),o=Fe(r,{tabbable:!1},t),o.currentNode=n,i=o.nextNode()),i}function qr(t,e=!0){Ae(Ls(t,e))}function Ip(t,e){const n=s.useRef(e);s.useEffect(()=>{if(n.current){re=t;const r=Q(t.current?t.current[0]:void 0);!ke(ne(r),re.current)&&t.current&&qr(t.current)}n.current=!1},[t])}function Kp(t,e,n){J(()=>{if(e||n)return;let r=t.current;const o=Q(r?r[0]:void 0);let i=l=>{let a=F(l);ke(a,t.current)?re=t:Ns(a)||(re=null)};return o.addEventListener("focusin",i,!1),r==null||r.forEach(l=>l.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),r==null||r.forEach(l=>l.removeEventListener("focusin",i,!1))}},[t,e,n])}function Oi(t){let e=ce.getTreeNode(re);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function Op(t,e,n){const r=s.useRef(typeof document<"u"?ne(Q(t.current?t.current[0]:void 0)):null);J(()=>{let o=t.current;const i=Q(o?o[0]:void 0);if(!e||n)return;let l=()=>{(!re||jn(re,t))&&ke(ne(i),t.current)&&(re=t)};return i.addEventListener("focusin",l,!1),o==null||o.forEach(a=>a.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),o==null||o.forEach(a=>a.removeEventListener("focusin",l,!1))}},[t,n]),J(()=>{const o=Q(t.current?t.current[0]:void 0);if(!e)return;let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!Ot(t)||l.isComposing)return;let a=o.activeElement;if(!We(a,t)||!Oi(t))return;let c=ce.getTreeNode(t);if(!c)return;let u=c.nodeToRestore,d=Fe(o.body,{tabbable:!0});d.currentNode=a;let f=l.shiftKey?d.previousNode():d.nextNode();if((!u||!u.isConnected||u===o.body)&&(u=void 0,c.nodeToRestore=void 0),(!f||!We(f,t))&&u){d.currentNode=u;do f=l.shiftKey?d.previousNode():d.nextNode();while(We(f,t));l.preventDefault(),l.stopPropagation(),f?Ae(f,!0):Ns(u)?Ae(u,!0):a.blur()}};return n||o.addEventListener("keydown",i,!0),()=>{n||o.removeEventListener("keydown",i,!0)}},[t,e,n]),J(()=>{const o=Q(t.current?t.current[0]:void 0);if(!e)return;let i=ce.getTreeNode(t);if(i)return i.nodeToRestore=r.current??void 0,()=>{let l=ce.getTreeNode(t);if(!l)return;let a=l.nodeToRestore,c=ne(o);if(e&&a&&(c&&We(c,t)||c===o.body&&Oi(t))){let u=ce.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let d=u.getTreeNode(t);for(;d;){if(d.nodeToRestore&&d.nodeToRestore.isConnected){Ai(d.nodeToRestore);return}d=d.parent}for(d=u.getTreeNode(t);d;){if(d.scopeRef&&d.scopeRef.current&&ce.getTreeNode(d.scopeRef)){let f=Ls(d.scopeRef.current,!0);Ai(f);return}d=d.parent}}})}}},[t,e])}function Ai(t){t.dispatchEvent(new CustomEvent(Wr,{bubbles:!0,cancelable:!0}))&&Ae(t)}function Fe(t,e,n){let r=e!=null&&e.tabbable?Gl:yo,o=(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null,i=Q(o),l=jl(i,t||i,NodeFilter.SHOW_ELEMENT,{acceptNode(a){return H(e==null?void 0:e.from,a)||e!=null&&e.tabbable&&a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(!Rp(a)||l.currentNode.tagName==="INPUT"&&l.currentNode.type==="radio"&&l.currentNode.name===a.name)?NodeFilter.FILTER_REJECT:r(a)&&(!n||ke(a,n))&&(!(e!=null&&e.accept)||e.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(l.currentNode=e.from),l}class ko{constructor(){this.fastMap=new Map,this.root=new Yr({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let o=this.fastMap.get(n??null);if(!o)return;let i=new Yr({scopeRef:e});o.addChild(i),i.parent=o,this.fastMap.set(e,i),r&&(i.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&ke(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let o=n.children;r&&(r.removeChild(n),o.size>0&&o.forEach(i=>r&&r.addChild(i))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var n;let e=new ko;for(let r of this.traverse())e.addTreeNode(r.scopeRef,((n=r.parent)==null?void 0:n.scopeRef)??null,r.nodeToRestore);return e}}class Yr{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let ce=new ko;function Ap(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:o}=t,i=s.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=Pe(c=>{n&&hn(c,e)&&(o&&o(c),i.current.isPointerDown=!0)}),a=Pe(c=>{n&&n(c)});s.useEffect(()=>{let c=i.current;if(r)return;const u=e.current,d=Q(u);if(typeof PointerEvent<"u"){let f=b=>{c.isPointerDown&&hn(b,e)&&a(b),c.isPointerDown=!1};return d.addEventListener("pointerdown",l,!0),d.addEventListener("click",f,!0),()=>{d.removeEventListener("pointerdown",l,!0),d.removeEventListener("click",f,!0)}}else if(process.env.NODE_ENV==="test"){let f=h=>{c.ignoreEmulatedMouseEvents?c.ignoreEmulatedMouseEvents=!1:c.isPointerDown&&hn(h,e)&&a(h),c.isPointerDown=!1},b=h=>{c.ignoreEmulatedMouseEvents=!0,c.isPointerDown&&hn(h,e)&&a(h),c.isPointerDown=!1};return d.addEventListener("mousedown",l,!0),d.addEventListener("mouseup",f,!0),d.addEventListener("touchstart",l,!0),d.addEventListener("touchend",b,!0),()=>{d.removeEventListener("mousedown",l,!0),d.removeEventListener("mouseup",f,!0),d.removeEventListener("touchstart",l,!0),d.removeEventListener("touchend",b,!0)}}},[e,r])}function hn(t,e){if(t.button>0)return!1;let n=F(t);if(n){const r=n.ownerDocument;if(!r||!H(r.documentElement,n)||n.closest("[data-react-aria-top-layer]"))return!1}return e.current?!t.composedPath().includes(e.current):!1}const Ne=[];function Is(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:a}=t,c=s.useRef(void 0);s.useEffect(()=>{if(o&&!Ne.includes(e))return Ne.push(e),()=>{let g=Ne.indexOf(e);g>=0&&Ne.splice(g,1)}},[o,e]);let u=()=>{Ne[Ne.length-1]===e&&n&&n()},d=g=>{const y=Ne[Ne.length-1];c.current=y,(!a||a(F(g)))&&y===e&&g.stopPropagation()},f=g=>{(!a||a(F(g)))&&(Ne[Ne.length-1]===e&&g.stopPropagation(),c.current===e&&u()),c.current=void 0},b=g=>{g.key==="Escape"&&!l&&!g.nativeEvent.isComposing&&(g.stopPropagation(),g.preventDefault(),u())};Ap({ref:e,onInteractOutside:i&&o?f:void 0,onInteractOutsideStart:d});let{focusWithinProps:h}=Co({isDisabled:!r,onBlurWithin:g=>{!g.relatedTarget||Lp(g.relatedTarget)||(!a||a(g.relatedTarget))&&(n==null||n())}});return{overlayProps:{onKeyDown:b,...h},underlayProps:{}}}const Bt=typeof document<"u"&&window.visualViewport;let bn=0,Er;function Ks(t={}){let{isDisabled:e}=t;J(()=>{if(!e)return bn++,bn===1&&(lt()?Er=jp():Er=Fp()),()=>{bn--,bn===0&&Er()}},[e])}function Fp(){let t=window.innerWidth-document.documentElement.clientWidth;return Jt(t>0&&("scrollbarGutter"in document.documentElement.style?En(document.documentElement,"scrollbarGutter","stable"):En(document.documentElement,"paddingRight",`${t}px`)),En(document.documentElement,"overflow","hidden"))}function jp(){let t=En(document.documentElement,"overflow","hidden"),e,n=!1,r=d=>{let f=F(d);e=st(f)?f:zl(f,!0),n=!1;let b=f.ownerDocument.defaultView.getSelection();b&&!b.isCollapsed&&b.containsNode(f,!0)&&(n=!0),d.composedPath().some(h=>h instanceof HTMLInputElement&&h.type==="range")&&(n=!0),"selectionStart"in f&&"selectionEnd"in f&&f.selectionStart<f.selectionEnd&&f.ownerDocument.activeElement===f&&(n=!0)},o=document.createElement("style"),i=Wl();i&&(o.nonce=i),o.textContent=`
|
|
7
|
+
`.trim(),b.head.prepend(P)},[m]),s.useEffect(()=>{let b=v.current;return()=>{f||wr(b.target??void 0);for(let P of b.disposables)P();b.disposables=[]}},[f]),{isPressed:c||g,pressProps:Y(h,O,{[Di]:!0})}}function To(t){return t.tagName==="A"&&t.hasAttribute("href")}function Er(t,e){const{key:n,code:r}=t,o=e,i=o.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(o instanceof fe(o).HTMLInputElement&&!Ls(o,n)||o instanceof fe(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&To(o))&&n!=="Enter")}function dp(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function Ii(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const o=n[r];if(o.identifier===e)return o}return null}function Ge(t,e){let n=0,r=0;return e.targetTouches&&e.targetTouches.length===1&&(n=e.targetTouches[0].clientX,r=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function nt(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r,key:e.key}}function fp(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function pp(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Ni(t,e){let n=e.getBoundingClientRect(),r=fp(t);return pp(n,r)}function hp(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!To(t)}function Li(t,e){return t instanceof HTMLInputElement?!Ls(t,e):hp(t)}const mp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ls(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":mp.has(t.type)}function bp(t,e){let{elementType:n="button",isDisabled:r,onPress:o,onPressStart:i,onPressEnd:l,onPressUp:a,onPressChange:c,preventFocusOnPress:u,allowFocusWhenDisabled:d,onClick:f,href:m,target:h,rel:g,type:y="button"}=t,v;n==="button"?v={type:y,disabled:r,form:t.form,formAction:t.formAction,formEncType:t.formEncType,formMethod:t.formMethod,formNoValidate:t.formNoValidate,formTarget:t.formTarget,name:t.name,value:t.value}:v={role:"button",href:n==="a"&&!r?m:void 0,target:n==="a"?h:void 0,type:n==="input"?y:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?g:void 0};let{pressProps:w,isPressed:x}=Xe({onPressStart:i,onPressEnd:l,onPressChange:c,onPress:o,onPressUp:a,onClick:f,isDisabled:r,preventFocusOnPress:u,ref:e}),{focusableProps:M}=tn(t,e);d&&(M.tabIndex=r?-1:M.tabIndex);let R=Y(M,w,ae(t,{labelable:!0}));return{isPressed:x,buttonProps:Y(v,R,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],"aria-current":t["aria-current"],"aria-disabled":t["aria-disabled"]})}}function Mo(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=t,i=s.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:a}=Yn(),c=s.useCallback(f=>{H(f.currentTarget,F(f))&&i.current.isFocusWithin&&!H(f.currentTarget,f.relatedTarget)&&(i.current.isFocusWithin=!1,a(),n&&n(f),o&&o(!1))},[n,o,i,a]),u=ks(c),d=s.useCallback(f=>{if(!H(f.currentTarget,F(f)))return;let m=F(f);const h=Q(m),g=ne(h);if(!i.current.isFocusWithin&&g===m){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,u(f);let y=f.currentTarget;l(h,"focus",v=>{let w=F(v);if(i.current.isFocusWithin&&!H(y,w)){let x=new h.defaultView.FocusEvent("blur",{relatedTarget:w});Ps(x,y);let M=ko(x);c(M)}},{capture:!0})}},[r,o,u,l,c]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:c}}}function Ro(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,o=s.useRef({isFocused:!1,isFocusVisible:e||Gt()}),[i,l]=s.useState(!1),[a,c]=s.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=s.useCallback(()=>c(o.current.isFocused&&o.current.isFocusVisible),[]),d=s.useCallback(h=>{o.current.isFocused=h,o.current.isFocusVisible=Gt(),l(h),u()},[u]);ap(h=>{o.current.isFocusVisible=h,u()},[n,i],{enabled:i,isTextInput:n});let{focusProps:f}=Is({isDisabled:r,onFocusChange:d}),{focusWithinProps:m}=Mo({isDisabled:!r,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:a,focusProps:r?m:f}}let On=!1,fn=0;function qr(){On=!0,setTimeout(()=>{On=!1},500)}function Ki(t){t.pointerType==="touch"&&qr()}function gp(){let t=Q(null);if(!(typeof t>"u"))return fn===0&&(typeof PointerEvent<"u"?t.addEventListener("pointerup",Ki):process.env.NODE_ENV==="test"&&t.addEventListener("touchend",qr)),fn++,()=>{fn--,!(fn>0)&&(typeof PointerEvent<"u"?t.removeEventListener("pointerup",Ki):process.env.NODE_ENV==="test"&&t.removeEventListener("touchend",qr))}}function nn(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:o}=t,[i,l]=s.useState(!1),a=s.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;s.useEffect(gp,[]);let{addGlobalListener:c,removeAllGlobalListeners:u}=Yn(),{hoverProps:d,triggerHoverEnd:f}=s.useMemo(()=>{let m=(y,v)=>{if(a.pointerType=v,o||v==="touch"||a.isHovered||!H(y.currentTarget,F(y)))return;a.isHovered=!0;let w=y.currentTarget;a.target=w,c(Q(F(y)),"pointerover",x=>{a.isHovered&&a.target&&!H(a.target,F(x))&&h(x,x.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:w,pointerType:v}),n&&n(!0),l(!0)},h=(y,v)=>{let w=a.target;a.pointerType="",a.target=null,!(v==="touch"||!a.isHovered||!w)&&(a.isHovered=!1,u(),r&&r({type:"hoverend",target:w,pointerType:v}),n&&n(!1),l(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=y=>{On&&y.pointerType==="mouse"||m(y,y.pointerType)},g.onPointerLeave=y=>{!o&&H(y.currentTarget,F(y))&&h(y,y.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=y=>{!a.ignoreEmulatedMouseEvents&&!On&&m(y,"mouse"),a.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=y=>{!o&&H(y.currentTarget,F(y))&&h(y,"mouse")}),{hoverProps:g,triggerHoverEnd:h}},[e,n,r,o,a,c,u]);return s.useEffect(()=>{o&&f({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:d,isHovered:i}}const Ks=s.createContext({}),Do=_f(function(e,n){[e,n]=Me(e,n,Ks);let r=e,{isPending:o}=r,{buttonProps:i,isPressed:l}=bp(e,n);i=vp(i,o);let{focusProps:a,isFocused:c,isFocusVisible:u}=Ro(e),{hoverProps:d,isHovered:f}=nn({...e,isDisabled:e.isDisabled||o}),m={isHovered:f,isPressed:(r.isPressed||l)&&!o,isFocused:c,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:o??!1},h=Te({...e,values:m,defaultClassName:"react-aria-Button"}),g=pe(i.id),y=pe(),v=i["aria-labelledby"];o&&(v?v=`${v} ${y}`:i["aria-label"]&&(v=`${g} ${y}`));let w=s.useRef(o);s.useEffect(()=>{let M={"aria-labelledby":v||g};(!w.current&&c&&o||w.current&&c&&!o)&&Ci(M,"assertive"),w.current=o},[o,c,v,g]);let x=ae(e,{global:!0});return delete x.onClick,s.createElement(he.button,{...Y(x,h,i,a,d),type:i.type==="submit"&&o?"button":i.type,id:g,ref:n,"aria-labelledby":v,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":m.isPressed||void 0,"data-hovered":f||void 0,"data-focused":c||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},s.createElement(Ss.Provider,{value:{id:y}},h.children))}),yp=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function vp(t,e){if(e){for(const n in t)n.startsWith("on")&&!yp.test(n)&&(t[n]=void 0);t.href=void 0,t.target=void 0}return t}const xp=typeof document<"u"?s.useInsertionEffect??s.useLayoutEffect:()=>{};function Zn(t,e,n){let[r,o]=s.useState(t||e),i=s.useRef(r),l=s.useRef(t!==void 0),a=t!==void 0;s.useEffect(()=>{let f=l.current;f!==a&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),l.current=a},[a]);let c=a?t:r;xp(()=>{i.current=c});let[,u]=s.useReducer(()=>({}),{}),d=s.useCallback((f,...m)=>{let h=typeof f=="function"?f(i.current):f;Object.is(i.current,h)||(i.current=h,o(h),u(),n==null||n(h,...m))},[n]);return[c,d]}const As=s.createContext({}),$p=s.forwardRef(function(e,n){[e,n]=Me(e,n,As);let{children:r,level:o=3,className:i,...l}=e,a=he[`h${o}`];return s.createElement(a,{...l,ref:n,className:i??"react-aria-Heading"},r)}),wp=t=>t?"true":void 0;function Ee(t,e){return Af(t,(n,r)=>{const o=typeof e=="function"?e(r)??"":e??"";return zt(o,n??"")??""})}const ie=(t,e,n)=>typeof t=="function"?t({className:e}):e,Ep=t=>p.jsx("svg",{"aria-hidden":"true","aria-label":"Chevron right icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:p.jsx("path",{clipRule:"evenodd",d:"M5.47 2.97a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06L9.44 8 5.47 4.03a.75.75 0 0 1 0-1.06Z",fill:"currentColor",fillRule:"evenodd"})}),Sp=({height:t=9,width:e=9,...n})=>p.jsx("svg",{"aria-hidden":"true","aria-label":"External link icon",fill:"none",height:t,role:"presentation",viewBox:"0 0 7 7",width:e,xmlns:"http://www.w3.org/2000/svg",...n,children:p.jsx("path",{d:"M1.20592 6.84333L0.379822 6.01723L4.52594 1.8672H1.37819L1.38601 0.731812H6.48742V5.83714H5.34421L5.35203 2.6933L1.20592 6.84333Z",fill:"currentColor"})}),Cp=t=>p.jsx("svg",{"aria-hidden":"true","aria-label":"Close icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:p.jsx("path",{clipRule:"evenodd",d:"M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06Z",fill:"currentColor",fillRule:"evenodd"})}),Ai=t=>p.jsx("svg",{"aria-hidden":"true","aria-label":"Info icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:p.jsx("path",{clipRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z",fill:"currentColor",fillRule:"evenodd"})}),Pp=t=>p.jsx("svg",{"aria-hidden":"true","aria-label":"Warning icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:p.jsx("path",{clipRule:"evenodd",d:"M7.134 2.994L2.217 11.5a1 1 0 0 0 .866 1.5h9.834a1 1 0 0 0 .866-1.5L8.866 2.993a1 1 0 0 0-1.732 0m3.03-.75c-.962-1.665-3.366-1.665-4.329 0L.918 10.749c-.963 1.666.24 3.751 2.165 3.751h9.834c1.925 0 3.128-2.085 2.164-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0a1 1 0 0 1 2 0",fill:"currentColor",fillRule:"evenodd"})}),kp=t=>p.jsx("svg",{"aria-hidden":"true","aria-label":"Danger icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:p.jsx("path",{clipRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0M8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0z",fill:"currentColor",fillRule:"evenodd"})}),Tp=t=>p.jsx("svg",{"aria-hidden":"true","aria-label":"Success icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:p.jsx("path",{clipRule:"evenodd",d:"M13.5 8a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0m-3.9-1.55a.75.75 0 1 0-1.2-.9L7.419 8.858L6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08z",fill:"currentColor",fillRule:"evenodd"})}),Jn=s.createContext({}),Mp=s.createContext({placement:"bottom"}),Rp=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function Oi(t){return t.dataset.liveAnnouncer==="true"||t.dataset.reactAriaTopLayer!==void 0}let Rt=new WeakMap,ye=[];function Os(t,e){let n=fe(t==null?void 0:t[0]),r=e instanceof n.Element?{root:e}:e,o=(r==null?void 0:r.root)??document.body,i=(r==null?void 0:r.shouldUseInert)&&Rp,l=new Set(t),a=new Set,c=v=>i&&v instanceof n.HTMLElement?v.inert:v.getAttribute("aria-hidden")==="true",u=(v,w)=>{i&&v instanceof n.HTMLElement?v.inert=w:w?v.setAttribute("aria-hidden","true"):(v.removeAttribute("aria-hidden"),v instanceof n.HTMLElement&&(v.inert=!1))},d=new Set;if(Ae())for(let v of t){let w=v;for(;w&&w!==o;){let x=w.getRootNode();"shadowRoot"in x&&d.add(x.shadowRoot),w=x.parentNode}}let f=v=>{for(let R of v.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(R);let w=R=>{if(a.has(R)||l.has(R)||R.parentElement&&a.has(R.parentElement)&&R.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let L of l)if(H(R,L))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},x=ql(Q(v),v,NodeFilter.SHOW_ELEMENT,{acceptNode:w}),M=w(v);if(M===NodeFilter.FILTER_ACCEPT&&m(v),M!==NodeFilter.FILTER_REJECT){let R=x.nextNode();for(;R!=null;)m(R),R=x.nextNode()}},m=v=>{let w=Rt.get(v)??0;c(v)&&w===0||(w===0&&u(v,!0),a.add(v),Rt.set(v,w+1))};ye.length&&ye[ye.length-1].disconnect(),f(o);let h=new MutationObserver(v=>{for(let w of v)if(w.type==="childList"){if(w.target.isConnected&&![...l,...a].some(x=>H(x,w.target)))for(let x of w.addedNodes)(x instanceof HTMLElement||x instanceof SVGElement)&&Oi(x)?l.add(x):x instanceof Element&&f(x);if(Ae()){for(let x of d)if(!x.isConnected){h.disconnect();break}}}});h.observe(o,{childList:!0,subtree:!0});let g=new Set;if(Ae())for(let v of d){let w=new MutationObserver(x=>{for(let M of x)if(M.type==="childList"){if(M.target.isConnected&&![...l,...a].some(R=>H(R,M.target)))for(let R of M.addedNodes)(R instanceof HTMLElement||R instanceof SVGElement)&&Oi(R)?l.add(R):R instanceof Element&&f(R);if(Ae()){for(let R of d)if(!R.isConnected){h.disconnect();break}}}});w.observe(v,{childList:!0,subtree:!0}),g.add(w)}let y={visibleNodes:l,hiddenNodes:a,observe(){h.observe(o,{childList:!0,subtree:!0})},disconnect(){h.disconnect()}};return ye.push(y),()=>{if(h.disconnect(),Ae())for(let v of g)v.disconnect();for(let v of a){let w=Rt.get(v);w!=null&&(w===1?(u(v,!1),Rt.delete(v)):Rt.set(v,w-1))}y===ye[ye.length-1]?(ye.pop(),ye.length&&ye[ye.length-1].observe()):ye.splice(ye.indexOf(y),1)}}function Dp(t){let e=ye[ye.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const Ce={top:"top",bottom:"top",left:"left",right:"left"},Fn={top:"bottom",bottom:"top",left:"right",right:"left"},Ip={top:"left",left:"top"},Yr={top:"height",left:"width"},Fs={width:"totalWidth",height:"totalHeight"},pn={};let Np=()=>typeof document<"u"?window.visualViewport:null;function Fi(t,e){let n=0,r=0,o=0,i=0,l=0,a=0,c={},u=((e==null?void 0:e.scale)??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let d=document.documentElement;o=d.clientWidth,i=d.clientHeight,n=(e==null?void 0:e.width)??o,r=(e==null?void 0:e.height)??i,c.top=d.scrollTop||t.scrollTop,c.left=d.scrollLeft||t.scrollLeft,e&&(l=e.offsetTop,a=e.offsetLeft)}else({width:n,height:r,top:l,left:a}=qt(t,!1)),c.top=t.scrollTop,c.left=t.scrollLeft,o=n,i=r;return zl()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u&&(c.top=0,c.left=0,l=(e==null?void 0:e.pageTop)??0,a=(e==null?void 0:e.pageLeft)??0),{width:n,height:r,totalWidth:o,totalHeight:i,scroll:c,top:l,left:a}}function Lp(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function ji(t,e,n,r,o,i,l){let a=o.scroll[t]??0,c=r[Yr[t]],u=l[t]+r.scroll[Ce[t]]+i,d=l[t]+r.scroll[Ce[t]]+c-i,f=e-a+r.scroll[Ce[t]]+l[t]-r[Ce[t]],m=e-a+n+r.scroll[Ce[t]]+l[t]-r[Ce[t]];return f<u?u-f:m>d?Math.max(d-m,u-f):0}function Kp(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function _i(t){if(pn[t])return pn[t];let[e,n]=t.split(" "),r=Ce[e]||"right",o=Ip[r];Ce[n]||(n="center");let i=Yr[r],l=Yr[o];return pn[t]={placement:e,crossPlacement:n,axis:r,crossAxis:o,size:i,crossSize:l},pn[t]}function Sr(t,e,n,r,o,i,l,a,c,u,d){let{placement:f,crossPlacement:m,axis:h,crossAxis:g,size:y,crossSize:v}=r,w={};w[g]=t[g]??0,m==="center"?w[g]+=((t[v]??0)-(n[v]??0))/2:m!==g&&(w[g]+=(t[v]??0)-(n[v]??0)),w[g]+=i;const x=t[g]-n[v]+c+u,M=t[g]+t[v]-c-u;if(w[g]=Nn(w[g],x,M),f===h){let R=a?d[y]:d[Fs[y]];w[Fn[h]]=Math.floor(R-t[h]+o)}else w[h]=Math.floor(t[h]+t[y]+o);return w}function Ap(t,e,n,r,o,i,l,a,c,u,d){let f=(t.top!=null?t.top:c[Fs.height]-(t.bottom??0)-l)-(c.scroll.top??0),m=u?n.top:0,h={top:Math.max(e.top+m,((d==null?void 0:d.offsetTop)??e.top)+m),bottom:Math.min(e.top+e.height+m,((d==null?void 0:d.offsetTop)??0)+((d==null?void 0:d.height)??0))};return a!=="top"?Math.max(0,h.bottom-f-((o.top??0)+(o.bottom??0)+i)):Math.max(0,f+l-h.top-((o.top??0)+(o.bottom??0)+i))}function Bi(t,e,n,r,o,i,l,a){let{placement:c,axis:u,size:d}=i;return c===u?Math.max(0,n[u]-(l.scroll[u]??0)-(t[u]+(a?e[u]:0))-(r[u]??0)-r[Fn[u]]-o):Math.max(0,t[d]+t[u]+(a?e[u]:0)-n[u]-n[d]+(l.scroll[u]??0)-(r[u]??0)-r[Fn[u]]-o)}function Op(t,e,n,r,o,i,l,a,c,u,d,f,m,h,g,y,v,w){let x=_i(t),{size:M,crossAxis:R,crossSize:L,placement:j,crossPlacement:E}=x,S=Sr(e,a,n,x,d,f,u,m,g,y,c),I=d,C=Bi(a,u,e,o,i+d,x,c,v);if(l&&n[M]>C){let ee=_i(`${Fn[j]} ${E}`),le=Sr(e,a,n,ee,d,f,u,m,g,y,c);Bi(a,u,e,o,i+d,ee,c,v)>C&&(x=ee,S=le,I=d)}let K="bottom";x.axis==="top"?x.placement==="top"?K="top":x.placement==="bottom"&&(K="bottom"):x.crossAxis==="top"&&(x.crossPlacement==="top"?K="bottom":x.crossPlacement==="bottom"&&(K="top"));let _=ji(R,S[R],n[L],a,c,i,u);S[R]+=_;let O=Ap(S,a,u,m,o,i,n.height,K,c,v,w);h&&h<O&&(O=h),n.height=Math.min(n.height,O),S=Sr(e,a,n,x,I,f,u,m,g,y,c),_=ji(R,S[R],n[L],a,c,i,u),S[R]+=_;let b={},P=e[R]-S[R]-o[Ce[R]],N=P+.5*e[L];const k=g/2+y,D=Ce[R]==="left"?(o.left??0)+(o.right??0):(o.top??0)+(o.bottom??0),$=n[L]-D-g/2-y,T=e[R]+g/2-(S[R]+o[Ce[R]]),A=e[R]+e[L]-g/2-(S[R]+o[Ce[R]]),G=Nn(N,T,A);b[R]=Nn(G,k,$),{placement:j,crossPlacement:E}=x,g?P=b[R]:E==="right"?P+=e[L]:E==="center"&&(P+=e[L]/2);let W=j==="left"||j==="top"?n[M]:0,q={x:j==="top"||j==="bottom"?P:W,y:j==="left"||j==="right"?P:W};return{position:S,maxHeight:O,arrowOffsetLeft:b.left,arrowOffsetTop:b.top,placement:j,triggerAnchorPoint:q}}function Fp(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:o,padding:i,shouldFlip:l,boundaryElement:a,offset:c,crossOffset:u,maxHeight:d,arrowSize:f=0,arrowBoundaryOffset:m=0}=t,h=Np(),g=r instanceof HTMLElement?jp(r):document.documentElement,y=g===document.documentElement;const v=window.getComputedStyle(g).position;let w=!!v&&v!=="static",x=y?qt(n,!1):Vi(n,g,!1);if(!y){let{marginTop:C,marginLeft:K}=window.getComputedStyle(n);x.top+=parseInt(C,10)||0,x.left+=parseInt(K,10)||0}let M=qt(r,!0),R=Kp(r);M.width+=(R.left??0)+(R.right??0),M.height+=(R.top??0)+(R.bottom??0);let L=Lp(o),j=Fi(a,h),E=Fi(g,h),S;if((a.tagName==="BODY"||a.tagName==="HTML")&&!y){let C=Qn(g,!1);S={top:-(C.top-j.top),left:-(C.left-j.left),width:0,height:0}}else(a.tagName==="BODY"||a.tagName==="HTML")&&y?S={top:0,left:0,width:0,height:0}:S=Vi(a,g,!1);let I=H(a,g);return Op(e,x,M,L,R,i,l,j,E,S,c,u,w,d,f,m,I,h)}function Qn(t,e){let{top:n,left:r,width:o,height:i}=t.getBoundingClientRect();return e&&t instanceof t.ownerDocument.defaultView.HTMLElement&&(o=t.offsetWidth,i=t.offsetHeight),{top:n,left:r,width:o,height:i}}function qt(t,e){let{top:n,left:r,width:o,height:i}=Qn(t,e),{scrollTop:l,scrollLeft:a,clientTop:c,clientLeft:u}=document.documentElement;return{top:n+l-c,left:r+a-u,width:o,height:i}}function Vi(t,e,n){let r=window.getComputedStyle(t),o;if(r.position==="fixed")o=Qn(t,n);else{o=qt(t,n);let i=qt(e,n),l=window.getComputedStyle(e);i.top+=(parseInt(l.borderTopWidth,10)||0)-e.scrollTop,i.left+=(parseInt(l.borderLeftWidth,10)||0)-e.scrollLeft,o.top-=i.top,o.left-=i.left}return o.top-=parseInt(r.marginTop,10)||0,o.left-=parseInt(r.marginLeft,10)||0,o}function jp(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!zi(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!zi(e);)e=e.parentElement;return e||document.documentElement}function zi(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const js=new WeakMap;function _p(t){let{triggerRef:e,isOpen:n,onClose:r}=t;s.useEffect(()=>{if(!n||r===null)return;let o=i=>{let l=F(i);if(!e.current||l instanceof Node&&!H(l,e.current)||l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)return;let a=r||js.get(e.current);a&&a()};return window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("scroll",o,!0)}},[n,r,e])}let se=typeof document<"u"?window.visualViewport:null;function Bp(t){let{direction:e}=ut(),{arrowSize:n,targetRef:r,overlayRef:o,arrowRef:i,scrollRef:l=o,placement:a="bottom",containerPadding:c=12,shouldFlip:u=!0,boundaryElement:d=typeof document<"u"?document.body:null,offset:f=0,crossOffset:m=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:v,arrowBoundaryOffset:w=0}=t,[x,M]=s.useState(null),R=[h,a,o.current,r.current,i==null?void 0:i.current,l.current,c,u,d,f,m,g,e,v,w,n],L=s.useRef(se==null?void 0:se.scale);s.useEffect(()=>{g&&(L.current=se==null?void 0:se.scale)},[g]);let j=s.useCallback(()=>{var O,b;if(h===!1||!g||!o.current||!r.current||!d||(se==null?void 0:se.scale)!==L.current)return;let I=null;if(l.current&&xt(l.current)){let P=(O=ne())==null?void 0:O.getBoundingClientRect(),N=l.current.getBoundingClientRect();I={type:"top",offset:((P==null?void 0:P.top)??0)-N.top},I.offset>N.height/2&&(I.type="bottom",I.offset=((P==null?void 0:P.bottom)??0)-N.bottom)}let C=o.current;!v&&o.current&&(C.style.top="0px",C.style.bottom="",C.style.maxHeight=(((b=window.visualViewport)==null?void 0:b.height)??window.innerHeight)+"px");let K=Fp({placement:zp(a,e),overlayNode:o.current,targetNode:r.current,scrollNode:l.current||o.current,padding:c,shouldFlip:u,boundaryElement:d,offset:f,crossOffset:m,maxHeight:v,arrowSize:n??(i!=null&&i.current?Qn(i.current,!0).width:0),arrowBoundaryOffset:w});if(!K.position)return;C.style.top="",C.style.bottom="",C.style.left="",C.style.right="",Object.keys(K.position).forEach(P=>C.style[P]=K.position[P]+"px"),C.style.maxHeight=K.maxHeight!=null?K.maxHeight+"px":"";let _=ne();if(I&&_&&l.current){let P=_.getBoundingClientRect(),N=l.current.getBoundingClientRect(),k=P[I.type]-N[I.type];l.current.scrollTop+=k-I.offset}M(K)},R);J(j,R),Vp(j),Tn({ref:o,onResize:j}),Tn({ref:r,onResize:j});let E=s.useRef(!1);J(()=>{let I,C=()=>{E.current=!0,clearTimeout(I),I=setTimeout(()=>{E.current=!1},500),j()},K=()=>{E.current&&C()};return se==null||se.addEventListener("resize",C),se==null||se.addEventListener("scroll",K),()=>{se==null||se.removeEventListener("resize",C),se==null||se.removeEventListener("scroll",K)}},[j]);let S=s.useCallback(()=>{E.current||y==null||y()},[y,E]);return _p({triggerRef:r,isOpen:g,onClose:y&&S}),{overlayProps:{style:{position:x?"absolute":"fixed",top:x?void 0:0,left:x?void 0:0,zIndex:1e5,...x==null?void 0:x.position,maxHeight:(x==null?void 0:x.maxHeight)??"100vh"}},placement:(x==null?void 0:x.placement)??null,triggerAnchorPoint:(x==null?void 0:x.triggerAnchorPoint)??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:x==null?void 0:x.arrowOffsetLeft,top:x==null?void 0:x.arrowOffsetTop}},updatePosition:j}}function Vp(t){J(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function zp(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const Hi=s.createContext(null),Xr="react-aria-focus-scope-restore";let re=null;function _s(t){let{children:e,contain:n,restoreFocus:r,autoFocus:o}=t,i=s.useRef(null),l=s.useRef(null),a=s.useRef([]),{parentNode:c}=s.useContext(Hi)||{},u=s.useMemo(()=>new Jr({scopeRef:a}),[a]);J(()=>{let m=c||ce.root;if(ce.getTreeNode(m.scopeRef)&&re&&!jn(re,m.scopeRef)){let h=ce.getTreeNode(re);h&&(m=h)}m.addChild(u),ce.addNode(u)},[u,c]),J(()=>{let m=ce.getTreeNode(a);m&&(m.contain=!!n)},[n]),J(()=>{var y;let m=(y=i.current)==null?void 0:y.nextSibling,h=[],g=v=>v.stopPropagation();for(;m&&m!==l.current;)h.push(m),m.addEventListener(Xr,g),m=m.nextSibling;return a.current=h,()=>{for(let v of h)v.removeEventListener(Xr,g)}},[e]),Xp(a,r,n),Wp(a,n),Zp(a,r,n),Yp(a,o),s.useEffect(()=>{const m=ne(Q(a.current?a.current[0]:void 0));let h=null;if(ke(m,a.current)){for(let g of ce.traverse())g.scopeRef&&ke(m,g.scopeRef.current)&&(h=g);h===ce.getTreeNode(a)&&(re=h.scopeRef)}},[a]),J(()=>()=>{var h,g;let m=((g=(h=ce.getTreeNode(a))==null?void 0:h.parent)==null?void 0:g.scopeRef)??null;(a===re||jn(a,re))&&(!m||ce.getTreeNode(m))&&(re=m),ce.removeTreeNode(a)},[a]);let d=s.useMemo(()=>Hp(a),[]),f=s.useMemo(()=>({focusManager:d,parentNode:u}),[u,d]);return s.createElement(Hi.Provider,{value:f},s.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),e,s.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:l}))}function Hp(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:o,wrap:i,accept:l}=e,a=r||ne(Q(n[0]??void 0)),c=n[0].previousElementSibling,u=rt(n),d=Fe(u,{tabbable:o,accept:l},n);d.currentNode=ke(a,n)?a:c;let f=d.nextNode();return!f&&i&&(d.currentNode=c,f=d.nextNode()),f&&Oe(f,!0),f},focusPrevious(e={}){let n=t.current,{from:r,tabbable:o,wrap:i,accept:l}=e,a=r||ne(Q(n[0]??void 0)),c=n[n.length-1].nextElementSibling,u=rt(n),d=Fe(u,{tabbable:o,accept:l},n);d.currentNode=ke(a,n)?a:c;let f=d.previousNode();return!f&&i&&(d.currentNode=c,f=d.previousNode()),f&&Oe(f,!0),f},focusFirst(e={}){let n=t.current,{tabbable:r,accept:o}=e,i=rt(n),l=Fe(i,{tabbable:r,accept:o},n);l.currentNode=n[0].previousElementSibling;let a=l.nextNode();return a&&Oe(a,!0),a},focusLast(e={}){let n=t.current,{tabbable:r,accept:o}=e,i=rt(n),l=Fe(i,{tabbable:r,accept:o},n);l.currentNode=n[n.length-1].nextElementSibling;let a=l.previousNode();return a&&Oe(a,!0),a}}}function rt(t){return t[0].parentElement}function Ot(t){let e=ce.getTreeNode(re);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function Gp(t){if(!t.form)return Array.from(Q(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter(r=>!r.form);const e=t.form.elements.namedItem(t.name);let n=fe(t);return e instanceof n.RadioNodeList?Array.from(e).filter(r=>r instanceof n.HTMLInputElement):e instanceof n.HTMLInputElement?[e]:[]}function Up(t){if(t.checked)return!0;const e=Gp(t);return e.length>0&&!e.some(n=>n.checked)}function Wp(t,e){let n=s.useRef(void 0),r=s.useRef(void 0);J(()=>{let o=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const i=Q(o?o[0]:void 0);let l=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!Ot(t)||u.isComposing)return;let d=ne(i),f=t.current;if(!f||!ke(d,f))return;let m=rt(f),h=Fe(m,{tabbable:!0},f);if(!d)return;h.currentNode=d;let g=u.shiftKey?h.previousNode():h.nextNode();g||(h.currentNode=u.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,g=u.shiftKey?h.previousNode():h.nextNode()),u.preventDefault(),g&&(Oe(g,!0),g instanceof fe(g).HTMLInputElement&&g.select())},a=u=>{(!re||jn(re,t))&&ke(F(u),t.current)?(re=t,n.current=F(u)):Ot(t)&&!We(F(u),t)?n.current?n.current.focus():re&&re.current&&Zr(re.current):Ot(t)&&(n.current=F(u))},c=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{var h;let d=Ut(),f=(d==="virtual"||d===null)&&yo()&&Hl(),m=ne(i);if(!f&&m&&Ot(t)&&!We(m,t)){re=t;let g=F(u);g&&g.isConnected?(n.current=g,(h=n.current)==null||h.focus()):re.current&&Zr(re.current)}})};return i.addEventListener("keydown",l,!1),i.addEventListener("focusin",a,!1),o==null||o.forEach(u=>u.addEventListener("focusin",a,!1)),o==null||o.forEach(u=>u.addEventListener("focusout",c,!1)),()=>{i.removeEventListener("keydown",l,!1),i.removeEventListener("focusin",a,!1),o==null||o.forEach(u=>u.removeEventListener("focusin",a,!1)),o==null||o.forEach(u=>u.removeEventListener("focusout",c,!1))}},[t,e]),J(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Bs(t){return We(t)}function ke(t,e){return!t||!e?!1:e.some(n=>H(n,t))}function We(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ce.traverse(ce.getTreeNode(e)))if(n&&ke(t,n.current))return!0;return!1}function qp(t){return We(t,re)}function jn(t,e){var r;let n=(r=ce.getTreeNode(e))==null?void 0:r.parent;for(;n;){if(n.scopeRef===t)return!0;n=n.parent}return!1}function Oe(t,e=!1){if(t!=null&&!e)try{Ye(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Vs(t,e=!0){let n=t[0].previousElementSibling,r=rt(t),o=Fe(r,{tabbable:e},t);o.currentNode=n;let i=o.nextNode();return e&&!i&&(r=rt(t),o=Fe(r,{tabbable:!1},t),o.currentNode=n,i=o.nextNode()),i}function Zr(t,e=!0){Oe(Vs(t,e))}function Yp(t,e){const n=s.useRef(e);s.useEffect(()=>{if(n.current){re=t;const r=Q(t.current?t.current[0]:void 0);!ke(ne(r),re.current)&&t.current&&Zr(t.current)}n.current=!1},[t])}function Xp(t,e,n){J(()=>{if(e||n)return;let r=t.current;const o=Q(r?r[0]:void 0);let i=l=>{let a=F(l);ke(a,t.current)?re=t:Bs(a)||(re=null)};return o.addEventListener("focusin",i,!1),r==null||r.forEach(l=>l.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),r==null||r.forEach(l=>l.removeEventListener("focusin",i,!1))}},[t,e,n])}function Gi(t){let e=ce.getTreeNode(re);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function Zp(t,e,n){const r=s.useRef(typeof document<"u"?ne(Q(t.current?t.current[0]:void 0)):null);J(()=>{let o=t.current;const i=Q(o?o[0]:void 0);if(!e||n)return;let l=()=>{(!re||jn(re,t))&&ke(ne(i),t.current)&&(re=t)};return i.addEventListener("focusin",l,!1),o==null||o.forEach(a=>a.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),o==null||o.forEach(a=>a.removeEventListener("focusin",l,!1))}},[t,n]),J(()=>{const o=Q(t.current?t.current[0]:void 0);if(!e)return;let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!Ot(t)||l.isComposing)return;let a=o.activeElement;if(!We(a,t)||!Gi(t))return;let c=ce.getTreeNode(t);if(!c)return;let u=c.nodeToRestore,d=Fe(o.body,{tabbable:!0});d.currentNode=a;let f=l.shiftKey?d.previousNode():d.nextNode();if((!u||!u.isConnected||u===o.body)&&(u=void 0,c.nodeToRestore=void 0),(!f||!We(f,t))&&u){d.currentNode=u;do f=l.shiftKey?d.previousNode():d.nextNode();while(We(f,t));l.preventDefault(),l.stopPropagation(),f?Oe(f,!0):Bs(u)?Oe(u,!0):a.blur()}};return n||o.addEventListener("keydown",i,!0),()=>{n||o.removeEventListener("keydown",i,!0)}},[t,e,n]),J(()=>{const o=Q(t.current?t.current[0]:void 0);if(!e)return;let i=ce.getTreeNode(t);if(i)return i.nodeToRestore=r.current??void 0,()=>{let l=ce.getTreeNode(t);if(!l)return;let a=l.nodeToRestore,c=ne(o);if(e&&a&&(c&&We(c,t)||c===o.body&&Gi(t))){let u=ce.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let d=u.getTreeNode(t);for(;d;){if(d.nodeToRestore&&d.nodeToRestore.isConnected){Ui(d.nodeToRestore);return}d=d.parent}for(d=u.getTreeNode(t);d;){if(d.scopeRef&&d.scopeRef.current&&ce.getTreeNode(d.scopeRef)){let f=Vs(d.scopeRef.current,!0);Ui(f);return}d=d.parent}}})}}},[t,e])}function Ui(t){t.dispatchEvent(new CustomEvent(Xr,{bubbles:!0,cancelable:!0}))&&Oe(t)}function Fe(t,e,n){let r=e!=null&&e.tabbable?es:Eo,o=(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null,i=Q(o),l=ql(i,t||i,NodeFilter.SHOW_ELEMENT,{acceptNode(a){return H(e==null?void 0:e.from,a)||e!=null&&e.tabbable&&a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(!Up(a)||l.currentNode.tagName==="INPUT"&&l.currentNode.type==="radio"&&l.currentNode.name===a.name)?NodeFilter.FILTER_REJECT:r(a)&&(!n||ke(a,n))&&(!(e!=null&&e.accept)||e.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(l.currentNode=e.from),l}class Io{constructor(){this.fastMap=new Map,this.root=new Jr({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let o=this.fastMap.get(n??null);if(!o)return;let i=new Jr({scopeRef:e});o.addChild(i),i.parent=o,this.fastMap.set(e,i),r&&(i.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&ke(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let o=n.children;r&&(r.removeChild(n),o.size>0&&o.forEach(i=>r&&r.addChild(i))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var n;let e=new Io;for(let r of this.traverse())e.addTreeNode(r.scopeRef,((n=r.parent)==null?void 0:n.scopeRef)??null,r.nodeToRestore);return e}}class Jr{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let ce=new Io;function Jp(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:o}=t,i=s.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=Pe(c=>{n&&hn(c,e)&&(o&&o(c),i.current.isPointerDown=!0)}),a=Pe(c=>{n&&n(c)});s.useEffect(()=>{let c=i.current;if(r)return;const u=e.current,d=Q(u);if(typeof PointerEvent<"u"){let f=m=>{c.isPointerDown&&hn(m,e)&&a(m),c.isPointerDown=!1};return d.addEventListener("pointerdown",l,!0),d.addEventListener("click",f,!0),()=>{d.removeEventListener("pointerdown",l,!0),d.removeEventListener("click",f,!0)}}else if(process.env.NODE_ENV==="test"){let f=h=>{c.ignoreEmulatedMouseEvents?c.ignoreEmulatedMouseEvents=!1:c.isPointerDown&&hn(h,e)&&a(h),c.isPointerDown=!1},m=h=>{c.ignoreEmulatedMouseEvents=!0,c.isPointerDown&&hn(h,e)&&a(h),c.isPointerDown=!1};return d.addEventListener("mousedown",l,!0),d.addEventListener("mouseup",f,!0),d.addEventListener("touchstart",l,!0),d.addEventListener("touchend",m,!0),()=>{d.removeEventListener("mousedown",l,!0),d.removeEventListener("mouseup",f,!0),d.removeEventListener("touchstart",l,!0),d.removeEventListener("touchend",m,!0)}}},[e,r])}function hn(t,e){if(t.button>0)return!1;let n=F(t);if(n){const r=n.ownerDocument;if(!r||!H(r.documentElement,n)||n.closest("[data-react-aria-top-layer]"))return!1}return e.current?!t.composedPath().includes(e.current):!1}const Ie=[];function zs(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:a}=t,c=s.useRef(void 0);s.useEffect(()=>{if(o&&!Ie.includes(e))return Ie.push(e),()=>{let g=Ie.indexOf(e);g>=0&&Ie.splice(g,1)}},[o,e]);let u=()=>{Ie[Ie.length-1]===e&&n&&n()},d=g=>{const y=Ie[Ie.length-1];c.current=y,(!a||a(F(g)))&&y===e&&g.stopPropagation()},f=g=>{(!a||a(F(g)))&&(Ie[Ie.length-1]===e&&g.stopPropagation(),c.current===e&&u()),c.current=void 0},m=g=>{g.key==="Escape"&&!l&&!g.nativeEvent.isComposing&&(g.stopPropagation(),g.preventDefault(),u())};Jp({ref:e,onInteractOutside:i&&o?f:void 0,onInteractOutsideStart:d});let{focusWithinProps:h}=Mo({isDisabled:!r,onBlurWithin:g=>{!g.relatedTarget||qp(g.relatedTarget)||(!a||a(g.relatedTarget))&&(n==null||n())}});return{overlayProps:{onKeyDown:m,...h},underlayProps:{}}}const Vt=typeof document<"u"&&window.visualViewport;let mn=0,Cr;function Hs(t={}){let{isDisabled:e}=t;J(()=>{if(!e)return mn++,mn===1&&(lt()?Cr=eh():Cr=Qp()),()=>{mn--,mn===0&&Cr()}},[e])}function Qp(){let t=window.innerWidth-document.documentElement.clientWidth;return Qt(t>0&&("scrollbarGutter"in document.documentElement.style?En(document.documentElement,"scrollbarGutter","stable"):En(document.documentElement,"paddingRight",`${t}px`)),En(document.documentElement,"overflow","hidden"))}function eh(){let t=En(document.documentElement,"overflow","hidden"),e,n=!1,r=d=>{let f=F(d);e=st(f)?f:Jl(f,!0),n=!1;let m=f.ownerDocument.defaultView.getSelection();m&&!m.isCollapsed&&m.containsNode(f,!0)&&(n=!0),d.composedPath().some(h=>h instanceof HTMLInputElement&&h.type==="range")&&(n=!0),"selectionStart"in f&&"selectionEnd"in f&&f.selectionStart<f.selectionEnd&&f.ownerDocument.activeElement===f&&(n=!0)},o=document.createElement("style"),i=ns();i&&(o.nonce=i),o.textContent=`
|
|
8
8
|
@layer {
|
|
9
9
|
* {
|
|
10
10
|
overscroll-behavior: contain;
|
|
11
11
|
}
|
|
12
|
-
}`.trim(),document.head.prepend(o);let l=d=>{if(!(d.touches.length===2||n)){if(!e||e===document.documentElement||e===document.body){d.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&d.preventDefault()}},a=d=>{var h;let f=F(d),b=d.relatedTarget;if(b&&jt(b))b.focus({preventScroll:!0}),Fi(b,jt(f));else if(!b){let g=(h=f.parentElement)==null?void 0:h.closest("[tabindex]");g==null||g.focus({preventScroll:!0})}},c=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(d){let f=ne(),b=f!=null&&jt(f);c.call(this,{...d,preventScroll:!0}),(!d||!d.preventScroll)&&Fi(this,b)};let u=Jt(Cr(document,"touchstart",r,{passive:!1,capture:!0}),Cr(document,"touchmove",l,{passive:!1,capture:!0}),Cr(document,"blur",a,!0));return()=>{t(),u(),o.remove(),HTMLElement.prototype.focus=c}}function En(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function Cr(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function Fi(t,e){e||!Bt?ji(t):Bt.addEventListener("resize",()=>ji(t),{once:!0})}function ji(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=zl(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let o=r.getBoundingClientRect(),i=n.getBoundingClientRect();if(i.top<o.top||i.bottom>o.top+n.clientHeight){let l=o.bottom;Bt&&(l=Math.min(l,Bt.offsetTop+Bt.height));let a=i.top-o.top-((l-o.top)/2-i.height/2);r.scrollTo({top:Math.max(0,Math.min(r.scrollHeight-r.clientHeight,r.scrollTop+a)),behavior:"smooth"})}}n=r.parentElement}}function _p(t,e){let{triggerRef:n,popoverRef:r,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:a,...c}=t,u=c.trigger==="SubmenuTrigger",{overlayProps:d,underlayProps:f}=Is({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i||u,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:a},o??r),{overlayProps:b,arrowProps:h,placement:g,triggerAnchorPoint:y}=Pp({...c,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:i&&!u?e.close:null});return Ks({isDisabled:i||!e.isOpen}),s.useEffect(()=>{if(e.isOpen&&r.current)return i?mp((o==null?void 0:o.current)??r.current):Ts([(o==null?void 0:o.current)??r.current],{shouldUseInert:!0})},[i,e.isOpen,r,o]),{popoverProps:Y(d,b),arrowProps:h,underlayProps:f,placement:g,triggerAnchorPoint:y}}var Os={};Os={dismiss:"تجاهل"};var As={};As={dismiss:"Отхвърляне"};var Fs={};Fs={dismiss:"Odstranit"};var js={};js={dismiss:"Luk"};var _s={};_s={dismiss:"Schließen"};var Bs={};Bs={dismiss:"Απόρριψη"};var Vs={};Vs={dismiss:"Dismiss"};var zs={};zs={dismiss:"Descartar"};var Hs={};Hs={dismiss:"Lõpeta"};var Gs={};Gs={dismiss:"Hylkää"};var Us={};Us={dismiss:"Rejeter"};var Ws={};Ws={dismiss:"התעלם"};var qs={};qs={dismiss:"Odbaci"};var Ys={};Ys={dismiss:"Elutasítás"};var Xs={};Xs={dismiss:"Ignora"};var Zs={};Zs={dismiss:"閉じる"};var Js={};Js={dismiss:"무시"};var Qs={};Qs={dismiss:"Atmesti"};var ea={};ea={dismiss:"Nerādīt"};var ta={};ta={dismiss:"Lukk"};var na={};na={dismiss:"Negeren"};var ra={};ra={dismiss:"Zignoruj"};var oa={};oa={dismiss:"Descartar"};var ia={};ia={dismiss:"Dispensar"};var la={};la={dismiss:"Revocare"};var sa={};sa={dismiss:"Пропустить"};var aa={};aa={dismiss:"Zrušiť"};var ca={};ca={dismiss:"Opusti"};var ua={};ua={dismiss:"Odbaci"};var da={};da={dismiss:"Avvisa"};var fa={};fa={dismiss:"Kapat"};var pa={};pa={dismiss:"Скасувати"};var ha={};ha={dismiss:"取消"};var ba={};ba={dismiss:"關閉"};var ma={};ma={"ar-AE":Os,"bg-BG":As,"cs-CZ":Fs,"da-DK":js,"de-DE":_s,"el-GR":Bs,"en-US":Vs,"es-ES":zs,"et-EE":Hs,"fi-FI":Gs,"fr-FR":Us,"he-IL":Ws,"hr-HR":qs,"hu-HU":Ys,"it-IT":Xs,"ja-JP":Zs,"ko-KR":Js,"lt-LT":Qs,"lv-LV":ea,"nb-NO":ta,"nl-NL":na,"pl-PL":ra,"pt-BR":oa,"pt-PT":ia,"ro-RO":la,"ru-RU":sa,"sk-SK":aa,"sl-SI":ca,"sr-SP":ua,"sv-SE":da,"tr-TR":fa,"uk-UA":pa,"zh-CN":ha,"zh-TW":ba};const Bp=Symbol.for("react-aria.i18n.locale"),Vp=Symbol.for("react-aria.i18n.strings");let pt;class Qn{constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}getStringForLocale(e,n){let o=this.getStringsForLocale(n)[e];if(!o)throw new Error(`Could not find intl message ${e} in ${n} locale`);return o}getStringsForLocale(e){let n=this.strings[e];return n||(n=zp(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[Bp];if(pt===void 0){let o=window[Vp];if(!o)return null;pt={};for(let i in o)pt[i]=new Qn({[n]:o[i]},n)}let r=pt==null?void 0:pt[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}function zp(t,e,n="en-US"){if(e[t])return e[t];let r=Hp(t);if(e[r])return e[r];for(let o in e)if(o.startsWith(r+"-"))return e[o];return e[n]}function Hp(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const _i=new Map,Bi=new Map;class Gp{constructor(e,n){this.locale=e,this.strings=n}format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let o=n["="+e];if(o)return typeof o=="function"?o():o;let i=this.locale+":"+r,l=_i.get(i);l||(l=new Intl.PluralRules(this.locale,{type:r}),_i.set(i,l));let a=l.select(e);return o=n[a]||n.other,typeof o=="function"?o():o}number(e){let n=Bi.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Bi.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}}const Vi=new WeakMap;function Up(t){let e=Vi.get(t);return e||(e=new Qn(t),Vi.set(t,e)),e}function Wp(t,e){return e&&Qn.getGlobalDictionaryForPackage(e)||Up(t)}function ga(t,e){let{locale:n}=dt(),r=Wp(t,e);return s.useMemo(()=>new Gp(n,r),[n,r])}const zi={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function qp(t={}){let{style:e,isFocusable:n}=t,[r,o]=s.useState(!1),{focusWithinProps:i}=Co({isDisabled:!n,onFocusWithinChange:a=>o(a)}),l=s.useMemo(()=>r?e:e?{...zi,...e}:zi,[r]);return{visuallyHiddenProps:{...i,style:l}}}function ya(t){let{children:e,elementType:n="div",isFocusable:r,style:o,...i}=t,{visuallyHiddenProps:l}=qp(t);return s.createElement(n,Y(i,l),e)}function Yp(t){return t&&t.__esModule?t.default:t}function Xr(t){let{onDismiss:e,...n}=t,r=ga(Yp(ma),"@react-aria/overlays"),o=Vl(n,r.format("dismiss")),i=()=>{e&&e()};return s.createElement(ya,null,s.createElement("button",{...o,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}const va=s.forwardRef(({children:t,...e},n)=>{let r=s.useRef(!1),o=s.useContext(Ut),i=Y(o||{},{...e,register(){r.current=!0,o&&o.register()}});return i.ref=Je(n||(o==null?void 0:o.ref)),ho(o,i.ref),s.useEffect(()=>{r.current||(process.env.NODE_ENV!=="production"&&console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),r.current=!0)},[]),s.createElement(Ut.Provider,{value:i},t)});function Xp({children:t}){let e=s.useMemo(()=>({register:()=>{}}),[]);return s.createElement(Ut.Provider,{value:e},t)}const Zp=s.createContext({});function Jp(){return s.useContext(Zp)??{}}const xa=s.createContext(null);function Zr(t){let e=Ze(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[o,i]=s.useState(!1),l=s.useMemo(()=>({contain:o,setContain:i}),[o,i]),{getContainer:a}=Jp();if(!t.portalContainer&&a&&(n=a()),!n)return null;let c=t.children;return t.disableFocusManagement||(c=s.createElement(Rs,{restoreFocus:!0,contain:(t.shouldContainFocus||o)&&!r},c)),c=s.createElement(xa.Provider,{value:l},s.createElement(Xp,null,c)),Xt.createPortal(c,n)}function $a(){let t=s.useContext(xa),e=t==null?void 0:t.setContain;J(()=>{e==null||e(!0)},[e])}function To(t){let[e,n]=Xn(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=s.useCallback(()=>{n(!0)},[n]),o=s.useCallback(()=>{n(!1)},[n]),i=s.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:o,toggle:i}}const er=s.createContext(null),Hi=s.createContext(null),Qp=s.forwardRef(function(e,n){[e,n]=Me(e,n,er);let r=s.useContext(Qe),o=To(e),i=e.isOpen!=null||e.defaultOpen!=null||!r?o:r,l=Ir(n,i.isOpen)||e.isExiting||!1,a=ds(),{direction:c}=dt();if(a){let u=e.children;return typeof u=="function"&&(u=u({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),s.createElement(s.Fragment,null,u)}return i&&!i.isOpen&&!l?null:s.createElement(eh,{...e,triggerRef:e.triggerRef,state:i,popoverRef:n,isExiting:l,dir:c})});function eh({state:t,isExiting:e,UNSTABLE_portalContainer:n,clearContexts:r,...o}){var C,K;let i=s.useRef(null),l=s.useRef(null),a=s.useContext(Hi),c=a&&o.trigger==="SubmenuTrigger",{popoverProps:u,underlayProps:d,arrowProps:f,placement:b,triggerAnchorPoint:h}=_p({...o,offset:o.offset??8,arrowRef:i,groupRef:c?a:l},t),g=o.popoverRef,y=bo(g,!!b)||o.isEntering||!1,v=Te({...o,defaultClassName:"react-aria-Popover",values:{trigger:o.trigger||null,placement:b,isEntering:y,isExiting:e}}),w=!o.isNonModal||o.trigger==="SubmenuTrigger",[x,M]=s.useState(!1);J(()=>{g.current&&M(w&&!g.current.querySelector("[role=dialog]"))},[g,w]),s.useEffect(()=>{x&&(o.trigger!=="SubmenuTrigger"||Gt()!=="pointer")&&g.current&&!$t(g.current)&&Ye(g.current)},[x,g,o.trigger]);let D=s.useMemo(()=>{let j=v.children;if(r)for(let A of r)j=s.createElement(A.Provider,{value:null},j);return j},[v.children,r]),[L,_]=s.useState(null),E=s.useCallback(()=>{o.triggerRef.current&&_(o.triggerRef.current.getBoundingClientRect().width+"px")},[o.triggerRef]);J(E,[E]),Tn({ref:(C=v.style)!=null&&C["--trigger-width"]?void 0:o.triggerRef,onResize:E});let P={...u.style,"--trigger-anchor-point":h?`${h.x}px ${h.y}px`:void 0,...v.style,"--trigger-width":((K=v.style)==null?void 0:K["--trigger-width"])||L},N=s.createElement(he.div,{...Y(ae(o,{global:!0}),u),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"],ref:g,slot:o.slot||void 0,style:P,dir:o.dir,"data-trigger":o.trigger,"data-placement":b,"data-entering":y||void 0,"data-exiting":e||void 0},!o.isNonModal&&s.createElement(Xr,{onDismiss:t.close}),s.createElement(hp.Provider,{value:{...f,placement:b,ref:i}},D),s.createElement(Xr,{onDismiss:t.close}));return c?s.createElement(Zr,{...o,shouldContainFocus:x,isExiting:e,portalContainer:n??(a==null?void 0:a.current)??void 0},N):s.createElement(Zr,{...o,shouldContainFocus:x,isExiting:e,portalContainer:n},!o.isNonModal&&t.isOpen&&s.createElement("div",{"data-testid":"underlay",...d,style:{position:"fixed",inset:0}}),s.createElement("div",{ref:l,style:{display:"contents"}},s.createElement(Hi.Provider,{value:l},N)))}class St{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,n,r){let o=this.clone();return n.addDescendants(o,e),o}}class wa extends St{filter(e,n,r){let[o,i]=Ea(e,n,this.firstChildKey,r),l=this.clone();return l.firstChildKey=o,l.lastChildKey=i,l}}const Bo=class Bo extends St{};Bo.type="header";let Gi=Bo;const Vo=class Vo extends St{};Vo.type="loader";let Ui=Vo;const zo=class zo extends wa{filter(e,n,r){if(r(this.textValue,this)){let o=this.clone();return n.addDescendants(o,e),o}return null}};zo.type="item";let Jr=zo;const Ho=class Ho extends wa{filter(e,n,r){let o=super.filter(e,n,r);if(o&&o.lastChildKey!==null){let i=e.getItem(o.lastChildKey);if(i&&i.type!=="header")return o}return null}};Ho.type="section";let Qr=Ho;class th{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),o=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?n.get(o.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);return(n==null?void 0:n.key)??null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);return(e==null?void 0:e.key)??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n.itemCount=this.itemCount,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");e.type==="item"&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,n){this.addNode(e);let r=n.getChildren(e.key);for(let o of r)this.addDescendants(o,n)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let n=this.keyMap.get(e);n!=null&&n.type==="item"&&this.itemCount--,this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}filter(e){let n=new this.constructor,[r,o]=Ea(this,n,this.firstKey,e);return n==null||n.commit(r,o),n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function Ea(t,e,n,r){if(n==null)return[null,null];let o=null,i=null,l=t.getItem(n);for(;l!=null;){let a=l.filter(t,e,r);a!=null&&(a.nextKey=null,i&&(a.prevKey=i.key,i.nextKey=a.key),o==null&&(o=a),e.addNode(a),i=a),l=l.nextKey!=null?t.getItem(l.nextKey):null}if(i&&i.type==="separator"){let a=i.prevKey;e.removeNode(i.key),a!=null?(i=e.getItem(a),i.nextKey=null):i=null}return[(o==null?void 0:o.key)??null,(i==null?void 0:i.key)??null]}class Ca{constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)==null?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index-1,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}}class vt extends Ca{constructor(e,n){super(n),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){var e;return this.parentNode instanceof vt?this.parentNode.level+(((e=this.parentNode.node)==null?void 0:e.type)==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){var r,o,i,l,a,c,u,d;let e=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof vt?((r=this.parentNode.node)==null?void 0:r.key)??null:null,n.prevKey=((i=(o=this.previousVisibleSibling)==null?void 0:o.node)==null?void 0:i.key)??null,n.nextKey=((l=e==null?void 0:e.node)==null?void 0:l.key)??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=((c=(a=this.firstVisibleChild)==null?void 0:a.node)==null?void 0:c.key)??null,n.lastChildKey=((d=(u=this.lastVisibleChild)==null?void 0:u.node)==null?void 0:d.key)??null,(n.colSpan!=null||n.colIndex!=null)&&e)){let f=(n.colIndex??n.index)+(n.colSpan??1);if(e.node!=null&&f!==e.node.colIndex){let b=e.getMutableNode();b.colIndex=f}}}setProps(e,n,r,o,i){let l,{value:a,textValue:c,id:u,...d}=e;if(this.node==null?(l=new r(u??`react-aria-${++this.ownerDocument.nodeId}`),this.node=l):l=this.getMutableNode(),d.ref=n,l.props=d,l.rendered=o,l.render=i,l.value=a,e["aria-label"]&&(l["aria-label"]=e["aria-label"]),l.textValue=c||(typeof d.children=="string"?d.children:"")||e["aria-label"]||"",u!=null&&u!==l.key)throw new Error("Cannot change the id of an item");d.colSpan!=null&&(l.colSpan=d.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(n){var o,i;let r=n==="none";if(e.isHidden!==r){(((o=e.parentNode)==null?void 0:o.firstVisibleChild)===e||((i=e.parentNode)==null?void 0:i.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let l=e.previousVisibleSibling,a=e.nextVisibleSibling;l&&e.ownerDocument.markDirty(l),a&&e.ownerDocument.markDirty(a),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class nh extends Ca{constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}get isConnected(){return!0}createElement(e){return new vt(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let n=this.getMutableCollection();if(!n.getItem(e.node.key))for(let r of e)this.addNode(r);n.addNode(e.node)}removeNode(e){for(let n of e)this.removeNode(n);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){var e,n,r,o;for(let i of this.dirtyNodes)i instanceof vt&&(!i.isConnected||i.isHidden)?this.removeNode(i):i.updateChildIndices();for(let i of this.dirtyNodes)i instanceof vt?(i.isConnected&&!i.isHidden&&(i.updateNode(),this.addNode(i)),i.node&&this.dirtyNodes.delete(i),i.isMutated=!1):this.dirtyNodes.delete(i);this.nextCollection&&(this.nextCollection.commit(((n=(e=this.firstVisibleChild)==null?void 0:e.node)==null?void 0:n.key)??null,((o=(r=this.lastVisibleChild)==null?void 0:r.node)==null?void 0:o.key)??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function Sa(t){let{children:e,items:n,idScope:r,addIdAndValue:o,dependencies:i=[]}=t,l=s.useMemo(()=>process.env.NODE_ENV!=="production"&&typeof e=="function"?e.toString():void 0,[e]),a=s.useMemo(()=>new WeakMap,[...i,l]);return s.useMemo(()=>{if(n&&typeof e=="function"){let c=[];for(let u of n){let d=rh(u)?u:null,f=d?a.get(d):null;if(!f){f=e(u);let b=f.props.id??(u==null?void 0:u.key)??(u==null?void 0:u.id);r!=null&&f.props.id==null&&b!=null&&(b=r+":"+b);let h=b??c.length;f=s.cloneElement(f,o?{key:h,id:b,value:u}:{key:h}),d&&a.set(d,f)}c.push(f)}return c}else if(typeof e!="function")return e},[e,n,a,r,o])}function rh(t){switch(typeof t){case"object":return t!=null;case"function":case"symbol":return!0;default:return!1}}var mn={exports:{}},Sr={};/**
|
|
12
|
+
}`.trim(),document.head.prepend(o);let l=d=>{if(!(d.touches.length===2||n)){if(!e||e===document.documentElement||e===document.body){d.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&d.preventDefault()}},a=d=>{var h;let f=F(d),m=d.relatedTarget;if(m&&_t(m))m.focus({preventScroll:!0}),Wi(m,_t(f));else if(!m){let g=(h=f.parentElement)==null?void 0:h.closest("[tabindex]");g==null||g.focus({preventScroll:!0})}},c=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(d){let f=ne(),m=f!=null&&_t(f);c.call(this,{...d,preventScroll:!0}),(!d||!d.preventScroll)&&Wi(this,m)};let u=Qt(Pr(document,"touchstart",r,{passive:!1,capture:!0}),Pr(document,"touchmove",l,{passive:!1,capture:!0}),Pr(document,"blur",a,!0));return()=>{t(),u(),o.remove(),HTMLElement.prototype.focus=c}}function En(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function Pr(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function Wi(t,e){e||!Vt?qi(t):Vt.addEventListener("resize",()=>qi(t),{once:!0})}function qi(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Jl(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let o=r.getBoundingClientRect(),i=n.getBoundingClientRect();if(i.top<o.top||i.bottom>o.top+n.clientHeight){let l=o.bottom;Vt&&(l=Math.min(l,Vt.offsetTop+Vt.height));let a=i.top-o.top-((l-o.top)/2-i.height/2);r.scrollTo({top:Math.max(0,Math.min(r.scrollHeight-r.clientHeight,r.scrollTop+a)),behavior:"smooth"})}}n=r.parentElement}}function th(t,e){let{triggerRef:n,popoverRef:r,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:a,...c}=t,u=c.trigger==="SubmenuTrigger",{overlayProps:d,underlayProps:f}=zs({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i||u,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:a},o??r),{overlayProps:m,arrowProps:h,placement:g,triggerAnchorPoint:y}=Bp({...c,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:i&&!u?e.close:null});return Hs({isDisabled:i||!e.isOpen}),s.useEffect(()=>{if(e.isOpen&&r.current)return i?Dp((o==null?void 0:o.current)??r.current):Os([(o==null?void 0:o.current)??r.current],{shouldUseInert:!0})},[i,e.isOpen,r,o]),{popoverProps:Y(d,m),arrowProps:h,underlayProps:f,placement:g,triggerAnchorPoint:y}}var Gs={};Gs={dismiss:"تجاهل"};var Us={};Us={dismiss:"Отхвърляне"};var Ws={};Ws={dismiss:"Odstranit"};var qs={};qs={dismiss:"Luk"};var Ys={};Ys={dismiss:"Schließen"};var Xs={};Xs={dismiss:"Απόρριψη"};var Zs={};Zs={dismiss:"Dismiss"};var Js={};Js={dismiss:"Descartar"};var Qs={};Qs={dismiss:"Lõpeta"};var ea={};ea={dismiss:"Hylkää"};var ta={};ta={dismiss:"Rejeter"};var na={};na={dismiss:"התעלם"};var ra={};ra={dismiss:"Odbaci"};var oa={};oa={dismiss:"Elutasítás"};var ia={};ia={dismiss:"Ignora"};var la={};la={dismiss:"閉じる"};var sa={};sa={dismiss:"무시"};var aa={};aa={dismiss:"Atmesti"};var ca={};ca={dismiss:"Nerādīt"};var ua={};ua={dismiss:"Lukk"};var da={};da={dismiss:"Negeren"};var fa={};fa={dismiss:"Zignoruj"};var pa={};pa={dismiss:"Descartar"};var ha={};ha={dismiss:"Dispensar"};var ma={};ma={dismiss:"Revocare"};var ba={};ba={dismiss:"Пропустить"};var ga={};ga={dismiss:"Zrušiť"};var ya={};ya={dismiss:"Opusti"};var va={};va={dismiss:"Odbaci"};var xa={};xa={dismiss:"Avvisa"};var $a={};$a={dismiss:"Kapat"};var wa={};wa={dismiss:"Скасувати"};var Ea={};Ea={dismiss:"取消"};var Sa={};Sa={dismiss:"關閉"};var Ca={};Ca={"ar-AE":Gs,"bg-BG":Us,"cs-CZ":Ws,"da-DK":qs,"de-DE":Ys,"el-GR":Xs,"en-US":Zs,"es-ES":Js,"et-EE":Qs,"fi-FI":ea,"fr-FR":ta,"he-IL":na,"hr-HR":ra,"hu-HU":oa,"it-IT":ia,"ja-JP":la,"ko-KR":sa,"lt-LT":aa,"lv-LV":ca,"nb-NO":ua,"nl-NL":da,"pl-PL":fa,"pt-BR":pa,"pt-PT":ha,"ro-RO":ma,"ru-RU":ba,"sk-SK":ga,"sl-SI":ya,"sr-SP":va,"sv-SE":xa,"tr-TR":$a,"uk-UA":wa,"zh-CN":Ea,"zh-TW":Sa};const nh=Symbol.for("react-aria.i18n.locale"),rh=Symbol.for("react-aria.i18n.strings");let ft;class er{constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}getStringForLocale(e,n){let o=this.getStringsForLocale(n)[e];if(!o)throw new Error(`Could not find intl message ${e} in ${n} locale`);return o}getStringsForLocale(e){let n=this.strings[e];return n||(n=oh(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[nh];if(ft===void 0){let o=window[rh];if(!o)return null;ft={};for(let i in o)ft[i]=new er({[n]:o[i]},n)}let r=ft==null?void 0:ft[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}function oh(t,e,n="en-US"){if(e[t])return e[t];let r=ih(t);if(e[r])return e[r];for(let o in e)if(o.startsWith(r+"-"))return e[o];return e[n]}function ih(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const Yi=new Map,Xi=new Map;class lh{constructor(e,n){this.locale=e,this.strings=n}format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let o=n["="+e];if(o)return typeof o=="function"?o():o;let i=this.locale+":"+r,l=Yi.get(i);l||(l=new Intl.PluralRules(this.locale,{type:r}),Yi.set(i,l));let a=l.select(e);return o=n[a]||n.other,typeof o=="function"?o():o}number(e){let n=Xi.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Xi.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}}const Zi=new WeakMap;function sh(t){let e=Zi.get(t);return e||(e=new er(t),Zi.set(t,e)),e}function ah(t,e){return e&&er.getGlobalDictionaryForPackage(e)||sh(t)}function Pa(t,e){let{locale:n}=ut(),r=ah(t,e);return s.useMemo(()=>new lh(n,r),[n,r])}const Ji={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function ch(t={}){let{style:e,isFocusable:n}=t,[r,o]=s.useState(!1),{focusWithinProps:i}=Mo({isDisabled:!n,onFocusWithinChange:a=>o(a)}),l=s.useMemo(()=>r?e:e?{...Ji,...e}:Ji,[r]);return{visuallyHiddenProps:{...i,style:l}}}function ka(t){let{children:e,elementType:n="div",isFocusable:r,style:o,...i}=t,{visuallyHiddenProps:l}=ch(t);return s.createElement(n,Y(i,l),e)}function uh(t){return t&&t.__esModule?t.default:t}function Qr(t){let{onDismiss:e,...n}=t,r=Pa(uh(Ca),"@react-aria/overlays"),o=Zl(n,r.format("dismiss")),i=()=>{e&&e()};return s.createElement(ka,null,s.createElement("button",{...o,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}const Ta=s.forwardRef(({children:t,...e},n)=>{let r=s.useRef(!1),o=s.useContext(Wt),i=Y(o||{},{...e,register(){r.current=!0,o&&o.register()}});return i.ref=Je(n||(o==null?void 0:o.ref)),vo(o,i.ref),s.useEffect(()=>{r.current||(process.env.NODE_ENV!=="production"&&console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),r.current=!0)},[]),s.createElement(Wt.Provider,{value:i},t)});function dh({children:t}){let e=s.useMemo(()=>({register:()=>{}}),[]);return s.createElement(Wt.Provider,{value:e},t)}const fh=s.createContext({});function ph(){return s.useContext(fh)??{}}const Ma=s.createContext(null);function eo(t){let e=Ze(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[o,i]=s.useState(!1),l=s.useMemo(()=>({contain:o,setContain:i}),[o,i]),{getContainer:a}=ph();if(!t.portalContainer&&a&&(n=a()),!n)return null;let c=t.children;return t.disableFocusManagement||(c=s.createElement(_s,{restoreFocus:!0,contain:(t.shouldContainFocus||o)&&!r},c)),c=s.createElement(Ma.Provider,{value:l},s.createElement(dh,null,c)),Zt.createPortal(c,n)}function Ra(){let t=s.useContext(Ma),e=t==null?void 0:t.setContain;J(()=>{e==null||e(!0)},[e])}function No(t){let[e,n]=Zn(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=s.useCallback(()=>{n(!0)},[n]),o=s.useCallback(()=>{n(!1)},[n]),i=s.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:o,toggle:i}}const tr=s.createContext(null),Qi=s.createContext(null),hh=s.forwardRef(function(e,n){[e,n]=Me(e,n,tr);let r=s.useContext(Qe),o=No(e),i=e.isOpen!=null||e.defaultOpen!=null||!r?o:r,l=Or(n,i.isOpen)||e.isExiting||!1,a=xs(),{direction:c}=ut();if(a){let u=e.children;return typeof u=="function"&&(u=u({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),s.createElement(s.Fragment,null,u)}return i&&!i.isOpen&&!l?null:s.createElement(mh,{...e,triggerRef:e.triggerRef,state:i,popoverRef:n,isExiting:l,dir:c})});function mh({state:t,isExiting:e,UNSTABLE_portalContainer:n,clearContexts:r,...o}){var C,K;let i=s.useRef(null),l=s.useRef(null),a=s.useContext(Qi),c=a&&o.trigger==="SubmenuTrigger",{popoverProps:u,underlayProps:d,arrowProps:f,placement:m,triggerAnchorPoint:h}=th({...o,offset:o.offset??8,arrowRef:i,groupRef:c?a:l},t),g=o.popoverRef,y=xo(g,!!m)||o.isEntering||!1,v=Te({...o,defaultClassName:"react-aria-Popover",values:{trigger:o.trigger||null,placement:m,isEntering:y,isExiting:e}}),w=!o.isNonModal||o.trigger==="SubmenuTrigger",[x,M]=s.useState(!1);J(()=>{g.current&&M(w&&!g.current.querySelector("[role=dialog]"))},[g,w]),s.useEffect(()=>{x&&(o.trigger!=="SubmenuTrigger"||Ut()!=="pointer")&&g.current&&!xt(g.current)&&Ye(g.current)},[x,g,o.trigger]);let R=s.useMemo(()=>{let _=v.children;if(r)for(let O of r)_=s.createElement(O.Provider,{value:null},_);return _},[v.children,r]),[L,j]=s.useState(null),E=s.useCallback(()=>{o.triggerRef.current&&j(o.triggerRef.current.getBoundingClientRect().width+"px")},[o.triggerRef]);J(E,[E]),Tn({ref:(C=v.style)!=null&&C["--trigger-width"]?void 0:o.triggerRef,onResize:E});let S={...u.style,"--trigger-anchor-point":h?`${h.x}px ${h.y}px`:void 0,...v.style,"--trigger-width":((K=v.style)==null?void 0:K["--trigger-width"])||L},I=s.createElement(he.div,{...Y(ae(o,{global:!0}),u),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"],ref:g,slot:o.slot||void 0,style:S,dir:o.dir,"data-trigger":o.trigger,"data-placement":m,"data-entering":y||void 0,"data-exiting":e||void 0},!o.isNonModal&&s.createElement(Qr,{onDismiss:t.close}),s.createElement(Mp.Provider,{value:{...f,placement:m,ref:i}},R),s.createElement(Qr,{onDismiss:t.close}));return c?s.createElement(eo,{...o,shouldContainFocus:x,isExiting:e,portalContainer:n??(a==null?void 0:a.current)??void 0},I):s.createElement(eo,{...o,shouldContainFocus:x,isExiting:e,portalContainer:n},!o.isNonModal&&t.isOpen&&s.createElement("div",{"data-testid":"underlay",...d,style:{position:"fixed",inset:0}}),s.createElement("div",{ref:l,style:{display:"contents"}},s.createElement(Qi.Provider,{value:l},I)))}class Ct{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,n,r){let o=this.clone();return n.addDescendants(o,e),o}}class Da extends Ct{filter(e,n,r){let[o,i]=Ia(e,n,this.firstChildKey,r),l=this.clone();return l.firstChildKey=o,l.lastChildKey=i,l}}const Xo=class Xo extends Ct{};Xo.type="header";let el=Xo;const Zo=class Zo extends Ct{};Zo.type="loader";let tl=Zo;const Jo=class Jo extends Da{filter(e,n,r){if(r(this.textValue,this)){let o=this.clone();return n.addDescendants(o,e),o}return null}};Jo.type="item";let to=Jo;const Qo=class Qo extends Da{filter(e,n,r){let o=super.filter(e,n,r);if(o&&o.lastChildKey!==null){let i=e.getItem(o.lastChildKey);if(i&&i.type!=="header")return o}return null}};Qo.type="section";let no=Qo;class bh{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),o=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?n.get(o.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);return(n==null?void 0:n.key)??null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);return(e==null?void 0:e.key)??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n.itemCount=this.itemCount,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");e.type==="item"&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,n){this.addNode(e);let r=n.getChildren(e.key);for(let o of r)this.addDescendants(o,n)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let n=this.keyMap.get(e);n!=null&&n.type==="item"&&this.itemCount--,this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}filter(e){let n=new this.constructor,[r,o]=Ia(this,n,this.firstKey,e);return n==null||n.commit(r,o),n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function Ia(t,e,n,r){if(n==null)return[null,null];let o=null,i=null,l=t.getItem(n);for(;l!=null;){let a=l.filter(t,e,r);a!=null&&(a.nextKey=null,i&&(a.prevKey=i.key,i.nextKey=a.key),o==null&&(o=a),e.addNode(a),i=a),l=l.nextKey!=null?t.getItem(l.nextKey):null}if(i&&i.type==="separator"){let a=i.prevKey;e.removeNode(i.key),a!=null?(i=e.getItem(a),i.nextKey=null):i=null}return[(o==null?void 0:o.key)??null,(i==null?void 0:i.key)??null]}class Na{constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)==null?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index-1,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}}class yt extends Na{constructor(e,n){super(n),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){var e;return this.parentNode instanceof yt?this.parentNode.level+(((e=this.parentNode.node)==null?void 0:e.type)==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){var r,o,i,l,a,c,u,d;let e=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof yt?((r=this.parentNode.node)==null?void 0:r.key)??null:null,n.prevKey=((i=(o=this.previousVisibleSibling)==null?void 0:o.node)==null?void 0:i.key)??null,n.nextKey=((l=e==null?void 0:e.node)==null?void 0:l.key)??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=((c=(a=this.firstVisibleChild)==null?void 0:a.node)==null?void 0:c.key)??null,n.lastChildKey=((d=(u=this.lastVisibleChild)==null?void 0:u.node)==null?void 0:d.key)??null,(n.colSpan!=null||n.colIndex!=null)&&e)){let f=(n.colIndex??n.index)+(n.colSpan??1);if(e.node!=null&&f!==e.node.colIndex){let m=e.getMutableNode();m.colIndex=f}}}setProps(e,n,r,o,i){let l,{value:a,textValue:c,id:u,...d}=e;if(this.node==null?(l=new r(u??`react-aria-${++this.ownerDocument.nodeId}`),this.node=l):l=this.getMutableNode(),d.ref=n,l.props=d,l.rendered=o,l.render=i,l.value=a,e["aria-label"]&&(l["aria-label"]=e["aria-label"]),l.textValue=c||(typeof d.children=="string"?d.children:"")||e["aria-label"]||"",u!=null&&u!==l.key)throw new Error("Cannot change the id of an item");d.colSpan!=null&&(l.colSpan=d.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(n){var o,i;let r=n==="none";if(e.isHidden!==r){(((o=e.parentNode)==null?void 0:o.firstVisibleChild)===e||((i=e.parentNode)==null?void 0:i.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let l=e.previousVisibleSibling,a=e.nextVisibleSibling;l&&e.ownerDocument.markDirty(l),a&&e.ownerDocument.markDirty(a),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class gh extends Na{constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}get isConnected(){return!0}createElement(e){return new yt(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let n=this.getMutableCollection();if(!n.getItem(e.node.key))for(let r of e)this.addNode(r);n.addNode(e.node)}removeNode(e){for(let n of e)this.removeNode(n);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){var e,n,r,o;for(let i of this.dirtyNodes)i instanceof yt&&(!i.isConnected||i.isHidden)?this.removeNode(i):i.updateChildIndices();for(let i of this.dirtyNodes)i instanceof yt?(i.isConnected&&!i.isHidden&&(i.updateNode(),this.addNode(i)),i.node&&this.dirtyNodes.delete(i),i.isMutated=!1):this.dirtyNodes.delete(i);this.nextCollection&&(this.nextCollection.commit(((n=(e=this.firstVisibleChild)==null?void 0:e.node)==null?void 0:n.key)??null,((o=(r=this.lastVisibleChild)==null?void 0:r.node)==null?void 0:o.key)??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function La(t){let{children:e,items:n,idScope:r,addIdAndValue:o,dependencies:i=[]}=t,l=s.useMemo(()=>process.env.NODE_ENV!=="production"&&typeof e=="function"?e.toString():void 0,[e]),a=s.useMemo(()=>new WeakMap,[...i,l]);return s.useMemo(()=>{if(n&&typeof e=="function"){let c=[];for(let u of n){let d=yh(u)?u:null,f=d?a.get(d):null;if(!f){f=e(u);let m=f.props.id??(u==null?void 0:u.key)??(u==null?void 0:u.id);r!=null&&f.props.id==null&&m!=null&&(m=r+":"+m);let h=m??c.length;f=s.cloneElement(f,o?{key:h,id:m,value:u}:{key:h}),d&&a.set(d,f)}c.push(f)}return c}else if(typeof e!="function")return e},[e,n,a,r,o])}function yh(t){switch(typeof t){case"object":return t!=null;case"function":case"symbol":return!0;default:return!1}}var bn={exports:{}},kr={};/**
|
|
13
13
|
* @license React
|
|
14
14
|
* use-sync-external-store-shim.production.js
|
|
15
15
|
*
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the MIT license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/var
|
|
20
|
+
*/var nl;function vh(){if(nl)return kr;nl=1;var t=s;function e(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,l=t.useDebugValue;function a(f,m){var h=m(),g=r({inst:{value:h,getSnapshot:m}}),y=g[0].inst,v=g[1];return i(function(){y.value=h,y.getSnapshot=m,c(y)&&v({inst:y})},[f,h,m]),o(function(){return c(y)&&v({inst:y}),f(function(){c(y)&&v({inst:y})})},[f]),l(h),h}function c(f){var m=f.getSnapshot;f=f.value;try{var h=m();return!n(f,h)}catch{return!0}}function u(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return kr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,kr}var Tr={};/**
|
|
21
21
|
* @license React
|
|
22
22
|
* use-sync-external-store-shim.development.js
|
|
23
23
|
*
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
*
|
|
26
26
|
* This source code is licensed under the MIT license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/var qi;function ih(){return qi||(qi=1,process.env.NODE_ENV!=="production"&&(function(){function t(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}function e(h,g){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=g();if(!f){var v=g();i(y,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=l({inst:{value:y,getSnapshot:g}});var w=v[0].inst,x=v[1];return c(function(){w.value=y,w.getSnapshot=g,n(w)&&x({inst:w})},[h,y,g]),a(function(){return n(w)&&x({inst:w}),h(function(){n(w)&&x({inst:w})})},[h]),u(y),y}function n(h){var g=h.getSnapshot;h=h.value;try{var y=g();return!i(h,y)}catch{return!0}}function r(h,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=s,i=typeof Object.is=="function"?Object.is:t,l=o.useState,a=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Pr.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Pr}var Yi;function lh(){return Yi||(Yi=1,process.env.NODE_ENV==="production"?mn.exports=oh():mn.exports=ih()),mn.exports}var sh=lh();const Pa=s.createContext(!1),qt=s.createContext(null);function ah(t){if(s.useContext(qt))return t.content;let{collection:n,document:r}=fh(t.createCollection);return s.createElement(s.Fragment,null,s.createElement(Cf,null,s.createElement(qt.Provider,{value:r},t.content)),s.createElement(ch,{render:t.children,collection:n}))}function ch({collection:t,render:e}){return e(t)}function uh(t,e,n){let r=Ze(),o=s.useRef(r);o.current=r;let i=s.useCallback(()=>o.current?n():e(),[e,n]);return sh.useSyncExternalStore(t,i)}const dh=typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore:uh;function fh(t){let[e]=s.useState(()=>new nh((t==null?void 0:t())||new th)),n=s.useCallback(l=>e.subscribe(l),[e]),r=s.useCallback(()=>{let l=e.getCollection();return e.isSSR&&e.resetAfterSSR(),l},[e]),o=s.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]);return{collection:dh(n,r,o),document:e}}const eo=s.createContext(null);function ph(t){var n;return n=class extends St{},n.type=t,n}function ka(t,e,n,r,o,i){typeof t=="string"&&(t=ph(t));let l=s.useCallback(c=>{c==null||c.setProps(e,n,t,r,i)},[e,n,r,i,t]),a=s.useContext(eo);if(a){let c=a.ownerDocument.nodesByProps.get(e);return c||(c=a.ownerDocument.createElement(t.type),c.setProps(e,n,t,r,i),a.appendChild(c),a.ownerDocument.updateCollection(),a.ownerDocument.nodesByProps.set(e,c)),o?s.createElement(eo.Provider,{value:c},o):null}return s.createElement(t.type,{ref:l},o)}function Ta(t,e){let n=({node:o})=>e(o.props,o.props.ref,o),r=s.forwardRef((o,i)=>{let l=s.useContext(zr);if(!s.useContext(Pa)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(o,i)}return ka(t,o,i,"children"in o?o.children:null,null,c=>s.createElement(zr.Provider,{value:l},s.createElement(n,{node:c})))});return r.displayName=e.name,r}function Ma(t,e,n=Da){let r=({node:i})=>e(i.props,i.props.ref,i),o=s.forwardRef((i,l)=>{let a=n(i);return ka(t,i,l,null,a,c=>s.createElement(r,{node:c}))??s.createElement(s.Fragment,null)});return o.displayName=e.name,o}function Da(t){return Sa({...t,addIdAndValue:!0})}const Xi=s.createContext(null);function hh(t){let e=s.useContext(Xi),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope??(e==null?void 0:e.idScope),o=Da({...t,idScope:r,dependencies:n});return s.useContext(qt)&&(o=s.createElement(bh,null,o)),e=s.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),s.createElement(Xi.Provider,{value:e},o)}function bh({children:t}){let e=s.useContext(qt),n=s.useMemo(()=>s.createElement(qt.Provider,{value:null},s.createElement(Pa.Provider,{value:!0},t)),[t]);return Ze()?s.createElement(eo.Provider,{value:e},n):Xt.createPortal(n,e)}const mh=s.createContext(null),gh={CollectionRoot({collection:t,renderDropIndicator:e}){return Zi(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return Zi(t,e,n)}};function Zi(t,e,n){return Sa({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){if(r.type==="content")return s.createElement(s.Fragment,null);let o=r.render(r);return!n||r.type!=="item"?o:s.createElement(s.Fragment,null,n({type:"item",key:r.key,dropPosition:"before"}),o,yh(t,r,n))}})}function yh(t,e,n){let r=e.key,o=t.getKeyAfter(r),i=o!=null?t.getItem(o):null;for(;i!=null&&i.type!=="item";)o=t.getKeyAfter(i.key),i=o!=null?t.getItem(o):null;let l=e.nextKey!=null?t.getItem(e.nextKey):null;for(;l!=null&&l.type!=="item";)l=l.nextKey!=null?t.getItem(l.nextKey):null;let a=[];if(l==null){let c=e;for(;(c==null?void 0:c.type)==="item"&&(!i||c.parentKey!==i.parentKey&&i.level<c.level);){let u=n({type:"item",key:c.key,dropPosition:"after"});s.isValidElement(u)&&a.push(s.cloneElement(u,{key:`${c.key}-after`})),c=c.parentKey!=null?t.getItem(c.parentKey):null}}return a}const tr=s.createContext(gh);function vh(t){return s.useMemo(()=>t!=null?new Set([t]):null,[t])}function Ra(t){let e=$h(Q(t));e!==t&&(e&&xh(e,t),t&&Na(t,e))}function xh(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function Na(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function $h(t){let e=ne(t),n=e==null?void 0:e.getAttribute("aria-activedescendant");return n&&t.getElementById(n)||e}const Ji=s.createContext(null),wh=s.createContext(null),Eh=s.createContext({}),Ch=s.createContext({}),Sh=s.createContext(null);function Ph(t){let e=s.useRef({});return s.createElement(Sh.Provider,{value:e},t.children)}const kh=s.createContext({isSelected:!1});function Th(t){let e=ae(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const Mo=s.createContext({}),Go=class Go extends St{filter(e,n){let r=n.getItem(this.prevKey);if(r&&r.type!=="separator"){let o=this.clone();return n.addDescendants(o,e),o}return null}};Go.type="separator";let to=Go;const Mh=Ta(to,function(e,n){[e,n]=Me(e,n,Mo);let{elementType:r,orientation:o,style:i,className:l,slot:a,...c}=e,u=r||"hr";u==="hr"&&o==="vertical"&&(u="div");let d=he[u],{separatorProps:f}=Th({...c,elementType:r,orientation:o}),b=ae(e,{global:!0});return s.createElement(d,{render:e.render,...Y(b,f),style:i,className:l??"react-aria-Separator",ref:n,slot:a||void 0})}),La=s.createContext({});var Ia={};Ia={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Ka={};Ka={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Oa={};Oa={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Aa={};Aa={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var Fa={};Fa={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var ja={};ja={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var _a={};_a={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Ba={};Ba={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Va={};Va={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var za={};za={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Ha={};Ha={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var Ga={};Ga={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Ua={};Ua={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Wa={};Wa={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var qa={};qa={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var Ya={};Ya={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var Xa={};Xa={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Za={};Za={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Ja={};Ja={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Qa={};Qa={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var ec={};ec={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var tc={};tc={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var nc={};nc={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var rc={};rc={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var oc={};oc={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var ic={};ic={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var lc={};lc={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var sc={};sc={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var ac={};ac={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var cc={};cc={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var uc={};uc={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var dc={};dc={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var fc={};fc={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var pc={};pc={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var hc={};hc={"ar-AE":Ia,"bg-BG":Ka,"cs-CZ":Oa,"da-DK":Aa,"de-DE":Fa,"el-GR":ja,"en-US":_a,"es-ES":Ba,"et-EE":Va,"fi-FI":za,"fr-FR":Ha,"he-IL":Ga,"hr-HR":Ua,"hu-HU":Wa,"it-IT":qa,"ja-JP":Ya,"ko-KR":Xa,"lt-LT":Za,"lv-LV":Ja,"nb-NO":Qa,"nl-NL":ec,"pl-PL":tc,"pt-BR":nc,"pt-PT":rc,"ro-RO":oc,"ru-RU":ic,"sk-SK":lc,"sl-SI":sc,"sr-SP":ac,"sv-SE":cc,"tr-TR":uc,"uk-UA":dc,"zh-CN":fc,"zh-TW":pc};const Dh=500;function bc(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:o,threshold:i=Dh,accessibilityDescription:l}=t;const a=s.useRef(void 0);let{addGlobalListener:c,removeGlobalListener:u}=qn(),{pressProps:d}=Xe({isDisabled:e,onPressStart(b){if(b.continuePropagation(),(b.pointerType==="mouse"||b.pointerType==="touch")&&(n&&n({...b,type:"longpressstart"}),a.current=setTimeout(()=>{b.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),Q(b.target).activeElement!==b.target&&de(b.target),o&&o({...b,type:"longpress"}),a.current=void 0},i),b.pointerType==="touch")){let h=y=>{y.preventDefault()},g=fe(b.target);c(b.target,"contextmenu",h,{once:!0}),c(g,"pointerup",()=>{setTimeout(()=>{u(b.target,"contextmenu",h)},30)},{once:!0})}},onPressEnd(b){a.current&&clearTimeout(a.current),r&&(b.pointerType==="mouse"||b.pointerType==="touch")&&r({...b,type:"longpressend"})}}),f=rd(o&&!e?l:void 0);return{longPressProps:Y(d,f)}}function mc(t,e,n){let{type:r}=t,{isOpen:o}=e;s.useEffect(()=>{n&&n.current&&Ds.set(n.current,e.close)});let i;r==="menu"?i=!0:r==="listbox"&&(i="listbox");let l=pe();return{triggerProps:{"aria-haspopup":i,"aria-expanded":o,"aria-controls":o?l:void 0,onPress:e.toggle},overlayProps:{id:l}}}function Rh(t){return t&&t.__esModule?t.default:t}function Nh(t,e,n){let{type:r="menu",isDisabled:o,trigger:i="press"}=t,l=pe(),{triggerProps:a,overlayProps:c}=mc({type:r},e,n),u=h=>{if(!o&&!(i==="longPress"&&!h.altKey)&&n&&n.current)switch(h.key){case"Enter":case" ":if(i==="longPress"||h.isDefaultPrevented())return;case"ArrowDown":"continuePropagation"in h||h.stopPropagation(),h.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in h||h.stopPropagation(),h.preventDefault(),e.toggle("last");break;default:"continuePropagation"in h&&h.continuePropagation()}},d=ga(Rh(hc),"@react-aria/menu"),{longPressProps:f}=bc({isDisabled:o||i!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),b={preventFocusOnPress:!0,onPressStart(h){h.pointerType!=="touch"&&h.pointerType!=="keyboard"&&!o&&(de(h.target),e.open(h.pointerType==="virtual"?"first":null))},onPress(h){h.pointerType==="touch"&&!o&&(de(h.target),e.toggle())}};return delete a.onPress,{menuTriggerProps:{...a,...i==="press"?b:f,id:l,onKeyDown:u},menuProps:{...c,"aria-labelledby":l,autoFocus:e.focusStrategy||!0,onClose:e.close}}}const gc=new WeakMap;function no(t){return xu()?t.altKey:t.ctrlKey}function Cn(t,e){var o,i;let n=`[data-key="${CSS.escape(String(e))}"]`,r=(o=t.current)==null?void 0:o.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),(i=t.current)==null?void 0:i.querySelector(n)}const yc=new WeakMap;function Lh(t){let e=pe();return yc.set(t,e),e}function Ih(t){return yc.get(t)}const Kh=1e3;function Oh(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,o=s.useRef({search:"",timeout:void 0}).current,i=l=>{let a=Ah(l.key);if(!(!a||l.ctrlKey||l.metaKey||!H(l.currentTarget,F(l))||o.search.length===0&&a===" ")){if(a===" "&&o.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),o.search+=a,e.getKeyForSearch!=null){let c=e.getKeyForSearch(o.search,n.focusedKey);c==null&&(c=e.getKeyForSearch(o.search)),c!=null&&(n.setFocusedKey(c),r&&r(c))}clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},Kh)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0}}}function Ah(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Fh(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:l=!1,disallowSelectAll:a=!1,escapeKeyBehavior:c="clearSelection",selectOnFocus:u=e.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:f,allowsTabNavigation:b=!1,scrollRef:h=r,linkBehavior:g="action"}=t,{direction:y}=dt(),v=Zt(),w=m=>{var I,k,R,$,T,O,G,W,q,ee,le,Z,be,Le;if(m.altKey&&m.key==="Tab"&&m.preventDefault(),!r.current||!H(r.current,F(m)))return;const S=(z,$e)=>{if(z!=null){if(e.isLink(z)&&g==="selection"&&u&&!no(m)){Xt.flushSync(()=>{e.setFocusedKey(z,$e)});let me=Cn(r,z),et=e.getItemProps(z);me&&v.open(me,m,et.href,et.routerOptions);return}if(e.setFocusedKey(z,$e),e.isLink(z)&&g==="override")return;m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(z):u&&!no(m)&&e.replaceSelection(z)}};switch(m.key){case"ArrowDown":if(n.getKeyBelow){let z=e.focusedKey!=null?(I=n.getKeyBelow)==null?void 0:I.call(n,e.focusedKey):(k=n.getFirstKey)==null?void 0:k.call(n);z==null&&i&&(z=(R=n.getFirstKey)==null?void 0:R.call(n,e.focusedKey)),z!=null&&(m.preventDefault(),S(z))}break;case"ArrowUp":if(n.getKeyAbove){let z=e.focusedKey!=null?($=n.getKeyAbove)==null?void 0:$.call(n,e.focusedKey):(T=n.getLastKey)==null?void 0:T.call(n);z==null&&i&&(z=(O=n.getLastKey)==null?void 0:O.call(n,e.focusedKey)),z!=null&&(m.preventDefault(),S(z))}break;case"ArrowLeft":if(n.getKeyLeftOf){let z=e.focusedKey!=null?(G=n.getKeyLeftOf)==null?void 0:G.call(n,e.focusedKey):(W=n.getFirstKey)==null?void 0:W.call(n);z==null&&i&&(z=y==="rtl"?(q=n.getFirstKey)==null?void 0:q.call(n,e.focusedKey):(ee=n.getLastKey)==null?void 0:ee.call(n,e.focusedKey)),z!=null&&(m.preventDefault(),S(z,y==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){let z=e.focusedKey!=null?(le=n.getKeyRightOf)==null?void 0:le.call(n,e.focusedKey):(Z=n.getFirstKey)==null?void 0:Z.call(n);z==null&&i&&(z=y==="rtl"?(be=n.getLastKey)==null?void 0:be.call(n,e.focusedKey):(Le=n.getFirstKey)==null?void 0:Le.call(n,e.focusedKey)),z!=null&&(m.preventDefault(),S(z,y==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&m.shiftKey)return;m.preventDefault();let z=n.getFirstKey(e.focusedKey,bt(m));e.setFocusedKey(z),z!=null&&(bt(m)&&m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(z):u&&e.replaceSelection(z))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&m.shiftKey)return;m.preventDefault();let z=n.getLastKey(e.focusedKey,bt(m));e.setFocusedKey(z),z!=null&&(bt(m)&&m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(z):u&&e.replaceSelection(z))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let z=n.getKeyPageBelow(e.focusedKey);z!=null&&(m.preventDefault(),S(z))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let z=n.getKeyPageAbove(e.focusedKey);z!=null&&(m.preventDefault(),S(z))}break;case"a":bt(m)&&e.selectionMode==="multiple"&&a!==!0&&(m.preventDefault(),e.selectAll());break;case"Escape":c==="clearSelection"&&!l&&e.selectedKeys.size!==0&&(m.stopPropagation(),m.preventDefault(),e.clearSelection());break;case"Tab":if(!b){if(m.shiftKey)r.current.focus();else{let z=Fe(r.current,{tabbable:!0}),$e,me;do me=z.lastChild(),me&&($e=me);while(me);let et=ne();$e&&(!$t($e)||et&&!Gl(et))&&de($e)}break}}},x=s.useRef({top:0,left:0});Lt(h,"scroll",()=>{var m,S;x.current={top:((m=h.current)==null?void 0:m.scrollTop)??0,left:((S=h.current)==null?void 0:S.scrollLeft)??0}});let M=m=>{var S,I;if(e.isFocused){H(m.currentTarget,F(m))||e.setFocused(!1);return}if(H(m.currentTarget,F(m))){if(e.setFocused(!0),e.focusedKey==null){let k=$=>{$!=null&&(e.setFocusedKey($),u&&!e.isSelected($)&&e.replaceSelection($))},R=m.relatedTarget;R&&m.currentTarget.compareDocumentPosition(R)&Node.DOCUMENT_POSITION_FOLLOWING?k(e.lastSelectedKey??((S=n.getLastKey)==null?void 0:S.call(n))):k(e.firstSelectedKey??((I=n.getFirstKey)==null?void 0:I.call(n)))}else h.current&&(h.current.scrollTop=x.current.top,h.current.scrollLeft=x.current.left);if(e.focusedKey!=null&&h.current){let k=Cn(r,e.focusedKey);k instanceof HTMLElement&&(!$t(k)&&!f&&de(k),Gt()==="keyboard"&&ii(k,{containingElement:r.current}))}}},D=m=>{H(m.currentTarget,m.relatedTarget)||e.setFocused(!1)},L=s.useRef(!1);Lt(r,yu,f?m=>{let{detail:S}=m;m.stopPropagation(),e.setFocused(!0),(S==null?void 0:S.focusStrategy)==="first"&&(L.current=!0)}:void 0),oi(()=>{var m;if(L.current){let S=((m=n.getFirstKey)==null?void 0:m.call(n))??null;if(S==null){let I=ne();Ra(r.current),Na(I,null),e.collection.size>0&&(L.current=!1)}else e.setFocusedKey(S),L.current=!1}},[e.collection]),oi(()=>{e.collection.size>0&&(L.current=!1)},[e.focusedKey]),Lt(r,gu,f?m=>{var S;m.stopPropagation(),e.setFocused(!1),(S=m.detail)!=null&&S.clearFocusKey&&e.setFocusedKey(null)}:void 0);const _=s.useRef(o),E=s.useRef(!1);s.useEffect(()=>{var m,S;if(_.current){let I=null;o==="first"&&(I=((m=n.getFirstKey)==null?void 0:m.call(n))??null),o==="last"&&(I=((S=n.getLastKey)==null?void 0:S.call(n))??null);let k=e.selectedKeys;if(k.size){for(let R of k)if(e.canSelectItem(R)){I=R;break}}e.setFocused(!0),e.setFocusedKey(I),I==null&&!f&&r.current&&Ye(r.current),e.collection.size>0&&(_.current=!1,E.current=!0)}});let P=s.useRef(e.focusedKey),N=s.useRef(null);s.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==P.current||E.current)&&h.current&&r.current){let m=Gt(),S=Cn(r,e.focusedKey);if(!(S instanceof HTMLElement))return;(m==="keyboard"||E.current)&&(N.current&&cancelAnimationFrame(N.current),N.current=requestAnimationFrame(()=>{h.current&&($n(h.current,S),m!=="virtual"&&ii(S,{containingElement:r.current}))}))}!f&&e.isFocused&&e.focusedKey==null&&P.current!=null&&r.current&&Ye(r.current),P.current=e.focusedKey,E.current=!1}),s.useEffect(()=>()=>{N.current&&cancelAnimationFrame(N.current)},[]),Lt(r,"react-aria-focus-scope-restore",m=>{m.preventDefault(),e.setFocused(!0)});let C={onKeyDown:w,onFocus:M,onBlur:D,onMouseDown(m){h.current===F(m)&&m.preventDefault()}},{typeSelectProps:K}=Oh({keyboardDelegate:n,selectionManager:e});d||(C=Y(K,C));let j;f||(j=e.focusedKey==null?0:-1);let A=Lh(e.collection);return{collectionProps:Y(C,{tabIndex:j,"data-collection":A})}}class Qi{constructor(e){this.ref=e}getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?Cn(this.ref,e):null;if(!r)return null;let o=n.getBoundingClientRect(),i=r.getBoundingClientRect();return{x:i.left-o.left-n.clientLeft+n.scrollLeft,y:i.top-o.top-n.clientTop+n.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:(e==null?void 0:e.scrollWidth)??0,height:(e==null?void 0:e.scrollHeight)??0}}getVisibleRect(){let e=this.ref.current;return{x:(e==null?void 0:e.scrollLeft)??0,y:(e==null?void 0:e.scrollTop)??0,width:(e==null?void 0:e.clientWidth)??0,height:(e==null?void 0:e.clientHeight)??0}}}class jh{constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new Qi(n.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new Qi(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){var n,r;return this.disabledBehavior==="all"&&(((n=e.props)==null?void 0:n.isDisabled)||this.disabledKeys.has(e.key))&&((r=e.props)==null?void 0:r.disabledBehavior)!=="selection"}findNextNonDisabled(e,n,r=!1){let o=e;for(;o!=null;){let i=this.collection.getItem(o);if((i==null?void 0:i.type)==="item"&&(r||!this.isDisabled(i)))return o;o=n(o)}return null}getNextKey(e,n){let r=e;return r=this.collection.getKeyAfter(r),this.findNextNonDisabled(r,o=>this.collection.getKeyAfter(o),n==null?void 0:n.includeDisabled)}getPreviousKey(e,n){let r=e;return r=this.collection.getKeyBefore(r),this.findNextNonDisabled(r,o=>this.collection.getKeyBefore(o),n==null?void 0:n.includeDisabled)}findKey(e,n,r){let o=e,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let l=i;do{if(o=n(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&r(l,i)&&o!=null);return o}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}getKeyBelow(e,n){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getNextKey(r,n),this.isSameRow):this.getNextKey(e,n)}getKeyAbove(e,n){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getPreviousKey(r,n),this.isSameRow):this.getPreviousKey(e,n)}getNextColumn(e,n,r){return n?this.getPreviousKey(e,r):this.getNextKey(e,r)}getKeyRightOf(e,n){let r=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[r](o),n==null?void 0:n.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl",n):this.findKey(e,o=>this.getNextColumn(o,this.direction==="rtl",n),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl",n):null}getKeyLeftOf(e,n){let r=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[r](o),n==null?void 0:n.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr",n):this.findKey(e,o=>this.getNextColumn(o,this.direction==="ltr",n),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr",n):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!st(n))return this.getFirstKey();let o=e;if(this.orientation==="horizontal"){let i=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>i&&o!=null;)o=this.getKeyAbove(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>i&&o!=null;)o=this.getKeyAbove(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!st(n))return this.getLastKey();let o=e;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,r.x-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<i&&o!=null;)o=this.getKeyBelow(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<i&&o!=null;)o=this.getKeyBelow(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,o=n||this.getFirstKey();for(;o!=null;){let i=r.getItem(o);if(!i)return null;let l=i.textValue.slice(0,e.length);if(i.textValue&&this.collator.compare(l,e)===0)return o;o=this.getNextKey(o)}return null}}let kr=new Map;function _h(t){let{locale:e}=dt(),n=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(kr.has(n))return kr.get(n);let r=new Intl.Collator(e,t);return kr.set(n,r),r}function Bh(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:o,keyboardDelegate:i,layoutDelegate:l,orientation:a}=t,c=_h({usage:"search",sensitivity:"base"}),u=e.disabledBehavior,d=s.useMemo(()=>i||new jh({collection:n,disabledKeys:r,disabledBehavior:u,ref:o,collator:c,layoutDelegate:l,orientation:a}),[i,l,n,r,o,c,u,a]),{collectionProps:f}=Fh({...t,ref:o,selectionManager:e,keyboardDelegate:d});return{listProps:f}}function Vh(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:o,onKeyUp:i,...l}=t;!t["aria-label"]&&!t["aria-labelledby"]&&process.env.NODE_ENV!=="production"&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let a=ae(t,{labelable:!0}),{listProps:c}=Bh({...l,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return gc.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:Y(a,{onKeyDown:o,onKeyUp:i},{role:"menu",...c,onKeyDown:u=>{var d;(u.key!=="Escape"||t.shouldUseVirtualFocus)&&((d=c.onKeyDown)==null||d.call(c,u))}})}}function zh(t){let{id:e,selectionManager:n,key:r,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:l,focus:a,isDisabled:c,onAction:u,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=t,b=Zt();e=pe(e);let h=T=>{if(T.pointerType==="keyboard"&&no(T))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(f==="selection"&&o.current){let O=n.getItemProps(r);b.open(o.current,T,O.href,O.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(f==="override"||f==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):T&&T.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||T&&(bt(T)||T.pointerType==="touch"||T.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};s.useEffect(()=>{r===n.focusedKey&&n.isFocused&&(l?Ra(o.current):a?a():ne()!==o.current&&o.current&&Ye(o.current))},[o,r,n.focusedKey,n.childFocusStrategy,n.isFocused,l]),c=c||n.isDisabled(r);let g={};!l&&!c?g={tabIndex:r===n.focusedKey?0:-1,onFocus(T){F(T)===o.current&&n.setFocusedKey(r)}}:c&&(g.onMouseDown=T=>{T.preventDefault()}),s.useEffect(()=>{c&&n.focusedKey===r&&n.setFocusedKey(null)},[n,c,r]);let y=n.isLink(r)&&f==="override",v=u&&t.UNSTABLE_itemBehavior==="action",w=n.isLink(r)&&f!=="selection"&&f!=="none",x=!c&&n.canSelectItem(r)&&!y&&!v,M=(u||w)&&!c,D=M&&(n.selectionBehavior==="replace"?!x:!x||n.isEmpty),L=M&&x&&n.selectionBehavior==="replace",_=D||L,E=s.useRef(null),P=_&&x,N=s.useRef(!1),C=s.useRef(!1),K=n.getItemProps(r),j=T=>{var O;u&&(u(),(O=o.current)==null||O.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),w&&o.current&&b.open(o.current,T,K.href,K.routerOptions)},A={ref:o};if(i?(A.onPressStart=T=>{E.current=T.pointerType,N.current=P,T.pointerType==="keyboard"&&(!_||tl(T.key))&&h(T)},d?(A.onPressUp=D?void 0:T=>{T.pointerType==="mouse"&&x&&h(T)},A.onPress=D?j:T=>{T.pointerType!=="keyboard"&&T.pointerType!=="mouse"&&x&&h(T)}):A.onPress=T=>{if(D||L&&T.pointerType!=="mouse"){if(T.pointerType==="keyboard"&&!el(T.key))return;j(T)}else T.pointerType!=="keyboard"&&x&&h(T)}):(A.onPressStart=T=>{E.current=T.pointerType,N.current=P,C.current=D,x&&(T.pointerType==="mouse"&&!D||T.pointerType==="keyboard"&&(!M||tl(T.key)))&&h(T)},A.onPress=T=>{(T.pointerType==="touch"||T.pointerType==="pen"||T.pointerType==="virtual"||T.pointerType==="keyboard"&&_&&el(T.key)||T.pointerType==="mouse"&&C.current)&&(_?j(T):x&&h(T))}),g["data-collection"]=Ih(n.collection),g["data-key"]=r,A.preventFocusOnPress=l,l&&(A=Y(A,{onPressStart(T){T.pointerType!=="touch"&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(T){T.pointerType==="touch"&&(n.setFocused(!0),n.setFocusedKey(r))}})),K)for(let T of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])K[T]&&(A[T]=Jt(A[T],K[T]));let{pressProps:m,isPressed:S}=Xe(A),I=L?T=>{E.current==="mouse"&&(T.stopPropagation(),T.preventDefault(),j(T))}:void 0,{longPressProps:k}=bc({isDisabled:!P,onLongPress(T){T.pointerType==="touch"&&(h(T),n.setSelectionBehavior("toggle"))}}),R=T=>{E.current==="touch"&&N.current&&T.preventDefault()},$=f!=="none"&&n.isLink(r)?T=>{_e.isOpening||T.preventDefault()}:void 0;return{itemProps:Y(g,x||D||l&&!c?m:{},P?k:{},{onDoubleClick:I,onDragStartCapture:R,onClick:$,id:e},l?{onMouseDown:T=>T.preventDefault()}:void 0),isPressed:S,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:x,hasAction:_}}function el(t){return t==="Enter"}function tl(t){return t===" "}function Hh(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}const nl=new WeakMap;function Gh(t){let e=nl.get(t);if(e!=null)return e;let n=0,r=o=>{for(let i of o)i.type==="section"?r(Hh(i,t)):i.type==="item"&&n++};return r(t),nl.set(t,n),n}function Uh(t,e,n){let{id:r,key:o,closeOnSelect:i,shouldCloseOnSelect:l,isVirtualized:a,"aria-haspopup":c,onPressStart:u,onPressUp:d,onPress:f,onPressChange:b,onPressEnd:h,onClick:g,onHoverStart:y,onHoverChange:v,onHoverEnd:w,onKeyDown:x,onKeyUp:M,onFocus:D,onFocusChange:L,onBlur:_,selectionManager:E=e.selectionManager}=t,P=!!c,N=P&&t["aria-expanded"]==="true",C=t.isDisabled??E.isDisabled(o),K=t.isSelected??E.isSelected(o),j=gc.get(e),A=e.collection.getItem(o),m=t.onClose||j.onClose,S=Zt(),I=()=>{var te;if(!P&&((te=A==null?void 0:A.props)!=null&&te.onAction?A.props.onAction():t.onAction&&t.onAction(o),j.onAction)){let kt=j.onAction;kt(o)}},k="menuitem";P||(E.selectionMode==="single"?k="menuitemradio":E.selectionMode==="multiple"&&(k="menuitemcheckbox"));let R=xn(),$=xn(),T=xn(),O={id:r,"aria-disabled":C||void 0,role:k,"aria-label":t["aria-label"],"aria-labelledby":R,"aria-describedby":[t["aria-describedby"],$,T].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":c,"aria-expanded":t["aria-expanded"]};if(E.selectionMode!=="none"&&!P&&(O["aria-checked"]=K),a){let te=Number(A==null?void 0:A.index);O["aria-posinset"]=Number.isNaN(te)?void 0:te+1,O["aria-setsize"]=Gh(e.collection)}let G=s.useRef(!1),W=te=>{b==null||b(te),G.current=te},q=s.useRef(null),ee=te=>{te.pointerType!=="keyboard"&&(q.current={pointerType:te.pointerType}),te.pointerType==="mouse"&&(G.current||te.target.click()),d==null||d(te)},le=te=>{var qo,Yo;g==null||g(te),I(),Al(te,S,A.props.href,A==null?void 0:A.props.routerOptions);let kt=((qo=q.current)==null?void 0:qo.pointerType)==="keyboard"?((Yo=q.current)==null?void 0:Yo.key)==="Enter"||E.selectionMode==="none"||E.isLink(o):E.selectionMode!=="multiple"||E.isLink(o);kt=l??i??kt,m&&!P&&kt&&m(),q.current=null},{itemProps:Z,isFocused:be}=zh({id:r,selectionManager:E,key:o,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:j.shouldUseVirtualFocus}),{pressProps:Le,isPressed:z}=Xe({onPressStart:u,onPress:f,onPressUp:ee,onPressChange:W,onPressEnd:h,isDisabled:C}),{hoverProps:$e}=tn({isDisabled:C,onHoverStart(te){!Ht()&&!(N&&c)&&(E.setFocused(!0),E.setFocusedKey(o)),y==null||y(te)},onHoverChange:v,onHoverEnd:w}),{keyboardProps:me}=Cs({onKeyDown:te=>{if(te.repeat){te.continuePropagation();return}switch(te.key){case" ":q.current={pointerType:"keyboard",key:" "},F(te).click(),Vr("keyboard");break;case"Enter":q.current={pointerType:"keyboard",key:"Enter"},F(te).tagName!=="A"&&F(te).click(),Vr("keyboard");break;default:P||te.continuePropagation(),x==null||x(te);break}},onKeyUp:M}),{focusableProps:et}=en({onBlur:_,onFocus:D,onFocusChange:L},n),Wo=ae(A==null?void 0:A.props);delete Wo.id;let cu=Ol(A==null?void 0:A.props);return{menuItemProps:{...O,...Y(Wo,cu,P?{onFocus:Z.onFocus,"data-collection":Z["data-collection"],"data-key":Z["data-key"]}:Z,Le,$e,me,et,j.shouldUseVirtualFocus||P?{onMouseDown:te=>te.preventDefault()}:void 0,C?void 0:{onClick:le}),tabIndex:Z.tabIndex!=null&&N&&!j.shouldUseVirtualFocus?-1:Z.tabIndex},labelProps:{id:R},descriptionProps:{id:$},keyboardShortcutProps:{id:T},isFocused:be,isFocusVisible:be&&E.isFocused&&Ht()&&!N,isSelected:K,isPressed:z,isDisabled:C}}function Wh(t){let{heading:e,"aria-label":n}=t,r=pe();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}const gn=2,qh=50,Yh=1e3,rl=Math.PI/12;function Xh(t){let{menuRef:e,submenuRef:n,isOpen:r,isDisabled:o}=t,i=s.useRef(void 0),l=s.useRef(void 0),a=s.useRef(0),c=s.useRef(void 0),u=s.useRef(void 0),d=s.useRef(void 0),f=s.useRef(2),[b,h]=s.useState(!1);Tn({ref:r?n:void 0,onResize:()=>{n.current&&(l.current=n.current.getBoundingClientRect(),d.current=void 0)}});let y=()=>{h(!1),f.current=gn,i.current=void 0},v=Hf(),w=Pe(x=>{b&&x.preventDefault()});s.useEffect(()=>{b&&e.current?e.current.style.pointerEvents="none":e.current.style.pointerEvents=""},[e,b]),J(()=>{let x=n.current,M=e.current;if(o||!x||!r||v!=="pointer"||!M){y();return}l.current=x.getBoundingClientRect();let D=L=>{if(L.pointerType==="touch"||L.pointerType==="pen")return;let _=Date.now();if(_-a.current<qh)return;clearTimeout(c.current),clearTimeout(u.current);let{clientX:E,clientY:P}=L;if(!i.current){i.current={x:E,y:P};return}if(!l.current)return;if(d.current||(d.current=E>l.current.right?"left":"right"),E<M.getBoundingClientRect().left||E>M.getBoundingClientRect().right||P<M.getBoundingClientRect().top||P>M.getBoundingClientRect().bottom){y();return}let N=i.current.x,C=i.current.y,K=d.current==="right"?l.current.left-N:N-l.current.right,j=Math.atan2(C-l.current.top,K)+rl,A=Math.atan2(C-l.current.bottom,K)-rl,m=Math.atan2(C-P,d.current==="left"?-(E-N):E-N),S=m<j&&m>A;f.current=S?Math.min(f.current+1,gn):Math.max(f.current-1,0),f.current>=gn?h(!0):h(!1),a.current=_,i.current={x:E,y:P},S&&(c.current=setTimeout(()=>{y(),u.current=setTimeout(()=>{let I=document.elementFromPoint(E,P);I&&H(M,I)&&I.dispatchEvent(new PointerEvent("pointerover",{bubbles:!0,cancelable:!0}))},100)},Yh))};return window.addEventListener("pointermove",D),process.env.NODE_ENV!=="test"&&window.addEventListener("pointerdown",w,!0),()=>{window.removeEventListener("pointermove",D),process.env.NODE_ENV!=="test"&&window.removeEventListener("pointerdown",w,!0),clearTimeout(c.current),clearTimeout(u.current),f.current=gn}},[o,r,e,v,h,n])}function Zh(t,e,n){let{parentMenuRef:r,submenuRef:o,type:i="menu",isDisabled:l,delay:a=200,shouldUseVirtualFocus:c}=t,u=pe(),d=pe(),{direction:f}=dt(),b=s.useRef(void 0),h=s.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=void 0)},[b]),g=s.useCallback(E=>{h(),e.open(E)},[e,h]),y=s.useCallback(()=>{h(),e.close()},[e,h]);J(()=>()=>{h()},[h]);let v=E=>{if($t(E.currentTarget))switch(E.key){case"ArrowLeft":f==="ltr"&&H(E.currentTarget,F(E))&&(E.preventDefault(),E.stopPropagation(),y(),!c&&n.current&&de(n.current));break;case"ArrowRight":f==="rtl"&&H(E.currentTarget,F(E))&&(E.preventDefault(),E.stopPropagation(),y(),!c&&n.current&&de(n.current));break;case"Escape":H(o.current,F(E))&&(E.stopPropagation(),y(),!c&&n.current&&de(n.current));break}},w={id:d,"aria-labelledby":u,submenuLevel:e.submenuLevel,...i==="menu"&&{onClose:e.closeAll,autoFocus:e.focusStrategy??void 0,onKeyDown:v}},x=E=>{switch(E.key){case"ArrowRight":l||(f==="ltr"?(E.preventDefault(),e.isOpen||g("first"),i==="menu"&&(o!=null&&o.current)&&ne()===(n==null?void 0:n.current)&&de(o.current)):e.isOpen?y():E.continuePropagation());break;case"ArrowLeft":l||(f==="rtl"?(E.preventDefault(),e.isOpen||g("first"),i==="menu"&&(o!=null&&o.current)&&ne()===(n==null?void 0:n.current)&&de(o.current)):e.isOpen?y():E.continuePropagation());break;default:E.continuePropagation();break}},M=E=>{!l&&(E.pointerType==="virtual"||E.pointerType==="keyboard")&&g("first")},D=E=>{!l&&(E.pointerType==="touch"||E.pointerType==="mouse")&&g()},L=E=>{l||(E&&!e.isOpen?b.current||(b.current=setTimeout(()=>{g()},a)):E||h())};Lt(r,"focusin",E=>{e.isOpen&&H(r.current,F(E))&&F(E)!==n.current&&y()});let _=E=>E!==n.current;return Xh({menuRef:r,submenuRef:o,isOpen:e.isOpen,isDisabled:l}),{submenuTriggerProps:{id:u,"aria-controls":e.isOpen?d:void 0,"aria-haspopup":l?void 0:i,"aria-expanded":e.isOpen?"true":"false",onPressStart:M,onPress:D,onHoverChange:L,onKeyDown:x,isOpen:e.isOpen},submenuProps:w,popoverProps:{isNonModal:!0,shouldCloseOnInteractOutside:_}}}function Do(t){let e=To(t),[n,r]=s.useState(null),[o,i]=s.useState([]),l=()=>{i([]),e.close()};return{focusStrategy:n,...e,open(u=null){r(u),e.open()},toggle(u=null){r(u),e.toggle()},close(){l()},expandedKeysStack:o,openSubmenu:(u,d)=>{i(f=>d>f.length?f:[...f.slice(0,d),u])},closeSubmenu:(u,d)=>{i(f=>f[d]===u?f.slice(0,d):f)}}}function Jh(t,e){let{triggerKey:n}=t,{expandedKeysStack:r,openSubmenu:o,closeSubmenu:i,close:l}=e,[a]=s.useState(r==null?void 0:r.length),c=s.useMemo(()=>r[a]===n,[r,n,a]),[u,d]=s.useState(null),f=s.useCallback(g=>{d(g??null),o(n,a)},[o,a,n]),b=s.useCallback(()=>{d(null),i(n,a)},[i,a,n]),h=s.useCallback(g=>{d(g??null),c?b():f(g)},[b,f,c]);return s.useMemo(()=>({focusStrategy:u,isOpen:c,open:f,close:b,closeAll:l,submenuLevel:a,setOpen:()=>{},toggle:h}),[c,f,b,l,u,h,a])}function Qh(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function eb(t){return tb(t)}function tb(t,e){for(let n of t)return n}function Tr(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...ol(t,e),e],o=[...ol(t,n),n],i=r.slice(0,o.length).findIndex((l,a)=>l!==o[a]);return i!==-1?(e=r[i],n=o[i],e.index-n.index):r.findIndex(l=>l===n)>=0?1:(o.findIndex(l=>l===e)>=0,-1)}function ol(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}class De extends Set{constructor(e,n,r){super(e),e instanceof De?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}class nr{constructor(e,n,r){this.collection=e,this.state=n,this.allowsCellSelection=(r==null?void 0:r.allowsCellSelection)??!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null,this.fullCollection=(r==null?void 0:r.fullCollection)||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&Tr(this.collection,r,e)<0)&&(e=r)}return(e==null?void 0:e.key)??null}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&Tr(this.collection,r,e)>0)&&(e=r)}return(e==null?void 0:e.key)??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new De([n],n,n);else{let o=this.state.selectedKeys,i=o.anchorKey??n;r=new De(o,i,n);for(let l of this.getKeyRange(i,o.currentKey??n))r.delete(l);for(let l of this.getKeyRange(n,i))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),o=this.collection.getItem(n);return r&&o?Tr(this.collection,r,o)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var i;if((i=this.layoutDelegate)!=null&&i.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let r=[],o=e;for(;o!=null;){let l=this.collection.getItem(o);if(l&&(l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&r.push(o),o===n)return r;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new De(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new De([n],n,n):new De;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new De;for(let r of e){let o=this.getKey(r);if(o!=null&&(n.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=this.fullCollection??this.collection,n=[],r=o=>{var i;for(;o!=null;){if(this.canSelectItemIn(o,e)){let l=e.getItem(o);(l==null?void 0:l.type)==="item"&&n.push(o),l!=null&&l.hasChildNodes&&(this.allowsCellSelection||l.type!=="item")&&r(((i=eb(Qh(l,e)))==null?void 0:i.key)??null)}o=e.getKeyAfter(o)}};return r(e.getFirstKey()),n}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new De)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,n){var o;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=n.getItem(e);return!(!r||(o=r==null?void 0:r.props)!=null&&o.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var r,o;let n=this.collection.getItem(e);return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!((r=n==null?void 0:n.props)!=null&&r.isDisabled))&&((o=n==null?void 0:n.props)==null?void 0:o.disabledBehavior)!=="selection"}isLink(e){var n,r;return!!((r=(n=this.collection.getItem(e))==null?void 0:n.props)!=null&&r.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))==null?void 0:n.props}withCollection(e){return new nr(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class nb{constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&(l.type==="section"||n.has(l.key)))for(let a of l.childNodes)r(a)};for(let l of e)r(l);let o=null,i=0;for(let[l,a]of this.keyMap)o?(o.nextKey=l,a.prevKey=o.key):(this.firstKey=l,a.prevKey=void 0),a.type==="item"&&(a.index=i++),o=a,o.nextKey=void 0;this.lastKey=(o==null?void 0:o.key)??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);return n?n.prevKey??null:null}getKeyAfter(e){let n=this.keyMap.get(e);return n?n.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}}class rb{build(e,n){return this.context=n,il(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(s.isValidElement(n)&&n.type===s.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of r)yield*this.getFullNode({value:i,index:o},{renderer:n}),o++}else{let o=[];s.Children.forEach(n,l=>{l&&o.push(l)});let i=0;for(let l of o){let a=this.getFullNode({element:l,index:i},{});for(let c of a)i++,yield c}}}getKey(e,n,r,o){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${o}${n.key}`;let i=n.value;if(i!=null){let l=i.key??i.id;if(l==null)throw new Error("No key found for item");return l}return o?`${o}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,o){if(s.isValidElement(e.element)&&e.element.type===s.Fragment){let c=[];s.Children.forEach(e.element.props.children,d=>{c.push(d)});let u=e.index??0;for(const d of c)yield*this.getFullNode({element:d,index:u++},n,r,o);return}let i=e.element;if(!i&&e.value&&n&&n.renderer){let c=this.cache.get(e.value);if(c&&(!c.shouldInvalidate||!c.shouldInvalidate(this.context))){c.index=e.index,c.parentKey=o?o.key:null,yield c;return}i=n.renderer(e.value)}if(s.isValidElement(i)){let c=i.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let b=i.type;throw new Error(`Unknown element <${b}> in collection.`)}let u=c.getCollectionNode(i.props,this.context),d=e.index??0,f=u.next();for(;!f.done&&f.value;){let b=f.value;e.index=d;let h=b.key??null;h==null&&(h=b.element?null:this.getKey(i,e,n,r));let y=[...this.getFullNode({...b,key:h,index:d,wrapper:ob(e.wrapper,b.wrapper)},this.getChildState(n,b),r?`${r}${i.key}`:i.key,o)];for(let v of y){if(v.value=b.value??e.value??null,v.value&&this.cache.set(v.value,v),e.type&&v.type!==e.type)throw new Error(`Unsupported type <${Mr(v.type)}> in <${Mr((o==null?void 0:o.type)??"unknown parent type")}>. Only <${Mr(e.type)}> is supported.`);d++,yield v}f=u.next(y)}return}if(e.key==null||e.type==null)return;let l=this,a={type:e.type,props:e.props,key:e.key,parentKey:o?o.key:null,value:e.value??null,level:((o==null?void 0:o.level)??0)+((o==null?void 0:o.type)==="item"?1:0),index:e.index,rendered:e.rendered,textValue:e.textValue??"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:il(function*(){if(!e.hasChildNodes||!e.childNodes)return;let c=0;for(let u of e.childNodes()){u.key!=null&&(u.key=`${a.key}${u.key}`);let d=l.getFullNode({...u,index:c},l.getChildState(n,u),a.key,a);for(let f of d)c++,yield f}})};yield a}constructor(){this.cache=new WeakMap}}function il(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function ob(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Mr(t){return t[0].toUpperCase()+t.slice(1)}function ib(t,e,n){let r=s.useMemo(()=>new rb,[]),{children:o,items:i,collection:l}=t;return s.useMemo(()=>{if(l)return l;let c=r.build({children:o,items:i},n);return e(c)},[r,o,i,l,n,e])}function lb(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function vc(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:o="toggle",disabledBehavior:i="all"}=t,l=s.useRef(!1),[,a]=s.useState(!1),c=s.useRef(null),u=s.useRef(null),[,d]=s.useState(null),f=s.useMemo(()=>ll(t.selectedKeys),[t.selectedKeys]),b=s.useMemo(()=>ll(t.defaultSelectedKeys,new De),[t.defaultSelectedKeys]),[h,g]=Xn(f,b,t.onSelectionChange),y=s.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,w]=s.useState(o);o==="replace"&&v==="toggle"&&typeof h=="object"&&h.size===0&&w("replace");let x=s.useRef(o);return s.useEffect(()=>{o!==x.current&&(w(o),x.current=o)},[o]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:w,get isFocused(){return l.current},setFocused(M){l.current=M,a(M)},get focusedKey(){return c.current},get childFocusStrategy(){return u.current},setFocusedKey(M,D="first"){c.current=M,u.current=D,d(M)},selectedKeys:h,setSelectedKeys(M){(r||!lb(M,h))&&g(M)},disabledKeys:y,disabledBehavior:i}}function ll(t,e){return t?t==="all"?"all":new De(t):e}function sb(t){let{onExpandedChange:e}=t,[n,r]=Xn(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),o=vc(t),i=s.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),l=ib(t,s.useCallback(c=>new nb(c,{expandedKeys:n}),[n]),null);return s.useEffect(()=>{o.focusedKey!=null&&!l.getItem(o.focusedKey)&&o.setFocusedKey(null)},[l,o.focusedKey]),{collection:l,expandedKeys:n,disabledKeys:i,toggleKey:c=>{r(ab(n,c))},setExpandedKeys:r,selectionManager:new nr(l,o)}}function ab(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const Ro=s.createContext(null),rr=s.createContext(null),Yt=s.createContext(null),_n=s.createContext(null);function cb(t){let e=Do(t),n=s.useRef(null),{menuTriggerProps:r,menuProps:o}=Nh({...t,type:"menu"},e,n),i=s.useRef(null);return ds()?null:s.createElement(ze,{values:[[Ro,{...o,ref:i}],[Qe,e],[Yt,e],[er,{trigger:"MenuTrigger",triggerRef:n,scrollRef:i,placement:"bottom start","aria-labelledby":o["aria-labelledby"]}]]},s.createElement(va,{...r,ref:n,isPressed:e.isOpen},t.children))}const xc=s.createContext(null),Uo=class Uo extends St{filter(e,n,r){let o=e.getItem(this.firstChildKey);if(o&&r(o.textValue,this)){let i=this.clone();return n.addDescendants(i,e),i}return null}};Uo.type="submenutrigger";let ro=Uo;const ub=Ma(ro,(t,e,n)=>{let{CollectionBranch:r}=s.useContext(tr),o=s.useContext(rr),i=s.useContext(Yt),l=Jh({triggerKey:n.key},i),a=s.useRef(null),c=Je(e),{parentMenuRef:u,shouldUseVirtualFocus:d}=s.useContext(xc),{submenuTriggerProps:f,submenuProps:b,popoverProps:h}=Zh({parentMenuRef:u,submenuRef:a,delay:t.delay,shouldUseVirtualFocus:d},l,c);return s.createElement(ze,{values:[[wt,{...f,onAction:void 0,ref:c}],[Ro,{ref:a,...b}],[Qe,l],[er,{trigger:"SubmenuTrigger",triggerRef:c,placement:"end top","aria-labelledby":b["aria-labelledby"],...h}]]},s.createElement(r,{collection:o.collection,parent:n}),t.children[1])},t=>t.children[0]),db=s.forwardRef(function(e,n){return[e,n]=Me(e,n,Ro),s.createElement(ah,{content:s.createElement(hh,e)},r=>s.createElement(fb,{props:e,collection:r,menuRef:n}))});function fb({props:t,collection:e,menuRef:n}){[t,n]=Me(t,n,Ji);let{filter:r,...o}=t,i=s.useMemo(()=>r?e.filter(r):e,[e,r]),l=sb({...t,collection:i,children:void 0}),a=s.useContext(Yt),{isVirtualized:c,CollectionRoot:u}=s.useContext(tr),{menuProps:d}=Vh({...t,isVirtualized:c,onClose:t.onClose||(a==null?void 0:a.close)},l,n),f=Te({...t,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:l.collection.size===0}}),b=null;l.collection.size===0&&t.renderEmptyState&&(b=s.createElement("div",{role:"menuitem",style:{display:"contents"}},t.renderEmptyState()));let h=ae(t,{global:!0});return s.createElement(Rs,null,s.createElement(he.div,{...Y(h,f,d),ref:n,slot:t.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:t.onScroll},s.createElement(ze,{values:[[rr,l],[Mo,{elementType:"div"}],[mh,{name:"MenuSection",render:$c}],[xc,{parentMenuRef:n,shouldUseVirtualFocus:o==null?void 0:o.shouldUseVirtualFocus}],[wt,{shouldCloseOnSelect:t.shouldCloseOnSelect}],[Ji,null],[wh,null],[_n,l.selectionManager],[Yt,a??Do({})]]},s.createElement(Ph,null,s.createElement(u,{collection:l.collection,persistedKeys:vh(l.selectionManager.focusedKey),scrollRef:n}))),b))}class pb extends nr{constructor(e,n){super(e.collection,n),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}}function $c(t,e,n,r="react-aria-MenuSection"){var v,w,x;let o=s.useContext(rr),{CollectionBranch:i}=s.useContext(tr),[l,a]=us(),{headingProps:c,groupProps:u}=Wh({heading:a,"aria-label":n.props["aria-label"]??void 0}),d=Te({...t,id:void 0,children:void 0,defaultClassName:r,className:(v=n.props)==null?void 0:v.className,style:(w=n.props)==null?void 0:w.style,values:void 0}),f=s.useContext(_n),b=vc(t),h=t.selectionMode!=null?new pb(f,b):f,g=(x=Qt(wt))==null?void 0:x.shouldCloseOnSelect,y=ae(t,{global:!0});return delete y.id,s.createElement(he.section,{...Y(y,d,u),ref:e},s.createElement(ze,{values:[[Eh,{...c,ref:l}],[_n,h],[wt,{shouldCloseOnSelect:t.shouldCloseOnSelect??g}]]},s.createElement(i,{collection:o.collection,parent:n})))}const hb=Ma(Qr,$c),wt=s.createContext(null),bb=Ta(Jr,function(e,n,r){var M;[e,n]=Me(e,n,wt);let o=(M=Qt(wt))==null?void 0:M.id,i=s.useContext(rr),l=Je(n),a=s.useContext(_n),{isVirtualized:c}=s.useContext(tr),{menuItemProps:u,labelProps:d,descriptionProps:f,keyboardShortcutProps:b,...h}=Uh({...e,id:o,key:r.key,selectionManager:a,isVirtualized:c},i,l),{hoverProps:g,isHovered:y}=tn({isDisabled:h.isDisabled}),v=Te({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...h,isHovered:y,isFocusVisible:h.isFocusVisible,selectionMode:a.selectionMode,selectionBehavior:a.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),w=e.href?he.a:he.div,x=ae(e,{global:!0});return delete x.id,delete x.onClick,s.createElement(w,{...Y(x,v,u,g),ref:l,"data-disabled":h.isDisabled||void 0,"data-hovered":y||void 0,"data-focused":h.isFocused||void 0,"data-focus-visible":h.isFocusVisible||void 0,"data-pressed":h.isPressed||void 0,"data-selected":h.isSelected||void 0,"data-selection-mode":a.selectionMode==="none"?void 0:a.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},s.createElement(ze,{values:[[La,{slots:{[Dn]:d,label:d,description:f}}],[Ch,b],[kh,{isSelected:h.isSelected}]]},v.children))});function mb(t,e){let{role:n="dialog"}=t,r=xn();r=t["aria-label"]?void 0:r;let o=s.useRef(!1);s.useEffect(()=>{if(e.current&&!$t(e.current)){Ye(e.current);let l=setTimeout(()=>{(ne()===e.current||ne()===document.body)&&(o.current=!0,e.current&&(e.current.blur(),Ye(e.current)),o.current=!1)},500);return()=>{clearTimeout(l)}}},[e]),$a();let i=s.useRef(!1);return s.useEffect(()=>{if(process.env.NODE_ENV!=="production"&&!i.current&&e.current){let l=e.current,a=l.hasAttribute("aria-label"),c=l.hasAttribute("aria-labelledby");!a&&!c&&(console.warn("A dialog must have a title for accessibility. Either provide an aria-label or aria-labelledby prop, or render a heading element inside the dialog."),i.current=!0)}}),{dialogProps:{...ae(t,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||r,onBlur:l=>{o.current&&l.stopPropagation()}},titleProps:{id:r}}}const wc=s.createContext(null),Qe=s.createContext(null);function gb(t){let e=Do(t),n=s.useRef(null),{triggerProps:r,overlayProps:o}=mc({type:"dialog"},e,n);return r.id=pe(),o["aria-labelledby"]=r.id,s.createElement(ze,{values:[[Qe,e],[Yt,e],[wc,o],[er,{trigger:"DialogTrigger",triggerRef:n,"aria-labelledby":o["aria-labelledby"]}]]},s.createElement(va,{...r,ref:n,isPressed:e.isOpen},t.children))}const yb=s.forwardRef(function(e,n){let r=e["aria-labelledby"];[e,n]=Me(e,n,wc);let{dialogProps:o,titleProps:i}=mb({...e,"aria-labelledby":r},n),l=s.useContext(Qe);!o["aria-label"]&&!o["aria-labelledby"]&&(e["aria-labelledby"]?o["aria-labelledby"]=e["aria-labelledby"]:process.env.NODE_ENV!=="production"&&console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let a=Te({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(l==null?void 0:l.close)||(()=>{})}}),c=ae(e,{global:!0});return s.createElement(he.section,{...Y(c,a,o),render:e.render,ref:n,slot:e.slot||void 0},s.createElement(ze,{values:[[ks,{slots:{[Dn]:{},title:{...i,level:2}}}],[Ps,{slots:{[Dn]:{},close:{onPress:()=>l==null?void 0:l.close()}}}]]},a.children))});function vb(t,e,n){let{overlayProps:r,underlayProps:o}=Is({...t,isOpen:e.isOpen,onClose:e.close},n);return Ks({isDisabled:!e.isOpen}),$a(),s.useEffect(()=>{if(e.isOpen&&n.current)return Ts([n.current],{shouldUseInert:!0})},[e.isOpen,n]),{modalProps:Y(r),underlayProps:o}}const xb=s.createContext(null),No=s.createContext(null),$b=s.forwardRef(function(e,n){if(s.useContext(No)){if(process.env.NODE_ENV!=="production"&&(e.onOpenChange||e.defaultOpen!==void 0||e.isOpen!==void 0)){const y=new Set(["isDismissable","isKeyboardDismissDisabled","isOpen","defaultOpen","onOpenChange","isEntering","isExiting","UNSTABLE_portalContainer","shouldCloseOnInteractOutside"]),v=Object.keys(e).filter(w=>y.has(w));console.warn(`This modal is already wrapped in a ModalOverlay, props [${v.join(", ")}] should be placed on the ModalOverlay instead.`)}return s.createElement(sl,{...e,modalRef:n},e.children)}let{isDismissable:o,isKeyboardDismissDisabled:i,isOpen:l,defaultOpen:a,onOpenChange:c,children:u,isEntering:d,isExiting:f,UNSTABLE_portalContainer:b,shouldCloseOnInteractOutside:h,...g}=e;return s.createElement(Ec,{isDismissable:o,isKeyboardDismissDisabled:i,isOpen:l,defaultOpen:a,onOpenChange:c,isEntering:d,isExiting:f,UNSTABLE_portalContainer:b,shouldCloseOnInteractOutside:h},s.createElement(sl,{...g,modalRef:n},u))});function wb(t,e){[t,e]=Me(t,e,xb);let n=s.useContext(Qe),r=To(t),o=t.isOpen!=null||t.defaultOpen!=null||!n?r:n;o===n&&process.env.NODE_ENV!=="production"&&(t.onOpenChange||t.defaultOpen!==void 0||t.isOpen!==void 0)&&console.warn("This modals state is controlled by a trigger, place onOpenChange on the trigger instead.");let i=Je(e),l=s.useRef(null),a=Ir(i,o.isOpen),c=Ir(l,o.isOpen),u=a||c||t.isExiting||!1,d=Ze();return!o.isOpen&&!u||d?null:s.createElement(Eb,{...t,state:o,isExiting:u,overlayRef:i,modalRef:l})}const Ec=s.forwardRef(wb);function Eb({UNSTABLE_portalContainer:t,...e}){let n=e.modalRef,{state:r}=e,{modalProps:o,underlayProps:i}=vb(e,r,n),l=bo(e.overlayRef)||e.isEntering||!1,a=Te({...e,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:l,isExiting:e.isExiting,state:r}}),c=td(),u,d;if(typeof document<"u"){let b=st(document.body)?document.body:document.scrollingElement||document.documentElement,h=b.getBoundingClientRect().width%1,g=b.getBoundingClientRect().height%1;u=b.scrollWidth-h,d=b.scrollHeight-g}let f={...a.style,"--visual-viewport-width":c.width+"px","--visual-viewport-height":c.height+"px","--page-width":u!==void 0?u+"px":void 0,"--page-height":d!==void 0?d+"px":void 0};return s.createElement(Zr,{isExiting:e.isExiting,portalContainer:t},s.createElement(he.div,{...Y(ae(e,{global:!0}),i),...a,style:f,ref:e.overlayRef,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},s.createElement(ze,{values:[[No,{modalProps:o,modalRef:n,isExiting:e.isExiting,isDismissable:e.isDismissable}],[Qe,r]]},a.children)))}function sl(t){let{modalProps:e,modalRef:n,isExiting:r,isDismissable:o}=s.useContext(No),i=s.useContext(Qe),l=s.useMemo(()=>ut(t.modalRef,n),[t.modalRef,n]),a=Je(l),c=bo(a),u=Te({...t,defaultClassName:"react-aria-Modal",values:{isEntering:c,isExiting:r,state:i}});return s.createElement(he.div,{...Y(ae(t,{global:!0}),e),...u,ref:a,"data-entering":c||void 0,"data-exiting":r||void 0},o&&s.createElement(Xr,{onDismiss:i.close}),u.children)}const Cb=s.forwardRef(({children:t,...e},n)=>{n=Je(n);let{pressProps:r}=Xe({...e,ref:n}),{focusableProps:o}=en(e,n),i=s.Children.only(t);s.useEffect(()=>{if(process.env.NODE_ENV==="production")return;let a=n.current;if(!a||!(a instanceof fe(a).Element)){console.error("<Pressable> child must forward its ref to a DOM element.");return}if(!e.isDisabled&&!yo(a)){console.warn("<Pressable> child must be focusable. Please ensure the tabIndex prop is passed through.");return}if(a.localName!=="button"&&a.localName!=="input"&&a.localName!=="select"&&a.localName!=="textarea"&&a.localName!=="a"&&a.localName!=="area"&&a.localName!=="summary"){let c=a.getAttribute("role");c?c!=="application"&&c!=="button"&&c!=="checkbox"&&c!=="combobox"&&c!=="gridcell"&&c!=="link"&&c!=="menuitem"&&c!=="menuitemcheckbox"&&c!=="menuitemradio"&&c!=="option"&&c!=="radio"&&c!=="searchbox"&&c!=="separator"&&c!=="slider"&&c!=="spinbutton"&&c!=="switch"&&c!=="tab"&&c!=="textbox"&&c!=="treeitem"&&console.warn(`<Pressable> child must have an interactive ARIA role. Got "${c}".`):console.warn("<Pressable> child must have an interactive ARIA role.")}},[n,e.isDisabled]);let l=parseInt(s.version,10)<19?i.ref:i.props.ref;return s.cloneElement(i,{...Y(r,o,i.props),ref:ut(l,n)})}),al=({children:t,className:e,slot:n,style:r,variant:o,...i})=>{const l=s.useMemo(()=>hf({variant:o}),[o]);return p.jsx(Po,{"aria-label":"Close",className:Ee(e,l),"data-slot":"close-button",slot:n,style:r,...i,children:a=>typeof t=="function"?t(a):t??p.jsx(up,{"data-slot":"close-button-icon"})})},Sb=Object.assign(al,{Root:al}),Pb=s.createContext(null),kb=s.createContext(null);function Tb(t,e,n){let{validationBehavior:r,focus:o}=t;J(()=>{if(r==="native"&&(n!=null&&n.current)&&!n.current.disabled){let u=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(u),n.current.hasAttribute("title")||(n.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(Db(n.current))}});let i=s.useRef(!1),l=Pe(()=>{i.current||e.resetValidation()}),a=Pe(u=>{var f,b;e.displayValidation.isInvalid||e.commitValidation();let d=(f=n==null?void 0:n.current)==null?void 0:f.form;!u.defaultPrevented&&n&&d&&Rb(d)===n.current&&(o?o():(b=n.current)==null||b.focus(),Vr("keyboard")),u.preventDefault()}),c=Pe(()=>{e.commitValidation()});s.useEffect(()=>{let u=n==null?void 0:n.current;if(!u)return;let d=u.form,f=d==null?void 0:d.reset;return d&&(d.reset=()=>{i.current=!window.event||window.event.type==="message"&&F(window.event)instanceof MessagePort,f==null||f.call(d),i.current=!1}),u.addEventListener("invalid",a),u.addEventListener("change",c),d==null||d.addEventListener("reset",l),()=>{u.removeEventListener("invalid",a),u.removeEventListener("change",c),d==null||d.removeEventListener("reset",l),d&&(d.reset=f)}},[n,r])}function Mb(t){let e=t.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function Db(t){return{isInvalid:!t.validity.valid,validationDetails:Mb(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function Rb(t){var e;for(let n=0;n<t.elements.length;n++){let r=t.elements[n];if(((e=r.validity)==null?void 0:e.valid)===!1)return r}return null}function Nb(t,e){let{elementType:n="a",onPress:r,onPressStart:o,onPressEnd:i,onClick:l,isDisabled:a,...c}=t,u={};n!=="a"&&(u={role:"link",tabIndex:a?void 0:0});let{focusableProps:d}=en(t,e),{pressProps:f,isPressed:b}=Xe({onPress:r,onPressStart:o,onPressEnd:i,onClick:l,isDisabled:a,ref:e}),h=ae(c,{labelable:!0}),g=Y(d,f),y=Zt(),v=Ol(t);return{isPressed:b,linkProps:Y(h,v,{...g,...u,"aria-disabled":a||void 0,"aria-current":t["aria-current"],onClick:w=>{var x;(x=f.onClick)==null||x.call(f,w),Al(w,y,t.href,t.routerOptions)}})}}const Lb=s.createContext(null),Ib=s.forwardRef(function(e,n){[e,n]=Me(e,n,Lb);let r=e.href&&!e.isDisabled?"a":"span",{linkProps:o,isPressed:i}=Nb({...e,elementType:r},n),l=he[r],{hoverProps:a,isHovered:c}=tn(e),{focusProps:u,isFocused:d,isFocusVisible:f}=So(),b=Te({...e,defaultClassName:"react-aria-Link",values:{isCurrent:!!e["aria-current"],isDisabled:e.isDisabled||!1,isPressed:i,isHovered:c,isFocused:d,isFocusVisible:f}}),h=ae(e,{global:!0});return delete h.onClick,s.createElement(l,{ref:n,slot:e.slot||void 0,...Y(h,b,o,a,u),"data-focused":d||void 0,"data-hovered":c||void 0,"data-pressed":i||void 0,"data-focus-visible":f||void 0,"data-current":!!e["aria-current"]||void 0,"data-disabled":e.isDisabled||void 0},b.children)}),Cc=s.createContext({}),cl=({children:t,className:e,...n})=>{const r=s.useMemo(()=>mf(),[]);return p.jsx(Cc,{value:{slots:r},children:p.jsx(Ib,{...n,className:Ee(e,r==null?void 0:r.base()),children:o=>p.jsx(p.Fragment,{children:typeof t=="function"?t(o):t})})})},Kb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(Cc);return p.jsx(oe.span,{className:ie(r==null?void 0:r.icon,e),"data-default-icon":sp(!t),"data-slot":"link-icon",...n,children:t??p.jsx(cp,{"data-slot":"link-default-icon"})})},Lo=Object.assign(cl,{Root:cl,Icon:Kb});function Ob(t={}){let{isReadOnly:e}=t,[n,r]=Xn(t.isSelected,t.defaultSelected||!1,t.onChange),[o]=s.useState(n);function i(a){e||r(a)}function l(){e||r(!n)}return{isSelected:n,defaultSelected:t.defaultSelected??o,setSelected:i,toggle:l}}const Ab=s.createContext({}),Fb="__button_group_child",ul=({children:t,className:e,fullWidth:n,isDisabled:r,isIconOnly:o,size:i,slot:l,style:a,variant:c,[Fb]:u,...d})=>{const f=s.useContext(Ab),b=u===!0,h=i??(b?f==null?void 0:f.size:void 0),g=c??(b?f==null?void 0:f.variant:void 0),y=r??(b?f==null?void 0:f.isDisabled:void 0),v=n??(b?f==null?void 0:f.fullWidth:void 0),w=qe({fullWidth:v,isIconOnly:o,size:h,variant:g});return p.jsx(Po,{className:Ee(e,w),"data-slot":"button",isDisabled:y,slot:l,style:a,...d,children:x=>typeof t=="function"?t(x):t})},jb=Object.assign(ul,{Root:ul}),Pt=s.createContext({}),dl=({children:t,className:e,variant:n="default",...r})=>{const o=s.useMemo(()=>df({variant:n}),[n]),i=p.jsx(oe.div,{className:o.base({className:e}),"data-slot":"card",...r,children:t});return p.jsx(Pt,{value:{slots:o},children:n==="transparent"?i:p.jsx(Zn,{value:{variant:n},children:i})})},_b=({className:t,...e})=>{const{slots:n}=s.useContext(Pt);return p.jsx(oe.div,{className:ie(n==null?void 0:n.header,t),"data-slot":"card-header",...e})},Bb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(Pt);return p.jsx(oe.h3,{className:ie(r==null?void 0:r.title,e),"data-slot":"card-title",...n,children:t})},Vb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(Pt);return p.jsx(oe.p,{className:ie(r==null?void 0:r.description,e),"data-slot":"card-description",...n,children:t})},zb=({className:t,...e})=>{const{slots:n}=s.useContext(Pt);return p.jsx(oe.div,{className:ie(n==null?void 0:n.content,t),"data-slot":"card-content",...e})},Hb=({className:t,...e})=>{const{slots:n}=s.useContext(Pt);return p.jsx(oe.div,{className:ie(n==null?void 0:n.footer,t),"data-slot":"card-footer",...e})},At=Object.assign(dl,{Root:dl,Header:_b,Title:Bb,Description:Vb,Content:zb,Footer:Hb}),Gb=new WeakMap;function Ub(t=!0){let[e,n]=s.useState(t),r=s.useRef(!1),o=s.useCallback(i=>{r.current=!0,n(!!i)},[]);return J(()=>{r.current||n(!1)},[]),[o,e]}function fl(t=!0){let e=pe(),[n,r]=Ub(t);return{id:r?e:void 0,ref:n}}const Sc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Pc={...Sc,customError:!0,valid:!1},mt={isInvalid:!1,validationDetails:Sc,validationErrors:[]},Wb=s.createContext({}),Bn="__reactAriaFormValidationState";function kc(t){if(t[Bn]){let{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}=t[Bn];return{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}}return qb(t)}function qb(t){let{isInvalid:e,validationState:n,name:r,value:o,builtinValidation:i,validate:l,validationBehavior:a="aria"}=t;n&&(e||(e=n==="invalid"));let c=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:Pc}:null,u=s.useMemo(()=>{if(!l||o==null)return null;let C=Yb(l,o);return pl(C)},[l,o]);i!=null&&i.validationDetails.valid&&(i=void 0);let d=s.useContext(Wb),f=s.useMemo(()=>r?Array.isArray(r)?r.flatMap(C=>oo(d[C])):oo(d[r]):[],[d,r]),[b,h]=s.useState(d),[g,y]=s.useState(!1);d!==b&&(h(d),y(!1));let v=s.useMemo(()=>pl(g?[]:f),[g,f]),w=s.useRef(mt),[x,M]=s.useState(mt),D=s.useRef(mt),L=()=>{if(!_)return;E(!1);let C=u||i||w.current;Dr(C,D.current)||(D.current=C,M(C))},[_,E]=s.useState(!1);return s.useEffect(L),{realtimeValidation:c||v||u||i||mt,displayValidation:a==="native"?c||v||x:c||v||u||i||x,updateValidation(C){a==="aria"&&!Dr(x,C)?M(C):w.current=C},resetValidation(){let C=mt;Dr(C,D.current)||(D.current=C,M(C)),a==="native"&&E(!1),y(!0)},commitValidation(){a==="native"&&E(!0),y(!0)}}}function oo(t){return t?Array.isArray(t)?t:[t]:[]}function Yb(t,e){if(typeof t=="function"){let n=t(e);if(n&&typeof n!="boolean")return oo(n)}return[]}function pl(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:Pc}:null}function Dr(t,e){return t===e?!0:!!t&&!!e&&t.isInvalid===e.isInvalid&&t.validationErrors.length===e.validationErrors.length&&t.validationErrors.every((n,r)=>n===e.validationErrors[r])&&Object.entries(t.validationDetails).every(([n,r])=>e.validationDetails[n]===r)}function Xb(t,e,n){let{isDisabled:r=!1,isReadOnly:o=!1,value:i,name:l,form:a,children:c,isRequired:u,validationBehavior:d="aria","aria-label":f,"aria-labelledby":b,"aria-describedby":h,onPressStart:g,onPressEnd:y,onPressChange:v,onPress:w,onPressUp:x,onClick:M}=t,D=kc({...t,value:e.isSelected}),{isInvalid:L,validationErrors:_,validationDetails:E}=D.displayValidation;Tb(t,D,n);let P=O=>{O.stopPropagation(),e.setSelected(F(O).checked)},N=c!=null,C=f!=null||b!=null;!N&&!C&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:K,isPressed:j}=Xe({onPressStart:g,onPressEnd:y,onPressChange:v,onPress:w,onPressUp:x,onClick:M,isDisabled:r}),[A,m]=s.useState(!1),{pressProps:S}=Xe({onPressStart(O){if(O.pointerType==="keyboard"||O.pointerType==="virtual"){O.continuePropagation();return}g==null||g(O),v==null||v(!0),m(!0)},onPressEnd(O){if(O.pointerType==="keyboard"||O.pointerType==="virtual"){O.continuePropagation();return}y==null||y(O),v==null||v(!1),m(!1)},onPressUp(O){if(O.pointerType==="keyboard"||O.pointerType==="virtual"){O.continuePropagation();return}x==null||x(O)},onClick:M,onPress(O){var q;if(O.pointerType==="keyboard"||O.pointerType==="virtual"){O.continuePropagation();return}w==null||w(O),e.toggle(),(q=n.current)==null||q.focus();let{[Bn]:G}=t,{commitValidation:W}=G||D;W()},isDisabled:r||o}),{focusableProps:I}=en(t,n),k=Y(K,I),R=ae(t,{labelable:!0});id(n,e.defaultSelected,e.setSelected);let $=fl(),T=fl();return{labelProps:Y(S,{onClick:O=>O.preventDefault()}),inputProps:Y(R,{checked:e.isSelected,"aria-required":u&&d==="aria"||void 0,required:u&&d==="native","aria-invalid":L||t.validationState==="invalid"||void 0,"aria-errormessage":t["aria-errormessage"],"aria-controls":t["aria-controls"],"aria-readonly":o||void 0,"aria-describedby":[$.id,T.id,h].filter(Boolean).join(" ")||void 0,onChange:P,disabled:r,...i==null?{}:{value:i},name:l,form:a,type:"checkbox",...k}),descriptionProps:$,errorMessageProps:T,isSelected:e.isSelected,isPressed:j||A,isDisabled:r,isReadOnly:o,isInvalid:L||t.validationState==="invalid",validationErrors:_,validationDetails:E}}function Tc(t,e,n){let{labelProps:r,inputProps:o,descriptionProps:i,errorMessageProps:l,isSelected:a,isPressed:c,isDisabled:u,isReadOnly:d,isInvalid:f,validationErrors:b,validationDetails:h}=Xb(t,e,n),{isIndeterminate:g}=t;return s.useEffect(()=>{n.current&&(n.current.indeterminate=!!g)}),{labelProps:Y(r,s.useMemo(()=>({onMouseDown:y=>y.preventDefault()}),[])),inputProps:o,descriptionProps:i,errorMessageProps:l,isSelected:a,isPressed:c,isDisabled:u,isReadOnly:d,isInvalid:f,validationErrors:b,validationDetails:h}}const Zb=typeof document<"u"?s.useInsertionEffect??s.useLayoutEffect:()=>{};function Jb(t,e,n){let[r,o]=s.useState(t||e),i=s.useRef(r),l=s.useRef(t!==void 0),a=t!==void 0;s.useEffect(()=>{let f=l.current;f!==a&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),l.current=a},[a]);let c=a?t:r;Zb(()=>{i.current=c});let[,u]=s.useReducer(()=>({}),{}),d=s.useCallback((f,...b)=>{let h=typeof f=="function"?f(i.current):f;Object.is(i.current,h)||(i.current=h,o(h),u(),n==null||n(h,...b))},[n]);return[c,d]}function Qb(t={}){let{isReadOnly:e}=t,[n,r]=Jb(t.isSelected,t.defaultSelected||!1,t.onChange),[o]=s.useState(n);function i(a){e||r(a)}function l(){e||r(!n)}return{isSelected:n,defaultSelected:t.defaultSelected??o,setSelected:i,toggle:l}}function em(t,e,n){const r=Qb({isReadOnly:t.isReadOnly||e.isReadOnly,isSelected:e.isSelected(t.value),defaultSelected:e.defaultValue.includes(t.value),onChange(y){y?e.addValue(t.value):e.removeValue(t.value),t.onChange&&t.onChange(y)}});let{name:o,form:i,descriptionId:l,errorMessageId:a,validationBehavior:c}=Gb.get(e);c=t.validationBehavior??c;let{realtimeValidation:u}=kc({...t,value:r.isSelected,name:void 0,validationBehavior:"aria"}),d=s.useRef(mt),f=()=>{e.setInvalid(t.value,u.isInvalid?u:d.current)};s.useEffect(f);let b=e.realtimeValidation.isInvalid?e.realtimeValidation:u,h=c==="native"?e.displayValidation:b,g=Tc({...t,isReadOnly:t.isReadOnly||e.isReadOnly,isDisabled:t.isDisabled||e.isDisabled,name:t.name||o,form:t.form||i,isRequired:t.isRequired??e.isRequired,validationBehavior:c,[Bn]:{realtimeValidation:b,displayValidation:h,resetValidation:e.resetValidation,commitValidation:e.commitValidation,updateValidation(y){d.current=y,f()}}},r,n);return{...g,inputProps:{...g.inputProps,"aria-describedby":[g.inputProps["aria-describedby"],e.isInvalid?a:null,l].filter(Boolean).join(" ")||void 0}}}const tm=s.createContext(null),Mc=s.createContext(null),Dc=s.createContext(null),nm=s.forwardRef(function(e,n){let{inputRef:r=null,...o}=e;[e,n]=Me(o,n,tm);let i=s.useContext(Mc),[l,a]=rm(e,r),{descriptionProps:c,errorMessageProps:u,isSelected:d,isDisabled:f,isReadOnly:b,isInvalid:h,validationDetails:g,validationErrors:y}=l,v=Te({...e,defaultClassName:"react-aria-CheckboxField",values:{isSelected:d,isIndeterminate:e.isIndeterminate||!1,isDisabled:f,isReadOnly:b,isInvalid:h,isRequired:e.isRequired||!1}}),w=ae(e,{global:!0});return delete w.id,delete w.onClick,s.createElement(he.div,{...Y(w,v),ref:n,slot:e.slot||void 0,"data-selected":d||void 0,"data-indeterminate":e.isIndeterminate||void 0,"data-disabled":f||void 0,"data-readonly":b||void 0,"data-invalid":h||void 0,"data-required":e.isRequired||void 0},s.createElement(ze,{values:[[Dc,{...l,inputRef:a,defaultClassName:"react-aria-CheckboxButton",isIndeterminate:e.isIndeterminate,isRequired:e.isRequired}],[La,{slots:{description:c,errorMessage:u}}],[Pb,i?null:{isInvalid:h,validationDetails:g,validationErrors:y}]]},v.children))});function rm(t,e){let{validationBehavior:n}=Qt(kb)||{},r=t.validationBehavior??n??"native",o=s.useContext(Mc),i=Je(s.useMemo(()=>ut(e,t.inputRef!==void 0?t.inputRef:null),[e,t.inputRef])),l={...wf(t),children:typeof t.children=="function"?!0:t.children,value:t.value,validationBehavior:r};return[o?em(l,o,i):Tc(l,Ob(t),i),i]}const om=s.forwardRef(function(e,n){let{labelProps:r,inputProps:o,isSelected:i,isDisabled:l,isReadOnly:a,isPressed:c,isInvalid:u,inputRef:d,defaultClassName:f,isIndeterminate:b,isRequired:h}=s.useContext(Dc),{isFocused:g,isFocusVisible:y,focusProps:v}=So(),w=l||a,{hoverProps:x,isHovered:M}=tn({...e,isDisabled:w}),D=Te({...e,defaultClassName:f,values:{isSelected:i,isIndeterminate:b||!1,isPressed:c,isHovered:M,isFocused:g,isFocusVisible:y,isDisabled:l,isReadOnly:a,isInvalid:u,isRequired:h||!1}}),L=ae(e,{global:!0});return delete L.id,delete L.onClick,s.createElement(he.label,{...Y(L,r,x,D),ref:n,slot:e.slot||void 0,"data-selected":i||void 0,"data-indeterminate":b||void 0,"data-pressed":c||void 0,"data-hovered":M||void 0,"data-focused":g||void 0,"data-focus-visible":y||void 0,"data-disabled":l||void 0,"data-readonly":a||void 0,"data-invalid":u||void 0,"data-required":h||void 0},s.createElement(ya,{elementType:"span"},s.createElement("input",{...Y(o,v),ref:d})),D.children)}),im=s.createContext({}),or=s.createContext({}),io=({children:t,className:e,variant:n,...r})=>{const o=s.useContext(im),i=n??o.variant,l=s.useMemo(()=>ff({variant:i}),[i]);return p.jsx(nm,{"data-slot":"checkbox",...r,className:Ee(e,l.base()),children:a=>p.jsx(or,{value:{slots:l,state:a},children:typeof t=="function"?t(a):t})})};io.displayName="HeroUI.Checkbox";const Rc=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(or);return p.jsx(om,{"data-slot":"checkbox-content",...n,className:Ee(e,r==null?void 0:r.content()),children:t})};Rc.displayName="HeroUI.Checkbox.Content";const Nc=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(or);return p.jsx(oe.span,{className:ie(r==null?void 0:r.control,e),"data-slot":"checkbox-control",...n,children:t})};Nc.displayName="HeroUI.Checkbox.Control";const Lc=({children:t,className:e,...n})=>{const{slots:r,state:o}=s.useContext(or),i=o==null?void 0:o.isSelected,l=o==null?void 0:o.isIndeterminate,a=typeof t=="function"?t(o??{}):t||(l?p.jsx("svg",{"aria-hidden":"true","data-slot":"checkbox-default-indicator--indeterminate",fill:"none",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeWidth:3,viewBox:"0 0 24 24",children:p.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})}):p.jsx("svg",{"aria-hidden":"true","data-slot":"checkbox-default-indicator--checkmark",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:i?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 17 18",children:p.jsx("polyline",{points:"1 9 7 14 15 4"})}));return p.jsx(oe.span,{"aria-hidden":"true",className:ie(r==null?void 0:r.indicator,e),"data-slot":"checkbox-indicator",...n,children:a})};Lc.displayName="HeroUI.Checkbox.Indicator";const yn=Object.assign(io,{Root:io,Content:Rc,Control:Nc,Indicator:Lc}),Ic=s.createContext({}),hl=({children:t,className:e,color:n,size:r,variant:o,...i})=>{const l=s.useMemo(()=>pf({color:n,size:r,variant:o}),[n,r,o]),a=s.useMemo(()=>typeof t=="string"||typeof t=="number"?p.jsx(Kc,{children:t}):t,[t]);return p.jsx(Ic,{value:{slots:l},children:p.jsx(oe.span,{...i,className:ie(l.base,e),"data-slot":"chip",children:a})})},Kc=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(Ic);return p.jsx(oe.span,{className:ie(r==null?void 0:r.label,e),"data-slot":"chip-label",...n,children:t})},Vn=Object.assign(hl,{Root:hl,Label:Kc}),ir=s.createContext({}),lo=({children:t,className:e,color:n,size:r,...o})=>{const i=s.useMemo(()=>gf({color:n,size:r}),[n,r]);return p.jsx(jf,{"data-slot":"progress-bar",...o,className:Ee(e,i.base()),children:l=>p.jsx(ir,{value:{slots:i,state:l},children:typeof t=="function"?t(l):t})})};lo.displayName="HeroUI.ProgressBar";const Oc=({children:t,className:e,...n})=>{const{slots:r,state:o}=s.useContext(ir);return p.jsx(oe.span,{className:ie(r==null?void 0:r.output,e),"data-slot":"progress-bar-output",...n,children:t??(o==null?void 0:o.valueText)})};Oc.displayName="HeroUI.ProgressBar.Output";const Ac=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(ir);return p.jsx(oe.div,{className:ie(r==null?void 0:r.track,e),"data-slot":"progress-bar-track",...n,children:t})};Ac.displayName="HeroUI.ProgressBar.Track";const Fc=({className:t,style:e,...n})=>{const{slots:r,state:o}=s.useContext(ir);return p.jsx(oe.div,{className:ie(r==null?void 0:r.fill,t),"data-slot":"progress-bar-fill",style:{...e,width:o!=null&&o.isIndeterminate?void 0:`${(o==null?void 0:o.percentage)??0}%`},...n})};Fc.displayName="HeroUI.ProgressBar.Fill";const vn=Object.assign(lo,{Root:lo,Output:Oc,Track:Ac,Fill:Fc}),bl=({className:t,orientation:e,variant:n,...r})=>{const o=Qt(Mo),i=e??(o==null?void 0:o.orientation)??"horizontal";return p.jsx(Mh,{"data-orientation":i,"data-slot":"separator",orientation:i,className:xf({orientation:i,variant:n,className:t}),...r})},lm=Object.assign(bl,{Root:bl}),nn=s.createContext({}),ml=({children:t,className:e,status:n,...r})=>{const o=s.useMemo(()=>uf({status:n}),[n]);return p.jsx(nn,{value:{slots:o,status:n},children:p.jsx(Zn,{value:{variant:"default"},children:p.jsx(oe.div,{className:o==null?void 0:o.base({className:e}),"data-slot":"alert-root",...r,children:t})})})},sm=({children:t,className:e,...n})=>{const{slots:r,status:o}=s.useContext(nn),i=()=>{switch(o){case"accent":return p.jsx(ki,{"data-slot":"alert-default-icon"});case"success":return p.jsx(pp,{"data-slot":"alert-default-icon"});case"warning":return p.jsx(dp,{"data-slot":"alert-default-icon"});case"danger":return p.jsx(fp,{"data-slot":"alert-default-icon"});default:return p.jsx(ki,{"data-slot":"alert-default-icon"})}};return p.jsx(oe.div,{className:ie(r==null?void 0:r.indicator,e),"data-slot":"alert-indicator",...n,children:t??i()})},am=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(nn);return p.jsx(oe.div,{className:ie(r==null?void 0:r.content,e),"data-slot":"alert-content",...n,children:t})},cm=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(nn);return p.jsx(oe.p,{className:ie(r==null?void 0:r.title,e),"data-slot":"alert-title",...n,children:t})},um=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(nn);return p.jsx(oe.span,{className:ie(r==null?void 0:r.description,e),"data-slot":"alert-description",...n,children:t})},Dt=Object.assign(ml,{Root:ml,Indicator:sm,Content:am,Title:cm,Description:um}),Io=s.createContext({}),dm=({children:t,className:e,variant:n,...r})=>{const o=s.useMemo(()=>yf({variant:n}),[n]);return p.jsx(bb,{className:Ee(e,o.item()),"data-slot":"menu-item",...r,children:i=>p.jsx(Io,{value:{slots:o,state:i},children:typeof t=="function"?t(i):t})})},fm=({children:t,className:e,type:n="checkmark",...r})=>{const{slots:o,state:i}=s.useContext(Io),l=i==null?void 0:i.isSelected,a=typeof t=="function"?t(i??{}):t||(n==="dot"?p.jsx("svg",{"aria-hidden":"true","data-slot":"menu-item-indicator--dot",fill:"currentColor",fillRule:"evenodd",role:"presentation",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{clipRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14",fillRule:"evenodd"})}):p.jsx("svg",{"aria-hidden":"true","data-slot":"menu-item-indicator--checkmark",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:l?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 17 18",children:p.jsx("polyline",{points:"1 9 7 14 15 4"})}));return p.jsx(oe.span,{"aria-hidden":"true",className:ie(o==null?void 0:o.indicator,e),"data-slot":"menu-item-indicator","data-type":n,"data-visible":l||void 0,...r,children:a})},pm=({children:t,className:e,...n})=>{const{slots:r,state:o}=s.useContext(Io);if(!(o==null?void 0:o.hasSubmenu))return null;const a=t??p.jsx(ap,{});return p.jsx(oe.span,{"aria-hidden":"true",className:ie(r==null?void 0:r.submenuIndicator,e),"data-slot":"submenu-indicator",...n,children:a})},hm=({children:t,className:e,...n})=>{const r=s.useMemo(()=>vf({class:typeof e=="string"?e:void 0}),[e]);return p.jsx(hb,{className:r,...n,children:t})},lr=s.createContext({}),gl=({children:t,...e})=>{const n=s.useMemo(()=>bf(),[]);return p.jsx(lr,{value:{slots:n},children:p.jsx(cb,{...e,children:t})})},bm=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(lr);return p.jsx(Po,{className:Ee(e,r==null?void 0:r.trigger()),"data-slot":"dropdown-trigger",...n,children:o=>p.jsx(p.Fragment,{children:typeof t=="function"?t(o):t})})},mm=({children:t,className:e,placement:n,...r})=>{const{slots:o}=s.useContext(lr);return p.jsx(Zn,{value:{variant:"default"},children:p.jsx(Qp,{...r,className:Ee(e,o==null?void 0:o.popover()),"data-slot":"dropdown-popover",placement:n,children:t})})};function gm({className:t,...e}){const{slots:n}=s.useContext(lr);return p.jsx(db,{className:Ee(t,n==null?void 0:n.menu()),"data-selection-mode":e.selectionMode,"data-slot":"dropdown-menu",...e})}const ym=t=>p.jsx(dm,{...t}),vm=t=>p.jsx(pm,{...t}),xm=({children:t,...e})=>p.jsx(ub,{"data-slot":"dropdown-submenu-trigger",...e,children:t}),$m=t=>p.jsx(fm,{...t}),wm=t=>p.jsx(hm,{...t}),Rt=Object.assign(gl,{Root:gl,Trigger:bm,Popover:mm,Menu:gm,Section:wm,Item:ym,ItemIndicator:$m,SubmenuIndicator:vm,SubmenuTrigger:xm}),we=s.createContext({}),yl=({children:t,state:e,...n})=>{const r=s.useMemo(()=>({slots:$o(),placement:void 0}),[]),o=s.useMemo(()=>e?{isOpen:e.isOpen,onOpenChange:e.setOpen}:{},[e]);return p.jsx(we,{value:r,children:p.jsx(gb,{"data-slot":"modal-root",...Y(n,o),children:t})})},Em=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(we);return p.jsx(Cb,{children:p.jsx(oe.div,{className:ie(r==null?void 0:r.trigger,e),"data-slot":"modal-trigger",role:"button",...n,children:t})})},Cm=({children:t,className:e,isDismissable:n=!0,onClick:r,variant:o,...i})=>{const{slots:l}=s.useContext(we),a=s.useMemo(()=>$o({variant:o}),[o]),c=s.useMemo(()=>({slots:{...l,...a}}),[l,a]);return p.jsx(Ec,{className:Ee(e,a==null?void 0:a.backdrop()),"data-slot":"modal-backdrop",isDismissable:n,onClick:u=>{u.stopPropagation(),r==null||r(u)},...i,children:u=>p.jsxs(we,{value:c,children:[typeof t=="function"?t(u):t," "]})})},Sm=({children:t,className:e,placement:n="auto",scroll:r,size:o,...i})=>{const{slots:l}=s.useContext(we),a=s.useMemo(()=>$o({scroll:r,size:o}),[r,o]),c=s.useMemo(()=>({placement:n,slots:{...l,...a}}),[l,n,a]);return p.jsx($b,{className:Ee(e,a==null?void 0:a.container()),"data-placement":n,"data-slot":"modal-container",...i,children:u=>p.jsx(we,{value:c,children:typeof t=="function"?t(u):t})})},Pm=({children:t,className:e,...n})=>{const{placement:r,slots:o}=s.useContext(we);return p.jsx(Zn,{value:{variant:"default"},children:p.jsx(yb,{className:ie(o==null?void 0:o.dialog,e),"data-placement":r,"data-slot":"modal-dialog",...n,children:t})})},km=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(we);return p.jsx(oe.div,{className:ie(r==null?void 0:r.header,e),"data-slot":"modal-header",...n,children:t})},Tm=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(we);return p.jsx(oe.div,{className:ie(r==null?void 0:r.body,e),"data-slot":"modal-body",...n,children:t})},Mm=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(we);return p.jsx(oe.div,{className:ie(r==null?void 0:r.footer,e),"data-slot":"modal-footer",...n,children:t})},Dm=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(we);return p.jsx(lp,{className:ie(r==null?void 0:r.heading,e),"data-slot":"modal-heading",slot:"title",...n,children:t})},Rm=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(we);return p.jsx(oe.div,{className:ie(r==null?void 0:r.icon,e),"data-slot":"modal-icon",...n,children:t})},Nm=({className:t,...e})=>{const{slots:n}=s.useContext(we);return p.jsx(Sb,{className:Ee(t,n==null?void 0:n.closeTrigger()),"data-slot":"modal-close-trigger",slot:"close",...e})},ht=Object.assign(yl,{Root:yl,Trigger:Em,Backdrop:Cm,Container:Sm,Dialog:Pm,Header:km,Icon:Rm,Heading:Dm,Body:Tm,Footer:Mm,CloseTrigger:Nm}),Lm={easy:"GREEN",moderate:"ORANGE",difficult:"RED"},Im={easy:"Easy",moderate:"Moderate",difficult:"Difficult"};function Km(){return p.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-[1em]",children:[p.jsx("path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),p.jsx("path",{d:"m13.4 10.6 3.6-3.6"}),p.jsx("path",{d:"M3.3 16a9 9 0 1 1 17.4 0"})]})}function jc({difficulty:t,label:e,showIcon:n=!0,size:r="md",className:o}){const i=je[Lm[t]];return p.jsxs(Vn,{variant:"soft",size:r,className:U(o),style:{backgroundColor:ot(i,.15),color:i},children:[n&&p.jsx(Km,{}),p.jsx(Vn.Label,{children:e??Im[t]})]})}const vl=p.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0ZM12 9v4M12 17h.01"}),xl=p.jsxs(p.Fragment,{children:[p.jsx("circle",{cx:"12",cy:"12",r:"9"}),p.jsx("path",{d:"M12 16v-4M12 8h.01"})]}),Om=p.jsxs(p.Fragment,{children:[p.jsx("circle",{cx:"12",cy:"12",r:"9"}),p.jsx("path",{d:"m8.5 12 2.5 2.5 4.5-5"})]}),Am={note:xl,info:xl,tip:Om,caution:vl,danger:vl};function Fm({type:t}){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5",children:Am[t]})}function jm({type:t="caution",title:e,icon:n,children:r,className:o}){const i=e===void 0?Pn[t]:e,l=Nl(t);return p.jsxs(Dt,{className:U("border",o),style:{backgroundColor:ot(l,.1),borderColor:l},children:[p.jsx(Dt.Indicator,{style:{color:l},children:n??p.jsx(Fm,{type:t})}),p.jsxs(Dt.Content,{children:[i!=null&&p.jsx(Dt.Title,{children:i}),p.jsx(Dt.Description,{children:r})]})]})}const _c="media-figure-point-marker absolute flex -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full font-semibold shadow ring-2 ring-background",zn="media-figure-shape-outline";function _m(t){return t.type==="circle"}function Bm(t){return t.type==="rectangle"}function Vm(t,e){const n=t.id??e,r=t.color??"GREY",o=je[r];if(_m(t))return p.jsx("div",{role:"img","aria-label":t.title,className:U("pointer-events-none absolute rounded-full",zn),style:{left:`${t.x}%`,top:`${t.y}%`,width:`${t.radius*2}%`,aspectRatio:"1",transform:"translate(-50%, -50%)",borderColor:o,backgroundColor:ot(o,.1)}},n);if(Bm(t)){const i=Math.min(t.x1,t.x2),l=Math.min(t.y1,t.y2),a=Math.abs(t.x2-t.x1),c=Math.abs(t.y2-t.y1);return p.jsx("div",{role:"img","aria-label":t.title,className:U("pointer-events-none absolute",zn),style:{left:`${i}%`,top:`${l}%`,width:`${a}%`,height:`${c}%`,borderColor:o,backgroundColor:ot(o,.1)}},n)}return p.jsx("span",{role:"img","aria-label":t.title,style:{left:`${t.x}%`,top:`${t.y}%`,backgroundColor:o,color:Un(o)},className:_c,children:t.label},n)}function so({annotations:t}){return p.jsx(p.Fragment,{children:t.map(Vm)})}const Hn=4/3,Ko=16;function ct(t){return Math.round(t*3/4)}const Rr=(t,e,n)=>Math.min(Math.max(t,e),n);function rn(t,e,n){const r=Math.min(e,Math.floor(n*Hn)),o=Rr(Math.round(t.width),Math.min(Ko,r),r),i=ct(o);return{width:o,x:Rr(Math.round(t.x),0,e-o),y:Rr(Math.round(t.y),0,n-i)}}function Bc(t,e){const r=t/e<=Hn?t:Math.round(e*Hn),o=ct(r);return rn({x:(t-r)/2,y:(e-o)/2,width:r},t,e)}function zm(t,e,n){const{x:r,y:o,width:i}=t;if(i<=0||r<0||o<0)return!1;const l=ct(i);return r+i<=e&&o+l<=n}function Hm(t,e,n,r,o){if(r<=0||o<=0||e<=0||n<=0||!zm(t,e,n))return null;const i=r/t.width;return{position:"absolute",width:i*e,height:i*n,left:-t.x*i,top:-t.y*i,maxWidth:"none"}}function Gm(t,e){t(),requestAnimationFrame(()=>{t(),requestAnimationFrame(t)});const n=[];for(let r=50;r<=e;r+=50)n.push(setTimeout(t,r));return()=>{for(const r of n)clearTimeout(r)}}function Vc(t={}){const{settleMs:e=0,observeParent:n=!1,remeasureWhenVisible:r=!1,layoutSettleKey:o}=t,i=s.useRef(null),[l,a]=s.useState(null),c=s.useCallback(()=>{const d=i.current;if(!d)return;const{width:f,height:b}=d.getBoundingClientRect();f<=0||b<=0||a(h=>(h==null?void 0:h.width)===f&&(h==null?void 0:h.height)===b?h:{width:f,height:b})},[]),u=s.useCallback(()=>{c(),requestAnimationFrame(()=>{c(),requestAnimationFrame(()=>{c(),setTimeout(c,0)})})},[c]);return s.useLayoutEffect(()=>{c();const d=i.current;if(!d)return;const f=new ResizeObserver(()=>c());f.observe(d),n&&d.parentElement&&f.observe(d.parentElement);const b=[];let h=d;for(let y=0;h&&y<6;y+=1)b.push(h),h=h.parentElement;const g=()=>u();for(const y of b)y.addEventListener("transitionend",g);return()=>{f.disconnect();for(const y of b)y.removeEventListener("transitionend",g)}},[c,u,n]),s.useEffect(()=>{if(!(e<=0))return Gm(c,e)},[o,c,e]),s.useEffect(()=>{if(!r)return;const d=i.current;if(!d)return;const f=new IntersectionObserver(b=>{for(const h of b)h.isIntersecting&&h.intersectionRatio>=.99&&u()},{threshold:[0,.25,.5,.75,.99,1]});return f.observe(d),()=>f.disconnect()},[o,u,r]),s.useEffect(()=>{o!==void 0&&u()},[o,u]),{ref:i,size:l,measure:c,measureAfterLayout:u}}function Um(t){const e=t.split(/[?#]/)[0]??t,n=e.lastIndexOf("/"),r=e.lastIndexOf(".");return r<=n?null:e.slice(r+1).toLowerCase()||null}function Wm({src:t,modelFileName:e}){const n=s.useRef(null);return s.useEffect(()=>{const r=n.current;if(!r)return;let o=!1,i=null,l=null;return import("online-3d-viewer").then(a=>{if(o)return;const c=new a.EmbeddedViewer(r,{projectionMode:a.ProjectionMode.Orthographic,backgroundColor:new a.RGBAColor(219,234,254,255),defaultColor:new a.RGBColor(30,64,175),onModelLoaded:()=>{const d=c.GetViewer();d.SetNavigationMode(a.NavigationMode.FreeOrbit),d.SetUpVector(a.Direction.Z,!1);const f=d.GetBoundingSphere(()=>!0);d.FitSphereToWindow(f,!1)}});l=c,(t.startsWith("blob:")||Um(t)===null&&!!e)&&e?c.LoadModelFromInputFiles([new a.InputFile(e,a.FileSource.Url,t)]):c.LoadModelFromUrlList([t]),typeof ResizeObserver<"u"&&(i=new ResizeObserver(()=>{c.Resize()}),i.observe(r))}),()=>{o=!0,i==null||i.disconnect(),l==null||l.Destroy()}},[t,e]),p.jsx("div",{ref:n,className:"absolute inset-0 [&_canvas]:size-full!","aria-label":"Interactive 3D model",role:"img"})}const qm=400;function Oo({className:t,src:e,type:n="image",displayRegion:r,modelFileName:o,layoutSettleKey:i,remeasureWhenVisible:l=!1,children:a}){const c=!!r,{ref:u,size:d,measureAfterLayout:f}=Vc({settleMs:c?qm:0,observeParent:c,remeasureWhenVisible:c&&l,layoutSettleKey:i}),[b,h]=s.useState(null),g=r&&b&&d&&Hm(r,b.width,b.height,d.width,d.height),y=!!g,v=!!(r&&b&&!g),w="size-full object-cover object-center",x=D=>{const L=D.currentTarget;L.naturalWidth>0&&L.naturalHeight>0&&(h({width:L.naturalWidth,height:L.naturalHeight}),f())},M=D=>{const L=D.currentTarget;L.videoWidth>0&&L.videoHeight>0&&(h({width:L.videoWidth,height:L.videoHeight}),f())};return s.useEffect(()=>{h(null)},[e]),n==="model"?p.jsxs("div",{ref:u,className:U("@container relative overflow-hidden",t),children:[p.jsx(Wm,{src:e,modelFileName:o}),a]}):p.jsxs("div",{ref:u,className:U("@container relative overflow-hidden",t),children:[n==="video"?p.jsx("video",{src:e,controls:!0,className:y?"absolute max-w-none":w,style:{...y&&g?g:void 0,opacity:v?0:1},onLoadedMetadata:r?M:void 0}):p.jsx("img",{src:e,alt:"",className:y?"absolute max-w-none":w,style:{...y&&g?g:void 0,opacity:v?0:1},onLoad:r?x:void 0}),a]})}function Ym({className:t="absolute inset-0",...e}){return p.jsx(Oo,{className:t,...e})}const Xm=2,$l=3,Gn=(t,e,n)=>Math.min(Math.max(t,e),n),zc=t=>t.type==="circle",on=t=>t.type==="rectangle",wl=t=>on(t)?[t.x1,t.x2]:[t.x],El=t=>on(t)?[t.y1,t.y2]:[t.y];function Zm(t,e,n){const r=Gn(e,-Math.min(...wl(t)),100-Math.max(...wl(t))),o=Gn(n,-Math.min(...El(t)),100-Math.max(...El(t)));return on(t)?{...t,x1:t.x1+r,y1:t.y1+o,x2:t.x2+r,y2:t.y2+o}:{...t,x:t.x+r,y:t.y+o}}function Cl(t,e,n){return Math.hypot(e.x-t.x,(e.y-t.y)/n)}function Hc(t){return{...t,x1:Math.min(t.x1,t.x2),y1:Math.min(t.y1,t.y2),x2:Math.max(t.x1,t.x2),y2:Math.max(t.y1,t.y2)}}function Jm(t,e,n){return t==="circle"?{type:"circle",x:e.x,y:e.y,radius:0,color:n}:t==="rectangle"?{type:"rectangle",x1:e.x,y1:e.y,x2:e.x,y2:e.y,color:n}:{type:"point",x:e.x,y:e.y,color:n}}function Qm(t){return t==="circle"?"create-circle":t==="rectangle"?"create-rectangle":"create-point"}function eg(t,e,n){switch(t.mode){case"create-point":return{...t.base,x:e.x,y:e.y};case"move":return Zm(t.base,e.x-t.start.x,e.y-t.start.y);case"create-circle":return{...t.base,radius:Cl(t.start,e,n)};case"resize-circle":{const r=t.base;return{...r,radius:Cl({x:r.x,y:r.y},e,n)}}case"create-rectangle":return{...t.base,x2:e.x,y2:e.y};case"resize-rect":{const r=t.base,o=t.corner==="nw"||t.corner==="sw",i=t.corner==="nw"||t.corner==="ne";return{...r,x1:o?e.x:r.x1,x2:o?r.x2:e.x,y1:i?e.y:r.y1,y2:i?r.y2:e.y}}}}function Sl(t){if(zc(t))return{...t,radius:Math.max(t.radius,Xm)};if(on(t)){const e=Hc(t);return{...e,x2:Math.max(e.x2,e.x1+$l),y2:Math.max(e.y2,e.y1+$l)}}return t}function Pl({x:t,y:e,cursor:n,onPointerDown:r}){return p.jsx("span",{onPointerDown:r,className:"annotation-handle pointer-events-auto absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-sm border border-background bg-accent shadow",style:{left:`${t}%`,top:`${e}%`,cursor:n}})}function tg({annotations:t,editing:e}){const{tool:n,color:r,selectedId:o,onSelect:i,onAdd:l,onChange:a,onRemove:c}=e,u=s.useRef(null),d=s.useRef(!1),[f,b]=s.useState(null),[h,g]=s.useState(null),y=n==="select",v=C=>{const K=u.current.getBoundingClientRect();return{x:Gn((C.clientX-K.left)/K.width*100,0,100),y:Gn((C.clientY-K.top)/K.height*100,0,100)}},w=(C,K)=>{var j;(j=u.current)==null||j.setPointerCapture(C.pointerId),d.current=!1,b(K),g(Sl(K.base))},x=C=>{if(y){i==null||i(null);return}const K=v(C);w(C,{mode:Qm(n),id:null,start:K,base:Jm(n,K,r)})},M=C=>{if(!f)return;const K=u.current.getBoundingClientRect();d.current=!0,g(Sl(eg(f,v(C),K.width/K.height)))},D=C=>{var K;f&&h&&((K=u.current)==null||K.releasePointerCapture(C.pointerId),f.id===null?l==null||l(h):d.current&&(a==null||a(f.id,h))),b(null),g(null)},L=(C,K,j)=>{var A;C.stopPropagation(),(A=u.current)==null||A.focus(),i==null||i(K),w(C,{mode:"move",id:K,start:v(C),base:j})},_=(C,K,j)=>{C.stopPropagation(),w(C,{mode:"resize-circle",id:K,start:v(C),base:j})},E=(C,K,j,A)=>{C.stopPropagation(),w(C,{mode:"resize-rect",id:K,start:v(C),base:Hc(j),corner:A})},P=C=>{(C.key==="Delete"||C.key==="Backspace")&&o!=null&&(C.preventDefault(),c==null||c(o))},N=(C,K,j)=>{const A=j&&K===o,m=je[C.color??"GREY"],S=j?"pointer-events-auto cursor-move":"pointer-events-none",I=j?k=>L(k,K,C):void 0;if(zc(C))return p.jsxs("div",{children:[p.jsx("div",{role:"img","aria-label":C.title,onPointerDown:I,className:U("absolute rounded-full",zn,S,A&&"outline outline-2 outline-offset-2 outline-accent"),style:{left:`${C.x}%`,top:`${C.y}%`,width:`${C.radius*2}%`,aspectRatio:"1",transform:"translate(-50%, -50%)",borderColor:m,backgroundColor:ot(m,.1)}}),A&&p.jsx(Pl,{x:C.x+C.radius,y:C.y,cursor:"ew-resize",onPointerDown:k=>_(k,K,C)})]},K);if(on(C)){const k=Math.min(C.x1,C.x2),R=Math.min(C.y1,C.y2),$=Math.abs(C.x2-C.x1),T=Math.abs(C.y2-C.y1),O=[{corner:"nw",x:k,y:R,cursor:"nwse-resize"},{corner:"ne",x:k+$,y:R,cursor:"nesw-resize"},{corner:"sw",x:k,y:R+T,cursor:"nesw-resize"},{corner:"se",x:k+$,y:R+T,cursor:"nwse-resize"}];return p.jsxs("div",{children:[p.jsx("div",{role:"img","aria-label":C.title,onPointerDown:I,className:U("absolute",zn,S,A&&"outline outline-2 outline-offset-2 outline-accent"),style:{left:`${k}%`,top:`${R}%`,width:`${$}%`,height:`${T}%`,borderColor:m,backgroundColor:ot(m,.1)}}),A&&O.map(({corner:G,x:W,y:q,cursor:ee})=>p.jsx(Pl,{x:W,y:q,cursor:ee,onPointerDown:le=>E(le,K,C,G)},G))]},K)}return p.jsx("span",{role:"img","aria-label":C.title,onPointerDown:I,style:{left:`${C.x}%`,top:`${C.y}%`,backgroundColor:m,color:Un(m)},className:U(_c,S,A&&"outline outline-2 outline-offset-2 outline-accent"),children:C.label},K)};return p.jsxs("div",{ref:u,tabIndex:0,role:"application","aria-label":"Annotation editor",onPointerDown:x,onPointerMove:M,onPointerUp:D,onKeyDown:P,className:U("absolute inset-0 focus:outline-none",y?"cursor-default":"cursor-crosshair"),children:[t.map((C,K)=>{const j=C.id??String(K),A=(f==null?void 0:f.id)===j&&h?h:C;return N(A,j,y)}),(f==null?void 0:f.id)===null&&h&&N(h,"__draft__",!1)]})}function sr({src:t,type:e="image",modelFileName:n,annotations:r=[],displayRegion:o,zoomable:i=!0,annotationEditing:l,layoutSettleKey:a,className:c}){const u="@container relative aspect-[4/3] overflow-hidden rounded-lg border border-default bg-default-soft",d=p.jsxs(p.Fragment,{children:[p.jsx(Ym,{src:t,type:e,displayRegion:o,modelFileName:n,layoutSettleKey:a}),l?p.jsx(tg,{annotations:r,editing:l}):p.jsx(so,{annotations:r})]});return p.jsx("figure",{className:U("flex flex-col gap-2",c),children:i&&e==="image"&&!l?p.jsxs(ht,{children:[p.jsx(ht.Trigger,{"aria-label":"View image full size",className:U(u,"cursor-zoom-in"),children:d}),p.jsx(ht.Backdrop,{variant:"blur",children:p.jsx(ht.Container,{placement:"center",children:p.jsxs(ht.Dialog,{"aria-label":"Full size image",className:"w-auto max-w-[95vw] overflow-hidden bg-transparent p-0 shadow-none",children:[p.jsx(Oo,{className:"aspect-[4/3] max-h-[88vh] w-[min(95vw,calc(88vh*4/3))] rounded-lg border border-default bg-default-soft",src:t,type:"image",displayRegion:o,remeasureWhenVisible:!0,children:p.jsx(so,{annotations:r})}),p.jsx(ht.CloseTrigger,{})]})})})]}):p.jsx("div",{className:u,children:d})})}const Ao=Symbol.for("@openpawlabs/diy-guides-ui/MediaFigure");sr[Ao]=!0;function ng(){return p.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:"size-2/3",children:p.jsx("path",{d:"M8 5v14l11-7z"})})}const rg={model:{hex:je.BLUE,content:p.jsx("span",{className:"text-lg font-bold",children:"3D"})},video:{hex:je.MAGENTA,content:p.jsx(ng,{})}};function Gc({src:t,type:e="image",annotations:n=[],displayRegion:r,className:o}){if(e==="image")return p.jsx(Oo,{className:U("aspect-[4/3]",o),src:t,type:"image",displayRegion:r,children:p.jsx(so,{annotations:n})});const{hex:i,content:l}=rg[e];return p.jsx("div",{"aria-hidden":"true",className:U("flex aspect-[4/3] items-center justify-center",o),style:{backgroundColor:i,color:Un(i)},children:l})}const og=[{corner:"nw",cursor:"nwse-resize"},{corner:"ne",cursor:"nesw-resize"},{corner:"sw",cursor:"nesw-resize"},{corner:"se",cursor:"nwse-resize"}],ig=(t,e,n)=>Math.min(Math.max(t,e),n);function lg(t,e,n,r,o){return rn({x:t.x+e,y:t.y+n,width:t.width},r,o)}function sg(t,e,n,r,o){const i=e==="nw"||e==="sw",l=e==="nw"||e==="ne",a=i?t.x+t.width:t.x,c=l?t.y+ct(t.width):t.y,u=i?a:r-a,d=l?c:o-c,f=Math.min(u,d*(4/3)),b=ig(Math.abs(n.x-a),Ko,f),h=ct(b);return rn({x:i?a-b:a,y:l?c-h:c,width:b},r,o)}function ag({src:t,region:e,onChange:n,className:r}){const o=s.useRef(null),[i,l]=s.useState(null),[a,c]=s.useState(null),[u,d]=s.useState(null),f=x=>{const M=x.currentTarget;M.naturalWidth>0&&M.naturalHeight>0&&l({width:M.naturalWidth,height:M.naturalHeight})},b=u??(i?e?rn(e,i.width,i.height):Bc(i.width,i.height):null),h=x=>{const M=o.current.getBoundingClientRect();return{x:(x.clientX-M.left)/M.width*i.width,y:(x.clientY-M.top)/M.height*i.height}},g=(x,M)=>{var D;x.stopPropagation(),(D=o.current)==null||D.setPointerCapture(x.pointerId),c(M),d(M.base)},y=x=>{if(!a||!i)return;const M=h(x),D=a.mode==="move"?lg(a.base,M.x-a.start.x,M.y-a.start.y,i.width,i.height):sg(a.base,a.corner,M,i.width,i.height);d(D)},v=x=>{var M;a&&u&&((M=o.current)==null||M.releasePointerCapture(x.pointerId),n(u)),c(null),d(null)},w=b&&i?{left:b.x/i.width*100,top:b.y/i.height*100,width:b.width/i.width*100,height:ct(b.width)/i.height*100}:null;return p.jsxs("div",{ref:o,role:"application","aria-label":"Crop editor",className:U("relative inline-block touch-none select-none overflow-hidden leading-none",r),style:i?{"--crop-aspect":i.width/i.height}:void 0,onPointerMove:y,onPointerUp:v,children:[p.jsx("img",{src:t,alt:"",draggable:!1,onLoad:f,className:"block h-auto w-full select-none"}),w&&p.jsx("div",{className:"crop-region absolute cursor-move border-2 border-background",style:{left:`${w.left}%`,top:`${w.top}%`,width:`${w.width}%`,height:`${w.height}%`,boxShadow:"0 0 0 9999px rgba(0, 0, 0, 0.5)"},onPointerDown:x=>g(x,{mode:"move",start:h(x),base:b}),children:og.map(({corner:x,cursor:M})=>p.jsx("span",{className:"crop-handle pointer-events-auto absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-sm border border-background bg-accent shadow",style:{left:x==="nw"||x==="sw"?"0%":"100%",top:x==="nw"||x==="ne"?"0%":"100%",cursor:M},onPointerDown:D=>g(D,{mode:"resize",corner:x,start:h(D),base:b})},x))})]})}function cg({name:t,thumbnail:e,href:n,quantity:r,price:o,children:i,className:l}){return p.jsxs("li",{className:U("flex items-center gap-3 py-3 first:pt-0 last:pb-0",l),children:[e&&p.jsx("img",{src:e,alt:"",className:"size-12 shrink-0 rounded-md border border-default object-cover"}),p.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[n?p.jsx(Lo,{href:n,className:"font-medium",children:t}):p.jsx("span",{className:"font-medium",children:t}),i!=null&&p.jsx("span",{className:"text-sm text-default-500",children:i})]}),r!=null&&p.jsxs("span",{className:"shrink-0 text-sm text-default-500",children:["×",r]}),o!=null&&p.jsx("span",{className:"shrink-0 text-sm font-medium",children:o})]})}function ug({title:t="What you need",children:e,className:n}){return p.jsxs(At,{className:U("w-full",n),children:[t!=null&&p.jsx(At.Header,{children:p.jsx(At.Title,{children:t})}),p.jsx(At.Content,{children:p.jsx("ul",{className:"flex flex-col divide-y divide-default",children:e})})]})}const dg=Object.assign(ug,{Item:cg});function Uc(t){return null}function fg(t){return s.isValidElement(t)&&t.type===Uc}function Wc(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"mr-1 size-4 shrink-0",children:p.jsx("path",{d:"m6 9 6 6 6-6"})})}function kl(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:p.jsx("path",{d:"M10 13a5 5 0 0 0 7.07 0l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.07 0l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})})}function pg(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:p.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})})}function hg(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"size-3.5",children:p.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})}function bg(){return p.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",className:"size-4",children:[p.jsx("circle",{cx:"9",cy:"6",r:"1.4"}),p.jsx("circle",{cx:"15",cy:"6",r:"1.4"}),p.jsx("circle",{cx:"9",cy:"12",r:"1.4"}),p.jsx("circle",{cx:"15",cy:"12",r:"1.4"}),p.jsx("circle",{cx:"9",cy:"18",r:"1.4"}),p.jsx("circle",{cx:"15",cy:"18",r:"1.4"})]})}function mg(t){var r;if(!t||t==="#"||t.startsWith("blob:"))return;const n=(((r=t.replaceAll("\\","/").split("?")[0])==null?void 0:r.split("#")[0])??"").split("/").pop();if(!(!n||n==="."||n===".."))try{return decodeURIComponent(n)}catch{return n}}function gg(t,e){return e===void 0||e===!1?e:typeof e=="string"?e||void 0:mg(t)??!0}function ao(t){const{href:e,download:n,external:r}=t.props;return{href:e,download:gg(e,n),...r?{target:"_blank",rel:"noreferrer noopener"}:{}}}function yg(t,e,n,r){return U(qe({variant:t,size:e,fullWidth:!0}),"!min-h-0 !justify-center !rounded-none",n&&"!rounded-b-3xl",r&&"border-b border-separator","hover:!bg-[var(--button-bg-hover)] data-[hovered=true]:!bg-[var(--button-bg-hover)]")}function co(){return p.jsx("span",{"aria-hidden":"true",className:xo({orientation:"horizontal"}).separator()})}function vg({variant:t="primary",size:e="md",icon:n,menuLabel:r="More download options",editing:o,children:i,className:l}){const a=s.Children.toArray(i).filter(fg);if(o)return p.jsx($g,{items:a,variant:t,size:e,icon:n,menuLabel:r,editing:o,className:l});if(a.length===0)return null;const[c,...u]=a;if(u.length===0){const d=qe({variant:"primary",size:e});return p.jsxs(Lo,{...ao(c),className:U(d,l),children:[n,c.props.children]})}return p.jsx(xg,{items:a,variant:t,size:e,icon:n,menuLabel:r,className:l})}function xg({items:t,variant:e,size:n,icon:r,menuLabel:o,className:i}){const l=s.useRef(null),[a,c]=s.useState(),[u]=t,d=qe({variant:e,size:n});return s.useLayoutEffect(()=>{const f=l.current;if(!f)return;const b=()=>c(f.offsetWidth);b();const h=new ResizeObserver(b);return h.observe(f),()=>h.disconnect()},[t,e,n]),p.jsxs("div",{ref:l,className:U(xo({orientation:"horizontal"}).base(),i),children:[p.jsxs(Lo,{...ao(u),className:d,children:[r,u.props.children]}),p.jsxs(Rt,{children:[p.jsxs(Rt.Trigger,{"aria-label":o,className:U(qe({variant:e,size:n,isIconOnly:!0}),"!inline-flex items-center justify-center"),children:[p.jsx(co,{}),p.jsx(Wc,{})]}),p.jsx(Rt.Popover,{placement:"bottom",offset:0,triggerRef:l,className:"!max-w-none !p-0",style:a?{minWidth:a}:void 0,children:p.jsx(Rt.Menu,{className:"!gap-0 !p-0",children:t.map((f,b)=>p.jsxs(Rt.Item,{...ao(f),className:yg("secondary",n,b===t.length-1,b<t.length-1),children:[b===0?r:null,f.props.children]},b))})})]})]})}function $g({items:t,variant:e,size:n,icon:r,menuLabel:o,editing:i,className:l}){const[a,c]=s.useState(!1),[u,d]=s.useState(null),[f,b]=s.useState(null),{onAddItem:h,onRemoveItem:g,onReorderItem:y,onSelectItem:v}=i,w=t[0],x=t.slice(1),M=qe({variant:e,size:n}),D=y!=null,L=()=>{d(null),b(null)},_=E=>{u!=null&&u!==E&&(y==null||y(u,E)),L()};return p.jsxs("div",{className:U("relative inline-flex flex-col items-start",l),children:[p.jsxs("div",{className:xo({orientation:"horizontal"}).base(),children:[p.jsxs("span",{className:U(M,"cursor-text"),children:[r,w?w.props.children:p.jsx("span",{className:"opacity-60",children:"Add a link"})]}),w&&v&&p.jsxs("button",{type:"button",onClick:()=>v(0),"aria-label":"Edit primary link",className:qe({variant:e,size:n,isIconOnly:!0}),children:[p.jsx(co,{}),p.jsx(kl,{})]}),p.jsxs("button",{type:"button",onClick:()=>c(E=>!E),"aria-label":o,"aria-expanded":a,className:qe({variant:e,size:n,isIconOnly:!0}),children:[!(w&&v)&&p.jsx(co,{}),p.jsx(Wc,{})]})]}),a&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1),"aria-hidden":"true"}),p.jsxs("div",{className:"absolute left-0 top-full z-50 mt-2 w-64 rounded-lg border border-default-200 bg-background p-2 shadow-lg",children:[x.length>0?p.jsx("ul",{className:"flex flex-col gap-0.5",children:x.map((E,P)=>{const N=P+1;return p.jsxs("li",{draggable:D||void 0,onDragStart:D?()=>d(N):void 0,onDragOver:D?C=>{C.preventDefault(),b(N)}:void 0,onDrop:D?C=>{C.preventDefault(),_(N)}:void 0,onDragEnd:D?L:void 0,className:U("flex items-center gap-1.5 rounded-md px-1.5 py-1 transition",D&&"cursor-grab",u===N&&"opacity-40",f===N&&u!==N&&"ring-2 ring-accent"),children:[D&&p.jsx("span",{className:"shrink-0 text-default-400",children:p.jsx(bg,{})}),p.jsx("span",{className:"min-w-0 flex-1 text-sm",children:E.props.children}),y&&p.jsx("button",{type:"button",onClick:()=>y(N,0),"aria-label":"Make default download",className:"shrink-0 rounded p-0.5 text-default-500 transition hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:p.jsx(pg,{})}),v&&p.jsx("button",{type:"button",onClick:()=>v(N),"aria-label":"Edit link",className:"shrink-0 rounded p-0.5 text-default-500 transition hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:p.jsx(kl,{})}),g&&p.jsx("button",{type:"button",onClick:()=>g(N),"aria-label":"Remove option",className:"shrink-0 rounded p-0.5 text-default-500 transition hover:text-danger focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:p.jsx(hg,{})})]},N)})}):p.jsx("p",{className:"px-1.5 py-1 text-sm text-default-500",children:"No other options yet."}),h&&p.jsx("button",{type:"button",onClick:h,className:"mt-1 w-full rounded-md px-1.5 py-1 text-left text-sm font-medium text-accent transition hover:bg-default-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:"+ Add option"})]})]})]})}const wg=Object.assign(vg,{Item:Uc});function Eg(t,e,n){const[r,o]=s.useState(e),i=t!==void 0,l=i?t:r,a=s.useCallback(c=>{i||o(c),n==null||n(c)},[i,n]);return[l,a]}const qc=3,Cg="#3ABF84",Sg="#34B07A",Pg="#0B7A47",kg={caution:Pn.caution,reminder:"Reminder",note:Pn.note};function Tg(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5 shrink-0 text-danger",children:p.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0ZM12 9v4M12 17h.01"})})}function Mg(){return p.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5 shrink-0 text-default-500",children:[p.jsx("circle",{cx:"12",cy:"12",r:"9"}),p.jsx("path",{d:"M12 16v-4M12 8h.01"})]})}function Dg(){return p.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex size-6 shrink-0 items-center justify-center rounded bg-default-100",children:p.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"size-3.5 text-default-500",children:p.jsx("path",{d:"M16 12V4h1V3H7v1h1v8l-2 2v1h5.2c-.2.6-.3 1.2-.3 1.8 0 2.2 1.8 4 4 4s4-1.8 4-4c0-.6-.1-1.2-.3-1.8H18v-1l-2-2z"})})})}function Rg(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-7",children:p.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"})})}function Yc(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"size-3",children:p.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})}function Ng(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:p.jsx("path",{d:"M12 20h9M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})})}function Lg(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:p.jsx("path",{d:"M6 2v14a2 2 0 0 0 2 2h14M2 6h14a2 2 0 0 1 2 2v14"})})}function Ig(){return p.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",className:"size-3.5",children:[p.jsx("circle",{cx:"9",cy:"6",r:"1.4"}),p.jsx("circle",{cx:"15",cy:"6",r:"1.4"}),p.jsx("circle",{cx:"9",cy:"12",r:"1.4"}),p.jsx("circle",{cx:"15",cy:"12",r:"1.4"}),p.jsx("circle",{cx:"9",cy:"18",r:"1.4"}),p.jsx("circle",{cx:"15",cy:"18",r:"1.4"})]})}function Kg(t){return s.isValidElement(t)?t.type===sr?!0:typeof t.type=="function"&&t.type[Ao]===!0:!1}function Tl(t,e){return t.type===sr?p.jsx(Gc,{src:t.props.src,type:t.props.type,annotations:t.props.annotations,displayRegion:t.props.displayRegion,className:e}):s.cloneElement(t,{thumbnailPreview:!0,className:e})}function Xc(t){return s.isValidElement(t)&&t.type===Qc}function Og(t){return s.isValidElement(t)?s.Children.toArray(t.props.children).filter(Xc).length:0}function Ag(t,e=!1){let n=null,r=null;for(const i of s.Children.toArray(t))s.isValidElement(i)&&(i.type===Zc&&(n=i.props.children),i.type===Jc&&(r=i));const o=s.Children.toArray(n).filter(Kg);return Og(r),{figures:o.slice(0,qc),bullets:r}}function Zc(t){return null}function Jc({children:t,className:e,editing:n}){const[r,o]=s.useState(null),[i,l]=s.useState(null);if(!n)return p.jsx("ul",{className:U("flex flex-col gap-2",e),children:t});const{onAddBullet:a,onRemoveBullet:c,onReorderBullet:u}=n,d=s.Children.toArray(t).filter(Xc),f=u!=null&&d.length>1,b=c!=null&&d.length>1,h=()=>{o(null),l(null)},g=y=>{r!=null&&r!==y&&(u==null||u(r,y)),h()};return p.jsxs("ul",{className:U("flex flex-col gap-2",e),children:[d.map((y,v)=>s.cloneElement(y,{key:y.key??v,__edit:{canReorder:f,isDragging:r===v,isOver:i===v&&r!==v,onRemove:b?()=>c==null?void 0:c(v):void 0,onDragStart:()=>o(v),onDragOver:()=>l(v),onDrop:()=>g(v),onDragEnd:h}})),a&&p.jsx("li",{className:"list-none",children:p.jsx("button",{type:"button",onClick:a,className:"rounded-md px-1 py-0.5 text-sm font-medium text-default-500 transition hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:"+ New bullet"})})]})}function Qc(t){const{variant:e="dot",color:n="GREY",label:r,hideLabel:o=!1,onMarkerPress:i,markerAriaLabel:l,children:a,className:c}=t,u=t.__edit,[d,f]=s.useState(!1);let b=null,h;if(e==="dot")b=i?p.jsx("button",{type:"button",onClick:i,"aria-label":l??"Change bullet style",className:"mt-1.5 size-2 shrink-0 cursor-pointer rounded-full outline-none transition hover:ring-2 hover:ring-accent focus-visible:ring-2 focus-visible:ring-accent",style:{backgroundColor:je[n]}}):p.jsx("span",{"aria-hidden":"true",className:"mt-1.5 size-2 shrink-0 rounded-full",style:{backgroundColor:je[n]}}),h=p.jsx("span",{className:"flex-1",children:a});else if(e==="button")b=i?p.jsx("button",{type:"button",onClick:i,"aria-label":l??"Change bullet style",className:"size-2 shrink-0 cursor-pointer rounded-full bg-default-300 outline-none transition hover:ring-2 hover:ring-accent focus-visible:ring-2 focus-visible:ring-accent"}):null,h=p.jsx("div",{className:"min-w-0 flex-1",children:a});else{const M=r??kg[e],D=e==="caution"?p.jsx(Tg,{}):e==="reminder"?p.jsx(Dg,{}):p.jsx(Mg,{});b=i?p.jsx("button",{type:"button",onClick:i,"aria-label":l??"Change bullet style",className:"shrink-0 cursor-pointer rounded outline-none transition hover:opacity-70 focus-visible:ring-2 focus-visible:ring-accent",children:D}):D,h=p.jsxs("span",{className:"flex-1",children:[!o&&p.jsxs(p.Fragment,{children:[p.jsxs("span",{className:"font-semibold",children:[M,":"]})," "]}),a]})}const g=U("flex gap-2.5",e==="button"&&"items-center",e==="caution"&&"text-danger",c);if(!u)return p.jsxs("li",{className:g,children:[b,h]});const{canReorder:y,isDragging:v,isOver:w,onRemove:x}=u;return p.jsxs("li",{className:U("group rounded-md",g,v&&"opacity-40",w&&"ring-2 ring-accent"),draggable:y&&d?!0:void 0,onDragStart:y?M=>{M.dataTransfer.effectAllowed="move",u.onDragStart()}:void 0,onDragOver:y?M=>{M.preventDefault(),M.dataTransfer.dropEffect="move",u.onDragOver()}:void 0,onDrop:y?M=>{M.preventDefault(),u.onDrop()}:void 0,onDragEnd:y?()=>{f(!1),u.onDragEnd()}:void 0,children:[y&&p.jsx("span",{"aria-hidden":"true",onPointerDown:()=>f(!0),onPointerUp:()=>f(!1),className:"mt-1 shrink-0 cursor-grab text-default-400 transition hover:text-default-500",children:p.jsx(Ig,{})}),b,h,x&&p.jsx("button",{type:"button",onClick:x,"aria-label":"Remove bullet",className:"mt-1 shrink-0 rounded p-0.5 text-default-400 opacity-0 transition hover:text-danger focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent group-hover:opacity-100",children:p.jsx(Yc,{})})]})}function Fg(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:p.jsx("path",{d:"m5 12 5 5 9-11"})})}function Ml(t){const[e,n]=s.useState(!1);return{isDropOver:e,dropProps:t?{onDragOver:o=>{o.dataTransfer.types.includes("Files")&&(o.preventDefault(),o.dataTransfer.dropEffect="copy",n(!0))},onDragLeave:o=>{o.currentTarget.contains(o.relatedTarget)||n(!1)},onDrop:o=>{o.preventDefault(),n(!1);const i=Array.from(o.dataTransfer.files);i.length>0&&t(i)}}:{}}}function jg({figures:t,bullets:e,mediaEditing:n}){const r=n!=null,[o,i]=s.useState(0),[l,a]=s.useState(null),[c,u]=s.useState(null),d=(n==null?void 0:n.activeIndex)??o,f=t[d]??t[0],h=((f==null?void 0:f.props.type)??"image")==="image",g=P=>{var N;i(P),(N=n==null?void 0:n.onSelectImage)==null||N.call(n,P)},y=r&&(n==null?void 0:n.onReorderImage)!=null&&t.length>1,v=()=>{a(null),u(null)},w=P=>{var N;l!=null&&l!==P&&((N=n==null?void 0:n.onReorderImage)==null||N.call(n,l,P)),v()},x=r&&((n==null?void 0:n.canAddImage)??!0)&&t.length>=1&&t.length<qc,M=r?t.length>=1:t.length>1,D="aspect-[4/3] w-full min-w-0",L=Ml(n==null?void 0:n.onAddMediaFiles),_=Ml(n==null?void 0:n.onAddMediaFiles),E="border-accent text-accent ring-2 ring-accent ring-offset-2 ring-offset-background";return p.jsxs("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:[p.jsx("div",{className:"min-w-0",children:f?r?p.jsxs("div",{className:"group relative",children:[s.cloneElement(f,{className:U("w-full",f.props.className),zoomable:!1}),p.jsxs("div",{className:"absolute inset-0 flex items-center justify-center gap-2 rounded-lg opacity-0 transition group-hover:bg-foreground/40 group-hover:opacity-100 focus-within:bg-foreground/40 focus-within:opacity-100",children:[h&&p.jsxs("button",{type:"button",onClick:()=>{var P;return(P=n==null?void 0:n.onEditAnnotations)==null?void 0:P.call(n,d)},className:"flex items-center gap-1.5 rounded-md bg-background/90 px-2.5 py-1.5 text-sm font-semibold text-foreground shadow transition hover:bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:[p.jsx(Ng,{}),"Edit annotations"]}),h&&(n==null?void 0:n.onEditCrop)&&p.jsxs("button",{type:"button",onClick:()=>{var P;return(P=n==null?void 0:n.onEditCrop)==null?void 0:P.call(n,d)},className:"flex items-center gap-1.5 rounded-md bg-background/90 px-2.5 py-1.5 text-sm font-semibold text-foreground shadow transition hover:bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:[p.jsx(Lg,{}),"Adjust crop"]})]})]}):s.cloneElement(f,{className:U("w-full",f.props.className)}):r&&p.jsxs("button",{type:"button",onClick:()=>{var P;return(P=n==null?void 0:n.onAddImage)==null?void 0:P.call(n)},...L.dropProps,className:U("flex aspect-[4/3] w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-default bg-default-soft text-default-500 transition hover:border-accent hover:text-accent focus-visible:border-accent focus-visible:text-accent focus-visible:outline-none",L.isDropOver&&E),children:[p.jsx(Rg,{}),p.jsx("span",{className:"text-sm font-medium",children:L.isDropOver?"Drop image":"Add image"})]})}),p.jsxs("div",{className:"flex min-w-0 flex-col gap-4",children:[(M||x)&&p.jsxs("div",{className:"grid w-full grid-cols-3 gap-2",role:"group","aria-label":"Step images",children:[t.map((P,N)=>r?p.jsxs("div",{className:U("relative min-w-0 w-full rounded-md transition-shadow",y&&"cursor-grab",l===N&&"opacity-40",c===N&&l!==N&&"ring-2 ring-accent ring-offset-2 ring-offset-background"),draggable:y||void 0,onDragStart:y?C=>{C.dataTransfer.effectAllowed="move",a(N)}:void 0,onDragOver:y?C=>{C.preventDefault(),C.dataTransfer.dropEffect="move",u(N)}:void 0,onDrop:y?C=>{C.preventDefault(),w(N)}:void 0,onDragEnd:y?v:void 0,children:[p.jsx("button",{type:"button",className:U("block w-full overflow-hidden rounded-md border-2 transition-[box-shadow,opacity,border-color]",N===d?"border-accent shadow-md":"border-default opacity-80 hover:opacity-100"),onClick:()=>g(N),"aria-label":`Image ${N+1}`,"aria-pressed":N===d,children:Tl(P,D)}),p.jsx("button",{type:"button",onClick:()=>{var C;return(C=n==null?void 0:n.onRemoveImage)==null?void 0:C.call(n,N)},"aria-label":`Remove image ${N+1}`,className:"absolute -right-1.5 -top-1.5 flex size-5 items-center justify-center rounded-full bg-foreground text-background shadow transition hover:bg-danger focus-visible:bg-danger focus-visible:outline-none",children:p.jsx(Yc,{})})]},P.key??P.props.src??N):p.jsx("button",{type:"button",className:U("w-full overflow-hidden rounded-md border-2 transition-[box-shadow,opacity,border-color]",N===d?"border-accent shadow-md":"border-default opacity-80 hover:opacity-100"),onMouseEnter:()=>g(N),onFocus:()=>g(N),"aria-label":`Image ${N+1}`,"aria-pressed":N===d,children:Tl(P,D)},P.key??P.props.src??N)),x&&p.jsx("button",{type:"button",onClick:()=>{var P;return(P=n==null?void 0:n.onAddImage)==null?void 0:P.call(n)},"aria-label":"Add image",..._.dropProps,className:U(D,"flex items-center justify-center rounded-md border-2 border-dashed border-default text-default-500 transition hover:border-accent hover:text-accent focus-visible:border-accent focus-visible:text-accent focus-visible:outline-none",_.isDropOver&&E),children:p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-6",children:p.jsx("path",{d:"M12 5v14M5 12h14"})})})]}),e]})]})}const _g=s.forwardRef(function({number:e,title:n,isCompleted:r,defaultCompleted:o=!1,onCompletedChange:i,completable:l=!0,mediaEditing:a,children:c,id:u,scrollMarginTop:d,className:f},b){const[h,g]=Eg(r,o,i),y=s.useId(),{figures:v,bullets:w}=Ag(c,a!=null),x=d!=null?{scrollMarginTop:d}:void 0;return p.jsxs("section",{ref:b,id:u,"aria-labelledby":n!=null?y:void 0,"data-step-number":e??void 0,"data-completed":h||void 0,style:x,className:U("flex flex-col gap-4 transition-opacity",d==null&&"scroll-mt-4",h&&"opacity-60",f),children:[p.jsxs("header",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[p.jsxs("div",{className:"flex min-w-0 items-center gap-3 sm:flex-1",children:[e!=null&&p.jsx("span",{className:U("flex size-8 shrink-0 items-center justify-center rounded-md text-sm font-bold tabular-nums",h?"bg-success text-success-foreground":"bg-foreground text-background"),children:h?p.jsx(Fg,{}):e}),n!=null&&p.jsx("h3",{id:y,className:"min-w-0 flex-1 text-lg font-semibold leading-tight",children:n})]}),l&&p.jsx(jb,{variant:h?"primary":"secondary",size:"lg",onPress:()=>g(!h),"aria-pressed":h,className:U("ml-auto shrink-0",h&&"guide-step-complete-button"),style:h?{"--guide-step-complete-bg":Cg,"--guide-step-complete-bg-hover":Sg,"--guide-step-complete-checkbox":Pg}:void 0,children:p.jsx(yn,{isSelected:h,isReadOnly:!0,"aria-hidden":!0,className:"pointer-events-none gap-2 text-inherit",children:p.jsxs(yn.Content,{className:"flex items-center gap-2 whitespace-nowrap",children:[p.jsx(yn.Control,{children:p.jsx(yn.Indicator,{})}),"Mark complete"]})})})]}),p.jsx(jg,{figures:v,bullets:w,mediaEditing:a})]})}),Bg=Object.assign(_g,{Media:Zc,Bullets:Jc,Bullet:Qc}),Fo=s.createContext(0),eu=s.createContext(null),tu=s.createContext(null);function nu(){return s.useContext(Fo)}function Vg(){return s.useContext(eu)}function jo(){return s.useContext(tu)}const zg=8;function ru({parentScrollMarginTop:t=0,additionalParentScrollMarginTop:e=0}={}){return t+e}function ou({progressBarHeight:t=0,includeProgressBar:e=!1}={}){return e?t+zg:0}function ar({parentScrollMarginTop:t=0,additionalParentScrollMarginTop:e=0}={}){return ru({parentScrollMarginTop:t,additionalParentScrollMarginTop:e})}function iu({parentScrollMarginTop:t=0,additionalParentScrollMarginTop:e=0,progressBarHeight:n=0,includeProgressBar:r=!1}){return ar({parentScrollMarginTop:t,additionalParentScrollMarginTop:e})+ou({progressBarHeight:n,includeProgressBar:r})}function uo(t,e=window.innerHeight,n=0){if(t.height<=0)return 0;const r=Math.max(t.top,n),o=Math.min(t.bottom,e);return Math.max(0,o-r)/t.height}function Hg(t,e){if(t==null)return null;const n=(e==null?void 0:e.top)??t.top,r=Math.max(0,n-t.top);return r<=0?null:{top:t.top,bottom:t.top+r,left:t.left,right:t.right,width:t.width,height:r,x:t.x,y:t.y,toJSON:()=>({})}}function Gg(){var t;return typeof window>"u"?0:window.scrollY||document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}function Ug(){var t;return typeof document>"u"?0:Math.max(((t=document.body)==null?void 0:t.scrollHeight)??0,document.documentElement.scrollHeight)}function Wg(){return typeof window>"u"?0:window.innerHeight||document.documentElement.clientHeight||0}function qg(t=Gg(),e=Wg(),n=2){if(typeof document>"u")return!1;const r=Ug();return r<=e?!1:t+e>=r-n}function Yg({overviewRect:t,overviewContentInsetTop:e,stepNumbers:n,getStepRect:r,activeStepMinVisibleRatio:o,stepContentInsetTop:i,innerHeight:l=window.innerHeight,atPageBottom:a=!1}){var h;const c=t!=null?uo(t,l,e):0,u=n.flatMap(g=>{const y=r(g);return y==null?[]:[{step:g,rect:y,visibleRatio:uo(y,l,i)}]}),d=n.at(-1);if(a&&d!=null)return d;let f=null;for(const g of u)if(g.visibleRatio>=o){f=g.step;break}if(d!=null){const g=u.find(y=>y.step===d);if(g!=null&&g.visibleRatio>=o&&g.rect.top<=i)return d}if(c>=o){const g=f!=null?((h=u.find(y=>y.step===f))==null?void 0:h.visibleRatio)??0:0;if(f==null||c>=g)return null}if(f!=null)return f;const b=[...c>0?[{step:null,visibleRatio:c}]:[],...u.filter(g=>g.visibleRatio>0)];return b.length>0?b[b.length-1].step:null}const cr="step-",_o="step";function ur(t,e=cr){return`${e}${t}`}function lu(t,e=cr){const n=t.replace(/^#/,"");if(!n.startsWith(e))return null;const r=Number.parseInt(n.slice(e.length),10);return Number.isFinite(r)&&r>0?r:null}function su(t,e=_o){const r=new URLSearchParams(t.startsWith("?")?t:`?${t}`).get(e);if(r==null||r==="")return null;const o=Number.parseInt(r,10);return Number.isFinite(o)&&o>0?o:null}function Sn(t,e,n=_o,r=cr){return e==="hash"?lu(t.hash,r):su(t.search,n)}function au(t,e,n,r=_o,o=cr){const i=new URL(t);return n==="hash"?(i.hash=e!=null?ur(e,o):"",i.toString()):(e!=null?i.searchParams.set(r,String(e)):i.searchParams.delete(r),i.toString())}const Xg=900;function Zg(t,e,n){const r=Math.max(0,t.getBoundingClientRect().top+window.scrollY-e);window.scrollTo({top:r,behavior:n})}function Dl(t,e,n){var o;const r=((o=Ft(t))==null?void 0:o.getBoundingClientRect())??null;return r!=null&&uo(r,window.innerHeight,e)>=n}function Ft(t){return document.getElementById(ur(t))}function Jg({enabled:t,rootRef:e,guideTopRef:n=null,guideContentRef:r=null,stepNumbers:o,mode:i="hash",stepUrlKey:l="step",scrollMarginTop:a=0,overviewScrollMarginTop:c=0,activeStepMinVisibleRatio:u=.2,onActiveStepChange:d}){const f=s.useRef(null),b=s.useRef(!1),h=s.useRef(!1),g=s.useRef(null),y=s.useRef({overview:c,step:a}),v=s.useRef(null),w=s.useRef(null),x=s.useCallback(E=>{if(typeof window>"u")return;const P=au(window.location.href,E,i,l);P!==window.location.href&&window.history.replaceState(window.history.state,"",P)},[i,l]),M=s.useCallback((E,{updateUrl:P})=>{f.current!==E&&(f.current=E,P&&x(E),d==null||d(E))},[d,x]),D=s.useCallback(()=>{var P;b.current=!1,g.current=null;const E=v.current;E!=null&&Dl(E,a,u)&&(v.current=null),(P=w.current)==null||P.call(w)},[u,a]),L=s.useCallback((E,{behavior:P="smooth",fromUrl:N=!1}={})=>{if(typeof window>"u")return;const C=E!=null?Ft(E):(n==null?void 0:n.current)??e.current;if(C==null)return;const K=E!=null?a:c;v.current=N?E:null,b.current=!0,g.current!=null&&clearTimeout(g.current),Zg(C,K,P),M(E,{updateUrl:!1});const j=P==="auto"?0:Xg;if(j===0){D();return}g.current=setTimeout(D,j)},[D,n,c,e,a,M]),_=s.useCallback(({initial:E=!1}={})=>{if(typeof window>"u")return;const P=Sn(window.location,i,l),N=E&&P!=null;L(P,{behavior:N?"auto":"smooth",fromUrl:!0})},[i,L,l]);s.useEffect(()=>{if(!t||typeof window>"u"||h.current)return;const E=Sn(window.location,i,l);e.current!=null&&(E==null||o.includes(E)||o.length>0)&&(E!=null&&Ft(E)==null||(h.current=!0,_({initial:!0})))},[t,i,e,_,o.join(","),l]),s.useEffect(()=>{if(!t||typeof window>"u")return;const E=y.current;if(!(E.overview!==c||E.step!==a)||(y.current={overview:c,step:a},b.current))return;const N=Sn(window.location,i,l);L(N,{behavior:N!=null?"auto":"smooth",fromUrl:N!=null})},[t,i,c,a,L,l]),s.useEffect(()=>{if(!t||typeof window>"u")return;const E=()=>{_()};return window.addEventListener("hashchange",E),window.addEventListener("popstate",E),()=>{var P;window.removeEventListener("hashchange",E),window.removeEventListener("popstate",E),g.current!=null&&(clearTimeout(g.current),g.current=null,b.current=!1,(P=w.current)==null||P.call(w))}},[t,_]),s.useEffect(()=>{if(!t||typeof window>"u"||o.length===0)return;const E=()=>{var k,R;if(b.current)return;const j=v.current;if(j!=null){if(Dl(j,a,u)){v.current=null,M(j,{updateUrl:!1});return}M(j,{updateUrl:!1});return}const A=((k=n==null?void 0:n.current)==null?void 0:k.getBoundingClientRect())??null,m=((R=r==null?void 0:r.current)==null?void 0:R.getBoundingClientRect())??null,S=Hg(A,m),I=Yg({overviewRect:S,overviewContentInsetTop:c,stepNumbers:o,getStepRect:$=>{var T;return((T=Ft($))==null?void 0:T.getBoundingClientRect())??null},activeStepMinVisibleRatio:u,stepContentInsetTop:a,atPageBottom:qg()});M(I,{updateUrl:!0})},P=new IntersectionObserver(E,{root:null,rootMargin:`-${a}px 0px 0px 0px`,threshold:[0,.05,.1,.2,.25,.5,.75,.8,.9,1]}),N=[n==null?void 0:n.current,r==null?void 0:r.current,...o.map(j=>Ft(j))];for(const j of N)j!=null&&P.observe(j);let C=0;const K=()=>{C===0&&(C=window.requestAnimationFrame(()=>{C=0,E()}))};return w.current=E,E(),window.addEventListener("scroll",K,{passive:!0}),()=>{w.current=null,window.removeEventListener("scroll",K),C!==0&&window.cancelAnimationFrame(C),P.disconnect()}},[u,t,r,n,c,a,M,o.join(",")])}function Qg(t){return s.isValidElement(t)}function ey({children:t,showProgress:e=!0,onProgressChange:n,syncStepUrl:r=!0,stepUrlMode:o="hash",stepUrlKey:i="step",onActiveStepChange:l,scrollMarginTop:a=0,activeStepMinVisibleRatio:c=.2,completedSteps:u,onCompletedStepsChange:d,className:f}){const b=s.Children.toArray(t).filter(Qg),h=b.length,g=s.useRef(null),{ref:y,size:v}=Vc({settleMs:e?250:0,layoutSettleKey:e}),w=nu(),x=Vg(),M=jo(),D=s.useMemo(()=>ar({parentScrollMarginTop:w,additionalParentScrollMarginTop:a}),[a,w]),L=s.useMemo(()=>iu({parentScrollMarginTop:w,additionalParentScrollMarginTop:a,progressBarHeight:(v==null?void 0:v.height)??0,includeProgressBar:e&&h>0}),[a,w,v==null?void 0:v.height,e,h]),_=D;s.useLayoutEffect(()=>{const m=x==null?void 0:x.current;m!=null&&(m.style.scrollMarginTop=`${D}px`)},[x,D]);const E=b.map((m,S)=>m.props.number??S+1),[P,N]=s.useState(()=>Object.fromEntries(b.map((m,S)=>[m.props.number??S+1,!!(m.props.defaultCompleted??m.props.isCompleted)]))),C=u!=null,K=C?u:P,j=(m,S)=>{const I={...K,[m]:S};if(C){d==null||d(I);return}N(I)},A=Object.values(K).filter(Boolean).length;return s.useEffect(()=>{n==null||n({completed:A,total:h})},[A,h,n]),Jg({enabled:r,rootRef:g,guideTopRef:x,guideContentRef:M,stepNumbers:E,mode:o,stepUrlKey:i,scrollMarginTop:L,overviewScrollMarginTop:D,activeStepMinVisibleRatio:c,onActiveStepChange:l}),p.jsxs("div",{ref:g,className:U("flex flex-col gap-8",f),children:[e&&h>0&&p.jsx("div",{ref:y,className:"sticky z-10 mx-2",style:{top:_},children:p.jsx(At,{className:"w-full px-6 py-4",children:p.jsxs(vn,{value:A,maxValue:h,"aria-label":"Guide progress",className:"flex flex-col gap-1.5",children:[p.jsxs("div",{className:"flex items-center justify-between text-sm text-default-500",children:[p.jsx("span",{children:"Guide Progress"}),p.jsxs(vn.Output,{children:[A," / ",h," steps"]})]}),p.jsx(vn.Track,{className:"h-2 overflow-hidden rounded-full bg-default-soft",children:p.jsx(vn.Fill,{className:"h-full rounded-full bg-success transition-[width]"})})]})})}),p.jsx("ol",{className:"flex flex-col",children:b.map((m,S)=>{const I=m.props.number??S+1,k=r?ur(I):m.props.id;return p.jsxs("li",{children:[s.cloneElement(m,{number:I,id:m.props.id??k,scrollMarginTop:r?L:void 0,isCompleted:K[I]??!1,onCompletedChange:R=>{var $,T;j(I,R),(T=($=m.props).onCompletedChange)==null||T.call($,R)}}),S<b.length-1&&p.jsx(lm,{className:"my-8"})]},m.key??I)})})]})}function ty({title:t,heroImage:e,heroImageAlt:n,difficulty:r,timeEstimate:o,meta:i,className:l}){const a=r!=null||o!=null,c=e!=null;return p.jsxs("header",{className:U("flex flex-col gap-4 border-b border-default pb-6 md:[grid-area:header]",c&&"sm:flex-row sm:items-center sm:gap-6",l),children:[c&&p.jsx("div",{className:"aspect-[4/3] h-32 shrink-0 overflow-hidden rounded-lg border border-default bg-default-100",children:p.jsx("img",{src:e,alt:n??"",className:"size-full object-cover"})}),p.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-4",children:[p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:t}),i!=null&&p.jsx("div",{className:"text-sm text-default-500",children:i})]}),a&&p.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r!=null&&p.jsx(jc,{difficulty:r}),o!=null&&p.jsx(Vn,{variant:"soft",color:"default",children:p.jsx(Vn.Label,{children:o})})]})]})]})}function ny({children:t,className:e}){return p.jsx("div",{className:U("min-w-0 md:[grid-area:intro]",e),children:p.jsx("div",{className:"max-w-prose text-default-700",children:t})})}function ry({children:t,className:e}){return p.jsx("aside",{className:U("min-w-0 md:[grid-area:sidebar]",e),children:p.jsx("div",{className:"flex flex-col gap-4",children:t})})}function oy({children:t,className:e}){const n=jo();return p.jsx("main",{ref:n,className:U("min-w-0 w-full md:[grid-area:main]",e),children:t})}const iy=Object.assign(function({children:e,scrollMarginTop:n=0,className:r}){const o=s.useRef(null),i=s.useRef(null),l=s.useMemo(()=>ar({parentScrollMarginTop:n}),[n]),a=s.useMemo(()=>({scrollMarginTop:l}),[l]);return p.jsx(eu.Provider,{value:o,children:p.jsx(tu.Provider,{value:i,children:p.jsx(Fo.Provider,{value:n,children:p.jsx("div",{ref:o,style:a,className:U("mx-auto grid w-full max-w-6xl grid-cols-1 gap-x-8 gap-y-8 md:grid-cols-[minmax(0,1fr)_20rem] md:[grid-template-areas:'header_header'_'intro_sidebar'_'main_main']",r),children:e})})})})},{Header:ty,Intro:ny,Sidebar:ry,Content:oy});exports.COLORS=je;exports.Callout=jm;exports.DISPLAY_REGION_ASPECT=Hn;exports.DifficultyBadge=jc;exports.GuideLayout=iy;exports.GuideScrollMarginContext=Fo;exports.GuideStep=Bg;exports.GuideStepList=ey;exports.LinkButton=wg;exports.MIN_REGION_WIDTH=Ko;exports.MediaCropEditor=ag;exports.MediaFigure=sr;exports.MediaFigureThumbnail=Gc;exports.ToolList=dg;exports.buildGuideStepUrl=au;exports.calloutTypeColor=Rl;exports.calloutTypeHex=Nl;exports.calloutTypeLabel=Pn;exports.centeredDisplayRegion=Bc;exports.clampDisplayRegion=rn;exports.computeGuideLibraryScrollMarginTop=ou;exports.computeGuideOverviewScrollMarginTop=ar;exports.computeGuideStepScrollMarginTop=iu;exports.computeParentScrollMarginTop=ru;exports.displayRegionHeight=ct;exports.guideStepUrlId=ur;exports.hexToRgba=ot;exports.markerTextColor=Un;exports.mediaFigureType=Ao;exports.parseGuideStepFromHash=lu;exports.parseGuideStepFromSearch=su;exports.readGuideStepFromLocation=Sn;exports.useGuideContentRef=jo;exports.useGuideScrollMargin=nu;
|
|
28
|
+
*/var rl;function xh(){return rl||(rl=1,process.env.NODE_ENV!=="production"&&(function(){function t(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}function e(h,g){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=g();if(!f){var v=g();i(y,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=l({inst:{value:y,getSnapshot:g}});var w=v[0].inst,x=v[1];return c(function(){w.value=y,w.getSnapshot=g,n(w)&&x({inst:w})},[h,y,g]),a(function(){return n(w)&&x({inst:w}),h(function(){n(w)&&x({inst:w})})},[h]),u(y),y}function n(h){var g=h.getSnapshot;h=h.value;try{var y=g();return!i(h,y)}catch{return!0}}function r(h,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=s,i=typeof Object.is=="function"?Object.is:t,l=o.useState,a=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Tr.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Tr}var ol;function $h(){return ol||(ol=1,process.env.NODE_ENV==="production"?bn.exports=vh():bn.exports=xh()),bn.exports}var wh=$h();const Ka=s.createContext(!1),Yt=s.createContext(null);function Eh(t){if(s.useContext(Yt))return t.content;let{collection:n,document:r}=kh(t.createCollection);return s.createElement(s.Fragment,null,s.createElement(jf,null,s.createElement(Yt.Provider,{value:r},t.content)),s.createElement(Sh,{render:t.children,collection:n}))}function Sh({collection:t,render:e}){return e(t)}function Ch(t,e,n){let r=Ze(),o=s.useRef(r);o.current=r;let i=s.useCallback(()=>o.current?n():e(),[e,n]);return wh.useSyncExternalStore(t,i)}const Ph=typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore:Ch;function kh(t){let[e]=s.useState(()=>new gh((t==null?void 0:t())||new bh)),n=s.useCallback(l=>e.subscribe(l),[e]),r=s.useCallback(()=>{let l=e.getCollection();return e.isSSR&&e.resetAfterSSR(),l},[e]),o=s.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]);return{collection:Ph(n,r,o),document:e}}const ro=s.createContext(null);function Th(t){var n;return n=class extends Ct{},n.type=t,n}function Aa(t,e,n,r,o,i){typeof t=="string"&&(t=Th(t));let l=s.useCallback(c=>{c==null||c.setProps(e,n,t,r,i)},[e,n,r,i,t]),a=s.useContext(ro);if(a){let c=a.ownerDocument.nodesByProps.get(e);return c||(c=a.ownerDocument.createElement(t.type),c.setProps(e,n,t,r,i),a.appendChild(c),a.ownerDocument.updateCollection(),a.ownerDocument.nodesByProps.set(e,c)),o?s.createElement(ro.Provider,{value:c},o):null}return s.createElement(t.type,{ref:l},o)}function Oa(t,e){let n=({node:o})=>e(o.props,o.props.ref,o),r=s.forwardRef((o,i)=>{let l=s.useContext(Ur);if(!s.useContext(Ka)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(o,i)}return Aa(t,o,i,"children"in o?o.children:null,null,c=>s.createElement(Ur.Provider,{value:l},s.createElement(n,{node:c})))});return r.displayName=e.name,r}function Fa(t,e,n=ja){let r=({node:i})=>e(i.props,i.props.ref,i),o=s.forwardRef((i,l)=>{let a=n(i);return Aa(t,i,l,null,a,c=>s.createElement(r,{node:c}))??s.createElement(s.Fragment,null)});return o.displayName=e.name,o}function ja(t){return La({...t,addIdAndValue:!0})}const il=s.createContext(null);function Mh(t){let e=s.useContext(il),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope??(e==null?void 0:e.idScope),o=ja({...t,idScope:r,dependencies:n});return s.useContext(Yt)&&(o=s.createElement(Rh,null,o)),e=s.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),s.createElement(il.Provider,{value:e},o)}function Rh({children:t}){let e=s.useContext(Yt),n=s.useMemo(()=>s.createElement(Yt.Provider,{value:null},s.createElement(Ka.Provider,{value:!0},t)),[t]);return Ze()?s.createElement(ro.Provider,{value:e},n):Zt.createPortal(n,e)}const Dh=s.createContext(null),Ih={CollectionRoot({collection:t,renderDropIndicator:e}){return ll(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return ll(t,e,n)}};function ll(t,e,n){return La({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){if(r.type==="content")return s.createElement(s.Fragment,null);let o=r.render(r);return!n||r.type!=="item"?o:s.createElement(s.Fragment,null,n({type:"item",key:r.key,dropPosition:"before"}),o,Nh(t,r,n))}})}function Nh(t,e,n){let r=e.key,o=t.getKeyAfter(r),i=o!=null?t.getItem(o):null;for(;i!=null&&i.type!=="item";)o=t.getKeyAfter(i.key),i=o!=null?t.getItem(o):null;let l=e.nextKey!=null?t.getItem(e.nextKey):null;for(;l!=null&&l.type!=="item";)l=l.nextKey!=null?t.getItem(l.nextKey):null;let a=[];if(l==null){let c=e;for(;(c==null?void 0:c.type)==="item"&&(!i||c.parentKey!==i.parentKey&&i.level<c.level);){let u=n({type:"item",key:c.key,dropPosition:"after"});s.isValidElement(u)&&a.push(s.cloneElement(u,{key:`${c.key}-after`})),c=c.parentKey!=null?t.getItem(c.parentKey):null}}return a}const nr=s.createContext(Ih);function Lh(t){return s.useMemo(()=>t!=null?new Set([t]):null,[t])}function _a(t){let e=Ah(Q(t));e!==t&&(e&&Kh(e,t),t&&Ba(t,e))}function Kh(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function Ba(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function Ah(t){let e=ne(t),n=e==null?void 0:e.getAttribute("aria-activedescendant");return n&&t.getElementById(n)||e}const sl=s.createContext(null),Oh=s.createContext(null),Fh=s.createContext({}),jh=s.createContext({}),_h=s.createContext(null);function Bh(t){let e=s.useRef({});return s.createElement(_h.Provider,{value:e},t.children)}const Vh=s.createContext({isSelected:!1});function zh(t){let e=ae(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const Lo=s.createContext({}),ei=class ei extends Ct{filter(e,n){let r=n.getItem(this.prevKey);if(r&&r.type!=="separator"){let o=this.clone();return n.addDescendants(o,e),o}return null}};ei.type="separator";let oo=ei;const Hh=Oa(oo,function(e,n){[e,n]=Me(e,n,Lo);let{elementType:r,orientation:o,style:i,className:l,slot:a,...c}=e,u=r||"hr";u==="hr"&&o==="vertical"&&(u="div");let d=he[u],{separatorProps:f}=zh({...c,elementType:r,orientation:o}),m=ae(e,{global:!0});return s.createElement(d,{render:e.render,...Y(m,f),style:i,className:l??"react-aria-Separator",ref:n,slot:a||void 0})}),Va=s.createContext({});var za={};za={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Ha={};Ha={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Ga={};Ga={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Ua={};Ua={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var Wa={};Wa={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var qa={};qa={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var Ya={};Ya={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Xa={};Xa={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Za={};Za={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Ja={};Ja={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Qa={};Qa={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var ec={};ec={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var tc={};tc={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var nc={};nc={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var rc={};rc={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var oc={};oc={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var ic={};ic={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var lc={};lc={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var sc={};sc={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var ac={};ac={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var cc={};cc={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var uc={};uc={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var dc={};dc={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var fc={};fc={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var pc={};pc={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var hc={};hc={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var mc={};mc={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var bc={};bc={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var gc={};gc={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var yc={};yc={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var vc={};vc={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var xc={};xc={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var $c={};$c={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var wc={};wc={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var Ec={};Ec={"ar-AE":za,"bg-BG":Ha,"cs-CZ":Ga,"da-DK":Ua,"de-DE":Wa,"el-GR":qa,"en-US":Ya,"es-ES":Xa,"et-EE":Za,"fi-FI":Ja,"fr-FR":Qa,"he-IL":ec,"hr-HR":tc,"hu-HU":nc,"it-IT":rc,"ja-JP":oc,"ko-KR":ic,"lt-LT":lc,"lv-LV":sc,"nb-NO":ac,"nl-NL":cc,"pl-PL":uc,"pt-BR":dc,"pt-PT":fc,"ro-RO":pc,"ru-RU":hc,"sk-SK":mc,"sl-SI":bc,"sr-SP":gc,"sv-SE":yc,"tr-TR":vc,"uk-UA":xc,"zh-CN":$c,"zh-TW":wc};const Gh=500;function Sc(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:o,threshold:i=Gh,accessibilityDescription:l}=t;const a=s.useRef(void 0);let{addGlobalListener:c,removeGlobalListener:u}=Yn(),{pressProps:d}=Xe({isDisabled:e,onPressStart(m){if(m.continuePropagation(),(m.pointerType==="mouse"||m.pointerType==="touch")&&(n&&n({...m,type:"longpressstart"}),a.current=setTimeout(()=>{m.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),Q(m.target).activeElement!==m.target&&de(m.target),o&&o({...m,type:"longpress"}),a.current=void 0},i),m.pointerType==="touch")){let h=y=>{y.preventDefault()},g=fe(m.target);c(m.target,"contextmenu",h,{once:!0}),c(g,"pointerup",()=>{setTimeout(()=>{u(m.target,"contextmenu",h)},30)},{once:!0})}},onPressEnd(m){a.current&&clearTimeout(a.current),r&&(m.pointerType==="mouse"||m.pointerType==="touch")&&r({...m,type:"longpressend"})}}),f=yd(o&&!e?l:void 0);return{longPressProps:Y(d,f)}}function Cc(t,e,n){let{type:r}=t,{isOpen:o}=e;s.useEffect(()=>{n&&n.current&&js.set(n.current,e.close)});let i;r==="menu"?i=!0:r==="listbox"&&(i="listbox");let l=pe();return{triggerProps:{"aria-haspopup":i,"aria-expanded":o,"aria-controls":o?l:void 0,onPress:e.toggle},overlayProps:{id:l}}}function Uh(t){return t&&t.__esModule?t.default:t}function Wh(t,e,n){let{type:r="menu",isDisabled:o,trigger:i="press"}=t,l=pe(),{triggerProps:a,overlayProps:c}=Cc({type:r},e,n),u=h=>{if(!o&&!(i==="longPress"&&!h.altKey)&&n&&n.current)switch(h.key){case"Enter":case" ":if(i==="longPress"||h.isDefaultPrevented())return;case"ArrowDown":"continuePropagation"in h||h.stopPropagation(),h.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in h||h.stopPropagation(),h.preventDefault(),e.toggle("last");break;default:"continuePropagation"in h&&h.continuePropagation()}},d=Pa(Uh(Ec),"@react-aria/menu"),{longPressProps:f}=Sc({isDisabled:o||i!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),m={preventFocusOnPress:!0,onPressStart(h){h.pointerType!=="touch"&&h.pointerType!=="keyboard"&&!o&&(de(h.target),e.open(h.pointerType==="virtual"?"first":null))},onPress(h){h.pointerType==="touch"&&!o&&(de(h.target),e.toggle())}};return delete a.onPress,{menuTriggerProps:{...a,...i==="press"?m:f,id:l,onKeyDown:u},menuProps:{...c,"aria-labelledby":l,autoFocus:e.focusStrategy||!0,onClose:e.close}}}const Pc=new WeakMap;function io(t){return Ku()?t.altKey:t.ctrlKey}function Sn(t,e){var o,i;let n=`[data-key="${CSS.escape(String(e))}"]`,r=(o=t.current)==null?void 0:o.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),(i=t.current)==null?void 0:i.querySelector(n)}const kc=new WeakMap;function qh(t){let e=pe();return kc.set(t,e),e}function Yh(t){return kc.get(t)}const Xh=1e3;function Zh(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,o=s.useRef({search:"",timeout:void 0}).current,i=l=>{let a=Jh(l.key);if(!(!a||l.ctrlKey||l.metaKey||!H(l.currentTarget,F(l))||o.search.length===0&&a===" ")){if(a===" "&&o.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),o.search+=a,e.getKeyForSearch!=null){let c=e.getKeyForSearch(o.search,n.focusedKey);c==null&&(c=e.getKeyForSearch(o.search)),c!=null&&(n.setFocusedKey(c),r&&r(c))}clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},Xh)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0}}}function Jh(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Qh(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:l=!1,disallowSelectAll:a=!1,escapeKeyBehavior:c="clearSelection",selectOnFocus:u=e.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:f,allowsTabNavigation:m=!1,scrollRef:h=r,linkBehavior:g="action"}=t,{direction:y}=ut(),v=Jt(),w=b=>{var N,k,D,$,T,A,G,W,q,ee,le,Z,me,Ne;if(b.altKey&&b.key==="Tab"&&b.preventDefault(),!r.current||!H(r.current,F(b)))return;const P=(z,$e)=>{if(z!=null){if(e.isLink(z)&&g==="selection"&&u&&!io(b)){Zt.flushSync(()=>{e.setFocusedKey(z,$e)});let be=Sn(r,z),et=e.getItemProps(z);be&&v.open(be,b,et.href,et.routerOptions);return}if(e.setFocusedKey(z,$e),e.isLink(z)&&g==="override")return;b.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(z):u&&!io(b)&&e.replaceSelection(z)}};switch(b.key){case"ArrowDown":if(n.getKeyBelow){let z=e.focusedKey!=null?(N=n.getKeyBelow)==null?void 0:N.call(n,e.focusedKey):(k=n.getFirstKey)==null?void 0:k.call(n);z==null&&i&&(z=(D=n.getFirstKey)==null?void 0:D.call(n,e.focusedKey)),z!=null&&(b.preventDefault(),P(z))}break;case"ArrowUp":if(n.getKeyAbove){let z=e.focusedKey!=null?($=n.getKeyAbove)==null?void 0:$.call(n,e.focusedKey):(T=n.getLastKey)==null?void 0:T.call(n);z==null&&i&&(z=(A=n.getLastKey)==null?void 0:A.call(n,e.focusedKey)),z!=null&&(b.preventDefault(),P(z))}break;case"ArrowLeft":if(n.getKeyLeftOf){let z=e.focusedKey!=null?(G=n.getKeyLeftOf)==null?void 0:G.call(n,e.focusedKey):(W=n.getFirstKey)==null?void 0:W.call(n);z==null&&i&&(z=y==="rtl"?(q=n.getFirstKey)==null?void 0:q.call(n,e.focusedKey):(ee=n.getLastKey)==null?void 0:ee.call(n,e.focusedKey)),z!=null&&(b.preventDefault(),P(z,y==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){let z=e.focusedKey!=null?(le=n.getKeyRightOf)==null?void 0:le.call(n,e.focusedKey):(Z=n.getFirstKey)==null?void 0:Z.call(n);z==null&&i&&(z=y==="rtl"?(me=n.getLastKey)==null?void 0:me.call(n,e.focusedKey):(Ne=n.getFirstKey)==null?void 0:Ne.call(n,e.focusedKey)),z!=null&&(b.preventDefault(),P(z,y==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&b.shiftKey)return;b.preventDefault();let z=n.getFirstKey(e.focusedKey,ht(b));e.setFocusedKey(z),z!=null&&(ht(b)&&b.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(z):u&&e.replaceSelection(z))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&b.shiftKey)return;b.preventDefault();let z=n.getLastKey(e.focusedKey,ht(b));e.setFocusedKey(z),z!=null&&(ht(b)&&b.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(z):u&&e.replaceSelection(z))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let z=n.getKeyPageBelow(e.focusedKey);z!=null&&(b.preventDefault(),P(z))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let z=n.getKeyPageAbove(e.focusedKey);z!=null&&(b.preventDefault(),P(z))}break;case"a":ht(b)&&e.selectionMode==="multiple"&&a!==!0&&(b.preventDefault(),e.selectAll());break;case"Escape":c==="clearSelection"&&!l&&e.selectedKeys.size!==0&&(b.stopPropagation(),b.preventDefault(),e.clearSelection());break;case"Tab":if(!m){if(b.shiftKey)r.current.focus();else{let z=Fe(r.current,{tabbable:!0}),$e,be;do be=z.lastChild(),be&&($e=be);while(be);let et=ne();$e&&(!xt($e)||et&&!es(et))&&de($e)}break}}},x=s.useRef({top:0,left:0});Lt(h,"scroll",()=>{var b,P;x.current={top:((b=h.current)==null?void 0:b.scrollTop)??0,left:((P=h.current)==null?void 0:P.scrollLeft)??0}});let M=b=>{var P,N;if(e.isFocused){H(b.currentTarget,F(b))||e.setFocused(!1);return}if(H(b.currentTarget,F(b))){if(e.setFocused(!0),e.focusedKey==null){let k=$=>{$!=null&&(e.setFocusedKey($),u&&!e.isSelected($)&&e.replaceSelection($))},D=b.relatedTarget;D&&b.currentTarget.compareDocumentPosition(D)&Node.DOCUMENT_POSITION_FOLLOWING?k(e.lastSelectedKey??((P=n.getLastKey)==null?void 0:P.call(n))):k(e.firstSelectedKey??((N=n.getFirstKey)==null?void 0:N.call(n)))}else h.current&&(h.current.scrollTop=x.current.top,h.current.scrollLeft=x.current.left);if(e.focusedKey!=null&&h.current){let k=Sn(r,e.focusedKey);k instanceof HTMLElement&&(!xt(k)&&!f&&de(k),Ut()==="keyboard"&&hi(k,{containingElement:r.current}))}}},R=b=>{H(b.currentTarget,b.relatedTarget)||e.setFocused(!1)},L=s.useRef(!1);Lt(r,Nu,f?b=>{let{detail:P}=b;b.stopPropagation(),e.setFocused(!0),(P==null?void 0:P.focusStrategy)==="first"&&(L.current=!0)}:void 0),pi(()=>{var b;if(L.current){let P=((b=n.getFirstKey)==null?void 0:b.call(n))??null;if(P==null){let N=ne();_a(r.current),Ba(N,null),e.collection.size>0&&(L.current=!1)}else e.setFocusedKey(P),L.current=!1}},[e.collection]),pi(()=>{e.collection.size>0&&(L.current=!1)},[e.focusedKey]),Lt(r,Iu,f?b=>{var P;b.stopPropagation(),e.setFocused(!1),(P=b.detail)!=null&&P.clearFocusKey&&e.setFocusedKey(null)}:void 0);const j=s.useRef(o),E=s.useRef(!1);s.useEffect(()=>{var b,P;if(j.current){let N=null;o==="first"&&(N=((b=n.getFirstKey)==null?void 0:b.call(n))??null),o==="last"&&(N=((P=n.getLastKey)==null?void 0:P.call(n))??null);let k=e.selectedKeys;if(k.size){for(let D of k)if(e.canSelectItem(D)){N=D;break}}e.setFocused(!0),e.setFocusedKey(N),N==null&&!f&&r.current&&Ye(r.current),e.collection.size>0&&(j.current=!1,E.current=!0)}});let S=s.useRef(e.focusedKey),I=s.useRef(null);s.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==S.current||E.current)&&h.current&&r.current){let b=Ut(),P=Sn(r,e.focusedKey);if(!(P instanceof HTMLElement))return;(b==="keyboard"||E.current)&&(I.current&&cancelAnimationFrame(I.current),I.current=requestAnimationFrame(()=>{h.current&&($n(h.current,P),b!=="virtual"&&hi(P,{containingElement:r.current}))}))}!f&&e.isFocused&&e.focusedKey==null&&S.current!=null&&r.current&&Ye(r.current),S.current=e.focusedKey,E.current=!1}),s.useEffect(()=>()=>{I.current&&cancelAnimationFrame(I.current)},[]),Lt(r,"react-aria-focus-scope-restore",b=>{b.preventDefault(),e.setFocused(!0)});let C={onKeyDown:w,onFocus:M,onBlur:R,onMouseDown(b){h.current===F(b)&&b.preventDefault()}},{typeSelectProps:K}=Zh({keyboardDelegate:n,selectionManager:e});d||(C=Y(K,C));let _;f||(_=e.focusedKey==null?0:-1);let O=qh(e.collection);return{collectionProps:Y(C,{tabIndex:_,"data-collection":O})}}class al{constructor(e){this.ref=e}getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?Sn(this.ref,e):null;if(!r)return null;let o=n.getBoundingClientRect(),i=r.getBoundingClientRect();return{x:i.left-o.left-n.clientLeft+n.scrollLeft,y:i.top-o.top-n.clientTop+n.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:(e==null?void 0:e.scrollWidth)??0,height:(e==null?void 0:e.scrollHeight)??0}}getVisibleRect(){let e=this.ref.current;return{x:(e==null?void 0:e.scrollLeft)??0,y:(e==null?void 0:e.scrollTop)??0,width:(e==null?void 0:e.clientWidth)??0,height:(e==null?void 0:e.clientHeight)??0}}}class em{constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new al(n.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new al(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){var n,r;return this.disabledBehavior==="all"&&(((n=e.props)==null?void 0:n.isDisabled)||this.disabledKeys.has(e.key))&&((r=e.props)==null?void 0:r.disabledBehavior)!=="selection"}findNextNonDisabled(e,n,r=!1){let o=e;for(;o!=null;){let i=this.collection.getItem(o);if((i==null?void 0:i.type)==="item"&&(r||!this.isDisabled(i)))return o;o=n(o)}return null}getNextKey(e,n){let r=e;return r=this.collection.getKeyAfter(r),this.findNextNonDisabled(r,o=>this.collection.getKeyAfter(o),n==null?void 0:n.includeDisabled)}getPreviousKey(e,n){let r=e;return r=this.collection.getKeyBefore(r),this.findNextNonDisabled(r,o=>this.collection.getKeyBefore(o),n==null?void 0:n.includeDisabled)}findKey(e,n,r){let o=e,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let l=i;do{if(o=n(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&r(l,i)&&o!=null);return o}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}getKeyBelow(e,n){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getNextKey(r,n),this.isSameRow):this.getNextKey(e,n)}getKeyAbove(e,n){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getPreviousKey(r,n),this.isSameRow):this.getPreviousKey(e,n)}getNextColumn(e,n,r){return n?this.getPreviousKey(e,r):this.getNextKey(e,r)}getKeyRightOf(e,n){let r=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[r](o),n==null?void 0:n.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl",n):this.findKey(e,o=>this.getNextColumn(o,this.direction==="rtl",n),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl",n):null}getKeyLeftOf(e,n){let r=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[r](o),n==null?void 0:n.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr",n):this.findKey(e,o=>this.getNextColumn(o,this.direction==="ltr",n),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr",n):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!st(n))return this.getFirstKey();let o=e;if(this.orientation==="horizontal"){let i=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>i&&o!=null;)o=this.getKeyAbove(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>i&&o!=null;)o=this.getKeyAbove(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!st(n))return this.getLastKey();let o=e;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,r.x-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<i&&o!=null;)o=this.getKeyBelow(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<i&&o!=null;)o=this.getKeyBelow(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,o=n||this.getFirstKey();for(;o!=null;){let i=r.getItem(o);if(!i)return null;let l=i.textValue.slice(0,e.length);if(i.textValue&&this.collator.compare(l,e)===0)return o;o=this.getNextKey(o)}return null}}let Mr=new Map;function tm(t){let{locale:e}=ut(),n=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(Mr.has(n))return Mr.get(n);let r=new Intl.Collator(e,t);return Mr.set(n,r),r}function nm(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:o,keyboardDelegate:i,layoutDelegate:l,orientation:a}=t,c=tm({usage:"search",sensitivity:"base"}),u=e.disabledBehavior,d=s.useMemo(()=>i||new em({collection:n,disabledKeys:r,disabledBehavior:u,ref:o,collator:c,layoutDelegate:l,orientation:a}),[i,l,n,r,o,c,u,a]),{collectionProps:f}=Qh({...t,ref:o,selectionManager:e,keyboardDelegate:d});return{listProps:f}}function rm(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:o,onKeyUp:i,...l}=t;!t["aria-label"]&&!t["aria-labelledby"]&&process.env.NODE_ENV!=="production"&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let a=ae(t,{labelable:!0}),{listProps:c}=nm({...l,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return Pc.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:Y(a,{onKeyDown:o,onKeyUp:i},{role:"menu",...c,onKeyDown:u=>{var d;(u.key!=="Escape"||t.shouldUseVirtualFocus)&&((d=c.onKeyDown)==null||d.call(c,u))}})}}function om(t){let{id:e,selectionManager:n,key:r,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:l,focus:a,isDisabled:c,onAction:u,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=t,m=Jt();e=pe(e);let h=T=>{if(T.pointerType==="keyboard"&&io(T))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(f==="selection"&&o.current){let A=n.getItemProps(r);m.open(o.current,T,A.href,A.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(f==="override"||f==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):T&&T.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||T&&(ht(T)||T.pointerType==="touch"||T.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};s.useEffect(()=>{r===n.focusedKey&&n.isFocused&&(l?_a(o.current):a?a():ne()!==o.current&&o.current&&Ye(o.current))},[o,r,n.focusedKey,n.childFocusStrategy,n.isFocused,l]),c=c||n.isDisabled(r);let g={};!l&&!c?g={tabIndex:r===n.focusedKey?0:-1,onFocus(T){F(T)===o.current&&n.setFocusedKey(r)}}:c&&(g.onMouseDown=T=>{T.preventDefault()}),s.useEffect(()=>{c&&n.focusedKey===r&&n.setFocusedKey(null)},[n,c,r]);let y=n.isLink(r)&&f==="override",v=u&&t.UNSTABLE_itemBehavior==="action",w=n.isLink(r)&&f!=="selection"&&f!=="none",x=!c&&n.canSelectItem(r)&&!y&&!v,M=(u||w)&&!c,R=M&&(n.selectionBehavior==="replace"?!x:!x||n.isEmpty),L=M&&x&&n.selectionBehavior==="replace",j=R||L,E=s.useRef(null),S=j&&x,I=s.useRef(!1),C=s.useRef(!1),K=n.getItemProps(r),_=T=>{var A;u&&(u(),(A=o.current)==null||A.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),w&&o.current&&m.open(o.current,T,K.href,K.routerOptions)},O={ref:o};if(i?(O.onPressStart=T=>{E.current=T.pointerType,I.current=S,T.pointerType==="keyboard"&&(!j||ul(T.key))&&h(T)},d?(O.onPressUp=R?void 0:T=>{T.pointerType==="mouse"&&x&&h(T)},O.onPress=R?_:T=>{T.pointerType!=="keyboard"&&T.pointerType!=="mouse"&&x&&h(T)}):O.onPress=T=>{if(R||L&&T.pointerType!=="mouse"){if(T.pointerType==="keyboard"&&!cl(T.key))return;_(T)}else T.pointerType!=="keyboard"&&x&&h(T)}):(O.onPressStart=T=>{E.current=T.pointerType,I.current=S,C.current=R,x&&(T.pointerType==="mouse"&&!R||T.pointerType==="keyboard"&&(!M||ul(T.key)))&&h(T)},O.onPress=T=>{(T.pointerType==="touch"||T.pointerType==="pen"||T.pointerType==="virtual"||T.pointerType==="keyboard"&&j&&cl(T.key)||T.pointerType==="mouse"&&C.current)&&(j?_(T):x&&h(T))}),g["data-collection"]=Yh(n.collection),g["data-key"]=r,O.preventFocusOnPress=l,l&&(O=Y(O,{onPressStart(T){T.pointerType!=="touch"&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(T){T.pointerType==="touch"&&(n.setFocused(!0),n.setFocusedKey(r))}})),K)for(let T of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])K[T]&&(O[T]=Qt(O[T],K[T]));let{pressProps:b,isPressed:P}=Xe(O),N=L?T=>{E.current==="mouse"&&(T.stopPropagation(),T.preventDefault(),_(T))}:void 0,{longPressProps:k}=Sc({isDisabled:!S,onLongPress(T){T.pointerType==="touch"&&(h(T),n.setSelectionBehavior("toggle"))}}),D=T=>{E.current==="touch"&&I.current&&T.preventDefault()},$=f!=="none"&&n.isLink(r)?T=>{_e.isOpening||T.preventDefault()}:void 0;return{itemProps:Y(g,x||R||l&&!c?b:{},S?k:{},{onDoubleClick:N,onDragStartCapture:D,onClick:$,id:e},l?{onMouseDown:T=>T.preventDefault()}:void 0),isPressed:P,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:x,hasAction:j}}function cl(t){return t==="Enter"}function ul(t){return t===" "}function im(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}const dl=new WeakMap;function lm(t){let e=dl.get(t);if(e!=null)return e;let n=0,r=o=>{for(let i of o)i.type==="section"?r(im(i,t)):i.type==="item"&&n++};return r(t),dl.set(t,n),n}function sm(t,e,n){let{id:r,key:o,closeOnSelect:i,shouldCloseOnSelect:l,isVirtualized:a,"aria-haspopup":c,onPressStart:u,onPressUp:d,onPress:f,onPressChange:m,onPressEnd:h,onClick:g,onHoverStart:y,onHoverChange:v,onHoverEnd:w,onKeyDown:x,onKeyUp:M,onFocus:R,onFocusChange:L,onBlur:j,selectionManager:E=e.selectionManager}=t,S=!!c,I=S&&t["aria-expanded"]==="true",C=t.isDisabled??E.isDisabled(o),K=t.isSelected??E.isSelected(o),_=Pc.get(e),O=e.collection.getItem(o),b=t.onClose||_.onClose,P=Jt(),N=()=>{var te;if(!S&&((te=O==null?void 0:O.props)!=null&&te.onAction?O.props.onAction():t.onAction&&t.onAction(o),_.onAction)){let Tt=_.onAction;Tt(o)}},k="menuitem";S||(E.selectionMode==="single"?k="menuitemradio":E.selectionMode==="multiple"&&(k="menuitemcheckbox"));let D=xn(),$=xn(),T=xn(),A={id:r,"aria-disabled":C||void 0,role:k,"aria-label":t["aria-label"],"aria-labelledby":D,"aria-describedby":[t["aria-describedby"],$,T].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":c,"aria-expanded":t["aria-expanded"]};if(E.selectionMode!=="none"&&!S&&(A["aria-checked"]=K),a){let te=Number(O==null?void 0:O.index);A["aria-posinset"]=Number.isNaN(te)?void 0:te+1,A["aria-setsize"]=lm(e.collection)}let G=s.useRef(!1),W=te=>{m==null||m(te),G.current=te},q=s.useRef(null),ee=te=>{te.pointerType!=="keyboard"&&(q.current={pointerType:te.pointerType}),te.pointerType==="mouse"&&(G.current||te.target.click()),d==null||d(te)},le=te=>{var ri,oi;g==null||g(te),N(),Ul(te,P,O.props.href,O==null?void 0:O.props.routerOptions);let Tt=((ri=q.current)==null?void 0:ri.pointerType)==="keyboard"?((oi=q.current)==null?void 0:oi.key)==="Enter"||E.selectionMode==="none"||E.isLink(o):E.selectionMode!=="multiple"||E.isLink(o);Tt=l??i??Tt,b&&!S&&Tt&&b(),q.current=null},{itemProps:Z,isFocused:me}=om({id:r,selectionManager:E,key:o,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:_.shouldUseVirtualFocus}),{pressProps:Ne,isPressed:z}=Xe({onPressStart:u,onPress:f,onPressUp:ee,onPressChange:W,onPressEnd:h,isDisabled:C}),{hoverProps:$e}=nn({isDisabled:C,onHoverStart(te){!Gt()&&!(I&&c)&&(E.setFocused(!0),E.setFocusedKey(o)),y==null||y(te)},onHoverChange:v,onHoverEnd:w}),{keyboardProps:be}=Ns({onKeyDown:te=>{if(te.repeat){te.continuePropagation();return}switch(te.key){case" ":q.current={pointerType:"keyboard",key:" "},F(te).click(),Gr("keyboard");break;case"Enter":q.current={pointerType:"keyboard",key:"Enter"},F(te).tagName!=="A"&&F(te).click(),Gr("keyboard");break;default:S||te.continuePropagation(),x==null||x(te);break}},onKeyUp:M}),{focusableProps:et}=tn({onBlur:j,onFocus:R,onFocusChange:L},n),ni=ae(O==null?void 0:O.props);delete ni.id;let Su=Gl(O==null?void 0:O.props);return{menuItemProps:{...A,...Y(ni,Su,S?{onFocus:Z.onFocus,"data-collection":Z["data-collection"],"data-key":Z["data-key"]}:Z,Ne,$e,be,et,_.shouldUseVirtualFocus||S?{onMouseDown:te=>te.preventDefault()}:void 0,C?void 0:{onClick:le}),tabIndex:Z.tabIndex!=null&&I&&!_.shouldUseVirtualFocus?-1:Z.tabIndex},labelProps:{id:D},descriptionProps:{id:$},keyboardShortcutProps:{id:T},isFocused:me,isFocusVisible:me&&E.isFocused&&Gt()&&!I,isSelected:K,isPressed:z,isDisabled:C}}function am(t){let{heading:e,"aria-label":n}=t,r=pe();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}const gn=2,cm=50,um=1e3,fl=Math.PI/12;function dm(t){let{menuRef:e,submenuRef:n,isOpen:r,isDisabled:o}=t,i=s.useRef(void 0),l=s.useRef(void 0),a=s.useRef(0),c=s.useRef(void 0),u=s.useRef(void 0),d=s.useRef(void 0),f=s.useRef(2),[m,h]=s.useState(!1);Tn({ref:r?n:void 0,onResize:()=>{n.current&&(l.current=n.current.getBoundingClientRect(),d.current=void 0)}});let y=()=>{h(!1),f.current=gn,i.current=void 0},v=ip(),w=Pe(x=>{m&&x.preventDefault()});s.useEffect(()=>{m&&e.current?e.current.style.pointerEvents="none":e.current.style.pointerEvents=""},[e,m]),J(()=>{let x=n.current,M=e.current;if(o||!x||!r||v!=="pointer"||!M){y();return}l.current=x.getBoundingClientRect();let R=L=>{if(L.pointerType==="touch"||L.pointerType==="pen")return;let j=Date.now();if(j-a.current<cm)return;clearTimeout(c.current),clearTimeout(u.current);let{clientX:E,clientY:S}=L;if(!i.current){i.current={x:E,y:S};return}if(!l.current)return;if(d.current||(d.current=E>l.current.right?"left":"right"),E<M.getBoundingClientRect().left||E>M.getBoundingClientRect().right||S<M.getBoundingClientRect().top||S>M.getBoundingClientRect().bottom){y();return}let I=i.current.x,C=i.current.y,K=d.current==="right"?l.current.left-I:I-l.current.right,_=Math.atan2(C-l.current.top,K)+fl,O=Math.atan2(C-l.current.bottom,K)-fl,b=Math.atan2(C-S,d.current==="left"?-(E-I):E-I),P=b<_&&b>O;f.current=P?Math.min(f.current+1,gn):Math.max(f.current-1,0),f.current>=gn?h(!0):h(!1),a.current=j,i.current={x:E,y:S},P&&(c.current=setTimeout(()=>{y(),u.current=setTimeout(()=>{let N=document.elementFromPoint(E,S);N&&H(M,N)&&N.dispatchEvent(new PointerEvent("pointerover",{bubbles:!0,cancelable:!0}))},100)},um))};return window.addEventListener("pointermove",R),process.env.NODE_ENV!=="test"&&window.addEventListener("pointerdown",w,!0),()=>{window.removeEventListener("pointermove",R),process.env.NODE_ENV!=="test"&&window.removeEventListener("pointerdown",w,!0),clearTimeout(c.current),clearTimeout(u.current),f.current=gn}},[o,r,e,v,h,n])}function fm(t,e,n){let{parentMenuRef:r,submenuRef:o,type:i="menu",isDisabled:l,delay:a=200,shouldUseVirtualFocus:c}=t,u=pe(),d=pe(),{direction:f}=ut(),m=s.useRef(void 0),h=s.useCallback(()=>{m.current&&(clearTimeout(m.current),m.current=void 0)},[m]),g=s.useCallback(E=>{h(),e.open(E)},[e,h]),y=s.useCallback(()=>{h(),e.close()},[e,h]);J(()=>()=>{h()},[h]);let v=E=>{if(xt(E.currentTarget))switch(E.key){case"ArrowLeft":f==="ltr"&&H(E.currentTarget,F(E))&&(E.preventDefault(),E.stopPropagation(),y(),!c&&n.current&&de(n.current));break;case"ArrowRight":f==="rtl"&&H(E.currentTarget,F(E))&&(E.preventDefault(),E.stopPropagation(),y(),!c&&n.current&&de(n.current));break;case"Escape":H(o.current,F(E))&&(E.stopPropagation(),y(),!c&&n.current&&de(n.current));break}},w={id:d,"aria-labelledby":u,submenuLevel:e.submenuLevel,...i==="menu"&&{onClose:e.closeAll,autoFocus:e.focusStrategy??void 0,onKeyDown:v}},x=E=>{switch(E.key){case"ArrowRight":l||(f==="ltr"?(E.preventDefault(),e.isOpen||g("first"),i==="menu"&&(o!=null&&o.current)&&ne()===(n==null?void 0:n.current)&&de(o.current)):e.isOpen?y():E.continuePropagation());break;case"ArrowLeft":l||(f==="rtl"?(E.preventDefault(),e.isOpen||g("first"),i==="menu"&&(o!=null&&o.current)&&ne()===(n==null?void 0:n.current)&&de(o.current)):e.isOpen?y():E.continuePropagation());break;default:E.continuePropagation();break}},M=E=>{!l&&(E.pointerType==="virtual"||E.pointerType==="keyboard")&&g("first")},R=E=>{!l&&(E.pointerType==="touch"||E.pointerType==="mouse")&&g()},L=E=>{l||(E&&!e.isOpen?m.current||(m.current=setTimeout(()=>{g()},a)):E||h())};Lt(r,"focusin",E=>{e.isOpen&&H(r.current,F(E))&&F(E)!==n.current&&y()});let j=E=>E!==n.current;return dm({menuRef:r,submenuRef:o,isOpen:e.isOpen,isDisabled:l}),{submenuTriggerProps:{id:u,"aria-controls":e.isOpen?d:void 0,"aria-haspopup":l?void 0:i,"aria-expanded":e.isOpen?"true":"false",onPressStart:M,onPress:R,onHoverChange:L,onKeyDown:x,isOpen:e.isOpen},submenuProps:w,popoverProps:{isNonModal:!0,shouldCloseOnInteractOutside:j}}}function Ko(t){let e=No(t),[n,r]=s.useState(null),[o,i]=s.useState([]),l=()=>{i([]),e.close()};return{focusStrategy:n,...e,open(u=null){r(u),e.open()},toggle(u=null){r(u),e.toggle()},close(){l()},expandedKeysStack:o,openSubmenu:(u,d)=>{i(f=>d>f.length?f:[...f.slice(0,d),u])},closeSubmenu:(u,d)=>{i(f=>f[d]===u?f.slice(0,d):f)}}}function pm(t,e){let{triggerKey:n}=t,{expandedKeysStack:r,openSubmenu:o,closeSubmenu:i,close:l}=e,[a]=s.useState(r==null?void 0:r.length),c=s.useMemo(()=>r[a]===n,[r,n,a]),[u,d]=s.useState(null),f=s.useCallback(g=>{d(g??null),o(n,a)},[o,a,n]),m=s.useCallback(()=>{d(null),i(n,a)},[i,a,n]),h=s.useCallback(g=>{d(g??null),c?m():f(g)},[m,f,c]);return s.useMemo(()=>({focusStrategy:u,isOpen:c,open:f,close:m,closeAll:l,submenuLevel:a,setOpen:()=>{},toggle:h}),[c,f,m,l,u,h,a])}function hm(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function mm(t){return bm(t)}function bm(t,e){for(let n of t)return n}function Rr(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...pl(t,e),e],o=[...pl(t,n),n],i=r.slice(0,o.length).findIndex((l,a)=>l!==o[a]);return i!==-1?(e=r[i],n=o[i],e.index-n.index):r.findIndex(l=>l===n)>=0?1:(o.findIndex(l=>l===e)>=0,-1)}function pl(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}class Re extends Set{constructor(e,n,r){super(e),e instanceof Re?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}class rr{constructor(e,n,r){this.collection=e,this.state=n,this.allowsCellSelection=(r==null?void 0:r.allowsCellSelection)??!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null,this.fullCollection=(r==null?void 0:r.fullCollection)||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&Rr(this.collection,r,e)<0)&&(e=r)}return(e==null?void 0:e.key)??null}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&Rr(this.collection,r,e)>0)&&(e=r)}return(e==null?void 0:e.key)??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Re([n],n,n);else{let o=this.state.selectedKeys,i=o.anchorKey??n;r=new Re(o,i,n);for(let l of this.getKeyRange(i,o.currentKey??n))r.delete(l);for(let l of this.getKeyRange(n,i))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),o=this.collection.getItem(n);return r&&o?Rr(this.collection,r,o)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var i;if((i=this.layoutDelegate)!=null&&i.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let r=[],o=e;for(;o!=null;){let l=this.collection.getItem(o);if(l&&(l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&r.push(o),o===n)return r;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new Re(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new Re([n],n,n):new Re;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new Re;for(let r of e){let o=this.getKey(r);if(o!=null&&(n.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=this.fullCollection??this.collection,n=[],r=o=>{var i;for(;o!=null;){if(this.canSelectItemIn(o,e)){let l=e.getItem(o);(l==null?void 0:l.type)==="item"&&n.push(o),l!=null&&l.hasChildNodes&&(this.allowsCellSelection||l.type!=="item")&&r(((i=mm(hm(l,e)))==null?void 0:i.key)??null)}o=e.getKeyAfter(o)}};return r(e.getFirstKey()),n}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Re)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,n){var o;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=n.getItem(e);return!(!r||(o=r==null?void 0:r.props)!=null&&o.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var r,o;let n=this.collection.getItem(e);return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!((r=n==null?void 0:n.props)!=null&&r.isDisabled))&&((o=n==null?void 0:n.props)==null?void 0:o.disabledBehavior)!=="selection"}isLink(e){var n,r;return!!((r=(n=this.collection.getItem(e))==null?void 0:n.props)!=null&&r.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))==null?void 0:n.props}withCollection(e){return new rr(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class gm{constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&(l.type==="section"||n.has(l.key)))for(let a of l.childNodes)r(a)};for(let l of e)r(l);let o=null,i=0;for(let[l,a]of this.keyMap)o?(o.nextKey=l,a.prevKey=o.key):(this.firstKey=l,a.prevKey=void 0),a.type==="item"&&(a.index=i++),o=a,o.nextKey=void 0;this.lastKey=(o==null?void 0:o.key)??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);return n?n.prevKey??null:null}getKeyAfter(e){let n=this.keyMap.get(e);return n?n.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}}class ym{build(e,n){return this.context=n,hl(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(s.isValidElement(n)&&n.type===s.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of r)yield*this.getFullNode({value:i,index:o},{renderer:n}),o++}else{let o=[];s.Children.forEach(n,l=>{l&&o.push(l)});let i=0;for(let l of o){let a=this.getFullNode({element:l,index:i},{});for(let c of a)i++,yield c}}}getKey(e,n,r,o){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${o}${n.key}`;let i=n.value;if(i!=null){let l=i.key??i.id;if(l==null)throw new Error("No key found for item");return l}return o?`${o}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,o){if(s.isValidElement(e.element)&&e.element.type===s.Fragment){let c=[];s.Children.forEach(e.element.props.children,d=>{c.push(d)});let u=e.index??0;for(const d of c)yield*this.getFullNode({element:d,index:u++},n,r,o);return}let i=e.element;if(!i&&e.value&&n&&n.renderer){let c=this.cache.get(e.value);if(c&&(!c.shouldInvalidate||!c.shouldInvalidate(this.context))){c.index=e.index,c.parentKey=o?o.key:null,yield c;return}i=n.renderer(e.value)}if(s.isValidElement(i)){let c=i.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let m=i.type;throw new Error(`Unknown element <${m}> in collection.`)}let u=c.getCollectionNode(i.props,this.context),d=e.index??0,f=u.next();for(;!f.done&&f.value;){let m=f.value;e.index=d;let h=m.key??null;h==null&&(h=m.element?null:this.getKey(i,e,n,r));let y=[...this.getFullNode({...m,key:h,index:d,wrapper:vm(e.wrapper,m.wrapper)},this.getChildState(n,m),r?`${r}${i.key}`:i.key,o)];for(let v of y){if(v.value=m.value??e.value??null,v.value&&this.cache.set(v.value,v),e.type&&v.type!==e.type)throw new Error(`Unsupported type <${Dr(v.type)}> in <${Dr((o==null?void 0:o.type)??"unknown parent type")}>. Only <${Dr(e.type)}> is supported.`);d++,yield v}f=u.next(y)}return}if(e.key==null||e.type==null)return;let l=this,a={type:e.type,props:e.props,key:e.key,parentKey:o?o.key:null,value:e.value??null,level:((o==null?void 0:o.level)??0)+((o==null?void 0:o.type)==="item"?1:0),index:e.index,rendered:e.rendered,textValue:e.textValue??"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:hl(function*(){if(!e.hasChildNodes||!e.childNodes)return;let c=0;for(let u of e.childNodes()){u.key!=null&&(u.key=`${a.key}${u.key}`);let d=l.getFullNode({...u,index:c},l.getChildState(n,u),a.key,a);for(let f of d)c++,yield f}})};yield a}constructor(){this.cache=new WeakMap}}function hl(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function vm(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Dr(t){return t[0].toUpperCase()+t.slice(1)}function xm(t,e,n){let r=s.useMemo(()=>new ym,[]),{children:o,items:i,collection:l}=t;return s.useMemo(()=>{if(l)return l;let c=r.build({children:o,items:i},n);return e(c)},[r,o,i,l,n,e])}function $m(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Tc(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:o="toggle",disabledBehavior:i="all"}=t,l=s.useRef(!1),[,a]=s.useState(!1),c=s.useRef(null),u=s.useRef(null),[,d]=s.useState(null),f=s.useMemo(()=>ml(t.selectedKeys),[t.selectedKeys]),m=s.useMemo(()=>ml(t.defaultSelectedKeys,new Re),[t.defaultSelectedKeys]),[h,g]=Zn(f,m,t.onSelectionChange),y=s.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,w]=s.useState(o);o==="replace"&&v==="toggle"&&typeof h=="object"&&h.size===0&&w("replace");let x=s.useRef(o);return s.useEffect(()=>{o!==x.current&&(w(o),x.current=o)},[o]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:w,get isFocused(){return l.current},setFocused(M){l.current=M,a(M)},get focusedKey(){return c.current},get childFocusStrategy(){return u.current},setFocusedKey(M,R="first"){c.current=M,u.current=R,d(M)},selectedKeys:h,setSelectedKeys(M){(r||!$m(M,h))&&g(M)},disabledKeys:y,disabledBehavior:i}}function ml(t,e){return t?t==="all"?"all":new Re(t):e}function wm(t){let{onExpandedChange:e}=t,[n,r]=Zn(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),o=Tc(t),i=s.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),l=xm(t,s.useCallback(c=>new gm(c,{expandedKeys:n}),[n]),null);return s.useEffect(()=>{o.focusedKey!=null&&!l.getItem(o.focusedKey)&&o.setFocusedKey(null)},[l,o.focusedKey]),{collection:l,expandedKeys:n,disabledKeys:i,toggleKey:c=>{r(Em(n,c))},setExpandedKeys:r,selectionManager:new rr(l,o)}}function Em(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const Ao=s.createContext(null),or=s.createContext(null),Xt=s.createContext(null),_n=s.createContext(null);function Sm(t){let e=Ko(t),n=s.useRef(null),{menuTriggerProps:r,menuProps:o}=Wh({...t,type:"menu"},e,n),i=s.useRef(null);return xs()?null:s.createElement(ze,{values:[[Ao,{...o,ref:i}],[Qe,e],[Xt,e],[tr,{trigger:"MenuTrigger",triggerRef:n,scrollRef:i,placement:"bottom start","aria-labelledby":o["aria-labelledby"]}]]},s.createElement(Ta,{...r,ref:n,isPressed:e.isOpen},t.children))}const Mc=s.createContext(null),ti=class ti extends Ct{filter(e,n,r){let o=e.getItem(this.firstChildKey);if(o&&r(o.textValue,this)){let i=this.clone();return n.addDescendants(i,e),i}return null}};ti.type="submenutrigger";let lo=ti;const Cm=Fa(lo,(t,e,n)=>{let{CollectionBranch:r}=s.useContext(nr),o=s.useContext(or),i=s.useContext(Xt),l=pm({triggerKey:n.key},i),a=s.useRef(null),c=Je(e),{parentMenuRef:u,shouldUseVirtualFocus:d}=s.useContext(Mc),{submenuTriggerProps:f,submenuProps:m,popoverProps:h}=fm({parentMenuRef:u,submenuRef:a,delay:t.delay,shouldUseVirtualFocus:d},l,c);return s.createElement(ze,{values:[[$t,{...f,onAction:void 0,ref:c}],[Ao,{ref:a,...m}],[Qe,l],[tr,{trigger:"SubmenuTrigger",triggerRef:c,placement:"end top","aria-labelledby":m["aria-labelledby"],...h}]]},s.createElement(r,{collection:o.collection,parent:n}),t.children[1])},t=>t.children[0]),Pm=s.forwardRef(function(e,n){return[e,n]=Me(e,n,Ao),s.createElement(Eh,{content:s.createElement(Mh,e)},r=>s.createElement(km,{props:e,collection:r,menuRef:n}))});function km({props:t,collection:e,menuRef:n}){[t,n]=Me(t,n,sl);let{filter:r,...o}=t,i=s.useMemo(()=>r?e.filter(r):e,[e,r]),l=wm({...t,collection:i,children:void 0}),a=s.useContext(Xt),{isVirtualized:c,CollectionRoot:u}=s.useContext(nr),{menuProps:d}=rm({...t,isVirtualized:c,onClose:t.onClose||(a==null?void 0:a.close)},l,n),f=Te({...t,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:l.collection.size===0}}),m=null;l.collection.size===0&&t.renderEmptyState&&(m=s.createElement("div",{role:"menuitem",style:{display:"contents"}},t.renderEmptyState()));let h=ae(t,{global:!0});return s.createElement(_s,null,s.createElement(he.div,{...Y(h,f,d),ref:n,slot:t.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:t.onScroll},s.createElement(ze,{values:[[or,l],[Lo,{elementType:"div"}],[Dh,{name:"MenuSection",render:Rc}],[Mc,{parentMenuRef:n,shouldUseVirtualFocus:o==null?void 0:o.shouldUseVirtualFocus}],[$t,{shouldCloseOnSelect:t.shouldCloseOnSelect}],[sl,null],[Oh,null],[_n,l.selectionManager],[Xt,a??Ko({})]]},s.createElement(Bh,null,s.createElement(u,{collection:l.collection,persistedKeys:Lh(l.selectionManager.focusedKey),scrollRef:n}))),m))}class Tm extends rr{constructor(e,n){super(e.collection,n),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}}function Rc(t,e,n,r="react-aria-MenuSection"){var v,w,x;let o=s.useContext(or),{CollectionBranch:i}=s.useContext(nr),[l,a]=vs(),{headingProps:c,groupProps:u}=am({heading:a,"aria-label":n.props["aria-label"]??void 0}),d=Te({...t,id:void 0,children:void 0,defaultClassName:r,className:(v=n.props)==null?void 0:v.className,style:(w=n.props)==null?void 0:w.style,values:void 0}),f=s.useContext(_n),m=Tc(t),h=t.selectionMode!=null?new Tm(f,m):f,g=(x=en($t))==null?void 0:x.shouldCloseOnSelect,y=ae(t,{global:!0});return delete y.id,s.createElement(he.section,{...Y(y,d,u),ref:e},s.createElement(ze,{values:[[Fh,{...c,ref:l}],[_n,h],[$t,{shouldCloseOnSelect:t.shouldCloseOnSelect??g}]]},s.createElement(i,{collection:o.collection,parent:n})))}const Mm=Fa(no,Rc),$t=s.createContext(null),Rm=Oa(to,function(e,n,r){var M;[e,n]=Me(e,n,$t);let o=(M=en($t))==null?void 0:M.id,i=s.useContext(or),l=Je(n),a=s.useContext(_n),{isVirtualized:c}=s.useContext(nr),{menuItemProps:u,labelProps:d,descriptionProps:f,keyboardShortcutProps:m,...h}=sm({...e,id:o,key:r.key,selectionManager:a,isVirtualized:c},i,l),{hoverProps:g,isHovered:y}=nn({isDisabled:h.isDisabled}),v=Te({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...h,isHovered:y,isFocusVisible:h.isFocusVisible,selectionMode:a.selectionMode,selectionBehavior:a.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),w=e.href?he.a:he.div,x=ae(e,{global:!0});return delete x.id,delete x.onClick,s.createElement(w,{...Y(x,v,u,g),ref:l,"data-disabled":h.isDisabled||void 0,"data-hovered":y||void 0,"data-focused":h.isFocused||void 0,"data-focus-visible":h.isFocusVisible||void 0,"data-pressed":h.isPressed||void 0,"data-selected":h.isSelected||void 0,"data-selection-mode":a.selectionMode==="none"?void 0:a.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},s.createElement(ze,{values:[[Va,{slots:{[Rn]:d,label:d,description:f}}],[jh,m],[Vh,{isSelected:h.isSelected}]]},v.children))});function Dm(t,e){let{role:n="dialog"}=t,r=xn();r=t["aria-label"]?void 0:r;let o=s.useRef(!1);s.useEffect(()=>{if(e.current&&!xt(e.current)){Ye(e.current);let l=setTimeout(()=>{(ne()===e.current||ne()===document.body)&&(o.current=!0,e.current&&(e.current.blur(),Ye(e.current)),o.current=!1)},500);return()=>{clearTimeout(l)}}},[e]),Ra();let i=s.useRef(!1);return s.useEffect(()=>{if(process.env.NODE_ENV!=="production"&&!i.current&&e.current){let l=e.current,a=l.hasAttribute("aria-label"),c=l.hasAttribute("aria-labelledby");!a&&!c&&(console.warn("A dialog must have a title for accessibility. Either provide an aria-label or aria-labelledby prop, or render a heading element inside the dialog."),i.current=!0)}}),{dialogProps:{...ae(t,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||r,onBlur:l=>{o.current&&l.stopPropagation()}},titleProps:{id:r}}}const Dc=s.createContext(null),Qe=s.createContext(null);function Im(t){let e=Ko(t),n=s.useRef(null),{triggerProps:r,overlayProps:o}=Cc({type:"dialog"},e,n);return r.id=pe(),o["aria-labelledby"]=r.id,s.createElement(ze,{values:[[Qe,e],[Xt,e],[Dc,o],[tr,{trigger:"DialogTrigger",triggerRef:n,"aria-labelledby":o["aria-labelledby"]}]]},s.createElement(Ta,{...r,ref:n,isPressed:e.isOpen},t.children))}const Nm=s.forwardRef(function(e,n){let r=e["aria-labelledby"];[e,n]=Me(e,n,Dc);let{dialogProps:o,titleProps:i}=Dm({...e,"aria-labelledby":r},n),l=s.useContext(Qe);!o["aria-label"]&&!o["aria-labelledby"]&&(e["aria-labelledby"]?o["aria-labelledby"]=e["aria-labelledby"]:process.env.NODE_ENV!=="production"&&console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let a=Te({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(l==null?void 0:l.close)||(()=>{})}}),c=ae(e,{global:!0});return s.createElement(he.section,{...Y(c,a,o),render:e.render,ref:n,slot:e.slot||void 0},s.createElement(ze,{values:[[As,{slots:{[Rn]:{},title:{...i,level:2}}}],[Ks,{slots:{[Rn]:{},close:{onPress:()=>l==null?void 0:l.close()}}}]]},a.children))});function Lm(t,e,n){let{overlayProps:r,underlayProps:o}=zs({...t,isOpen:e.isOpen,onClose:e.close},n);return Hs({isDisabled:!e.isOpen}),Ra(),s.useEffect(()=>{if(e.isOpen&&n.current)return Os([n.current],{shouldUseInert:!0})},[e.isOpen,n]),{modalProps:Y(r),underlayProps:o}}const Km=s.createContext(null),Oo=s.createContext(null),Am=s.forwardRef(function(e,n){if(s.useContext(Oo)){if(process.env.NODE_ENV!=="production"&&(e.onOpenChange||e.defaultOpen!==void 0||e.isOpen!==void 0)){const y=new Set(["isDismissable","isKeyboardDismissDisabled","isOpen","defaultOpen","onOpenChange","isEntering","isExiting","UNSTABLE_portalContainer","shouldCloseOnInteractOutside"]),v=Object.keys(e).filter(w=>y.has(w));console.warn(`This modal is already wrapped in a ModalOverlay, props [${v.join(", ")}] should be placed on the ModalOverlay instead.`)}return s.createElement(bl,{...e,modalRef:n},e.children)}let{isDismissable:o,isKeyboardDismissDisabled:i,isOpen:l,defaultOpen:a,onOpenChange:c,children:u,isEntering:d,isExiting:f,UNSTABLE_portalContainer:m,shouldCloseOnInteractOutside:h,...g}=e;return s.createElement(Ic,{isDismissable:o,isKeyboardDismissDisabled:i,isOpen:l,defaultOpen:a,onOpenChange:c,isEntering:d,isExiting:f,UNSTABLE_portalContainer:m,shouldCloseOnInteractOutside:h},s.createElement(bl,{...g,modalRef:n},u))});function Om(t,e){[t,e]=Me(t,e,Km);let n=s.useContext(Qe),r=No(t),o=t.isOpen!=null||t.defaultOpen!=null||!n?r:n;o===n&&process.env.NODE_ENV!=="production"&&(t.onOpenChange||t.defaultOpen!==void 0||t.isOpen!==void 0)&&console.warn("This modals state is controlled by a trigger, place onOpenChange on the trigger instead.");let i=Je(e),l=s.useRef(null),a=Or(i,o.isOpen),c=Or(l,o.isOpen),u=a||c||t.isExiting||!1,d=Ze();return!o.isOpen&&!u||d?null:s.createElement(Fm,{...t,state:o,isExiting:u,overlayRef:i,modalRef:l})}const Ic=s.forwardRef(Om);function Fm({UNSTABLE_portalContainer:t,...e}){let n=e.modalRef,{state:r}=e,{modalProps:o,underlayProps:i}=Lm(e,r,n),l=xo(e.overlayRef)||e.isEntering||!1,a=Te({...e,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:l,isExiting:e.isExiting,state:r}}),c=bd(),u,d;if(typeof document<"u"){let m=st(document.body)?document.body:document.scrollingElement||document.documentElement,h=m.getBoundingClientRect().width%1,g=m.getBoundingClientRect().height%1;u=m.scrollWidth-h,d=m.scrollHeight-g}let f={...a.style,"--visual-viewport-width":c.width+"px","--visual-viewport-height":c.height+"px","--page-width":u!==void 0?u+"px":void 0,"--page-height":d!==void 0?d+"px":void 0};return s.createElement(eo,{isExiting:e.isExiting,portalContainer:t},s.createElement(he.div,{...Y(ae(e,{global:!0}),i),...a,style:f,ref:e.overlayRef,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},s.createElement(ze,{values:[[Oo,{modalProps:o,modalRef:n,isExiting:e.isExiting,isDismissable:e.isDismissable}],[Qe,r]]},a.children)))}function bl(t){let{modalProps:e,modalRef:n,isExiting:r,isDismissable:o}=s.useContext(Oo),i=s.useContext(Qe),l=s.useMemo(()=>ct(t.modalRef,n),[t.modalRef,n]),a=Je(l),c=xo(a),u=Te({...t,defaultClassName:"react-aria-Modal",values:{isEntering:c,isExiting:r,state:i}});return s.createElement(he.div,{...Y(ae(t,{global:!0}),e),...u,ref:a,"data-entering":c||void 0,"data-exiting":r||void 0},o&&s.createElement(Qr,{onDismiss:i.close}),u.children)}const jm=s.forwardRef(({children:t,...e},n)=>{n=Je(n);let{pressProps:r}=Xe({...e,ref:n}),{focusableProps:o}=tn(e,n),i=s.Children.only(t);s.useEffect(()=>{if(process.env.NODE_ENV==="production")return;let a=n.current;if(!a||!(a instanceof fe(a).Element)){console.error("<Pressable> child must forward its ref to a DOM element.");return}if(!e.isDisabled&&!Eo(a)){console.warn("<Pressable> child must be focusable. Please ensure the tabIndex prop is passed through.");return}if(a.localName!=="button"&&a.localName!=="input"&&a.localName!=="select"&&a.localName!=="textarea"&&a.localName!=="a"&&a.localName!=="area"&&a.localName!=="summary"){let c=a.getAttribute("role");c?c!=="application"&&c!=="button"&&c!=="checkbox"&&c!=="combobox"&&c!=="gridcell"&&c!=="link"&&c!=="menuitem"&&c!=="menuitemcheckbox"&&c!=="menuitemradio"&&c!=="option"&&c!=="radio"&&c!=="searchbox"&&c!=="separator"&&c!=="slider"&&c!=="spinbutton"&&c!=="switch"&&c!=="tab"&&c!=="textbox"&&c!=="treeitem"&&console.warn(`<Pressable> child must have an interactive ARIA role. Got "${c}".`):console.warn("<Pressable> child must have an interactive ARIA role.")}},[n,e.isDisabled]);let l=parseInt(s.version,10)<19?i.ref:i.props.ref;return s.cloneElement(i,{...Y(r,o,i.props),ref:ct(l,n)})}),gl=({children:t,className:e,slot:n,style:r,variant:o,...i})=>{const l=s.useMemo(()=>Mf({variant:o}),[o]);return p.jsx(Do,{"aria-label":"Close",className:Ee(e,l),"data-slot":"close-button",slot:n,style:r,...i,children:a=>typeof t=="function"?t(a):t??p.jsx(Cp,{"data-slot":"close-button-icon"})})},_m=Object.assign(gl,{Root:gl}),Bm=s.createContext(null),Vm=s.createContext(null);function zm(t,e,n){let{validationBehavior:r,focus:o}=t;J(()=>{if(r==="native"&&(n!=null&&n.current)&&!n.current.disabled){let u=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(u),n.current.hasAttribute("title")||(n.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(Gm(n.current))}});let i=s.useRef(!1),l=Pe(()=>{i.current||e.resetValidation()}),a=Pe(u=>{var f,m;e.displayValidation.isInvalid||e.commitValidation();let d=(f=n==null?void 0:n.current)==null?void 0:f.form;!u.defaultPrevented&&n&&d&&Um(d)===n.current&&(o?o():(m=n.current)==null||m.focus(),Gr("keyboard")),u.preventDefault()}),c=Pe(()=>{e.commitValidation()});s.useEffect(()=>{let u=n==null?void 0:n.current;if(!u)return;let d=u.form,f=d==null?void 0:d.reset;return d&&(d.reset=()=>{i.current=!window.event||window.event.type==="message"&&F(window.event)instanceof MessagePort,f==null||f.call(d),i.current=!1}),u.addEventListener("invalid",a),u.addEventListener("change",c),d==null||d.addEventListener("reset",l),()=>{u.removeEventListener("invalid",a),u.removeEventListener("change",c),d==null||d.removeEventListener("reset",l),d&&(d.reset=f)}},[n,r])}function Hm(t){let e=t.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function Gm(t){return{isInvalid:!t.validity.valid,validationDetails:Hm(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function Um(t){var e;for(let n=0;n<t.elements.length;n++){let r=t.elements[n];if(((e=r.validity)==null?void 0:e.valid)===!1)return r}return null}function Wm(t,e){let{elementType:n="a",onPress:r,onPressStart:o,onPressEnd:i,onClick:l,isDisabled:a,...c}=t,u={};n!=="a"&&(u={role:"link",tabIndex:a?void 0:0});let{focusableProps:d}=tn(t,e),{pressProps:f,isPressed:m}=Xe({onPress:r,onPressStart:o,onPressEnd:i,onClick:l,isDisabled:a,ref:e}),h=ae(c,{labelable:!0}),g=Y(d,f),y=Jt(),v=Gl(t);return{isPressed:m,linkProps:Y(h,v,{...g,...u,"aria-disabled":a||void 0,"aria-current":t["aria-current"],onClick:w=>{var x;(x=f.onClick)==null||x.call(f,w),Ul(w,y,t.href,t.routerOptions)}})}}const qm=s.createContext(null),Ym=s.forwardRef(function(e,n){[e,n]=Me(e,n,qm);let r=e.href&&!e.isDisabled?"a":"span",{linkProps:o,isPressed:i}=Wm({...e,elementType:r},n),l=he[r],{hoverProps:a,isHovered:c}=nn(e),{focusProps:u,isFocused:d,isFocusVisible:f}=Ro(),m=Te({...e,defaultClassName:"react-aria-Link",values:{isCurrent:!!e["aria-current"],isDisabled:e.isDisabled||!1,isPressed:i,isHovered:c,isFocused:d,isFocusVisible:f}}),h=ae(e,{global:!0});return delete h.onClick,s.createElement(l,{ref:n,slot:e.slot||void 0,...Y(h,m,o,a,u),"data-focused":d||void 0,"data-hovered":c||void 0,"data-pressed":i||void 0,"data-focus-visible":f||void 0,"data-current":!!e["aria-current"]||void 0,"data-disabled":e.isDisabled||void 0},m.children)}),Nc=s.createContext({}),yl=({children:t,className:e,...n})=>{const r=s.useMemo(()=>Df(),[]);return p.jsx(Nc,{value:{slots:r},children:p.jsx(Ym,{...n,className:Ee(e,r==null?void 0:r.base()),children:o=>p.jsx(p.Fragment,{children:typeof t=="function"?t(o):t})})})},Xm=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(Nc);return p.jsx(oe.span,{className:ie(r==null?void 0:r.icon,e),"data-default-icon":wp(!t),"data-slot":"link-icon",...n,children:t??p.jsx(Sp,{"data-slot":"link-default-icon"})})},Fo=Object.assign(yl,{Root:yl,Icon:Xm});function Zm(t={}){let{isReadOnly:e}=t,[n,r]=Zn(t.isSelected,t.defaultSelected||!1,t.onChange),[o]=s.useState(n);function i(a){e||r(a)}function l(){e||r(!n)}return{isSelected:n,defaultSelected:t.defaultSelected??o,setSelected:i,toggle:l}}const Jm=s.createContext({}),Qm="__button_group_child",vl=({children:t,className:e,fullWidth:n,isDisabled:r,isIconOnly:o,size:i,slot:l,style:a,variant:c,[Qm]:u,...d})=>{const f=s.useContext(Jm),m=u===!0,h=i??(m?f==null?void 0:f.size:void 0),g=c??(m?f==null?void 0:f.variant:void 0),y=r??(m?f==null?void 0:f.isDisabled:void 0),v=n??(m?f==null?void 0:f.fullWidth:void 0),w=qe({fullWidth:v,isIconOnly:o,size:h,variant:g});return p.jsx(Do,{className:Ee(e,w),"data-slot":"button",isDisabled:y,slot:l,style:a,...d,children:x=>typeof t=="function"?t(x):t})},eb=Object.assign(vl,{Root:vl}),Pt=s.createContext({}),xl=({children:t,className:e,variant:n="default",...r})=>{const o=s.useMemo(()=>Pf({variant:n}),[n]),i=p.jsx(oe.div,{className:o.base({className:e}),"data-slot":"card",...r,children:t});return p.jsx(Pt,{value:{slots:o},children:n==="transparent"?i:p.jsx(Jn,{value:{variant:n},children:i})})},tb=({className:t,...e})=>{const{slots:n}=s.useContext(Pt);return p.jsx(oe.div,{className:ie(n==null?void 0:n.header,t),"data-slot":"card-header",...e})},nb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(Pt);return p.jsx(oe.h3,{className:ie(r==null?void 0:r.title,e),"data-slot":"card-title",...n,children:t})},rb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(Pt);return p.jsx(oe.p,{className:ie(r==null?void 0:r.description,e),"data-slot":"card-description",...n,children:t})},ob=({className:t,...e})=>{const{slots:n}=s.useContext(Pt);return p.jsx(oe.div,{className:ie(n==null?void 0:n.content,t),"data-slot":"card-content",...e})},ib=({className:t,...e})=>{const{slots:n}=s.useContext(Pt);return p.jsx(oe.div,{className:ie(n==null?void 0:n.footer,t),"data-slot":"card-footer",...e})},Ft=Object.assign(xl,{Root:xl,Header:tb,Title:nb,Description:rb,Content:ob,Footer:ib}),lb=new WeakMap;function sb(t=!0){let[e,n]=s.useState(t),r=s.useRef(!1),o=s.useCallback(i=>{r.current=!0,n(!!i)},[]);return J(()=>{r.current||n(!1)},[]),[o,e]}function $l(t=!0){let e=pe(),[n,r]=sb(t);return{id:r?e:void 0,ref:n}}const Lc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Kc={...Lc,customError:!0,valid:!1},mt={isInvalid:!1,validationDetails:Lc,validationErrors:[]},ab=s.createContext({}),Bn="__reactAriaFormValidationState";function Ac(t){if(t[Bn]){let{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}=t[Bn];return{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}}return cb(t)}function cb(t){let{isInvalid:e,validationState:n,name:r,value:o,builtinValidation:i,validate:l,validationBehavior:a="aria"}=t;n&&(e||(e=n==="invalid"));let c=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:Kc}:null,u=s.useMemo(()=>{if(!l||o==null)return null;let C=ub(l,o);return wl(C)},[l,o]);i!=null&&i.validationDetails.valid&&(i=void 0);let d=s.useContext(ab),f=s.useMemo(()=>r?Array.isArray(r)?r.flatMap(C=>so(d[C])):so(d[r]):[],[d,r]),[m,h]=s.useState(d),[g,y]=s.useState(!1);d!==m&&(h(d),y(!1));let v=s.useMemo(()=>wl(g?[]:f),[g,f]),w=s.useRef(mt),[x,M]=s.useState(mt),R=s.useRef(mt),L=()=>{if(!j)return;E(!1);let C=u||i||w.current;Ir(C,R.current)||(R.current=C,M(C))},[j,E]=s.useState(!1);return s.useEffect(L),{realtimeValidation:c||v||u||i||mt,displayValidation:a==="native"?c||v||x:c||v||u||i||x,updateValidation(C){a==="aria"&&!Ir(x,C)?M(C):w.current=C},resetValidation(){let C=mt;Ir(C,R.current)||(R.current=C,M(C)),a==="native"&&E(!1),y(!0)},commitValidation(){a==="native"&&E(!0),y(!0)}}}function so(t){return t?Array.isArray(t)?t:[t]:[]}function ub(t,e){if(typeof t=="function"){let n=t(e);if(n&&typeof n!="boolean")return so(n)}return[]}function wl(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:Kc}:null}function Ir(t,e){return t===e?!0:!!t&&!!e&&t.isInvalid===e.isInvalid&&t.validationErrors.length===e.validationErrors.length&&t.validationErrors.every((n,r)=>n===e.validationErrors[r])&&Object.entries(t.validationDetails).every(([n,r])=>e.validationDetails[n]===r)}function db(t,e,n){let{isDisabled:r=!1,isReadOnly:o=!1,value:i,name:l,form:a,children:c,isRequired:u,validationBehavior:d="aria","aria-label":f,"aria-labelledby":m,"aria-describedby":h,onPressStart:g,onPressEnd:y,onPressChange:v,onPress:w,onPressUp:x,onClick:M}=t,R=Ac({...t,value:e.isSelected}),{isInvalid:L,validationErrors:j,validationDetails:E}=R.displayValidation;zm(t,R,n);let S=A=>{A.stopPropagation(),e.setSelected(F(A).checked)},I=c!=null,C=f!=null||m!=null;!I&&!C&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:K,isPressed:_}=Xe({onPressStart:g,onPressEnd:y,onPressChange:v,onPress:w,onPressUp:x,onClick:M,isDisabled:r}),[O,b]=s.useState(!1),{pressProps:P}=Xe({onPressStart(A){if(A.pointerType==="keyboard"||A.pointerType==="virtual"){A.continuePropagation();return}g==null||g(A),v==null||v(!0),b(!0)},onPressEnd(A){if(A.pointerType==="keyboard"||A.pointerType==="virtual"){A.continuePropagation();return}y==null||y(A),v==null||v(!1),b(!1)},onPressUp(A){if(A.pointerType==="keyboard"||A.pointerType==="virtual"){A.continuePropagation();return}x==null||x(A)},onClick:M,onPress(A){var q;if(A.pointerType==="keyboard"||A.pointerType==="virtual"){A.continuePropagation();return}w==null||w(A),e.toggle(),(q=n.current)==null||q.focus();let{[Bn]:G}=t,{commitValidation:W}=G||R;W()},isDisabled:r||o}),{focusableProps:N}=tn(t,n),k=Y(K,N),D=ae(t,{labelable:!0});xd(n,e.defaultSelected,e.setSelected);let $=$l(),T=$l();return{labelProps:Y(P,{onClick:A=>A.preventDefault()}),inputProps:Y(D,{checked:e.isSelected,"aria-required":u&&d==="aria"||void 0,required:u&&d==="native","aria-invalid":L||t.validationState==="invalid"||void 0,"aria-errormessage":t["aria-errormessage"],"aria-controls":t["aria-controls"],"aria-readonly":o||void 0,"aria-describedby":[$.id,T.id,h].filter(Boolean).join(" ")||void 0,onChange:S,disabled:r,...i==null?{}:{value:i},name:l,form:a,type:"checkbox",...k}),descriptionProps:$,errorMessageProps:T,isSelected:e.isSelected,isPressed:_||O,isDisabled:r,isReadOnly:o,isInvalid:L||t.validationState==="invalid",validationErrors:j,validationDetails:E}}function Oc(t,e,n){let{labelProps:r,inputProps:o,descriptionProps:i,errorMessageProps:l,isSelected:a,isPressed:c,isDisabled:u,isReadOnly:d,isInvalid:f,validationErrors:m,validationDetails:h}=db(t,e,n),{isIndeterminate:g}=t;return s.useEffect(()=>{n.current&&(n.current.indeterminate=!!g)}),{labelProps:Y(r,s.useMemo(()=>({onMouseDown:y=>y.preventDefault()}),[])),inputProps:o,descriptionProps:i,errorMessageProps:l,isSelected:a,isPressed:c,isDisabled:u,isReadOnly:d,isInvalid:f,validationErrors:m,validationDetails:h}}const fb=typeof document<"u"?s.useInsertionEffect??s.useLayoutEffect:()=>{};function pb(t,e,n){let[r,o]=s.useState(t||e),i=s.useRef(r),l=s.useRef(t!==void 0),a=t!==void 0;s.useEffect(()=>{let f=l.current;f!==a&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),l.current=a},[a]);let c=a?t:r;fb(()=>{i.current=c});let[,u]=s.useReducer(()=>({}),{}),d=s.useCallback((f,...m)=>{let h=typeof f=="function"?f(i.current):f;Object.is(i.current,h)||(i.current=h,o(h),u(),n==null||n(h,...m))},[n]);return[c,d]}function hb(t={}){let{isReadOnly:e}=t,[n,r]=pb(t.isSelected,t.defaultSelected||!1,t.onChange),[o]=s.useState(n);function i(a){e||r(a)}function l(){e||r(!n)}return{isSelected:n,defaultSelected:t.defaultSelected??o,setSelected:i,toggle:l}}function mb(t,e,n){const r=hb({isReadOnly:t.isReadOnly||e.isReadOnly,isSelected:e.isSelected(t.value),defaultSelected:e.defaultValue.includes(t.value),onChange(y){y?e.addValue(t.value):e.removeValue(t.value),t.onChange&&t.onChange(y)}});let{name:o,form:i,descriptionId:l,errorMessageId:a,validationBehavior:c}=lb.get(e);c=t.validationBehavior??c;let{realtimeValidation:u}=Ac({...t,value:r.isSelected,name:void 0,validationBehavior:"aria"}),d=s.useRef(mt),f=()=>{e.setInvalid(t.value,u.isInvalid?u:d.current)};s.useEffect(f);let m=e.realtimeValidation.isInvalid?e.realtimeValidation:u,h=c==="native"?e.displayValidation:m,g=Oc({...t,isReadOnly:t.isReadOnly||e.isReadOnly,isDisabled:t.isDisabled||e.isDisabled,name:t.name||o,form:t.form||i,isRequired:t.isRequired??e.isRequired,validationBehavior:c,[Bn]:{realtimeValidation:m,displayValidation:h,resetValidation:e.resetValidation,commitValidation:e.commitValidation,updateValidation(y){d.current=y,f()}}},r,n);return{...g,inputProps:{...g.inputProps,"aria-describedby":[g.inputProps["aria-describedby"],e.isInvalid?a:null,l].filter(Boolean).join(" ")||void 0}}}const bb=s.createContext(null),Fc=s.createContext(null),jc=s.createContext(null),gb=s.forwardRef(function(e,n){let{inputRef:r=null,...o}=e;[e,n]=Me(o,n,bb);let i=s.useContext(Fc),[l,a]=yb(e,r),{descriptionProps:c,errorMessageProps:u,isSelected:d,isDisabled:f,isReadOnly:m,isInvalid:h,validationDetails:g,validationErrors:y}=l,v=Te({...e,defaultClassName:"react-aria-CheckboxField",values:{isSelected:d,isIndeterminate:e.isIndeterminate||!1,isDisabled:f,isReadOnly:m,isInvalid:h,isRequired:e.isRequired||!1}}),w=ae(e,{global:!0});return delete w.id,delete w.onClick,s.createElement(he.div,{...Y(w,v),ref:n,slot:e.slot||void 0,"data-selected":d||void 0,"data-indeterminate":e.isIndeterminate||void 0,"data-disabled":f||void 0,"data-readonly":m||void 0,"data-invalid":h||void 0,"data-required":e.isRequired||void 0},s.createElement(ze,{values:[[jc,{...l,inputRef:a,defaultClassName:"react-aria-CheckboxButton",isIndeterminate:e.isIndeterminate,isRequired:e.isRequired}],[Va,{slots:{description:c,errorMessage:u}}],[Bm,i?null:{isInvalid:h,validationDetails:g,validationErrors:y}]]},v.children))});function yb(t,e){let{validationBehavior:n}=en(Vm)||{},r=t.validationBehavior??n??"native",o=s.useContext(Fc),i=Je(s.useMemo(()=>ct(e,t.inputRef!==void 0?t.inputRef:null),[e,t.inputRef])),l={...Of(t),children:typeof t.children=="function"?!0:t.children,value:t.value,validationBehavior:r};return[o?mb(l,o,i):Oc(l,Zm(t),i),i]}const vb=s.forwardRef(function(e,n){let{labelProps:r,inputProps:o,isSelected:i,isDisabled:l,isReadOnly:a,isPressed:c,isInvalid:u,inputRef:d,defaultClassName:f,isIndeterminate:m,isRequired:h}=s.useContext(jc),{isFocused:g,isFocusVisible:y,focusProps:v}=Ro(),w=l||a,{hoverProps:x,isHovered:M}=nn({...e,isDisabled:w}),R=Te({...e,defaultClassName:f,values:{isSelected:i,isIndeterminate:m||!1,isPressed:c,isHovered:M,isFocused:g,isFocusVisible:y,isDisabled:l,isReadOnly:a,isInvalid:u,isRequired:h||!1}}),L=ae(e,{global:!0});return delete L.id,delete L.onClick,s.createElement(he.label,{...Y(L,r,x,R),ref:n,slot:e.slot||void 0,"data-selected":i||void 0,"data-indeterminate":m||void 0,"data-pressed":c||void 0,"data-hovered":M||void 0,"data-focused":g||void 0,"data-focus-visible":y||void 0,"data-disabled":l||void 0,"data-readonly":a||void 0,"data-invalid":u||void 0,"data-required":h||void 0},s.createElement(ka,{elementType:"span"},s.createElement("input",{...Y(o,v),ref:d})),R.children)}),xb=s.createContext({}),ir=s.createContext({}),ao=({children:t,className:e,variant:n,...r})=>{const o=s.useContext(xb),i=n??o.variant,l=s.useMemo(()=>kf({variant:i}),[i]);return p.jsx(gb,{"data-slot":"checkbox",...r,className:Ee(e,l.base()),children:a=>p.jsx(ir,{value:{slots:l,state:a},children:typeof t=="function"?t(a):t})})};ao.displayName="HeroUI.Checkbox";const _c=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(ir);return p.jsx(vb,{"data-slot":"checkbox-content",...n,className:Ee(e,r==null?void 0:r.content()),children:t})};_c.displayName="HeroUI.Checkbox.Content";const Bc=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(ir);return p.jsx(oe.span,{className:ie(r==null?void 0:r.control,e),"data-slot":"checkbox-control",...n,children:t})};Bc.displayName="HeroUI.Checkbox.Control";const Vc=({children:t,className:e,...n})=>{const{slots:r,state:o}=s.useContext(ir),i=o==null?void 0:o.isSelected,l=o==null?void 0:o.isIndeterminate,a=typeof t=="function"?t(o??{}):t||(l?p.jsx("svg",{"aria-hidden":"true","data-slot":"checkbox-default-indicator--indeterminate",fill:"none",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeWidth:3,viewBox:"0 0 24 24",children:p.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})}):p.jsx("svg",{"aria-hidden":"true","data-slot":"checkbox-default-indicator--checkmark",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:i?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 17 18",children:p.jsx("polyline",{points:"1 9 7 14 15 4"})}));return p.jsx(oe.span,{"aria-hidden":"true",className:ie(r==null?void 0:r.indicator,e),"data-slot":"checkbox-indicator",...n,children:a})};Vc.displayName="HeroUI.Checkbox.Indicator";const yn=Object.assign(ao,{Root:ao,Content:_c,Control:Bc,Indicator:Vc}),zc=s.createContext({}),El=({children:t,className:e,color:n,size:r,variant:o,...i})=>{const l=s.useMemo(()=>Tf({color:n,size:r,variant:o}),[n,r,o]),a=s.useMemo(()=>typeof t=="string"||typeof t=="number"?p.jsx(Hc,{children:t}):t,[t]);return p.jsx(zc,{value:{slots:l},children:p.jsx(oe.span,{...i,className:ie(l.base,e),"data-slot":"chip",children:a})})},Hc=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(zc);return p.jsx(oe.span,{className:ie(r==null?void 0:r.label,e),"data-slot":"chip-label",...n,children:t})},Vn=Object.assign(El,{Root:El,Label:Hc}),lr=s.createContext({}),co=({children:t,className:e,color:n,size:r,...o})=>{const i=s.useMemo(()=>If({color:n,size:r}),[n,r]);return p.jsx(ep,{"data-slot":"progress-bar",...o,className:Ee(e,i.base()),children:l=>p.jsx(lr,{value:{slots:i,state:l},children:typeof t=="function"?t(l):t})})};co.displayName="HeroUI.ProgressBar";const Gc=({children:t,className:e,...n})=>{const{slots:r,state:o}=s.useContext(lr);return p.jsx(oe.span,{className:ie(r==null?void 0:r.output,e),"data-slot":"progress-bar-output",...n,children:t??(o==null?void 0:o.valueText)})};Gc.displayName="HeroUI.ProgressBar.Output";const Uc=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(lr);return p.jsx(oe.div,{className:ie(r==null?void 0:r.track,e),"data-slot":"progress-bar-track",...n,children:t})};Uc.displayName="HeroUI.ProgressBar.Track";const Wc=({className:t,style:e,...n})=>{const{slots:r,state:o}=s.useContext(lr);return p.jsx(oe.div,{className:ie(r==null?void 0:r.fill,t),"data-slot":"progress-bar-fill",style:{...e,width:o!=null&&o.isIndeterminate?void 0:`${(o==null?void 0:o.percentage)??0}%`},...n})};Wc.displayName="HeroUI.ProgressBar.Fill";const vn=Object.assign(co,{Root:co,Output:Gc,Track:Uc,Fill:Wc}),Sl=({className:t,orientation:e,variant:n,...r})=>{const o=en(Lo),i=e??(o==null?void 0:o.orientation)??"horizontal";return p.jsx(Hh,{"data-orientation":i,"data-slot":"separator",orientation:i,className:Kf({orientation:i,variant:n,className:t}),...r})},$b=Object.assign(Sl,{Root:Sl}),rn=s.createContext({}),Cl=({children:t,className:e,status:n,...r})=>{const o=s.useMemo(()=>Cf({status:n}),[n]);return p.jsx(rn,{value:{slots:o,status:n},children:p.jsx(Jn,{value:{variant:"default"},children:p.jsx(oe.div,{className:o==null?void 0:o.base({className:e}),"data-slot":"alert-root",...r,children:t})})})},wb=({children:t,className:e,...n})=>{const{slots:r,status:o}=s.useContext(rn),i=()=>{switch(o){case"accent":return p.jsx(Ai,{"data-slot":"alert-default-icon"});case"success":return p.jsx(Tp,{"data-slot":"alert-default-icon"});case"warning":return p.jsx(Pp,{"data-slot":"alert-default-icon"});case"danger":return p.jsx(kp,{"data-slot":"alert-default-icon"});default:return p.jsx(Ai,{"data-slot":"alert-default-icon"})}};return p.jsx(oe.div,{className:ie(r==null?void 0:r.indicator,e),"data-slot":"alert-indicator",...n,children:t??i()})},Eb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(rn);return p.jsx(oe.div,{className:ie(r==null?void 0:r.content,e),"data-slot":"alert-content",...n,children:t})},Sb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(rn);return p.jsx(oe.p,{className:ie(r==null?void 0:r.title,e),"data-slot":"alert-title",...n,children:t})},Cb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(rn);return p.jsx(oe.span,{className:ie(r==null?void 0:r.description,e),"data-slot":"alert-description",...n,children:t})},Dt=Object.assign(Cl,{Root:Cl,Indicator:wb,Content:Eb,Title:Sb,Description:Cb}),jo=s.createContext({}),Pb=({children:t,className:e,variant:n,...r})=>{const o=s.useMemo(()=>Nf({variant:n}),[n]);return p.jsx(Rm,{className:Ee(e,o.item()),"data-slot":"menu-item",...r,children:i=>p.jsx(jo,{value:{slots:o,state:i},children:typeof t=="function"?t(i):t})})},kb=({children:t,className:e,type:n="checkmark",...r})=>{const{slots:o,state:i}=s.useContext(jo),l=i==null?void 0:i.isSelected,a=typeof t=="function"?t(i??{}):t||(n==="dot"?p.jsx("svg",{"aria-hidden":"true","data-slot":"menu-item-indicator--dot",fill:"currentColor",fillRule:"evenodd",role:"presentation",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{clipRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14",fillRule:"evenodd"})}):p.jsx("svg",{"aria-hidden":"true","data-slot":"menu-item-indicator--checkmark",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:l?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 17 18",children:p.jsx("polyline",{points:"1 9 7 14 15 4"})}));return p.jsx(oe.span,{"aria-hidden":"true",className:ie(o==null?void 0:o.indicator,e),"data-slot":"menu-item-indicator","data-type":n,"data-visible":l||void 0,...r,children:a})},Tb=({children:t,className:e,...n})=>{const{slots:r,state:o}=s.useContext(jo);if(!(o==null?void 0:o.hasSubmenu))return null;const a=t??p.jsx(Ep,{});return p.jsx(oe.span,{"aria-hidden":"true",className:ie(r==null?void 0:r.submenuIndicator,e),"data-slot":"submenu-indicator",...n,children:a})},Mb=({children:t,className:e,...n})=>{const r=s.useMemo(()=>Lf({class:typeof e=="string"?e:void 0}),[e]);return p.jsx(Mm,{className:r,...n,children:t})},sr=s.createContext({}),Pl=({children:t,...e})=>{const n=s.useMemo(()=>Rf(),[]);return p.jsx(sr,{value:{slots:n},children:p.jsx(Sm,{...e,children:t})})},Rb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(sr);return p.jsx(Do,{className:Ee(e,r==null?void 0:r.trigger()),"data-slot":"dropdown-trigger",...n,children:o=>p.jsx(p.Fragment,{children:typeof t=="function"?t(o):t})})},Db=({children:t,className:e,placement:n,...r})=>{const{slots:o}=s.useContext(sr);return p.jsx(Jn,{value:{variant:"default"},children:p.jsx(hh,{...r,className:Ee(e,o==null?void 0:o.popover()),"data-slot":"dropdown-popover",placement:n,children:t})})};function Ib({className:t,...e}){const{slots:n}=s.useContext(sr);return p.jsx(Pm,{className:Ee(t,n==null?void 0:n.menu()),"data-selection-mode":e.selectionMode,"data-slot":"dropdown-menu",...e})}const Nb=t=>p.jsx(Pb,{...t}),Lb=t=>p.jsx(Tb,{...t}),Kb=({children:t,...e})=>p.jsx(Cm,{"data-slot":"dropdown-submenu-trigger",...e,children:t}),Ab=t=>p.jsx(kb,{...t}),Ob=t=>p.jsx(Mb,{...t}),It=Object.assign(Pl,{Root:Pl,Trigger:Rb,Popover:Db,Menu:Ib,Section:Ob,Item:Nb,ItemIndicator:Ab,SubmenuIndicator:Lb,SubmenuTrigger:Kb}),we=s.createContext({}),kl=({children:t,state:e,...n})=>{const r=s.useMemo(()=>({slots:Po(),placement:void 0}),[]),o=s.useMemo(()=>e?{isOpen:e.isOpen,onOpenChange:e.setOpen}:{},[e]);return p.jsx(we,{value:r,children:p.jsx(Im,{"data-slot":"modal-root",...Y(n,o),children:t})})},Fb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(we);return p.jsx(jm,{children:p.jsx(oe.div,{className:ie(r==null?void 0:r.trigger,e),"data-slot":"modal-trigger",role:"button",...n,children:t})})},jb=({children:t,className:e,isDismissable:n=!0,onClick:r,variant:o,...i})=>{const{slots:l}=s.useContext(we),a=s.useMemo(()=>Po({variant:o}),[o]),c=s.useMemo(()=>({slots:{...l,...a}}),[l,a]);return p.jsx(Ic,{className:Ee(e,a==null?void 0:a.backdrop()),"data-slot":"modal-backdrop",isDismissable:n,onClick:u=>{u.stopPropagation(),r==null||r(u)},...i,children:u=>p.jsxs(we,{value:c,children:[typeof t=="function"?t(u):t," "]})})},_b=({children:t,className:e,placement:n="auto",scroll:r,size:o,...i})=>{const{slots:l}=s.useContext(we),a=s.useMemo(()=>Po({scroll:r,size:o}),[r,o]),c=s.useMemo(()=>({placement:n,slots:{...l,...a}}),[l,n,a]);return p.jsx(Am,{className:Ee(e,a==null?void 0:a.container()),"data-placement":n,"data-slot":"modal-container",...i,children:u=>p.jsx(we,{value:c,children:typeof t=="function"?t(u):t})})},Bb=({children:t,className:e,...n})=>{const{placement:r,slots:o}=s.useContext(we);return p.jsx(Jn,{value:{variant:"default"},children:p.jsx(Nm,{className:ie(o==null?void 0:o.dialog,e),"data-placement":r,"data-slot":"modal-dialog",...n,children:t})})},Vb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(we);return p.jsx(oe.div,{className:ie(r==null?void 0:r.header,e),"data-slot":"modal-header",...n,children:t})},zb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(we);return p.jsx(oe.div,{className:ie(r==null?void 0:r.body,e),"data-slot":"modal-body",...n,children:t})},Hb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(we);return p.jsx(oe.div,{className:ie(r==null?void 0:r.footer,e),"data-slot":"modal-footer",...n,children:t})},Gb=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(we);return p.jsx($p,{className:ie(r==null?void 0:r.heading,e),"data-slot":"modal-heading",slot:"title",...n,children:t})},Ub=({children:t,className:e,...n})=>{const{slots:r}=s.useContext(we);return p.jsx(oe.div,{className:ie(r==null?void 0:r.icon,e),"data-slot":"modal-icon",...n,children:t})},Wb=({className:t,...e})=>{const{slots:n}=s.useContext(we);return p.jsx(_m,{className:Ee(t,n==null?void 0:n.closeTrigger()),"data-slot":"modal-close-trigger",slot:"close",...e})},pt=Object.assign(kl,{Root:kl,Trigger:Fb,Backdrop:jb,Container:_b,Dialog:Bb,Header:Vb,Icon:Ub,Heading:Gb,Body:zb,Footer:Hb,CloseTrigger:Wb}),qb=(t={})=>{const{defaultOpen:e=!1,isOpen:n,onOpenChange:r}=t,[o,i]=s.useState(e),l=n!==void 0,a=l?n:o,c=s.useRef(r);s.useEffect(()=>{c.current=r},[r]);const u=s.useCallback(h=>{var g;(g=c.current)==null||g.call(c,h),l||i(h)},[l]),d=s.useCallback(()=>{u(!0)},[u]),f=s.useCallback(()=>{u(!1)},[u]),m=s.useCallback(()=>{u(!a)},[u,a]);return{close:f,isOpen:a,open:d,setOpen:u,toggle:m}},Yb={easy:"GREEN",moderate:"ORANGE",difficult:"RED"},Xb={easy:"Easy",moderate:"Moderate",difficult:"Difficult"};function Zb(){return p.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-[1em]",children:[p.jsx("path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),p.jsx("path",{d:"m13.4 10.6 3.6-3.6"}),p.jsx("path",{d:"M3.3 16a9 9 0 1 1 17.4 0"})]})}function qc({difficulty:t,label:e,showIcon:n=!0,size:r="md",className:o}){const i=je[Yb[t]];return p.jsxs(Vn,{variant:"soft",size:r,className:U(o),style:{backgroundColor:ot(i,.15),color:i},children:[n&&p.jsx(Zb,{}),p.jsx(Vn.Label,{children:e??Xb[t]})]})}const Tl=p.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0ZM12 9v4M12 17h.01"}),Ml=p.jsxs(p.Fragment,{children:[p.jsx("circle",{cx:"12",cy:"12",r:"9"}),p.jsx("path",{d:"M12 16v-4M12 8h.01"})]}),Jb=p.jsxs(p.Fragment,{children:[p.jsx("circle",{cx:"12",cy:"12",r:"9"}),p.jsx("path",{d:"m8.5 12 2.5 2.5 4.5-5"})]}),Qb={note:Ml,info:Ml,tip:Jb,caution:Tl,danger:Tl};function eg({type:t}){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5",children:Qb[t]})}function tg({type:t="caution",title:e,icon:n,children:r,className:o}){const i=e===void 0?Pn[t]:e,l=Bl(t);return p.jsxs(Dt,{className:U("border",o),style:{backgroundColor:ot(l,.1),borderColor:l},children:[p.jsx(Dt.Indicator,{style:{color:l},children:n??p.jsx(eg,{type:t})}),p.jsxs(Dt.Content,{children:[i!=null&&p.jsx(Dt.Title,{children:i}),p.jsx(Dt.Description,{children:r})]})]})}const Yc="media-figure-point-marker absolute flex -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full font-semibold shadow ring-2 ring-background",zn="media-figure-shape-outline";function ng(t){return t.type==="circle"}function rg(t){return t.type==="rectangle"}function og(t,e){const n=t.id??e,r=t.color??"GREY",o=je[r];if(ng(t))return p.jsx("div",{role:"img","aria-label":t.title,className:U("pointer-events-none absolute rounded-full",zn),style:{left:`${t.x}%`,top:`${t.y}%`,width:`${t.radius*2}%`,aspectRatio:"1",transform:"translate(-50%, -50%)",borderColor:o,backgroundColor:ot(o,.1)}},n);if(rg(t)){const i=Math.min(t.x1,t.x2),l=Math.min(t.y1,t.y2),a=Math.abs(t.x2-t.x1),c=Math.abs(t.y2-t.y1);return p.jsx("div",{role:"img","aria-label":t.title,className:U("pointer-events-none absolute",zn),style:{left:`${i}%`,top:`${l}%`,width:`${a}%`,height:`${c}%`,borderColor:o,backgroundColor:ot(o,.1)}},n)}return p.jsx("span",{role:"img","aria-label":t.title,style:{left:`${t.x}%`,top:`${t.y}%`,backgroundColor:o,color:Wn(o)},className:Yc,children:t.label},n)}function uo({annotations:t}){return p.jsx(p.Fragment,{children:t.map(og)})}const Hn=4/3,_o=16,Nr=t=>Math.round(t*100)/100,Lr=(t,e,n)=>Math.min(Math.max(t,e),n);function Bo(t){return Math.round(t*3/4)}function wt(t,e,n){if(e<=0||n<=0)return 0;const r=t/100*e;return Bo(r)/n*100}function ig(t){return t<=0?0:_o/t*100}function lg(t,e){return t<=0||e<=0?0:Math.min(t,Math.floor(e*Hn))/t*100}function Xc(t){return t.width>100||t.x>100||t.y>100}function Zc(t,e,n){return e<=0||n<=0?{x:0,y:0,width:0}:kt({x:t.x/e*100,y:t.y/n*100,width:t.width/e*100},e,n)}function sg(t,e,n){return{x:t.x/100*e,y:t.y/100*n,width:t.width/100*e}}function Vo(t,e,n){return Xc(t)?Zc(t,e,n):kt(t,e,n)}function kt(t,e,n){const r=lg(e,n),o=Math.min(ig(e),r),i=Lr(t.width,o,r),l=wt(i,e,n);return{width:Nr(i),x:Nr(Lr(t.x,0,100-i)),y:Nr(Lr(t.y,0,100-l))}}function Jc(t,e){const r=t/e<=Hn?t:Math.round(e*Hn),o=Bo(r);return kt({x:(t-r)/2/t*100,y:(e-o)/2/e*100,width:r/t*100},t,e)}function ag(t,e,n){const{x:r,y:o,width:i}=t;if(i<=0||r<0||o<0||i>100)return!1;const l=wt(i,e,n);return r+i<=100.0001&&o+l<=100.0001}function cg(t,e,n,r,o){if(r<=0||o<=0||e<=0||n<=0)return null;const i=Vo(t,e,n);if(!ag(i,e,n))return null;const l=i.width/100*e,a=i.x/100*e,c=i.y/100*n,u=r/l;return{position:"absolute",width:u*e,height:u*n,left:-a*u,top:-c*u,maxWidth:"none"}}function ug(t,e){t(),requestAnimationFrame(()=>{t(),requestAnimationFrame(t)});const n=[];for(let r=50;r<=e;r+=50)n.push(setTimeout(t,r));return()=>{for(const r of n)clearTimeout(r)}}function Qc(t={}){const{settleMs:e=0,observeParent:n=!1,remeasureWhenVisible:r=!1,layoutSettleKey:o}=t,i=s.useRef(null),[l,a]=s.useState(null),c=s.useCallback(()=>{const d=i.current;if(!d)return;const{width:f,height:m}=d.getBoundingClientRect();f<=0||m<=0||a(h=>(h==null?void 0:h.width)===f&&(h==null?void 0:h.height)===m?h:{width:f,height:m})},[]),u=s.useCallback(()=>{c(),requestAnimationFrame(()=>{c(),requestAnimationFrame(()=>{c(),setTimeout(c,0)})})},[c]);return s.useLayoutEffect(()=>{c();const d=i.current;if(!d)return;const f=new ResizeObserver(()=>c());f.observe(d),n&&d.parentElement&&f.observe(d.parentElement);const m=[];let h=d;for(let y=0;h&&y<6;y+=1)m.push(h),h=h.parentElement;const g=()=>u();for(const y of m)y.addEventListener("transitionend",g);return()=>{f.disconnect();for(const y of m)y.removeEventListener("transitionend",g)}},[c,u,n]),s.useEffect(()=>{if(!(e<=0))return ug(c,e)},[o,c,e]),s.useEffect(()=>{if(!r)return;const d=i.current;if(!d)return;const f=new IntersectionObserver(m=>{for(const h of m)h.isIntersecting&&h.intersectionRatio>=.99&&u()},{threshold:[0,.25,.5,.75,.99,1]});return f.observe(d),()=>f.disconnect()},[o,u,r]),s.useEffect(()=>{o!==void 0&&u()},[o,u]),{ref:i,size:l,measure:c,measureAfterLayout:u}}const eu=s.createContext(null);function dg({manifest:t=null,children:e}){return p.jsx(eu.Provider,{value:t,children:e})}function zo(){return s.useContext(eu)}const fg=[240,480,800,1600],fo="avif",Gn="thumbnails",tu="variants.json",pg=`images/${Gn}/${tu}`,hg={thumb:"120px",catalog:"(max-width: 640px) 100vw, 480px",display:"(max-width: 640px) 100vw, 50vw",hero:"8rem"},mg={thumb:240,catalog:480,display:800,hero:240};function nu(t){var e;try{const n=t.includes("://")?new URL(t).pathname:t,r=((e=n.split("?")[0])==null?void 0:e.split("#")[0])??n,o=r.split("/");return o[o.length-1]??r}catch{const n=t.split("/");return n[n.length-1]??t}}function po(t,e){const n=/^(.*?\/)?([^/]+?)(\.[^./?#]+)([?#].*)?$/.exec(t);if(!n)return`${Gn}/${t}.w${e}.${fo}`;const[,r="",o,,i=""]=n;return`${r}${Gn}/${o}.w${e}.${fo}${i}`}function ru(t,e){if(!e)return null;const n=e.images[nu(t)];return n!=null&&n.variants.length?n.variants:null}function Ho(t,e,n){const r=hg[e],o=ru(t,n);if(!(o!=null&&o.length))return{src:t,sizes:r,preferredSrc:t};const i=o.find(a=>a>=mg[e])??o[o.length-1],l=o.map(a=>`${po(t,a)} ${a}w`).join(", ");return{src:t,srcSet:l,sizes:r,preferredSrc:po(t,i)}}function ar({src:t,role:e="display",responsive:n=!0,loading:r="lazy",decoding:o="async",alt:i="",className:l,style:a,onLoad:c,...u}){const d=zo(),f=Ho(t,e,n?d:null),m=p.jsx("img",{...u,src:f.src,alt:i,loading:r,decoding:o,className:l,style:a,onLoad:c});return f.srcSet?p.jsxs("picture",{className:"contents",children:[p.jsx("source",{type:"image/avif",srcSet:f.srcSet,sizes:f.sizes}),m]}):m}function bg(t,e){const n=zo();return t&&Ho(t,e,n).preferredSrc}function gg(t){const e=t.split(/[?#]/)[0]??t,n=e.lastIndexOf("/"),r=e.lastIndexOf(".");return r<=n?null:e.slice(r+1).toLowerCase()||null}function yg({src:t,modelFileName:e}){const n=s.useRef(null);return s.useEffect(()=>{const r=n.current;if(!r)return;let o=!1,i=null,l=null;return import("online-3d-viewer").then(a=>{if(o)return;const c=new a.EmbeddedViewer(r,{projectionMode:a.ProjectionMode.Orthographic,backgroundColor:new a.RGBAColor(219,234,254,255),defaultColor:new a.RGBColor(30,64,175),onModelLoaded:()=>{const d=c.GetViewer();d.SetNavigationMode(a.NavigationMode.FreeOrbit),d.SetUpVector(a.Direction.Z,!1);const f=d.GetBoundingSphere(()=>!0);d.FitSphereToWindow(f,!1)}});l=c,(t.startsWith("blob:")||gg(t)===null&&!!e)&&e?c.LoadModelFromInputFiles([new a.InputFile(e,a.FileSource.Url,t)]):c.LoadModelFromUrlList([t]),typeof ResizeObserver<"u"&&(i=new ResizeObserver(()=>{c.Resize()}),i.observe(r))}),()=>{o=!0,i==null||i.disconnect(),l==null||l.Destroy()}},[t,e]),p.jsx("div",{ref:n,className:"absolute inset-0 [&_canvas]:size-full!","aria-label":"Interactive 3D model",role:"img"})}const vg=400;function Go({className:t,src:e,type:n="image",displayRegion:r,modelFileName:o,layoutSettleKey:i,remeasureWhenVisible:l=!1,imageRole:a="display",responsive:c=!0,loading:u="lazy",children:d}){const f=!!r,{ref:m,size:h,measureAfterLayout:g}=Qc({settleMs:f?vg:0,observeParent:f,remeasureWhenVisible:f&&l,layoutSettleKey:i}),[y,v]=s.useState(null),w=r&&y&&h&&cg(r,y.width,y.height,h.width,h.height),x=!!w,M=!!(r&&y&&!w),R="size-full object-cover object-center",L=E=>{const S=E.currentTarget;S.naturalWidth>0&&S.naturalHeight>0&&(v({width:S.naturalWidth,height:S.naturalHeight}),g())},j=E=>{const S=E.currentTarget;S.videoWidth>0&&S.videoHeight>0&&(v({width:S.videoWidth,height:S.videoHeight}),g())};return s.useEffect(()=>{v(null)},[e]),n==="model"?p.jsxs("div",{ref:m,className:U("@container relative overflow-hidden",t),children:[p.jsx(yg,{src:e,modelFileName:o}),d]}):p.jsxs("div",{ref:m,className:U("@container relative overflow-hidden",t),children:[n==="video"?p.jsx("video",{src:e,controls:!0,className:x?"absolute max-w-none":R,style:{...x&&w?w:void 0,opacity:M?0:1},onLoadedMetadata:r?j:void 0}):p.jsx(ar,{src:e,role:a,responsive:c,loading:u,alt:"",className:x?"absolute max-w-none":R,style:{...x&&w?w:void 0,opacity:M?0:1},onLoad:r?L:void 0}),d]})}function xg({className:t="absolute inset-0",...e}){return p.jsx(Go,{className:t,...e})}const $g=2,Rl=3,Un=(t,e,n)=>Math.min(Math.max(t,e),n),ou=t=>t.type==="circle",on=t=>t.type==="rectangle",Dl=t=>on(t)?[t.x1,t.x2]:[t.x],Il=t=>on(t)?[t.y1,t.y2]:[t.y];function wg(t,e,n){const r=Un(e,-Math.min(...Dl(t)),100-Math.max(...Dl(t))),o=Un(n,-Math.min(...Il(t)),100-Math.max(...Il(t)));return on(t)?{...t,x1:t.x1+r,y1:t.y1+o,x2:t.x2+r,y2:t.y2+o}:{...t,x:t.x+r,y:t.y+o}}function Nl(t,e,n){return Math.hypot(e.x-t.x,(e.y-t.y)/n)}function iu(t){return{...t,x1:Math.min(t.x1,t.x2),y1:Math.min(t.y1,t.y2),x2:Math.max(t.x1,t.x2),y2:Math.max(t.y1,t.y2)}}function Eg(t,e,n){return t==="circle"?{type:"circle",x:e.x,y:e.y,radius:0,color:n}:t==="rectangle"?{type:"rectangle",x1:e.x,y1:e.y,x2:e.x,y2:e.y,color:n}:{type:"point",x:e.x,y:e.y,color:n}}function Sg(t){return t==="circle"?"create-circle":t==="rectangle"?"create-rectangle":"create-point"}function Cg(t,e,n){switch(t.mode){case"create-point":return{...t.base,x:e.x,y:e.y};case"move":return wg(t.base,e.x-t.start.x,e.y-t.start.y);case"create-circle":return{...t.base,radius:Nl(t.start,e,n)};case"resize-circle":{const r=t.base;return{...r,radius:Nl({x:r.x,y:r.y},e,n)}}case"create-rectangle":return{...t.base,x2:e.x,y2:e.y};case"resize-rect":{const r=t.base,o=t.corner==="nw"||t.corner==="sw",i=t.corner==="nw"||t.corner==="ne";return{...r,x1:o?e.x:r.x1,x2:o?r.x2:e.x,y1:i?e.y:r.y1,y2:i?r.y2:e.y}}}}function Ll(t){if(ou(t))return{...t,radius:Math.max(t.radius,$g)};if(on(t)){const e=iu(t);return{...e,x2:Math.max(e.x2,e.x1+Rl),y2:Math.max(e.y2,e.y1+Rl)}}return t}function Kl({x:t,y:e,cursor:n,onPointerDown:r}){return p.jsx("span",{onPointerDown:r,className:"annotation-handle pointer-events-auto absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-sm border border-background bg-accent shadow",style:{left:`${t}%`,top:`${e}%`,cursor:n}})}function Pg({annotations:t,editing:e}){const{tool:n,color:r,selectedId:o,onSelect:i,onAdd:l,onChange:a,onRemove:c}=e,u=s.useRef(null),d=s.useRef(!1),[f,m]=s.useState(null),[h,g]=s.useState(null),y=n==="select",v=C=>{const K=u.current.getBoundingClientRect();return{x:Un((C.clientX-K.left)/K.width*100,0,100),y:Un((C.clientY-K.top)/K.height*100,0,100)}},w=(C,K)=>{var _;(_=u.current)==null||_.setPointerCapture(C.pointerId),d.current=!1,m(K),g(Ll(K.base))},x=C=>{if(y){i==null||i(null);return}const K=v(C);w(C,{mode:Sg(n),id:null,start:K,base:Eg(n,K,r)})},M=C=>{if(!f)return;const K=u.current.getBoundingClientRect();d.current=!0,g(Ll(Cg(f,v(C),K.width/K.height)))},R=C=>{var K;f&&h&&((K=u.current)==null||K.releasePointerCapture(C.pointerId),f.id===null?l==null||l(h):d.current&&(a==null||a(f.id,h))),m(null),g(null)},L=(C,K,_)=>{var O;C.stopPropagation(),(O=u.current)==null||O.focus(),i==null||i(K),w(C,{mode:"move",id:K,start:v(C),base:_})},j=(C,K,_)=>{C.stopPropagation(),w(C,{mode:"resize-circle",id:K,start:v(C),base:_})},E=(C,K,_,O)=>{C.stopPropagation(),w(C,{mode:"resize-rect",id:K,start:v(C),base:iu(_),corner:O})},S=C=>{(C.key==="Delete"||C.key==="Backspace")&&o!=null&&(C.preventDefault(),c==null||c(o))},I=(C,K,_)=>{const O=_&&K===o,b=je[C.color??"GREY"],P=_?"pointer-events-auto cursor-move":"pointer-events-none",N=_?k=>L(k,K,C):void 0;if(ou(C))return p.jsxs("div",{children:[p.jsx("div",{role:"img","aria-label":C.title,onPointerDown:N,className:U("absolute rounded-full",zn,P,O&&"outline outline-2 outline-offset-2 outline-accent"),style:{left:`${C.x}%`,top:`${C.y}%`,width:`${C.radius*2}%`,aspectRatio:"1",transform:"translate(-50%, -50%)",borderColor:b,backgroundColor:ot(b,.1)}}),O&&p.jsx(Kl,{x:C.x+C.radius,y:C.y,cursor:"ew-resize",onPointerDown:k=>j(k,K,C)})]},K);if(on(C)){const k=Math.min(C.x1,C.x2),D=Math.min(C.y1,C.y2),$=Math.abs(C.x2-C.x1),T=Math.abs(C.y2-C.y1),A=[{corner:"nw",x:k,y:D,cursor:"nwse-resize"},{corner:"ne",x:k+$,y:D,cursor:"nesw-resize"},{corner:"sw",x:k,y:D+T,cursor:"nesw-resize"},{corner:"se",x:k+$,y:D+T,cursor:"nwse-resize"}];return p.jsxs("div",{children:[p.jsx("div",{role:"img","aria-label":C.title,onPointerDown:N,className:U("absolute",zn,P,O&&"outline outline-2 outline-offset-2 outline-accent"),style:{left:`${k}%`,top:`${D}%`,width:`${$}%`,height:`${T}%`,borderColor:b,backgroundColor:ot(b,.1)}}),O&&A.map(({corner:G,x:W,y:q,cursor:ee})=>p.jsx(Kl,{x:W,y:q,cursor:ee,onPointerDown:le=>E(le,K,C,G)},G))]},K)}return p.jsx("span",{role:"img","aria-label":C.title,onPointerDown:N,style:{left:`${C.x}%`,top:`${C.y}%`,backgroundColor:b,color:Wn(b)},className:U(Yc,P,O&&"outline outline-2 outline-offset-2 outline-accent"),children:C.label},K)};return p.jsxs("div",{ref:u,tabIndex:0,role:"application","aria-label":"Annotation editor",onPointerDown:x,onPointerMove:M,onPointerUp:R,onKeyDown:S,className:U("absolute inset-0 focus:outline-none",y?"cursor-default":"cursor-crosshair"),children:[t.map((C,K)=>{const _=C.id??String(K),O=(f==null?void 0:f.id)===_&&h?h:C;return I(O,_,y)}),(f==null?void 0:f.id)===null&&h&&I(h,"__draft__",!1)]})}function cr({src:t,type:e="image",modelFileName:n,annotations:r=[],displayRegion:o,zoomable:i=!0,annotationEditing:l,layoutSettleKey:a,className:c}){const u=qb(),d="@container relative aspect-[4/3] overflow-hidden rounded-lg border border-default bg-default-soft",f=p.jsxs(p.Fragment,{children:[p.jsx(xg,{src:t,type:e,displayRegion:o,modelFileName:n,layoutSettleKey:a,imageRole:"display"}),l?p.jsx(Pg,{annotations:r,editing:l}):p.jsx(uo,{annotations:r})]});return p.jsx("figure",{className:U("flex flex-col gap-2",c),children:i&&e==="image"&&!l?p.jsxs(pt,{state:u,children:[p.jsx(pt.Trigger,{"aria-label":"View image full size",className:U(d,"cursor-zoom-in"),children:f}),p.jsx(pt.Backdrop,{variant:"blur",children:p.jsx(pt.Container,{placement:"center",children:p.jsxs(pt.Dialog,{"aria-label":"Full size image",className:"w-auto max-w-[95vw] overflow-hidden bg-transparent p-0 shadow-none",children:[u.isOpen?p.jsx(Go,{className:"aspect-[4/3] max-h-[88vh] w-[min(95vw,calc(88vh*4/3))] rounded-lg border border-default bg-default-soft",src:t,type:"image",displayRegion:o,remeasureWhenVisible:!0,responsive:!1,loading:"eager",children:p.jsx(uo,{annotations:r})}):null,p.jsx(pt.CloseTrigger,{})]})})})]}):p.jsx("div",{className:d,children:f})})}const Uo=Symbol.for("@openpawlabs/diy-guides-ui/MediaFigure");cr[Uo]=!0;function kg(){return p.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:"size-2/3",children:p.jsx("path",{d:"M8 5v14l11-7z"})})}const Tg={model:{hex:je.BLUE,content:p.jsx("span",{className:"text-lg font-bold",children:"3D"})},video:{hex:je.MAGENTA,content:p.jsx(kg,{})}};function lu({src:t,type:e="image",annotations:n=[],displayRegion:r,className:o}){if(e==="image")return p.jsx(Go,{className:U("aspect-[4/3]",o),src:t,type:"image",displayRegion:r,imageRole:"thumb",children:p.jsx(uo,{annotations:n})});const{hex:i,content:l}=Tg[e];return p.jsx("div",{"aria-hidden":"true",className:U("flex aspect-[4/3] items-center justify-center",o),style:{backgroundColor:i,color:Wn(i)},children:l})}const Mg=[{corner:"nw",cursor:"nwse-resize"},{corner:"ne",cursor:"nesw-resize"},{corner:"sw",cursor:"nesw-resize"},{corner:"se",cursor:"nwse-resize"}],Rg=(t,e,n)=>Math.min(Math.max(t,e),n);function Dg(t,e,n,r,o){return kt({x:t.x+e,y:t.y+n,width:t.width},r,o)}function Ig(t,e,n,r,o){const i=e==="nw"||e==="sw",l=e==="nw"||e==="ne",a=wt(t.width,r,o),c=i?t.x+t.width:t.x,u=l?t.y+a:t.y,d=i?c:100-c,f=l?u:100-u,m=r>0&&o>0?3/4*(r/o):0,h=m>0?f/m:d,g=_o/r*100,y=Math.min(d,h),v=Rg(Math.abs(n.x-c),g,y),w=wt(v,r,o);return kt({x:i?c-v:c,y:l?u-w:u,width:v},r,o)}function Ng({src:t,region:e,onChange:n,className:r}){const o=s.useRef(null),[i,l]=s.useState(null),[a,c]=s.useState(null),[u,d]=s.useState(null),f=x=>{const M=x.currentTarget;M.naturalWidth>0&&M.naturalHeight>0&&l({width:M.naturalWidth,height:M.naturalHeight})},m=u??(i?e?Vo(e,i.width,i.height):Jc(i.width,i.height):null),h=x=>{const M=o.current.getBoundingClientRect();return{x:(x.clientX-M.left)/M.width*100,y:(x.clientY-M.top)/M.height*100}},g=(x,M)=>{var R;x.stopPropagation(),(R=o.current)==null||R.setPointerCapture(x.pointerId),c(M),d(M.base)},y=x=>{if(!a||!i)return;const M=h(x),R=a.mode==="move"?Dg(a.base,M.x-a.start.x,M.y-a.start.y,i.width,i.height):Ig(a.base,a.corner,M,i.width,i.height);d(R)},v=x=>{var M;a&&u&&((M=o.current)==null||M.releasePointerCapture(x.pointerId),n(u)),c(null),d(null)},w=m&&i?{left:m.x,top:m.y,width:m.width,height:wt(m.width,i.width,i.height)}:null;return p.jsxs("div",{ref:o,role:"application","aria-label":"Crop editor",className:U("relative inline-block touch-none select-none overflow-hidden leading-none",r),style:i?{"--crop-aspect":i.width/i.height}:void 0,onPointerMove:y,onPointerUp:v,children:[p.jsx("img",{src:t,alt:"",draggable:!1,onLoad:f,className:"block h-auto w-full select-none"}),w&&p.jsx("div",{className:"crop-region absolute cursor-move border-2 border-background",style:{left:`${w.left}%`,top:`${w.top}%`,width:`${w.width}%`,height:`${w.height}%`,boxShadow:"0 0 0 9999px rgba(0, 0, 0, 0.5)"},onPointerDown:x=>g(x,{mode:"move",start:h(x),base:m}),children:Mg.map(({corner:x,cursor:M})=>p.jsx("span",{className:"crop-handle pointer-events-auto absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-sm border border-background bg-accent shadow",style:{left:x==="nw"||x==="sw"?"0%":"100%",top:x==="nw"||x==="ne"?"0%":"100%",cursor:M},onPointerDown:R=>g(R,{mode:"resize",corner:x,start:h(R),base:m})},x))})]})}function Lg({name:t,thumbnail:e,href:n,quantity:r,price:o,children:i,className:l}){return p.jsxs("li",{className:U("flex items-center gap-3 py-3 first:pt-0 last:pb-0",l),children:[e&&p.jsx(ar,{src:e,role:"thumb",alt:"",className:"size-12 shrink-0 rounded-md border border-default object-cover"}),p.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[n?p.jsx(Fo,{href:n,className:"font-medium",children:t}):p.jsx("span",{className:"font-medium",children:t}),i!=null&&p.jsx("span",{className:"text-sm text-default-500",children:i})]}),r!=null&&p.jsxs("span",{className:"shrink-0 text-sm text-default-500",children:["×",r]}),o!=null&&p.jsx("span",{className:"shrink-0 text-sm font-medium",children:o})]})}function Kg({title:t="What you need",children:e,className:n}){return p.jsxs(Ft,{className:U("w-full",n),children:[t!=null&&p.jsx(Ft.Header,{children:p.jsx(Ft.Title,{children:t})}),p.jsx(Ft.Content,{children:p.jsx("ul",{className:"flex flex-col divide-y divide-default",children:e})})]})}const Ag=Object.assign(Kg,{Item:Lg});function su(t){return null}function Og(t){return s.isValidElement(t)&&t.type===su}function au(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"mr-1 size-4 shrink-0",children:p.jsx("path",{d:"m6 9 6 6 6-6"})})}function Al(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:p.jsx("path",{d:"M10 13a5 5 0 0 0 7.07 0l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.07 0l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})})}function Fg(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:p.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})})}function jg(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"size-3.5",children:p.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})}function _g(){return p.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",className:"size-4",children:[p.jsx("circle",{cx:"9",cy:"6",r:"1.4"}),p.jsx("circle",{cx:"15",cy:"6",r:"1.4"}),p.jsx("circle",{cx:"9",cy:"12",r:"1.4"}),p.jsx("circle",{cx:"15",cy:"12",r:"1.4"}),p.jsx("circle",{cx:"9",cy:"18",r:"1.4"}),p.jsx("circle",{cx:"15",cy:"18",r:"1.4"})]})}function Bg(t){var r;if(!t||t==="#"||t.startsWith("blob:"))return;const n=(((r=t.replaceAll("\\","/").split("?")[0])==null?void 0:r.split("#")[0])??"").split("/").pop();if(!(!n||n==="."||n===".."))try{return decodeURIComponent(n)}catch{return n}}function Vg(t,e){return e===void 0||e===!1?e:typeof e=="string"?e||void 0:Bg(t)??!0}function ho(t){const{href:e,download:n,external:r}=t.props;return{href:e,download:Vg(e,n),...r?{target:"_blank",rel:"noreferrer noopener"}:{}}}function zg(t,e,n,r){return U(qe({variant:t,size:e,fullWidth:!0}),"!min-h-0 !justify-center !rounded-none",n&&"!rounded-b-3xl",r&&"border-b border-separator","hover:!bg-[var(--button-bg-hover)] data-[hovered=true]:!bg-[var(--button-bg-hover)]")}function mo(){return p.jsx("span",{"aria-hidden":"true",className:Co({orientation:"horizontal"}).separator()})}function Hg({variant:t="primary",size:e="md",icon:n,menuLabel:r="More download options",editing:o,children:i,className:l}){const a=s.Children.toArray(i).filter(Og);if(o)return p.jsx(Ug,{items:a,variant:t,size:e,icon:n,menuLabel:r,editing:o,className:l});if(a.length===0)return null;const[c,...u]=a;if(u.length===0){const d=qe({variant:"primary",size:e});return p.jsxs(Fo,{...ho(c),className:U(d,l),children:[n,c.props.children]})}return p.jsx(Gg,{items:a,variant:t,size:e,icon:n,menuLabel:r,className:l})}function Gg({items:t,variant:e,size:n,icon:r,menuLabel:o,className:i}){const l=s.useRef(null),[a,c]=s.useState(),[u]=t,d=qe({variant:e,size:n});return s.useLayoutEffect(()=>{const f=l.current;if(!f)return;const m=()=>c(f.offsetWidth);m();const h=new ResizeObserver(m);return h.observe(f),()=>h.disconnect()},[t,e,n]),p.jsxs("div",{ref:l,className:U(Co({orientation:"horizontal"}).base(),i),children:[p.jsxs(Fo,{...ho(u),className:d,children:[r,u.props.children]}),p.jsxs(It,{children:[p.jsxs(It.Trigger,{"aria-label":o,className:U(qe({variant:e,size:n,isIconOnly:!0}),"!inline-flex items-center justify-center"),children:[p.jsx(mo,{}),p.jsx(au,{})]}),p.jsx(It.Popover,{placement:"bottom",offset:0,triggerRef:l,className:"!max-w-none !p-0",style:a?{minWidth:a}:void 0,children:p.jsx(It.Menu,{className:"!gap-0 !p-0",children:t.map((f,m)=>p.jsxs(It.Item,{...ho(f),className:zg("secondary",n,m===t.length-1,m<t.length-1),children:[m===0?r:null,f.props.children]},m))})})]})]})}function Ug({items:t,variant:e,size:n,icon:r,menuLabel:o,editing:i,className:l}){const[a,c]=s.useState(!1),[u,d]=s.useState(null),[f,m]=s.useState(null),{onAddItem:h,onRemoveItem:g,onReorderItem:y,onSelectItem:v}=i,w=t[0],x=t.slice(1),M=qe({variant:e,size:n}),R=y!=null,L=()=>{d(null),m(null)},j=E=>{u!=null&&u!==E&&(y==null||y(u,E)),L()};return p.jsxs("div",{className:U("relative inline-flex flex-col items-start",l),children:[p.jsxs("div",{className:Co({orientation:"horizontal"}).base(),children:[p.jsxs("span",{className:U(M,"cursor-text"),children:[r,w?w.props.children:p.jsx("span",{className:"opacity-60",children:"Add a link"})]}),w&&v&&p.jsxs("button",{type:"button",onClick:()=>v(0),"aria-label":"Edit primary link",className:qe({variant:e,size:n,isIconOnly:!0}),children:[p.jsx(mo,{}),p.jsx(Al,{})]}),p.jsxs("button",{type:"button",onClick:()=>c(E=>!E),"aria-label":o,"aria-expanded":a,className:qe({variant:e,size:n,isIconOnly:!0}),children:[!(w&&v)&&p.jsx(mo,{}),p.jsx(au,{})]})]}),a&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1),"aria-hidden":"true"}),p.jsxs("div",{className:"absolute left-0 top-full z-50 mt-2 w-64 rounded-lg border border-default-200 bg-background p-2 shadow-lg",children:[x.length>0?p.jsx("ul",{className:"flex flex-col gap-0.5",children:x.map((E,S)=>{const I=S+1;return p.jsxs("li",{draggable:R||void 0,onDragStart:R?()=>d(I):void 0,onDragOver:R?C=>{C.preventDefault(),m(I)}:void 0,onDrop:R?C=>{C.preventDefault(),j(I)}:void 0,onDragEnd:R?L:void 0,className:U("flex items-center gap-1.5 rounded-md px-1.5 py-1 transition",R&&"cursor-grab",u===I&&"opacity-40",f===I&&u!==I&&"ring-2 ring-accent"),children:[R&&p.jsx("span",{className:"shrink-0 text-default-400",children:p.jsx(_g,{})}),p.jsx("span",{className:"min-w-0 flex-1 text-sm",children:E.props.children}),y&&p.jsx("button",{type:"button",onClick:()=>y(I,0),"aria-label":"Make default download",className:"shrink-0 rounded p-0.5 text-default-500 transition hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:p.jsx(Fg,{})}),v&&p.jsx("button",{type:"button",onClick:()=>v(I),"aria-label":"Edit link",className:"shrink-0 rounded p-0.5 text-default-500 transition hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:p.jsx(Al,{})}),g&&p.jsx("button",{type:"button",onClick:()=>g(I),"aria-label":"Remove option",className:"shrink-0 rounded p-0.5 text-default-500 transition hover:text-danger focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:p.jsx(jg,{})})]},I)})}):p.jsx("p",{className:"px-1.5 py-1 text-sm text-default-500",children:"No other options yet."}),h&&p.jsx("button",{type:"button",onClick:h,className:"mt-1 w-full rounded-md px-1.5 py-1 text-left text-sm font-medium text-accent transition hover:bg-default-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:"+ Add option"})]})]})]})}const Wg=Object.assign(Hg,{Item:su});function qg(t,e,n){const[r,o]=s.useState(e),i=t!==void 0,l=i?t:r,a=s.useCallback(c=>{i||o(c),n==null||n(c)},[i,n]);return[l,a]}const cu=3,Yg="#3ABF84",Xg="#34B07A",Zg="#0B7A47",Jg={caution:Pn.caution,reminder:"Reminder",note:Pn.note};function Qg(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5 shrink-0 text-danger",children:p.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0ZM12 9v4M12 17h.01"})})}function ey(){return p.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5 shrink-0 text-default-500",children:[p.jsx("circle",{cx:"12",cy:"12",r:"9"}),p.jsx("path",{d:"M12 16v-4M12 8h.01"})]})}function ty(){return p.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex size-6 shrink-0 items-center justify-center rounded bg-default-100",children:p.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"size-3.5 text-default-500",children:p.jsx("path",{d:"M16 12V4h1V3H7v1h1v8l-2 2v1h5.2c-.2.6-.3 1.2-.3 1.8 0 2.2 1.8 4 4 4s4-1.8 4-4c0-.6-.1-1.2-.3-1.8H18v-1l-2-2z"})})})}function ny(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-7",children:p.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"})})}function uu(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"size-3",children:p.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})}function ry(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:p.jsx("path",{d:"M12 20h9M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})})}function oy(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:p.jsx("path",{d:"M6 2v14a2 2 0 0 0 2 2h14M2 6h14a2 2 0 0 1 2 2v14"})})}function iy(){return p.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",className:"size-3.5",children:[p.jsx("circle",{cx:"9",cy:"6",r:"1.4"}),p.jsx("circle",{cx:"15",cy:"6",r:"1.4"}),p.jsx("circle",{cx:"9",cy:"12",r:"1.4"}),p.jsx("circle",{cx:"15",cy:"12",r:"1.4"}),p.jsx("circle",{cx:"9",cy:"18",r:"1.4"}),p.jsx("circle",{cx:"15",cy:"18",r:"1.4"})]})}function ly(t){return s.isValidElement(t)?t.type===cr?!0:typeof t.type=="function"&&t.type[Uo]===!0:!1}function Ol(t,e){return t.type===cr?p.jsx(lu,{src:t.props.src,type:t.props.type,annotations:t.props.annotations,displayRegion:t.props.displayRegion,className:e}):s.cloneElement(t,{thumbnailPreview:!0,className:e})}function du(t){return s.isValidElement(t)&&t.type===hu}function sy(t){return s.isValidElement(t)?s.Children.toArray(t.props.children).filter(du).length:0}function ay(t,e=!1){let n=null,r=null;for(const i of s.Children.toArray(t))s.isValidElement(i)&&(i.type===fu&&(n=i.props.children),i.type===pu&&(r=i));const o=s.Children.toArray(n).filter(ly);return sy(r),{figures:o.slice(0,cu),bullets:r}}function fu(t){return null}function pu({children:t,className:e,editing:n}){const[r,o]=s.useState(null),[i,l]=s.useState(null);if(!n)return p.jsx("ul",{className:U("flex flex-col gap-2",e),children:t});const{onAddBullet:a,onRemoveBullet:c,onReorderBullet:u}=n,d=s.Children.toArray(t).filter(du),f=u!=null&&d.length>1,m=c!=null&&d.length>1,h=()=>{o(null),l(null)},g=y=>{r!=null&&r!==y&&(u==null||u(r,y)),h()};return p.jsxs("ul",{className:U("flex flex-col gap-2",e),children:[d.map((y,v)=>s.cloneElement(y,{key:y.key??v,__edit:{canReorder:f,isDragging:r===v,isOver:i===v&&r!==v,onRemove:m?()=>c==null?void 0:c(v):void 0,onDragStart:()=>o(v),onDragOver:()=>l(v),onDrop:()=>g(v),onDragEnd:h}})),a&&p.jsx("li",{className:"list-none",children:p.jsx("button",{type:"button",onClick:a,className:"rounded-md px-1 py-0.5 text-sm font-medium text-default-500 transition hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:"+ New bullet"})})]})}function hu(t){const{variant:e="dot",color:n="GREY",label:r,hideLabel:o=!1,onMarkerPress:i,markerAriaLabel:l,children:a,className:c}=t,u=t.__edit,[d,f]=s.useState(!1);let m=null,h;if(e==="dot")m=i?p.jsx("button",{type:"button",onClick:i,"aria-label":l??"Change bullet style",className:"mt-1.5 size-2 shrink-0 cursor-pointer rounded-full outline-none transition hover:ring-2 hover:ring-accent focus-visible:ring-2 focus-visible:ring-accent",style:{backgroundColor:je[n]}}):p.jsx("span",{"aria-hidden":"true",className:"mt-1.5 size-2 shrink-0 rounded-full",style:{backgroundColor:je[n]}}),h=p.jsx("span",{className:"flex-1",children:a});else if(e==="button")m=i?p.jsx("button",{type:"button",onClick:i,"aria-label":l??"Change bullet style",className:"size-2 shrink-0 cursor-pointer rounded-full bg-default-300 outline-none transition hover:ring-2 hover:ring-accent focus-visible:ring-2 focus-visible:ring-accent"}):null,h=p.jsx("div",{className:"min-w-0 flex-1",children:a});else{const M=r??Jg[e],R=e==="caution"?p.jsx(Qg,{}):e==="reminder"?p.jsx(ty,{}):p.jsx(ey,{});m=i?p.jsx("button",{type:"button",onClick:i,"aria-label":l??"Change bullet style",className:"shrink-0 cursor-pointer rounded outline-none transition hover:opacity-70 focus-visible:ring-2 focus-visible:ring-accent",children:R}):R,h=p.jsxs("span",{className:"flex-1",children:[!o&&p.jsxs(p.Fragment,{children:[p.jsxs("span",{className:"font-semibold",children:[M,":"]})," "]}),a]})}const g=U("flex gap-2.5",e==="button"&&"items-center",e==="caution"&&"text-danger",c);if(!u)return p.jsxs("li",{className:g,children:[m,h]});const{canReorder:y,isDragging:v,isOver:w,onRemove:x}=u;return p.jsxs("li",{className:U("group rounded-md",g,v&&"opacity-40",w&&"ring-2 ring-accent"),draggable:y&&d?!0:void 0,onDragStart:y?M=>{M.dataTransfer.effectAllowed="move",u.onDragStart()}:void 0,onDragOver:y?M=>{M.preventDefault(),M.dataTransfer.dropEffect="move",u.onDragOver()}:void 0,onDrop:y?M=>{M.preventDefault(),u.onDrop()}:void 0,onDragEnd:y?()=>{f(!1),u.onDragEnd()}:void 0,children:[y&&p.jsx("span",{"aria-hidden":"true",onPointerDown:()=>f(!0),onPointerUp:()=>f(!1),className:"mt-1 shrink-0 cursor-grab text-default-400 transition hover:text-default-500",children:p.jsx(iy,{})}),m,h,x&&p.jsx("button",{type:"button",onClick:x,"aria-label":"Remove bullet",className:"mt-1 shrink-0 rounded p-0.5 text-default-400 opacity-0 transition hover:text-danger focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent group-hover:opacity-100",children:p.jsx(uu,{})})]})}function cy(){return p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:p.jsx("path",{d:"m5 12 5 5 9-11"})})}function Fl(t){const[e,n]=s.useState(!1);return{isDropOver:e,dropProps:t?{onDragOver:o=>{o.dataTransfer.types.includes("Files")&&(o.preventDefault(),o.dataTransfer.dropEffect="copy",n(!0))},onDragLeave:o=>{o.currentTarget.contains(o.relatedTarget)||n(!1)},onDrop:o=>{o.preventDefault(),n(!1);const i=Array.from(o.dataTransfer.files);i.length>0&&t(i)}}:{}}}function uy({figures:t,bullets:e,mediaEditing:n}){const r=n!=null,[o,i]=s.useState(0),[l,a]=s.useState(null),[c,u]=s.useState(null),d=(n==null?void 0:n.activeIndex)??o,f=t[d]??t[0],h=((f==null?void 0:f.props.type)??"image")==="image",g=S=>{var I;i(S),(I=n==null?void 0:n.onSelectImage)==null||I.call(n,S)},y=r&&(n==null?void 0:n.onReorderImage)!=null&&t.length>1,v=()=>{a(null),u(null)},w=S=>{var I;l!=null&&l!==S&&((I=n==null?void 0:n.onReorderImage)==null||I.call(n,l,S)),v()},x=r&&((n==null?void 0:n.canAddImage)??!0)&&t.length>=1&&t.length<cu,M=r?t.length>=1:t.length>1,R="aspect-[4/3] w-full min-w-0",L=Fl(n==null?void 0:n.onAddMediaFiles),j=Fl(n==null?void 0:n.onAddMediaFiles),E="border-accent text-accent ring-2 ring-accent ring-offset-2 ring-offset-background";return p.jsxs("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:[p.jsx("div",{className:"min-w-0",children:f?r?p.jsxs("div",{className:"group relative",children:[s.cloneElement(f,{className:U("w-full",f.props.className),zoomable:!1}),p.jsxs("div",{className:"absolute inset-0 flex items-center justify-center gap-2 rounded-lg opacity-0 transition group-hover:bg-foreground/40 group-hover:opacity-100 focus-within:bg-foreground/40 focus-within:opacity-100",children:[h&&p.jsxs("button",{type:"button",onClick:()=>{var S;return(S=n==null?void 0:n.onEditAnnotations)==null?void 0:S.call(n,d)},className:"flex items-center gap-1.5 rounded-md bg-background/90 px-2.5 py-1.5 text-sm font-semibold text-foreground shadow transition hover:bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:[p.jsx(ry,{}),"Edit annotations"]}),h&&(n==null?void 0:n.onEditCrop)&&p.jsxs("button",{type:"button",onClick:()=>{var S;return(S=n==null?void 0:n.onEditCrop)==null?void 0:S.call(n,d)},className:"flex items-center gap-1.5 rounded-md bg-background/90 px-2.5 py-1.5 text-sm font-semibold text-foreground shadow transition hover:bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:[p.jsx(oy,{}),"Adjust crop"]})]})]}):s.cloneElement(f,{className:U("w-full",f.props.className)}):r&&p.jsxs("button",{type:"button",onClick:()=>{var S;return(S=n==null?void 0:n.onAddImage)==null?void 0:S.call(n)},...L.dropProps,className:U("flex aspect-[4/3] w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-default bg-default-soft text-default-500 transition hover:border-accent hover:text-accent focus-visible:border-accent focus-visible:text-accent focus-visible:outline-none",L.isDropOver&&E),children:[p.jsx(ny,{}),p.jsx("span",{className:"text-sm font-medium",children:L.isDropOver?"Drop image":"Add image"})]})}),p.jsxs("div",{className:"flex min-w-0 flex-col gap-4",children:[(M||x)&&p.jsxs("div",{className:"grid w-full grid-cols-3 gap-2",role:"group","aria-label":"Step images",children:[t.map((S,I)=>r?p.jsxs("div",{className:U("relative min-w-0 w-full rounded-md transition-shadow",y&&"cursor-grab",l===I&&"opacity-40",c===I&&l!==I&&"ring-2 ring-accent ring-offset-2 ring-offset-background"),draggable:y||void 0,onDragStart:y?C=>{C.dataTransfer.effectAllowed="move",a(I)}:void 0,onDragOver:y?C=>{C.preventDefault(),C.dataTransfer.dropEffect="move",u(I)}:void 0,onDrop:y?C=>{C.preventDefault(),w(I)}:void 0,onDragEnd:y?v:void 0,children:[p.jsx("button",{type:"button",className:U("block w-full overflow-hidden rounded-md border-2 transition-[box-shadow,opacity,border-color]",I===d?"border-accent shadow-md":"border-default opacity-80 hover:opacity-100"),onClick:()=>g(I),"aria-label":`Image ${I+1}`,"aria-pressed":I===d,children:Ol(S,R)}),p.jsx("button",{type:"button",onClick:()=>{var C;return(C=n==null?void 0:n.onRemoveImage)==null?void 0:C.call(n,I)},"aria-label":`Remove image ${I+1}`,className:"absolute -right-1.5 -top-1.5 flex size-5 items-center justify-center rounded-full bg-foreground text-background shadow transition hover:bg-danger focus-visible:bg-danger focus-visible:outline-none",children:p.jsx(uu,{})})]},S.key??S.props.src??I):p.jsx("button",{type:"button",className:U("w-full overflow-hidden rounded-md border-2 transition-[box-shadow,opacity,border-color]",I===d?"border-accent shadow-md":"border-default opacity-80 hover:opacity-100"),onMouseEnter:()=>g(I),onFocus:()=>g(I),"aria-label":`Image ${I+1}`,"aria-pressed":I===d,children:Ol(S,R)},S.key??S.props.src??I)),x&&p.jsx("button",{type:"button",onClick:()=>{var S;return(S=n==null?void 0:n.onAddImage)==null?void 0:S.call(n)},"aria-label":"Add image",...j.dropProps,className:U(R,"flex items-center justify-center rounded-md border-2 border-dashed border-default text-default-500 transition hover:border-accent hover:text-accent focus-visible:border-accent focus-visible:text-accent focus-visible:outline-none",j.isDropOver&&E),children:p.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-6",children:p.jsx("path",{d:"M12 5v14M5 12h14"})})})]}),e]})]})}const dy=s.forwardRef(function({number:e,title:n,isCompleted:r,defaultCompleted:o=!1,onCompletedChange:i,completable:l=!0,mediaEditing:a,children:c,id:u,scrollMarginTop:d,className:f},m){const[h,g]=qg(r,o,i),y=s.useId(),{figures:v,bullets:w}=ay(c,a!=null),x=d!=null?{scrollMarginTop:d}:void 0;return p.jsxs("section",{ref:m,id:u,"aria-labelledby":n!=null?y:void 0,"data-step-number":e??void 0,"data-completed":h||void 0,style:x,className:U("flex flex-col gap-4 transition-opacity",d==null&&"scroll-mt-4",h&&"opacity-60",f),children:[p.jsxs("header",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[p.jsxs("div",{className:"flex min-w-0 items-center gap-3 sm:flex-1",children:[e!=null&&p.jsx("span",{className:U("flex size-8 shrink-0 items-center justify-center rounded-md text-sm font-bold tabular-nums",h?"bg-success text-success-foreground":"bg-foreground text-background"),children:h?p.jsx(cy,{}):e}),n!=null&&p.jsx("h3",{id:y,className:"min-w-0 flex-1 text-lg font-semibold leading-tight",children:n})]}),l&&p.jsx(eb,{variant:h?"primary":"secondary",size:"lg",onPress:()=>g(!h),"aria-pressed":h,className:U("ml-auto shrink-0",h&&"guide-step-complete-button"),style:h?{"--guide-step-complete-bg":Yg,"--guide-step-complete-bg-hover":Xg,"--guide-step-complete-checkbox":Zg}:void 0,children:p.jsx(yn,{isSelected:h,isReadOnly:!0,"aria-hidden":!0,className:"pointer-events-none gap-2 text-inherit",children:p.jsxs(yn.Content,{className:"flex items-center gap-2 whitespace-nowrap",children:[p.jsx(yn.Control,{children:p.jsx(yn.Indicator,{})}),"Mark complete"]})})})]}),p.jsx(uy,{figures:v,bullets:w,mediaEditing:a})]})}),fy=Object.assign(dy,{Media:fu,Bullets:pu,Bullet:hu}),Wo=s.createContext(0),mu=s.createContext(null),bu=s.createContext(null);function gu(){return s.useContext(Wo)}function py(){return s.useContext(mu)}function qo(){return s.useContext(bu)}const hy=8;function yu({parentScrollMarginTop:t=0,additionalParentScrollMarginTop:e=0}={}){return t+e}function vu({progressBarHeight:t=0,includeProgressBar:e=!1}={}){return e?t+hy:0}function ur({parentScrollMarginTop:t=0,additionalParentScrollMarginTop:e=0}={}){return yu({parentScrollMarginTop:t,additionalParentScrollMarginTop:e})}function xu({parentScrollMarginTop:t=0,additionalParentScrollMarginTop:e=0,progressBarHeight:n=0,includeProgressBar:r=!1}){return ur({parentScrollMarginTop:t,additionalParentScrollMarginTop:e})+vu({progressBarHeight:n,includeProgressBar:r})}function bo(t,e=window.innerHeight,n=0){if(t.height<=0)return 0;const r=Math.max(t.top,n),o=Math.min(t.bottom,e);return Math.max(0,o-r)/t.height}function my(t,e){if(t==null)return null;const n=(e==null?void 0:e.top)??t.top,r=Math.max(0,n-t.top);return r<=0?null:{top:t.top,bottom:t.top+r,left:t.left,right:t.right,width:t.width,height:r,x:t.x,y:t.y,toJSON:()=>({})}}function by(){var t;return typeof window>"u"?0:window.scrollY||document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}function gy(){var t;return typeof document>"u"?0:Math.max(((t=document.body)==null?void 0:t.scrollHeight)??0,document.documentElement.scrollHeight)}function yy(){return typeof window>"u"?0:window.innerHeight||document.documentElement.clientHeight||0}function vy(t=by(),e=yy(),n=2){if(typeof document>"u")return!1;const r=gy();return r<=e?!1:t+e>=r-n}function xy({overviewRect:t,overviewContentInsetTop:e,stepNumbers:n,getStepRect:r,activeStepMinVisibleRatio:o,stepContentInsetTop:i,innerHeight:l=window.innerHeight,atPageBottom:a=!1}){var h;const c=t!=null?bo(t,l,e):0,u=n.flatMap(g=>{const y=r(g);return y==null?[]:[{step:g,rect:y,visibleRatio:bo(y,l,i)}]}),d=n.at(-1);if(a&&d!=null)return d;let f=null;for(const g of u)if(g.visibleRatio>=o){f=g.step;break}if(d!=null){const g=u.find(y=>y.step===d);if(g!=null&&g.visibleRatio>=o&&g.rect.top<=i)return d}if(c>=o){const g=f!=null?((h=u.find(y=>y.step===f))==null?void 0:h.visibleRatio)??0:0;if(f==null||c>=g)return null}if(f!=null)return f;const m=[...c>0?[{step:null,visibleRatio:c}]:[],...u.filter(g=>g.visibleRatio>0)];return m.length>0?m[m.length-1].step:null}const dr="step-",Yo="step";function fr(t,e=dr){return`${e}${t}`}function $u(t,e=dr){const n=t.replace(/^#/,"");if(!n.startsWith(e))return null;const r=Number.parseInt(n.slice(e.length),10);return Number.isFinite(r)&&r>0?r:null}function wu(t,e=Yo){const r=new URLSearchParams(t.startsWith("?")?t:`?${t}`).get(e);if(r==null||r==="")return null;const o=Number.parseInt(r,10);return Number.isFinite(o)&&o>0?o:null}function Cn(t,e,n=Yo,r=dr){return e==="hash"?$u(t.hash,r):wu(t.search,n)}function Eu(t,e,n,r=Yo,o=dr){const i=new URL(t);return n==="hash"?(i.hash=e!=null?fr(e,o):"",i.toString()):(e!=null?i.searchParams.set(r,String(e)):i.searchParams.delete(r),i.toString())}const $y=900;function wy(t,e,n){const r=Math.max(0,t.getBoundingClientRect().top+window.scrollY-e);window.scrollTo({top:r,behavior:n})}function jl(t,e,n){var o;const r=((o=jt(t))==null?void 0:o.getBoundingClientRect())??null;return r!=null&&bo(r,window.innerHeight,e)>=n}function jt(t){return document.getElementById(fr(t))}function Ey({enabled:t,rootRef:e,guideTopRef:n=null,guideContentRef:r=null,stepNumbers:o,mode:i="hash",stepUrlKey:l="step",scrollMarginTop:a=0,overviewScrollMarginTop:c=0,activeStepMinVisibleRatio:u=.2,onActiveStepChange:d}){const f=s.useRef(null),m=s.useRef(!1),h=s.useRef(!1),g=s.useRef(null),y=s.useRef({overview:c,step:a}),v=s.useRef(null),w=s.useRef(null),x=s.useCallback(E=>{if(typeof window>"u")return;const S=Eu(window.location.href,E,i,l);S!==window.location.href&&window.history.replaceState(window.history.state,"",S)},[i,l]),M=s.useCallback((E,{updateUrl:S})=>{f.current!==E&&(f.current=E,S&&x(E),d==null||d(E))},[d,x]),R=s.useCallback(()=>{var S;m.current=!1,g.current=null;const E=v.current;E!=null&&jl(E,a,u)&&(v.current=null),(S=w.current)==null||S.call(w)},[u,a]),L=s.useCallback((E,{behavior:S="smooth",fromUrl:I=!1}={})=>{if(typeof window>"u")return;const C=E!=null?jt(E):(n==null?void 0:n.current)??e.current;if(C==null)return;const K=E!=null?a:c;v.current=I?E:null,m.current=!0,g.current!=null&&clearTimeout(g.current),wy(C,K,S),M(E,{updateUrl:!1});const _=S==="auto"?0:$y;if(_===0){R();return}g.current=setTimeout(R,_)},[R,n,c,e,a,M]),j=s.useCallback(({initial:E=!1}={})=>{if(typeof window>"u")return;const S=Cn(window.location,i,l),I=E&&S!=null;L(S,{behavior:I?"auto":"smooth",fromUrl:!0})},[i,L,l]);s.useEffect(()=>{if(!t||typeof window>"u"||h.current)return;const E=Cn(window.location,i,l);e.current!=null&&(E==null||o.includes(E)||o.length>0)&&(E!=null&&jt(E)==null||(h.current=!0,j({initial:!0})))},[t,i,e,j,o.join(","),l]),s.useEffect(()=>{if(!t||typeof window>"u")return;const E=y.current;if(!(E.overview!==c||E.step!==a)||(y.current={overview:c,step:a},m.current))return;const I=Cn(window.location,i,l);L(I,{behavior:I!=null?"auto":"smooth",fromUrl:I!=null})},[t,i,c,a,L,l]),s.useEffect(()=>{if(!t||typeof window>"u")return;const E=()=>{j()};return window.addEventListener("hashchange",E),window.addEventListener("popstate",E),()=>{var S;window.removeEventListener("hashchange",E),window.removeEventListener("popstate",E),g.current!=null&&(clearTimeout(g.current),g.current=null,m.current=!1,(S=w.current)==null||S.call(w))}},[t,j]),s.useEffect(()=>{if(!t||typeof window>"u"||o.length===0)return;const E=()=>{var k,D;if(m.current)return;const _=v.current;if(_!=null){if(jl(_,a,u)){v.current=null,M(_,{updateUrl:!1});return}M(_,{updateUrl:!1});return}const O=((k=n==null?void 0:n.current)==null?void 0:k.getBoundingClientRect())??null,b=((D=r==null?void 0:r.current)==null?void 0:D.getBoundingClientRect())??null,P=my(O,b),N=xy({overviewRect:P,overviewContentInsetTop:c,stepNumbers:o,getStepRect:$=>{var T;return((T=jt($))==null?void 0:T.getBoundingClientRect())??null},activeStepMinVisibleRatio:u,stepContentInsetTop:a,atPageBottom:vy()});M(N,{updateUrl:!0})},S=new IntersectionObserver(E,{root:null,rootMargin:`-${a}px 0px 0px 0px`,threshold:[0,.05,.1,.2,.25,.5,.75,.8,.9,1]}),I=[n==null?void 0:n.current,r==null?void 0:r.current,...o.map(_=>jt(_))];for(const _ of I)_!=null&&S.observe(_);let C=0;const K=()=>{C===0&&(C=window.requestAnimationFrame(()=>{C=0,E()}))};return w.current=E,E(),window.addEventListener("scroll",K,{passive:!0}),()=>{w.current=null,window.removeEventListener("scroll",K),C!==0&&window.cancelAnimationFrame(C),S.disconnect()}},[u,t,r,n,c,a,M,o.join(",")])}function Sy(t){return s.isValidElement(t)}function Cy({children:t,showProgress:e=!0,onProgressChange:n,syncStepUrl:r=!0,stepUrlMode:o="hash",stepUrlKey:i="step",onActiveStepChange:l,scrollMarginTop:a=0,activeStepMinVisibleRatio:c=.2,completedSteps:u,onCompletedStepsChange:d,className:f}){const m=s.Children.toArray(t).filter(Sy),h=m.length,g=s.useRef(null),{ref:y,size:v}=Qc({settleMs:e?250:0,layoutSettleKey:e}),w=gu(),x=py(),M=qo(),R=s.useMemo(()=>ur({parentScrollMarginTop:w,additionalParentScrollMarginTop:a}),[a,w]),L=s.useMemo(()=>xu({parentScrollMarginTop:w,additionalParentScrollMarginTop:a,progressBarHeight:(v==null?void 0:v.height)??0,includeProgressBar:e&&h>0}),[a,w,v==null?void 0:v.height,e,h]),j=R;s.useLayoutEffect(()=>{const b=x==null?void 0:x.current;b!=null&&(b.style.scrollMarginTop=`${R}px`)},[x,R]);const E=m.map((b,P)=>b.props.number??P+1),[S,I]=s.useState(()=>Object.fromEntries(m.map((b,P)=>[b.props.number??P+1,!!(b.props.defaultCompleted??b.props.isCompleted)]))),C=u!=null,K=C?u:S,_=(b,P)=>{const N={...K,[b]:P};if(C){d==null||d(N);return}I(N)},O=Object.values(K).filter(Boolean).length;return s.useEffect(()=>{n==null||n({completed:O,total:h})},[O,h,n]),Ey({enabled:r,rootRef:g,guideTopRef:x,guideContentRef:M,stepNumbers:E,mode:o,stepUrlKey:i,scrollMarginTop:L,overviewScrollMarginTop:R,activeStepMinVisibleRatio:c,onActiveStepChange:l}),p.jsxs("div",{ref:g,className:U("flex flex-col gap-8",f),children:[e&&h>0&&p.jsx("div",{ref:y,className:"sticky z-10 mx-2",style:{top:j},children:p.jsx(Ft,{className:"w-full px-6 py-4",children:p.jsxs(vn,{value:O,maxValue:h,"aria-label":"Guide progress",className:"flex flex-col gap-1.5",children:[p.jsxs("div",{className:"flex items-center justify-between text-sm text-default-500",children:[p.jsx("span",{children:"Guide Progress"}),p.jsxs(vn.Output,{children:[O," / ",h," steps"]})]}),p.jsx(vn.Track,{className:"h-2 overflow-hidden rounded-full bg-default-soft",children:p.jsx(vn.Fill,{className:"h-full rounded-full bg-success transition-[width]"})})]})})}),p.jsx("ol",{className:"flex flex-col",children:m.map((b,P)=>{const N=b.props.number??P+1,k=r?fr(N):b.props.id;return p.jsxs("li",{children:[s.cloneElement(b,{number:N,id:b.props.id??k,scrollMarginTop:r?L:void 0,isCompleted:K[N]??!1,onCompletedChange:D=>{var $,T;_(N,D),(T=($=b.props).onCompletedChange)==null||T.call($,D)}}),P<m.length-1&&p.jsx($b,{className:"my-8"})]},b.key??N)})})]})}function Py({title:t,heroImage:e,heroImageAlt:n,difficulty:r,timeEstimate:o,meta:i,className:l}){const a=r!=null||o!=null,c=e!=null;return p.jsxs("header",{className:U("flex flex-col gap-4 border-b border-default pb-6 md:[grid-area:header]",c&&"sm:flex-row sm:items-center sm:gap-6",l),children:[c&&p.jsx("div",{className:"aspect-[4/3] h-32 shrink-0 overflow-hidden rounded-lg border border-default bg-default-100",children:p.jsx(ar,{src:e,role:"hero",alt:n??"",className:"size-full object-cover"})}),p.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-4",children:[p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:t}),i!=null&&p.jsx("div",{className:"text-sm text-default-500",children:i})]}),a&&p.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r!=null&&p.jsx(qc,{difficulty:r}),o!=null&&p.jsx(Vn,{variant:"soft",color:"default",children:p.jsx(Vn.Label,{children:o})})]})]})]})}function ky({children:t,className:e}){return p.jsx("div",{className:U("min-w-0 md:[grid-area:intro]",e),children:p.jsx("div",{className:"max-w-prose text-default-700",children:t})})}function Ty({children:t,className:e}){return p.jsx("aside",{className:U("min-w-0 md:[grid-area:sidebar]",e),children:p.jsx("div",{className:"flex flex-col gap-4",children:t})})}function My({children:t,className:e}){const n=qo();return p.jsx("main",{ref:n,className:U("min-w-0 w-full md:[grid-area:main]",e),children:t})}const Ry=Object.assign(function({children:e,scrollMarginTop:n=0,className:r}){const o=s.useRef(null),i=s.useRef(null),l=s.useMemo(()=>ur({parentScrollMarginTop:n}),[n]),a=s.useMemo(()=>({scrollMarginTop:l}),[l]);return p.jsx(mu.Provider,{value:o,children:p.jsx(bu.Provider,{value:i,children:p.jsx(Wo.Provider,{value:n,children:p.jsx("div",{ref:o,style:a,className:U("mx-auto grid w-full max-w-6xl grid-cols-1 gap-x-8 gap-y-8 md:grid-cols-[minmax(0,1fr)_20rem] md:[grid-template-areas:'header_header'_'intro_sidebar'_'main_main']",r),children:e})})})})},{Header:Py,Intro:ky,Sidebar:Ty,Content:My});exports.COLORS=je;exports.Callout=tg;exports.DISPLAY_REGION_ASPECT=Hn;exports.DifficultyBadge=qc;exports.GUIDE_IMAGE_THUMBNAILS_DIR=Gn;exports.GUIDE_IMAGE_VARIANTS_FILENAME=tu;exports.GUIDE_IMAGE_VARIANTS_PATH=pg;exports.GUIDE_IMAGE_VARIANT_FORMAT=fo;exports.GUIDE_IMAGE_VARIANT_WIDTHS=fg;exports.GuideImageVariantsProvider=dg;exports.GuideLayout=Ry;exports.GuideResponsiveImage=ar;exports.GuideScrollMarginContext=Wo;exports.GuideStep=fy;exports.GuideStepList=Cy;exports.LinkButton=Wg;exports.MIN_REGION_WIDTH=_o;exports.MediaCropEditor=Ng;exports.MediaFigure=cr;exports.MediaFigureThumbnail=lu;exports.ToolList=Ag;exports.buildGuideStepUrl=Eu;exports.calloutTypeColor=_l;exports.calloutTypeHex=Bl;exports.calloutTypeLabel=Pn;exports.centeredDisplayRegion=Jc;exports.clampDisplayRegion=kt;exports.computeGuideLibraryScrollMarginTop=vu;exports.computeGuideOverviewScrollMarginTop=ur;exports.computeGuideStepScrollMarginTop=xu;exports.computeParentScrollMarginTop=yu;exports.displayRegionFromPixels=Zc;exports.displayRegionHeight=Bo;exports.displayRegionHeightPercent=wt;exports.displayRegionToPixels=sg;exports.guideImageBasename=nu;exports.guideImageVariantUrl=po;exports.guideImageVariantWidths=ru;exports.guideStepUrlId=fr;exports.hexToRgba=ot;exports.isLegacyPixelDisplayRegion=Xc;exports.markerTextColor=Wn;exports.mediaFigureType=Uo;exports.normalizeDisplayRegion=Vo;exports.parseGuideStepFromHash=$u;exports.parseGuideStepFromSearch=wu;exports.readGuideStepFromLocation=Cn;exports.resolveGuideImageSrcSet=Ho;exports.useGuideContentRef=qo;exports.useGuideImagePreferredSrc=bg;exports.useGuideImageVariants=zo;exports.useGuideScrollMargin=gu;
|
|
29
29
|
//# sourceMappingURL=diy-guides-ui.cjs.map
|