@commercetools/nimbus 0.0.7-rc3 → 0.0.7-rc4

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/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("@chakra-ui/react"),U=require("@commercetools/nimbus-tokens"),s=require("react"),P=require("react/jsx-runtime"),je=require("react-dom"),se=require("@commercetools/nimbus-icons");function Xs(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const X=Xs(s),ri=w.defineRecipe({className:"avatar",base:{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",overflow:"hidden",userSelect:"none",borderRadius:"full",flexShrink:0,fontWeight:"600",backgroundColor:"colorPalette.3",colorPalette:"primary",color:"colorPalette.11",focusVisibleRing:"outside","button&":{cursor:"button"},_disabled:{layerStyle:"disabled"}},variants:{size:{md:{width:1e3,height:1e3,textStyle:"sm"},xs:{width:800,height:800,textStyle:"xs"},"2xs":{width:600,height:600,textStyle:"xs"}}},defaultVariants:{size:"md"}}),{withContext:Js}=w.createRecipeContext({recipe:ri}),Qs=Js("figure");function eu(t,e){return t.split("")[0].toUpperCase()+e.split("")[0].toUpperCase()}const ni=s.forwardRef((t,e)=>{const{firstName:r,lastName:n,src:o,alt:i,...l}=t,a=`${r} ${n}`,u={"aria-label":`${a} avatar`,ref:e,...l};return P.jsx(Qs,{...u,children:o?P.jsx(w.Image,{src:o,alt:i||a}):eu(r,n)})});ni.displayName="Avatar";const xe=s.forwardRef((t,e)=>P.jsx(w.Box,{ref:e,...t}));xe.displayName="Box";const H=typeof document<"u"?s.useLayoutEffect:()=>{};function J(t){const e=s.useRef(null);return H(()=>{e.current=t},[t]),s.useCallback((...r)=>{const n=e.current;return n==null?void 0:n(...r)},[])}function tu(t){let[e,r]=s.useState(t),n=s.useRef(null),o=J(()=>{if(!n.current)return;let l=n.current.next();if(l.done){n.current=null;return}e===l.value?o():r(l.value)});H(()=>{n.current&&o()});let i=J(l=>{n.current=l(e),o()});return[e,i]}const Bt={prefix:String(Math.round(Math.random()*1e10)),current:0},oi=s.createContext(Bt),ru=s.createContext(!1);let nu=!!(typeof window<"u"&&window.document&&window.document.createElement),hr=new WeakMap;function ou(t=!1){let e=s.useContext(oi),r=s.useRef(null);if(r.current===null&&!t){var n,o;let i=(o=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(n=o.ReactCurrentOwner)===null||n===void 0?void 0:n.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))}r.current=++e.current}return r.current}function iu(t){let e=s.useContext(oi);e===Bt&&!nu&&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 r=ou(!!t),n=e===Bt&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${n}-${r}`}function lu(t){let e=s.useId(),[r]=s.useState(_e()),n=r||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Bt.prefix}`;return t||`${n}-${e}`}const au=typeof s.useId=="function"?lu:iu;function su(){return!1}function uu(){return!0}function cu(t){return()=>{}}function _e(){return typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore(cu,su,uu):s.useContext(ru)}let du=!!(typeof window<"u"&&window.document&&window.document.createElement),tt=new Map,ct;typeof FinalizationRegistry<"u"&&(ct=new FinalizationRegistry(t=>{tt.delete(t)}));function te(t){let[e,r]=s.useState(t),n=s.useRef(null),o=au(e),i=s.useRef(null);if(ct&&ct.register(i,o),du){const l=tt.get(o);l&&!l.includes(n)?l.push(n):tt.set(o,[n])}return H(()=>{let l=o;return()=>{ct&&ct.unregister(i),tt.delete(l)}},[o]),s.useEffect(()=>{let l=n.current;return l&&r(l),()=>{l&&(n.current=null)}}),o}function fu(t,e){if(t===e)return t;let r=tt.get(t);if(r)return r.forEach(o=>o.current=e),e;let n=tt.get(e);return n?(n.forEach(o=>o.current=t),t):e}function bt(t=[]){let e=te(),[r,n]=tu(e),o=s.useCallback(()=>{n(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,n]);return H(o,[e,o,...t]),r}function Te(...t){return(...e)=>{for(let r of t)typeof r=="function"&&r(...e)}}const j=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},oe=t=>t&&"window"in t&&t.window===t?t:j(t).defaultView||window;function pu(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function vu(t){return pu(t)&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}let bu=!1;function Yt(){return bu}function W(t,e){if(!Yt())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let r=e;for(;r!==null;){if(r===t)return!0;r.tagName==="SLOT"&&r.assignedSlot?r=r.assignedSlot.parentNode:vu(r)?r=r.host:r=r.parentNode}return!1}const re=(t=document)=>{var e;if(!Yt())return t.activeElement;let r=t.activeElement;for(;r&&"shadowRoot"in r&&(!((e=r.shadowRoot)===null||e===void 0)&&e.activeElement);)r=r.shadowRoot.activeElement;return r};function V(t){return Yt()&&t.target.shadowRoot&&t.composedPath?t.composedPath()[0]:t.target}class hu{get currentNode(){return this._currentNode}set currentNode(e){if(!W(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const r=[];let n=e,o=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const l=n,a=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});r.push(a),a.currentNode=o,this._currentSetFor.add(a),n=o=l.host}else n=n.parentNode;const i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});r.push(i),i.currentNode=o,this._currentSetFor.add(i),this._walkerStack=r}get doc(){return this._doc}firstChild(){let e=this.currentNode,r=this.nextNode();return W(e,r)?(r&&(this.currentNode=r),r):(this.currentNode=e,null)}lastChild(){let r=this._walkerStack[0].lastChild();return r&&(this.currentNode=r),r}nextNode(){const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){var r;let o;if(typeof this.filter=="function"?o=this.filter(e):!((r=this.filter)===null||r===void 0)&&r.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 n=this.nextNode();return n&&(this.currentNode=n),n}else return null}previousNode(){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 r=e.previousNode();if(r){if(r.shadowRoot){var n;let i;if(typeof this.filter=="function"?i=this.filter(r):!((n=this.filter)===null||n===void 0)&&n.acceptNode&&(i=this.filter.acceptNode(r)),i===NodeFilter.FILTER_ACCEPT)return r&&(this.currentNode=r),r;let l=this.lastChild();return l&&(this.currentNode=l),l}return r&&(this.currentNode=r),r}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}constructor(e,r,n,o){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=l=>{if(l.nodeType===Node.ELEMENT_NODE){const u=l.shadowRoot;if(u){const c=this._doc.createTreeWalker(u,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(c),NodeFilter.FILTER_ACCEPT}else{var a;if(typeof this.filter=="function")return this.filter(l);if(!((a=this.filter)===null||a===void 0)&&a.acceptNode)return this.filter.acceptNode(l);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=r,this.filter=o??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=r,this._walkerStack.unshift(e.createTreeWalker(r,n,this._acceptNode));const i=r.shadowRoot;if(i){const l=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(l)}}}function gu(t,e,r,n){return Yt()?new hu(t,e,r,n):t.createTreeWalker(e,r,n)}function ii(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=ii(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function mu(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=ii(t))&&(n&&(n+=" "),n+=e);return n}function A(...t){let e={...t[0]};for(let r=1;r<t.length;r++){let n=t[r];for(let o in n){let i=e[o],l=n[o];typeof i=="function"&&typeof l=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?e[o]=Te(i,l):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof l=="string"?e[o]=mu(i,l):o==="id"&&i&&l?e.id=fu(i,l):e[o]=l!==void 0?l:i}}return e}function li(...t){return t.length===1&&t[0]?t[0]:e=>{for(let r of t)typeof r=="function"?r(e):r!=null&&(r.current=e)}}const yu=new Set(["id"]),$u=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),xu=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Su=/^(data-.*)$/;function Q(t,e={}){let{labelable:r,isLink:n,propNames:o}=e,i={};for(const l in t)Object.prototype.hasOwnProperty.call(t,l)&&(yu.has(l)||r&&$u.has(l)||n&&xu.has(l)||o!=null&&o.has(l)||Su.test(l))&&(i[l]=t[l]);return i}function be(t){if(Pu())t.focus({preventScroll:!0});else{let e=Eu(t);t.focus(),wu(e)}}let Dt=null;function Pu(){if(Dt==null){Dt=!1;try{document.createElement("div").focus({get preventScroll(){return Dt=!0,!0}})}catch{}}return Dt}function Eu(t){let e=t.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==n;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&r.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function wu(t){for(let{element:e,scrollTop:r,scrollLeft:n}of t)e.scrollTop=r,e.scrollLeft=n}function Zt(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(r=>t.test(r.brand)))||t.test(window.navigator.userAgent)}function ln(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function Se(t){if(process.env.NODE_ENV==="test")return t;let e=null;return()=>(e==null&&(e=t()),e)}const ke=Se(function(){return ln(/^Mac/i)}),Cu=Se(function(){return ln(/^iPhone/i)}),ai=Se(function(){return ln(/^iPad/i)||ke()&&navigator.maxTouchPoints>1}),Xt=Se(function(){return Cu()||ai()}),Tu=Se(function(){return ke()||Xt()}),an=Se(function(){return Zt(/AppleWebKit/i)&&!si()}),si=Se(function(){return Zt(/Chrome/i)}),sn=Se(function(){return Zt(/Android/i)}),ku=Se(function(){return Zt(/Firefox/i)}),Du=s.createContext({isNative:!0,open:Lu,useHref:t=>t});function Jt(){return s.useContext(Du)}function Ru(t,e){let r=t.getAttribute("target");return(!r||r==="_self")&&t.origin===location.origin&&!t.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function ze(t,e,r=!0){var n,o;let{metaKey:i,ctrlKey:l,altKey:a,shiftKey:u}=e;ku()&&(!((o=window.event)===null||o===void 0||(n=o.type)===null||n===void 0)&&n.startsWith("key"))&&t.target==="_blank"&&(ke()?i=!0:l=!0);let c=an()&&ke()&&!ai()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:l,altKey:a,shiftKey:u}):new MouseEvent("click",{metaKey:i,ctrlKey:l,altKey:a,shiftKey:u,bubbles:!0,cancelable:!0});ze.isOpening=r,be(t),t.dispatchEvent(c),ze.isOpening=!1}ze.isOpening=!1;function Ku(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let r=document.createElement("a");r.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(r.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(r.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(r.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(r.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(r.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(r),e(r),t.removeChild(r)}}function Lu(t,e){Ku(t,r=>ze(r,e))}function ui(t){let e=Jt();var r;const n=e.useHref((r=t==null?void 0:t.href)!==null&&r!==void 0?r:"");return{href:t!=null&&t.href?n:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let Xe=new Map,Nr=new Set;function Qn(){if(typeof window>"u")return;function t(n){return"propertyName"in n}let e=n=>{if(!t(n)||!n.target)return;let o=Xe.get(n.target);o||(o=new Set,Xe.set(n.target,o),n.target.addEventListener("transitioncancel",r,{once:!0})),o.add(n.propertyName)},r=n=>{if(!t(n)||!n.target)return;let o=Xe.get(n.target);if(o&&(o.delete(n.propertyName),o.size===0&&(n.target.removeEventListener("transitioncancel",r),Xe.delete(n.target)),Xe.size===0)){for(let i of Nr)i();Nr.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",r)}typeof document<"u"&&(document.readyState!=="loading"?Qn():document.addEventListener("DOMContentLoaded",Qn));function ci(t){requestAnimationFrame(()=>{Xe.size===0?t():Nr.add(t)})}function Qt(){let t=s.useRef(new Map),e=s.useCallback((o,i,l,a)=>{let u=a!=null&&a.once?(...c)=>{t.current.delete(l),l(...c)}:l;t.current.set(l,{type:i,eventTarget:o,fn:u,options:a}),o.addEventListener(i,u,a)},[]),r=s.useCallback((o,i,l,a)=>{var u;let c=((u=t.current.get(l))===null||u===void 0?void 0:u.fn)||l;o.removeEventListener(i,c,a),t.current.delete(l)},[]),n=s.useCallback(()=>{t.current.forEach((o,i)=>{r(o.eventTarget,o.type,i,o.options)})},[r]);return s.useEffect(()=>n,[n]),{addGlobalListener:e,removeGlobalListener:r,removeAllGlobalListeners:n}}function di(t,e){let{id:r,"aria-label":n,"aria-labelledby":o}=t;return r=te(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!n&&!o&&e&&(n=e),{id:r,"aria-label":n,"aria-labelledby":o}}function de(t){const e=s.useRef(null);return s.useMemo(()=>({get current(){return e.current},set current(r){e.current=r,typeof t=="function"?t(r):t&&(t.current=r)}}),[t])}function eo(t,e){const r=s.useRef(!0),n=s.useRef(null);H(()=>(r.current=!0,()=>{r.current=!1}),[]),H(()=>{r.current?r.current=!1:(!n.current||e.some((o,i)=>!Object.is(o,n[i])))&&t(),n.current=e},e)}function Fu(){return typeof window.ResizeObserver<"u"}function Br(t){const{ref:e,box:r,onResize:n}=t;s.useEffect(()=>{let o=e==null?void 0:e.current;if(o)if(Fu()){const i=new window.ResizeObserver(l=>{l.length&&n()});return i.observe(o,{box:r}),()=>{o&&i.unobserve(o)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,e,r])}function un(t,e){H(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function ht(t,e){if(!t)return!1;let r=window.getComputedStyle(t),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&e&&(n=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),n}function fi(t,e){let r=t;for(ht(r,e)&&(r=r.parentElement);r&&!ht(r,e);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function Mu(t,e){const r=[];for(;t&&t!==document.documentElement;)ht(t,e)&&r.push(t),t=t.parentElement;return r}let Au=0;const gr=new Map;function Iu(t){let[e,r]=s.useState();return H(()=>{if(!t)return;let n=gr.get(t);if(n)r(n.element.id);else{let o=`react-aria-description-${Au++}`;r(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=t,document.body.appendChild(i),n={refCount:0,element:i},gr.set(t,n)}return n.refCount++,()=>{n&&--n.refCount===0&&(n.element.remove(),gr.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function dt(t,e,r,n){let o=J(r),i=r==null;s.useEffect(()=>{if(i||!t.current)return;let l=t.current;return l.addEventListener(e,o,n),()=>{l.removeEventListener(e,o,n)}},[t,e,n,i,o])}function pi(t,e){let r=to(t,e,"left"),n=to(t,e,"top"),o=e.offsetWidth,i=e.offsetHeight,l=t.scrollLeft,a=t.scrollTop,{borderTopWidth:u,borderLeftWidth:c,scrollPaddingTop:d,scrollPaddingRight:f,scrollPaddingBottom:v,scrollPaddingLeft:p}=getComputedStyle(t),b=l+parseInt(c,10),m=a+parseInt(u,10),y=b+t.clientWidth,$=m+t.clientHeight,E=parseInt(d,10)||0,C=parseInt(v,10)||0,K=parseInt(f,10)||0,T=parseInt(p,10)||0;r<=l+T?l=r-parseInt(c,10)-T:r+o>y-K&&(l+=r+o-y+K),n<=m+E?a=n-parseInt(u,10)-E:n+i>$-C&&(a+=n+i-$+C),t.scrollLeft=l,t.scrollTop=a}function to(t,e,r){const n=r==="left"?"offsetLeft":"offsetTop";let o=0;for(;e.offsetParent&&(o+=e[n],e.offsetParent!==t);){if(e.offsetParent.contains(t)){o-=t[n];break}e=e.offsetParent}return o}function ro(t,e){if(t&&document.contains(t)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let u=Mu(t);for(let c of u)pi(c,t)}else{var r;let{left:u,top:c}=t.getBoundingClientRect();t==null||(r=t.scrollIntoView)===null||r===void 0||r.call(t,{block:"nearest"});let{left:d,top:f}=t.getBoundingClientRect();if(Math.abs(u-d)>1||Math.abs(c-f)>1){var n,o,i;e==null||(o=e.containingElement)===null||o===void 0||(n=o.scrollIntoView)===null||n===void 0||n.call(o,{block:"center",inline:"center"}),(i=t.scrollIntoView)===null||i===void 0||i.call(t,{block:"nearest"})}}}}function Or(t){return t.mozInputSource===0&&t.isTrusted?!0:sn()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Nu(t){return!sn()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function cn(t,e,r){let n=s.useRef(e),o=J(()=>{r&&r(n.current)});s.useEffect(()=>{var i;let l=t==null||(i=t.current)===null||i===void 0?void 0:i.form;return l==null||l.addEventListener("reset",o),()=>{l==null||l.removeEventListener("reset",o)}},[t,o])}const Bu="react-aria-clear-focus",Ou="react-aria-focus";function Je(t){return ke()?t.metaKey:t.ctrlKey}function vi(t,e=!0){let[r,n]=s.useState(!0),o=r&&e;return H(()=>{if(o&&t.current&&"getAnimations"in t.current)for(let i of t.current.getAnimations())i instanceof CSSTransition&&i.cancel()},[t,o]),hi(t,o,s.useCallback(()=>n(!1),[])),o}function bi(t,e){let[r,n]=s.useState(e?"open":"closed");switch(r){case"open":e||n("exiting");break;case"closed":case"exiting":e&&n("open");break}let o=r==="exiting";return hi(t,o,s.useCallback(()=>{n(i=>i==="exiting"?"closed":i)},[])),o}function hi(t,e,r){H(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){r();return}let n=t.current.getAnimations();if(n.length===0){r();return}let o=!1;return Promise.all(n.map(i=>i.finished)).then(()=>{o||je.flushSync(()=>{r()})}).catch(()=>{}),()=>{o=!0}}},[t,e,r])}const dn=["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"])'],zu=dn.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";dn.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Hu=dn.join(':not([hidden]):not([tabindex="-1"]),');function gi(t){return t.matches(zu)}function Vu(t){return t.matches(Hu)}function Re(t,e,r){let[n,o]=s.useState(t||e),i=s.useRef(t!==void 0),l=t!==void 0;s.useEffect(()=>{let c=i.current;c!==l&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),i.current=l},[l]);let a=l?t:n,u=s.useCallback((c,...d)=>{let f=(v,...p)=>{r&&(Object.is(a,v)||r(v,...p)),l||(a=v)};typeof c=="function"?(process.env.NODE_ENV!=="production"&&console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),o((p,...b)=>{let m=c(l?a:p,...b);return f(m,...d),l?p:m})):(l||o(c),f(c,...d))},[l,a,r]);return[a,u]}function Ot(t,e=-1/0,r=1/0){return Math.min(Math.max(t,e),r)}function fn(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function mi(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function yi(t){let e=s.useRef({isFocused:!1,observer:null});H(()=>{const n=e.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]);let r=J(n=>{t==null||t(n)});return s.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){e.current.isFocused=!0;let o=n.target,i=l=>{if(e.current.isFocused=!1,o.disabled){let a=fn(l);r(a)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&o.disabled){var l;(l=e.current.observer)===null||l===void 0||l.disconnect();let a=o===document.activeElement?null:document.activeElement;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"]})}},[r])}let zt=!1;function no(t){for(;t&&!gi(t);)t=t.parentElement;let e=oe(t),r=e.document.activeElement;if(!r||r===t)return;zt=!0;let n=!1,o=d=>{(d.target===r||n)&&d.stopImmediatePropagation()},i=d=>{(d.target===r||n)&&(d.stopImmediatePropagation(),!t&&!n&&(n=!0,be(r),u()))},l=d=>{(d.target===t||n)&&d.stopImmediatePropagation()},a=d=>{(d.target===t||n)&&(d.stopImmediatePropagation(),n||(n=!0,be(r),u()))};e.addEventListener("blur",o,!0),e.addEventListener("focusout",i,!0),e.addEventListener("focusin",a,!0),e.addEventListener("focus",l,!0);let u=()=>{cancelAnimationFrame(c),e.removeEventListener("blur",o,!0),e.removeEventListener("focusout",i,!0),e.removeEventListener("focusin",a,!0),e.removeEventListener("focus",l,!0),zt=!1,n=!1},c=requestAnimationFrame(u);return u}let Qe="default",zr="",It=new WeakMap;function oo(t){if(Xt()){if(Qe==="default"){const e=j(t);zr=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}Qe="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";It.set(t,t.style[e]),t.style[e]="none"}}function mr(t){if(Xt()){if(Qe!=="disabled")return;Qe="restoring",setTimeout(()=>{ci(()=>{if(Qe==="restoring"){const e=j(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=zr||""),zr="",Qe="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&It.has(t)){let e=It.get(t),r="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[r]==="none"&&(t.style[r]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),It.delete(t)}}const gt=s.createContext({register:()=>{}});gt.displayName="PressResponderContext";function ju(t,e){return e.get?e.get.call(t):e.value}function $i(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function _u(t,e){var r=$i(t,e,"get");return ju(t,r)}function Wu(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Uu(t,e,r){Wu(t,e),e.set(t,r)}function Gu(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}function io(t,e,r){var n=$i(t,e,"set");return Gu(t,n,r),r}function qu(t){let e=s.useContext(gt);if(e){let{register:r,...n}=e;t=A(n,t),r()}return un(e,t.ref),t}var Rt=new WeakMap;class Kt{continuePropagation(){io(this,Rt,!1)}get shouldStopPropagation(){return _u(this,Rt)}constructor(e,r,n,o){Uu(this,Rt,{writable:!0,value:void 0}),io(this,Rt,!0);var i;let l=(i=o==null?void 0:o.target)!==null&&i!==void 0?i:n.currentTarget;const a=l==null?void 0:l.getBoundingClientRect();let u,c=0,d,f=null;n.clientX!=null&&n.clientY!=null&&(d=n.clientX,f=n.clientY),a&&(d!=null&&f!=null?(u=d-a.left,c=f-a.top):(u=a.width/2,c=a.height/2)),this.type=e,this.pointerType=r,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=u,this.y=c}}const lo=Symbol("linkClicked");function He(t){let{onPress:e,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:l,isDisabled:a,isPressed:u,preventFocusOnPress:c,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:f,ref:v,...p}=qu(t),[b,m]=s.useState(!1),y=s.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:$,removeAllGlobalListeners:E}=Qt(),C=J((h,R)=>{let B=y.current;if(a||B.didFirePressStart)return!1;let D=!0;if(B.isTriggeringEvent=!0,n){let z=new Kt("pressstart",R,h);n(z),D=z.shouldStopPropagation}return r&&r(!0),B.isTriggeringEvent=!1,B.didFirePressStart=!0,m(!0),D}),K=J((h,R,B=!0)=>{let D=y.current;if(!D.didFirePressStart)return!1;D.didFirePressStart=!1,D.isTriggeringEvent=!0;let z=!0;if(o){let g=new Kt("pressend",R,h);o(g),z=g.shouldStopPropagation}if(r&&r(!1),m(!1),e&&B&&!a){let g=new Kt("press",R,h);e(g),z&&(z=g.shouldStopPropagation)}return D.isTriggeringEvent=!1,z}),T=J((h,R)=>{let B=y.current;if(a)return!1;if(i){B.isTriggeringEvent=!0;let D=new Kt("pressup",R,h);return i(D),B.isTriggeringEvent=!1,D.shouldStopPropagation}return!0}),x=J(h=>{let R=y.current;if(R.isPressed&&R.target){R.didFirePressStart&&R.pointerType!=null&&K(Ye(R.target,h),R.pointerType,!1),R.isPressed=!1,R.isOverTarget=!1,R.activePointerId=null,R.pointerType=null,E(),f||mr(R.target);for(let B of R.disposables)B();R.disposables=[]}}),M=J(h=>{d&&x(h)}),F=J(h=>{l==null||l(h)}),N=J((h,R)=>{if(l){let B=new MouseEvent("click",h);mi(B,R),l(fn(B))}}),L=s.useMemo(()=>{let h=y.current,R={onKeyDown(D){if(yr(D.nativeEvent,D.currentTarget)&&W(D.currentTarget,V(D.nativeEvent))){var z;uo(V(D.nativeEvent),D.key)&&D.preventDefault();let g=!0;if(!h.isPressed&&!D.repeat){h.target=D.currentTarget,h.isPressed=!0,h.pointerType="keyboard",g=C(D,"keyboard");let k=D.currentTarget,S=O=>{yr(O,k)&&!O.repeat&&W(k,V(O))&&h.target&&T(Ye(h.target,O),"keyboard")};$(j(D.currentTarget),"keyup",Te(S,B),!0)}g&&D.stopPropagation(),D.metaKey&&ke()&&((z=h.metaKeyEvents)===null||z===void 0||z.set(D.key,D.nativeEvent))}else D.key==="Meta"&&(h.metaKeyEvents=new Map)},onClick(D){if(!(D&&!W(D.currentTarget,V(D.nativeEvent)))&&D&&D.button===0&&!h.isTriggeringEvent&&!ze.isOpening){let z=!0;if(a&&D.preventDefault(),!h.ignoreEmulatedMouseEvents&&!h.isPressed&&(h.pointerType==="virtual"||Or(D.nativeEvent))){let g=C(D,"virtual"),k=T(D,"virtual"),S=K(D,"virtual");F(D),z=g&&k&&S}else if(h.isPressed&&h.pointerType!=="keyboard"){let g=h.pointerType||D.nativeEvent.pointerType||"virtual";z=K(Ye(D.currentTarget,D),g,!0),h.isOverTarget=!1,F(D),x(D)}h.ignoreEmulatedMouseEvents=!1,z&&D.stopPropagation()}}},B=D=>{var z;if(h.isPressed&&h.target&&yr(D,h.target)){var g;uo(V(D),D.key)&&D.preventDefault();let S=V(D),O=W(h.target,V(D));K(Ye(h.target,D),"keyboard",O),O&&N(D,h.target),E(),D.key!=="Enter"&&pn(h.target)&&W(h.target,S)&&!D[lo]&&(D[lo]=!0,ze(h.target,D,!1)),h.isPressed=!1,(g=h.metaKeyEvents)===null||g===void 0||g.delete(D.key)}else if(D.key==="Meta"&&(!((z=h.metaKeyEvents)===null||z===void 0)&&z.size)){var k;let S=h.metaKeyEvents;h.metaKeyEvents=void 0;for(let O of S.values())(k=h.target)===null||k===void 0||k.dispatchEvent(new KeyboardEvent("keyup",O))}};if(typeof PointerEvent<"u"){R.onPointerDown=g=>{if(g.button!==0||!W(g.currentTarget,V(g.nativeEvent)))return;if(Nu(g.nativeEvent)){h.pointerType="virtual";return}h.pointerType=g.pointerType;let k=!0;if(!h.isPressed){h.isPressed=!0,h.isOverTarget=!0,h.activePointerId=g.pointerId,h.target=g.currentTarget,f||oo(h.target),k=C(g,h.pointerType);let S=V(g.nativeEvent);"releasePointerCapture"in S&&S.releasePointerCapture(g.pointerId),$(j(g.currentTarget),"pointerup",D,!1),$(j(g.currentTarget),"pointercancel",z,!1)}k&&g.stopPropagation()},R.onMouseDown=g=>{if(W(g.currentTarget,V(g.nativeEvent))&&g.button===0){if(c){let k=no(g.target);k&&h.disposables.push(k)}g.stopPropagation()}},R.onPointerUp=g=>{!W(g.currentTarget,V(g.nativeEvent))||h.pointerType==="virtual"||g.button===0&&T(g,h.pointerType||g.pointerType)},R.onPointerEnter=g=>{g.pointerId===h.activePointerId&&h.target&&!h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!0,C(Ye(h.target,g),h.pointerType))},R.onPointerLeave=g=>{g.pointerId===h.activePointerId&&h.target&&h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!1,K(Ye(h.target,g),h.pointerType,!1),M(g))};let D=g=>{if(g.pointerId===h.activePointerId&&h.isPressed&&g.button===0&&h.target){if(W(h.target,V(g))&&h.pointerType!=null){let k=!1,S=setTimeout(()=>{h.isPressed&&h.target instanceof HTMLElement&&(k?x(g):(be(h.target),h.target.click()))},80);$(g.currentTarget,"click",()=>k=!0,!0),h.disposables.push(()=>clearTimeout(S))}else x(g);h.isOverTarget=!1}},z=g=>{x(g)};R.onDragStart=g=>{W(g.currentTarget,V(g.nativeEvent))&&x(g)}}else if(process.env.NODE_ENV==="test"){R.onMouseDown=g=>{if(g.button!==0||!W(g.currentTarget,V(g.nativeEvent)))return;if(h.ignoreEmulatedMouseEvents){g.stopPropagation();return}if(h.isPressed=!0,h.isOverTarget=!0,h.target=g.currentTarget,h.pointerType=Or(g.nativeEvent)?"virtual":"mouse",je.flushSync(()=>C(g,h.pointerType))&&g.stopPropagation(),c){let S=no(g.target);S&&h.disposables.push(S)}$(j(g.currentTarget),"mouseup",D,!1)},R.onMouseEnter=g=>{if(!W(g.currentTarget,V(g.nativeEvent)))return;let k=!0;h.isPressed&&!h.ignoreEmulatedMouseEvents&&h.pointerType!=null&&(h.isOverTarget=!0,k=C(g,h.pointerType)),k&&g.stopPropagation()},R.onMouseLeave=g=>{if(!W(g.currentTarget,V(g.nativeEvent)))return;let k=!0;h.isPressed&&!h.ignoreEmulatedMouseEvents&&h.pointerType!=null&&(h.isOverTarget=!1,k=K(g,h.pointerType,!1),M(g)),k&&g.stopPropagation()},R.onMouseUp=g=>{W(g.currentTarget,V(g.nativeEvent))&&!h.ignoreEmulatedMouseEvents&&g.button===0&&T(g,h.pointerType||"mouse")};let D=g=>{if(g.button===0){if(h.ignoreEmulatedMouseEvents){h.ignoreEmulatedMouseEvents=!1;return}h.target&&h.target.contains(g.target)&&h.pointerType!=null||x(g),h.isOverTarget=!1}};R.onTouchStart=g=>{if(!W(g.currentTarget,V(g.nativeEvent)))return;let k=Yu(g.nativeEvent);if(!k)return;h.activePointerId=k.identifier,h.ignoreEmulatedMouseEvents=!0,h.isOverTarget=!0,h.isPressed=!0,h.target=g.currentTarget,h.pointerType="touch",f||oo(h.target),C(Pe(h.target,g),h.pointerType)&&g.stopPropagation(),$(oe(g.currentTarget),"scroll",z,!0)},R.onTouchMove=g=>{if(!W(g.currentTarget,V(g.nativeEvent)))return;if(!h.isPressed){g.stopPropagation();return}let k=ao(g.nativeEvent,h.activePointerId),S=!0;k&&so(k,g.currentTarget)?!h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!0,S=C(Pe(h.target,g),h.pointerType)):h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!1,S=K(Pe(h.target,g),h.pointerType,!1),M(Pe(h.target,g))),S&&g.stopPropagation()},R.onTouchEnd=g=>{if(!W(g.currentTarget,V(g.nativeEvent)))return;if(!h.isPressed){g.stopPropagation();return}let k=ao(g.nativeEvent,h.activePointerId),S=!0;k&&so(k,g.currentTarget)&&h.pointerType!=null?(T(Pe(h.target,g),h.pointerType),S=K(Pe(h.target,g),h.pointerType),N(g.nativeEvent,h.target)):h.isOverTarget&&h.pointerType!=null&&(S=K(Pe(h.target,g),h.pointerType,!1)),S&&g.stopPropagation(),h.isPressed=!1,h.activePointerId=null,h.isOverTarget=!1,h.ignoreEmulatedMouseEvents=!0,h.target&&!f&&mr(h.target),E()},R.onTouchCancel=g=>{W(g.currentTarget,V(g.nativeEvent))&&(g.stopPropagation(),h.isPressed&&x(Pe(h.target,g)))};let z=g=>{h.isPressed&&W(V(g),h.target)&&x({currentTarget:h.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=g=>{W(g.currentTarget,V(g.nativeEvent))&&x(g)}}return R},[$,a,c,E,f,x,M,K,C,T,F,N]);return s.useEffect(()=>{let h=v==null?void 0:v.current;h&&h instanceof oe(h).Element&&oe(h).getComputedStyle(h).touchAction==="auto"&&(h.style.touchAction="pan-x pan-y pinch-zoom")},[v]),s.useEffect(()=>{let h=y.current;return()=>{var R;f||mr((R=h.target)!==null&&R!==void 0?R:void 0);for(let B of h.disposables)B();h.disposables=[]}},[f]),{isPressed:u||b,pressProps:A(p,L)}}function pn(t){return t.tagName==="A"&&t.hasAttribute("href")}function yr(t,e){const{key:r,code:n}=t,o=e,i=o.getAttribute("role");return(r==="Enter"||r===" "||r==="Spacebar"||n==="Space")&&!(o instanceof oe(o).HTMLInputElement&&!xi(o,r)||o instanceof oe(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&pn(o))&&r!=="Enter")}function Yu(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function ao(t,e){const r=t.changedTouches;for(let n=0;n<r.length;n++){const o=r[n];if(o.identifier===e)return o}return null}function Pe(t,e){let r=0,n=0;return e.targetTouches&&e.targetTouches.length===1&&(r=e.targetTouches[0].clientX,n=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:r,clientY:n}}function Ye(t,e){let r=e.clientX,n=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:r,clientY:n}}function Zu(t){let e=0,r=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?r=t.height/2:t.radiusY!==void 0&&(r=t.radiusY),{top:t.clientY-r,right:t.clientX+e,bottom:t.clientY+r,left:t.clientX-e}}function Xu(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function so(t,e){let r=e.getBoundingClientRect(),n=Zu(t);return Xu(r,n)}function Ju(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!pn(t)}function uo(t,e){return t instanceof HTMLInputElement?!xi(t,e):Ju(t)}const Qu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function xi(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":Qu.has(t.type)}let We=null,Hr=new Set,vt=new Map,Ve=!1,Vr=!1;const ec={Tab:!0,Escape:!0};function er(t,e){for(let r of Hr)r(t,e)}function tc(t){return!(t.metaKey||!ke()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Ht(t){Ve=!0,tc(t)&&(We="keyboard",er("keyboard",t))}function fe(t){We="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Ve=!0,er("pointer",t))}function Si(t){Or(t)&&(Ve=!0,We="virtual")}function Pi(t){t.target===window||t.target===document||zt||!t.isTrusted||(!Ve&&!Vr&&(We="virtual",er("virtual",t)),Ve=!1,Vr=!1)}function Ei(){zt||(Ve=!1,Vr=!0)}function jr(t){if(typeof window>"u"||vt.get(oe(t)))return;const e=oe(t),r=j(t);let n=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Ve=!0,n.apply(this,arguments)},r.addEventListener("keydown",Ht,!0),r.addEventListener("keyup",Ht,!0),r.addEventListener("click",Si,!0),e.addEventListener("focus",Pi,!0),e.addEventListener("blur",Ei,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",fe,!0),r.addEventListener("pointermove",fe,!0),r.addEventListener("pointerup",fe,!0)):process.env.NODE_ENV==="test"&&(r.addEventListener("mousedown",fe,!0),r.addEventListener("mousemove",fe,!0),r.addEventListener("mouseup",fe,!0)),e.addEventListener("beforeunload",()=>{wi(t)},{once:!0}),vt.set(e,{focus:n})}const wi=(t,e)=>{const r=oe(t),n=j(t);e&&n.removeEventListener("DOMContentLoaded",e),vt.has(r)&&(r.HTMLElement.prototype.focus=vt.get(r).focus,n.removeEventListener("keydown",Ht,!0),n.removeEventListener("keyup",Ht,!0),n.removeEventListener("click",Si,!0),r.removeEventListener("focus",Pi,!0),r.removeEventListener("blur",Ei,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",fe,!0),n.removeEventListener("pointermove",fe,!0),n.removeEventListener("pointerup",fe,!0)):process.env.NODE_ENV==="test"&&(n.removeEventListener("mousedown",fe,!0),n.removeEventListener("mousemove",fe,!0),n.removeEventListener("mouseup",fe,!0)),vt.delete(r))};function rc(t){const e=j(t);let r;return e.readyState!=="loading"?jr(t):(r=()=>{jr(t)},e.addEventListener("DOMContentLoaded",r)),()=>wi(t,r)}typeof document<"u"&&rc();function mt(){return We!=="pointer"}function yt(){return We}function Ci(t){We=t,er(t,null)}const nc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function oc(t,e,r){let n=j(r==null?void 0:r.target);const o=typeof window<"u"?oe(r==null?void 0:r.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?oe(r==null?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?oe(r==null?void 0:r.target).HTMLElement:HTMLElement,a=typeof window<"u"?oe(r==null?void 0:r.target).KeyboardEvent:KeyboardEvent;return t=t||n.activeElement instanceof o&&!nc.has(n.activeElement.type)||n.activeElement instanceof i||n.activeElement instanceof l&&n.activeElement.isContentEditable,!(t&&e==="keyboard"&&r instanceof a&&!ec[r.key])}function ic(t,e,r){jr(),s.useEffect(()=>{let n=(o,i)=>{oc(!!(r!=null&&r.isTextInput),o,i)&&t(mt())};return Hr.add(n),()=>{Hr.delete(n)}},e)}function De(t){const e=j(t),r=re(e);if(yt()==="virtual"){let n=r;ci(()=>{re(e)===n&&t.isConnected&&be(t)})}else be(t)}function Ti(t){let{isDisabled:e,onFocus:r,onBlur:n,onFocusChange:o}=t;const i=s.useCallback(u=>{if(u.target===u.currentTarget)return n&&n(u),o&&o(!1),!0},[n,o]),l=yi(i),a=s.useCallback(u=>{const c=j(u.target),d=c?re(c):re();u.target===u.currentTarget&&d===V(u.nativeEvent)&&(r&&r(u),o&&o(!0),l(u))},[o,r,l]);return{focusProps:{onFocus:!e&&(r||o||n)?a:void 0,onBlur:!e&&(n||o)?i:void 0}}}function co(t){if(!t)return;let e=!0;return r=>{let n={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.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(n),e&&r.stopPropagation()}}function lc(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:co(t.onKeyDown),onKeyUp:co(t.onKeyUp)}}}let Vt=s.createContext(null);function ac(t){let e=s.useContext(Vt)||{};un(e,t);let{ref:r,...n}=e;return n}const sc=s.forwardRef(function(e,r){let{children:n,...o}=e,i=de(r),l={...o,ref:i};return s.createElement(Vt.Provider,{value:l},n)});function ot(t,e){let{focusProps:r}=Ti(t),{keyboardProps:n}=lc(t),o=A(r,n),i=ac(e),l=t.isDisabled?{}:i,a=s.useRef(t.autoFocus);s.useEffect(()=>{a.current&&e.current&&De(e.current),a.current=!1},[e]);let u=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(u=void 0),{focusableProps:A({...o,tabIndex:u},l)}}const uc=s.forwardRef(({children:t,...e},r)=>{let n=s.useRef(!1),o=s.useContext(gt);r=de(r||(o==null?void 0:o.ref));let i=A(o||{},{...e,ref:r,register(){n.current=!0,o&&o.register()}});return un(o,r),s.useEffect(()=>{n.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."),n.current=!0)},[]),s.createElement(gt.Provider,{value:i},t)});function cc({children:t}){let e=s.useMemo(()=>({register:()=>{}}),[]);return s.createElement(gt.Provider,{value:e},t)}function tr(t){let{isDisabled:e,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=t,i=s.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:a}=Qt(),u=s.useCallback(f=>{f.currentTarget.contains(f.target)&&i.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(i.current.isFocusWithin=!1,a(),r&&r(f),o&&o(!1))},[r,o,i,a]),c=yi(u),d=s.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const v=j(f.target),p=re(v);if(!i.current.isFocusWithin&&p===V(f.nativeEvent)){n&&n(f),o&&o(!0),i.current.isFocusWithin=!0,c(f);let b=f.currentTarget;l(v,"focus",m=>{if(i.current.isFocusWithin&&!W(b,m.target)){let y=new v.defaultView.FocusEvent("blur",{relatedTarget:m.target});mi(y,b);let $=fn(y);u($)}},{capture:!0})}},[n,o,c,l,u]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:u}}}let jt=!1,$r=0;function _r(){jt=!0,setTimeout(()=>{jt=!1},50)}function fo(t){t.pointerType==="touch"&&_r()}function dc(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",fo):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",_r),$r++,()=>{$r--,!($r>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",fo):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",_r))}}function Ue(t){let{onHoverStart:e,onHoverChange:r,onHoverEnd:n,isDisabled:o}=t,[i,l]=s.useState(!1),a=s.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;s.useEffect(dc,[]);let{addGlobalListener:u,removeAllGlobalListeners:c}=Qt(),{hoverProps:d,triggerHoverEnd:f}=s.useMemo(()=>{let v=(m,y)=>{if(a.pointerType=y,o||y==="touch"||a.isHovered||!m.currentTarget.contains(m.target))return;a.isHovered=!0;let $=m.currentTarget;a.target=$,u(j(m.target),"pointerover",E=>{a.isHovered&&a.target&&!W(a.target,E.target)&&p(E,E.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:$,pointerType:y}),r&&r(!0),l(!0)},p=(m,y)=>{let $=a.target;a.pointerType="",a.target=null,!(y==="touch"||!a.isHovered||!$)&&(a.isHovered=!1,c(),n&&n({type:"hoverend",target:$,pointerType:y}),r&&r(!1),l(!1))},b={};return typeof PointerEvent<"u"?(b.onPointerEnter=m=>{jt&&m.pointerType==="mouse"||v(m,m.pointerType)},b.onPointerLeave=m=>{!o&&m.currentTarget.contains(m.target)&&p(m,m.pointerType)}):process.env.NODE_ENV==="test"&&(b.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},b.onMouseEnter=m=>{!a.ignoreEmulatedMouseEvents&&!jt&&v(m,"mouse"),a.ignoreEmulatedMouseEvents=!1},b.onMouseLeave=m=>{!o&&m.currentTarget.contains(m.target)&&p(m,"mouse")}),{hoverProps:b,triggerHoverEnd:p}},[e,r,n,o,a,u,c]);return s.useEffect(()=>{o&&f({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:d,isHovered:i}}function fc(t){let{ref:e,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=t,i=s.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=J(u=>{r&&Lt(u,e)&&(o&&o(u),i.current.isPointerDown=!0)}),a=J(u=>{r&&r(u)});s.useEffect(()=>{let u=i.current;if(n)return;const c=e.current,d=j(c);if(typeof PointerEvent<"u"){let f=v=>{u.isPointerDown&&Lt(v,e)&&a(v),u.isPointerDown=!1};return d.addEventListener("pointerdown",l,!0),d.addEventListener("pointerup",f,!0),()=>{d.removeEventListener("pointerdown",l,!0),d.removeEventListener("pointerup",f,!0)}}else if(process.env.NODE_ENV==="test"){let f=p=>{u.ignoreEmulatedMouseEvents?u.ignoreEmulatedMouseEvents=!1:u.isPointerDown&&Lt(p,e)&&a(p),u.isPointerDown=!1},v=p=>{u.ignoreEmulatedMouseEvents=!0,u.isPointerDown&&Lt(p,e)&&a(p),u.isPointerDown=!1};return d.addEventListener("mousedown",l,!0),d.addEventListener("mouseup",f,!0),d.addEventListener("touchstart",l,!0),d.addEventListener("touchend",v,!0),()=>{d.removeEventListener("mousedown",l,!0),d.removeEventListener("mouseup",f,!0),d.removeEventListener("touchstart",l,!0),d.removeEventListener("touchend",v,!0)}}},[e,n,l,a])}function Lt(t,e){if(t.button>0)return!1;if(t.target){const r=t.target.ownerDocument;if(!r||!r.documentElement.contains(t.target)||t.target.closest("[data-react-aria-top-layer]"))return!1}return e.current?!t.composedPath().includes(e.current):!1}const pc=500;function ki(t){let{isDisabled:e,onLongPressStart:r,onLongPressEnd:n,onLongPress:o,threshold:i=pc,accessibilityDescription:l}=t;const a=s.useRef(void 0);let{addGlobalListener:u,removeGlobalListener:c}=Qt(),{pressProps:d}=He({isDisabled:e,onPressStart(v){if(v.continuePropagation(),(v.pointerType==="mouse"||v.pointerType==="touch")&&(r&&r({...v,type:"longpressstart"}),a.current=setTimeout(()=>{v.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),j(v.target).activeElement!==v.target&&be(v.target),o&&o({...v,type:"longpress"}),a.current=void 0},i),v.pointerType==="touch")){let p=b=>{b.preventDefault()};u(v.target,"contextmenu",p,{once:!0}),u(window,"pointerup",()=>{setTimeout(()=>{c(v.target,"contextmenu",p)},30)},{once:!0})}},onPressEnd(v){a.current&&clearTimeout(a.current),n&&(v.pointerType==="mouse"||v.pointerType==="touch")&&n({...v,type:"longpressend"})}}),f=Iu(o&&!e?l:void 0);return{longPressProps:A(d,f)}}function vc(t,e){let{elementType:r="a",onPress:n,onPressStart:o,onPressEnd:i,onClick:l,isDisabled:a,...u}=t,c={};r!=="a"&&(c={role:"link",tabIndex:a?void 0:0});let{focusableProps:d}=ot(t,e),{pressProps:f,isPressed:v}=He({onPress:n,onPressStart:o,onPressEnd:i,onClick:l,isDisabled:a,ref:e}),p=Q(u,{labelable:!0}),b=A(d,f),m=Jt(),y=ui(t);return{isPressed:v,linkProps:A(p,y,{...b,...c,"aria-disabled":a||void 0,"aria-current":t["aria-current"],onClick:$=>{var E;(E=f.onClick)===null||E===void 0||E.call(f,$),!m.isNative&&$.currentTarget instanceof HTMLAnchorElement&&$.currentTarget.href&&!$.isDefaultPrevented()&&Ru($.currentTarget,$)&&t.href&&($.preventDefault(),m.open($.currentTarget,$,t.href,t.routerOptions))}})}}const bc=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),hc=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gc(t){if(Intl.Locale){let r=new Intl.Locale(t).maximize(),n=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(n)return n.direction==="rtl";if(r.script)return bc.has(r.script)}let e=t.split("-")[0];return hc.has(e)}const mc=Symbol.for("react-aria.i18n.locale");function Di(){let t=typeof window<"u"&&window[mc]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:gc(t)?"rtl":"ltr"}}let Wr=Di(),ft=new Set;function po(){Wr=Di();for(let t of ft)t(Wr)}function yc(){let t=_e(),[e,r]=s.useState(Wr);return s.useEffect(()=>(ft.size===0&&window.addEventListener("languagechange",po),ft.add(r),()=>{ft.delete(r),ft.size===0&&window.removeEventListener("languagechange",po)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const $c=s.createContext(null);function Ke(){let t=yc();return s.useContext($c)||t}const xc=Symbol.for("react-aria.i18n.locale"),Sc=Symbol.for("react-aria.i18n.strings");let Ze;class rr{getStringForLocale(e,r){let o=this.getStringsForLocale(r)[e];if(!o)throw new Error(`Could not find intl message ${e} in ${r} locale`);return o}getStringsForLocale(e){let r=this.strings[e];return r||(r=Pc(e,this.strings,this.defaultLocale),this.strings[e]=r),r}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let r=window[xc];if(Ze===void 0){let o=window[Sc];if(!o)return null;Ze={};for(let i in o)Ze[i]=new rr({[r]:o[i]},r)}let n=Ze==null?void 0:Ze[e];if(!n)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}constructor(e,r="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,n])=>n)),this.defaultLocale=r}}function Pc(t,e,r="en-US"){if(e[t])return e[t];let n=Ec(t);if(e[n])return e[n];for(let o in e)if(o.startsWith(n+"-"))return e[o];return e[r]}function Ec(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const vo=new Map,bo=new Map;class wc{format(e,r){let n=this.strings.getStringForLocale(e,this.locale);return typeof n=="function"?n(r,this):n}plural(e,r,n="cardinal"){let o=r["="+e];if(o)return typeof o=="function"?o():o;let i=this.locale+":"+n,l=vo.get(i);l||(l=new Intl.PluralRules(this.locale,{type:n}),vo.set(i,l));let a=l.select(e);return o=r[a]||r.other,typeof o=="function"?o():o}number(e){let r=bo.get(this.locale);return r||(r=new Intl.NumberFormat(this.locale),bo.set(this.locale,r)),r.format(e)}select(e,r){let n=e[r]||e.other;return typeof n=="function"?n():n}constructor(e,r){this.locale=e,this.strings=r}}const ho=new WeakMap;function Cc(t){let e=ho.get(t);return e||(e=new rr(t),ho.set(t,e)),e}function Tc(t,e){return e&&rr.getGlobalDictionaryForPackage(e)||Cc(t)}function vn(t,e){let{locale:r}=Ke(),n=Tc(t,e);return s.useMemo(()=>new wc(r,n),[r,n])}let xr=new Map,Ur=!1;try{Ur=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let _t=!1;try{_t=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Ri={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class kc{format(e){let r="";if(!Ur&&this.options.signDisplay!=null?r=Rc(this.numberFormatter,this.options.signDisplay,e):r=this.numberFormatter.format(e),this.options.style==="unit"&&!_t){var n;let{unit:o,unitDisplay:i="short",locale:l}=this.resolvedOptions();if(!o)return r;let a=(n=Ri[o])===null||n===void 0?void 0:n[i];r+=a[l]||a.default}return r}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,r){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,r);if(r<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(r)}`}formatRangeToParts(e,r){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,r);if(r<e)throw new RangeError("End date must be >= start date");let n=this.numberFormatter.formatToParts(e),o=this.numberFormatter.formatToParts(r);return[...n.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Ur&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!_t&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,r={}){this.numberFormatter=Dc(e,r),this.options=r}}function Dc(t,e={}){let{numberingSystem:r}=e;if(r&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${r}`),e.style==="unit"&&!_t){var n;let{unit:l,unitDisplay:a="short"}=e;if(!l)throw new Error('unit option must be provided with style: "unit"');if(!(!((n=Ri[l])===null||n===void 0)&&n[a]))throw new Error(`Unsupported unit ${l} with unitDisplay = ${a}`);e={...e,style:"decimal"}}let o=t+(e?Object.entries(e).sort((l,a)=>l[0]<a[0]?-1:1).join():"");if(xr.has(o))return xr.get(o);let i=new Intl.NumberFormat(t,e);return xr.set(o,i),i}function Rc(t,e,r){if(e==="auto")return t.format(r);if(e==="never")return t.format(Math.abs(r));{let n=!1;if(e==="always"?n=r>0||Object.is(r,0):e==="exceptZero"&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),n){let o=t.format(-r),i=t.format(r),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(r)}}function Kc(t={}){let{locale:e}=Ke();return s.useMemo(()=>new kc(e,t),[e,t])}let Sr=new Map;function bn(t){let{locale:e}=Ke(),r=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(Sr.has(r))return Sr.get(r);let n=new Intl.Collator(e,t);return Sr.set(r,n),n}function nr(t,e){let{elementType:r="button",isDisabled:n,onPress:o,onPressStart:i,onPressEnd:l,onPressUp:a,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:v,target:p,rel:b,type:m="button"}=t,y;r==="button"?y={type:m,disabled:n}:y={role:"button",href:r==="a"&&!n?v:void 0,target:r==="a"?p:void 0,type:r==="input"?m:void 0,disabled:r==="input"?n:void 0,"aria-disabled":!n||r==="input"?void 0:n,rel:r==="a"?b:void 0};let{pressProps:$,isPressed:E}=He({onPressStart:i,onPressEnd:l,onPressChange:u,onPress:o,onPressUp:a,onClick:f,isDisabled:n,preventFocusOnPress:c,ref:e}),{focusableProps:C}=ot(t,e);d&&(C.tabIndex=n?-1:C.tabIndex);let K=A(C,$,Q(t,{labelable:!0}));return{isPressed:E,buttonProps:A(y,K,{"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"]})}}function Ki(t,e,r){const{isSelected:n}=e,{isPressed:o,buttonProps:i}=nr({...t,onPress:Te(e.toggle,t.onPress)},r);return{isPressed:o,isSelected:n,isDisabled:t.isDisabled||!1,buttonProps:A(i,{"aria-pressed":n})}}function Lc(t){const e=oe(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:r,visibility:n}=t.style,o=r!=="none"&&n!=="hidden"&&n!=="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 Fc(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 Li(t,e){return t.nodeName!=="#comment"&&Lc(t)&&Fc(t,e)&&(!t.parentElement||Li(t.parentElement,t))}const go=s.createContext(null),Gr="react-aria-focus-scope-restore";let _=null;function Fi(t){let{children:e,contain:r,restoreFocus:n,autoFocus:o}=t,i=s.useRef(null),l=s.useRef(null),a=s.useRef([]),{parentNode:u}=s.useContext(go)||{},c=s.useMemo(()=>new Yr({scopeRef:a}),[a]);H(()=>{let v=u||q.root;if(q.getTreeNode(v.scopeRef)&&_&&!Wt(_,v.scopeRef)){let p=q.getTreeNode(_);p&&(v=p)}v.addChild(c),q.addNode(c)},[c,u]),H(()=>{let v=q.getTreeNode(a);v&&(v.contain=!!r)},[r]),H(()=>{var v;let p=(v=i.current)===null||v===void 0?void 0:v.nextSibling,b=[],m=y=>y.stopPropagation();for(;p&&p!==l.current;)b.push(p),p.addEventListener(Gr,m),p=p.nextSibling;return a.current=b,()=>{for(let y of b)y.removeEventListener(Gr,m)}},[e]),Bc(a,n,r),Ac(a,r),Oc(a,n,r),Nc(a,o),s.useEffect(()=>{const v=re(j(a.current?a.current[0]:void 0));let p=null;if(pe(v,a.current)){for(let b of q.traverse())b.scopeRef&&pe(v,b.scopeRef.current)&&(p=b);p===q.getTreeNode(a)&&(_=p.scopeRef)}},[a]),H(()=>()=>{var v,p,b;let m=(b=(p=q.getTreeNode(a))===null||p===void 0||(v=p.parent)===null||v===void 0?void 0:v.scopeRef)!==null&&b!==void 0?b:null;(a===_||Wt(a,_))&&(!m||q.getTreeNode(m))&&(_=m),q.removeTreeNode(a)},[a]);let d=s.useMemo(()=>Mc(a),[]),f=s.useMemo(()=>({focusManager:d,parentNode:c}),[c,d]);return s.createElement(go.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 Mc(t){return{focusNext(e={}){let r=t.current,{from:n,tabbable:o,wrap:i,accept:l}=e;var a;let u=n||re(j((a=r[0])!==null&&a!==void 0?a:void 0)),c=r[0].previousElementSibling,d=Oe(r),f=ue(d,{tabbable:o,accept:l},r);f.currentNode=pe(u,r)?u:c;let v=f.nextNode();return!v&&i&&(f.currentNode=c,v=f.nextNode()),v&&le(v,!0),v},focusPrevious(e={}){let r=t.current,{from:n,tabbable:o,wrap:i,accept:l}=e;var a;let u=n||re(j((a=r[0])!==null&&a!==void 0?a:void 0)),c=r[r.length-1].nextElementSibling,d=Oe(r),f=ue(d,{tabbable:o,accept:l},r);f.currentNode=pe(u,r)?u:c;let v=f.previousNode();return!v&&i&&(f.currentNode=c,v=f.previousNode()),v&&le(v,!0),v},focusFirst(e={}){let r=t.current,{tabbable:n,accept:o}=e,i=Oe(r),l=ue(i,{tabbable:n,accept:o},r);l.currentNode=r[0].previousElementSibling;let a=l.nextNode();return a&&le(a,!0),a},focusLast(e={}){let r=t.current,{tabbable:n,accept:o}=e,i=Oe(r),l=ue(i,{tabbable:n,accept:o},r);l.currentNode=r[r.length-1].nextElementSibling;let a=l.previousNode();return a&&le(a,!0),a}}}function Oe(t){return t[0].parentElement}function pt(t){let e=q.getTreeNode(_);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function Ac(t,e){let r=s.useRef(void 0),n=s.useRef(void 0);H(()=>{let o=t.current;if(!e){n.current&&(cancelAnimationFrame(n.current),n.current=void 0);return}const i=j(o?o[0]:void 0);let l=c=>{if(c.key!=="Tab"||c.altKey||c.ctrlKey||c.metaKey||!pt(t)||c.isComposing)return;let d=re(i),f=t.current;if(!f||!pe(d,f))return;let v=Oe(f),p=ue(v,{tabbable:!0},f);if(!d)return;p.currentNode=d;let b=c.shiftKey?p.previousNode():p.nextNode();b||(p.currentNode=c.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,b=c.shiftKey?p.previousNode():p.nextNode()),c.preventDefault(),b&&le(b,!0)},a=c=>{(!_||Wt(_,t))&&pe(V(c),t.current)?(_=t,r.current=V(c)):pt(t)&&!Ee(V(c),t)?r.current?r.current.focus():_&&_.current&&qr(_.current):pt(t)&&(r.current=V(c))},u=c=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{let d=yt(),f=(d==="virtual"||d===null)&&sn()&&si(),v=re(i);if(!f&&v&&pt(t)&&!Ee(v,t)){_=t;let b=V(c);if(b&&b.isConnected){var p;r.current=b,(p=r.current)===null||p===void 0||p.focus()}else _.current&&qr(_.current)}})};return i.addEventListener("keydown",l,!1),i.addEventListener("focusin",a,!1),o==null||o.forEach(c=>c.addEventListener("focusin",a,!1)),o==null||o.forEach(c=>c.addEventListener("focusout",u,!1)),()=>{i.removeEventListener("keydown",l,!1),i.removeEventListener("focusin",a,!1),o==null||o.forEach(c=>c.removeEventListener("focusin",a,!1)),o==null||o.forEach(c=>c.removeEventListener("focusout",u,!1))}},[t,e]),H(()=>()=>{n.current&&cancelAnimationFrame(n.current)},[n])}function Mi(t){return Ee(t)}function pe(t,e){return!t||!e?!1:e.some(r=>r.contains(t))}function Ee(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of q.traverse(q.getTreeNode(e)))if(r&&pe(t,r.current))return!0;return!1}function Ic(t){return Ee(t,_)}function Wt(t,e){var r;let n=(r=q.getTreeNode(e))===null||r===void 0?void 0:r.parent;for(;n;){if(n.scopeRef===t)return!0;n=n.parent}return!1}function le(t,e=!1){if(t!=null&&!e)try{De(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Ai(t,e=!0){let r=t[0].previousElementSibling,n=Oe(t),o=ue(n,{tabbable:e},t);o.currentNode=r;let i=o.nextNode();return e&&!i&&(n=Oe(t),o=ue(n,{tabbable:!1},t),o.currentNode=r,i=o.nextNode()),i}function qr(t,e=!0){le(Ai(t,e))}function Nc(t,e){const r=s.useRef(e);s.useEffect(()=>{if(r.current){_=t;const n=j(t.current?t.current[0]:void 0);!pe(re(n),_.current)&&t.current&&qr(t.current)}r.current=!1},[t])}function Bc(t,e,r){H(()=>{if(e||r)return;let n=t.current;const o=j(n?n[0]:void 0);let i=l=>{let a=V(l);pe(a,t.current)?_=t:Mi(a)||(_=null)};return o.addEventListener("focusin",i,!1),n==null||n.forEach(l=>l.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),n==null||n.forEach(l=>l.removeEventListener("focusin",i,!1))}},[t,e,r])}function mo(t){let e=q.getTreeNode(_);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function Oc(t,e,r){const n=s.useRef(typeof document<"u"?re(j(t.current?t.current[0]:void 0)):null);H(()=>{let o=t.current;const i=j(o?o[0]:void 0);if(!e||r)return;let l=()=>{(!_||Wt(_,t))&&pe(re(i),t.current)&&(_=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,r]),H(()=>{const o=j(t.current?t.current[0]:void 0);if(!e)return;let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!pt(t)||l.isComposing)return;let a=o.activeElement;if(!Ee(a,t)||!mo(t))return;let u=q.getTreeNode(t);if(!u)return;let c=u.nodeToRestore,d=ue(o.body,{tabbable:!0});d.currentNode=a;let f=l.shiftKey?d.previousNode():d.nextNode();if((!c||!c.isConnected||c===o.body)&&(c=void 0,u.nodeToRestore=void 0),(!f||!Ee(f,t))&&c){d.currentNode=c;do f=l.shiftKey?d.previousNode():d.nextNode();while(Ee(f,t));l.preventDefault(),l.stopPropagation(),f?le(f,!0):Mi(c)?le(c,!0):a.blur()}};return r||o.addEventListener("keydown",i,!0),()=>{r||o.removeEventListener("keydown",i,!0)}},[t,e,r]),H(()=>{const o=j(t.current?t.current[0]:void 0);if(!e)return;let i=q.getTreeNode(t);if(i){var l;return i.nodeToRestore=(l=n.current)!==null&&l!==void 0?l:void 0,()=>{let a=q.getTreeNode(t);if(!a)return;let u=a.nodeToRestore,c=re(o);if(e&&u&&(c&&Ee(c,t)||c===o.body&&mo(t))){let d=q.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let f=d.getTreeNode(t);for(;f;){if(f.nodeToRestore&&f.nodeToRestore.isConnected){yo(f.nodeToRestore);return}f=f.parent}for(f=d.getTreeNode(t);f;){if(f.scopeRef&&f.scopeRef.current&&q.getTreeNode(f.scopeRef)){let v=Ai(f.scopeRef.current,!0);yo(v);return}f=f.parent}}})}}}},[t,e])}function yo(t){t.dispatchEvent(new CustomEvent(Gr,{bubbles:!0,cancelable:!0}))&&le(t)}function ue(t,e,r){let n=e!=null&&e.tabbable?Vu:gi,o=(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null,i=j(o),l=gu(i,t||i,NodeFilter.SHOW_ELEMENT,{acceptNode(a){var u;return!(e==null||(u=e.from)===null||u===void 0)&&u.contains(a)?NodeFilter.FILTER_REJECT:n(a)&&Li(a)&&(!r||pe(a,r))&&(!(e!=null&&e.accept)||e.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(l.currentNode=e.from),l}function zc(t,e={}){return{focusNext(r={}){let n=t.current;if(!n)return null;let{from:o,tabbable:i=e.tabbable,wrap:l=e.wrap,accept:a=e.accept}=r,u=o||re(j(n)),c=ue(n,{tabbable:i,accept:a});n.contains(u)&&(c.currentNode=u);let d=c.nextNode();return!d&&l&&(c.currentNode=n,d=c.nextNode()),d&&le(d,!0),d},focusPrevious(r=e){let n=t.current;if(!n)return null;let{from:o,tabbable:i=e.tabbable,wrap:l=e.wrap,accept:a=e.accept}=r,u=o||re(j(n)),c=ue(n,{tabbable:i,accept:a});if(n.contains(u))c.currentNode=u;else{let f=Pr(c);return f&&le(f,!0),f??null}let d=c.previousNode();if(!d&&l){c.currentNode=n;let f=Pr(c);if(!f)return null;d=f}return d&&le(d,!0),d??null},focusFirst(r=e){let n=t.current;if(!n)return null;let{tabbable:o=e.tabbable,accept:i=e.accept}=r,a=ue(n,{tabbable:o,accept:i}).nextNode();return a&&le(a,!0),a},focusLast(r=e){let n=t.current;if(!n)return null;let{tabbable:o=e.tabbable,accept:i=e.accept}=r,l=ue(n,{tabbable:o,accept:i}),a=Pr(l);return a&&le(a,!0),a??null}}}function Pr(t){let e,r;do r=t.lastChild(),r&&(e=r);while(r);return e}class hn{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,r,n){let o=this.fastMap.get(r??null);if(!o)return;let i=new Yr({scopeRef:e});o.addChild(i),i.parent=o,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let r=this.fastMap.get(e);if(!r)return;let n=r.parent;for(let i of this.traverse())i!==r&&r.nodeToRestore&&i.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&pe(i.nodeToRestore,r.scopeRef.current)&&(i.nodeToRestore=r.nodeToRestore);let o=r.children;n&&(n.removeChild(r),o.size>0&&o.forEach(i=>n&&n.addChild(i))),this.fastMap.delete(r.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let r of e.children)yield*this.traverse(r)}clone(){var e;let r=new hn;var n;for(let o of this.traverse())r.addTreeNode(o.scopeRef,(n=(e=o.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&n!==void 0?n:null,o.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new Yr({scopeRef:null}),this.fastMap.set(null,this.root)}}class Yr{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let q=new hn;function Le(t={}){let{autoFocus:e=!1,isTextInput:r,within:n}=t,o=s.useRef({isFocused:!1,isFocusVisible:e||mt()}),[i,l]=s.useState(!1),[a,u]=s.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=s.useCallback(()=>u(o.current.isFocused&&o.current.isFocusVisible),[]),d=s.useCallback(p=>{o.current.isFocused=p,l(p),c()},[c]);ic(p=>{o.current.isFocusVisible=p,c()},[],{isTextInput:r});let{focusProps:f}=Ti({isDisabled:n,onFocusChange:d}),{focusWithinProps:v}=tr({isDisabled:!n,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:a,focusProps:n?v:f}}function Ii(t){let e=jc(j(t));e!==t&&(e&&Hc(e,t),t&&Vc(t,e))}function Hc(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function Vc(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function jc(t){let e=re(t),r=e==null?void 0:e.getAttribute("aria-activedescendant");return r&&t.getElementById(r)||e}function _c(t,e){const{"aria-label":r,"aria-labelledby":n,orientation:o="horizontal"}=t;let[i,l]=s.useState(!1);H(()=>{var b;l(!!(e.current&&(!((b=e.current.parentElement)===null||b===void 0)&&b.closest('[role="toolbar"]'))))});const{direction:a}=Ke(),u=a==="rtl"&&o==="horizontal";let c=zc(e);const d=b=>{if(b.currentTarget.contains(b.target)){if(o==="horizontal"&&b.key==="ArrowRight"||o==="vertical"&&b.key==="ArrowDown")u?c.focusPrevious():c.focusNext();else if(o==="horizontal"&&b.key==="ArrowLeft"||o==="vertical"&&b.key==="ArrowUp")u?c.focusNext():c.focusPrevious();else if(b.key==="Tab"){b.stopPropagation(),f.current=document.activeElement,b.shiftKey?c.focusFirst():c.focusLast();return}else return;b.stopPropagation(),b.preventDefault()}},f=s.useRef(null),v=b=>{!b.currentTarget.contains(b.relatedTarget)&&!f.current&&(f.current=b.target)},p=b=>{var m;if(f.current&&!b.currentTarget.contains(b.relatedTarget)&&(!((m=e.current)===null||m===void 0)&&m.contains(b.target))){var y;(y=f.current)===null||y===void 0||y.focus(),f.current=null}};return{toolbarProps:{...Q(t,{labelable:!0}),role:i?"group":"toolbar","aria-orientation":o,"aria-label":r,"aria-labelledby":r==null?n:void 0,onKeyDownCapture:i?void 0:d,onFocusCapture:i?void 0:p,onBlurCapture:i?void 0:v}}}function Wc(t,e,r){let{isDisabled:n}=t,{toolbarProps:o}=_c(t,r);return{groupProps:{...o,role:e.selectionMode==="single"?"radiogroup":o.role,"aria-disabled":n}}}function Uc(t,e,r){let n={isSelected:e.selectedKeys.has(t.id),setSelected(u){e.setSelected(t.id,u)},toggle(){e.toggleKey(t.id)}},{isPressed:o,isSelected:i,isDisabled:l,buttonProps:a}=Ki({...t,id:void 0,isDisabled:t.isDisabled||e.isDisabled},n,r);return e.selectionMode==="single"&&(a.role="radio",a["aria-checked"]=n.isSelected,delete a["aria-pressed"]),{isPressed:o,isSelected:i,isDisabled:l,buttonProps:a}}const Ni=7e3;let ge=null;function $o(t,e="assertive",r=Ni){ge?ge.announce(t,e,r):(ge=new Gc,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?ge.announce(t,e,r):setTimeout(()=>{ge!=null&&ge.isAttached()&&(ge==null||ge.announce(t,e,r))},100))}class Gc{isAttached(){var e;return(e=this.node)===null||e===void 0?void 0:e.isConnected}createLog(e){let r=document.createElement("div");return r.setAttribute("role","log"),r.setAttribute("aria-live",e),r.setAttribute("aria-relevant","additions"),r}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,r="assertive",n=Ni){var o,i;if(!this.node)return;let l=document.createElement("div");typeof e=="object"?(l.setAttribute("role","img"),l.setAttribute("aria-labelledby",e["aria-labelledby"])):l.textContent=e,r==="assertive"?(o=this.assertiveLog)===null||o===void 0||o.appendChild(l):(i=this.politeLog)===null||i===void 0||i.appendChild(l),e!==""&&setTimeout(()=>{l.remove()},n)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}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))}}const Bi={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Oi={...Bi,customError:!0,valid:!1},lt={isInvalid:!1,validationDetails:Bi,validationErrors:[]},qc=s.createContext({}),Zr="__formValidationState"+Date.now();function gn(t){if(t[Zr]){let{realtimeValidation:e,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=t[Zr];return{realtimeValidation:e,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return Yc(t)}function Yc(t){let{isInvalid:e,validationState:r,name:n,value:o,builtinValidation:i,validate:l,validationBehavior:a="aria"}=t;r&&(e||(e=r==="invalid"));let u=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:Oi}:null,c=s.useMemo(()=>{if(!l||o==null)return null;let L=Zc(l,o);return xo(L)},[l,o]);i!=null&&i.validationDetails.valid&&(i=void 0);let d=s.useContext(qc),f=s.useMemo(()=>n?Array.isArray(n)?n.flatMap(L=>Xr(d[L])):Xr(d[n]):[],[d,n]),[v,p]=s.useState(d),[b,m]=s.useState(!1);d!==v&&(p(d),m(!1));let y=s.useMemo(()=>xo(b?[]:f),[b,f]),$=s.useRef(lt),[E,C]=s.useState(lt),K=s.useRef(lt),T=()=>{if(!x)return;M(!1);let L=c||i||$.current;Er(L,K.current)||(K.current=L,C(L))},[x,M]=s.useState(!1);return s.useEffect(T),{realtimeValidation:u||y||c||i||lt,displayValidation:a==="native"?u||y||E:u||y||c||i||E,updateValidation(L){a==="aria"&&!Er(E,L)?C(L):$.current=L},resetValidation(){let L=lt;Er(L,K.current)||(K.current=L,C(L)),a==="native"&&M(!1),m(!0)},commitValidation(){a==="native"&&M(!0),m(!0)}}}function Xr(t){return t?Array.isArray(t)?t:[t]:[]}function Zc(t,e){if(typeof t=="function"){let r=t(e);if(r&&typeof r!="boolean")return Xr(r)}return[]}function xo(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:Oi}:null}function Er(t,e){return t===e?!0:!!t&&!!e&&t.isInvalid===e.isInvalid&&t.validationErrors.length===e.validationErrors.length&&t.validationErrors.every((r,n)=>r===e.validationErrors[n])&&Object.entries(t.validationDetails).every(([r,n])=>e.validationDetails[r]===n)}function mn(t,e,r){let{validationBehavior:n,focus:o}=t;H(()=>{if(n==="native"&&(r!=null&&r.current)&&!r.current.disabled){let u=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(u),r.current.hasAttribute("title")||(r.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(Jc(r.current))}});let i=J(()=>{e.resetValidation()}),l=J(u=>{var c;e.displayValidation.isInvalid||e.commitValidation();let d=r==null||(c=r.current)===null||c===void 0?void 0:c.form;if(!u.defaultPrevented&&r&&d&&Qc(d)===r.current){var f;o?o():(f=r.current)===null||f===void 0||f.focus(),Ci("keyboard")}u.preventDefault()}),a=J(()=>{e.commitValidation()});s.useEffect(()=>{let u=r==null?void 0:r.current;if(!u)return;let c=u.form;return u.addEventListener("invalid",l),u.addEventListener("change",a),c==null||c.addEventListener("reset",i),()=>{u.removeEventListener("invalid",l),u.removeEventListener("change",a),c==null||c.removeEventListener("reset",i)}},[r,l,a,i,n])}function Xc(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 Jc(t){return{isInvalid:!t.validity.valid,validationDetails:Xc(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function Qc(t){for(let e=0;e<t.elements.length;e++){let r=t.elements[e];if(!r.validity.valid)return r}return null}function ed(t,e,r){let{isDisabled:n=!1,isReadOnly:o=!1,value:i,name:l,children:a,"aria-label":u,"aria-labelledby":c,validationState:d="valid",isInvalid:f}=t,v=x=>{x.stopPropagation(),e.setSelected(x.target.checked)},p=a!=null,b=u!=null||c!=null;!p&&!b&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:m,isPressed:y}=He({isDisabled:n}),{pressProps:$,isPressed:E}=He({onPress(){var x;e.toggle(),(x=r.current)===null||x===void 0||x.focus()},isDisabled:n||o}),{focusableProps:C}=ot(t,r),K=A(m,C),T=Q(t,{labelable:!0});return cn(r,e.isSelected,e.setSelected),{labelProps:A($,{onClick:x=>x.preventDefault()}),inputProps:A(T,{"aria-invalid":f||d==="invalid"||void 0,"aria-errormessage":t["aria-errormessage"],"aria-controls":t["aria-controls"],"aria-readonly":o||void 0,onChange:v,disabled:n,...i==null?{}:{value:i},name:l,type:"checkbox",...K}),isSelected:e.isSelected,isPressed:y||E,isDisabled:n,isReadOnly:o,isInvalid:f||d==="invalid"}}function td(t,e,r){let n=gn({...t,value:e.isSelected}),{isInvalid:o,validationErrors:i,validationDetails:l}=n.displayValidation,{labelProps:a,inputProps:u,isSelected:c,isPressed:d,isDisabled:f,isReadOnly:v}=ed({...t,isInvalid:o},e,r);mn(t,n,r);let{isIndeterminate:p,isRequired:b,validationBehavior:m="aria"}=t;s.useEffect(()=>{r.current&&(r.current.indeterminate=!!p)});let{pressProps:y}=He({isDisabled:f||v,onPress(){let{[Zr]:$}=t,{commitValidation:E}=$||n;E()}});return{labelProps:A(a,y),inputProps:{...u,checked:c,"aria-required":b&&m==="aria"||void 0,required:b&&m==="native"},isSelected:c,isPressed:d,isDisabled:f,isReadOnly:v,isInvalid:o,validationErrors:i,validationDetails:l}}function yn(t){let{id:e,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=t;e=te(e);let l=te(),a={};r?(n=n?`${l} ${n}`:l,a={id:l,htmlFor:i==="label"?e:void 0}):!n&&!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 u=di({id:e,"aria-label":o,"aria-labelledby":n});return{labelProps:a,fieldProps:u}}function $n(t){let{description:e,errorMessage:r,isInvalid:n,validationState:o}=t,{labelProps:i,fieldProps:l}=yn(t),a=bt([!!e,!!r,n,o]),u=bt([!!e,!!r,n,o]);return l=A(l,{"aria-describedby":[a,u,t["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:i,fieldProps:l,descriptionProps:{id:a},errorMessageProps:{id:u}}}function zi(t={}){let{isReadOnly:e}=t,[r,n]=Re(t.isSelected,t.defaultSelected||!1,t.onChange);function o(l){e||n(l)}function i(){e||n(!r)}return{isSelected:r,setSelected:o,toggle:i}}function rd(t){let{selectionMode:e="single",disallowEmptySelection:r,isDisabled:n=!1}=t,[o,i]=Re(s.useMemo(()=>t.selectedKeys?new Set(t.selectedKeys):void 0,[t.selectedKeys]),s.useMemo(()=>t.defaultSelectedKeys?new Set(t.defaultSelectedKeys):new Set,[t.defaultSelectedKeys]),t.onSelectionChange);return{selectionMode:e,isDisabled:n,selectedKeys:o,setSelectedKeys:i,toggleKey(l){let a;e==="multiple"?(a=new Set(o),a.has(l)&&(!r||a.size>1)?a.delete(l):a.add(l)):a=new Set(o.has(l)&&!r?[]:[l]),i(a)},setSelected(l,a){a!==o.has(l)&&this.toggleKey(l)}}}const So={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 Hi(t={}){let{style:e,isFocusable:r}=t,[n,o]=s.useState(!1),{focusWithinProps:i}=tr({isDisabled:!r,onFocusWithinChange:a=>o(a)}),l=s.useMemo(()=>n?e:e?{...So,...e}:So,[n]);return{visuallyHiddenProps:{...i,style:l}}}function Vi(t){let{children:e,elementType:r="div",isFocusable:n,style:o,...i}=t,{visuallyHiddenProps:l}=Hi(t);return s.createElement(r,A(i,l),e)}function nd(t,e){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:l="text",validationBehavior:a="aria"}=t,[u,c]=Re(t.value,t.defaultValue||"",t.onChange),{focusableProps:d}=ot(t,e),f=gn({...t,value:u}),{isInvalid:v,validationErrors:p,validationDetails:b}=f.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:$,errorMessageProps:E}=$n({...t,isInvalid:v,errorMessage:t.errorMessage||p}),C=Q(t,{labelable:!0});const K={type:l,pattern:t.pattern};return cn(e,u,c),mn(t,f,e),s.useEffect(()=>{if(e.current instanceof oe(e.current).HTMLTextAreaElement){let T=e.current;Object.defineProperty(T,"defaultValue",{get:()=>T.value,set:()=>{},configurable:!0})}},[e]),{labelProps:m,inputProps:A(C,r==="input"?K:void 0,{disabled:n,readOnly:i,required:o&&a==="native","aria-required":o&&a==="aria"||void 0,"aria-invalid":v||void 0,"aria-errormessage":t["aria-errormessage"],"aria-activedescendant":t["aria-activedescendant"],"aria-autocomplete":t["aria-autocomplete"],"aria-haspopup":t["aria-haspopup"],"aria-controls":t["aria-controls"],value:u,onChange:T=>c(T.target.value),autoComplete:t.autoComplete,autoCapitalize:t.autoCapitalize,maxLength:t.maxLength,minLength:t.minLength,name:t.name,placeholder:t.placeholder,inputMode:t.inputMode,autoCorrect:t.autoCorrect,spellCheck:t.spellCheck,[parseInt(s.version,10)>=17?"enterKeyHint":"enterkeyhint"]:t.enterKeyHint,onCopy:t.onCopy,onCut:t.onCut,onPaste:t.onPaste,onCompositionEnd:t.onCompositionEnd,onCompositionStart:t.onCompositionStart,onCompositionUpdate:t.onCompositionUpdate,onSelect:t.onSelect,onBeforeInput:t.onBeforeInput,onInput:t.onInput,...d,...y}),descriptionProps:$,errorMessageProps:E,isInvalid:v,validationErrors:p,validationDetails:b}}const ye={top:"top",bottom:"top",left:"left",right:"left"},Ut={top:"bottom",bottom:"top",left:"right",right:"left"},od={top:"left",left:"top"},Jr={top:"height",left:"width"},ji={width:"totalWidth",height:"totalHeight"},Ft={};let ee=typeof document<"u"?window.visualViewport:null;function Po(t){let e=0,r=0,n=0,o=0,i=0,l=0,a={};var u;let c=((u=ee==null?void 0:ee.scale)!==null&&u!==void 0?u:1)>1;if(t.tagName==="BODY"){let b=document.documentElement;n=b.clientWidth,o=b.clientHeight;var d;e=(d=ee==null?void 0:ee.width)!==null&&d!==void 0?d:n;var f;r=(f=ee==null?void 0:ee.height)!==null&&f!==void 0?f:o,a.top=b.scrollTop||t.scrollTop,a.left=b.scrollLeft||t.scrollLeft,ee&&(i=ee.offsetTop,l=ee.offsetLeft)}else({width:e,height:r,top:i,left:l}=rt(t)),a.top=t.scrollTop,a.left=t.scrollLeft,n=e,o=r;if(an()&&(t.tagName==="BODY"||t.tagName==="HTML")&&c){a.top=0,a.left=0;var v;i=(v=ee==null?void 0:ee.pageTop)!==null&&v!==void 0?v:0;var p;l=(p=ee==null?void 0:ee.pageLeft)!==null&&p!==void 0?p:0}return{width:e,height:r,totalWidth:n,totalHeight:o,scroll:a,top:i,left:l}}function id(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Eo(t,e,r,n,o,i,l){var a;let u=(a=o.scroll[t])!==null&&a!==void 0?a:0,c=n[Jr[t]],d=n.scroll[ye[t]]+i,f=c+n.scroll[ye[t]]-i,v=e-u+l[t]-n[ye[t]],p=e-u+r+l[t]-n[ye[t]];return v<d?d-v:p>f?Math.max(f-p,d-v):0}function ld(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 wo(t){if(Ft[t])return Ft[t];let[e,r]=t.split(" "),n=ye[e]||"right",o=od[n];ye[r]||(r="center");let i=Jr[n],l=Jr[o];return Ft[t]={placement:e,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:l},Ft[t]}function wr(t,e,r,n,o,i,l,a,u,c){let{placement:d,crossPlacement:f,axis:v,crossAxis:p,size:b,crossSize:m}=n,y={};var $;y[p]=($=t[p])!==null&&$!==void 0?$:0;var E,C,K,T;f==="center"?y[p]+=(((E=t[m])!==null&&E!==void 0?E:0)-((C=r[m])!==null&&C!==void 0?C:0))/2:f!==p&&(y[p]+=((K=t[m])!==null&&K!==void 0?K:0)-((T=r[m])!==null&&T!==void 0?T:0)),y[p]+=i;const x=t[p]-r[m]+u+c,M=t[p]+t[m]-u-c;if(y[p]=Ot(y[p],x,M),d===v){const F=a?l[b]:e[ji[b]];y[Ut[v]]=Math.floor(F-t[v]+o)}else y[v]=Math.floor(t[v]+t[b]+o);return y}function ad(t,e,r,n,o,i,l,a){const u=n?r.height:e[ji.height];var c;let d=t.top!=null?r.top+t.top:r.top+(u-((c=t.bottom)!==null&&c!==void 0?c:0)-l);var f,v,p,b,m,y;let $=a!=="top"?Math.max(0,e.height+e.top+((f=e.scroll.top)!==null&&f!==void 0?f:0)-d-(((v=o.top)!==null&&v!==void 0?v:0)+((p=o.bottom)!==null&&p!==void 0?p:0)+i)):Math.max(0,d+l-(e.top+((b=e.scroll.top)!==null&&b!==void 0?b:0))-(((m=o.top)!==null&&m!==void 0?m:0)+((y=o.bottom)!==null&&y!==void 0?y:0)+i));return Math.min(e.height-i*2,$)}function Co(t,e,r,n,o,i){let{placement:l,axis:a,size:u}=i;var c,d;if(l===a)return Math.max(0,r[a]-t[a]-((c=t.scroll[a])!==null&&c!==void 0?c:0)+e[a]-((d=n[a])!==null&&d!==void 0?d:0)-n[Ut[a]]-o);var f;return Math.max(0,t[u]+t[a]+t.scroll[a]-e[a]-r[a]-r[u]-((f=n[a])!==null&&f!==void 0?f:0)-n[Ut[a]]-o)}function sd(t,e,r,n,o,i,l,a,u,c,d,f,v,p,b,m){let y=wo(t),{size:$,crossAxis:E,crossSize:C,placement:K,crossPlacement:T}=y,x=wr(e,a,r,y,d,f,c,v,b,m),M=d,F=Co(a,c,e,o,i+d,y);if(l&&n[$]>F){let Fe=wo(`${Ut[K]} ${T}`),it=wr(e,a,r,Fe,d,f,c,v,b,m);Co(a,c,e,o,i+d,Fe)>F&&(y=Fe,x=it,M=d)}let N="bottom";y.axis==="top"?y.placement==="top"?N="top":y.placement==="bottom"&&(N="bottom"):y.crossAxis==="top"&&(y.crossPlacement==="top"?N="bottom":y.crossPlacement==="bottom"&&(N="top"));let L=Eo(E,x[E],r[C],a,u,i,c);x[E]+=L;let h=ad(x,a,c,v,o,i,r.height,N);p&&p<h&&(h=p),r.height=Math.min(r.height,h),x=wr(e,a,r,y,M,f,c,v,b,m),L=Eo(E,x[E],r[C],a,u,i,c),x[E]+=L;let R={},B=e[E]+.5*e[C]-x[E]-o[ye[E]];const D=b/2+m;var z,g,k,S;const O=ye[E]==="left"?((z=o.left)!==null&&z!==void 0?z:0)+((g=o.right)!==null&&g!==void 0?g:0):((k=o.top)!==null&&k!==void 0?k:0)+((S=o.bottom)!==null&&S!==void 0?S:0),Y=r[C]-O-b/2-m,Z=e[E]+b/2-(x[E]+o[ye[E]]),ne=e[E]+e[C]-b/2-(x[E]+o[ye[E]]),he=Ot(B,Z,ne);return R[E]=Ot(he,D,Y),{position:x,maxHeight:h,arrowOffsetLeft:R.left,arrowOffsetTop:R.top,placement:y.placement}}function ud(t){let{placement:e,targetNode:r,overlayNode:n,scrollNode:o,padding:i,shouldFlip:l,boundaryElement:a,offset:u,crossOffset:c,maxHeight:d,arrowSize:f=0,arrowBoundaryOffset:v=0}=t,p=n instanceof HTMLElement?cd(n):document.documentElement,b=p===document.documentElement;const m=window.getComputedStyle(p).position;let y=!!m&&m!=="static",$=b?rt(r):To(r,p);if(!b){let{marginTop:R,marginLeft:B}=window.getComputedStyle(r);$.top+=parseInt(R,10)||0,$.left+=parseInt(B,10)||0}let E=rt(n),C=ld(n);var K,T;E.width+=((K=C.left)!==null&&K!==void 0?K:0)+((T=C.right)!==null&&T!==void 0?T:0);var x,M;E.height+=((x=C.top)!==null&&x!==void 0?x:0)+((M=C.bottom)!==null&&M!==void 0?M:0);let F=id(o),N=Po(a),L=Po(p),h=a.tagName==="BODY"?rt(p):To(p,a);return p.tagName==="HTML"&&a.tagName==="BODY"&&(L.scroll.top=0,L.scroll.left=0),sd(e,$,E,F,C,i,l,N,L,h,u,c,y,d,f,v)}function rt(t){let{top:e,left:r,width:n,height:o}=t.getBoundingClientRect(),{scrollTop:i,scrollLeft:l,clientTop:a,clientLeft:u}=document.documentElement;return{top:e+i-a,left:r+l-u,width:n,height:o}}function To(t,e){let r=window.getComputedStyle(t),n;if(r.position==="fixed"){let{top:o,left:i,width:l,height:a}=t.getBoundingClientRect();n={top:o,left:i,width:l,height:a}}else{n=rt(t);let o=rt(e),i=window.getComputedStyle(e);o.top+=(parseInt(i.borderTopWidth,10)||0)-e.scrollTop,o.left+=(parseInt(i.borderLeftWidth,10)||0)-e.scrollLeft,n.top-=o.top,n.left-=o.left}return n.top-=parseInt(r.marginTop,10)||0,n.left-=parseInt(r.marginLeft,10)||0,n}function cd(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!ko(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!ko(e);)e=e.parentElement;return e||document.documentElement}function ko(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 _i=new WeakMap;function dd(t){let{triggerRef:e,isOpen:r,onClose:n}=t;s.useEffect(()=>{if(!r||n===null)return;let o=i=>{let l=i.target;if(!e.current||l instanceof Node&&!l.contains(e.current)||i.target instanceof HTMLInputElement||i.target instanceof HTMLTextAreaElement)return;let a=n||_i.get(e.current);a&&a()};return window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("scroll",o,!0)}},[r,n,e])}let G=typeof document<"u"?window.visualViewport:null;function Wi(t){let{direction:e}=Ke(),{arrowSize:r=0,targetRef:n,overlayRef:o,scrollRef:i=o,placement:l="bottom",containerPadding:a=12,shouldFlip:u=!0,boundaryElement:c=typeof document<"u"?document.body:null,offset:d=0,crossOffset:f=0,shouldUpdatePosition:v=!0,isOpen:p=!0,onClose:b,maxHeight:m,arrowBoundaryOffset:y=0}=t,[$,E]=s.useState(null),C=[v,l,o.current,n.current,i.current,a,u,c,d,f,p,e,m,y,r],K=s.useRef(G==null?void 0:G.scale);s.useEffect(()=>{p&&(K.current=G==null?void 0:G.scale)},[p]);let T=s.useCallback(()=>{if(v===!1||!p||!o.current||!n.current||!c||(G==null?void 0:G.scale)!==K.current)return;let L=null;if(i.current&&i.current.contains(document.activeElement)){var h;let S=(h=document.activeElement)===null||h===void 0?void 0:h.getBoundingClientRect(),O=i.current.getBoundingClientRect();var R;if(L={type:"top",offset:((R=S==null?void 0:S.top)!==null&&R!==void 0?R:0)-O.top},L.offset>O.height/2){L.type="bottom";var B;L.offset=((B=S==null?void 0:S.bottom)!==null&&B!==void 0?B:0)-O.bottom}}let D=o.current;if(!m&&o.current){var z;D.style.top="0px",D.style.bottom="";var g;D.style.maxHeight=((g=(z=window.visualViewport)===null||z===void 0?void 0:z.height)!==null&&g!==void 0?g:window.innerHeight)+"px"}let k=ud({placement:pd(l,e),overlayNode:o.current,targetNode:n.current,scrollNode:i.current||o.current,padding:a,shouldFlip:u,boundaryElement:c,offset:d,crossOffset:f,maxHeight:m,arrowSize:r,arrowBoundaryOffset:y});if(k.position){if(D.style.top="",D.style.bottom="",D.style.left="",D.style.right="",Object.keys(k.position).forEach(S=>D.style[S]=k.position[S]+"px"),D.style.maxHeight=k.maxHeight!=null?k.maxHeight+"px":"",L&&document.activeElement&&i.current){let S=document.activeElement.getBoundingClientRect(),O=i.current.getBoundingClientRect(),Y=S[L.type]-O[L.type];i.current.scrollTop+=Y-L.offset}E(k)}},C);H(T,C),fd(T),Br({ref:o,onResize:T}),Br({ref:n,onResize:T});let x=s.useRef(!1);H(()=>{let L,h=()=>{x.current=!0,clearTimeout(L),L=setTimeout(()=>{x.current=!1},500),T()},R=()=>{x.current&&h()};return G==null||G.addEventListener("resize",h),G==null||G.addEventListener("scroll",R),()=>{G==null||G.removeEventListener("resize",h),G==null||G.removeEventListener("scroll",R)}},[T]);let M=s.useCallback(()=>{x.current||b==null||b()},[b,x]);dd({triggerRef:n,isOpen:p,onClose:b&&M});var F,N;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...$==null?void 0:$.position,maxHeight:(F=$==null?void 0:$.maxHeight)!==null&&F!==void 0?F:"100vh"}},placement:(N=$==null?void 0:$.placement)!==null&&N!==void 0?N:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:$==null?void 0:$.arrowOffsetLeft,top:$==null?void 0:$.arrowOffsetTop}},updatePosition:T}}function fd(t){H(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function pd(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const me=[];function vd(t,e){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:a}=t;s.useEffect(()=>{if(o&&!me.includes(e))return me.push(e),()=>{let b=me.indexOf(e);b>=0&&me.splice(b,1)}},[o,e]);let u=()=>{me[me.length-1]===e&&r&&r()},c=b=>{(!a||a(b.target))&&me[me.length-1]===e&&(b.stopPropagation(),b.preventDefault())},d=b=>{(!a||a(b.target))&&(me[me.length-1]===e&&(b.stopPropagation(),b.preventDefault()),u())},f=b=>{b.key==="Escape"&&!l&&!b.nativeEvent.isComposing&&(b.stopPropagation(),b.preventDefault(),u())};fc({ref:e,onInteractOutside:i&&o?d:void 0,onInteractOutsideStart:c});let{focusWithinProps:v}=tr({isDisabled:!n,onBlurWithin:b=>{!b.relatedTarget||Ic(b.relatedTarget)||(!a||a(b.relatedTarget))&&(r==null||r())}}),p=b=>{b.target===b.currentTarget&&b.preventDefault()};return{overlayProps:{onKeyDown:f,...v},underlayProps:{onPointerDown:p}}}function Ui(t,e,r){let{type:n}=t,{isOpen:o}=e;s.useEffect(()=>{r&&r.current&&_i.set(r.current,e.close)});let i;n==="menu"?i=!0:n==="listbox"&&(i="listbox");let l=te();return{triggerProps:{"aria-haspopup":i,"aria-expanded":o,"aria-controls":o?l:void 0,onPress:e.toggle},overlayProps:{id:l}}}const Cr=typeof document<"u"&&window.visualViewport,bd=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Mt=0,Tr;function hd(t={}){let{isDisabled:e}=t;H(()=>{if(!e)return Mt++,Mt===1&&(Xt()?Tr=md():Tr=gd()),()=>{Mt--,Mt===0&&Tr()}},[e])}function gd(){return Te(et(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),et(document.documentElement,"overflow","hidden"))}function md(){let t,e,r=c=>{t=fi(c.target,!0),!(t===document.documentElement&&t===document.body)&&t instanceof HTMLElement&&window.getComputedStyle(t).overscrollBehavior==="auto"&&(e=et(t,"overscrollBehavior","contain"))},n=c=>{if(!t||t===document.documentElement||t===document.body){c.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&c.preventDefault()},o=()=>{e&&e()},i=c=>{let d=c.target;yd(d)&&(a(),d.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{d.style.transform="",Cr&&(Cr.height<window.innerHeight?requestAnimationFrame(()=>{Do(d)}):Cr.addEventListener("resize",()=>Do(d),{once:!0}))}))},l=null,a=()=>{if(l)return;let c=()=>{window.scrollTo(0,0)},d=window.pageXOffset,f=window.pageYOffset;l=Te(at(window,"scroll",c),et(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),et(document.documentElement,"overflow","hidden"),et(document.body,"marginTop",`-${f}px`),()=>{window.scrollTo(d,f)}),window.scrollTo(0,0)},u=Te(at(document,"touchstart",r,{passive:!1,capture:!0}),at(document,"touchmove",n,{passive:!1,capture:!0}),at(document,"touchend",o,{passive:!1,capture:!0}),at(document,"focus",i,!0));return()=>{e==null||e(),l==null||l(),u()}}function et(t,e,r){let n=t.style[e];return t.style[e]=r,()=>{t.style[e]=n}}function at(t,e,r,n){return t.addEventListener(e,r,n),()=>{t.removeEventListener(e,r,n)}}function Do(t){let e=document.scrollingElement||document.documentElement,r=t;for(;r&&r!==e;){let n=fi(r);if(n!==document.documentElement&&n!==document.body&&n!==r){let o=n.getBoundingClientRect().top,i=r.getBoundingClientRect().top;i>o+r.clientHeight&&(n.scrollTop+=i-o)}r=n.parentElement}}function yd(t){return t instanceof HTMLInputElement&&!bd.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}const $d=s.createContext({});function Gi(){var t;return(t=s.useContext($d))!==null&&t!==void 0?t:{}}const Qr=s.createContext(null);function xd(t){let{children:e}=t,r=s.useContext(Qr),[n,o]=s.useState(0),i=s.useMemo(()=>({parent:r,modalCount:n,addModal(){o(l=>l+1),r&&r.addModal()},removeModal(){o(l=>l-1),r&&r.removeModal()}}),[r,n]);return s.createElement(Qr.Provider,{value:i},e)}function Sd(){let t=s.useContext(Qr);return{modalProviderProps:{"aria-hidden":t&&t.modalCount>0?!0:void 0}}}function Pd(t){let{modalProviderProps:e}=Sd();return s.createElement("div",{"data-overlay-container":!0,...t,...e})}function Ed(t){return s.createElement(xd,null,s.createElement(Pd,t))}function wd(t){let e=_e(),{portalContainer:r=e?null:document.body,...n}=t,{getContainer:o}=Gi();if(!t.portalContainer&&o&&(r=o()),s.useEffect(()=>{if(r!=null&&r.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[r]),!r)return null;let i=s.createElement(Ed,n);return je.createPortal(i,r)}var qi={};qi={dismiss:"تجاهل"};var Yi={};Yi={dismiss:"Отхвърляне"};var Zi={};Zi={dismiss:"Odstranit"};var Xi={};Xi={dismiss:"Luk"};var Ji={};Ji={dismiss:"Schließen"};var Qi={};Qi={dismiss:"Απόρριψη"};var el={};el={dismiss:"Dismiss"};var tl={};tl={dismiss:"Descartar"};var rl={};rl={dismiss:"Lõpeta"};var nl={};nl={dismiss:"Hylkää"};var ol={};ol={dismiss:"Rejeter"};var il={};il={dismiss:"התעלם"};var ll={};ll={dismiss:"Odbaci"};var al={};al={dismiss:"Elutasítás"};var sl={};sl={dismiss:"Ignora"};var ul={};ul={dismiss:"閉じる"};var cl={};cl={dismiss:"무시"};var dl={};dl={dismiss:"Atmesti"};var fl={};fl={dismiss:"Nerādīt"};var pl={};pl={dismiss:"Lukk"};var vl={};vl={dismiss:"Negeren"};var bl={};bl={dismiss:"Zignoruj"};var hl={};hl={dismiss:"Descartar"};var gl={};gl={dismiss:"Dispensar"};var ml={};ml={dismiss:"Revocare"};var yl={};yl={dismiss:"Пропустить"};var $l={};$l={dismiss:"Zrušiť"};var xl={};xl={dismiss:"Opusti"};var Sl={};Sl={dismiss:"Odbaci"};var Pl={};Pl={dismiss:"Avvisa"};var El={};El={dismiss:"Kapat"};var wl={};wl={dismiss:"Скасувати"};var Cl={};Cl={dismiss:"取消"};var Tl={};Tl={dismiss:"關閉"};var kl={};kl={"ar-AE":qi,"bg-BG":Yi,"cs-CZ":Zi,"da-DK":Xi,"de-DE":Ji,"el-GR":Qi,"en-US":el,"es-ES":tl,"et-EE":rl,"fi-FI":nl,"fr-FR":ol,"he-IL":il,"hr-HR":ll,"hu-HU":al,"it-IT":sl,"ja-JP":ul,"ko-KR":cl,"lt-LT":dl,"lv-LV":fl,"nb-NO":pl,"nl-NL":vl,"pl-PL":bl,"pt-BR":hl,"pt-PT":gl,"ro-RO":ml,"ru-RU":yl,"sk-SK":$l,"sl-SI":xl,"sr-SP":Sl,"sv-SE":Pl,"tr-TR":El,"uk-UA":wl,"zh-CN":Cl,"zh-TW":Tl};function Cd(t){return t&&t.__esModule?t.default:t}function Ro(t){let{onDismiss:e,...r}=t,n=vn(Cd(kl),"@react-aria/overlays"),o=di(r,n.format("dismiss")),i=()=>{e&&e()};return s.createElement(Vi,null,s.createElement("button",{...o,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}let st=new WeakMap,ie=[];function Td(t,e=document.body){let r=new Set(t),n=new Set,o=u=>{for(let v of u.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(v);let c=v=>{if(r.has(v)||v.parentElement&&n.has(v.parentElement)&&v.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let p of r)if(v.contains(p))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},d=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),f=c(u);if(f===NodeFilter.FILTER_ACCEPT&&i(u),f!==NodeFilter.FILTER_REJECT){let v=d.nextNode();for(;v!=null;)i(v),v=d.nextNode()}},i=u=>{var c;let d=(c=st.get(u))!==null&&c!==void 0?c:0;u.getAttribute("aria-hidden")==="true"&&d===0||(d===0&&u.setAttribute("aria-hidden","true"),n.add(u),st.set(u,d+1))};ie.length&&ie[ie.length-1].disconnect(),o(e);let l=new MutationObserver(u=>{for(let c of u)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...r,...n].some(d=>d.contains(c.target))){for(let d of c.removedNodes)d instanceof Element&&(r.delete(d),n.delete(d));for(let d of c.addedNodes)(d instanceof HTMLElement||d instanceof SVGElement)&&(d.dataset.liveAnnouncer==="true"||d.dataset.reactAriaTopLayer==="true")?r.add(d):d instanceof Element&&o(d)}});l.observe(e,{childList:!0,subtree:!0});let a={visibleNodes:r,hiddenNodes:n,observe(){l.observe(e,{childList:!0,subtree:!0})},disconnect(){l.disconnect()}};return ie.push(a),()=>{l.disconnect();for(let u of n){let c=st.get(u);c!=null&&(c===1?(u.removeAttribute("aria-hidden"),st.delete(u)):st.set(u,c-1))}a===ie[ie.length-1]?(ie.pop(),ie.length&&ie[ie.length-1].observe()):ie.splice(ie.indexOf(a),1)}}function kd(t){let e=ie[ie.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}function Dd(t,e){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:a,...u}=t,c=u.trigger==="SubmenuTrigger",{overlayProps:d,underlayProps:f}=vd({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i||c,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:a},o??n),{overlayProps:v,arrowProps:p,placement:b}=Wi({...u,targetRef:r,overlayRef:n,isOpen:e.isOpen,onClose:i&&!c?e.close:null});return hd({isDisabled:i||!e.isOpen}),H(()=>{if(e.isOpen&&n.current){var m,y;return i?kd((m=o==null?void 0:o.current)!==null&&m!==void 0?m:n.current):Td([(y=o==null?void 0:o.current)!==null&&y!==void 0?y:n.current])}},[i,e.isOpen,n,o]),{popoverProps:A(d,v),arrowProps:p,underlayProps:f,placement:b}}const Dl=s.createContext(null);function Ko(t){let e=_e(),{portalContainer:r=e?null:document.body,isExiting:n}=t,[o,i]=s.useState(!1),l=s.useMemo(()=>({contain:o,setContain:i}),[o,i]),{getContainer:a}=Gi();if(!t.portalContainer&&a&&(r=a()),!r)return null;let u=t.children;return t.disableFocusManagement||(u=s.createElement(Fi,{restoreFocus:!0,contain:(t.shouldContainFocus||o)&&!n},u)),u=s.createElement(Dl.Provider,{value:l},s.createElement(cc,null,u)),je.createPortal(u,r)}function Rd(){let t=s.useContext(Dl),e=t==null?void 0:t.setContain;H(()=>{e==null||e(!0)},[e])}const xn=new WeakMap;function Kd(t){return typeof t=="string"?t.replace(/\s*/g,""):""+t}function Ld(t,e){let r=xn.get(t);if(!r)throw new Error("Unknown list");return`${r.id}-option-${Kd(e)}`}function en(t){return Tu()?t.altKey:t.ctrlKey}function Nt(t,e){var r,n;let o=`[data-key="${CSS.escape(String(e))}"]`,i=(r=t.current)===null||r===void 0?void 0:r.dataset.collection;return i&&(o=`[data-collection="${CSS.escape(i)}"]${o}`),(n=t.current)===null||n===void 0?void 0:n.querySelector(o)}const Rl=new WeakMap;function Fd(t){let e=te();return Rl.set(t,e),e}function Md(t){return Rl.get(t)}const Ad=1e3;function Kl(t){let{keyboardDelegate:e,selectionManager:r,onTypeSelect:n}=t,o=s.useRef({search:"",timeout:void 0}).current,i=l=>{let a=Id(l.key);if(!(!a||l.ctrlKey||l.metaKey||!l.currentTarget.contains(l.target))){if(a===" "&&o.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),o.search+=a,e.getKeyForSearch!=null){let u=e.getKeyForSearch(o.search,r.focusedKey);u==null&&(u=e.getKeyForSearch(o.search)),u!=null&&(r.setFocusedKey(u),n&&n(u))}clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},Ad)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0}}}function Id(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Nd(t){let{selectionManager:e,keyboardDelegate:r,ref:n,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:l=!1,disallowSelectAll:a=!1,escapeKeyBehavior:u="clearSelection",selectOnFocus:c=e.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:f,allowsTabNavigation:v=!1,isVirtualized:p,scrollRef:b=n,linkBehavior:m="action"}=t,{direction:y}=Ke(),$=Jt(),E=g=>{var k;if(g.altKey&&g.key==="Tab"&&g.preventDefault(),!(!((k=n.current)===null||k===void 0)&&k.contains(g.target)))return;const S=(I,Me)=>{if(I!=null){if(e.isLink(I)&&m==="selection"&&c&&!en(g)){je.flushSync(()=>{e.setFocusedKey(I,Me)});let Ae=Nt(n,I),Jn=e.getItemProps(I);Ae&&$.open(Ae,g,Jn.href,Jn.routerOptions);return}if(e.setFocusedKey(I,Me),e.isLink(I)&&m==="override")return;g.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(I):c&&!en(g)&&e.replaceSelection(I)}};switch(g.key){case"ArrowDown":if(r.getKeyBelow){var O,Y,Z;let I=e.focusedKey!=null?(O=r.getKeyBelow)===null||O===void 0?void 0:O.call(r,e.focusedKey):(Y=r.getFirstKey)===null||Y===void 0?void 0:Y.call(r);I==null&&i&&(I=(Z=r.getFirstKey)===null||Z===void 0?void 0:Z.call(r,e.focusedKey)),I!=null&&(g.preventDefault(),S(I))}break;case"ArrowUp":if(r.getKeyAbove){var ne,he,Fe;let I=e.focusedKey!=null?(ne=r.getKeyAbove)===null||ne===void 0?void 0:ne.call(r,e.focusedKey):(he=r.getLastKey)===null||he===void 0?void 0:he.call(r);I==null&&i&&(I=(Fe=r.getLastKey)===null||Fe===void 0?void 0:Fe.call(r,e.focusedKey)),I!=null&&(g.preventDefault(),S(I))}break;case"ArrowLeft":if(r.getKeyLeftOf){var it,kt,fr;let I=e.focusedKey!=null?(it=r.getKeyLeftOf)===null||it===void 0?void 0:it.call(r,e.focusedKey):null;I==null&&i&&(I=y==="rtl"?(kt=r.getFirstKey)===null||kt===void 0?void 0:kt.call(r,e.focusedKey):(fr=r.getLastKey)===null||fr===void 0?void 0:fr.call(r,e.focusedKey)),I!=null&&(g.preventDefault(),S(I,y==="rtl"?"first":"last"))}break;case"ArrowRight":if(r.getKeyRightOf){var pr,vr,br;let I=e.focusedKey!=null?(pr=r.getKeyRightOf)===null||pr===void 0?void 0:pr.call(r,e.focusedKey):null;I==null&&i&&(I=y==="rtl"?(vr=r.getLastKey)===null||vr===void 0?void 0:vr.call(r,e.focusedKey):(br=r.getFirstKey)===null||br===void 0?void 0:br.call(r,e.focusedKey)),I!=null&&(g.preventDefault(),S(I,y==="rtl"?"last":"first"))}break;case"Home":if(r.getFirstKey){if(e.focusedKey===null&&g.shiftKey)return;g.preventDefault();let I=r.getFirstKey(e.focusedKey,Je(g));e.setFocusedKey(I),I!=null&&(Je(g)&&g.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(I):c&&e.replaceSelection(I))}break;case"End":if(r.getLastKey){if(e.focusedKey===null&&g.shiftKey)return;g.preventDefault();let I=r.getLastKey(e.focusedKey,Je(g));e.setFocusedKey(I),I!=null&&(Je(g)&&g.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(I):c&&e.replaceSelection(I))}break;case"PageDown":if(r.getKeyPageBelow&&e.focusedKey!=null){let I=r.getKeyPageBelow(e.focusedKey);I!=null&&(g.preventDefault(),S(I))}break;case"PageUp":if(r.getKeyPageAbove&&e.focusedKey!=null){let I=r.getKeyPageAbove(e.focusedKey);I!=null&&(g.preventDefault(),S(I))}break;case"a":Je(g)&&e.selectionMode==="multiple"&&a!==!0&&(g.preventDefault(),e.selectAll());break;case"Escape":u==="clearSelection"&&!l&&e.selectedKeys.size!==0&&(g.stopPropagation(),g.preventDefault(),e.clearSelection());break;case"Tab":if(!v){if(g.shiftKey)n.current.focus();else{let I=ue(n.current,{tabbable:!0}),Me,Ae;do Ae=I.lastChild(),Ae&&(Me=Ae);while(Ae);Me&&!Me.contains(document.activeElement)&&be(Me)}break}}},C=s.useRef({top:0,left:0});dt(b,"scroll",p?void 0:()=>{var g,k,S,O;C.current={top:(S=(g=b.current)===null||g===void 0?void 0:g.scrollTop)!==null&&S!==void 0?S:0,left:(O=(k=b.current)===null||k===void 0?void 0:k.scrollLeft)!==null&&O!==void 0?O:0}});let K=g=>{if(e.isFocused){g.currentTarget.contains(g.target)||e.setFocused(!1);return}if(g.currentTarget.contains(g.target)){if(e.setFocused(!0),e.focusedKey==null){var k,S;let Z=he=>{he!=null&&(e.setFocusedKey(he),c&&!e.isSelected(he)&&e.replaceSelection(he))},ne=g.relatedTarget;var O,Y;ne&&g.currentTarget.compareDocumentPosition(ne)&Node.DOCUMENT_POSITION_FOLLOWING?Z((O=e.lastSelectedKey)!==null&&O!==void 0?O:(k=r.getLastKey)===null||k===void 0?void 0:k.call(r)):Z((Y=e.firstSelectedKey)!==null&&Y!==void 0?Y:(S=r.getFirstKey)===null||S===void 0?void 0:S.call(r))}else!p&&b.current&&(b.current.scrollTop=C.current.top,b.current.scrollLeft=C.current.left);if(e.focusedKey!=null&&b.current){let Z=Nt(n,e.focusedKey);Z instanceof HTMLElement&&(!Z.contains(document.activeElement)&&!f&&be(Z),yt()==="keyboard"&&ro(Z,{containingElement:n.current}))}}},T=g=>{g.currentTarget.contains(g.relatedTarget)||e.setFocused(!1)},x=s.useRef(!1);dt(n,Ou,f?g=>{let{detail:k}=g;g.stopPropagation(),e.setFocused(!0),(k==null?void 0:k.focusStrategy)==="first"&&(x.current=!0)}:void 0);let M=J(()=>{var g,k;let S=(k=(g=r.getFirstKey)===null||g===void 0?void 0:g.call(r))!==null&&k!==void 0?k:null;S==null?(Ii(n.current),e.collection.size>0&&(x.current=!1)):(e.setFocusedKey(S),x.current=!1)});eo(()=>{x.current&&M()},[e.collection,M]);let F=J(()=>{e.collection.size>0&&(x.current=!1)});eo(()=>{F()},[e.focusedKey,F]),dt(n,Bu,f?g=>{var k;g.stopPropagation(),e.setFocused(!1),!((k=g.detail)===null||k===void 0)&&k.clearFocusKey&&e.setFocusedKey(null)}:void 0);const N=s.useRef(o),L=s.useRef(!1);s.useEffect(()=>{if(N.current){var g,k;let Y=null;var S;o==="first"&&(Y=(S=(g=r.getFirstKey)===null||g===void 0?void 0:g.call(r))!==null&&S!==void 0?S:null);var O;o==="last"&&(Y=(O=(k=r.getLastKey)===null||k===void 0?void 0:k.call(r))!==null&&O!==void 0?O:null);let Z=e.selectedKeys;if(Z.size){for(let ne of Z)if(e.canSelectItem(ne)){Y=ne;break}}e.setFocused(!0),e.setFocusedKey(Y),Y==null&&!f&&n.current&&De(n.current),e.collection.size>0&&(N.current=!1,L.current=!0)}});let h=s.useRef(e.focusedKey);s.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==h.current||L.current)&&b.current&&n.current){let g=yt(),k=Nt(n,e.focusedKey);if(!(k instanceof HTMLElement))return;(g==="keyboard"||L.current)&&(pi(b.current,k),g!=="virtual"&&ro(k,{containingElement:n.current}))}!f&&e.isFocused&&e.focusedKey==null&&h.current!=null&&n.current&&De(n.current),h.current=e.focusedKey,L.current=!1}),dt(n,"react-aria-focus-scope-restore",g=>{g.preventDefault(),e.setFocused(!0)});let R={onKeyDown:E,onFocus:K,onBlur:T,onMouseDown(g){b.current===g.target&&g.preventDefault()}},{typeSelectProps:B}=Kl({keyboardDelegate:r,selectionManager:e});d||(R=A(B,R));let D;f||(D=e.focusedKey==null?0:-1);let z=Fd(e.collection);return{collectionProps:A(R,{tabIndex:D,"data-collection":z})}}function Bd(t){let{id:e,selectionManager:r,key:n,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:l,focus:a,isDisabled:u,onAction:c,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=t,v=Jt();e=te(e);let p=S=>{if(S.pointerType==="keyboard"&&en(S))r.toggleSelection(n);else{if(r.selectionMode==="none")return;if(r.isLink(n)){if(f==="selection"&&o.current){let O=r.getItemProps(n);v.open(o.current,S,O.href,O.routerOptions),r.setSelectedKeys(r.selectedKeys);return}else if(f==="override"||f==="none")return}r.selectionMode==="single"?r.isSelected(n)&&!r.disallowEmptySelection?r.toggleSelection(n):r.replaceSelection(n):S&&S.shiftKey?r.extendSelection(n):r.selectionBehavior==="toggle"||S&&(Je(S)||S.pointerType==="touch"||S.pointerType==="virtual")?r.toggleSelection(n):r.replaceSelection(n)}};s.useEffect(()=>{n===r.focusedKey&&r.isFocused&&(l?Ii(o.current):a?a():document.activeElement!==o.current&&o.current&&De(o.current))},[o,n,r.focusedKey,r.childFocusStrategy,r.isFocused,l]),u=u||r.isDisabled(n);let b={};!l&&!u?b={tabIndex:n===r.focusedKey?0:-1,onFocus(S){S.target===o.current&&r.setFocusedKey(n)}}:u&&(b.onMouseDown=S=>{S.preventDefault()});let m=r.isLink(n)&&f==="override",y=r.isLink(n)&&f!=="selection"&&f!=="none",$=!u&&r.canSelectItem(n)&&!m,E=(c||y)&&!u,C=E&&(r.selectionBehavior==="replace"?!$:!$||r.isEmpty),K=E&&$&&r.selectionBehavior==="replace",T=C||K,x=s.useRef(null),M=T&&$,F=s.useRef(!1),N=s.useRef(!1),L=S=>{if(c&&c(),y&&o.current){let O=r.getItemProps(n);v.open(o.current,S,O.href,O.routerOptions)}},h={ref:o};i?(h.onPressStart=S=>{x.current=S.pointerType,F.current=M,S.pointerType==="keyboard"&&(!T||Fo())&&p(S)},d?(h.onPressUp=C?void 0:S=>{S.pointerType==="mouse"&&$&&p(S)},h.onPress=C?L:S=>{S.pointerType!=="keyboard"&&S.pointerType!=="mouse"&&$&&p(S)}):h.onPress=S=>{if(C||K&&S.pointerType!=="mouse"){if(S.pointerType==="keyboard"&&!Lo())return;L(S)}else S.pointerType!=="keyboard"&&$&&p(S)}):(h.onPressStart=S=>{x.current=S.pointerType,F.current=M,N.current=C,$&&(S.pointerType==="mouse"&&!C||S.pointerType==="keyboard"&&(!E||Fo()))&&p(S)},h.onPress=S=>{(S.pointerType==="touch"||S.pointerType==="pen"||S.pointerType==="virtual"||S.pointerType==="keyboard"&&T&&Lo()||S.pointerType==="mouse"&&N.current)&&(T?L(S):$&&p(S))}),b["data-collection"]=Md(r.collection),b["data-key"]=n,h.preventFocusOnPress=l,l&&(h=A(h,{onPressStart(S){S.pointerType!=="touch"&&(r.setFocused(!0),r.setFocusedKey(n))},onPress(S){S.pointerType==="touch"&&(r.setFocused(!0),r.setFocusedKey(n))}}));let{pressProps:R,isPressed:B}=He(h),D=K?S=>{x.current==="mouse"&&(S.stopPropagation(),S.preventDefault(),L(S))}:void 0,{longPressProps:z}=ki({isDisabled:!M,onLongPress(S){S.pointerType==="touch"&&(p(S),r.setSelectionBehavior("toggle"))}}),g=S=>{x.current==="touch"&&F.current&&S.preventDefault()},k=r.isLink(n)?S=>{ze.isOpening||S.preventDefault()}:void 0;return{itemProps:A(b,$||C||l?R:{},M?z:{},{onDoubleClick:D,onDragStartCapture:g,onClick:k,id:e},l?{onMouseDown:S=>S.preventDefault()}:void 0),isPressed:B,isSelected:r.isSelected(n),isFocused:r.isFocused&&r.focusedKey===n,isDisabled:u,allowsSelection:$,hasAction:T}}function Lo(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function Fo(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class Mo{getItemRect(e){let r=this.ref.current;if(!r)return null;let n=e!=null?Nt(this.ref,e):null;if(!n)return null;let o=r.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-o.left+r.scrollLeft,y:i.top-o.top+r.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;var r,n;return{width:(r=e==null?void 0:e.scrollWidth)!==null&&r!==void 0?r:0,height:(n=e==null?void 0:e.scrollHeight)!==null&&n!==void 0?n:0}}getVisibleRect(){let e=this.ref.current;var r,n,o,i;return{x:(r=e==null?void 0:e.scrollLeft)!==null&&r!==void 0?r:0,y:(n=e==null?void 0:e.scrollTop)!==null&&n!==void 0?n:0,width:(o=e==null?void 0:e.offsetWidth)!==null&&o!==void 0?o:0,height:(i=e==null?void 0:e.offsetHeight)!==null&&i!==void 0?i:0}}constructor(e){this.ref=e}}class Sn{isDisabled(e){var r;return this.disabledBehavior==="all"&&(((r=e.props)===null||r===void 0?void 0:r.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,r){let n=e;for(;n!=null;){let o=this.collection.getItem(n);if((o==null?void 0:o.type)==="item"&&!this.isDisabled(o))return n;n=r(n)}return null}getNextKey(e){let r=e;return r=this.collection.getKeyAfter(r),this.findNextNonDisabled(r,n=>this.collection.getKeyAfter(n))}getPreviousKey(e){let r=e;return r=this.collection.getKeyBefore(r),this.findNextNonDisabled(r,n=>this.collection.getKeyBefore(n))}findKey(e,r,n){let o=e,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let l=i;do{if(o=r(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&n(l,i)&&o!=null);return o}isSameRow(e,r){return e.y===r.y||e.x!==r.x}isSameColumn(e,r){return e.x===r.x||e.y!==r.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getNextKey(r),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getPreviousKey(r),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,r){return r?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let r=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,n=>this.layoutDelegate[r](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,n=>this.getNextColumn(n,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let r=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,n=>this.layoutDelegate[r](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,n=>this.getNextColumn(n,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,r=>this.collection.getKeyAfter(r))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,r=>this.collection.getKeyBefore(r))}getKeyPageAbove(e){let r=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(r&&!ht(r))return this.getFirstKey();let o=e;if(this.orientation==="horizontal"){let i=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>i&&o!=null;)o=this.getKeyAbove(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>i&&o!=null;)o=this.getKeyAbove(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getFirstKey()}getKeyPageBelow(e){let r=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(r&&!ht(r))return this.getLastKey();let o=e;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<i&&o!=null;)o=this.getKeyBelow(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<i&&o!=null;)o=this.getKeyBelow(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getLastKey()}getKeyForSearch(e,r){if(!this.collator)return null;let n=this.collection,o=r||this.getFirstKey();for(;o!=null;){let i=n.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}constructor(...e){if(e.length===1){let r=e[0];this.collection=r.collection,this.ref=r.ref,this.collator=r.collator,this.disabledKeys=r.disabledKeys||new Set,this.disabledBehavior=r.disabledBehavior||"all",this.orientation=r.orientation||"vertical",this.direction=r.direction,this.layout=r.layout||"stack",this.layoutDelegate=r.layoutDelegate||new Mo(r.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 Mo(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function Od(t){let{selectionManager:e,collection:r,disabledKeys:n,ref:o,keyboardDelegate:i,layoutDelegate:l}=t,a=bn({usage:"search",sensitivity:"base"}),u=e.disabledBehavior,c=s.useMemo(()=>i||new Sn({collection:r,disabledKeys:n,disabledBehavior:u,ref:o,collator:a,layoutDelegate:l}),[i,l,r,n,o,a,u]),{collectionProps:d}=Nd({...t,ref:o,selectionManager:e,keyboardDelegate:c});return{listProps:d}}function zd(t,e,r){let n=Q(t,{labelable:!0}),o=t.selectionBehavior||"toggle",i=t.linkBehavior||(o==="replace"?"action":"override");o==="toggle"&&i==="action"&&(i="override");let{listProps:l}=Od({...t,ref:r,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,linkBehavior:i}),{focusWithinProps:a}=tr({onFocusWithin:t.onFocus,onBlurWithin:t.onBlur,onFocusWithinChange:t.onFocusChange}),u=te(t.id);xn.set(e,{id:u,shouldUseVirtualFocus:t.shouldUseVirtualFocus,shouldSelectOnPressUp:t.shouldSelectOnPressUp,shouldFocusOnHover:t.shouldFocusOnHover,isVirtualized:t.isVirtualized,onAction:t.onAction,linkBehavior:i});let{labelProps:c,fieldProps:d}=yn({...t,id:u,labelElementType:"span"});return{labelProps:c,listBoxProps:A(n,a,e.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...A(d,l)})}}class Hd{build(e,r){return this.context=r,Ao(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:r,items:n}=e;if(s.isValidElement(r)&&r.type===s.Fragment)yield*this.iterateCollection({children:r.props.children,items:n});else if(typeof r=="function"){if(!n)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of n)yield*this.getFullNode({value:i,index:o},{renderer:r}),o++}else{let o=[];s.Children.forEach(r,l=>{l&&o.push(l)});let i=0;for(let l of o){let a=this.getFullNode({element:l,index:i},{});for(let u of a)i++,yield u}}}getKey(e,r,n,o){if(e.key!=null)return e.key;if(r.type==="cell"&&r.key!=null)return`${o}${r.key}`;let i=r.value;if(i!=null){var l;let a=(l=i.key)!==null&&l!==void 0?l:i.id;if(a==null)throw new Error("No key found for item");return a}return o?`${o}.${r.index}`:`$.${r.index}`}getChildState(e,r){return{renderer:r.renderer||e.renderer}}*getFullNode(e,r,n,o){if(s.isValidElement(e.element)&&e.element.type===s.Fragment){let y=[];s.Children.forEach(e.element.props.children,E=>{y.push(E)});var i;let $=(i=e.index)!==null&&i!==void 0?i:0;for(const E of y)yield*this.getFullNode({element:E,index:$++},r,n,o);return}let l=e.element;if(!l&&e.value&&r&&r.renderer){let y=this.cache.get(e.value);if(y&&(!y.shouldInvalidate||!y.shouldInvalidate(this.context))){y.index=e.index,y.parentKey=o?o.key:null,yield y;return}l=r.renderer(e.value)}if(s.isValidElement(l)){let y=l.type;if(typeof y!="function"&&typeof y.getCollectionNode!="function"){let K=l.type;throw new Error(`Unknown element <${K}> in collection.`)}let $=y.getCollectionNode(l.props,this.context);var a;let E=(a=e.index)!==null&&a!==void 0?a:0,C=$.next();for(;!C.done&&C.value;){let K=C.value;e.index=E;var u;let T=(u=K.key)!==null&&u!==void 0?u:null;T==null&&(T=K.element?null:this.getKey(l,e,r,n));let M=[...this.getFullNode({...K,key:T,index:E,wrapper:Vd(e.wrapper,K.wrapper)},this.getChildState(r,K),n?`${n}${l.key}`:l.key,o)];for(let F of M){var c,d;F.value=(d=(c=K.value)!==null&&c!==void 0?c:e.value)!==null&&d!==void 0?d:null,F.value&&this.cache.set(F.value,F);var f;if(e.type&&F.type!==e.type)throw new Error(`Unsupported type <${kr(F.type)}> in <${kr((f=o==null?void 0:o.type)!==null&&f!==void 0?f:"unknown parent type")}>. Only <${kr(e.type)}> is supported.`);E++,yield F}C=$.next(M)}return}if(e.key==null||e.type==null)return;let v=this;var p,b;let m={type:e.type,props:e.props,key:e.key,parentKey:o?o.key:null,value:(p=e.value)!==null&&p!==void 0?p:null,level:o?o.level+1:0,index:e.index,rendered:e.rendered,textValue:(b=e.textValue)!==null&&b!==void 0?b:"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Ao(function*(){if(!e.hasChildNodes||!e.childNodes)return;let y=0;for(let $ of e.childNodes()){$.key!=null&&($.key=`${m.key}${$.key}`);let E=v.getFullNode({...$,index:y},v.getChildState(r,$),m.key,m);for(let C of E)y++,yield C}})};yield m}constructor(){this.cache=new WeakMap}}function Ao(t){let e=[],r=null;return{*[Symbol.iterator](){for(let n of e)yield n;r||(r=t());for(let n of r)e.push(n),yield n}}}function Vd(t,e){if(t&&e)return r=>t(e(r));if(t)return t;if(e)return e}function kr(t){return t[0].toUpperCase()+t.slice(1)}function jd(t,e,r){let n=s.useMemo(()=>new Hd,[]),{children:o,items:i,collection:l}=t;return s.useMemo(()=>{if(l)return l;let u=n.build({children:o,items:i},r);return e(u)},[n,o,i,l,r,e])}function Ll(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function _d(t){return Wd(t)}function Wd(t,e){for(let r of t)return r}function Dr(t,e,r){if(e.parentKey===r.parentKey)return e.index-r.index;let n=[...Io(t,e),e],o=[...Io(t,r),r],i=n.slice(0,o.length).findIndex((l,a)=>l!==o[a]);return i!==-1?(e=n[i],r=o[i],e.index-r.index):n.findIndex(l=>l===r)>=0?1:(o.findIndex(l=>l===e)>=0,-1)}function Io(t,e){let r=[],n=e;for(;(n==null?void 0:n.parentKey)!=null;)n=t.getItem(n.parentKey),n&&r.unshift(n);return r}const No=new WeakMap;function Ud(t){let e=No.get(t);if(e!=null)return e;let r=0,n=o=>{for(let i of o)i.type==="section"?n(Ll(i,t)):r++};return n(t),No.set(t,r),r}function Gd(t,e,r){var n,o;let{key:i}=t,l=xn.get(e);var a;let u=(a=t.isDisabled)!==null&&a!==void 0?a:e.selectionManager.isDisabled(i);var c;let d=(c=t.isSelected)!==null&&c!==void 0?c:e.selectionManager.isSelected(i);var f;let v=(f=t.shouldSelectOnPressUp)!==null&&f!==void 0?f:l==null?void 0:l.shouldSelectOnPressUp;var p;let b=(p=t.shouldFocusOnHover)!==null&&p!==void 0?p:l==null?void 0:l.shouldFocusOnHover;var m;let y=(m=t.shouldUseVirtualFocus)!==null&&m!==void 0?m:l==null?void 0:l.shouldUseVirtualFocus;var $;let E=($=t.isVirtualized)!==null&&$!==void 0?$:l==null?void 0:l.isVirtualized,C=bt(),K=bt(),T={role:"option","aria-disabled":u||void 0,"aria-selected":e.selectionManager.selectionMode!=="none"?d:void 0};ke()&&an()||(T["aria-label"]=t["aria-label"],T["aria-labelledby"]=C,T["aria-describedby"]=K);let x=e.collection.getItem(i);if(E){let k=Number(x==null?void 0:x.index);T["aria-posinset"]=Number.isNaN(k)?void 0:k+1,T["aria-setsize"]=Ud(e.collection)}let M=l!=null&&l.onAction?()=>{var k;return l==null||(k=l.onAction)===null||k===void 0?void 0:k.call(l,i)}:void 0,F=Ld(e,i),{itemProps:N,isPressed:L,isFocused:h,hasAction:R,allowsSelection:B}=Bd({selectionManager:e.selectionManager,key:i,ref:r,shouldSelectOnPressUp:v,allowsDifferentPressOrigin:v&&b,isVirtualized:E,shouldUseVirtualFocus:y,isDisabled:u,onAction:M||!(x==null||(n=x.props)===null||n===void 0)&&n.onAction?Te(x==null||(o=x.props)===null||o===void 0?void 0:o.onAction,M):void 0,linkBehavior:l==null?void 0:l.linkBehavior,id:F}),{hoverProps:D}=Ue({isDisabled:u||!b,onHoverStart(){mt()||(e.selectionManager.setFocused(!0),e.selectionManager.setFocusedKey(i))}}),z=Q(x==null?void 0:x.props);delete z.id;let g=ui(x==null?void 0:x.props);return{optionProps:{...T,...A(z,N,D,g),id:F},labelProps:{id:C},descriptionProps:{id:K},isFocused:h,isFocusVisible:h&&e.selectionManager.isFocused&&mt(),isSelected:d,isDisabled:u,isPressed:L,allowsSelection:B,hasAction:R}}function qd(t){let{heading:e,"aria-label":r}=t,n=te();return{itemProps:{role:"presentation"},headingProps:e?{id:n,role:"presentation"}:{},groupProps:{role:"group","aria-label":r,"aria-labelledby":e?n:void 0}}}var Fl={};Fl={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Ml={};Ml={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Al={};Al={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Il={};Il={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var Nl={};Nl={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var Bl={};Bl={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var Ol={};Ol={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var zl={};zl={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Hl={};Hl={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Vl={};Vl={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var jl={};jl={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var _l={};_l={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Wl={};Wl={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Ul={};Ul={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Gl={};Gl={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var ql={};ql={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var Yl={};Yl={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Zl={};Zl={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Xl={};Xl={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Jl={};Jl={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Ql={};Ql={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var ea={};ea={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var ta={};ta={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var ra={};ra={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var na={};na={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var oa={};oa={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var ia={};ia={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var la={};la={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var aa={};aa={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var sa={};sa={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var ua={};ua={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var ca={};ca={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var da={};da={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var fa={};fa={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var pa={};pa={"ar-AE":Fl,"bg-BG":Ml,"cs-CZ":Al,"da-DK":Il,"de-DE":Nl,"el-GR":Bl,"en-US":Ol,"es-ES":zl,"et-EE":Hl,"fi-FI":Vl,"fr-FR":jl,"he-IL":_l,"hr-HR":Wl,"hu-HU":Ul,"it-IT":Gl,"ja-JP":ql,"ko-KR":Yl,"lt-LT":Zl,"lv-LV":Xl,"nb-NO":Jl,"nl-NL":Ql,"pl-PL":ea,"pt-BR":ta,"pt-PT":ra,"ro-RO":na,"ru-RU":oa,"sk-SK":ia,"sl-SI":la,"sr-SP":aa,"sv-SE":sa,"tr-TR":ua,"uk-UA":ca,"zh-CN":da,"zh-TW":fa};function Yd(t){return t&&t.__esModule?t.default:t}function Zd(t,e,r){let{type:n="menu",isDisabled:o,trigger:i="press"}=t,l=te(),{triggerProps:a,overlayProps:u}=Ui({type:n},e,r),c=p=>{if(!o&&!(i==="longPress"&&!p.altKey)&&r&&r.current)switch(p.key){case"Enter":case" ":if(i==="longPress")return;case"ArrowDown":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),e.toggle("last");break;default:"continuePropagation"in p&&p.continuePropagation()}},d=vn(Yd(pa),"@react-aria/menu"),{longPressProps:f}=ki({isDisabled:o||i!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),v={preventFocusOnPress:!0,onPressStart(p){p.pointerType!=="touch"&&p.pointerType!=="keyboard"&&!o&&(be(p.target),e.open(p.pointerType==="virtual"?"first":null))},onPress(p){p.pointerType==="touch"&&!o&&(be(p.target),e.toggle())}};return delete a.onPress,{menuTriggerProps:{...a,...i==="press"?v:f,id:l,onKeyDown:c},menuProps:{...u,"aria-labelledby":l,autoFocus:e.focusStrategy||!0,onClose:e.close}}}function Xd(t,e){let{role:r="dialog"}=t,n=bt();n=t["aria-label"]?void 0:n;let o=s.useRef(!1);return s.useEffect(()=>{if(e.current&&!e.current.contains(document.activeElement)){De(e.current);let i=setTimeout(()=>{document.activeElement===e.current&&(o.current=!0,e.current&&(e.current.blur(),De(e.current)),o.current=!1)},500);return()=>{clearTimeout(i)}}},[e]),Rd(),{dialogProps:{...Q(t,{labelable:!0}),role:r,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||n,onBlur:i=>{o.current&&i.stopPropagation()}},titleProps:{id:n}}}function Jd(t,e,r){let{isDisabled:n}=t,o=te(),i=te(),a=!_e()&&"onbeforematch"in document.body,u=s.useRef(null),c=s.useCallback(()=>{u.current=requestAnimationFrame(()=>{r.current&&r.current.setAttribute("hidden","until-found")}),je.flushSync(()=>{e.toggle()})},[r,e]);return dt(r,"beforematch",a?c:null),H(()=>{u.current&&cancelAnimationFrame(u.current),a&&r.current&&!n&&(e.isExpanded?r.current.removeAttribute("hidden"):r.current.setAttribute("hidden","until-found"))},[n,r,e.isExpanded,a]),s.useEffect(()=>()=>{u.current&&cancelAnimationFrame(u.current)},[]),{buttonProps:{id:o,"aria-expanded":e.isExpanded,"aria-controls":i,onPress:d=>{!n&&d.pointerType!=="keyboard"&&e.toggle()},isDisabled:n,onPressStart(d){d.pointerType==="keyboard"&&!n&&e.toggle()}},panelProps:{id:i,role:"group","aria-labelledby":o,"aria-hidden":!e.isExpanded,hidden:a?!0:!e.isExpanded}}}function Qd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var At={exports:{}},Rr={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("@chakra-ui/react"),U=require("@commercetools/nimbus-tokens"),s=require("react"),P=require("react/jsx-runtime"),je=require("react-dom"),se=require("@commercetools/nimbus-icons");function Xs(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const X=Xs(s),tl=w.defineRecipe({className:"avatar",base:{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",overflow:"hidden",userSelect:"none",borderRadius:"full",flexShrink:0,fontWeight:"600",backgroundColor:"colorPalette.3",colorPalette:"primary",color:"colorPalette.11",focusVisibleRing:"outside","button&":{cursor:"button"},_disabled:{layerStyle:"disabled"}},variants:{size:{md:{width:1e3,height:1e3,textStyle:"sm"},xs:{width:800,height:800,textStyle:"xs"},"2xs":{width:600,height:600,textStyle:"xs"}}},defaultVariants:{size:"md"}}),{withContext:Js}=w.createRecipeContext({recipe:tl}),Qs=Js("figure");function eu(t,e){return t.split("")[0].toUpperCase()+e.split("")[0].toUpperCase()}const nl=s.forwardRef((t,e)=>{const{firstName:n,lastName:r,src:i,alt:l,...o}=t,a=`${n} ${r}`,u={"aria-label":`${a} avatar`,ref:e,...o};return P.jsx(Qs,{...u,children:i?P.jsx(w.Image,{src:i,alt:l||a}):eu(n,r)})});nl.displayName="Avatar";const xe=s.forwardRef((t,e)=>P.jsx(w.Box,{ref:e,...t}));xe.displayName="Box";const H=typeof document<"u"?s.useLayoutEffect:()=>{};function J(t){const e=s.useRef(null);return H(()=>{e.current=t},[t]),s.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function tu(t){let[e,n]=s.useState(t),r=s.useRef(null),i=J(()=>{if(!r.current)return;let o=r.current.next();if(o.done){r.current=null;return}e===o.value?i():n(o.value)});H(()=>{r.current&&i()});let l=J(o=>{r.current=o(e),i()});return[e,l]}const Bt={prefix:String(Math.round(Math.random()*1e10)),current:0},rl=s.createContext(Bt),nu=s.createContext(!1);let ru=!!(typeof window<"u"&&window.document&&window.document.createElement),mn=new WeakMap;function iu(t=!1){let e=s.useContext(rl),n=s.useRef(null);if(n.current===null&&!t){var r,i;let l=(i=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(l){let o=mn.get(l);o==null?mn.set(l,{id:e.current,state:l.memoizedState}):l.memoizedState!==o.state&&(e.current=o.id,mn.delete(l))}n.current=++e.current}return n.current}function lu(t){let e=s.useContext(rl);e===Bt&&!ru&&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=iu(!!t),r=e===Bt&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function ou(t){let e=s.useId(),[n]=s.useState(_e()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Bt.prefix}`;return t||`${r}-${e}`}const au=typeof s.useId=="function"?ou:lu;function su(){return!1}function uu(){return!0}function du(t){return()=>{}}function _e(){return typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore(du,su,uu):s.useContext(nu)}let cu=!!(typeof window<"u"&&window.document&&window.document.createElement),tt=new Map,dt;typeof FinalizationRegistry<"u"&&(dt=new FinalizationRegistry(t=>{tt.delete(t)}));function te(t){let[e,n]=s.useState(t),r=s.useRef(null),i=au(e),l=s.useRef(null);if(dt&&dt.register(l,i),cu){const o=tt.get(i);o&&!o.includes(r)?o.push(r):tt.set(i,[r])}return H(()=>{let o=i;return()=>{dt&&dt.unregister(l),tt.delete(o)}},[i]),s.useEffect(()=>{let o=r.current;return o&&n(o),()=>{o&&(r.current=null)}}),i}function fu(t,e){if(t===e)return t;let n=tt.get(t);if(n)return n.forEach(i=>i.current=e),e;let r=tt.get(e);return r?(r.forEach(i=>i.current=t),t):e}function ht(t=[]){let e=te(),[n,r]=tu(e),i=s.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return H(i,[e,i,...t]),n}function Te(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const j=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},ie=t=>t&&"window"in t&&t.window===t?t:j(t).defaultView||window;function pu(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function bu(t){return pu(t)&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}let hu=!1;function Yt(){return hu}function W(t,e){if(!Yt())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:bu(n)?n=n.host:n=n.parentNode}return!1}const ne=(t=document)=>{var e;if(!Yt())return t.activeElement;let n=t.activeElement;for(;n&&"shadowRoot"in n&&(!((e=n.shadowRoot)===null||e===void 0)&&e.activeElement);)n=n.shadowRoot.activeElement;return n};function V(t){return Yt()&&t.target.shadowRoot&&t.composedPath?t.composedPath()[0]:t.target}class gu{get currentNode(){return this._currentNode}set currentNode(e){if(!W(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,i=e;for(this._currentNode=e;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const o=r,a=this._doc.createTreeWalker(o,this.whatToShow,{acceptNode:this._acceptNode});n.push(a),a.currentNode=i,this._currentSetFor.add(a),r=i=o.host}else r=r.parentNode;const l=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(l),l.currentNode=i,this._currentSetFor.add(l),this._walkerStack=n}get doc(){return this._doc}firstChild(){let e=this.currentNode,n=this.nextNode();return W(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(){const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){var n;let i;if(typeof this.filter=="function"?i=this.filter(e):!((n=this.filter)===null||n===void 0)&&n.acceptNode&&(i=this.filter.acceptNode(e)),i===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let l=this.nextNode();return l&&(this.currentNode=l),l}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(){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 i=this.previousNode();return i&&(this.currentNode=i),i}else return null;return null}const n=e.previousNode();if(n){if(n.shadowRoot){var r;let l;if(typeof this.filter=="function"?l=this.filter(n):!((r=this.filter)===null||r===void 0)&&r.acceptNode&&(l=this.filter.acceptNode(n)),l===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let o=this.lastChild();return o&&(this.currentNode=o),o}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(e,n,r,i){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=o=>{if(o.nodeType===Node.ELEMENT_NODE){const u=o.shadowRoot;if(u){const d=this._doc.createTreeWalker(u,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(d),NodeFilter.FILTER_ACCEPT}else{var a;if(typeof this.filter=="function")return this.filter(o);if(!((a=this.filter)===null||a===void 0)&&a.acceptNode)return this.filter.acceptNode(o);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=n,this.filter=i??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(e.createTreeWalker(n,r,this._acceptNode));const l=n.shadowRoot;if(l){const o=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(o)}}}function mu(t,e,n,r){return Yt()?new gu(t,e,n,r):t.createTreeWalker(e,n,r)}function il(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=il(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function vu(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=il(t))&&(r&&(r+=" "),r+=e);return r}function A(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let l=e[i],o=r[i];typeof l=="function"&&typeof o=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=Te(l,o):(i==="className"||i==="UNSAFE_className")&&typeof l=="string"&&typeof o=="string"?e[i]=vu(l,o):i==="id"&&l&&o?e.id=fu(l,o):e[i]=o!==void 0?o:l}}return e}function ll(...t){return t.length===1&&t[0]?t[0]:e=>{for(let n of t)typeof n=="function"?n(e):n!=null&&(n.current=e)}}const yu=new Set(["id"]),$u=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),xu=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Su=/^(data-.*)$/;function Q(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,l={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(yu.has(o)||n&&$u.has(o)||r&&xu.has(o)||i!=null&&i.has(o)||Su.test(o))&&(l[o]=t[o]);return l}function he(t){if(Pu())t.focus({preventScroll:!0});else{let e=Eu(t);t.focus(),wu(e)}}let Dt=null;function Pu(){if(Dt==null){Dt=!1;try{document.createElement("div").focus({get preventScroll(){return Dt=!0,!0}})}catch{}}return Dt}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 wu(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function Zt(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function or(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function Se(t){if(process.env.NODE_ENV==="test")return t;let e=null;return()=>(e==null&&(e=t()),e)}const ke=Se(function(){return or(/^Mac/i)}),Cu=Se(function(){return or(/^iPhone/i)}),ol=Se(function(){return or(/^iPad/i)||ke()&&navigator.maxTouchPoints>1}),Xt=Se(function(){return Cu()||ol()}),Tu=Se(function(){return ke()||Xt()}),ar=Se(function(){return Zt(/AppleWebKit/i)&&!al()}),al=Se(function(){return Zt(/Chrome/i)}),sr=Se(function(){return Zt(/Android/i)}),ku=Se(function(){return Zt(/Firefox/i)}),Du=s.createContext({isNative:!0,open:Lu,useHref:t=>t});function Jt(){return s.useContext(Du)}function Ru(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 ze(t,e,n=!0){var r,i;let{metaKey:l,ctrlKey:o,altKey:a,shiftKey:u}=e;ku()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(ke()?l=!0:o=!0);let d=ar()&&ke()&&!ol()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:l,ctrlKey:o,altKey:a,shiftKey:u}):new MouseEvent("click",{metaKey:l,ctrlKey:o,altKey:a,shiftKey:u,bubbles:!0,cancelable:!0});ze.isOpening=n,he(t),t.dispatchEvent(d),ze.isOpening=!1}ze.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 Lu(t,e){Ku(t,n=>ze(n,e))}function sl(t){let e=Jt();var n;const r=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?r:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let Xe=new Map,Bn=new Set;function Qr(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=Xe.get(r.target);i||(i=new Set,Xe.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=Xe.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),Xe.delete(r.target)),Xe.size===0)){for(let l of Bn)l();Bn.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Qr():document.addEventListener("DOMContentLoaded",Qr));function ul(t){requestAnimationFrame(()=>{Xe.size===0?t():Bn.add(t)})}function Qt(){let t=s.useRef(new Map),e=s.useCallback((i,l,o,a)=>{let u=a!=null&&a.once?(...d)=>{t.current.delete(o),o(...d)}:o;t.current.set(o,{type:l,eventTarget:i,fn:u,options:a}),i.addEventListener(l,u,a)},[]),n=s.useCallback((i,l,o,a)=>{var u;let d=((u=t.current.get(o))===null||u===void 0?void 0:u.fn)||o;i.removeEventListener(l,d,a),t.current.delete(o)},[]),r=s.useCallback(()=>{t.current.forEach((i,l)=>{n(i.eventTarget,i.type,l,i.options)})},[n]);return s.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function dl(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=te(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}function ce(t){const e=s.useRef(null);return s.useMemo(()=>({get current(){return e.current},set current(n){e.current=n,typeof t=="function"?t(n):t&&(t.current=n)}}),[t])}function ei(t,e){const n=s.useRef(!0),r=s.useRef(null);H(()=>(n.current=!0,()=>{n.current=!1}),[]),H(()=>{n.current?n.current=!1:(!r.current||e.some((i,l)=>!Object.is(i,r[l])))&&t(),r.current=e},e)}function Fu(){return typeof window.ResizeObserver<"u"}function On(t){const{ref:e,box:n,onResize:r}=t;s.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(Fu()){const l=new window.ResizeObserver(o=>{o.length&&r()});return l.observe(i,{box:n}),()=>{i&&l.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,n])}function ur(t,e){H(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function gt(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function cl(t,e){let n=t;for(gt(n,e)&&(n=n.parentElement);n&&!gt(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function Mu(t,e){const n=[];for(;t&&t!==document.documentElement;)gt(t,e)&&n.push(t),t=t.parentElement;return n}let Au=0;const vn=new Map;function Iu(t){let[e,n]=s.useState();return H(()=>{if(!t)return;let r=vn.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${Au++}`;n(i);let l=document.createElement("div");l.id=i,l.style.display="none",l.textContent=t,document.body.appendChild(l),r={refCount:0,element:l},vn.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),vn.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function ct(t,e,n,r){let i=J(n),l=n==null;s.useEffect(()=>{if(l||!t.current)return;let o=t.current;return o.addEventListener(e,i,r),()=>{o.removeEventListener(e,i,r)}},[t,e,r,l,i])}function fl(t,e){let n=ti(t,e,"left"),r=ti(t,e,"top"),i=e.offsetWidth,l=e.offsetHeight,o=t.scrollLeft,a=t.scrollTop,{borderTopWidth:u,borderLeftWidth:d,scrollPaddingTop:c,scrollPaddingRight:f,scrollPaddingBottom:b,scrollPaddingLeft:p}=getComputedStyle(t),h=o+parseInt(d,10),v=a+parseInt(u,10),y=h+t.clientWidth,$=v+t.clientHeight,E=parseInt(c,10)||0,C=parseInt(b,10)||0,K=parseInt(f,10)||0,T=parseInt(p,10)||0;n<=o+T?o=n-parseInt(d,10)-T:n+i>y-K&&(o+=n+i-y+K),r<=v+E?a=r-parseInt(u,10)-E:r+l>$-C&&(a+=r+l-$+C),t.scrollLeft=o,t.scrollTop=a}function ti(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function ni(t,e){if(t&&document.contains(t)){let o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let u=Mu(t);for(let d of u)fl(d,t)}else{var n;let{left:u,top:d}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:c,top:f}=t.getBoundingClientRect();if(Math.abs(u-c)>1||Math.abs(d-f)>1){var r,i,l;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(l=t.scrollIntoView)===null||l===void 0||l.call(t,{block:"nearest"})}}}}function zn(t){return t.mozInputSource===0&&t.isTrusted?!0:sr()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Nu(t){return!sr()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function dr(t,e,n){let r=s.useRef(e),i=J(()=>{n&&n(r.current)});s.useEffect(()=>{var l;let o=t==null||(l=t.current)===null||l===void 0?void 0:l.form;return o==null||o.addEventListener("reset",i),()=>{o==null||o.removeEventListener("reset",i)}},[t,i])}const Bu="react-aria-clear-focus",Ou="react-aria-focus";function Je(t){return ke()?t.metaKey:t.ctrlKey}function pl(t,e=!0){let[n,r]=s.useState(!0),i=n&&e;return H(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let l of t.current.getAnimations())l instanceof CSSTransition&&l.cancel()},[t,i]),hl(t,i,s.useCallback(()=>r(!1),[])),i}function bl(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 i=n==="exiting";return hl(t,i,s.useCallback(()=>{r(l=>l==="exiting"?"closed":l)},[])),i}function hl(t,e,n){H(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.all(r.map(l=>l.finished)).then(()=>{i||je.flushSync(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[t,e,n])}const cr=["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"])'],zu=cr.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";cr.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Hu=cr.join(':not([hidden]):not([tabindex="-1"]),');function gl(t){return t.matches(zu)}function Vu(t){return t.matches(Hu)}function Re(t,e,n){let[r,i]=s.useState(t||e),l=s.useRef(t!==void 0),o=t!==void 0;s.useEffect(()=>{let d=l.current;d!==o&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${d?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),l.current=o},[o]);let a=o?t:r,u=s.useCallback((d,...c)=>{let f=(b,...p)=>{n&&(Object.is(a,b)||n(b,...p)),o||(a=b)};typeof d=="function"?(process.env.NODE_ENV!=="production"&&console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((p,...h)=>{let v=d(o?a:p,...h);return f(v,...c),o?p:v})):(o||i(d),f(d,...c))},[o,a,n]);return[a,u]}function Ot(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}function fr(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function ml(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function vl(t){let e=s.useRef({isFocused:!1,observer:null});H(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=J(r=>{t==null||t(r)});return s.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,l=o=>{if(e.current.isFocused=!1,i.disabled){let a=fr(o);n(a)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",l,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var o;(o=e.current.observer)===null||o===void 0||o.disconnect();let a=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let zt=!1;function ri(t){for(;t&&!gl(t);)t=t.parentElement;let e=ie(t),n=e.document.activeElement;if(!n||n===t)return;zt=!0;let r=!1,i=c=>{(c.target===n||r)&&c.stopImmediatePropagation()},l=c=>{(c.target===n||r)&&(c.stopImmediatePropagation(),!t&&!r&&(r=!0,he(n),u()))},o=c=>{(c.target===t||r)&&c.stopImmediatePropagation()},a=c=>{(c.target===t||r)&&(c.stopImmediatePropagation(),r||(r=!0,he(n),u()))};e.addEventListener("blur",i,!0),e.addEventListener("focusout",l,!0),e.addEventListener("focusin",a,!0),e.addEventListener("focus",o,!0);let u=()=>{cancelAnimationFrame(d),e.removeEventListener("blur",i,!0),e.removeEventListener("focusout",l,!0),e.removeEventListener("focusin",a,!0),e.removeEventListener("focus",o,!0),zt=!1,r=!1},d=requestAnimationFrame(u);return u}let Qe="default",Hn="",It=new WeakMap;function ii(t){if(Xt()){if(Qe==="default"){const e=j(t);Hn=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}Qe="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";It.set(t,t.style[e]),t.style[e]="none"}}function yn(t){if(Xt()){if(Qe!=="disabled")return;Qe="restoring",setTimeout(()=>{ul(()=>{if(Qe==="restoring"){const e=j(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Hn||""),Hn="",Qe="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&It.has(t)){let e=It.get(t),n="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[n]==="none"&&(t.style[n]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),It.delete(t)}}const mt=s.createContext({register:()=>{}});mt.displayName="PressResponderContext";function ju(t,e){return e.get?e.get.call(t):e.value}function yl(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function _u(t,e){var n=yl(t,e,"get");return ju(t,n)}function Wu(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Uu(t,e,n){Wu(t,e),e.set(t,n)}function Gu(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function li(t,e,n){var r=yl(t,e,"set");return Gu(t,r,n),n}function qu(t){let e=s.useContext(mt);if(e){let{register:n,...r}=e;t=A(r,t),n()}return ur(e,t.ref),t}var Rt=new WeakMap;class Kt{continuePropagation(){li(this,Rt,!1)}get shouldStopPropagation(){return _u(this,Rt)}constructor(e,n,r,i){Uu(this,Rt,{writable:!0,value:void 0}),li(this,Rt,!0);var l;let o=(l=i==null?void 0:i.target)!==null&&l!==void 0?l:r.currentTarget;const a=o==null?void 0:o.getBoundingClientRect();let u,d=0,c,f=null;r.clientX!=null&&r.clientY!=null&&(c=r.clientX,f=r.clientY),a&&(c!=null&&f!=null?(u=c-a.left,d=f-a.top):(u=a.width/2,d=a.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=u,this.y=d}}const oi=Symbol("linkClicked");function He(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:l,onClick:o,isDisabled:a,isPressed:u,preventFocusOnPress:d,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:f,ref:b,...p}=qu(t),[h,v]=s.useState(!1),y=s.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:$,removeAllGlobalListeners:E}=Qt(),C=J((g,R)=>{let B=y.current;if(a||B.didFirePressStart)return!1;let D=!0;if(B.isTriggeringEvent=!0,r){let z=new Kt("pressstart",R,g);r(z),D=z.shouldStopPropagation}return n&&n(!0),B.isTriggeringEvent=!1,B.didFirePressStart=!0,v(!0),D}),K=J((g,R,B=!0)=>{let D=y.current;if(!D.didFirePressStart)return!1;D.didFirePressStart=!1,D.isTriggeringEvent=!0;let z=!0;if(i){let m=new Kt("pressend",R,g);i(m),z=m.shouldStopPropagation}if(n&&n(!1),v(!1),e&&B&&!a){let m=new Kt("press",R,g);e(m),z&&(z=m.shouldStopPropagation)}return D.isTriggeringEvent=!1,z}),T=J((g,R)=>{let B=y.current;if(a)return!1;if(l){B.isTriggeringEvent=!0;let D=new Kt("pressup",R,g);return l(D),B.isTriggeringEvent=!1,D.shouldStopPropagation}return!0}),x=J(g=>{let R=y.current;if(R.isPressed&&R.target){R.didFirePressStart&&R.pointerType!=null&&K(Ye(R.target,g),R.pointerType,!1),R.isPressed=!1,R.isOverTarget=!1,R.activePointerId=null,R.pointerType=null,E(),f||yn(R.target);for(let B of R.disposables)B();R.disposables=[]}}),M=J(g=>{c&&x(g)}),F=J(g=>{o==null||o(g)}),N=J((g,R)=>{if(o){let B=new MouseEvent("click",g);ml(B,R),o(fr(B))}}),L=s.useMemo(()=>{let g=y.current,R={onKeyDown(D){if($n(D.nativeEvent,D.currentTarget)&&W(D.currentTarget,V(D.nativeEvent))){var z;ui(V(D.nativeEvent),D.key)&&D.preventDefault();let m=!0;if(!g.isPressed&&!D.repeat){g.target=D.currentTarget,g.isPressed=!0,g.pointerType="keyboard",m=C(D,"keyboard");let k=D.currentTarget,S=O=>{$n(O,k)&&!O.repeat&&W(k,V(O))&&g.target&&T(Ye(g.target,O),"keyboard")};$(j(D.currentTarget),"keyup",Te(S,B),!0)}m&&D.stopPropagation(),D.metaKey&&ke()&&((z=g.metaKeyEvents)===null||z===void 0||z.set(D.key,D.nativeEvent))}else D.key==="Meta"&&(g.metaKeyEvents=new Map)},onClick(D){if(!(D&&!W(D.currentTarget,V(D.nativeEvent)))&&D&&D.button===0&&!g.isTriggeringEvent&&!ze.isOpening){let z=!0;if(a&&D.preventDefault(),!g.ignoreEmulatedMouseEvents&&!g.isPressed&&(g.pointerType==="virtual"||zn(D.nativeEvent))){let m=C(D,"virtual"),k=T(D,"virtual"),S=K(D,"virtual");F(D),z=m&&k&&S}else if(g.isPressed&&g.pointerType!=="keyboard"){let m=g.pointerType||D.nativeEvent.pointerType||"virtual";z=K(Ye(D.currentTarget,D),m,!0),g.isOverTarget=!1,F(D),x(D)}g.ignoreEmulatedMouseEvents=!1,z&&D.stopPropagation()}}},B=D=>{var z;if(g.isPressed&&g.target&&$n(D,g.target)){var m;ui(V(D),D.key)&&D.preventDefault();let S=V(D),O=W(g.target,V(D));K(Ye(g.target,D),"keyboard",O),O&&N(D,g.target),E(),D.key!=="Enter"&&pr(g.target)&&W(g.target,S)&&!D[oi]&&(D[oi]=!0,ze(g.target,D,!1)),g.isPressed=!1,(m=g.metaKeyEvents)===null||m===void 0||m.delete(D.key)}else if(D.key==="Meta"&&(!((z=g.metaKeyEvents)===null||z===void 0)&&z.size)){var k;let S=g.metaKeyEvents;g.metaKeyEvents=void 0;for(let O of S.values())(k=g.target)===null||k===void 0||k.dispatchEvent(new KeyboardEvent("keyup",O))}};if(typeof PointerEvent<"u"){R.onPointerDown=m=>{if(m.button!==0||!W(m.currentTarget,V(m.nativeEvent)))return;if(Nu(m.nativeEvent)){g.pointerType="virtual";return}g.pointerType=m.pointerType;let k=!0;if(!g.isPressed){g.isPressed=!0,g.isOverTarget=!0,g.activePointerId=m.pointerId,g.target=m.currentTarget,f||ii(g.target),k=C(m,g.pointerType);let S=V(m.nativeEvent);"releasePointerCapture"in S&&S.releasePointerCapture(m.pointerId),$(j(m.currentTarget),"pointerup",D,!1),$(j(m.currentTarget),"pointercancel",z,!1)}k&&m.stopPropagation()},R.onMouseDown=m=>{if(W(m.currentTarget,V(m.nativeEvent))&&m.button===0){if(d){let k=ri(m.target);k&&g.disposables.push(k)}m.stopPropagation()}},R.onPointerUp=m=>{!W(m.currentTarget,V(m.nativeEvent))||g.pointerType==="virtual"||m.button===0&&T(m,g.pointerType||m.pointerType)},R.onPointerEnter=m=>{m.pointerId===g.activePointerId&&g.target&&!g.isOverTarget&&g.pointerType!=null&&(g.isOverTarget=!0,C(Ye(g.target,m),g.pointerType))},R.onPointerLeave=m=>{m.pointerId===g.activePointerId&&g.target&&g.isOverTarget&&g.pointerType!=null&&(g.isOverTarget=!1,K(Ye(g.target,m),g.pointerType,!1),M(m))};let D=m=>{if(m.pointerId===g.activePointerId&&g.isPressed&&m.button===0&&g.target){if(W(g.target,V(m))&&g.pointerType!=null){let k=!1,S=setTimeout(()=>{g.isPressed&&g.target instanceof HTMLElement&&(k?x(m):(he(g.target),g.target.click()))},80);$(m.currentTarget,"click",()=>k=!0,!0),g.disposables.push(()=>clearTimeout(S))}else x(m);g.isOverTarget=!1}},z=m=>{x(m)};R.onDragStart=m=>{W(m.currentTarget,V(m.nativeEvent))&&x(m)}}else if(process.env.NODE_ENV==="test"){R.onMouseDown=m=>{if(m.button!==0||!W(m.currentTarget,V(m.nativeEvent)))return;if(g.ignoreEmulatedMouseEvents){m.stopPropagation();return}if(g.isPressed=!0,g.isOverTarget=!0,g.target=m.currentTarget,g.pointerType=zn(m.nativeEvent)?"virtual":"mouse",je.flushSync(()=>C(m,g.pointerType))&&m.stopPropagation(),d){let S=ri(m.target);S&&g.disposables.push(S)}$(j(m.currentTarget),"mouseup",D,!1)},R.onMouseEnter=m=>{if(!W(m.currentTarget,V(m.nativeEvent)))return;let k=!0;g.isPressed&&!g.ignoreEmulatedMouseEvents&&g.pointerType!=null&&(g.isOverTarget=!0,k=C(m,g.pointerType)),k&&m.stopPropagation()},R.onMouseLeave=m=>{if(!W(m.currentTarget,V(m.nativeEvent)))return;let k=!0;g.isPressed&&!g.ignoreEmulatedMouseEvents&&g.pointerType!=null&&(g.isOverTarget=!1,k=K(m,g.pointerType,!1),M(m)),k&&m.stopPropagation()},R.onMouseUp=m=>{W(m.currentTarget,V(m.nativeEvent))&&!g.ignoreEmulatedMouseEvents&&m.button===0&&T(m,g.pointerType||"mouse")};let D=m=>{if(m.button===0){if(g.ignoreEmulatedMouseEvents){g.ignoreEmulatedMouseEvents=!1;return}g.target&&g.target.contains(m.target)&&g.pointerType!=null||x(m),g.isOverTarget=!1}};R.onTouchStart=m=>{if(!W(m.currentTarget,V(m.nativeEvent)))return;let k=Yu(m.nativeEvent);if(!k)return;g.activePointerId=k.identifier,g.ignoreEmulatedMouseEvents=!0,g.isOverTarget=!0,g.isPressed=!0,g.target=m.currentTarget,g.pointerType="touch",f||ii(g.target),C(Pe(g.target,m),g.pointerType)&&m.stopPropagation(),$(ie(m.currentTarget),"scroll",z,!0)},R.onTouchMove=m=>{if(!W(m.currentTarget,V(m.nativeEvent)))return;if(!g.isPressed){m.stopPropagation();return}let k=ai(m.nativeEvent,g.activePointerId),S=!0;k&&si(k,m.currentTarget)?!g.isOverTarget&&g.pointerType!=null&&(g.isOverTarget=!0,S=C(Pe(g.target,m),g.pointerType)):g.isOverTarget&&g.pointerType!=null&&(g.isOverTarget=!1,S=K(Pe(g.target,m),g.pointerType,!1),M(Pe(g.target,m))),S&&m.stopPropagation()},R.onTouchEnd=m=>{if(!W(m.currentTarget,V(m.nativeEvent)))return;if(!g.isPressed){m.stopPropagation();return}let k=ai(m.nativeEvent,g.activePointerId),S=!0;k&&si(k,m.currentTarget)&&g.pointerType!=null?(T(Pe(g.target,m),g.pointerType),S=K(Pe(g.target,m),g.pointerType),N(m.nativeEvent,g.target)):g.isOverTarget&&g.pointerType!=null&&(S=K(Pe(g.target,m),g.pointerType,!1)),S&&m.stopPropagation(),g.isPressed=!1,g.activePointerId=null,g.isOverTarget=!1,g.ignoreEmulatedMouseEvents=!0,g.target&&!f&&yn(g.target),E()},R.onTouchCancel=m=>{W(m.currentTarget,V(m.nativeEvent))&&(m.stopPropagation(),g.isPressed&&x(Pe(g.target,m)))};let z=m=>{g.isPressed&&W(V(m),g.target)&&x({currentTarget:g.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=m=>{W(m.currentTarget,V(m.nativeEvent))&&x(m)}}return R},[$,a,d,E,f,x,M,K,C,T,F,N]);return s.useEffect(()=>{let g=b==null?void 0:b.current;g&&g instanceof ie(g).Element&&ie(g).getComputedStyle(g).touchAction==="auto"&&(g.style.touchAction="pan-x pan-y pinch-zoom")},[b]),s.useEffect(()=>{let g=y.current;return()=>{var R;f||yn((R=g.target)!==null&&R!==void 0?R:void 0);for(let B of g.disposables)B();g.disposables=[]}},[f]),{isPressed:u||h,pressProps:A(p,L)}}function pr(t){return t.tagName==="A"&&t.hasAttribute("href")}function $n(t,e){const{key:n,code:r}=t,i=e,l=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof ie(i).HTMLInputElement&&!$l(i,n)||i instanceof ie(i).HTMLTextAreaElement||i.isContentEditable)&&!((l==="link"||!l&&pr(i))&&n!=="Enter")}function Yu(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function ai(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===e)return i}return null}function Pe(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 Ye(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}}function Zu(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 Xu(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function si(t,e){let n=e.getBoundingClientRect(),r=Zu(t);return Xu(n,r)}function Ju(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!pr(t)}function ui(t,e){return t instanceof HTMLInputElement?!$l(t,e):Ju(t)}const Qu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function $l(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":Qu.has(t.type)}let We=null,Vn=new Set,bt=new Map,Ve=!1,jn=!1;const ed={Tab:!0,Escape:!0};function en(t,e){for(let n of Vn)n(t,e)}function td(t){return!(t.metaKey||!ke()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Ht(t){Ve=!0,td(t)&&(We="keyboard",en("keyboard",t))}function fe(t){We="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Ve=!0,en("pointer",t))}function xl(t){zn(t)&&(Ve=!0,We="virtual")}function Sl(t){t.target===window||t.target===document||zt||!t.isTrusted||(!Ve&&!jn&&(We="virtual",en("virtual",t)),Ve=!1,jn=!1)}function Pl(){zt||(Ve=!1,jn=!0)}function _n(t){if(typeof window>"u"||bt.get(ie(t)))return;const e=ie(t),n=j(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Ve=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ht,!0),n.addEventListener("keyup",Ht,!0),n.addEventListener("click",xl,!0),e.addEventListener("focus",Sl,!0),e.addEventListener("blur",Pl,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",fe,!0),n.addEventListener("pointermove",fe,!0),n.addEventListener("pointerup",fe,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",fe,!0),n.addEventListener("mousemove",fe,!0),n.addEventListener("mouseup",fe,!0)),e.addEventListener("beforeunload",()=>{El(t)},{once:!0}),bt.set(e,{focus:r})}const El=(t,e)=>{const n=ie(t),r=j(t);e&&r.removeEventListener("DOMContentLoaded",e),bt.has(n)&&(n.HTMLElement.prototype.focus=bt.get(n).focus,r.removeEventListener("keydown",Ht,!0),r.removeEventListener("keyup",Ht,!0),r.removeEventListener("click",xl,!0),n.removeEventListener("focus",Sl,!0),n.removeEventListener("blur",Pl,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",fe,!0),r.removeEventListener("pointermove",fe,!0),r.removeEventListener("pointerup",fe,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",fe,!0),r.removeEventListener("mousemove",fe,!0),r.removeEventListener("mouseup",fe,!0)),bt.delete(n))};function nd(t){const e=j(t);let n;return e.readyState!=="loading"?_n(t):(n=()=>{_n(t)},e.addEventListener("DOMContentLoaded",n)),()=>El(t,n)}typeof document<"u"&&nd();function vt(){return We!=="pointer"}function yt(){return We}function wl(t){We=t,en(t,null)}const rd=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function id(t,e,n){let r=j(n==null?void 0:n.target);const i=typeof window<"u"?ie(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,l=typeof window<"u"?ie(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<"u"?ie(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?ie(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return t=t||r.activeElement instanceof i&&!rd.has(r.activeElement.type)||r.activeElement instanceof l||r.activeElement instanceof o&&r.activeElement.isContentEditable,!(t&&e==="keyboard"&&n instanceof a&&!ed[n.key])}function ld(t,e,n){_n(),s.useEffect(()=>{let r=(i,l)=>{id(!!(n!=null&&n.isTextInput),i,l)&&t(vt())};return Vn.add(r),()=>{Vn.delete(r)}},e)}function De(t){const e=j(t),n=ne(e);if(yt()==="virtual"){let r=n;ul(()=>{ne(e)===r&&t.isConnected&&he(t)})}else he(t)}function Cl(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const l=s.useCallback(u=>{if(u.target===u.currentTarget)return r&&r(u),i&&i(!1),!0},[r,i]),o=vl(l),a=s.useCallback(u=>{const d=j(u.target),c=d?ne(d):ne();u.target===u.currentTarget&&c===V(u.nativeEvent)&&(n&&n(u),i&&i(!0),o(u))},[i,n,o]);return{focusProps:{onFocus:!e&&(n||i||r)?a:void 0,onBlur:!e&&(r||i)?l:void 0}}}function di(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 od(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:di(t.onKeyDown),onKeyUp:di(t.onKeyUp)}}}let Vt=s.createContext(null);function ad(t){let e=s.useContext(Vt)||{};ur(e,t);let{ref:n,...r}=e;return r}const sd=s.forwardRef(function(e,n){let{children:r,...i}=e,l=ce(n),o={...i,ref:l};return s.createElement(Vt.Provider,{value:o},r)});function it(t,e){let{focusProps:n}=Cl(t),{keyboardProps:r}=od(t),i=A(n,r),l=ad(e),o=t.isDisabled?{}:l,a=s.useRef(t.autoFocus);s.useEffect(()=>{a.current&&e.current&&De(e.current),a.current=!1},[e]);let u=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(u=void 0),{focusableProps:A({...i,tabIndex:u},o)}}const ud=s.forwardRef(({children:t,...e},n)=>{let r=s.useRef(!1),i=s.useContext(mt);n=ce(n||(i==null?void 0:i.ref));let l=A(i||{},{...e,ref:n,register(){r.current=!0,i&&i.register()}});return ur(i,n),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(mt.Provider,{value:l},t)});function dd({children:t}){let e=s.useMemo(()=>({register:()=>{}}),[]);return s.createElement(mt.Provider,{value:e},t)}function tn(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,l=s.useRef({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:a}=Qt(),u=s.useCallback(f=>{f.currentTarget.contains(f.target)&&l.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(l.current.isFocusWithin=!1,a(),n&&n(f),i&&i(!1))},[n,i,l,a]),d=vl(u),c=s.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const b=j(f.target),p=ne(b);if(!l.current.isFocusWithin&&p===V(f.nativeEvent)){r&&r(f),i&&i(!0),l.current.isFocusWithin=!0,d(f);let h=f.currentTarget;o(b,"focus",v=>{if(l.current.isFocusWithin&&!W(h,v.target)){let y=new b.defaultView.FocusEvent("blur",{relatedTarget:v.target});ml(y,h);let $=fr(y);u($)}},{capture:!0})}},[r,i,d,o,u]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:u}}}let jt=!1,xn=0;function Wn(){jt=!0,setTimeout(()=>{jt=!1},50)}function ci(t){t.pointerType==="touch"&&Wn()}function cd(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",ci):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Wn),xn++,()=>{xn--,!(xn>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",ci):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Wn))}}function Ue(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[l,o]=s.useState(!1),a=s.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;s.useEffect(cd,[]);let{addGlobalListener:u,removeAllGlobalListeners:d}=Qt(),{hoverProps:c,triggerHoverEnd:f}=s.useMemo(()=>{let b=(v,y)=>{if(a.pointerType=y,i||y==="touch"||a.isHovered||!v.currentTarget.contains(v.target))return;a.isHovered=!0;let $=v.currentTarget;a.target=$,u(j(v.target),"pointerover",E=>{a.isHovered&&a.target&&!W(a.target,E.target)&&p(E,E.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:$,pointerType:y}),n&&n(!0),o(!0)},p=(v,y)=>{let $=a.target;a.pointerType="",a.target=null,!(y==="touch"||!a.isHovered||!$)&&(a.isHovered=!1,d(),r&&r({type:"hoverend",target:$,pointerType:y}),n&&n(!1),o(!1))},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=v=>{jt&&v.pointerType==="mouse"||b(v,v.pointerType)},h.onPointerLeave=v=>{!i&&v.currentTarget.contains(v.target)&&p(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(h.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=v=>{!a.ignoreEmulatedMouseEvents&&!jt&&b(v,"mouse"),a.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=v=>{!i&&v.currentTarget.contains(v.target)&&p(v,"mouse")}),{hoverProps:h,triggerHoverEnd:p}},[e,n,r,i,a,u,d]);return s.useEffect(()=>{i&&f({currentTarget:a.target},a.pointerType)},[i]),{hoverProps:c,isHovered:l}}function fd(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=t,l=s.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=J(u=>{n&&Lt(u,e)&&(i&&i(u),l.current.isPointerDown=!0)}),a=J(u=>{n&&n(u)});s.useEffect(()=>{let u=l.current;if(r)return;const d=e.current,c=j(d);if(typeof PointerEvent<"u"){let f=b=>{u.isPointerDown&&Lt(b,e)&&a(b),u.isPointerDown=!1};return c.addEventListener("pointerdown",o,!0),c.addEventListener("pointerup",f,!0),()=>{c.removeEventListener("pointerdown",o,!0),c.removeEventListener("pointerup",f,!0)}}else if(process.env.NODE_ENV==="test"){let f=p=>{u.ignoreEmulatedMouseEvents?u.ignoreEmulatedMouseEvents=!1:u.isPointerDown&&Lt(p,e)&&a(p),u.isPointerDown=!1},b=p=>{u.ignoreEmulatedMouseEvents=!0,u.isPointerDown&&Lt(p,e)&&a(p),u.isPointerDown=!1};return c.addEventListener("mousedown",o,!0),c.addEventListener("mouseup",f,!0),c.addEventListener("touchstart",o,!0),c.addEventListener("touchend",b,!0),()=>{c.removeEventListener("mousedown",o,!0),c.removeEventListener("mouseup",f,!0),c.removeEventListener("touchstart",o,!0),c.removeEventListener("touchend",b,!0)}}},[e,r,o,a])}function Lt(t,e){if(t.button>0)return!1;if(t.target){const n=t.target.ownerDocument;if(!n||!n.documentElement.contains(t.target)||t.target.closest("[data-react-aria-top-layer]"))return!1}return e.current?!t.composedPath().includes(e.current):!1}const pd=500;function Tl(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:l=pd,accessibilityDescription:o}=t;const a=s.useRef(void 0);let{addGlobalListener:u,removeGlobalListener:d}=Qt(),{pressProps:c}=He({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})),j(b.target).activeElement!==b.target&&he(b.target),i&&i({...b,type:"longpress"}),a.current=void 0},l),b.pointerType==="touch")){let p=h=>{h.preventDefault()};u(b.target,"contextmenu",p,{once:!0}),u(window,"pointerup",()=>{setTimeout(()=>{d(b.target,"contextmenu",p)},30)},{once:!0})}},onPressEnd(b){a.current&&clearTimeout(a.current),r&&(b.pointerType==="mouse"||b.pointerType==="touch")&&r({...b,type:"longpressend"})}}),f=Iu(i&&!e?o:void 0);return{longPressProps:A(c,f)}}function bd(t,e){let{elementType:n="a",onPress:r,onPressStart:i,onPressEnd:l,onClick:o,isDisabled:a,...u}=t,d={};n!=="a"&&(d={role:"link",tabIndex:a?void 0:0});let{focusableProps:c}=it(t,e),{pressProps:f,isPressed:b}=He({onPress:r,onPressStart:i,onPressEnd:l,onClick:o,isDisabled:a,ref:e}),p=Q(u,{labelable:!0}),h=A(c,f),v=Jt(),y=sl(t);return{isPressed:b,linkProps:A(p,y,{...h,...d,"aria-disabled":a||void 0,"aria-current":t["aria-current"],onClick:$=>{var E;(E=f.onClick)===null||E===void 0||E.call(f,$),!v.isNative&&$.currentTarget instanceof HTMLAnchorElement&&$.currentTarget.href&&!$.isDefaultPrevented()&&Ru($.currentTarget,$)&&t.href&&($.preventDefault(),v.open($.currentTarget,$,t.href,t.routerOptions))}})}}const hd=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gd=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function md(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 hd.has(n.script)}let e=t.split("-")[0];return gd.has(e)}const vd=Symbol.for("react-aria.i18n.locale");function kl(){let t=typeof window<"u"&&window[vd]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:md(t)?"rtl":"ltr"}}let Un=kl(),ft=new Set;function fi(){Un=kl();for(let t of ft)t(Un)}function yd(){let t=_e(),[e,n]=s.useState(Un);return s.useEffect(()=>(ft.size===0&&window.addEventListener("languagechange",fi),ft.add(n),()=>{ft.delete(n),ft.size===0&&window.removeEventListener("languagechange",fi)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const $d=s.createContext(null);function Ke(){let t=yd();return s.useContext($d)||t}const xd=Symbol.for("react-aria.i18n.locale"),Sd=Symbol.for("react-aria.i18n.strings");let Ze;class nn{getStringForLocale(e,n){let i=this.getStringsForLocale(n)[e];if(!i)throw new Error(`Could not find intl message ${e} in ${n} locale`);return i}getStringsForLocale(e){let n=this.strings[e];return n||(n=Pd(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[xd];if(Ze===void 0){let i=window[Sd];if(!i)return null;Ze={};for(let l in i)Ze[l]=new nn({[n]:i[l]},n)}let r=Ze==null?void 0:Ze[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}constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}}function Pd(t,e,n="en-US"){if(e[t])return e[t];let r=Ed(t);if(e[r])return e[r];for(let i in e)if(i.startsWith(r+"-"))return e[i];return e[n]}function Ed(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const pi=new Map,bi=new Map;class wd{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 i=n["="+e];if(i)return typeof i=="function"?i():i;let l=this.locale+":"+r,o=pi.get(l);o||(o=new Intl.PluralRules(this.locale,{type:r}),pi.set(l,o));let a=o.select(e);return i=n[a]||n.other,typeof i=="function"?i():i}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}constructor(e,n){this.locale=e,this.strings=n}}const hi=new WeakMap;function Cd(t){let e=hi.get(t);return e||(e=new nn(t),hi.set(t,e)),e}function Td(t,e){return e&&nn.getGlobalDictionaryForPackage(e)||Cd(t)}function br(t,e){let{locale:n}=Ke(),r=Td(t,e);return s.useMemo(()=>new wd(n,r),[n,r])}let Sn=new Map,Gn=!1;try{Gn=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let _t=!1;try{_t=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Dl={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class kd{format(e){let n="";if(!Gn&&this.options.signDisplay!=null?n=Rd(this.numberFormatter,this.options.signDisplay,e):n=this.numberFormatter.format(e),this.options.style==="unit"&&!_t){var r;let{unit:i,unitDisplay:l="short",locale:o}=this.resolvedOptions();if(!i)return n;let a=(r=Dl[i])===null||r===void 0?void 0:r[l];n+=a[o]||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),i=this.numberFormatter.formatToParts(n);return[...r.map(l=>({...l,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(l=>({...l,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Gn&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!_t&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,n={}){this.numberFormatter=Dd(e,n),this.options=n}}function Dd(t,e={}){let{numberingSystem:n}=e;if(n&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${n}`),e.style==="unit"&&!_t){var r;let{unit:o,unitDisplay:a="short"}=e;if(!o)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=Dl[o])===null||r===void 0)&&r[a]))throw new Error(`Unsupported unit ${o} with unitDisplay = ${a}`);e={...e,style:"decimal"}}let i=t+(e?Object.entries(e).sort((o,a)=>o[0]<a[0]?-1:1).join():"");if(Sn.has(i))return Sn.get(i);let l=new Intl.NumberFormat(t,e);return Sn.set(i,l),l}function Rd(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 i=t.format(-n),l=t.format(n),o=i.replace(l,"").replace(/\u200e|\u061C/,"");return[...o].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(l,"!!!").replace(o,"+").replace("!!!",l)}else return t.format(n)}}function Kd(t={}){let{locale:e}=Ke();return s.useMemo(()=>new kd(e,t),[e,t])}let Pn=new Map;function hr(t){let{locale:e}=Ke(),n=e+(t?Object.entries(t).sort((i,l)=>i[0]<l[0]?-1:1).join():"");if(Pn.has(n))return Pn.get(n);let r=new Intl.Collator(e,t);return Pn.set(n,r),r}function rn(t,e){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:l,onPressEnd:o,onPressUp:a,onPressChange:u,preventFocusOnPress:d,allowFocusWhenDisabled:c,onClick:f,href:b,target:p,rel:h,type:v="button"}=t,y;n==="button"?y={type:v,disabled:r}:y={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?p:void 0,type:n==="input"?v:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?h:void 0};let{pressProps:$,isPressed:E}=He({onPressStart:l,onPressEnd:o,onPressChange:u,onPress:i,onPressUp:a,onClick:f,isDisabled:r,preventFocusOnPress:d,ref:e}),{focusableProps:C}=it(t,e);c&&(C.tabIndex=r?-1:C.tabIndex);let K=A(C,$,Q(t,{labelable:!0}));return{isPressed:E,buttonProps:A(y,K,{"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"]})}}function Rl(t,e,n){const{isSelected:r}=e,{isPressed:i,buttonProps:l}=rn({...t,onPress:Te(e.toggle,t.onPress)},n);return{isPressed:i,isSelected:r,isDisabled:t.isDisabled||!1,buttonProps:A(l,{"aria-pressed":r})}}function Ld(t){const e=ie(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:l}=t.ownerDocument.defaultView;let{display:o,visibility:a}=l(t);i=o!=="none"&&a!=="hidden"&&a!=="collapse"}return i}function Fd(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 Kl(t,e){return t.nodeName!=="#comment"&&Ld(t)&&Fd(t,e)&&(!t.parentElement||Kl(t.parentElement,t))}const gi=s.createContext(null),qn="react-aria-focus-scope-restore";let _=null;function Ll(t){let{children:e,contain:n,restoreFocus:r,autoFocus:i}=t,l=s.useRef(null),o=s.useRef(null),a=s.useRef([]),{parentNode:u}=s.useContext(gi)||{},d=s.useMemo(()=>new Zn({scopeRef:a}),[a]);H(()=>{let b=u||q.root;if(q.getTreeNode(b.scopeRef)&&_&&!Wt(_,b.scopeRef)){let p=q.getTreeNode(_);p&&(b=p)}b.addChild(d),q.addNode(d)},[d,u]),H(()=>{let b=q.getTreeNode(a);b&&(b.contain=!!n)},[n]),H(()=>{var b;let p=(b=l.current)===null||b===void 0?void 0:b.nextSibling,h=[],v=y=>y.stopPropagation();for(;p&&p!==o.current;)h.push(p),p.addEventListener(qn,v),p=p.nextSibling;return a.current=h,()=>{for(let y of h)y.removeEventListener(qn,v)}},[e]),Bd(a,r,n),Ad(a,n),Od(a,r,n),Nd(a,i),s.useEffect(()=>{const b=ne(j(a.current?a.current[0]:void 0));let p=null;if(pe(b,a.current)){for(let h of q.traverse())h.scopeRef&&pe(b,h.scopeRef.current)&&(p=h);p===q.getTreeNode(a)&&(_=p.scopeRef)}},[a]),H(()=>()=>{var b,p,h;let v=(h=(p=q.getTreeNode(a))===null||p===void 0||(b=p.parent)===null||b===void 0?void 0:b.scopeRef)!==null&&h!==void 0?h:null;(a===_||Wt(a,_))&&(!v||q.getTreeNode(v))&&(_=v),q.removeTreeNode(a)},[a]);let c=s.useMemo(()=>Md(a),[]),f=s.useMemo(()=>({focusManager:c,parentNode:d}),[d,c]);return s.createElement(gi.Provider,{value:f},s.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:l}),e,s.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:o}))}function Md(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:i,wrap:l,accept:o}=e;var a;let u=r||ne(j((a=n[0])!==null&&a!==void 0?a:void 0)),d=n[0].previousElementSibling,c=Oe(n),f=ue(c,{tabbable:i,accept:o},n);f.currentNode=pe(u,n)?u:d;let b=f.nextNode();return!b&&l&&(f.currentNode=d,b=f.nextNode()),b&&oe(b,!0),b},focusPrevious(e={}){let n=t.current,{from:r,tabbable:i,wrap:l,accept:o}=e;var a;let u=r||ne(j((a=n[0])!==null&&a!==void 0?a:void 0)),d=n[n.length-1].nextElementSibling,c=Oe(n),f=ue(c,{tabbable:i,accept:o},n);f.currentNode=pe(u,n)?u:d;let b=f.previousNode();return!b&&l&&(f.currentNode=d,b=f.previousNode()),b&&oe(b,!0),b},focusFirst(e={}){let n=t.current,{tabbable:r,accept:i}=e,l=Oe(n),o=ue(l,{tabbable:r,accept:i},n);o.currentNode=n[0].previousElementSibling;let a=o.nextNode();return a&&oe(a,!0),a},focusLast(e={}){let n=t.current,{tabbable:r,accept:i}=e,l=Oe(n),o=ue(l,{tabbable:r,accept:i},n);o.currentNode=n[n.length-1].nextElementSibling;let a=o.previousNode();return a&&oe(a,!0),a}}}function Oe(t){return t[0].parentElement}function pt(t){let e=q.getTreeNode(_);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function Ad(t,e){let n=s.useRef(void 0),r=s.useRef(void 0);H(()=>{let i=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const l=j(i?i[0]:void 0);let o=d=>{if(d.key!=="Tab"||d.altKey||d.ctrlKey||d.metaKey||!pt(t)||d.isComposing)return;let c=ne(l),f=t.current;if(!f||!pe(c,f))return;let b=Oe(f),p=ue(b,{tabbable:!0},f);if(!c)return;p.currentNode=c;let h=d.shiftKey?p.previousNode():p.nextNode();h||(p.currentNode=d.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,h=d.shiftKey?p.previousNode():p.nextNode()),d.preventDefault(),h&&oe(h,!0)},a=d=>{(!_||Wt(_,t))&&pe(V(d),t.current)?(_=t,n.current=V(d)):pt(t)&&!Ee(V(d),t)?n.current?n.current.focus():_&&_.current&&Yn(_.current):pt(t)&&(n.current=V(d))},u=d=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let c=yt(),f=(c==="virtual"||c===null)&&sr()&&al(),b=ne(l);if(!f&&b&&pt(t)&&!Ee(b,t)){_=t;let h=V(d);if(h&&h.isConnected){var p;n.current=h,(p=n.current)===null||p===void 0||p.focus()}else _.current&&Yn(_.current)}})};return l.addEventListener("keydown",o,!1),l.addEventListener("focusin",a,!1),i==null||i.forEach(d=>d.addEventListener("focusin",a,!1)),i==null||i.forEach(d=>d.addEventListener("focusout",u,!1)),()=>{l.removeEventListener("keydown",o,!1),l.removeEventListener("focusin",a,!1),i==null||i.forEach(d=>d.removeEventListener("focusin",a,!1)),i==null||i.forEach(d=>d.removeEventListener("focusout",u,!1))}},[t,e]),H(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Fl(t){return Ee(t)}function pe(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function Ee(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of q.traverse(q.getTreeNode(e)))if(n&&pe(t,n.current))return!0;return!1}function Id(t){return Ee(t,_)}function Wt(t,e){var n;let r=(n=q.getTreeNode(e))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===t)return!0;r=r.parent}return!1}function oe(t,e=!1){if(t!=null&&!e)try{De(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Ml(t,e=!0){let n=t[0].previousElementSibling,r=Oe(t),i=ue(r,{tabbable:e},t);i.currentNode=n;let l=i.nextNode();return e&&!l&&(r=Oe(t),i=ue(r,{tabbable:!1},t),i.currentNode=n,l=i.nextNode()),l}function Yn(t,e=!0){oe(Ml(t,e))}function Nd(t,e){const n=s.useRef(e);s.useEffect(()=>{if(n.current){_=t;const r=j(t.current?t.current[0]:void 0);!pe(ne(r),_.current)&&t.current&&Yn(t.current)}n.current=!1},[t])}function Bd(t,e,n){H(()=>{if(e||n)return;let r=t.current;const i=j(r?r[0]:void 0);let l=o=>{let a=V(o);pe(a,t.current)?_=t:Fl(a)||(_=null)};return i.addEventListener("focusin",l,!1),r==null||r.forEach(o=>o.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),r==null||r.forEach(o=>o.removeEventListener("focusin",l,!1))}},[t,e,n])}function mi(t){let e=q.getTreeNode(_);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function Od(t,e,n){const r=s.useRef(typeof document<"u"?ne(j(t.current?t.current[0]:void 0)):null);H(()=>{let i=t.current;const l=j(i?i[0]:void 0);if(!e||n)return;let o=()=>{(!_||Wt(_,t))&&pe(ne(l),t.current)&&(_=t)};return l.addEventListener("focusin",o,!1),i==null||i.forEach(a=>a.addEventListener("focusin",o,!1)),()=>{l.removeEventListener("focusin",o,!1),i==null||i.forEach(a=>a.removeEventListener("focusin",o,!1))}},[t,n]),H(()=>{const i=j(t.current?t.current[0]:void 0);if(!e)return;let l=o=>{if(o.key!=="Tab"||o.altKey||o.ctrlKey||o.metaKey||!pt(t)||o.isComposing)return;let a=i.activeElement;if(!Ee(a,t)||!mi(t))return;let u=q.getTreeNode(t);if(!u)return;let d=u.nodeToRestore,c=ue(i.body,{tabbable:!0});c.currentNode=a;let f=o.shiftKey?c.previousNode():c.nextNode();if((!d||!d.isConnected||d===i.body)&&(d=void 0,u.nodeToRestore=void 0),(!f||!Ee(f,t))&&d){c.currentNode=d;do f=o.shiftKey?c.previousNode():c.nextNode();while(Ee(f,t));o.preventDefault(),o.stopPropagation(),f?oe(f,!0):Fl(d)?oe(d,!0):a.blur()}};return n||i.addEventListener("keydown",l,!0),()=>{n||i.removeEventListener("keydown",l,!0)}},[t,e,n]),H(()=>{const i=j(t.current?t.current[0]:void 0);if(!e)return;let l=q.getTreeNode(t);if(l){var o;return l.nodeToRestore=(o=r.current)!==null&&o!==void 0?o:void 0,()=>{let a=q.getTreeNode(t);if(!a)return;let u=a.nodeToRestore,d=ne(i);if(e&&u&&(d&&Ee(d,t)||d===i.body&&mi(t))){let c=q.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let f=c.getTreeNode(t);for(;f;){if(f.nodeToRestore&&f.nodeToRestore.isConnected){vi(f.nodeToRestore);return}f=f.parent}for(f=c.getTreeNode(t);f;){if(f.scopeRef&&f.scopeRef.current&&q.getTreeNode(f.scopeRef)){let b=Ml(f.scopeRef.current,!0);vi(b);return}f=f.parent}}})}}}},[t,e])}function vi(t){t.dispatchEvent(new CustomEvent(qn,{bubbles:!0,cancelable:!0}))&&oe(t)}function ue(t,e,n){let r=e!=null&&e.tabbable?Vu:gl,i=(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null,l=j(i),o=mu(l,t||l,NodeFilter.SHOW_ELEMENT,{acceptNode(a){var u;return!(e==null||(u=e.from)===null||u===void 0)&&u.contains(a)?NodeFilter.FILTER_REJECT:r(a)&&Kl(a)&&(!n||pe(a,n))&&(!(e!=null&&e.accept)||e.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(o.currentNode=e.from),o}function zd(t,e={}){return{focusNext(n={}){let r=t.current;if(!r)return null;let{from:i,tabbable:l=e.tabbable,wrap:o=e.wrap,accept:a=e.accept}=n,u=i||ne(j(r)),d=ue(r,{tabbable:l,accept:a});r.contains(u)&&(d.currentNode=u);let c=d.nextNode();return!c&&o&&(d.currentNode=r,c=d.nextNode()),c&&oe(c,!0),c},focusPrevious(n=e){let r=t.current;if(!r)return null;let{from:i,tabbable:l=e.tabbable,wrap:o=e.wrap,accept:a=e.accept}=n,u=i||ne(j(r)),d=ue(r,{tabbable:l,accept:a});if(r.contains(u))d.currentNode=u;else{let f=En(d);return f&&oe(f,!0),f??null}let c=d.previousNode();if(!c&&o){d.currentNode=r;let f=En(d);if(!f)return null;c=f}return c&&oe(c,!0),c??null},focusFirst(n=e){let r=t.current;if(!r)return null;let{tabbable:i=e.tabbable,accept:l=e.accept}=n,a=ue(r,{tabbable:i,accept:l}).nextNode();return a&&oe(a,!0),a},focusLast(n=e){let r=t.current;if(!r)return null;let{tabbable:i=e.tabbable,accept:l=e.accept}=n,o=ue(r,{tabbable:i,accept:l}),a=En(o);return a&&oe(a,!0),a??null}}}function En(t){let e,n;do n=t.lastChild(),n&&(e=n);while(n);return e}class gr{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n??null);if(!i)return;let l=new Zn({scopeRef:e});i.addChild(l),l.parent=i,this.fastMap.set(e,l),r&&(l.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 l of this.traverse())l!==n&&n.nodeToRestore&&l.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&pe(l.nodeToRestore,n.scopeRef.current)&&(l.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(l=>r&&r.addChild(l))),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 e;let n=new gr;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(e=i.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Zn({scopeRef:null}),this.fastMap.set(null,this.root)}}class Zn{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let q=new gr;function Le(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=s.useRef({isFocused:!1,isFocusVisible:e||vt()}),[l,o]=s.useState(!1),[a,u]=s.useState(()=>i.current.isFocused&&i.current.isFocusVisible),d=s.useCallback(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),c=s.useCallback(p=>{i.current.isFocused=p,o(p),d()},[d]);ld(p=>{i.current.isFocusVisible=p,d()},[],{isTextInput:n});let{focusProps:f}=Cl({isDisabled:r,onFocusChange:c}),{focusWithinProps:b}=tn({isDisabled:!r,onFocusWithinChange:c});return{isFocused:l,isFocusVisible:a,focusProps:r?b:f}}function Al(t){let e=jd(j(t));e!==t&&(e&&Hd(e,t),t&&Vd(t,e))}function Hd(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function Vd(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function jd(t){let e=ne(t),n=e==null?void 0:e.getAttribute("aria-activedescendant");return n&&t.getElementById(n)||e}function _d(t,e){const{"aria-label":n,"aria-labelledby":r,orientation:i="horizontal"}=t;let[l,o]=s.useState(!1);H(()=>{var h;o(!!(e.current&&(!((h=e.current.parentElement)===null||h===void 0)&&h.closest('[role="toolbar"]'))))});const{direction:a}=Ke(),u=a==="rtl"&&i==="horizontal";let d=zd(e);const c=h=>{if(h.currentTarget.contains(h.target)){if(i==="horizontal"&&h.key==="ArrowRight"||i==="vertical"&&h.key==="ArrowDown")u?d.focusPrevious():d.focusNext();else if(i==="horizontal"&&h.key==="ArrowLeft"||i==="vertical"&&h.key==="ArrowUp")u?d.focusNext():d.focusPrevious();else if(h.key==="Tab"){h.stopPropagation(),f.current=document.activeElement,h.shiftKey?d.focusFirst():d.focusLast();return}else return;h.stopPropagation(),h.preventDefault()}},f=s.useRef(null),b=h=>{!h.currentTarget.contains(h.relatedTarget)&&!f.current&&(f.current=h.target)},p=h=>{var v;if(f.current&&!h.currentTarget.contains(h.relatedTarget)&&(!((v=e.current)===null||v===void 0)&&v.contains(h.target))){var y;(y=f.current)===null||y===void 0||y.focus(),f.current=null}};return{toolbarProps:{...Q(t,{labelable:!0}),role:l?"group":"toolbar","aria-orientation":i,"aria-label":n,"aria-labelledby":n==null?r:void 0,onKeyDownCapture:l?void 0:c,onFocusCapture:l?void 0:p,onBlurCapture:l?void 0:b}}}function Wd(t,e,n){let{isDisabled:r}=t,{toolbarProps:i}=_d(t,n);return{groupProps:{...i,role:e.selectionMode==="single"?"radiogroup":i.role,"aria-disabled":r}}}function Ud(t,e,n){let r={isSelected:e.selectedKeys.has(t.id),setSelected(u){e.setSelected(t.id,u)},toggle(){e.toggleKey(t.id)}},{isPressed:i,isSelected:l,isDisabled:o,buttonProps:a}=Rl({...t,id:void 0,isDisabled:t.isDisabled||e.isDisabled},r,n);return e.selectionMode==="single"&&(a.role="radio",a["aria-checked"]=r.isSelected,delete a["aria-pressed"]),{isPressed:i,isSelected:l,isDisabled:o,buttonProps:a}}const Il=7e3;let me=null;function yi(t,e="assertive",n=Il){me?me.announce(t,e,n):(me=new Gd,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?me.announce(t,e,n):setTimeout(()=>{me!=null&&me.isAttached()&&(me==null||me.announce(t,e,n))},100))}class Gd{isAttached(){var e;return(e=this.node)===null||e===void 0?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=Il){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===void 0||i.appendChild(o):(l=this.politeLog)===null||l===void 0||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=""))}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))}}const Nl={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Bl={...Nl,customError:!0,valid:!1},ot={isInvalid:!1,validationDetails:Nl,validationErrors:[]},qd=s.createContext({}),Xn="__formValidationState"+Date.now();function mr(t){if(t[Xn]){let{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:l}=t[Xn];return{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:l}}return Yd(t)}function Yd(t){let{isInvalid:e,validationState:n,name:r,value:i,builtinValidation:l,validate:o,validationBehavior:a="aria"}=t;n&&(e||(e=n==="invalid"));let u=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:Bl}:null,d=s.useMemo(()=>{if(!o||i==null)return null;let L=Zd(o,i);return $i(L)},[o,i]);l!=null&&l.validationDetails.valid&&(l=void 0);let c=s.useContext(qd),f=s.useMemo(()=>r?Array.isArray(r)?r.flatMap(L=>Jn(c[L])):Jn(c[r]):[],[c,r]),[b,p]=s.useState(c),[h,v]=s.useState(!1);c!==b&&(p(c),v(!1));let y=s.useMemo(()=>$i(h?[]:f),[h,f]),$=s.useRef(ot),[E,C]=s.useState(ot),K=s.useRef(ot),T=()=>{if(!x)return;M(!1);let L=d||l||$.current;wn(L,K.current)||(K.current=L,C(L))},[x,M]=s.useState(!1);return s.useEffect(T),{realtimeValidation:u||y||d||l||ot,displayValidation:a==="native"?u||y||E:u||y||d||l||E,updateValidation(L){a==="aria"&&!wn(E,L)?C(L):$.current=L},resetValidation(){let L=ot;wn(L,K.current)||(K.current=L,C(L)),a==="native"&&M(!1),v(!0)},commitValidation(){a==="native"&&M(!0),v(!0)}}}function Jn(t){return t?Array.isArray(t)?t:[t]:[]}function Zd(t,e){if(typeof t=="function"){let n=t(e);if(n&&typeof n!="boolean")return Jn(n)}return[]}function $i(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:Bl}:null}function wn(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 vr(t,e,n){let{validationBehavior:r,focus:i}=t;H(()=>{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(Jd(n.current))}});let l=J(()=>{e.resetValidation()}),o=J(u=>{var d;e.displayValidation.isInvalid||e.commitValidation();let c=n==null||(d=n.current)===null||d===void 0?void 0:d.form;if(!u.defaultPrevented&&n&&c&&Qd(c)===n.current){var f;i?i():(f=n.current)===null||f===void 0||f.focus(),wl("keyboard")}u.preventDefault()}),a=J(()=>{e.commitValidation()});s.useEffect(()=>{let u=n==null?void 0:n.current;if(!u)return;let d=u.form;return u.addEventListener("invalid",o),u.addEventListener("change",a),d==null||d.addEventListener("reset",l),()=>{u.removeEventListener("invalid",o),u.removeEventListener("change",a),d==null||d.removeEventListener("reset",l)}},[n,o,a,l,r])}function Xd(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 Jd(t){return{isInvalid:!t.validity.valid,validationDetails:Xd(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function Qd(t){for(let e=0;e<t.elements.length;e++){let n=t.elements[e];if(!n.validity.valid)return n}return null}function ec(t,e,n){let{isDisabled:r=!1,isReadOnly:i=!1,value:l,name:o,children:a,"aria-label":u,"aria-labelledby":d,validationState:c="valid",isInvalid:f}=t,b=x=>{x.stopPropagation(),e.setSelected(x.target.checked)},p=a!=null,h=u!=null||d!=null;!p&&!h&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:v,isPressed:y}=He({isDisabled:r}),{pressProps:$,isPressed:E}=He({onPress(){var x;e.toggle(),(x=n.current)===null||x===void 0||x.focus()},isDisabled:r||i}),{focusableProps:C}=it(t,n),K=A(v,C),T=Q(t,{labelable:!0});return dr(n,e.isSelected,e.setSelected),{labelProps:A($,{onClick:x=>x.preventDefault()}),inputProps:A(T,{"aria-invalid":f||c==="invalid"||void 0,"aria-errormessage":t["aria-errormessage"],"aria-controls":t["aria-controls"],"aria-readonly":i||void 0,onChange:b,disabled:r,...l==null?{}:{value:l},name:o,type:"checkbox",...K}),isSelected:e.isSelected,isPressed:y||E,isDisabled:r,isReadOnly:i,isInvalid:f||c==="invalid"}}function tc(t,e,n){let r=mr({...t,value:e.isSelected}),{isInvalid:i,validationErrors:l,validationDetails:o}=r.displayValidation,{labelProps:a,inputProps:u,isSelected:d,isPressed:c,isDisabled:f,isReadOnly:b}=ec({...t,isInvalid:i},e,n);vr(t,r,n);let{isIndeterminate:p,isRequired:h,validationBehavior:v="aria"}=t;s.useEffect(()=>{n.current&&(n.current.indeterminate=!!p)});let{pressProps:y}=He({isDisabled:f||b,onPress(){let{[Xn]:$}=t,{commitValidation:E}=$||r;E()}});return{labelProps:A(a,y),inputProps:{...u,checked:d,"aria-required":h&&v==="aria"||void 0,required:h&&v==="native"},isSelected:d,isPressed:c,isDisabled:f,isReadOnly:b,isInvalid:i,validationErrors:l,validationDetails:o}}function yr(t){let{id:e,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:l="label"}=t;e=te(e);let o=te(),a={};n?(r=r?`${o} ${r}`:o,a={id:o,htmlFor:l==="label"?e:void 0}):!r&&!i&&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 u=dl({id:e,"aria-label":i,"aria-labelledby":r});return{labelProps:a,fieldProps:u}}function $r(t){let{description:e,errorMessage:n,isInvalid:r,validationState:i}=t,{labelProps:l,fieldProps:o}=yr(t),a=ht([!!e,!!n,r,i]),u=ht([!!e,!!n,r,i]);return o=A(o,{"aria-describedby":[a,u,t["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:l,fieldProps:o,descriptionProps:{id:a},errorMessageProps:{id:u}}}function Ol(t={}){let{isReadOnly:e}=t,[n,r]=Re(t.isSelected,t.defaultSelected||!1,t.onChange);function i(o){e||r(o)}function l(){e||r(!n)}return{isSelected:n,setSelected:i,toggle:l}}function nc(t){let{selectionMode:e="single",disallowEmptySelection:n,isDisabled:r=!1}=t,[i,l]=Re(s.useMemo(()=>t.selectedKeys?new Set(t.selectedKeys):void 0,[t.selectedKeys]),s.useMemo(()=>t.defaultSelectedKeys?new Set(t.defaultSelectedKeys):new Set,[t.defaultSelectedKeys]),t.onSelectionChange);return{selectionMode:e,isDisabled:r,selectedKeys:i,setSelectedKeys:l,toggleKey(o){let a;e==="multiple"?(a=new Set(i),a.has(o)&&(!n||a.size>1)?a.delete(o):a.add(o)):a=new Set(i.has(o)&&!n?[]:[o]),l(a)},setSelected(o,a){a!==i.has(o)&&this.toggleKey(o)}}}const xi={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 zl(t={}){let{style:e,isFocusable:n}=t,[r,i]=s.useState(!1),{focusWithinProps:l}=tn({isDisabled:!n,onFocusWithinChange:a=>i(a)}),o=s.useMemo(()=>r?e:e?{...xi,...e}:xi,[r]);return{visuallyHiddenProps:{...l,style:o}}}function Hl(t){let{children:e,elementType:n="div",isFocusable:r,style:i,...l}=t,{visuallyHiddenProps:o}=zl(t);return s.createElement(n,A(l,o),e)}function rc(t,e){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:l=!1,type:o="text",validationBehavior:a="aria"}=t,[u,d]=Re(t.value,t.defaultValue||"",t.onChange),{focusableProps:c}=it(t,e),f=mr({...t,value:u}),{isInvalid:b,validationErrors:p,validationDetails:h}=f.displayValidation,{labelProps:v,fieldProps:y,descriptionProps:$,errorMessageProps:E}=$r({...t,isInvalid:b,errorMessage:t.errorMessage||p}),C=Q(t,{labelable:!0});const K={type:o,pattern:t.pattern};return dr(e,u,d),vr(t,f,e),s.useEffect(()=>{if(e.current instanceof ie(e.current).HTMLTextAreaElement){let T=e.current;Object.defineProperty(T,"defaultValue",{get:()=>T.value,set:()=>{},configurable:!0})}},[e]),{labelProps:v,inputProps:A(C,n==="input"?K:void 0,{disabled:r,readOnly:l,required:i&&a==="native","aria-required":i&&a==="aria"||void 0,"aria-invalid":b||void 0,"aria-errormessage":t["aria-errormessage"],"aria-activedescendant":t["aria-activedescendant"],"aria-autocomplete":t["aria-autocomplete"],"aria-haspopup":t["aria-haspopup"],"aria-controls":t["aria-controls"],value:u,onChange:T=>d(T.target.value),autoComplete:t.autoComplete,autoCapitalize:t.autoCapitalize,maxLength:t.maxLength,minLength:t.minLength,name:t.name,placeholder:t.placeholder,inputMode:t.inputMode,autoCorrect:t.autoCorrect,spellCheck:t.spellCheck,[parseInt(s.version,10)>=17?"enterKeyHint":"enterkeyhint"]:t.enterKeyHint,onCopy:t.onCopy,onCut:t.onCut,onPaste:t.onPaste,onCompositionEnd:t.onCompositionEnd,onCompositionStart:t.onCompositionStart,onCompositionUpdate:t.onCompositionUpdate,onSelect:t.onSelect,onBeforeInput:t.onBeforeInput,onInput:t.onInput,...c,...y}),descriptionProps:$,errorMessageProps:E,isInvalid:b,validationErrors:p,validationDetails:h}}const ye={top:"top",bottom:"top",left:"left",right:"left"},Ut={top:"bottom",bottom:"top",left:"right",right:"left"},ic={top:"left",left:"top"},Qn={top:"height",left:"width"},Vl={width:"totalWidth",height:"totalHeight"},Ft={};let ee=typeof document<"u"?window.visualViewport:null;function Si(t){let e=0,n=0,r=0,i=0,l=0,o=0,a={};var u;let d=((u=ee==null?void 0:ee.scale)!==null&&u!==void 0?u:1)>1;if(t.tagName==="BODY"){let h=document.documentElement;r=h.clientWidth,i=h.clientHeight;var c;e=(c=ee==null?void 0:ee.width)!==null&&c!==void 0?c:r;var f;n=(f=ee==null?void 0:ee.height)!==null&&f!==void 0?f:i,a.top=h.scrollTop||t.scrollTop,a.left=h.scrollLeft||t.scrollLeft,ee&&(l=ee.offsetTop,o=ee.offsetLeft)}else({width:e,height:n,top:l,left:o}=nt(t)),a.top=t.scrollTop,a.left=t.scrollLeft,r=e,i=n;if(ar()&&(t.tagName==="BODY"||t.tagName==="HTML")&&d){a.top=0,a.left=0;var b;l=(b=ee==null?void 0:ee.pageTop)!==null&&b!==void 0?b:0;var p;o=(p=ee==null?void 0:ee.pageLeft)!==null&&p!==void 0?p:0}return{width:e,height:n,totalWidth:r,totalHeight:i,scroll:a,top:l,left:o}}function lc(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Pi(t,e,n,r,i,l,o){var a;let u=(a=i.scroll[t])!==null&&a!==void 0?a:0,d=r[Qn[t]],c=r.scroll[ye[t]]+l,f=d+r.scroll[ye[t]]-l,b=e-u+o[t]-r[ye[t]],p=e-u+n+o[t]-r[ye[t]];return b<c?c-b:p>f?Math.max(f-p,c-b):0}function oc(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 Ei(t){if(Ft[t])return Ft[t];let[e,n]=t.split(" "),r=ye[e]||"right",i=ic[r];ye[n]||(n="center");let l=Qn[r],o=Qn[i];return Ft[t]={placement:e,crossPlacement:n,axis:r,crossAxis:i,size:l,crossSize:o},Ft[t]}function Cn(t,e,n,r,i,l,o,a,u,d){let{placement:c,crossPlacement:f,axis:b,crossAxis:p,size:h,crossSize:v}=r,y={};var $;y[p]=($=t[p])!==null&&$!==void 0?$:0;var E,C,K,T;f==="center"?y[p]+=(((E=t[v])!==null&&E!==void 0?E:0)-((C=n[v])!==null&&C!==void 0?C:0))/2:f!==p&&(y[p]+=((K=t[v])!==null&&K!==void 0?K:0)-((T=n[v])!==null&&T!==void 0?T:0)),y[p]+=l;const x=t[p]-n[v]+u+d,M=t[p]+t[v]-u-d;if(y[p]=Ot(y[p],x,M),c===b){const F=a?o[h]:e[Vl[h]];y[Ut[b]]=Math.floor(F-t[b]+i)}else y[b]=Math.floor(t[b]+t[h]+i);return y}function ac(t,e,n,r,i,l,o,a){const u=r?n.height:e[Vl.height];var d;let c=t.top!=null?n.top+t.top:n.top+(u-((d=t.bottom)!==null&&d!==void 0?d:0)-o);var f,b,p,h,v,y;let $=a!=="top"?Math.max(0,e.height+e.top+((f=e.scroll.top)!==null&&f!==void 0?f:0)-c-(((b=i.top)!==null&&b!==void 0?b:0)+((p=i.bottom)!==null&&p!==void 0?p:0)+l)):Math.max(0,c+o-(e.top+((h=e.scroll.top)!==null&&h!==void 0?h:0))-(((v=i.top)!==null&&v!==void 0?v:0)+((y=i.bottom)!==null&&y!==void 0?y:0)+l));return Math.min(e.height-l*2,$)}function wi(t,e,n,r,i,l){let{placement:o,axis:a,size:u}=l;var d,c;if(o===a)return Math.max(0,n[a]-t[a]-((d=t.scroll[a])!==null&&d!==void 0?d:0)+e[a]-((c=r[a])!==null&&c!==void 0?c:0)-r[Ut[a]]-i);var f;return Math.max(0,t[u]+t[a]+t.scroll[a]-e[a]-n[a]-n[u]-((f=r[a])!==null&&f!==void 0?f:0)-r[Ut[a]]-i)}function sc(t,e,n,r,i,l,o,a,u,d,c,f,b,p,h,v){let y=Ei(t),{size:$,crossAxis:E,crossSize:C,placement:K,crossPlacement:T}=y,x=Cn(e,a,n,y,c,f,d,b,h,v),M=c,F=wi(a,d,e,i,l+c,y);if(o&&r[$]>F){let Fe=Ei(`${Ut[K]} ${T}`),lt=Cn(e,a,n,Fe,c,f,d,b,h,v);wi(a,d,e,i,l+c,Fe)>F&&(y=Fe,x=lt,M=c)}let N="bottom";y.axis==="top"?y.placement==="top"?N="top":y.placement==="bottom"&&(N="bottom"):y.crossAxis==="top"&&(y.crossPlacement==="top"?N="bottom":y.crossPlacement==="bottom"&&(N="top"));let L=Pi(E,x[E],n[C],a,u,l,d);x[E]+=L;let g=ac(x,a,d,b,i,l,n.height,N);p&&p<g&&(g=p),n.height=Math.min(n.height,g),x=Cn(e,a,n,y,M,f,d,b,h,v),L=Pi(E,x[E],n[C],a,u,l,d),x[E]+=L;let R={},B=e[E]+.5*e[C]-x[E]-i[ye[E]];const D=h/2+v;var z,m,k,S;const O=ye[E]==="left"?((z=i.left)!==null&&z!==void 0?z:0)+((m=i.right)!==null&&m!==void 0?m:0):((k=i.top)!==null&&k!==void 0?k:0)+((S=i.bottom)!==null&&S!==void 0?S:0),Y=n[C]-O-h/2-v,Z=e[E]+h/2-(x[E]+i[ye[E]]),re=e[E]+e[C]-h/2-(x[E]+i[ye[E]]),ge=Ot(B,Z,re);return R[E]=Ot(ge,D,Y),{position:x,maxHeight:g,arrowOffsetLeft:R.left,arrowOffsetTop:R.top,placement:y.placement}}function uc(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:i,padding:l,shouldFlip:o,boundaryElement:a,offset:u,crossOffset:d,maxHeight:c,arrowSize:f=0,arrowBoundaryOffset:b=0}=t,p=r instanceof HTMLElement?dc(r):document.documentElement,h=p===document.documentElement;const v=window.getComputedStyle(p).position;let y=!!v&&v!=="static",$=h?nt(n):Ci(n,p);if(!h){let{marginTop:R,marginLeft:B}=window.getComputedStyle(n);$.top+=parseInt(R,10)||0,$.left+=parseInt(B,10)||0}let E=nt(r),C=oc(r);var K,T;E.width+=((K=C.left)!==null&&K!==void 0?K:0)+((T=C.right)!==null&&T!==void 0?T:0);var x,M;E.height+=((x=C.top)!==null&&x!==void 0?x:0)+((M=C.bottom)!==null&&M!==void 0?M:0);let F=lc(i),N=Si(a),L=Si(p),g=a.tagName==="BODY"?nt(p):Ci(p,a);return p.tagName==="HTML"&&a.tagName==="BODY"&&(L.scroll.top=0,L.scroll.left=0),sc(e,$,E,F,C,l,o,N,L,g,u,d,y,c,f,b)}function nt(t){let{top:e,left:n,width:r,height:i}=t.getBoundingClientRect(),{scrollTop:l,scrollLeft:o,clientTop:a,clientLeft:u}=document.documentElement;return{top:e+l-a,left:n+o-u,width:r,height:i}}function Ci(t,e){let n=window.getComputedStyle(t),r;if(n.position==="fixed"){let{top:i,left:l,width:o,height:a}=t.getBoundingClientRect();r={top:i,left:l,width:o,height:a}}else{r=nt(t);let i=nt(e),l=window.getComputedStyle(e);i.top+=(parseInt(l.borderTopWidth,10)||0)-e.scrollTop,i.left+=(parseInt(l.borderLeftWidth,10)||0)-e.scrollLeft,r.top-=i.top,r.left-=i.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function dc(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Ti(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Ti(e);)e=e.parentElement;return e||document.documentElement}function Ti(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 jl=new WeakMap;function cc(t){let{triggerRef:e,isOpen:n,onClose:r}=t;s.useEffect(()=>{if(!n||r===null)return;let i=l=>{let o=l.target;if(!e.current||o instanceof Node&&!o.contains(e.current)||l.target instanceof HTMLInputElement||l.target instanceof HTMLTextAreaElement)return;let a=r||jl.get(e.current);a&&a()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,e])}let G=typeof document<"u"?window.visualViewport:null;function _l(t){let{direction:e}=Ke(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:l=i,placement:o="bottom",containerPadding:a=12,shouldFlip:u=!0,boundaryElement:d=typeof document<"u"?document.body:null,offset:c=0,crossOffset:f=0,shouldUpdatePosition:b=!0,isOpen:p=!0,onClose:h,maxHeight:v,arrowBoundaryOffset:y=0}=t,[$,E]=s.useState(null),C=[b,o,i.current,r.current,l.current,a,u,d,c,f,p,e,v,y,n],K=s.useRef(G==null?void 0:G.scale);s.useEffect(()=>{p&&(K.current=G==null?void 0:G.scale)},[p]);let T=s.useCallback(()=>{if(b===!1||!p||!i.current||!r.current||!d||(G==null?void 0:G.scale)!==K.current)return;let L=null;if(l.current&&l.current.contains(document.activeElement)){var g;let S=(g=document.activeElement)===null||g===void 0?void 0:g.getBoundingClientRect(),O=l.current.getBoundingClientRect();var R;if(L={type:"top",offset:((R=S==null?void 0:S.top)!==null&&R!==void 0?R:0)-O.top},L.offset>O.height/2){L.type="bottom";var B;L.offset=((B=S==null?void 0:S.bottom)!==null&&B!==void 0?B:0)-O.bottom}}let D=i.current;if(!v&&i.current){var z;D.style.top="0px",D.style.bottom="";var m;D.style.maxHeight=((m=(z=window.visualViewport)===null||z===void 0?void 0:z.height)!==null&&m!==void 0?m:window.innerHeight)+"px"}let k=uc({placement:pc(o,e),overlayNode:i.current,targetNode:r.current,scrollNode:l.current||i.current,padding:a,shouldFlip:u,boundaryElement:d,offset:c,crossOffset:f,maxHeight:v,arrowSize:n,arrowBoundaryOffset:y});if(k.position){if(D.style.top="",D.style.bottom="",D.style.left="",D.style.right="",Object.keys(k.position).forEach(S=>D.style[S]=k.position[S]+"px"),D.style.maxHeight=k.maxHeight!=null?k.maxHeight+"px":"",L&&document.activeElement&&l.current){let S=document.activeElement.getBoundingClientRect(),O=l.current.getBoundingClientRect(),Y=S[L.type]-O[L.type];l.current.scrollTop+=Y-L.offset}E(k)}},C);H(T,C),fc(T),On({ref:i,onResize:T}),On({ref:r,onResize:T});let x=s.useRef(!1);H(()=>{let L,g=()=>{x.current=!0,clearTimeout(L),L=setTimeout(()=>{x.current=!1},500),T()},R=()=>{x.current&&g()};return G==null||G.addEventListener("resize",g),G==null||G.addEventListener("scroll",R),()=>{G==null||G.removeEventListener("resize",g),G==null||G.removeEventListener("scroll",R)}},[T]);let M=s.useCallback(()=>{x.current||h==null||h()},[h,x]);cc({triggerRef:r,isOpen:p,onClose:h&&M});var F,N;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...$==null?void 0:$.position,maxHeight:(F=$==null?void 0:$.maxHeight)!==null&&F!==void 0?F:"100vh"}},placement:(N=$==null?void 0:$.placement)!==null&&N!==void 0?N:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:$==null?void 0:$.arrowOffsetLeft,top:$==null?void 0:$.arrowOffsetTop}},updatePosition:T}}function fc(t){H(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function pc(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const ve=[];function bc(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:l=!1,isKeyboardDismissDisabled:o=!1,shouldCloseOnInteractOutside:a}=t;s.useEffect(()=>{if(i&&!ve.includes(e))return ve.push(e),()=>{let h=ve.indexOf(e);h>=0&&ve.splice(h,1)}},[i,e]);let u=()=>{ve[ve.length-1]===e&&n&&n()},d=h=>{(!a||a(h.target))&&ve[ve.length-1]===e&&(h.stopPropagation(),h.preventDefault())},c=h=>{(!a||a(h.target))&&(ve[ve.length-1]===e&&(h.stopPropagation(),h.preventDefault()),u())},f=h=>{h.key==="Escape"&&!o&&!h.nativeEvent.isComposing&&(h.stopPropagation(),h.preventDefault(),u())};fd({ref:e,onInteractOutside:l&&i?c:void 0,onInteractOutsideStart:d});let{focusWithinProps:b}=tn({isDisabled:!r,onBlurWithin:h=>{!h.relatedTarget||Id(h.relatedTarget)||(!a||a(h.relatedTarget))&&(n==null||n())}}),p=h=>{h.target===h.currentTarget&&h.preventDefault()};return{overlayProps:{onKeyDown:f,...b},underlayProps:{onPointerDown:p}}}function Wl(t,e,n){let{type:r}=t,{isOpen:i}=e;s.useEffect(()=>{n&&n.current&&jl.set(n.current,e.close)});let l;r==="menu"?l=!0:r==="listbox"&&(l="listbox");let o=te();return{triggerProps:{"aria-haspopup":l,"aria-expanded":i,"aria-controls":i?o:void 0,onPress:e.toggle},overlayProps:{id:o}}}const Tn=typeof document<"u"&&window.visualViewport,hc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Mt=0,kn;function gc(t={}){let{isDisabled:e}=t;H(()=>{if(!e)return Mt++,Mt===1&&(Xt()?kn=vc():kn=mc()),()=>{Mt--,Mt===0&&kn()}},[e])}function mc(){return Te(et(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),et(document.documentElement,"overflow","hidden"))}function vc(){let t,e,n=d=>{t=cl(d.target,!0),!(t===document.documentElement&&t===document.body)&&t instanceof HTMLElement&&window.getComputedStyle(t).overscrollBehavior==="auto"&&(e=et(t,"overscrollBehavior","contain"))},r=d=>{if(!t||t===document.documentElement||t===document.body){d.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&d.preventDefault()},i=()=>{e&&e()},l=d=>{let c=d.target;yc(c)&&(a(),c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",Tn&&(Tn.height<window.innerHeight?requestAnimationFrame(()=>{ki(c)}):Tn.addEventListener("resize",()=>ki(c),{once:!0}))}))},o=null,a=()=>{if(o)return;let d=()=>{window.scrollTo(0,0)},c=window.pageXOffset,f=window.pageYOffset;o=Te(at(window,"scroll",d),et(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),et(document.documentElement,"overflow","hidden"),et(document.body,"marginTop",`-${f}px`),()=>{window.scrollTo(c,f)}),window.scrollTo(0,0)},u=Te(at(document,"touchstart",n,{passive:!1,capture:!0}),at(document,"touchmove",r,{passive:!1,capture:!0}),at(document,"touchend",i,{passive:!1,capture:!0}),at(document,"focus",l,!0));return()=>{e==null||e(),o==null||o(),u()}}function et(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function at(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function ki(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=cl(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,l=n.getBoundingClientRect().top;l>i+n.clientHeight&&(r.scrollTop+=l-i)}n=r.parentElement}}function yc(t){return t instanceof HTMLInputElement&&!hc.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}const $c=s.createContext({});function Ul(){var t;return(t=s.useContext($c))!==null&&t!==void 0?t:{}}const er=s.createContext(null);function xc(t){let{children:e}=t,n=s.useContext(er),[r,i]=s.useState(0),l=s.useMemo(()=>({parent:n,modalCount:r,addModal(){i(o=>o+1),n&&n.addModal()},removeModal(){i(o=>o-1),n&&n.removeModal()}}),[n,r]);return s.createElement(er.Provider,{value:l},e)}function Sc(){let t=s.useContext(er);return{modalProviderProps:{"aria-hidden":t&&t.modalCount>0?!0:void 0}}}function Pc(t){let{modalProviderProps:e}=Sc();return s.createElement("div",{"data-overlay-container":!0,...t,...e})}function Ec(t){return s.createElement(xc,null,s.createElement(Pc,t))}function wc(t){let e=_e(),{portalContainer:n=e?null:document.body,...r}=t,{getContainer:i}=Ul();if(!t.portalContainer&&i&&(n=i()),s.useEffect(()=>{if(n!=null&&n.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let l=s.createElement(Ec,r);return je.createPortal(l,n)}var Gl={};Gl={dismiss:"تجاهل"};var ql={};ql={dismiss:"Отхвърляне"};var Yl={};Yl={dismiss:"Odstranit"};var Zl={};Zl={dismiss:"Luk"};var Xl={};Xl={dismiss:"Schließen"};var Jl={};Jl={dismiss:"Απόρριψη"};var Ql={};Ql={dismiss:"Dismiss"};var eo={};eo={dismiss:"Descartar"};var to={};to={dismiss:"Lõpeta"};var no={};no={dismiss:"Hylkää"};var ro={};ro={dismiss:"Rejeter"};var io={};io={dismiss:"התעלם"};var lo={};lo={dismiss:"Odbaci"};var oo={};oo={dismiss:"Elutasítás"};var ao={};ao={dismiss:"Ignora"};var so={};so={dismiss:"閉じる"};var uo={};uo={dismiss:"무시"};var co={};co={dismiss:"Atmesti"};var fo={};fo={dismiss:"Nerādīt"};var po={};po={dismiss:"Lukk"};var bo={};bo={dismiss:"Negeren"};var ho={};ho={dismiss:"Zignoruj"};var go={};go={dismiss:"Descartar"};var mo={};mo={dismiss:"Dispensar"};var vo={};vo={dismiss:"Revocare"};var yo={};yo={dismiss:"Пропустить"};var $o={};$o={dismiss:"Zrušiť"};var xo={};xo={dismiss:"Opusti"};var So={};So={dismiss:"Odbaci"};var Po={};Po={dismiss:"Avvisa"};var Eo={};Eo={dismiss:"Kapat"};var wo={};wo={dismiss:"Скасувати"};var Co={};Co={dismiss:"取消"};var To={};To={dismiss:"關閉"};var ko={};ko={"ar-AE":Gl,"bg-BG":ql,"cs-CZ":Yl,"da-DK":Zl,"de-DE":Xl,"el-GR":Jl,"en-US":Ql,"es-ES":eo,"et-EE":to,"fi-FI":no,"fr-FR":ro,"he-IL":io,"hr-HR":lo,"hu-HU":oo,"it-IT":ao,"ja-JP":so,"ko-KR":uo,"lt-LT":co,"lv-LV":fo,"nb-NO":po,"nl-NL":bo,"pl-PL":ho,"pt-BR":go,"pt-PT":mo,"ro-RO":vo,"ru-RU":yo,"sk-SK":$o,"sl-SI":xo,"sr-SP":So,"sv-SE":Po,"tr-TR":Eo,"uk-UA":wo,"zh-CN":Co,"zh-TW":To};function Cc(t){return t&&t.__esModule?t.default:t}function Di(t){let{onDismiss:e,...n}=t,r=br(Cc(ko),"@react-aria/overlays"),i=dl(n,r.format("dismiss")),l=()=>{e&&e()};return s.createElement(Hl,null,s.createElement("button",{...i,tabIndex:-1,onClick:l,style:{width:1,height:1}}))}let st=new WeakMap,le=[];function Tc(t,e=document.body){let n=new Set(t),r=new Set,i=u=>{for(let b of u.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(b);let d=b=>{if(n.has(b)||b.parentElement&&r.has(b.parentElement)&&b.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let p of n)if(b.contains(p))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:d}),f=d(u);if(f===NodeFilter.FILTER_ACCEPT&&l(u),f!==NodeFilter.FILTER_REJECT){let b=c.nextNode();for(;b!=null;)l(b),b=c.nextNode()}},l=u=>{var d;let c=(d=st.get(u))!==null&&d!==void 0?d:0;u.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&u.setAttribute("aria-hidden","true"),r.add(u),st.set(u,c+1))};le.length&&le[le.length-1].disconnect(),i(e);let o=new MutationObserver(u=>{for(let d of u)if(!(d.type!=="childList"||d.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(d.target))){for(let c of d.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(let c of d.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});o.observe(e,{childList:!0,subtree:!0});let a={visibleNodes:n,hiddenNodes:r,observe(){o.observe(e,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return le.push(a),()=>{o.disconnect();for(let u of r){let d=st.get(u);d!=null&&(d===1?(u.removeAttribute("aria-hidden"),st.delete(u)):st.set(u,d-1))}a===le[le.length-1]?(le.pop(),le.length&&le[le.length-1].observe()):le.splice(le.indexOf(a),1)}}function kc(t){let e=le[le.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}function Dc(t,e){let{triggerRef:n,popoverRef:r,groupRef:i,isNonModal:l,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a,...u}=t,d=u.trigger==="SubmenuTrigger",{overlayProps:c,underlayProps:f}=bc({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!l||d,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a},i??r),{overlayProps:b,arrowProps:p,placement:h}=_l({...u,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:l&&!d?e.close:null});return gc({isDisabled:l||!e.isOpen}),H(()=>{if(e.isOpen&&r.current){var v,y;return l?kc((v=i==null?void 0:i.current)!==null&&v!==void 0?v:r.current):Tc([(y=i==null?void 0:i.current)!==null&&y!==void 0?y:r.current])}},[l,e.isOpen,r,i]),{popoverProps:A(c,b),arrowProps:p,underlayProps:f,placement:h}}const Do=s.createContext(null);function Ri(t){let e=_e(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[i,l]=s.useState(!1),o=s.useMemo(()=>({contain:i,setContain:l}),[i,l]),{getContainer:a}=Ul();if(!t.portalContainer&&a&&(n=a()),!n)return null;let u=t.children;return t.disableFocusManagement||(u=s.createElement(Ll,{restoreFocus:!0,contain:(t.shouldContainFocus||i)&&!r},u)),u=s.createElement(Do.Provider,{value:o},s.createElement(dd,null,u)),je.createPortal(u,n)}function Rc(){let t=s.useContext(Do),e=t==null?void 0:t.setContain;H(()=>{e==null||e(!0)},[e])}const xr=new WeakMap;function Kc(t){return typeof t=="string"?t.replace(/\s*/g,""):""+t}function Lc(t,e){let n=xr.get(t);if(!n)throw new Error("Unknown list");return`${n.id}-option-${Kc(e)}`}function tr(t){return Tu()?t.altKey:t.ctrlKey}function Nt(t,e){var n,r;let i=`[data-key="${CSS.escape(String(e))}"]`,l=(n=t.current)===null||n===void 0?void 0:n.dataset.collection;return l&&(i=`[data-collection="${CSS.escape(l)}"]${i}`),(r=t.current)===null||r===void 0?void 0:r.querySelector(i)}const Ro=new WeakMap;function Fc(t){let e=te();return Ro.set(t,e),e}function Mc(t){return Ro.get(t)}const Ac=1e3;function Ko(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=s.useRef({search:"",timeout:void 0}).current,l=o=>{let a=Ic(o.key);if(!(!a||o.ctrlKey||o.metaKey||!o.currentTarget.contains(o.target))){if(a===" "&&i.search.trim().length>0&&(o.preventDefault(),"continuePropagation"in o||o.stopPropagation()),i.search+=a,e.getKeyForSearch!=null){let u=e.getKeyForSearch(i.search,n.focusedKey);u==null&&(u=e.getKeyForSearch(i.search)),u!=null&&(n.setFocusedKey(u),r&&r(u))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},Ac)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?l:void 0}}}function Ic(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Nc(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:l=!1,disallowEmptySelection:o=!1,disallowSelectAll:a=!1,escapeKeyBehavior:u="clearSelection",selectOnFocus:d=e.selectionBehavior==="replace",disallowTypeAhead:c=!1,shouldUseVirtualFocus:f,allowsTabNavigation:b=!1,isVirtualized:p,scrollRef:h=r,linkBehavior:v="action"}=t,{direction:y}=Ke(),$=Jt(),E=m=>{var k;if(m.altKey&&m.key==="Tab"&&m.preventDefault(),!(!((k=r.current)===null||k===void 0)&&k.contains(m.target)))return;const S=(I,Me)=>{if(I!=null){if(e.isLink(I)&&v==="selection"&&d&&!tr(m)){je.flushSync(()=>{e.setFocusedKey(I,Me)});let Ae=Nt(r,I),Jr=e.getItemProps(I);Ae&&$.open(Ae,m,Jr.href,Jr.routerOptions);return}if(e.setFocusedKey(I,Me),e.isLink(I)&&v==="override")return;m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(I):d&&!tr(m)&&e.replaceSelection(I)}};switch(m.key){case"ArrowDown":if(n.getKeyBelow){var O,Y,Z;let I=e.focusedKey!=null?(O=n.getKeyBelow)===null||O===void 0?void 0:O.call(n,e.focusedKey):(Y=n.getFirstKey)===null||Y===void 0?void 0:Y.call(n);I==null&&l&&(I=(Z=n.getFirstKey)===null||Z===void 0?void 0:Z.call(n,e.focusedKey)),I!=null&&(m.preventDefault(),S(I))}break;case"ArrowUp":if(n.getKeyAbove){var re,ge,Fe;let I=e.focusedKey!=null?(re=n.getKeyAbove)===null||re===void 0?void 0:re.call(n,e.focusedKey):(ge=n.getLastKey)===null||ge===void 0?void 0:ge.call(n);I==null&&l&&(I=(Fe=n.getLastKey)===null||Fe===void 0?void 0:Fe.call(n,e.focusedKey)),I!=null&&(m.preventDefault(),S(I))}break;case"ArrowLeft":if(n.getKeyLeftOf){var lt,kt,pn;let I=e.focusedKey!=null?(lt=n.getKeyLeftOf)===null||lt===void 0?void 0:lt.call(n,e.focusedKey):null;I==null&&l&&(I=y==="rtl"?(kt=n.getFirstKey)===null||kt===void 0?void 0:kt.call(n,e.focusedKey):(pn=n.getLastKey)===null||pn===void 0?void 0:pn.call(n,e.focusedKey)),I!=null&&(m.preventDefault(),S(I,y==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var bn,hn,gn;let I=e.focusedKey!=null?(bn=n.getKeyRightOf)===null||bn===void 0?void 0:bn.call(n,e.focusedKey):null;I==null&&l&&(I=y==="rtl"?(hn=n.getLastKey)===null||hn===void 0?void 0:hn.call(n,e.focusedKey):(gn=n.getFirstKey)===null||gn===void 0?void 0:gn.call(n,e.focusedKey)),I!=null&&(m.preventDefault(),S(I,y==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&m.shiftKey)return;m.preventDefault();let I=n.getFirstKey(e.focusedKey,Je(m));e.setFocusedKey(I),I!=null&&(Je(m)&&m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(I):d&&e.replaceSelection(I))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&m.shiftKey)return;m.preventDefault();let I=n.getLastKey(e.focusedKey,Je(m));e.setFocusedKey(I),I!=null&&(Je(m)&&m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(I):d&&e.replaceSelection(I))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let I=n.getKeyPageBelow(e.focusedKey);I!=null&&(m.preventDefault(),S(I))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let I=n.getKeyPageAbove(e.focusedKey);I!=null&&(m.preventDefault(),S(I))}break;case"a":Je(m)&&e.selectionMode==="multiple"&&a!==!0&&(m.preventDefault(),e.selectAll());break;case"Escape":u==="clearSelection"&&!o&&e.selectedKeys.size!==0&&(m.stopPropagation(),m.preventDefault(),e.clearSelection());break;case"Tab":if(!b){if(m.shiftKey)r.current.focus();else{let I=ue(r.current,{tabbable:!0}),Me,Ae;do Ae=I.lastChild(),Ae&&(Me=Ae);while(Ae);Me&&!Me.contains(document.activeElement)&&he(Me)}break}}},C=s.useRef({top:0,left:0});ct(h,"scroll",p?void 0:()=>{var m,k,S,O;C.current={top:(S=(m=h.current)===null||m===void 0?void 0:m.scrollTop)!==null&&S!==void 0?S:0,left:(O=(k=h.current)===null||k===void 0?void 0:k.scrollLeft)!==null&&O!==void 0?O:0}});let K=m=>{if(e.isFocused){m.currentTarget.contains(m.target)||e.setFocused(!1);return}if(m.currentTarget.contains(m.target)){if(e.setFocused(!0),e.focusedKey==null){var k,S;let Z=ge=>{ge!=null&&(e.setFocusedKey(ge),d&&!e.isSelected(ge)&&e.replaceSelection(ge))},re=m.relatedTarget;var O,Y;re&&m.currentTarget.compareDocumentPosition(re)&Node.DOCUMENT_POSITION_FOLLOWING?Z((O=e.lastSelectedKey)!==null&&O!==void 0?O:(k=n.getLastKey)===null||k===void 0?void 0:k.call(n)):Z((Y=e.firstSelectedKey)!==null&&Y!==void 0?Y:(S=n.getFirstKey)===null||S===void 0?void 0:S.call(n))}else!p&&h.current&&(h.current.scrollTop=C.current.top,h.current.scrollLeft=C.current.left);if(e.focusedKey!=null&&h.current){let Z=Nt(r,e.focusedKey);Z instanceof HTMLElement&&(!Z.contains(document.activeElement)&&!f&&he(Z),yt()==="keyboard"&&ni(Z,{containingElement:r.current}))}}},T=m=>{m.currentTarget.contains(m.relatedTarget)||e.setFocused(!1)},x=s.useRef(!1);ct(r,Ou,f?m=>{let{detail:k}=m;m.stopPropagation(),e.setFocused(!0),(k==null?void 0:k.focusStrategy)==="first"&&(x.current=!0)}:void 0);let M=J(()=>{var m,k;let S=(k=(m=n.getFirstKey)===null||m===void 0?void 0:m.call(n))!==null&&k!==void 0?k:null;S==null?(Al(r.current),e.collection.size>0&&(x.current=!1)):(e.setFocusedKey(S),x.current=!1)});ei(()=>{x.current&&M()},[e.collection,M]);let F=J(()=>{e.collection.size>0&&(x.current=!1)});ei(()=>{F()},[e.focusedKey,F]),ct(r,Bu,f?m=>{var k;m.stopPropagation(),e.setFocused(!1),!((k=m.detail)===null||k===void 0)&&k.clearFocusKey&&e.setFocusedKey(null)}:void 0);const N=s.useRef(i),L=s.useRef(!1);s.useEffect(()=>{if(N.current){var m,k;let Y=null;var S;i==="first"&&(Y=(S=(m=n.getFirstKey)===null||m===void 0?void 0:m.call(n))!==null&&S!==void 0?S:null);var O;i==="last"&&(Y=(O=(k=n.getLastKey)===null||k===void 0?void 0:k.call(n))!==null&&O!==void 0?O:null);let Z=e.selectedKeys;if(Z.size){for(let re of Z)if(e.canSelectItem(re)){Y=re;break}}e.setFocused(!0),e.setFocusedKey(Y),Y==null&&!f&&r.current&&De(r.current),e.collection.size>0&&(N.current=!1,L.current=!0)}});let g=s.useRef(e.focusedKey);s.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==g.current||L.current)&&h.current&&r.current){let m=yt(),k=Nt(r,e.focusedKey);if(!(k instanceof HTMLElement))return;(m==="keyboard"||L.current)&&(fl(h.current,k),m!=="virtual"&&ni(k,{containingElement:r.current}))}!f&&e.isFocused&&e.focusedKey==null&&g.current!=null&&r.current&&De(r.current),g.current=e.focusedKey,L.current=!1}),ct(r,"react-aria-focus-scope-restore",m=>{m.preventDefault(),e.setFocused(!0)});let R={onKeyDown:E,onFocus:K,onBlur:T,onMouseDown(m){h.current===m.target&&m.preventDefault()}},{typeSelectProps:B}=Ko({keyboardDelegate:n,selectionManager:e});c||(R=A(B,R));let D;f||(D=e.focusedKey==null?0:-1);let z=Fc(e.collection);return{collectionProps:A(R,{tabIndex:D,"data-collection":z})}}function Bc(t){let{id:e,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:l,shouldUseVirtualFocus:o,focus:a,isDisabled:u,onAction:d,allowsDifferentPressOrigin:c,linkBehavior:f="action"}=t,b=Jt();e=te(e);let p=S=>{if(S.pointerType==="keyboard"&&tr(S))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(f==="selection"&&i.current){let O=n.getItemProps(r);b.open(i.current,S,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):S&&S.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||S&&(Je(S)||S.pointerType==="touch"||S.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};s.useEffect(()=>{r===n.focusedKey&&n.isFocused&&(o?Al(i.current):a?a():document.activeElement!==i.current&&i.current&&De(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,o]),u=u||n.isDisabled(r);let h={};!o&&!u?h={tabIndex:r===n.focusedKey?0:-1,onFocus(S){S.target===i.current&&n.setFocusedKey(r)}}:u&&(h.onMouseDown=S=>{S.preventDefault()});let v=n.isLink(r)&&f==="override",y=n.isLink(r)&&f!=="selection"&&f!=="none",$=!u&&n.canSelectItem(r)&&!v,E=(d||y)&&!u,C=E&&(n.selectionBehavior==="replace"?!$:!$||n.isEmpty),K=E&&$&&n.selectionBehavior==="replace",T=C||K,x=s.useRef(null),M=T&&$,F=s.useRef(!1),N=s.useRef(!1),L=S=>{if(d&&d(),y&&i.current){let O=n.getItemProps(r);b.open(i.current,S,O.href,O.routerOptions)}},g={ref:i};l?(g.onPressStart=S=>{x.current=S.pointerType,F.current=M,S.pointerType==="keyboard"&&(!T||Li())&&p(S)},c?(g.onPressUp=C?void 0:S=>{S.pointerType==="mouse"&&$&&p(S)},g.onPress=C?L:S=>{S.pointerType!=="keyboard"&&S.pointerType!=="mouse"&&$&&p(S)}):g.onPress=S=>{if(C||K&&S.pointerType!=="mouse"){if(S.pointerType==="keyboard"&&!Ki())return;L(S)}else S.pointerType!=="keyboard"&&$&&p(S)}):(g.onPressStart=S=>{x.current=S.pointerType,F.current=M,N.current=C,$&&(S.pointerType==="mouse"&&!C||S.pointerType==="keyboard"&&(!E||Li()))&&p(S)},g.onPress=S=>{(S.pointerType==="touch"||S.pointerType==="pen"||S.pointerType==="virtual"||S.pointerType==="keyboard"&&T&&Ki()||S.pointerType==="mouse"&&N.current)&&(T?L(S):$&&p(S))}),h["data-collection"]=Mc(n.collection),h["data-key"]=r,g.preventFocusOnPress=o,o&&(g=A(g,{onPressStart(S){S.pointerType!=="touch"&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(S){S.pointerType==="touch"&&(n.setFocused(!0),n.setFocusedKey(r))}}));let{pressProps:R,isPressed:B}=He(g),D=K?S=>{x.current==="mouse"&&(S.stopPropagation(),S.preventDefault(),L(S))}:void 0,{longPressProps:z}=Tl({isDisabled:!M,onLongPress(S){S.pointerType==="touch"&&(p(S),n.setSelectionBehavior("toggle"))}}),m=S=>{x.current==="touch"&&F.current&&S.preventDefault()},k=n.isLink(r)?S=>{ze.isOpening||S.preventDefault()}:void 0;return{itemProps:A(h,$||C||o?R:{},M?z:{},{onDoubleClick:D,onDragStartCapture:m,onClick:k,id:e},o?{onMouseDown:S=>S.preventDefault()}:void 0),isPressed:B,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:u,allowsSelection:$,hasAction:T}}function Ki(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function Li(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class Fi{getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?Nt(this.ref,e):null;if(!r)return null;let i=n.getBoundingClientRect(),l=r.getBoundingClientRect();return{x:l.left-i.left+n.scrollLeft,y:l.top-i.top+n.scrollTop,width:l.width,height:l.height}}getContentSize(){let e=this.ref.current;var n,r;return{width:(n=e==null?void 0:e.scrollWidth)!==null&&n!==void 0?n:0,height:(r=e==null?void 0:e.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let e=this.ref.current;var n,r,i,l;return{x:(n=e==null?void 0:e.scrollLeft)!==null&&n!==void 0?n:0,y:(r=e==null?void 0:e.scrollTop)!==null&&r!==void 0?r:0,width:(i=e==null?void 0:e.offsetWidth)!==null&&i!==void 0?i:0,height:(l=e==null?void 0:e.offsetHeight)!==null&&l!==void 0?l:0}}constructor(e){this.ref=e}}class Sr{isDisabled(e){var n;return this.disabledBehavior==="all"&&(((n=e.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,n){let r=e;for(;r!=null;){let i=this.collection.getItem(r);if((i==null?void 0:i.type)==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(e){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(e){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(e,n,r){let i=e,l=this.layoutDelegate.getItemRect(i);if(!l||i==null)return null;let o=l;do{if(i=n(i),i==null)break;l=this.layoutDelegate.getItemRect(i)}while(l&&r(o,l)&&i!=null);return i}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){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,n){return n?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):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&&!gt(n))return this.getFirstKey();let i=e;if(this.orientation==="horizontal"){let l=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>l&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let l=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>l&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!gt(n))return this.getLastKey();let i=e;if(this.orientation==="horizontal"){let l=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<l&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let l=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<l&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let l=r.getItem(i);if(!l)return null;let o=l.textValue.slice(0,e.length);if(l.textValue&&this.collator.compare(o,e)===0)return i;i=this.getNextKey(i)}return null}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 Fi(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 Fi(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function Oc(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:i,keyboardDelegate:l,layoutDelegate:o}=t,a=hr({usage:"search",sensitivity:"base"}),u=e.disabledBehavior,d=s.useMemo(()=>l||new Sr({collection:n,disabledKeys:r,disabledBehavior:u,ref:i,collator:a,layoutDelegate:o}),[l,o,n,r,i,a,u]),{collectionProps:c}=Nc({...t,ref:i,selectionManager:e,keyboardDelegate:d});return{listProps:c}}function zc(t,e,n){let r=Q(t,{labelable:!0}),i=t.selectionBehavior||"toggle",l=t.linkBehavior||(i==="replace"?"action":"override");i==="toggle"&&l==="action"&&(l="override");let{listProps:o}=Oc({...t,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,linkBehavior:l}),{focusWithinProps:a}=tn({onFocusWithin:t.onFocus,onBlurWithin:t.onBlur,onFocusWithinChange:t.onFocusChange}),u=te(t.id);xr.set(e,{id:u,shouldUseVirtualFocus:t.shouldUseVirtualFocus,shouldSelectOnPressUp:t.shouldSelectOnPressUp,shouldFocusOnHover:t.shouldFocusOnHover,isVirtualized:t.isVirtualized,onAction:t.onAction,linkBehavior:l});let{labelProps:d,fieldProps:c}=yr({...t,id:u,labelElementType:"span"});return{labelProps:d,listBoxProps:A(r,a,e.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...A(c,o)})}}class Hc{build(e,n){return this.context=n,Mi(()=>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 i=0;for(let l of r)yield*this.getFullNode({value:l,index:i},{renderer:n}),i++}else{let i=[];s.Children.forEach(n,o=>{o&&i.push(o)});let l=0;for(let o of i){let a=this.getFullNode({element:o,index:l},{});for(let u of a)l++,yield u}}}getKey(e,n,r,i){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let l=n.value;if(l!=null){var o;let a=(o=l.key)!==null&&o!==void 0?o:l.id;if(a==null)throw new Error("No key found for item");return a}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,i){if(s.isValidElement(e.element)&&e.element.type===s.Fragment){let y=[];s.Children.forEach(e.element.props.children,E=>{y.push(E)});var l;let $=(l=e.index)!==null&&l!==void 0?l:0;for(const E of y)yield*this.getFullNode({element:E,index:$++},n,r,i);return}let o=e.element;if(!o&&e.value&&n&&n.renderer){let y=this.cache.get(e.value);if(y&&(!y.shouldInvalidate||!y.shouldInvalidate(this.context))){y.index=e.index,y.parentKey=i?i.key:null,yield y;return}o=n.renderer(e.value)}if(s.isValidElement(o)){let y=o.type;if(typeof y!="function"&&typeof y.getCollectionNode!="function"){let K=o.type;throw new Error(`Unknown element <${K}> in collection.`)}let $=y.getCollectionNode(o.props,this.context);var a;let E=(a=e.index)!==null&&a!==void 0?a:0,C=$.next();for(;!C.done&&C.value;){let K=C.value;e.index=E;var u;let T=(u=K.key)!==null&&u!==void 0?u:null;T==null&&(T=K.element?null:this.getKey(o,e,n,r));let M=[...this.getFullNode({...K,key:T,index:E,wrapper:Vc(e.wrapper,K.wrapper)},this.getChildState(n,K),r?`${r}${o.key}`:o.key,i)];for(let F of M){var d,c;F.value=(c=(d=K.value)!==null&&d!==void 0?d:e.value)!==null&&c!==void 0?c:null,F.value&&this.cache.set(F.value,F);var f;if(e.type&&F.type!==e.type)throw new Error(`Unsupported type <${Dn(F.type)}> in <${Dn((f=i==null?void 0:i.type)!==null&&f!==void 0?f:"unknown parent type")}>. Only <${Dn(e.type)}> is supported.`);E++,yield F}C=$.next(M)}return}if(e.key==null||e.type==null)return;let b=this;var p,h;let v={type:e.type,props:e.props,key:e.key,parentKey:i?i.key:null,value:(p=e.value)!==null&&p!==void 0?p:null,level:i?i.level+1:0,index:e.index,rendered:e.rendered,textValue:(h=e.textValue)!==null&&h!==void 0?h:"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Mi(function*(){if(!e.hasChildNodes||!e.childNodes)return;let y=0;for(let $ of e.childNodes()){$.key!=null&&($.key=`${v.key}${$.key}`);let E=b.getFullNode({...$,index:y},b.getChildState(n,$),v.key,v);for(let C of E)y++,yield C}})};yield v}constructor(){this.cache=new WeakMap}}function Mi(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 Vc(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Dn(t){return t[0].toUpperCase()+t.slice(1)}function jc(t,e,n){let r=s.useMemo(()=>new Hc,[]),{children:i,items:l,collection:o}=t;return s.useMemo(()=>{if(o)return o;let u=r.build({children:i,items:l},n);return e(u)},[r,i,l,o,n,e])}function Lo(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function _c(t){return Wc(t)}function Wc(t,e){for(let n of t)return n}function Rn(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Ai(t,e),e],i=[...Ai(t,n),n],l=r.slice(0,i.length).findIndex((o,a)=>o!==i[a]);return l!==-1?(e=r[l],n=i[l],e.index-n.index):r.findIndex(o=>o===n)>=0?1:(i.findIndex(o=>o===e)>=0,-1)}function Ai(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}const Ii=new WeakMap;function Uc(t){let e=Ii.get(t);if(e!=null)return e;let n=0,r=i=>{for(let l of i)l.type==="section"?r(Lo(l,t)):n++};return r(t),Ii.set(t,n),n}function Gc(t,e,n){var r,i;let{key:l}=t,o=xr.get(e);var a;let u=(a=t.isDisabled)!==null&&a!==void 0?a:e.selectionManager.isDisabled(l);var d;let c=(d=t.isSelected)!==null&&d!==void 0?d:e.selectionManager.isSelected(l);var f;let b=(f=t.shouldSelectOnPressUp)!==null&&f!==void 0?f:o==null?void 0:o.shouldSelectOnPressUp;var p;let h=(p=t.shouldFocusOnHover)!==null&&p!==void 0?p:o==null?void 0:o.shouldFocusOnHover;var v;let y=(v=t.shouldUseVirtualFocus)!==null&&v!==void 0?v:o==null?void 0:o.shouldUseVirtualFocus;var $;let E=($=t.isVirtualized)!==null&&$!==void 0?$:o==null?void 0:o.isVirtualized,C=ht(),K=ht(),T={role:"option","aria-disabled":u||void 0,"aria-selected":e.selectionManager.selectionMode!=="none"?c:void 0};ke()&&ar()||(T["aria-label"]=t["aria-label"],T["aria-labelledby"]=C,T["aria-describedby"]=K);let x=e.collection.getItem(l);if(E){let k=Number(x==null?void 0:x.index);T["aria-posinset"]=Number.isNaN(k)?void 0:k+1,T["aria-setsize"]=Uc(e.collection)}let M=o!=null&&o.onAction?()=>{var k;return o==null||(k=o.onAction)===null||k===void 0?void 0:k.call(o,l)}:void 0,F=Lc(e,l),{itemProps:N,isPressed:L,isFocused:g,hasAction:R,allowsSelection:B}=Bc({selectionManager:e.selectionManager,key:l,ref:n,shouldSelectOnPressUp:b,allowsDifferentPressOrigin:b&&h,isVirtualized:E,shouldUseVirtualFocus:y,isDisabled:u,onAction:M||!(x==null||(r=x.props)===null||r===void 0)&&r.onAction?Te(x==null||(i=x.props)===null||i===void 0?void 0:i.onAction,M):void 0,linkBehavior:o==null?void 0:o.linkBehavior,id:F}),{hoverProps:D}=Ue({isDisabled:u||!h,onHoverStart(){vt()||(e.selectionManager.setFocused(!0),e.selectionManager.setFocusedKey(l))}}),z=Q(x==null?void 0:x.props);delete z.id;let m=sl(x==null?void 0:x.props);return{optionProps:{...T,...A(z,N,D,m),id:F},labelProps:{id:C},descriptionProps:{id:K},isFocused:g,isFocusVisible:g&&e.selectionManager.isFocused&&vt(),isSelected:c,isDisabled:u,isPressed:L,allowsSelection:B,hasAction:R}}function qc(t){let{heading:e,"aria-label":n}=t,r=te();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}var Fo={};Fo={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Mo={};Mo={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Ao={};Ao={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Io={};Io={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var No={};No={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var Bo={};Bo={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var Oo={};Oo={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var zo={};zo={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Ho={};Ho={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Vo={};Vo={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var jo={};jo={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var _o={};_o={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Wo={};Wo={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Uo={};Uo={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Go={};Go={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var qo={};qo={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var Yo={};Yo={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Zo={};Zo={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Xo={};Xo={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Jo={};Jo={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Qo={};Qo={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var ea={};ea={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var ta={};ta={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var na={};na={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var ra={};ra={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var ia={};ia={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var la={};la={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var oa={};oa={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var aa={};aa={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var sa={};sa={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var ua={};ua={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var da={};da={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var ca={};ca={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var fa={};fa={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var pa={};pa={"ar-AE":Fo,"bg-BG":Mo,"cs-CZ":Ao,"da-DK":Io,"de-DE":No,"el-GR":Bo,"en-US":Oo,"es-ES":zo,"et-EE":Ho,"fi-FI":Vo,"fr-FR":jo,"he-IL":_o,"hr-HR":Wo,"hu-HU":Uo,"it-IT":Go,"ja-JP":qo,"ko-KR":Yo,"lt-LT":Zo,"lv-LV":Xo,"nb-NO":Jo,"nl-NL":Qo,"pl-PL":ea,"pt-BR":ta,"pt-PT":na,"ro-RO":ra,"ru-RU":ia,"sk-SK":la,"sl-SI":oa,"sr-SP":aa,"sv-SE":sa,"tr-TR":ua,"uk-UA":da,"zh-CN":ca,"zh-TW":fa};function Yc(t){return t&&t.__esModule?t.default:t}function Zc(t,e,n){let{type:r="menu",isDisabled:i,trigger:l="press"}=t,o=te(),{triggerProps:a,overlayProps:u}=Wl({type:r},e,n),d=p=>{if(!i&&!(l==="longPress"&&!p.altKey)&&n&&n.current)switch(p.key){case"Enter":case" ":if(l==="longPress")return;case"ArrowDown":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),e.toggle("last");break;default:"continuePropagation"in p&&p.continuePropagation()}},c=br(Yc(pa),"@react-aria/menu"),{longPressProps:f}=Tl({isDisabled:i||l!=="longPress",accessibilityDescription:c.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),b={preventFocusOnPress:!0,onPressStart(p){p.pointerType!=="touch"&&p.pointerType!=="keyboard"&&!i&&(he(p.target),e.open(p.pointerType==="virtual"?"first":null))},onPress(p){p.pointerType==="touch"&&!i&&(he(p.target),e.toggle())}};return delete a.onPress,{menuTriggerProps:{...a,...l==="press"?b:f,id:o,onKeyDown:d},menuProps:{...u,"aria-labelledby":o,autoFocus:e.focusStrategy||!0,onClose:e.close}}}function Xc(t,e){let{role:n="dialog"}=t,r=ht();r=t["aria-label"]?void 0:r;let i=s.useRef(!1);return s.useEffect(()=>{if(e.current&&!e.current.contains(document.activeElement)){De(e.current);let l=setTimeout(()=>{document.activeElement===e.current&&(i.current=!0,e.current&&(e.current.blur(),De(e.current)),i.current=!1)},500);return()=>{clearTimeout(l)}}},[e]),Rc(),{dialogProps:{...Q(t,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||r,onBlur:l=>{i.current&&l.stopPropagation()}},titleProps:{id:r}}}function Jc(t,e,n){let{isDisabled:r}=t,i=te(),l=te(),a=!_e()&&"onbeforematch"in document.body,u=s.useRef(null),d=s.useCallback(()=>{u.current=requestAnimationFrame(()=>{n.current&&n.current.setAttribute("hidden","until-found")}),je.flushSync(()=>{e.toggle()})},[n,e]);return ct(n,"beforematch",a?d:null),H(()=>{u.current&&cancelAnimationFrame(u.current),a&&n.current&&!r&&(e.isExpanded?n.current.removeAttribute("hidden"):n.current.setAttribute("hidden","until-found"))},[r,n,e.isExpanded,a]),s.useEffect(()=>()=>{u.current&&cancelAnimationFrame(u.current)},[]),{buttonProps:{id:i,"aria-expanded":e.isExpanded,"aria-controls":l,onPress:c=>{!r&&c.pointerType!=="keyboard"&&e.toggle()},isDisabled:r,onPressStart(c){c.pointerType==="keyboard"&&!r&&e.toggle()}},panelProps:{id:l,role:"group","aria-labelledby":i,"aria-hidden":!e.isExpanded,hidden:a?!0:!e.isExpanded}}}function Qc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var At={exports:{}},Kn={};/**
2
2
  * @license React
3
3
  * use-sync-external-store-shim.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Bo;function ef(){if(Bo)return Rr;Bo=1;var t=s;function e(f,v){return f===v&&(f!==0||1/f===1/v)||f!==f&&v!==v}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,o=t.useEffect,i=t.useLayoutEffect,l=t.useDebugValue;function a(f,v){var p=v(),b=n({inst:{value:p,getSnapshot:v}}),m=b[0].inst,y=b[1];return i(function(){m.value=p,m.getSnapshot=v,u(m)&&y({inst:m})},[f,p,v]),o(function(){return u(m)&&y({inst:m}),f(function(){u(m)&&y({inst:m})})},[f]),l(p),p}function u(f){var v=f.getSnapshot;f=f.value;try{var p=v();return!r(f,p)}catch{return!0}}function c(f,v){return v()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Rr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Rr}var Kr={};/**
9
+ */var Ni;function ef(){if(Ni)return Kn;Ni=1;var t=s;function e(f,b){return f===b&&(f!==0||1/f===1/b)||f!==f&&b!==b}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,l=t.useLayoutEffect,o=t.useDebugValue;function a(f,b){var p=b(),h=r({inst:{value:p,getSnapshot:b}}),v=h[0].inst,y=h[1];return l(function(){v.value=p,v.getSnapshot=b,u(v)&&y({inst:v})},[f,p,b]),i(function(){return u(v)&&y({inst:v}),f(function(){u(v)&&y({inst:v})})},[f]),o(p),p}function u(f){var b=f.getSnapshot;f=f.value;try{var p=b();return!n(f,p)}catch{return!0}}function d(f,b){return b()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return Kn.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:c,Kn}var Ln={};/**
10
10
  * @license React
11
11
  * use-sync-external-store-shim.development.js
12
12
  *
@@ -14,14 +14,14 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Oo;function tf(){return Oo||(Oo=1,process.env.NODE_ENV!=="production"&&function(){function t(p,b){return p===b&&(p!==0||1/p===1/b)||p!==p&&b!==b}function e(p,b){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 m=b();if(!f){var y=b();i(m,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}y=l({inst:{value:m,getSnapshot:b}});var $=y[0].inst,E=y[1];return u(function(){$.value=m,$.getSnapshot=b,r($)&&E({inst:$})},[p,m,b]),a(function(){return r($)&&E({inst:$}),p(function(){r($)&&E({inst:$})})},[p]),c(m),m}function r(p){var b=p.getSnapshot;p=p.value;try{var m=b();return!i(p,m)}catch{return!0}}function n(p,b){return b()}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,u=o.useLayoutEffect,c=o.useDebugValue,d=!1,f=!1,v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;Kr.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Kr}var zo;function rf(){return zo||(zo=1,process.env.NODE_ENV==="production"?At.exports=ef():At.exports=tf()),At.exports}var nf=rf();function of(t){let{value:e=0,minValue:r=0,maxValue:n=100,valueLabel:o,isIndeterminate:i,formatOptions:l={style:"percent"}}=t,a=Q(t,{labelable:!0}),{labelProps:u,fieldProps:c}=yn({...t,labelElementType:"span"});e=Ot(e,r,n);let d=(e-r)/(n-r),f=Kc(l);if(!i&&!o){let v=l.style==="percent"?d:e;o=f.format(v)}return{progressBarProps:A(a,{...c,"aria-valuenow":i?void 0:e,"aria-valuemin":r,"aria-valuemax":n,"aria-valuetext":i?void 0:o,role:"progressbar"}),labelProps:u}}const va=new WeakMap;function lf(t,e,r){let{keyboardDelegate:n,isDisabled:o,isRequired:i,name:l,validationBehavior:a="aria"}=t,u=bn({usage:"search",sensitivity:"base"}),c=s.useMemo(()=>n||new Sn(e.collection,e.disabledKeys,r,u),[n,e.collection,e.disabledKeys,u,r]),{menuTriggerProps:d,menuProps:f}=Zd({isDisabled:o,type:"listbox"},e,r),v=F=>{switch(F.key){case"ArrowLeft":{var N,L;F.preventDefault();let B=e.selectedKey!=null?(N=c.getKeyAbove)===null||N===void 0?void 0:N.call(c,e.selectedKey):(L=c.getFirstKey)===null||L===void 0?void 0:L.call(c);B&&e.setSelectedKey(B);break}case"ArrowRight":{var h,R;F.preventDefault();let B=e.selectedKey!=null?(h=c.getKeyBelow)===null||h===void 0?void 0:h.call(c,e.selectedKey):(R=c.getFirstKey)===null||R===void 0?void 0:R.call(c);B&&e.setSelectedKey(B);break}}},{typeSelectProps:p}=Kl({keyboardDelegate:c,selectionManager:e.selectionManager,onTypeSelect(F){e.setSelectedKey(F)}}),{isInvalid:b,validationErrors:m,validationDetails:y}=e.displayValidation,{labelProps:$,fieldProps:E,descriptionProps:C,errorMessageProps:K}=$n({...t,labelElementType:"span",isInvalid:b,errorMessage:t.errorMessage||m});p.onKeyDown=p.onKeyDownCapture,delete p.onKeyDownCapture;let T=Q(t,{labelable:!0}),x=A(p,d,E),M=te();return va.set(e,{isDisabled:o,isRequired:i,name:l,validationBehavior:a}),{labelProps:{...$,onClick:()=>{if(!t.isDisabled){var F;(F=r.current)===null||F===void 0||F.focus(),Ci("keyboard")}}},triggerProps:A(T,{...x,isDisabled:o,onKeyDown:Te(x.onKeyDown,v,t.onKeyDown),onKeyUp:t.onKeyUp,"aria-labelledby":[M,x["aria-labelledby"],x["aria-label"]&&!x["aria-labelledby"]?x.id:null].filter(Boolean).join(" "),onFocus(F){e.isFocused||(t.onFocus&&t.onFocus(F),t.onFocusChange&&t.onFocusChange(!0),e.setFocused(!0))},onBlur(F){e.isOpen||(t.onBlur&&t.onBlur(F),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))}}),valueProps:{id:M},menuProps:{...f,autoFocus:e.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:F=>{F.currentTarget.contains(F.relatedTarget)||(t.onBlur&&t.onBlur(F),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))},"aria-labelledby":[E["aria-labelledby"],x["aria-label"]&&!E["aria-labelledby"]?x.id:null].filter(Boolean).join(" ")},descriptionProps:C,errorMessageProps:K,isInvalid:b,validationErrors:m,validationDetails:y}}function af(t,e,r){let n=va.get(e)||{},{autoComplete:o,name:i=n.name,isDisabled:l=n.isDisabled}=t,{validationBehavior:a,isRequired:u}=n,{visuallyHiddenProps:c}=Hi();cn(t.selectRef,e.selectedKey,e.setSelectedKey),mn({validationBehavior:a,focus:()=>{var f;return(f=r.current)===null||f===void 0?void 0:f.focus()}},e,t.selectRef);var d;return{containerProps:{...c,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:o,disabled:l,required:a==="native"&&u,name:i,value:(d=e.selectedKey)!==null&&d!==void 0?d:void 0,onChange:f=>e.setSelectedKey(f.target.value)}}}function sf(t){let{state:e,triggerRef:r,label:n,name:o,isDisabled:i}=t,l=s.useRef(null),{containerProps:a,selectProps:u}=af({...t,selectRef:l},e,r);var c;return e.collection.size<=300?s.createElement("div",{...a,"data-testid":"hidden-select-container"},s.createElement("label",null,n,s.createElement("select",{...u,ref:l},s.createElement("option",null),[...e.collection.getKeys()].map(d=>{let f=e.collection.getItem(d);if(f&&f.type==="item")return s.createElement("option",{key:f.key,value:f.key},f.textValue)})))):o?s.createElement("input",{type:"hidden",autoComplete:u.autoComplete,name:o,disabled:i,value:(c=e.selectedKey)!==null&&c!==void 0?c:""}):null}function uf(t,e){let r=Q(t,{labelable:!0}),{hoverProps:n}=Ue({onHoverStart:()=>e==null?void 0:e.open(!0),onHoverEnd:()=>e==null?void 0:e.close()});return{tooltipProps:A(r,n,{role:"tooltip"})}}function cf(t,e,r){let{isDisabled:n,trigger:o}=t,i=te(),l=s.useRef(!1),a=s.useRef(!1),u=()=>{(l.current||a.current)&&e.open(a.current)},c=$=>{!l.current&&!a.current&&e.close($)};s.useEffect(()=>{let $=E=>{r&&r.current&&E.key==="Escape"&&(E.stopPropagation(),e.close(!0))};if(e.isOpen)return document.addEventListener("keydown",$,!0),()=>{document.removeEventListener("keydown",$,!0)}},[r,e]);let d=()=>{o!=="focus"&&(yt()==="pointer"?l.current=!0:l.current=!1,u())},f=()=>{o!=="focus"&&(a.current=!1,l.current=!1,c())},v=()=>{a.current=!1,l.current=!1,c(!0)},p=()=>{mt()&&(a.current=!0,u())},b=()=>{a.current=!1,l.current=!1,c(!0)},{hoverProps:m}=Ue({isDisabled:n,onHoverStart:d,onHoverEnd:f}),{focusableProps:y}=ot({isDisabled:n,onFocus:p,onBlur:b},r);return{triggerProps:{"aria-describedby":e.isOpen?i:void 0,...A(y,m,{onPointerDown:v,onKeyDown:v,tabIndex:void 0})},tooltipProps:{id:i}}}const Be=w.defineRecipe({className:"nimbus-button",base:{borderRadius:"200",display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",borderWidth:"1px",borderColor:"transparent",cursor:"button",flexShrink:"0",outline:"0",lineHeight:"1.2",isolation:"isolate",fontWeight:"500",transitionProperty:"common",transitionDuration:"moderate",focusVisibleRing:"outside",_disabled:{layerStyle:"disabled"},_icon:{flexShrink:"0"}},variants:{size:{"2xs":{h:"600",minW:"600",fontSize:"300",fontWeight:"500",lineHeight:"400",px:"200",gap:"100",_icon:{width:"400",height:"400"}},xs:{h:"800",minW:"800",fontSize:"350",fontWeight:"500",lineHeight:"400",px:"300",gap:"100",_icon:{width:"500",height:"500"}},md:{h:"1000",minW:"1000",fontSize:"400",lineHeight:"500",px:"400",gap:"200",_icon:{width:"600",height:"600"}}},variant:{solid:{bg:"colorPalette.9",color:"colorPalette.contrast",_hover:{bg:"colorPalette.10"},_expanded:{bg:"colorPalette.10"}},subtle:{bg:"colorPalette.3",color:"colorPalette.11",_hover:{bg:"colorPalette.4"},_expanded:{bg:"colorPalette.4"}},outline:{borderWidth:"1px",borderColor:"colorPalette.7",color:"colorPalette.11",transitionProperty:"background-color, border-color, color",transitionDuration:"moderate",_hover:{bg:"colorPalette.3",borderColor:"colorPalette.8"},_expanded:{bg:"colorPalette.subtle"}},ghost:{color:"colorPalette.11",_hover:{bg:"colorPalette.4"},_expanded:{bg:"colorPalette.4"}},link:{color:"colorPalette.11",_hover:{textDecoration:"underline"}}},tone:{primary:{colorPalette:"primary"},critical:{colorPalette:"critical"},neutral:{colorPalette:"neutral"},info:{colorPalette:"info"}}},defaultVariants:{size:"md",variant:"subtle"}});function df(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var ff=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,pf=df(function(t){return ff.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});const{withContext:vf}=w.createRecipeContext({recipe:Be}),bf=vf("button",{defaultProps:{type:"button"},shouldForwardProp(t,e){const r=!(e!=null&&e.includes(t))&&!w.defaultSystem.isValidProperty(t);return pf(t)&&r&&!t.includes("onPress")}}),or=s.forwardRef((t,e)=>{const{as:r,asChild:n,children:o,...i}=t,l=s.useRef(null),a=de(w.mergeRefs(l,e)),u=r||(n?"a":"button")||"button",{buttonProps:c}=nr({...i,elementType:u},a);return P.jsx(bf,{...A(i,c,{as:r,asChild:n,ref:a}),children:o})});or.displayName="Button";const hf=s.forwardRef(function(e,r){const{children:n,portalled:o=!0,portalRef:i,backdrop:l=!0,...a}=e;return P.jsxs(w.Portal,{disabled:!o,container:i,children:[l&&P.jsx(w.Dialog.Backdrop,{}),P.jsx(w.Dialog.Positioner,{children:P.jsx(w.Dialog.Content,{ref:r,...a,asChild:!1,children:n})})]})}),gf=s.forwardRef(function(e,r){return P.jsx(w.Dialog.CloseTrigger,{position:"absolute",top:"2",insetEnd:"2",...e,asChild:!0,children:P.jsx(or,{size:"xs",ref:r,children:e.children})})}),mf=w.Dialog.Root,yf=w.Dialog.Footer,$f=w.Dialog.Header,xf=w.Dialog.Body,Sf=w.Dialog.Backdrop,Pf=w.Dialog.Title,Ef=w.Dialog.Description,wf=w.Dialog.Trigger,Cf=w.Dialog.ActionTrigger,xt=s.forwardRef(({children:t,...e},r)=>P.jsx(or,{px:0,py:0,ref:r,...e,children:t}));xt.displayName="IconButton";const ba=w.defineRecipe({className:"nimbus-link",base:{display:"inline-flex",alignItems:"center",color:"colorPalette.11",borderRadius:"100",focusVisibleRing:"outside",bg:"transparent",outline:"none",cursor:"pointer",textDecoration:"underline",textUnderlineOffset:"3px",_hover:{textDecorationThickness:"12%"}},variants:{size:{xs:{fontSize:"300",lineHeight:"450"},sm:{fontSize:"350",lineHeight:"500"},md:{fontSize:"400",lineHeight:"600"}},fontColor:{primary:{color:"primary"},inherit:{color:"inherit"}}}}),{withContext:Tf}=w.createRecipeContext({recipe:ba}),kf=Tf("a"),ha=s.forwardRef((t,e)=>{const{as:r,asChild:n,children:o,...i}=t,l=s.useRef(null),a=de(w.mergeRefs(l,e)),u=r||(n?"span":"a")||"a",{linkProps:c}=vc({...i,elementType:u},a);return P.jsx(kf,{...A(i,c,{as:r,asChild:n,ref:a}),children:o})});ha.displayName="Link";const Df=t=>P.jsx(w.List.Root,{...t}),Rf=t=>P.jsx(w.List.Item,{...t}),ga=s.forwardRef((t,e)=>P.jsx(w.SimpleGrid,{ref:e,...t}));ga.displayName="SimpleGrid";const Kf=Object.assign(ga,{Item:w.GridItem}),Lf=t=>P.jsx(w.Table.Root,{...t}),Ff=t=>P.jsx(w.Table.ColumnGroup,{...t}),Mf=t=>P.jsx(w.Table.Column,{...t}),Af=t=>P.jsx(w.Table.Header,{...t}),If=t=>P.jsx(w.Table.Footer,{...t}),Nf=t=>P.jsx(w.Table.Row,{...t}),Bf=t=>P.jsx(w.Table.Cell,{...t}),Of=t=>P.jsx(w.Table.Body,{...t}),zf=t=>P.jsx(w.Table.ColumnHeader,{...t}),ma=s.forwardRef((t,e)=>P.jsx(w.Text,{ref:e,...t}));ma.displayName="Text";s.createContext(null);s.createContext(null);s.createContext(null);s.createContext(null);s.createContext(null);const Hf=s.createContext({}),Gt=Symbol("default");function Ge({values:t,children:e}){for(let[r,n]of t)e=s.createElement(r.Provider,{value:n},e);return e}function ae(t){let{className:e,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:l,values:a}=t;return s.useMemo(()=>{let u,c,d;return typeof e=="function"?u=e({...a,defaultClassName:o}):u=e,typeof r=="function"?c=r({...a,defaultStyle:l||{}}):c=r,typeof n=="function"?d=n({...a,defaultChildren:i}):n==null?d=i:d=n,{className:u??o,style:c||l?{...l,...c}:void 0,children:d??i,"data-rac":""}},[e,r,n,o,i,l,a])}function ir(t,e){let r=s.useContext(t);if(e===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let n=e||Gt;if(!r.slots[n]){let o=new Intl.ListFormat().format(Object.keys(r.slots).map(l=>`"${l}"`)),i=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${i} Valid slot names are ${o}.`)}return r.slots[n]}return r}function ce(t,e,r){let n=ir(r,t.slot)||{},{ref:o,...i}=n,l=de(s.useMemo(()=>li(e,o),[e,o])),a=A(i,t);return"style"in i&&i.style&&"style"in t&&t.style&&(typeof i.style=="function"||typeof t.style=="function"?a.style=u=>{let c=typeof i.style=="function"?i.style(u):i.style,d={...u.defaultStyle,...c},f=typeof t.style=="function"?t.style({...u,defaultStyle:d}):t.style;return{...d,...f}}:a.style={...i.style,...t.style}),[a,l]}function Pn(t=!0){let[e,r]=s.useState(t),n=s.useRef(!1),o=s.useCallback(i=>{n.current=!0,r(!!i)},[]);return H(()=>{n.current||r(!1)},[]),[o,e]}function ya(t){const e=/^(data-.*)$/;let r={};for(const n in t)e.test(n)||(r[n]=t[n]);return r}class En{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new En(this.type,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}constructor(e,r){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=e,this.key=r}}class wn{get size(){return this.keyMap.size}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 r=this.keyMap;return{*[Symbol.iterator](){let n=r.get(e),o=(n==null?void 0:n.firstChildKey)!=null?r.get(n.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?r.get(o.nextKey):void 0}}}getKeyBefore(e){let r=this.keyMap.get(e);if(!r)return null;if(r.prevKey!=null){for(r=this.keyMap.get(r.prevKey);r&&r.type!=="item"&&r.lastChildKey!=null;)r=this.keyMap.get(r.lastChildKey);var n;return(n=r==null?void 0:r.key)!==null&&n!==void 0?n:null}return r.parentKey}getKeyAfter(e){let r=this.keyMap.get(e);if(!r)return null;if(r.type!=="item"&&r.firstChildKey!=null)return r.firstChildKey;for(;r;){if(r.nextKey!=null)return r.nextKey;if(r.parentKey!=null)r=this.keyMap.get(r.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);var r;return(r=e==null?void 0:e.key)!==null&&r!==void 0?r:null}getItem(e){var r;return(r=this.keyMap.get(e))!==null&&r!==void 0?r:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,r=new e;return r.keyMap=new Map(this.keyMap),r.firstKey=this.firstKey,r.lastKey=this.lastKey,r}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,r,n=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=r,this.frozen=!n}UNSTABLE_filter(e){let r=new wn,n=null;for(let o of this)if(o.type==="section"&&o.hasChildNodes){let i=o.clone(),l=null;for(let a of this.getChildren(o.key))if(Ho(a,e,this,r)){let u=a.clone();l==null&&(i.firstChildKey=u.key),r.firstKey==null&&(r.firstKey=i.key),l&&l.parentKey===u.parentKey?(l.nextKey=u.key,u.prevKey=l.key):u.prevKey=null,u.nextKey=null,r.addNode(u),l=u}l&&(l.type!=="header"?(i.lastChildKey=l.key,n==null?i.prevKey=null:(n.type==="section"||n.type==="separator")&&(n.nextKey=i.key,i.prevKey=n.key),i.nextKey=null,n=i,r.addNode(i)):(r.firstKey===i.key&&(r.firstKey=null),r.removeNode(l.key)))}else if(o.type==="separator"){let i=o.clone();i.nextKey=null,(n==null?void 0:n.type)==="section"&&(n.nextKey=i.key,i.prevKey=n.key,n=i,r.addNode(i))}else{let i=o.clone();Ho(i,e,this,r)&&(r.firstKey==null&&(r.firstKey=i.key),n!=null&&n.type!=="section"&&n.type!=="separator"&&n.parentKey===i.parentKey?(n.nextKey=i.key,i.prevKey=n.key):i.prevKey=null,i.nextKey=null,r.addNode(i),n=i)}if((n==null?void 0:n.type)==="separator"&&n.nextKey===null){let o;n.prevKey!=null&&(o=r.getItem(n.prevKey),o.nextKey=null),r.removeNode(n.key),n=o}return r.lastKey=(n==null?void 0:n.key)||null,r}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function Ho(t,e,r,n){if(t.type==="subdialogtrigger"||t.type==="submenutrigger"){let o=[...r.getChildren(t.key)][0];if(o&&e(o.textValue)){let i=o.clone();return n.addNode(i),!0}else return!1}else return t.type==="header"?!0:e(t.textValue)}class $a{*[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||e===void 0?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e)}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.ownerDocument.queueUpdate()}insertBefore(e,r){if(r==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=r,e.previousSibling=r.previousSibling,e.index=r.index,this.firstChild===r?this.firstChild=e:r.previousSibling&&(r.previousSibling.nextSibling=e),r.previousSibling=e,e.parentNode=r.parentNode,this.invalidateChildIndices(r),this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(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.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}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}}class nt extends $a{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof nt?this.parentNode.level+(this.node.type==="item"?1:0):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var e,r,n;let o=this.nextVisibleSibling,i=this.getMutableNode();i.index=this.index,i.level=this.level,i.parentKey=this.parentNode instanceof nt?this.parentNode.node.key:null;var l;i.prevKey=(l=(e=this.previousVisibleSibling)===null||e===void 0?void 0:e.node.key)!==null&&l!==void 0?l:null;var a;i.nextKey=(a=o==null?void 0:o.node.key)!==null&&a!==void 0?a:null,i.hasChildNodes=!!this.firstChild;var u;i.firstChildKey=(u=(r=this.firstVisibleChild)===null||r===void 0?void 0:r.node.key)!==null&&u!==void 0?u:null;var c;if(i.lastChildKey=(c=(n=this.lastVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&c!==void 0?c:null,(i.colSpan!=null||i.colIndex!=null)&&o){var d,f;let v=((d=i.colIndex)!==null&&d!==void 0?d:i.index)+((f=i.colSpan)!==null&&f!==void 0?f:1);if(v!==o.node.colIndex){let p=o.getMutableNode();p.colIndex=v}}}setProps(e,r,n,o){let i=this.getMutableNode(),{value:l,textValue:a,id:u,...c}=e;if(c.ref=r,i.props=c,i.rendered=n,i.render=o,i.value=l,i.textValue=a||(typeof c.children=="string"?c.children:"")||e["aria-label"]||"",u!=null&&u!==i.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");i.key=u}c.colSpan!=null&&(i.colSpan=c.colSpan),this.hasSetProps=!0,this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(r){let n=r==="none";if(e.isHidden!==n){var o,i;(((o=e.parentNode)===null||o===void 0?void 0:o.firstVisibleChild)===e||((i=e.parentNode)===null||i===void 0?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=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,r){super(r),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new En(e,`react-aria-${++r.nodeId}`)}}class Vf extends $a{get isConnected(){return this.isMounted}createElement(e){return new nt(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden)return;let r=this.getMutableCollection();if(!r.getItem(e.node.key))for(let n of e)this.addNode(n);r.addNode(e.node)}removeNode(e){for(let n of e)this.removeNode(n);this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let i of this.dirtyNodes)i instanceof nt&&(!i.isConnected||i.isHidden)?this.removeNode(i):i.updateChildIndices();for(let i of this.dirtyNodes)i instanceof nt&&(i.isConnected&&!i.isHidden&&(i.updateNode(),this.addNode(i)),i.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,r,n,o;this.nextCollection.commit((n=(e=this.firstVisibleChild)===null||e===void 0?void 0:e.node.key)!==null&&n!==void 0?n:null,(o=(r=this.lastVisibleChild)===null||r===void 0?void 0:r.node.key)!==null&&o!==void 0?o: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;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)}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.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}}function xa(t){let{children:e,items:r,idScope:n,addIdAndValue:o,dependencies:i=[]}=t,l=s.useMemo(()=>new WeakMap,i);return s.useMemo(()=>{if(r&&typeof e=="function"){let c=[];for(let d of r){let f=l.get(d);if(!f){f=e(d);var a,u;let v=(u=(a=f.props.id)!==null&&a!==void 0?a:d.key)!==null&&u!==void 0?u:d.id;if(v==null)throw new Error("Could not determine key for item");n&&(v=n+":"+v),f=s.cloneElement(f,o?{key:v,id:v,value:d}:{key:v}),l.set(d,f)}c.push(f)}return c}else if(typeof e!="function")return e},[e,r,l,n,o])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const qt=s.createContext(!1);function jf(t){if(s.useContext(qt))return s.createElement(s.Fragment,null,t.children);let r=s.createElement(qt.Provider,{value:!0},t.children);return s.createElement("template",{"data-react-aria-hidden":!0},r)}function Cn(t){let e=(r,n)=>s.useContext(qt)?null:t(r,n);return e.displayName=t.displayName||t.name,s.forwardRef(e)}function _f(){return s.useContext(qt)}const Sa=s.createContext(!1),$t=s.createContext(null);function Pa(t){if(s.useContext($t))return t.content;let{collection:r,document:n}=qf(t.createCollection);return s.createElement(s.Fragment,null,s.createElement(jf,null,s.createElement($t.Provider,{value:n},t.content)),s.createElement(Wf,{render:t.children,collection:r}))}function Wf({collection:t,render:e}){return e(t)}function Uf(t,e,r){let n=_e(),o=s.useRef(n);o.current=n;let i=s.useCallback(()=>o.current?r():e(),[e,r]);return nf.useSyncExternalStore(t,i)}const Gf=typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore:Uf;function qf(t){let[e]=s.useState(()=>new Vf((t==null?void 0:t())||new wn)),r=s.useCallback(l=>e.subscribe(l),[e]),n=s.useCallback(()=>{let l=e.getCollection();return e.isSSR&&e.resetAfterSSR(),l},[e]),o=s.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),i=Gf(r,n,o);return H(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:i,document:e}}const tn=s.createContext(null);function Ea(t,e,r,n,o,i){let l=s.useCallback(u=>{u==null||u.setProps(e,r,n,i)},[e,r,n,i]),a=s.useContext(tn);if(a){let u=a.ownerDocument.nodesByProps.get(e);return u||(u=a.ownerDocument.createElement(t),u.setProps(e,r,n,i),a.appendChild(u),a.ownerDocument.updateCollection(),a.ownerDocument.nodesByProps.set(e,u)),o?s.createElement(tn.Provider,{value:u},o):null}return s.createElement(t,{ref:l},o)}function wa(t,e){let r=({node:o})=>e(o.props,o.props.ref,o),n=s.forwardRef((o,i)=>{let l=s.useContext(Vt);if(!s.useContext(Sa)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(o,i)}return Ea(t,o,i,"children"in o?o.children:null,null,u=>s.createElement(Vt.Provider,{value:l},s.createElement(r,{node:u})))});return n.displayName=e.name,n}function Yf(t,e,r=Ca){let n=({node:i})=>e(i.props,i.props.ref,i),o=s.forwardRef((i,l)=>{let a=r(i);var u;return(u=Ea(t,i,l,null,a,c=>s.createElement(n,{node:c})))!==null&&u!==void 0?u:s.createElement(s.Fragment,null)});return o.displayName=e.name,o}function Ca(t){return xa({...t,addIdAndValue:!0})}const Vo=s.createContext(null);function Ta(t){let e=s.useContext(Vo),r=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),n=t.idScope||(e==null?void 0:e.idScope),o=Ca({...t,idScope:n,dependencies:r});return s.useContext($t)&&(o=s.createElement(Zf,null,o)),e=s.useMemo(()=>({dependencies:r,idScope:n}),[n,...r]),s.createElement(Vo.Provider,{value:e},o)}function Zf({children:t}){let e=s.useContext($t),r=s.useMemo(()=>s.createElement($t.Provider,{value:null},s.createElement(Sa.Provider,{value:!0},t)),[t]);return _e()?s.createElement(tn.Provider,{value:e},r):je.createPortal(r,e)}const rn=s.createContext({});let Xf=t=>{let{onHoverStart:e,onHoverChange:r,onHoverEnd:n,...o}=t;return o};const Jf=Cn(function(e,r){[e,r]=ce(e,r,rn);let{hoverProps:n,isHovered:o}=Ue(e),{isFocused:i,isFocusVisible:l,focusProps:a}=Le({isTextInput:!0,autoFocus:e.autoFocus}),u=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",c=ae({...e,values:{isHovered:o,isFocused:i,isFocusVisible:l,isDisabled:e.disabled||!1,isInvalid:u},defaultClassName:"react-aria-Input"});return s.createElement("input",{...A(Xf(e),a,n),...c,ref:r,"data-focused":i||void 0,"data-disabled":e.disabled||void 0,"data-hovered":o||void 0,"data-focus-visible":l||void 0,"data-invalid":u||void 0})}),ka=s.createContext({}),Qf=s.createContext(null),ep=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),Tn=s.createContext({}),tp=Cn(function(e,r){[e,r]=ce(e,r,Tn),e=rp(e);let n=e,{isPending:o}=n,{buttonProps:i,isPressed:l}=nr(e,r),{focusProps:a,isFocused:u,isFocusVisible:c}=Le(e),{hoverProps:d,isHovered:f}=Ue({...e,isDisabled:e.isDisabled||o}),v={isHovered:f,isPressed:(n.isPressed||l)&&!o,isFocused:u,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:o??!1},p=ae({...e,values:v,defaultClassName:"react-aria-Button"}),b=te(i.id),m=te(),y=i["aria-labelledby"];o&&(y?y=`${y} ${m}`:i["aria-label"]&&(y=`${b} ${m}`));let $=s.useRef(o);return s.useEffect(()=>{let E={"aria-labelledby":y||b};(!$.current&&u&&o||$.current&&u&&!o)&&$o(E,"assertive"),$.current=o},[o,u,y,b]),s.createElement("button",{...Q(e,{propNames:ep}),...A(i,a,d),...p,type:i.type==="submit"&&o?"button":i.type,id:b,ref:r,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":v.isPressed||void 0,"data-hovered":f||void 0,"data-focused":u||void 0,"data-pending":o||void 0,"data-focus-visible":c||void 0},s.createElement(Qf.Provider,{value:{id:m}},p.children))});function rp(t){return t.isPending&&(t.onPress=void 0,t.onPressStart=void 0,t.onPressEnd=void 0,t.onPressChange=void 0,t.onPressUp=void 0,t.onKeyDown=void 0,t.onKeyUp=void 0,t.onClick=void 0,t.href=void 0),t}const lr=s.createContext({}),Da=s.createContext(null);class jo{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let r=this.keyMap.get(e);var n;return r&&(n=r.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(e){let r=this.keyMap.get(e);var n;return r&&(n=r.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var r;return(r=this.keyMap.get(e))!==null&&r!==void 0?r:null}at(e){const r=[...this.getKeys()];return this.getItem(r[e])}getChildren(e){let r=this.keyMap.get(e);return(r==null?void 0:r.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let r=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let a of l.childNodes)r(a)};for(let l of e)r(l);let n=null,o=0;for(let[l,a]of this.keyMap)n?(n.nextKey=l,a.prevKey=n.key):(this.firstKey=l,a.prevKey=void 0),a.type==="item"&&(a.index=o++),n=a,n.nextKey=void 0;var i;this.lastKey=(i=n==null?void 0:n.key)!==null&&i!==void 0?i:null}}class ve extends Set{constructor(e,r,n){super(e),e instanceof ve?(this.anchorKey=r??e.anchorKey,this.currentKey=n??e.currentKey):(this.anchorKey=r??null,this.currentKey=n??null)}}function np(t,e){if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0}function op(t){let{selectionMode:e="none",disallowEmptySelection:r=!1,allowDuplicateSelectionEvents:n,selectionBehavior:o="toggle",disabledBehavior:i="all"}=t,l=s.useRef(!1),[,a]=s.useState(!1),u=s.useRef(null),c=s.useRef(null),[,d]=s.useState(null),f=s.useMemo(()=>_o(t.selectedKeys),[t.selectedKeys]),v=s.useMemo(()=>_o(t.defaultSelectedKeys,new ve),[t.defaultSelectedKeys]),[p,b]=Re(f,v,t.onSelectionChange),m=s.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[y,$]=s.useState(o);o==="replace"&&y==="toggle"&&typeof p=="object"&&p.size===0&&$("replace");let E=s.useRef(o);return s.useEffect(()=>{o!==E.current&&($(o),E.current=o)},[o]),{selectionMode:e,disallowEmptySelection:r,selectionBehavior:y,setSelectionBehavior:$,get isFocused(){return l.current},setFocused(C){l.current=C,a(C)},get focusedKey(){return u.current},get childFocusStrategy(){return c.current},setFocusedKey(C,K="first"){u.current=C,c.current=K,d(C)},selectedKeys:p,setSelectedKeys(C){(n||!np(C,p))&&b(C)},disabledKeys:m,disabledBehavior:i}}function _o(t,e){return t?t==="all"?"all":new ve(t):e}class kn{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,r){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,r)}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 r=this.getKey(e);return r==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(r):this.state.selectedKeys.has(r)}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(),r=this.state.selectedKeys;return this._isSelectAll=e.every(n=>r.has(n)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let o=this.collection.getItem(n);(!e||o&&Dr(this.collection,o,e)<0)&&(e=o)}var r;return(r=e==null?void 0:e.key)!==null&&r!==void 0?r:null}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let o=this.collection.getItem(n);(!e||o&&Dr(this.collection,o,e)>0)&&(e=o)}var r;return(r=e==null?void 0:e.key)!==null&&r!==void 0?r: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 r=this.getKey(e);if(r==null)return;let n;if(this.state.selectedKeys==="all")n=new ve([r],r,r);else{let l=this.state.selectedKeys;var o;let a=(o=l.anchorKey)!==null&&o!==void 0?o:r;n=new ve(l,a,r);var i;for(let u of this.getKeyRange(a,(i=l.currentKey)!==null&&i!==void 0?i:r))n.delete(u);for(let u of this.getKeyRange(r,a))this.canSelectItem(u)&&n.add(u)}this.state.setSelectedKeys(n)}getKeyRange(e,r){let n=this.collection.getItem(e),o=this.collection.getItem(r);return n&&o?Dr(this.collection,n,o)<=0?this.getKeyRangeInternal(e,r):this.getKeyRangeInternal(r,e):[]}getKeyRangeInternal(e,r){var n;if(!((n=this.layoutDelegate)===null||n===void 0)&&n.getKeyRange)return this.layoutDelegate.getKeyRange(e,r);let o=[],i=e;for(;i!=null;){let l=this.collection.getItem(i);if(l&&(l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&o.push(i),i===r)return o;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let r=this.collection.getItem(e);if(!r||r.type==="cell"&&this.allowsCellSelection)return e;for(;r&&r.type!=="item"&&r.parentKey!=null;)r=this.collection.getItem(r.parentKey);return!r||r.type!=="item"?null:r.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let r=this.getKey(e);if(r==null)return;let n=new ve(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(r)?n.delete(r):this.canSelectItem(r)&&(n.add(r),n.anchorKey=r,n.currentKey=r),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode==="none")return;let r=this.getKey(e);if(r==null)return;let n=this.canSelectItem(r)?new ve([r],r,r):new ve;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode==="none")return;let r=new ve;for(let n of e){let o=this.getKey(n);if(o!=null&&(r.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(r)}getSelectAllKeys(){let e=[],r=n=>{for(;n!=null;){if(this.canSelectItem(n)){var o;let l=this.collection.getItem(n);(l==null?void 0:l.type)==="item"&&e.push(n);var i;l!=null&&l.hasChildNodes&&(this.allowsCellSelection||l.type!=="item")&&r((i=(o=_d(Ll(l,this.collection)))===null||o===void 0?void 0:o.key)!==null&&i!==void 0?i:null)}n=this.collection.getKeyAfter(n)}};return r(this.collection.getFirstKey()),e}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 ve)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,r){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||r&&(r.pointerType==="touch"||r.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let r=this.selectedKeys;if(e.size!==r.size)return!1;for(let n of e)if(!r.has(n))return!1;for(let n of r)if(!e.has(n))return!1;return!0}canSelectItem(e){var r;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let n=this.collection.getItem(e);return!(!n||!(n==null||(r=n.props)===null||r===void 0)&&r.isDisabled||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var r,n;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((n=this.collection.getItem(e))===null||n===void 0||(r=n.props)===null||r===void 0)&&r.isDisabled))}isLink(e){var r,n;return!!(!((n=this.collection.getItem(e))===null||n===void 0||(r=n.props)===null||r===void 0)&&r.href)}getItemProps(e){var r;return(r=this.collection.getItem(e))===null||r===void 0?void 0:r.props}withCollection(e){return new kn(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(e,r,n){this.collection=e,this.state=r;var o;this.allowsCellSelection=(o=n==null?void 0:n.allowsCellSelection)!==null&&o!==void 0?o:!1,this._isSelectAll=null,this.layoutDelegate=(n==null?void 0:n.layoutDelegate)||null}}function Ra(t){let{filter:e,layoutDelegate:r}=t,n=op(t),o=s.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),i=s.useCallback(c=>e?new jo(e(c)):new jo(c),[e]),l=s.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),a=jd(t,i,l),u=s.useMemo(()=>new kn(a,n,{layoutDelegate:r}),[a,n,r]);return Ka(a,u),{collection:a,disabledKeys:o,selectionManager:u}}function ip(t,e){let r=s.useMemo(()=>e?t.collection.UNSTABLE_filter(e):t.collection,[t.collection,e]),n=t.selectionManager.withCollection(r);return Ka(r,n),{collection:r,selectionManager:n,disabledKeys:t.disabledKeys}}function Ka(t,e){const r=s.useRef(null);s.useEffect(()=>{if(e.focusedKey!=null&&!t.getItem(e.focusedKey)&&r.current){const d=r.current.getItem(e.focusedKey),f=[...r.current.getKeys()].map($=>{const E=r.current.getItem($);return(E==null?void 0:E.type)==="item"?E:null}).filter($=>$!==null),v=[...t.getKeys()].map($=>{const E=t.getItem($);return(E==null?void 0:E.type)==="item"?E:null}).filter($=>$!==null);var n,o;const p=((n=f==null?void 0:f.length)!==null&&n!==void 0?n:0)-((o=v==null?void 0:v.length)!==null&&o!==void 0?o:0);var i,l,a;let b=Math.min(p>1?Math.max(((i=d==null?void 0:d.index)!==null&&i!==void 0?i:0)-p+1,0):(l=d==null?void 0:d.index)!==null&&l!==void 0?l:0,((a=v==null?void 0:v.length)!==null&&a!==void 0?a:0)-1),m=null,y=!1;for(;b>=0;){if(!e.isDisabled(v[b].key)){m=v[b];break}if(b<v.length-1&&!y)b++;else{y=!0;var u,c;b>((u=d==null?void 0:d.index)!==null&&u!==void 0?u:0)&&(b=(c=d==null?void 0:d.index)!==null&&c!==void 0?c:0),b--}}e.setFocusedKey(m?m.key:null)}r.current=t},[t,e])}function lp(t){var e;let[r,n]=Re(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),o=s.useMemo(()=>r!=null?[r]:[],[r]),{collection:i,disabledKeys:l,selectionManager:a}=Ra({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:o,onSelectionChange:c=>{if(c==="all")return;var d;let f=(d=c.values().next().value)!==null&&d!==void 0?d:null;f===r&&t.onSelectionChange&&t.onSelectionChange(f),n(f)}}),u=r!=null?i.getItem(r):null;return{collection:i,disabledKeys:l,selectionManager:a,selectedKey:r,setSelectedKey:n,selectedItem:u}}function ar(t){let[e,r]=Re(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const n=s.useCallback(()=>{r(!0)},[r]),o=s.useCallback(()=>{r(!1)},[r]),i=s.useCallback(()=>{r(!e)},[r,e]);return{isOpen:e,setOpen:r,open:n,close:o,toggle:i}}function ap(t){let[e,r]=Re(t.isExpanded,t.defaultExpanded||!1,t.onExpandedChange);const n=s.useCallback(()=>{r(!0)},[r]),o=s.useCallback(()=>{r(!1)},[r]),i=s.useCallback(()=>{r(!e)},[r,e]);return{isExpanded:e,setExpanded:r,expand:n,collapse:o,toggle:i}}function sp(t){let{allowsMultipleExpanded:e=!1,isDisabled:r=!1}=t,[n,o]=Re(s.useMemo(()=>t.expandedKeys?new Set(t.expandedKeys):void 0,[t.expandedKeys]),s.useMemo(()=>t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,[t.defaultExpandedKeys]),t.onExpandedChange);return s.useEffect(()=>{!e&&n.size>1&&o(new Set([n.values().next().value]))}),{allowsMultipleExpanded:e,isDisabled:r,expandedKeys:n,setExpandedKeys:o,toggleKey(i){let l;e?(l=new Set(n),l.has(i)?l.delete(i):l.add(i)):l=new Set(n.has(i)?[]:[i]),o(l)}}}function up(t){let e=ar(t),[r,n]=s.useState(null),[o,i]=s.useState([]),l=()=>{i([]),e.close()};return{focusStrategy:r,...e,open(c=null){n(c),e.open()},toggle(c=null){n(c),e.toggle()},close(){l()},expandedKeysStack:o,openSubmenu:(c,d)=>{i(f=>d>f.length?f:[...f.slice(0,d),c])},closeSubmenu:(c,d)=>{i(f=>f[d]===c?f.slice(0,d):f)}}}function cp(t){let e=ar(t),[r,n]=s.useState(null),o=lp({...t,onSelectionChange:u=>{t.onSelectionChange!=null&&t.onSelectionChange(u),e.close(),i.commitValidation()}}),i=gn({...t,value:o.selectedKey}),[l,a]=s.useState(!1);return{...i,...o,...e,focusStrategy:r,open(u=null){o.collection.size!==0&&(n(u),e.open())},toggle(u=null){o.collection.size!==0&&(n(u),e.toggle())},isFocused:l,setFocused:a}}const dp=1500,Wo=500;let Ie={},fp=0,ut=!1,$e=null,Ne=null;function La(t={}){let{delay:e=dp,closeDelay:r=Wo}=t,{isOpen:n,open:o,close:i}=ar(t),l=s.useMemo(()=>`${++fp}`,[]),a=s.useRef(null),u=s.useRef(i),c=()=>{Ie[l]=v},d=()=>{for(let b in Ie)b!==l&&(Ie[b](!0),delete Ie[b])},f=()=>{a.current&&clearTimeout(a.current),a.current=null,d(),c(),ut=!0,o(),$e&&(clearTimeout($e),$e=null),Ne&&(clearTimeout(Ne),Ne=null)},v=b=>{b||r<=0?(a.current&&clearTimeout(a.current),a.current=null,u.current()):a.current||(a.current=setTimeout(()=>{a.current=null,u.current()},r)),$e&&(clearTimeout($e),$e=null),ut&&(Ne&&clearTimeout(Ne),Ne=setTimeout(()=>{delete Ie[l],Ne=null,ut=!1},Math.max(Wo,r)))},p=()=>{d(),c(),!n&&!$e&&!ut?$e=setTimeout(()=>{$e=null,ut=!0,f()},e):n||f()};return s.useEffect(()=>{u.current=i},[i]),s.useEffect(()=>()=>{a.current&&clearTimeout(a.current),Ie[l]&&delete Ie[l]},[l]),{isOpen:n,open:b=>{!b&&e>0&&!a.current?p():f()},close:v}}const Fa=s.createContext(null),pp=s.createContext({}),vp=s.createContext(null),bp=Cn(function(e,r){[e,r]=ce(e,r,vp);let{validationBehavior:n}=ir(Fa)||{};var o,i;let l=(i=(o=e.validationBehavior)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:"native",a=s.useRef(null),[u,c]=ce({},a,rn),[d,f]=Pn(!e["aria-label"]&&!e["aria-labelledby"]),[v,p]=s.useState("input"),{labelProps:b,inputProps:m,descriptionProps:y,errorMessageProps:$,...E}=nd({...ya(e),inputElementType:v,label:f,validationBehavior:l},c),C=s.useCallback(x=>{c.current=x,x&&p(x instanceof HTMLTextAreaElement?"textarea":"input")},[c]),K=ae({...e,values:{isDisabled:e.isDisabled||!1,isInvalid:E.isInvalid,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-TextField"}),T=Q(e);return delete T.id,s.createElement("div",{...T,...K,ref:r,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":E.isInvalid||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0},s.createElement(Ge,{values:[[ka,{...b,ref:d}],[rn,{...A(m,u),ref:C}],[pp,{...m,ref:C}],[lr,{slots:{description:y,errorMessage:$}}],[Da,E]]},K.children))}),hp=s.createContext(null),gp=s.createContext(null),mp={CollectionRoot({collection:t,renderDropIndicator:e}){return Uo(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:r}){return Uo(t,e,r)}};function Uo(t,e,r){return xa({items:e?t.getChildren(e.key):t,dependencies:[r],children(n){var o;let i=n.render(n);if(!r||n.type!=="item")return i;let l=n.key,a=t.getKeyAfter(l);return s.createElement(s.Fragment,null,r({type:"item",key:l,dropPosition:"before"}),i,(a==null||((o=t.getItem(a))===null||o===void 0?void 0:o.type)!=="item")&&r({type:"item",key:l,dropPosition:"after"}))}})}const Dn=s.createContext(mp);var Ma={};Ma={colorSwatchPicker:"تغييرات الألوان",dropzoneLabel:"DropZone",selectPlaceholder:"حدد عنصرًا",tableResizer:"أداة تغيير الحجم"};var Aa={};Aa={colorSwatchPicker:"Цветови мостри",dropzoneLabel:"DropZone",selectPlaceholder:"Изберете предмет",tableResizer:"Преоразмерител"};var Ia={};Ia={colorSwatchPicker:"Vzorky barev",dropzoneLabel:"Místo pro přetažení",selectPlaceholder:"Vyberte položku",tableResizer:"Změna velikosti"};var Na={};Na={colorSwatchPicker:"Farveprøver",dropzoneLabel:"DropZone",selectPlaceholder:"Vælg et element",tableResizer:"Størrelsesændring"};var Ba={};Ba={colorSwatchPicker:"Farbfelder",dropzoneLabel:"Ablegebereich",selectPlaceholder:"Element wählen",tableResizer:"Größenanpassung"};var Oa={};Oa={colorSwatchPicker:"Χρωματικά δείγματα",dropzoneLabel:"DropZone",selectPlaceholder:"Επιλέξτε ένα αντικείμενο",tableResizer:"Αλλαγή μεγέθους"};var za={};za={selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"};var Ha={};Ha={colorSwatchPicker:"Muestras de colores",dropzoneLabel:"DropZone",selectPlaceholder:"Seleccionar un artículo",tableResizer:"Cambiador de tamaño"};var Va={};Va={colorSwatchPicker:"Värvinäidised",dropzoneLabel:"DropZone",selectPlaceholder:"Valige üksus",tableResizer:"Suuruse muutja"};var ja={};ja={colorSwatchPicker:"Värimallit",dropzoneLabel:"DropZone",selectPlaceholder:"Valitse kohde",tableResizer:"Koon muuttaja"};var _a={};_a={colorSwatchPicker:"Échantillons de couleurs",dropzoneLabel:"DropZone",selectPlaceholder:"Sélectionner un élément",tableResizer:"Redimensionneur"};var Wa={};Wa={colorSwatchPicker:"דוגמיות צבע",dropzoneLabel:"DropZone",selectPlaceholder:"בחר פריט",tableResizer:"שינוי גודל"};var Ua={};Ua={colorSwatchPicker:"Uzorci boja",dropzoneLabel:"Zona spuštanja",selectPlaceholder:"Odaberite stavku",tableResizer:"Promjena veličine"};var Ga={};Ga={colorSwatchPicker:"Színtárak",dropzoneLabel:"DropZone",selectPlaceholder:"Válasszon ki egy elemet",tableResizer:"Átméretező"};var qa={};qa={colorSwatchPicker:"Campioni di colore",dropzoneLabel:"Zona di rilascio",selectPlaceholder:"Seleziona un elemento",tableResizer:"Ridimensionamento"};var Ya={};Ya={colorSwatchPicker:"カラースウォッチ",dropzoneLabel:"ドロップゾーン",selectPlaceholder:"項目を選択",tableResizer:"サイズ変更ツール"};var Za={};Za={colorSwatchPicker:"색상 견본",dropzoneLabel:"드롭 영역",selectPlaceholder:"항목 선택",tableResizer:"크기 조정기"};var Xa={};Xa={colorSwatchPicker:"Spalvų pavyzdžiai",dropzoneLabel:"„DropZone“",selectPlaceholder:"Pasirinkite elementą",tableResizer:"Dydžio keitiklis"};var Ja={};Ja={colorSwatchPicker:"Krāsu paraugi",dropzoneLabel:"DropZone",selectPlaceholder:"Izvēlēties vienumu",tableResizer:"Izmēra mainītājs"};var Qa={};Qa={colorSwatchPicker:"Fargekart",dropzoneLabel:"Droppsone",selectPlaceholder:"Velg et element",tableResizer:"Størrelsesendrer"};var es={};es={colorSwatchPicker:"kleurstalen",dropzoneLabel:"DropZone",selectPlaceholder:"Selecteer een item",tableResizer:"Resizer"};var ts={};ts={colorSwatchPicker:"Próbki kolorów",dropzoneLabel:"Strefa upuszczania",selectPlaceholder:"Wybierz element",tableResizer:"Zmiana rozmiaru"};var rs={};rs={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var ns={};ns={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var os={};os={colorSwatchPicker:"Specimene de culoare",dropzoneLabel:"Zonă de plasare",selectPlaceholder:"Selectați un element",tableResizer:"Instrument de redimensionare"};var is={};is={colorSwatchPicker:"Цветовые образцы",dropzoneLabel:"DropZone",selectPlaceholder:"Выберите элемент",tableResizer:"Средство изменения размера"};var ls={};ls={colorSwatchPicker:"Vzorkovníky farieb",dropzoneLabel:"DropZone",selectPlaceholder:"Vyberte položku",tableResizer:"Nástroj na zmenu veľkosti"};var as={};as={colorSwatchPicker:"Barvne palete",dropzoneLabel:"DropZone",selectPlaceholder:"Izberite element",tableResizer:"Spreminjanje velikosti"};var ss={};ss={colorSwatchPicker:"Uzorci boje",dropzoneLabel:"DropZone",selectPlaceholder:"Izaberite stavku",tableResizer:"Promena veličine"};var us={};us={colorSwatchPicker:"Färgrutor",dropzoneLabel:"DropZone",selectPlaceholder:"Välj en artikel",tableResizer:"Storleksändrare"};var cs={};cs={colorSwatchPicker:"Renk örnekleri",dropzoneLabel:"Bırakma Bölgesi",selectPlaceholder:"Bir öğe seçin",tableResizer:"Yeniden boyutlandırıcı"};var ds={};ds={colorSwatchPicker:"Зразки кольорів",dropzoneLabel:"DropZone",selectPlaceholder:"Виберіть елемент",tableResizer:"Засіб змінення розміру"};var fs={};fs={colorSwatchPicker:"颜色色板",dropzoneLabel:"放置区域",selectPlaceholder:"选择一个项目",tableResizer:"尺寸调整器"};var ps={};ps={colorSwatchPicker:"色票",dropzoneLabel:"放置區",selectPlaceholder:"選取項目",tableResizer:"大小調整器"};var vs={};vs={"ar-AE":Ma,"bg-BG":Aa,"cs-CZ":Ia,"da-DK":Na,"de-DE":Ba,"el-GR":Oa,"en-US":za,"es-ES":Ha,"et-EE":Va,"fi-FI":ja,"fr-FR":_a,"he-IL":Wa,"hr-HR":Ua,"hu-HU":Ga,"it-IT":qa,"ja-JP":Ya,"ko-KR":Za,"lt-LT":Xa,"lv-LV":Ja,"nb-NO":Qa,"nl-NL":es,"pl-PL":ts,"pt-BR":rs,"pt-PT":ns,"ro-RO":os,"ru-RU":is,"sk-SK":ls,"sl-SI":as,"sr-SP":ss,"sv-SE":us,"tr-TR":cs,"uk-UA":ds,"zh-CN":fs,"zh-TW":ps};const sr=s.createContext({}),bs=s.createContext(null),yp=s.forwardRef(function(e,r){let{render:n}=s.useContext(bs);return s.createElement(s.Fragment,null,n(e,r))});function hs(t,e){var r;let n=t==null?void 0:t.renderDropIndicator,o=t==null||(r=t.isVirtualDragging)===null||r===void 0?void 0:r.call(t),i=s.useCallback(l=>{if(o||e!=null&&e.isDropTarget(l))return n?n(l):s.createElement(yp,{target:l})},[e==null?void 0:e.target,o,n]);return t!=null&&t.useDropIndicator?i:void 0}function $p(t,e,r){var n,o;let i=t.focusedKey,l=null;if(!(e==null||(n=e.isVirtualDragging)===null||n===void 0)&&n.call(e)&&(r==null||(o=r.target)===null||o===void 0?void 0:o.type)==="item"){l=r.target.key;var a;r.target.dropPosition==="after"&&(l=(a=r.collection.getKeyAfter(l))!==null&&a!==void 0?a:l)}return s.useMemo(()=>new Set([i,l].filter(u=>u!=null)),[i,l])}const gs=s.createContext({}),xp=wa("header",function(e,r){return[e,r]=ce(e,r,gs),s.createElement("header",{className:"react-aria-Header",...e,ref:r},e.children)}),Sp=s.createContext({}),Rn=s.createContext(null),St=s.createContext(null),Pp=s.forwardRef(function(e,r){[e,r]=ce(e,r,Rn);let n=s.useContext(St);return n?s.createElement(ms,{state:n,props:e,listBoxRef:r}):s.createElement(Pa,{content:s.createElement(Ta,e)},o=>s.createElement(Ep,{props:e,listBoxRef:r,collection:o}))});function Ep({props:t,listBoxRef:e,collection:r}){t={...t,collection:r,children:null,items:null};let{layoutDelegate:n}=s.useContext(Dn),o=Ra({...t,layoutDelegate:n});return s.createElement(ms,{state:o,props:t,listBoxRef:e})}function ms({state:t,props:e,listBoxRef:r}){let{filter:n,collectionProps:o,collectionRef:i}=s.useContext(hp)||{};e=s.useMemo(()=>o?{...e,...o}:e,[e,o]);let{dragAndDropHooks:l,layout:a="stack",orientation:u="vertical"}=e;r=de(s.useMemo(()=>li(r,i!==void 0?i:null),[i,r]));let c=ip(t,n),{collection:d,selectionManager:f}=c,v=!!(l!=null&&l.useDraggableCollectionState),p=!!(l!=null&&l.useDroppableCollectionState),{direction:b}=Ke(),{disabledBehavior:m,disabledKeys:y}=f,$=bn({usage:"search",sensitivity:"base"}),{isVirtualized:E,layoutDelegate:C,dropTargetDelegate:K,CollectionRoot:T}=s.useContext(Dn),x=s.useMemo(()=>e.keyboardDelegate||new Sn({collection:d,collator:$,ref:r,disabledKeys:y,disabledBehavior:m,layout:a,orientation:u,direction:b,layoutDelegate:C}),[d,$,r,m,y,u,b,e.keyboardDelegate,a,C]),{listBoxProps:M}=zd({...e,shouldSelectOnPressUp:v||e.shouldSelectOnPressUp,keyboardDelegate:x,isVirtualized:E},c,r),F=s.useRef(v),N=s.useRef(p);s.useEffect(()=>{process.env.NODE_ENV!=="production"&&(F.current!==v&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),N.current!==p&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."))},[v,p]);let L,h,R,B=!1,D=null,z=s.useRef(null);if(v&&l){L=l.useDraggableCollectionState({collection:d,selectionManager:f,preview:l.renderDragPreview?z:void 0}),l.useDraggableCollection({},L,r);let ne=l.DragPreview;D=l.renderDragPreview?s.createElement(ne,{ref:z},l.renderDragPreview):null}if(p&&l){h=l.useDroppableCollectionState({collection:d,selectionManager:f});let ne=l.dropTargetDelegate||K||new l.ListDropTargetDelegate(d,r,{orientation:u,layout:a,direction:b});R=l.useDroppableCollection({keyboardDelegate:x,dropTargetDelegate:ne},h,r),B=h.isDropTarget({type:"root"})}let{focusProps:g,isFocused:k,isFocusVisible:S}=Le(),O={isDropTarget:B,isEmpty:c.collection.size===0,isFocused:k,isFocusVisible:S,layout:e.layout||"stack",state:c},Y=ae({className:e.className,style:e.style,defaultClassName:"react-aria-ListBox",values:O}),Z=null;return c.collection.size===0&&e.renderEmptyState&&(Z=s.createElement("div",{role:"option",style:{display:"contents"}},e.renderEmptyState(O))),s.createElement(Fi,null,s.createElement("div",{...Q(e),...A(M,g,R==null?void 0:R.collectionProps),...Y,ref:r,slot:e.slot||void 0,onScroll:e.onScroll,"data-drop-target":B||void 0,"data-empty":c.collection.size===0||void 0,"data-focused":k||void 0,"data-focus-visible":S||void 0,"data-layout":e.layout||"stack","data-orientation":e.orientation||"vertical"},s.createElement(Ge,{values:[[Rn,e],[St,c],[sr,{dragAndDropHooks:l,dragState:L,dropState:h}],[Sp,{elementType:"div"}],[bs,{render:Tp}],[gp,{name:"ListBoxSection",render:ys}]]},s.createElement(T,{collection:d,scrollRef:r,persistedKeys:$p(f,l,h),renderDropIndicator:hs(l,h)})),Z,D))}function ys(t,e,r,n="react-aria-ListBoxSection"){let o=s.useContext(St),{dragAndDropHooks:i,dropState:l}=s.useContext(sr),{CollectionBranch:a}=s.useContext(Dn),[u,c]=Pn();var d;let{headingProps:f,groupProps:v}=qd({heading:c,"aria-label":(d=t["aria-label"])!==null&&d!==void 0?d:void 0}),p=ae({defaultClassName:n,className:t.className,style:t.style,values:{}});return s.createElement("section",{...Q(t),...v,...p,ref:e},s.createElement(gs.Provider,{value:{...f,ref:u}},s.createElement(a,{collection:o.collection,parent:r,renderDropIndicator:hs(i,l)})))}const wp=Yf("section",ys),Cp=wa("item",function(e,r,n){let o=de(r),i=s.useContext(St),{dragAndDropHooks:l,dragState:a,dropState:u}=s.useContext(sr),{optionProps:c,labelProps:d,descriptionProps:f,...v}=Gd({key:n.key,"aria-label":e==null?void 0:e["aria-label"]},i,o),{hoverProps:p,isHovered:b}=Ue({isDisabled:!v.allowsSelection&&!v.hasAction,onHoverStart:n.props.onHoverStart,onHoverChange:n.props.onHoverChange,onHoverEnd:n.props.onHoverEnd}),m=null;a&&l&&(m=l.useDraggableItem({key:n.key},a));let y=null;u&&l&&(y=l.useDroppableItem({target:{type:"item",key:n.key,dropPosition:"on"}},u,o));let $=a&&a.isDragging(n.key),E=ae({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...v,isHovered:b,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!a,isDragging:$,isDropTarget:y==null?void 0:y.isDropTarget}});s.useEffect(()=>{!n.textValue&&process.env.NODE_ENV!=="production"&&console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.")},[n.textValue]);let C=e.href?"a":"div";return s.createElement(C,{...A(c,p,m==null?void 0:m.dragProps,y==null?void 0:y.dropProps),...E,ref:o,"data-allows-dragging":!!a||void 0,"data-selected":v.isSelected||void 0,"data-disabled":v.isDisabled||void 0,"data-hovered":b||void 0,"data-focused":v.isFocused||void 0,"data-focus-visible":v.isFocusVisible||void 0,"data-pressed":v.isPressed||void 0,"data-dragging":$||void 0,"data-drop-target":(y==null?void 0:y.isDropTarget)||void 0,"data-selection-mode":i.selectionManager.selectionMode==="none"?void 0:i.selectionManager.selectionMode},s.createElement(Ge,{values:[[lr,{slots:{[Gt]:d,label:d,description:f}}]]},E.children))});function Tp(t,e){e=de(e);let{dragAndDropHooks:r,dropState:n}=s.useContext(sr),{dropIndicatorProps:o,isHidden:i,isDropTarget:l}=r.useDropIndicator(t,n,e);return i?null:s.createElement(Dp,{...t,dropIndicatorProps:o,isDropTarget:l,ref:e})}function kp(t,e){let{dropIndicatorProps:r,isDropTarget:n,...o}=t,i=ae({...o,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:n}});return s.createElement("div",{...r,...i,role:"option",ref:e,"data-drop-target":n||void 0})}const Dp=s.forwardRef(kp),$s=s.createContext({placement:"bottom"}),Kn=s.createContext(null),Go=s.createContext(null),xs=s.forwardRef(function(e,r){[e,r]=ce(e,r,Kn);let n=s.useContext(ur),o=ar(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?o:n,l=bi(r,i.isOpen)||e.isExiting||!1,a=_f(),{direction:u}=Ke();if(a){let c=e.children;return typeof c=="function"&&(c=c({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),s.createElement(s.Fragment,null,c)}return i&&!i.isOpen&&!l?null:s.createElement(Rp,{...e,triggerRef:e.triggerRef,state:i,popoverRef:r,isExiting:l,dir:u})});function Rp({state:t,isExiting:e,UNSTABLE_portalContainer:r,...n}){let o=s.useRef(null),[i,l]=s.useState(0),a=s.useRef(null),u=s.useContext(Go),c=u&&n.trigger==="SubmenuTrigger";H(()=>{o.current&&t.isOpen&&l(o.current.getBoundingClientRect().width)},[t.isOpen,o]);var d;let{popoverProps:f,underlayProps:v,arrowProps:p,placement:b}=Dd({...n,offset:(d=n.offset)!==null&&d!==void 0?d:8,arrowSize:i,groupRef:c?u:a},t),m=n.popoverRef,y=vi(m,!!b)||n.isEntering||!1,$=ae({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:b,isEntering:y,isExiting:e}}),E=!n.isNonModal||n.trigger==="SubmenuTrigger",[C,K]=s.useState(!1);H(()=>{m.current&&K(E&&!m.current.querySelector("[role=dialog]"))},[m,E]),s.useEffect(()=>{C&&m.current&&!m.current.contains(document.activeElement)&&De(m.current)},[C,m]);let T={...f.style,...$.style},x=s.createElement("div",{...A(Q(n),f),...$,role:C?"dialog":void 0,tabIndex:C?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:m,slot:n.slot||void 0,style:T,dir:n.dir,"data-trigger":n.trigger,"data-placement":b,"data-entering":y||void 0,"data-exiting":e||void 0},!n.isNonModal&&s.createElement(Ro,{onDismiss:t.close}),s.createElement($s.Provider,{value:{...p,placement:b,ref:o}},$.children),s.createElement(Ro,{onDismiss:t.close}));if(!c)return s.createElement(Ko,{...n,shouldContainFocus:C,isExiting:e,portalContainer:r},!n.isNonModal&&t.isOpen&&s.createElement("div",{"data-testid":"underlay",...v,style:{position:"fixed",inset:0}}),s.createElement("div",{ref:a,style:{display:"contents"}},s.createElement(Go.Provider,{value:a},x)));var M;return s.createElement(Ko,{...n,shouldContainFocus:C,isExiting:e,portalContainer:(M=r??(u==null?void 0:u.current))!==null&&M!==void 0?M:void 0},x)}const Kp=s.createContext(null),Ss=s.createContext(null),ur=s.createContext(null);function Lp(t){let e=up(t),r=s.useRef(null),{triggerProps:n,overlayProps:o}=Ui({type:"dialog"},e,r);return n.id=te(),o["aria-labelledby"]=n.id,s.createElement(Ge,{values:[[ur,e],[Kp,e],[Ss,o],[Kn,{trigger:"DialogTrigger",triggerRef:r,"aria-labelledby":o["aria-labelledby"]}]]},s.createElement(uc,{...n,ref:r,isPressed:e.isOpen},t.children))}const Fp=s.forwardRef(function(e,r){let n=e["aria-labelledby"];[e,r]=ce(e,r,Ss);let{dialogProps:o,titleProps:i}=Xd({...e,"aria-labelledby":n},r),l=s.useContext(ur);!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=ae({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(l==null?void 0:l.close)||(()=>{})}});return s.createElement("section",{...Q(e),...o,...a,ref:r,slot:e.slot||void 0},s.createElement(Ge,{values:[[Hf,{slots:{[Gt]:{},title:{...i,level:2}}}],[Tn,{slots:{[Gt]:{},close:{onPress:()=>l==null?void 0:l.close()}}}]]},a.children))});function Mp(t){return t&&t.__esModule?t.default:t}const Ln=s.createContext(null),Fn=s.createContext(null),Ap=s.forwardRef(function(e,r){[e,r]=ce(e,r,Ln);let{children:n,isDisabled:o=!1,isInvalid:i=!1,isRequired:l=!1}=e,a=s.useMemo(()=>typeof n=="function"?n({isOpen:!1,isDisabled:o,isInvalid:i,isRequired:l,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):n,[n,o,i,l]);return s.createElement(Pa,{content:a},u=>s.createElement(Ip,{props:e,collection:u,selectRef:r}))});function Ip({props:t,selectRef:e,collection:r}){let{validationBehavior:n}=ir(Fa)||{};var o,i;let l=(i=(o=t.validationBehavior)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:"native",a=cp({...t,collection:r,children:void 0,validationBehavior:l}),{isFocusVisible:u,focusProps:c}=Le({within:!0}),d=s.useRef(null),[f,v]=Pn(!t["aria-label"]&&!t["aria-labelledby"]),{labelProps:p,triggerProps:b,valueProps:m,menuProps:y,descriptionProps:$,errorMessageProps:E,...C}=lf({...ya(t),label:v,validationBehavior:l},a,d),[K,T]=s.useState(null),x=s.useCallback(()=>{d.current&&T(d.current.offsetWidth+"px")},[d]);Br({ref:d,onResize:x});let M=s.useMemo(()=>({isOpen:a.isOpen,isFocused:a.isFocused,isFocusVisible:u,isDisabled:t.isDisabled||!1,isInvalid:C.isInvalid||!1,isRequired:t.isRequired||!1}),[a.isOpen,a.isFocused,u,t.isDisabled,C.isInvalid,t.isRequired]),F=ae({...t,values:M,defaultClassName:"react-aria-Select"}),N=Q(t);delete N.id;let L=s.useRef(null);return s.createElement(Ge,{values:[[Ln,t],[Fn,a],[Ps,m],[ka,{...p,ref:f,elementType:"span"}],[Tn,{...b,ref:d,isPressed:a.isOpen}],[ur,a],[Kn,{trigger:"Select",triggerRef:d,scrollRef:L,placement:"bottom start",style:{"--trigger-width":K},"aria-labelledby":y["aria-labelledby"]}],[Rn,{...y,ref:L}],[St,a],[lr,{slots:{description:$,errorMessage:E}}],[Da,C]]},s.createElement("div",{...N,...F,...c,ref:e,slot:t.slot||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":u||void 0,"data-open":a.isOpen||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":C.isInvalid||void 0,"data-required":t.isRequired||void 0}),s.createElement(sf,{autoComplete:t.autoComplete,state:a,triggerRef:d,label:v,name:t.name,isDisabled:t.isDisabled}))}const Ps=s.createContext(null),Np=s.forwardRef(function(e,r){var n,o;[e,r]=ce(e,r,Ps);let i=s.useContext(Fn),{placeholder:l}=ir(Ln),a=i.selectedKey!=null?i.collection.getItem(i.selectedKey):null,u=a==null?void 0:a.props.children;typeof u=="function"&&(u=u({isHovered:!1,isPressed:!1,isSelected:!1,isFocused:!1,isFocusVisible:!1,isDisabled:!1,selectionMode:"single",selectionBehavior:"toggle"}));let c=vn(Mp(vs),"react-aria-components");var d,f,v;let p=ae({...e,defaultChildren:(d=u??l)!==null&&d!==void 0?d:c.format("selectPlaceholder"),defaultClassName:"react-aria-SelectValue",values:{selectedItem:(f=(n=i.selectedItem)===null||n===void 0?void 0:n.value)!==null&&f!==void 0?f:null,selectedText:(v=(o=i.selectedItem)===null||o===void 0?void 0:o.textValue)!==null&&v!==void 0?v:null,isPlaceholder:!a}}),b=Q(e);return s.createElement("span",{ref:r,...b,...p,"data-placeholder":!a||void 0},s.createElement(lr.Provider,{value:void 0},p.children))}),Bp=s.createContext({}),Es=s.createContext(null),Op=s.forwardRef(function(e,r){[e,r]=ce(e,r,Bp);let n=rd(e),{groupProps:o}=Wc(e,n,r),i=ae({...e,values:{isDisabled:n.isDisabled,state:n},defaultClassName:"react-aria-ToggleButtonGroup"});return s.createElement("div",{...o,...i,ref:r,slot:e.slot||void 0,"data-orientation":e.orientation||"horizontal","data-disabled":e.isDisabled||void 0},s.createElement(Es.Provider,{value:n},i.children))}),zp=s.createContext({}),Hp=s.forwardRef(function(e,r){[e,r]=ce(e,r,zp);let n=s.useContext(Es),o=zi(n&&e.id!=null?{isSelected:n.selectedKeys.has(e.id),onChange(m){n.setSelected(e.id,m)}}:e),{buttonProps:i,isPressed:l,isSelected:a,isDisabled:u}=n&&e.id!=null?Uc({...e,id:e.id},n,r):Ki({...e,id:e.id!=null?String(e.id):void 0},o,r),{focusProps:c,isFocused:d,isFocusVisible:f}=Le(e),{hoverProps:v,isHovered:p}=Ue(e),b=ae({...e,id:void 0,values:{isHovered:p,isPressed:l,isFocused:d,isSelected:o.isSelected,isFocusVisible:f,isDisabled:u,state:o},defaultClassName:"react-aria-ToggleButton"});return s.createElement("button",{...A(i,c,v),...b,ref:r,slot:e.slot||void 0,"data-focused":d||void 0,"data-disabled":u||void 0,"data-pressed":l||void 0,"data-selected":a||void 0,"data-hovered":p||void 0,"data-focus-visible":f||void 0})}),Mn=s.createContext(null),ws=s.createContext(null);function Vp(t){let e=La(t),r=s.useRef(null),{triggerProps:n,tooltipProps:o}=cf(t,e,r);return s.createElement(Ge,{values:[[Mn,e],[ws,{...o,triggerRef:r}]]},s.createElement(sc,{...n,ref:r},t.children))}const jp=s.forwardRef(function({UNSTABLE_portalContainer:e,...r},n){[r,n]=ce(r,n,ws);let o=s.useContext(Mn),i=La(r),l=r.isOpen!=null||r.defaultOpen!=null||!o?i:o,a=bi(n,l.isOpen)||r.isExiting||!1;return!l.isOpen&&!a?null:s.createElement(wd,{portalContainer:e},s.createElement(_p,{...r,tooltipRef:n,isExiting:a}))});function _p(t){let e=s.useContext(Mn),r=s.useRef(null),[n,o]=s.useState(0);H(()=>{r.current&&e.isOpen&&o(r.current.getBoundingClientRect().width)},[e.isOpen,r]);let{overlayProps:i,arrowProps:l,placement:a}=Wi({placement:t.placement||"top",targetRef:t.triggerRef,overlayRef:t.tooltipRef,offset:t.offset,crossOffset:t.crossOffset,isOpen:e.isOpen,arrowSize:n,arrowBoundaryOffset:t.arrowBoundaryOffset,shouldFlip:t.shouldFlip,onClose:()=>e.close(!0)}),u=vi(t.tooltipRef,!!a)||t.isEntering||!1,c=ae({...t,defaultClassName:"react-aria-Tooltip",values:{placement:a,isEntering:u,isExiting:t.isExiting,state:e}});t=A(t,i);let{tooltipProps:d}=uf(t,e);return s.createElement("div",{...d,ref:t.tooltipRef,...c,style:{...i.style,...c.style},"data-placement":a??void 0,"data-entering":u||void 0,"data-exiting":t.isExiting||void 0},s.createElement($s.Provider,{value:{...l,placement:a,ref:r}},c.children))}const Cs=w.defineRecipe({className:"nimbus-tooltip",base:{color:"white",textStyle:"xs",fontWeight:"400",background:"slate.12",display:"inline-flex",alignItems:"center",borderRadius:"100",paddingX:"300",paddingY:"100",margin:"100",maxW:"6400",boxShadow:"1"}}),{withContext:Wp}=w.createRecipeContext({recipe:Cs}),Up=Wp("div"),Ts=s.forwardRef(function({children:e,placement:r="bottom",...n},o){return P.jsx(Up,{ref:o,asChild:!0,...n,children:P.jsx(jp,{placement:r,...n,children:e})})});Ts.displayName="Tooltip";const ks=Vp;ks.displayName="TooltipTrigger";const Ds=s.forwardRef(function(e,r){const n=s.useRef(null),o=de(w.mergeRefs(n,r)),{focusableProps:i}=ot(e,o);if(s.isValidElement(e.children))return s.cloneElement(e.children,A(i,e.children.props,{ref:o}))});Ds.displayName="MakeElementFocusable";var Gp=(t,e,r,n,o,i,l,a)=>{let u=document.documentElement,c=["light","dark"];function d(p){(Array.isArray(t)?t:[t]).forEach(b=>{let m=b==="class",y=m&&i?o.map($=>i[$]||$):o;m?(u.classList.remove(...y),u.classList.add(i&&i[p]?i[p]:p)):u.setAttribute(b,p)}),f(p)}function f(p){a&&c.includes(p)&&(u.style.colorScheme=p)}function v(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(n)d(n);else try{let p=localStorage.getItem(e)||r,b=l&&p==="system"?v():p;d(b)}catch{}},qo=["light","dark"],Rs="(prefers-color-scheme: dark)",qp=typeof window>"u",An=X.createContext(void 0),Yp={setTheme:t=>{},themes:[]},Zp=()=>{var t;return(t=X.useContext(An))!=null?t:Yp},Xp=t=>X.useContext(An)?X.createElement(X.Fragment,null,t.children):X.createElement(Qp,{...t}),Jp=["light","dark"],Qp=({forcedTheme:t,disableTransitionOnChange:e=!1,enableSystem:r=!0,enableColorScheme:n=!0,storageKey:o="theme",themes:i=Jp,defaultTheme:l=r?"system":"light",attribute:a="data-theme",value:u,children:c,nonce:d,scriptProps:f})=>{let[v,p]=X.useState(()=>tv(o,l)),[b,m]=X.useState(()=>v==="system"?Lr():v),y=u?Object.values(u):i,$=X.useCallback(T=>{let x=T;if(!x)return;T==="system"&&r&&(x=Lr());let M=u?u[x]:x,F=e?rv(d):null,N=document.documentElement,L=h=>{h==="class"?(N.classList.remove(...y),M&&N.classList.add(M)):h.startsWith("data-")&&(M?N.setAttribute(h,M):N.removeAttribute(h))};if(Array.isArray(a)?a.forEach(L):L(a),n){let h=qo.includes(l)?l:null,R=qo.includes(x)?x:h;N.style.colorScheme=R}F==null||F()},[d]),E=X.useCallback(T=>{let x=typeof T=="function"?T(v):T;p(x);try{localStorage.setItem(o,x)}catch{}},[v]),C=X.useCallback(T=>{let x=Lr(T);m(x),v==="system"&&r&&!t&&$("system")},[v,t]);X.useEffect(()=>{let T=window.matchMedia(Rs);return T.addListener(C),C(T),()=>T.removeListener(C)},[C]),X.useEffect(()=>{let T=x=>{x.key===o&&(x.newValue?p(x.newValue):E(l))};return window.addEventListener("storage",T),()=>window.removeEventListener("storage",T)},[E]),X.useEffect(()=>{$(t??v)},[t,v]);let K=X.useMemo(()=>({theme:v,setTheme:E,forcedTheme:t,resolvedTheme:v==="system"?b:v,themes:r?[...i,"system"]:i,systemTheme:r?b:void 0}),[v,E,t,b,r,i]);return X.createElement(An.Provider,{value:K},X.createElement(ev,{forcedTheme:t,storageKey:o,attribute:a,enableSystem:r,enableColorScheme:n,defaultTheme:l,value:u,themes:i,nonce:d,scriptProps:f}),c)},ev=X.memo(({forcedTheme:t,storageKey:e,attribute:r,enableSystem:n,enableColorScheme:o,defaultTheme:i,value:l,themes:a,nonce:u,scriptProps:c})=>{let d=JSON.stringify([r,e,i,t,a,l,n,o]).slice(1,-1);return X.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?u:"",dangerouslySetInnerHTML:{__html:`(${Gp.toString()})(${d})`}})}),tv=(t,e)=>{if(qp)return;let r;try{r=localStorage.getItem(t)||void 0}catch{}return r||e},rv=t=>{let e=document.createElement("style");return t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},Lr=t=>(t||(t=window.matchMedia(Rs)),t.matches?"dark":"light");function nv(t){return P.jsx(Xp,{attribute:"class",disableTransitionOnChange:!0,...t})}function In(){const{resolvedTheme:t,setTheme:e}=Zp();return{colorMode:t,setColorMode:e,toggleColorMode:()=>{e(t==="light"?"dark":"light")}}}function ov(t,e){const{colorMode:r}=In();return r==="light"?t:e}function iv(){const{colorMode:t}=In();return t==="light"?"Light Theme":"DarkTheme"}const lv=w.defineAnimationStyles({"slide-fade-in":{value:{transformOrigin:"var(--transform-origin)","&[data-placement^=top]":{animationName:"slide-from-bottom, fade-in"},"&[data-placement^=bottom]":{animationName:"slide-from-top, fade-in"},"&[data-placement^=left]":{animationName:"slide-from-right, fade-in"},"&[data-placement^=right]":{animationName:"slide-from-left, fade-in"}}},"slide-fade-out":{value:{transformOrigin:"var(--transform-origin)","&[data-placement^=top]":{animationName:"slide-to-bottom, fade-out"},"&[data-placement^=bottom]":{animationName:"slide-to-top, fade-out"},"&[data-placement^=left]":{animationName:"slide-to-right, fade-out"},"&[data-placement^=right]":{animationName:"slide-to-left, fade-out"}}},"scale-fade-in":{value:{transformOrigin:"var(--transform-origin)",animationName:"scale-in, fade-in"}},"scale-fade-out":{value:{transformOrigin:"var(--transform-origin)",animationName:"scale-out, fade-out"}}});function av(t){var r;const e={};for(const n in t)(r=t[n])!=null&&r.value?e[n]=t[n].value:e[n]=t[n];return e}const sv=av(U.themeTokens.breakpoints),uv=w.defineGlobalStyles({"*":{fontFeatureSettings:'"liga", "calt", "case", "ss01", "ss07", "ss08", "tnum"',"--ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--ring-offset-width":"0px","--ring-offset-color":"#fff","--ring-color":"rgba(66, 153, 225, 0.6)","--ring-offset-shadow":"0 0 #0000","--ring-shadow":"0 0 #0000","--focus-ring-color":"colors.primary.7","--brightness":"var(--chakra-empty,/*!*/ /*!*/)","--contrast":"var(--chakra-empty,/*!*/ /*!*/)","--grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--invert":"var(--chakra-empty,/*!*/ /*!*/)","--saturate":"var(--chakra-empty,/*!*/ /*!*/)","--sepia":"var(--chakra-empty,/*!*/ /*!*/)","--drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--global-font-mono":"fonts.mono","--global-font-body":"fonts.body","--global-color-border":"colors.border"},"code *":{fontFeatureSettings:'"calt", "case", "ss01", "ss07", "ss08", "tnum"'},html:{color:"fg",bg:"bg",lineHeight:"1.5",colorPalette:"neutral"},"*::placeholder":{color:"fg.muted/80"},"*::selection":{bg:"colorPalette.9",color:"colorPalette.contrast"}}),cv={spin:{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}},pulse:{"50%":{opacity:"0.5"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}},"fade-in":{from:{opacity:0},to:{opacity:1}},"fade-out":{from:{opacity:1},to:{opacity:0}},"slide-from-left-full":{from:{translate:"-100% 0"},to:{translate:"0 0"}},"slide-from-right-full":{from:{translate:"100% 0"},to:{translate:"0 0"}},"slide-from-top-full":{from:{translate:"0 -100%"},to:{translate:"0 0"}},"slide-from-bottom-full":{from:{translate:"0 100%"},to:{translate:"0 0"}},"slide-to-left-full":{from:{translate:"0 0"},to:{translate:"-100% 0"}},"slide-to-right-full":{from:{translate:"0 0"},to:{translate:"100% 0"}},"slide-to-top-full":{from:{translate:"0 0"},to:{translate:"0 -100%"}},"slide-to-bottom-full":{from:{translate:"0 0"},to:{translate:"0 100%"}},"slide-from-top":{"0%":{translate:"0 -0.5rem"},to:{translate:"0"}},"slide-from-bottom":{"0%":{translate:"0 0.5rem"},to:{translate:"0"}},"slide-from-left":{"0%":{translate:"-0.5rem 0"},to:{translate:"0"}},"slide-from-right":{"0%":{translate:"0.5rem 0"},to:{translate:"0"}},"slide-to-top":{"0%":{translate:"0"},to:{translate:"0 -0.5rem"}},"slide-to-bottom":{"0%":{translate:"0"},to:{translate:"0 0.5rem"}},"slide-to-left":{"0%":{translate:"0"},to:{translate:"-0.5rem 0"}},"slide-to-right":{"0%":{translate:"0"},to:{translate:"0.5rem 0"}},"scale-in":{from:{scale:"0.95"},to:{scale:"1"}},"scale-out":{from:{scale:"1"},to:{scale:"0.95"}}},dv=w.defineLayerStyles({disabled:{value:{opacity:"0.5",cursor:"not-allowed"}}}),fv=w.defineRecipe({className:"nimbus-code",base:{fontFamily:"mono",alignItems:"center",display:"inline-flex",borderRadius:"100"},variants:{variant:{solid:{bg:"colorPalette.4",color:"colorPalette.11"},subtle:{bg:"colorPalette.3",color:"colorPalette.11"},outline:{color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted"},surface:{bg:"colorPalette.subtle",color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted"},plain:{color:"colorPalette.fg"}},size:{xs:{textStyle:"2xs",px:"100",minH:"400"},sm:{textStyle:"xs",px:"150",minH:"500"},md:{textStyle:"sm",px:"200",minH:"600"},lg:{textStyle:"sm",px:"250",minH:"700"}}},defaultVariants:{variant:"solid",size:"md"}}),pv=w.defineRecipe({className:"nimbus-heading",base:{fontFamily:"heading",fontWeight:"600"},variants:{size:{xs:{textStyle:"xs"},sm:{textStyle:"sm"},md:{textStyle:"md"},lg:{textStyle:"lg"},xl:{textStyle:"xl"},"2xl":{textStyle:"2xl"},"3xl":{textStyle:"3xl"},"4xl":{textStyle:"4xl"},"5xl":{textStyle:"5xl"},"6xl":{textStyle:"6xl"},"7xl":{textStyle:"7xl"}}},defaultVariants:{size:"xl"}}),vv=w.defineRecipe({className:"nimbus-kbd",base:{display:"inline-flex",alignItems:"center",fontWeight:"medium",fontFamily:"mono",flexShrink:"0",whiteSpace:"nowrap",wordSpacing:"-0.5em",userSelect:"none",px:"100",borderRadius:"100"},variants:{variant:{raised:{bg:"colorPalette.subtle",color:"colorPalette.fg",borderWidth:"1px",borderBottomWidth:"2px",borderColor:"colorPalette.muted"},outline:{borderWidth:"1px",color:"colorPalette.fg"},subtle:{bg:"colorPalette.muted",color:"colorPalette.fg"},plain:{color:"colorPalette.fg"}},size:{sm:{textStyle:"xs",height:"450"},md:{textStyle:"sm",height:"500"},lg:{textStyle:"md",height:"600"}}},defaultVariants:{size:"md",variant:"raised"}}),Nn=w.defineRecipe({className:"nimbus-text-input",base:{display:"block",borderRadius:"200",colorPalette:"neutral",focusVisibleRing:"outside",bg:"transparent",outline:"none",boxShadow:"inset 0 0 0 var(--border-width) var(--border-color)",_placeholder:{opacity:.5,color:"currentColor"},_disabled:{layerStyle:"disabled"},"&[data-invalid='true']":{"--border-color":"colors.critical.7",color:"critical.11"}},variants:{size:{sm:{h:800,textStyle:"sm",px:300},md:{h:1e3,textStyle:"md",px:400}},variant:{solid:{"--border-width":"sizes.25","--border-color":"colors.neutral.7",backgroundColor:"neutral.1",_hover:{backgroundColor:"primary.2"}},ghost:{_hover:{backgroundColor:"primary.2"}}}},defaultVariants:{size:"md",variant:"solid"}}),bv={avatar:ri,button:Be,code:fv,heading:pv,kbd:vv,link:ba,tooltip:Cs,textInput:Nn},hv=w.defineSemanticTokens.colors({bg:{DEFAULT:{value:{_light:"{colors.neutral.1}",_dark:"{colors.neutral.1}"}}},fg:{DEFAULT:{value:{_light:"{colors.neutral.12}",_dark:"{colors.neutral.12}"}}},border:{DEFAULT:{value:"{colors.neutral.6}"},muted:{value:"{colors.neutral.7}"},subtle:{value:"{colors.neutral.6}"},emphasized:{value:"{colors.neutral.8}"},inverted:{value:"{colors.neutral.9}"},critical:{value:"{colors.critical.8}"},warning:{value:"{colors.warning.8}"},positive:{value:"{colors.positive.8}"},info:{value:"{colors.ingo.8}"}},...U.themeTokens.color["system-palettes"],...U.themeTokens.color["brand-palettes"],...U.themeTokens.color["semantic-palettes"]}),gv=w.defineSemanticTokens.shadows(U.themeTokens.shadow),mv=w.defineSemanticTokens.radii({}),yv={colors:hv,shadows:gv,radii:mv},$v=w.defineSlotRecipe({slots:["trigger","backdrop","positioner","content","title","description","closeTrigger","header","body","footer","backdrop"],className:"nimbus-dialog",base:{backdrop:{bg:{_dark:"bg/50",_light:"fg/50"},pos:"fixed",left:0,top:0,w:"100vw",h:"100dvh",zIndex:"modal",_open:{animationName:"fade-in",animationDuration:"slow"},_closed:{animationName:"fade-out",animationDuration:"moderate"}},positioner:{display:"flex",width:"100vw",height:"100dvh",position:"fixed",left:0,top:0,"--dialog-z-index":"zIndex.modal",zIndex:"calc(var(--dialog-z-index) + var(--layer-index, 0))",justifyContent:"center",overscrollBehaviorY:"none"},content:{display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,borderRadius:"200",textStyle:"sm",my:"var(--dialog-margin, var(--dialog-base-margin))","--dialog-z-index":"zIndex.modal",zIndex:"calc(var(--dialog-z-index) + var(--layer-index, 0))",bg:"bg",boxShadow:"lg",_open:{animationDuration:"moderate"},_closed:{animationDuration:"faster"}},header:{flex:0,px:"600",pt:"600",pb:"400"},body:{flex:"1",px:"600",pt:"200",pb:"600"},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"300",px:"600",pt:"200",pb:"400"},title:{textStyle:"lg",fontWeight:"semibold"},description:{color:"fg.muted"}},variants:{placement:{center:{positioner:{alignItems:"center"},content:{"--dialog-base-margin":"auto",mx:"auto"}},top:{positioner:{alignItems:"flex-start"},content:{"--dialog-base-margin":"spacing.1600",mx:"auto"}},bottom:{positioner:{alignItems:"flex-end"},content:{"--dialog-base-margin":"spacing.1600",mx:"auto"}}},scrollBehavior:{inside:{positioner:{overflow:"hidden"},content:{maxH:"calc(100% - 7.5rem)"},body:{overflow:"auto"}},outside:{positioner:{overflow:"auto",pointerEvents:"auto"}}},size:{xs:{content:{maxW:"sm"}},sm:{content:{maxW:"md"}},md:{content:{maxW:"lg"}},lg:{content:{maxW:"2xl"}},xl:{content:{maxW:"4xl"}},cover:{positioner:{padding:"1000"},content:{width:"100%",height:"100%","--dialog-margin":"0"}},full:{content:{maxW:"100vw",minH:"100vh","--dialog-margin":"0",borderRadius:"0"}}},motionPreset:{scale:{content:{_open:{animationName:"scale-in, fade-in"},_closed:{animationName:"scale-out, fade-out"}}},"slide-in-bottom":{content:{_open:{animationName:"slide-from-bottom, fade-in"},_closed:{animationName:"slide-to-bottom, fade-out"}}},"slide-in-top":{content:{_open:{animationName:"slide-from-top, fade-in"},_closed:{animationName:"slide-to-top, fade-out"}}},"slide-in-left":{content:{_open:{animationName:"slide-from-left, fade-in"},_closed:{animationName:"slide-to-left, fade-out"}}},"slide-in-right":{content:{_open:{animationName:"slide-from-right, fade-in"},_closed:{animationName:"slide-to-right, fade-out"}}},none:{}}},defaultVariants:{size:"md",scrollBehavior:"outside",placement:"top",motionPreset:"scale"}}),xv=w.defineSlotRecipe({className:"chakra-list",slots:["root","item","indicator"],base:{root:{display:"flex",flexDirection:"column",gap:"var(--list-gap)","& :where(ul, ol)":{marginTop:"var(--list-gap)"}},item:{whiteSpace:"normal",display:"list-item"},indicator:{marginEnd:"200",minHeight:"1lh",flexShrink:0,display:"inline-block",verticalAlign:"middle"}},variants:{variant:{marker:{root:{listStyle:"revert",listStylePosition:"inside"},item:{_marker:{color:"fg.subtle"}}},plain:{item:{alignItems:"flex-start",display:"inline-flex"}}},align:{center:{item:{alignItems:"center"}},start:{item:{alignItems:"flex-start"}},end:{item:{alignItems:"flex-end"}}}},defaultVariants:{variant:"marker"}}),Sv=w.defineSlotRecipe({className:"chakra-table",slots:["root","header","body","row","columnHeader","cell","footer","caption"],base:{root:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full",textAlign:"start",verticalAlign:"top"},row:{_selected:{bg:"colorPalette.subtle"}},cell:{textAlign:"start",alignItems:"center"},columnHeader:{fontWeight:"medium",textAlign:"start",color:"fg"},caption:{fontWeight:"medium",textStyle:"xs"},footer:{fontWeight:"medium"}},variants:{interactive:{true:{body:{"& tr":{_hover:{bg:"colorPalette.subtle"}}}}},stickyHeader:{true:{header:{"& :where(tr)":{top:"var(--table-sticky-offset, 0)",position:"sticky",zIndex:1}}}},striped:{true:{row:{"&:nth-of-type(odd) td":{bg:"bg.muted"}}}},showColumnBorder:{true:{columnHeader:{"&:not(:last-of-type)":{borderInlineEndWidth:"1px"}},cell:{"&:not(:last-of-type)":{borderInlineEndWidth:"1px"}}}},variant:{line:{columnHeader:{borderBottomWidth:"1px"},cell:{borderBottomWidth:"1px"},row:{bg:"bg"}},outline:{root:{boxShadow:"0 0 0 1px {colors.border}",overflow:"hidden"},columnHeader:{borderBottomWidth:"1px"},header:{bg:"bg.muted"},row:{"&:not(:last-of-type)":{borderBottomWidth:"1px"}},footer:{borderTopWidth:"1px"}}},size:{sm:{root:{textStyle:"sm"},columnHeader:{px:"200",py:"200"},cell:{px:"200",py:"200"}},md:{root:{textStyle:"sm"},columnHeader:{px:"300",py:"300"},cell:{px:"300",py:"300"}},lg:{root:{textStyle:"md"},columnHeader:{px:"400",py:"300"},cell:{px:"400",py:"300"}}}},defaultVariants:{variant:"line",size:"md"}}),Pv=w.defineSlotRecipe({slots:["root","label","indicator"],className:"nimbus-checkbox",base:{root:{colorPalette:"primary",display:"inline-flex",gap:"200",alignItems:"center",verticalAlign:"top",minWidth:"600",minHeight:"600","&[data-disabled='true']":{layerStyle:"disabled"}},label:{flexShrink:0,userSelect:"none",color:"neutral.11","&[data-invalid='true']":{color:"critical.11"}},indicator:{position:"relative",display:"flex",flexShrink:0,alignItems:"center",justifyContent:"center",border:"solid-50",borderRadius:"50",focusRing:"outside",borderColor:"neutral.9",bg:"transparent",color:"neutral.11",_icon:{w:"350",h:"350"},"&:hover":{borderColor:"neutral.10"},"&[data-invalid='true']":{bg:"transparent",borderColor:"critical.9",color:"critical.11","&:hover":{borderColor:"critical.10"}},"&[data-selected='true'], &[data-indeterminate='true']":{bg:"colorPalette.9",borderColor:"colorPalette.9",color:"colorPalette.contrast","&:hover":{bg:"colorPalette.10",borderColor:"colorPalette.10"},"&[data-invalid='true']":{bg:"critical.9",borderColor:"critical.9",color:"critical.contrast","&:hover":{bg:"critical.10",borderColor:"critical.10"}}}}},variants:{size:{md:{label:{fontSize:"350",fontWeight:"400",lineHeight:"400"},indicator:{w:"400",h:"400",zIndex:1,_after:{position:"absolute",content:"''",width:"600",height:"600",zIndex:0}}}}},defaultVariants:{size:"md"}}),Ks=w.defineSlotRecipe({slots:["root","trigger","triggerLabel","options","optionGroup","option"],className:"nimbus-select",base:{root:{colorPalette:"primary",display:"inline-block",position:"relative",maxWidth:"100%",borderRadius:"200","&[data-disabled]":{layerStyle:"disabled",pointerEvents:"none"}},trigger:{cursor:"button",display:"inline-flex",focusRing:"outside",alignItems:"flex-start",borderRadius:"200",color:"neutral.12",width:"100%",userSelect:"none",boxShadow:"inset 0 0 0 var(--border-width) var(--border-color)","& span":{display:"inline-block",my:"auto"},'& [slot="description"]':{display:"none"},"[data-invalid] &":{"--border-width":"sizes.50","--border-color":"colors.critical.7"}},triggerLabel:{"--button-safespace":"sizes.1400",color:"neutral.12",textAlign:"left",marginRight:"var(--button-safespace)",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&[data-placeholder]":{opacity:.5},"[data-invalid] &":{color:"critical.11"}},options:{"--scrollbar-color":"colors.neutral.8","--scrollbar-bg":"colors.neutral.3",bg:"bg",borderRadius:"200",boxShadow:"5",minWidth:"var(--trigger-width)",p:"200",focusRing:"outside",maxHeight:"40svh",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--scrollbar-color) var(--scrollbar-bg)"},optionGroup:{textStyle:"xs",color:"neutral.11",fontWeight:"600",lineHeight:"350",letterSpacing:"25",textTransform:"uppercase",p:"200",borderBottom:"solid-25",borderColor:"neutral.6",mx:"-200",mt:"200",mb:"300"},option:{focusRing:"outside",cursor:"menuitem",color:"neutral.12",textStyle:"sm",p:"200",borderRadius:"200",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",'&[aria-selected="true"], &[data-focused="true"]':{bg:"primary.4"},'& [slot="label"]':{display:"block"},'& [slot="description"]':{display:"block",color:"neutral.11",textStyle:"xs"},'&[data-disabled="true"]':{layerStyle:"disabled"}}},variants:{size:{sm:{root:{},trigger:{h:"800",px:"400",textStyle:"sm"}},md:{root:{},trigger:{h:"1000",px:"400",textStyle:"md"}}},variant:{outline:{root:{bg:"bg","&:hover":{bg:"primary.2"}},trigger:{"--border-width":"sizes.25","--border-color":"colors.neutral.7"}},ghost:{root:{bg:"transparent","&:hover":{bg:"primaryAlpha.2"}},trigger:{"--border-width":"sizes.25","--border-color":"transparent"}}}},defaultVariants:{size:"md",variant:"outline"}}),Ev=w.defineSlotRecipe({slots:["root","disclosure","trigger","panel","accordionTitle","headerContentRight"],className:"nimbus-accordion",base:{root:{width:"100%"},disclosure:{width:"100%"},trigger:{fontSize:"var(--font-size)",focusVisibleRing:"outside",minHeight:"1200",bg:"none",flexGrow:1,display:"flex",alignItems:"center",gap:"8px",width:"auto","& svg":{width:"var(--width)",height:"var(--height)",rotate:"0deg",transition:"rotate 200ms"},'&[aria-expanded="true"] svg':{rotate:"90deg"},"&[disabled]":{layerStyle:"disabled"}},panel:{paddingTop:"var(--padding-top)",paddingBottom:"var(--padding-bottom)",paddingLeft:"var(--padding-left)",'&[aria-hidden="true"]':{display:"none"}},accordionTitle:{fontWeight:"700"}},variants:{size:{md:{trigger:{"--font-size":"fontSizes.500","& svg":{"--width":"sizes.600","--height":"sizes.600"}},panel:{"--padding-top":"spacing.600","--padding-bottom":"spacing.800","--padding-left":"spacing.800"}},sm:{trigger:{"--font-size":"fontSizes.400","& svg":{"--width":"sizes.500","--height":"sizes.500"}},panel:{"--padding-top":"spacing.400","--padding-bottom":"spacing.600","--padding-left":"spacing.700"}}}},defaultVariants:{size:"md"}}),wv={dialog:$v,list:xv,table:Sv,checkbox:Pv,select:Ks,accordion:Ev},Cv=w.defineTextStyles(U.themeTokens.textStyle),Tv=w.defineTokens.durations(U.themeTokens.aspectRatio),kv=w.defineTokens.animations(U.themeTokens.animation),Dv=w.defineTokens.blurs(U.themeTokens.blur),Rv=w.defineTokens.borders(U.themeTokens.border),Kv=w.defineTokens.colors({...U.themeTokens.color["blacks-and-whites"]}),Lv=w.defineTokens.durations(U.themeTokens.duration),Fv=w.defineTokens.easings(U.themeTokens.easing),Mv=w.defineTokens.fonts(U.themeTokens.fontFamily),Av=w.defineTokens.fontSizes(U.themeTokens.fontSize),Iv=w.defineTokens.fontWeights(U.themeTokens.fontWeight),Nv=t=>Object.keys(t).reduce((e,r)=>{const o=parseFloat(t[r].value)/100;return e[r]={value:`${o}em`},e},{}),Bv=w.defineTokens.letterSpacings(Nv(U.themeTokens.letterSpacing)),Ov=w.defineTokens.lineHeights(U.themeTokens.lineHeight),zv=w.defineTokens.radii(U.themeTokens.borderRadius),Hv=w.defineTokens.spacing(U.themeTokens.spacing),Vv=w.defineTokens.sizes({...U.themeTokens.size,"1/2":{value:"50%"},"1/3":{value:"33.333333%"},"2/3":{value:"66.666667%"},"1/4":{value:"25%"},"3/4":{value:"75%"},"1/5":{value:"20%"},"2/5":{value:"40%"},"3/5":{value:"60%"},"4/5":{value:"80%"},"1/6":{value:"16.666667%"},"2/6":{value:"33.333333%"},"3/6":{value:"50%"},"4/6":{value:"66.666667%"},"5/6":{value:"83.333333%"},"1/12":{value:"8.333333%"},"2/12":{value:"16.666667%"},"3/12":{value:"25%"},"4/12":{value:"33.333333%"},"5/12":{value:"41.666667%"},"6/12":{value:"50%"},"7/12":{value:"58.333333%"},"8/12":{value:"66.666667%"},"9/12":{value:"75%"},"10/12":{value:"83.333333%"},"11/12":{value:"91.666667%"},max:{value:"max-content"},min:{value:"min-content"},fit:{value:"fit-content"},prose:{value:"60ch"},full:{value:"100%"},dvh:{value:"100dvh"},svh:{value:"100svh"},lvh:{value:"100lvh"},dvw:{value:"100dvw"},svw:{value:"100svw"},lvw:{value:"100lvw"},vw:{value:"100vw"},vh:{value:"100vh"}}),jv=w.defineTokens.zIndex(U.themeTokens.zIndex),_v=w.defineTokens.cursor(U.themeTokens.cursor),Wv={aspectRatios:Tv,animations:kv,blurs:Dv,borders:Rv,colors:Kv,durations:Lv,easings:Fv,fonts:Mv,fontSizes:Av,fontWeights:Iv,letterSpacings:Bv,lineHeights:Ov,radii:zv,spacing:Hv,sizes:Vv,zIndex:jv,cursor:_v},Uv=w.defineConfig({preflight:!0,cssVarsPrefix:"nimbus",cssVarsRoot:":where(:root, :host)",globalCss:uv,theme:{breakpoints:sv,keyframes:cv,tokens:Wv,semanticTokens:yv,recipes:bv,slotRecipes:wv,textStyles:Cv,layerStyles:dv,animationStyles:lv}}),Ls=w.createSystem(w.defaultBaseConfig,Uv);function Gv(){const[t,e]=s.useState(r());function r(){return document.documentElement.style.getPropertyValue("color-scheme")||localStorage.getItem("theme")||"light"}return s.useEffect(()=>{const n=document.documentElement,o=new MutationObserver(()=>{const i=r();e(i)});return o.observe(n,{attributes:!0,attributeFilter:["style"]}),()=>o.disconnect()},[]),t}function qv({children:t,...e}){return P.jsx(w.ChakraProvider,{value:Ls,children:P.jsx(nv,{enableSystem:!1,...e,children:P.jsx(P.Fragment,{children:t})})})}function cr(t){const e={},r={...t};return Object.keys(t).forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&w.defaultSystem.isValidProperty(n)&&(e[n]=t[n],delete r[n])}),[e,r]}const{withProvider:Yv,withContext:Fs}=w.createSlotRecipeContext({key:"checkbox"}),Zv=Yv("label","root"),Xv=Fs("span","label"),Jv=Fs("span","indicator"),Ms=s.forwardRef((t,e)=>{const r=s.useRef(null),n=de(w.mergeRefs(r,e)),o=w.useSlotRecipe({key:"checkbox"}),[i]=o.splitVariantProps(t),[l,a]=cr(t),u=zi(t),{inputProps:c}=td(a,u,n),{isFocused:d,focusProps:f}=Le(),v=u.isSelected&&!t.isIndeterminate,p=t.isIndeterminate,b={"data-selected":v,"data-indeterminate":p,"data-invalid":t.isInvalid,"data-disabled":t.isDisabled,"data-focus":d||void 0};return P.jsxs(Zv,{"data-slot":"root",...i,...b,...l,children:[P.jsxs(Jv,{"data-slot":"indicator",...b,children:[v&&P.jsx(se.Check,{}),p&&P.jsx(se.Remove,{}),P.jsx(Bn,{as:"span",children:P.jsx("input",{...A(c,f),ref:n})})]}),t.children&&P.jsx(Xv,{"data-slot":"label",...b,children:t.children})]})});Ms.displayName="Checkbox";const dr=s.forwardRef((t,e)=>P.jsx(w.Stack,{ref:e,...t}));dr.displayName="Stack";const Bn=t=>{const{as:e="div",...r}=t;return P.jsx(Vi,{elementType:e,...r})};Bn.displayName="VisuallyHidden";const{withContext:Qv}=w.createRecipeContext({recipe:Nn}),eb=Qv("input"),As=s.forwardRef((t,e)=>{const r=s.useRef(null),n=de(w.mergeRefs(r,e)),o=w.useRecipe({recipe:Nn}),[i,l]=o.splitVariantProps(t),[a,u]=cr(l);return P.jsx(bp,{...u,children:P.jsx(eb,{ref:n,...i,...a,asChild:!0,children:P.jsx(Jf,{})})})});As.displayName="TextInput";const Is=s.forwardRef((t,e)=>P.jsx(w.Grid,{ref:e,...t}));Is.displayName="Grid";const tb=Object.assign(Is,{Item:w.GridItem}),{withProvider:rb,withContext:Pt}=w.createSlotRecipeContext({key:"select"}),nb=rb("div","root"),ob=Pt("button","trigger"),ib=Pt("span","triggerLabel"),lb=Pt("div","options"),ab=Pt("div","option"),sb=Pt("div","optionGroup"),Ns=()=>{const t=s.useContext(Fn);if(!(t!=null&&t.selectedKey))return null;const e=()=>{t==null||t.setSelectedKey(null)};return P.jsx(xt,{pointerEvents:"all",size:"2xs",variant:"ghost",tone:"primary","aria-label":"Clear Selection",onPress:e,children:P.jsx(se.Close,{})})};Ns.displayName="Select.ClearButton";const On=s.forwardRef(({children:t,isLoading:e,isDisabled:r,...n},o)=>{const i=w.useSlotRecipe({recipe:Ks}),[l,a]=i.splitVariantProps(n),[u,c]=cr(a),d={...c,isDisabled:e||r};return P.jsx(nb,{asChild:!0,ref:o,...l,...u,children:P.jsxs(Ap,{...d,children:[P.jsxs(w.chakra.div,{position:"relative",children:[P.jsx(ob,{zIndex:0,asChild:!0,children:P.jsx(tp,{children:P.jsx(ib,{asChild:!0,children:P.jsx(Np,{})})})}),P.jsxs(w.Flex,{position:"absolute",top:"0",bottom:"0",zIndex:1,right:"400",pointerEvents:"none",children:[P.jsx(w.Flex,{width:"600",my:"auto",children:P.jsx(Ns,{})}),P.jsx(w.Flex,{my:"auto",w:"600",h:"600",pointerEvents:"none",children:P.jsx(xe,{color:"neutral.9",asChild:!0,m:"auto",w:"400",h:"400",children:e?P.jsx(xe,{asChild:!0,animation:"spin",animationDuration:"slowest",children:P.jsx(se.Loop,{})}):P.jsx(se.KeyboardArrowDown,{})})})]})]}),P.jsx(xs,{children:t})]})})});On.displayName="Select.Root";const zn=t=>s.forwardRef(t),Hn=zn((t,e)=>{const[r,n]=cr(t);return P.jsx(lb,{asChild:!0,...r,children:P.jsx(Pp,{ref:e,...n})})});Hn.displayName="Select.Options";const Vn=zn((t,e)=>P.jsx(ab,{asChild:!0,ref:e,children:P.jsx(Cp,{...t})}));Vn.displayName="Select.Option";const jn=zn(({label:t,items:e,children:r,...n},o)=>{if(e&&typeof r!="function")throw new Error('SelectOptionGroup: When "items" is provided, "children" must be a function');return P.jsxs(wp,{ref:o,...n,children:[P.jsx(sb,{asChild:!0,children:P.jsx(xp,{children:t})}),e?P.jsx(Ta,{items:e,children:i=>typeof r=="function"?r(i):null}):r]})});jn.displayName="Select.OptionGroup";const ub={Root:On,Options:Hn,Option:Vn,OptionGroup:jn},{withProvider:cb,withContext:Et}=w.createSlotRecipeContext({key:"accordion"}),db=cb("div","root"),fb=Et("div","disclosure"),pb=Et("button","trigger"),vb=Et("div","panel"),bb=Et("div","accordionTitle"),nn=Et("div","headerContentRight"),_n=s.createContext(null),Bs=s.createContext(null),hb=s.forwardRef(({children:t,onExpandedChange:e,...r},n)=>{const o=sp({...r,onExpandedChange:a=>{e==null||e(a.size>0)}}),i=w.useSlotRecipe({key:"accordion"}),[l]=i.splitVariantProps(r);return P.jsx(Bs.Provider,{value:o,children:P.jsx(db,{"data-slot":"root",ref:n,...l,children:t})})}),gb=s.forwardRef(({children:t},e)=>{const r=s.useContext(_n);if(!r)throw new Error("Accordion.Header must be used within Accordion.Item");const n=s.Children.toArray(t).reduce((o,i)=>(s.isValidElement(i)&&i.type===nn?o.rightContent.push(i):o.main.push(i),o),{main:[],rightContent:[]});return P.jsxs(w.Flex,{justifyContent:"space-between",alignItems:"center",borderBottom:"solid-25",borderColor:"neutral.4",children:[P.jsxs(pb,{ref:w.mergeRefs(r.triggerRef,e),...r.buttonProps,"data-slot":"trigger",outline:r.isFocusVisible?void 0:"none",children:[P.jsx(se.KeyboardArrowRight,{}),P.jsx(bb,{"data-slot":"accordionTitle",children:n.main})]}),n.rightContent.length>0&&P.jsx(nn,{"data-slot":"headerContentRight",children:n.rightContent})]})}),mb=s.forwardRef((t,e)=>{const r=s.useContext(_n),n=de(w.mergeRefs(r==null?void 0:r.panelRef,e));return P.jsx(vb,{ref:n,...w.mergeProps({...r==null?void 0:r.panelProps,...t}),"data-slot":"panel",children:t.children})}),yb=s.forwardRef(({children:t,id:e,isDisabled:r,isExpanded:n,onExpandedChange:o,value:i},l)=>{const a=te(),c=i||(e||a),d=s.useContext(Bs),f=d?d.expandedKeys.has(c):n,v=ap({isExpanded:f,onExpandedChange:x=>{d&&d.toggleKey(c),o==null||o(x)}}),p=s.useRef(null),b=s.useRef(null),m=r||(d==null?void 0:d.isDisabled)||!1,{buttonProps:y,panelProps:$}=Jd({isExpanded:v.isExpanded,isDisabled:m},v,p),{buttonProps:E}=nr(y,b),{focusProps:C,isFocusVisible:K}=Le(),T={isExpanded:v.isExpanded,triggerRef:b,panelRef:p,buttonProps:A(E,C),panelProps:$,isFocusVisible:K};return P.jsx(_n.Provider,{value:T,children:P.jsx(fb,{"data-slot":"disclosure","data-value":c,"data-expanded":v.isExpanded,ref:l,children:t})})}),$b={Root:hb,Item:yb,Header:gb,Content:mb,HeaderRightContent:nn},xb=w.defineRecipe({className:"nimbus-loading-spinner",base:{display:"inline-flex",alignItems:"center",justifyContent:"center","& svg":{overflow:"visible",transform:"scale(calc(1 - 2/12))"},"& svg [data-svg-path='spinner-pointer']":{stroke:"colorPalette.10",animationName:"spin",animationDuration:"0.5s",animationTimingFunction:"linear",animationIterationCount:"infinite",transformOrigin:"center center 0"},"& svg [data-svg-path='spinner-circle']":{stroke:"colorPalette.5"}},variants:{size:{"2xs":{width:"350",height:"350"},xs:{width:"500",height:"500"},sm:{width:"600",height:"600"},md:{width:"800",height:"800"},lg:{width:"1000",height:"1000"}},tone:{primary:{colorPalette:"ctvioletAlpha"},white:{colorPalette:"whiteAlpha"}}},defaultVariants:{size:"sm",tone:"primary"}}),{withContext:Sb}=w.createRecipeContext({recipe:xb}),Pb=Sb("div"),Eb="M22.5 12C22.5 13.3789 22.2284 14.7443 21.7007 16.0182C21.1731 17.2921 20.3996 18.4496 19.4246 19.4246C18.4496 20.3996 17.2921 21.1731 16.0182 21.7007C14.7443 22.2284 13.3789 22.5 12 22.5C10.6211 22.5 9.25574 22.2284 7.98182 21.7007C6.7079 21.1731 5.55039 20.3996 4.57538 19.4246C3.60036 18.4496 2.82694 17.2921 2.29926 16.0182C1.77159 14.7443 1.5 13.3789 1.5 12C1.5 10.6211 1.77159 9.25574 2.29927 7.98182C2.82694 6.7079 3.60037 5.55039 4.57538 4.57538C5.5504 3.60036 6.70791 2.82694 7.98183 2.29926C9.25575 1.77159 10.6211 1.5 12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60037 19.4246 4.57538C20.3996 5.5504 21.1731 6.70791 21.7007 7.98183C22.2284 9.25575 22.5 10.6211 22.5 12L22.5 12Z",wb="M12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60036 19.4246 4.57538C20.3996 5.55039 21.1731 6.70791 21.7007 7.98183C22.2284 9.25574 22.5 10.6211 22.5 12",Os=s.forwardRef(({"aria-label":t="Loading data",...e},r)=>{const{progressBarProps:n}=of({isIndeterminate:!0,"aria-label":t,...e});return P.jsx(Pb,{ref:r,...A(e,n),"aria-label":t,children:P.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:[P.jsx("path",{d:Eb,"data-svg-path":"spinner-circle",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),P.jsx("path",{d:wb,"data-svg-path":"spinner-pointer",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})]})})});Os.displayName="LoadingSpinner";const Cb=w.defineSlotRecipe({slots:["root","header","content"],className:"nimbus-card",base:{root:{colorPalette:"slate",display:"inline-flex",alignItems:"flex-start",borderRadius:"300",focusVisibleRing:"outside"}},variants:{cardPadding:{sm:{root:{padding:"200"}},md:{root:{padding:"400"}},lg:{root:{padding:"600"}}},borderStyle:{none:{},outlined:{root:{border:"solid-25",borderColor:"colorPalette.3"}}},elevation:{none:{},elevated:{root:{shadow:"1"}}},backgroundStyle:{default:{root:{backgroundColor:"colorPalette.contrast"}},muted:{root:{backgroundColor:"colorPalette.2"}}}}}),{withProvider:Tb,withContext:zs}=w.createSlotRecipeContext({recipe:Cb}),kb=Tb("div","root"),Db=zs("div","header"),Rb=zs("div","content"),Wn=s.createContext(void 0),Un=s.forwardRef(({children:t,...e},r)=>{const{isFocused:n,isFocusVisible:o,focusProps:i}=Le(),[l,a]=s.useState(null),[u,c]=s.useState(null),d=s.useMemo(()=>({setHeader:a,setContent:c}),[a,c]);return P.jsx(Wn.Provider,{value:d,children:P.jsxs(kb,{ref:r,...A(e,i),"data-focus":n||void 0,"data-focus-visible":o||void 0,tabIndex:0,children:[P.jsxs(dr,{direction:"column",gap:"200",children:[l,u]}),t]})})});Un.displayName="Card.Root";const Gn=({children:t,...e})=>{const r=s.useContext(Wn);return s.useEffect(()=>{if(r){const n=P.jsx(Db,{...e,children:t});return r.setHeader(n),()=>r.setHeader(null)}},[t,e]),null};Gn.displayName="Card.Header";const qn=({children:t,...e})=>{const r=s.useContext(Wn);return s.useEffect(()=>{if(r){const n=P.jsx(Rb,{...e,children:t});return r.setContent(n),()=>r.setContent(null)}},[t,e]),null};qn.displayName="Card.Content";const Kb={Root:Un,Header:Gn,Content:qn},Lb=w.defineRecipe({className:"nimbus-badge",base:{display:"inline-flex",alignItems:"center",borderRadius:"200",justifyContent:"center",whiteSpace:"nowrap",verticalAlign:"middle",py:"25",fontWeight:"500",backgroundColor:"colorPalette.3",color:"colorPalette.11",w:"auto",userSelect:"none",_icon:{flexShrink:"0"}},variants:{size:{"2xs":{fontSize:"300",gap:"100",h:"600",lineHeight:"350",px:"200",_icon:{width:"400",height:"400"}},xs:{fontSize:"350",gap:"100",h:"800",lineHeight:"400",px:"300",_icon:{width:"500",height:"500"}},md:{fontSize:"400",gap:"200",h:"1000",lineHeight:"500",px:"400",_icon:{width:"600",height:"600"}}}},defaultVariants:{size:"md"}}),{withContext:Fb}=w.createRecipeContext({recipe:Lb}),Mb=Fb("span"),Ab=s.forwardRef((t,e)=>{const{as:r,asChild:n,children:o,...i}=t,l=s.useRef(null),a=de(w.mergeRefs(l,e)),u=r||"span";return P.jsx(Mb,{as:u,...A(i,{ref:a}),children:o})}),Ib=w.defineSlotRecipe({slots:["root","title","description","icon","actions","dismissButton"],className:"nimbus-alert",base:{root:{display:"inline-flex",flexDirection:"row",gap:"200",width:"100%"},icon:{marginTop:"50","& svg":{width:"500",height:"500",color:"colorPalette.11"}},title:{color:"colorPalette.11"},description:{color:"colorPalette.11"}},variants:{tone:{critical:{root:{colorPalette:"critical"}},info:{root:{colorPalette:"info"}},warning:{root:{colorPalette:"amber"}},positive:{root:{colorPalette:"positive"}}},variant:{flat:{},outlined:{root:{border:"solid-25",borderColor:"colorPalette.5",backgroundColor:"colorPalette.2",padding:"200",borderRadius:"200"}}}}}),{withProvider:Nb,withContext:wt}=w.createSlotRecipeContext({recipe:Ib}),Bb=Nb("div","root"),Ob=wt("div","title"),zb=wt("div","description"),Hb=wt("div","icon"),Vb=wt("div","actions"),jb=wt("div","dismissButton"),_b=t=>{switch(t){case"critical":return P.jsx(se.ErrorOutline,{});case"info":return P.jsx(se.Info,{});case"warning":return P.jsx(se.WarningAmber,{});case"positive":return P.jsx(se.CheckCircleOutline,{});default:return null}},Ct=s.createContext(void 0),Hs=s.forwardRef(({children:t,...e},r)=>{const[n,o]=s.useState(null),[i,l]=s.useState(null),[a,u]=s.useState(null),[c,d]=s.useState(null),f=s.useMemo(()=>({setTitle:o,setDescription:l,setActions:u,setDismiss:d}),[o,l,u,d]);return P.jsx(Ct.Provider,{value:f,children:P.jsxs(Bb,{ref:r,...e,role:"alert",children:[P.jsx(Hb,{alignItems:"flex-start",children:_b(e.tone)}),P.jsxs(dr,{flex:"1",gap:"200",children:[P.jsxs(xe,{children:[n,i]}),a]}),c,t]})})});Hs.displayName="Alert.Root";const Vs=({children:t,...e})=>{const r=s.useContext(Ct);return s.useEffect(()=>{if(r){const n=P.jsx(Ob,{...e,fontWeight:"600",children:t});return r.setTitle(n),()=>r.setTitle(null)}},[t,e]),null};Vs.displayName="Alert.Title";const js=({children:t,...e})=>{const r=s.useContext(Ct);return s.useEffect(()=>{if(r){const n=P.jsx(zb,{...e,children:t});return r.setDescription(n),()=>r.setDescription(null)}},[t,e]),null};js.displayName="Alert.Description";const _s=({children:t,...e})=>{const r=s.useContext(Ct);return s.useEffect(()=>{if(r){const n=P.jsx(Vb,{...e,children:t});return r.setActions(n),()=>r.setActions(null)}},[t,e]),null};_s.displayName="Alert.Actions";const Ws=({children:t,...e})=>{const r=s.useContext(Ct);return s.useEffect(()=>{if(r){const n=P.jsx(jb,{children:P.jsx(xt,{"aria-label":"Dismiss",...e,variant:"ghost",size:"2xs",children:P.jsx(se.Clear,{role:"img"})})});return r.setDismiss(n),()=>r.setDismiss(null)}},[t,e]),null};Ws.displayName="Alert.DismissButton";const Wb={Root:Hs,Title:Vs,Description:js,Actions:_s,DismissButton:Ws};var Jo,Qo,ei,ti;const Ub=w.defineSlotRecipe({slots:["root","button"],className:"nimbus-toggle-button-group",base:{root:{display:"inline-flex"},button:{...Be.base,...(Jo=Be.variants)==null?void 0:Jo.variant.outline,borderRadius:"0",borderRightWidth:"0","&:first-of-type":{borderLeftRadius:"200"},"&:last-of-type":{borderRightWidth:"1px",borderRightRadius:"200"},"&[data-selected=true]":(Qo=Be.variants)==null?void 0:Qo.variant.solid}},variants:{size:{xs:{button:(ei=Be.variants)==null?void 0:ei.size.xs},md:{button:(ti=Be.variants)==null?void 0:ti.size.md}},tone:{primary:{button:{colorPalette:"primary"}},critical:{button:{colorPalette:"critical"}},neutral:{button:{colorPalette:"neutral"}}}},defaultVariants:{size:"md"}}),{withContext:Gb,withProvider:qb}=w.createSlotRecipeContext({recipe:Ub}),Yb=qb(Op,"root"),Zb=Gb(Hp,"button"),Yn=s.forwardRef(({children:t,...e},r)=>P.jsx(Yb,{ref:r,...e,children:t}));Yn.displayName="ToggleButtonGroup.Root";const Zn=s.forwardRef(({children:t,...e},r)=>P.jsx(Zb,{...e,ref:r,children:t}));Zn.displayName="ToggleButtonGroup.Button";const Xb={Root:Yn,Button:Zn},Jb=`
17
+ */var Bi;function tf(){return Bi||(Bi=1,process.env.NODE_ENV!=="production"&&function(){function t(p,h){return p===h&&(p!==0||1/p===1/h)||p!==p&&h!==h}function e(p,h){c||i.startTransition===void 0||(c=!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 v=h();if(!f){var y=h();l(v,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}y=o({inst:{value:v,getSnapshot:h}});var $=y[0].inst,E=y[1];return u(function(){$.value=v,$.getSnapshot=h,n($)&&E({inst:$})},[p,v,h]),a(function(){return n($)&&E({inst:$}),p(function(){n($)&&E({inst:$})})},[p]),d(v),v}function n(p){var h=p.getSnapshot;p=p.value;try{var v=h();return!l(p,v)}catch{return!0}}function r(p,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=s,l=typeof Object.is=="function"?Object.is:t,o=i.useState,a=i.useEffect,u=i.useLayoutEffect,d=i.useDebugValue,c=!1,f=!1,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Ln.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ln}var Oi;function nf(){return Oi||(Oi=1,process.env.NODE_ENV==="production"?At.exports=ef():At.exports=tf()),At.exports}var rf=nf();function lf(t){let{value:e=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:l,formatOptions:o={style:"percent"}}=t,a=Q(t,{labelable:!0}),{labelProps:u,fieldProps:d}=yr({...t,labelElementType:"span"});e=Ot(e,n,r);let c=(e-n)/(r-n),f=Kd(o);if(!l&&!i){let b=o.style==="percent"?c:e;i=f.format(b)}return{progressBarProps:A(a,{...d,"aria-valuenow":l?void 0:e,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":l?void 0:i,role:"progressbar"}),labelProps:u}}const ba=new WeakMap;function of(t,e,n){let{keyboardDelegate:r,isDisabled:i,isRequired:l,name:o,validationBehavior:a="aria"}=t,u=hr({usage:"search",sensitivity:"base"}),d=s.useMemo(()=>r||new Sr(e.collection,e.disabledKeys,n,u),[r,e.collection,e.disabledKeys,u,n]),{menuTriggerProps:c,menuProps:f}=Zc({isDisabled:i,type:"listbox"},e,n),b=F=>{switch(F.key){case"ArrowLeft":{var N,L;F.preventDefault();let B=e.selectedKey!=null?(N=d.getKeyAbove)===null||N===void 0?void 0:N.call(d,e.selectedKey):(L=d.getFirstKey)===null||L===void 0?void 0:L.call(d);B&&e.setSelectedKey(B);break}case"ArrowRight":{var g,R;F.preventDefault();let B=e.selectedKey!=null?(g=d.getKeyBelow)===null||g===void 0?void 0:g.call(d,e.selectedKey):(R=d.getFirstKey)===null||R===void 0?void 0:R.call(d);B&&e.setSelectedKey(B);break}}},{typeSelectProps:p}=Ko({keyboardDelegate:d,selectionManager:e.selectionManager,onTypeSelect(F){e.setSelectedKey(F)}}),{isInvalid:h,validationErrors:v,validationDetails:y}=e.displayValidation,{labelProps:$,fieldProps:E,descriptionProps:C,errorMessageProps:K}=$r({...t,labelElementType:"span",isInvalid:h,errorMessage:t.errorMessage||v});p.onKeyDown=p.onKeyDownCapture,delete p.onKeyDownCapture;let T=Q(t,{labelable:!0}),x=A(p,c,E),M=te();return ba.set(e,{isDisabled:i,isRequired:l,name:o,validationBehavior:a}),{labelProps:{...$,onClick:()=>{if(!t.isDisabled){var F;(F=n.current)===null||F===void 0||F.focus(),wl("keyboard")}}},triggerProps:A(T,{...x,isDisabled:i,onKeyDown:Te(x.onKeyDown,b,t.onKeyDown),onKeyUp:t.onKeyUp,"aria-labelledby":[M,x["aria-labelledby"],x["aria-label"]&&!x["aria-labelledby"]?x.id:null].filter(Boolean).join(" "),onFocus(F){e.isFocused||(t.onFocus&&t.onFocus(F),t.onFocusChange&&t.onFocusChange(!0),e.setFocused(!0))},onBlur(F){e.isOpen||(t.onBlur&&t.onBlur(F),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))}}),valueProps:{id:M},menuProps:{...f,autoFocus:e.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:F=>{F.currentTarget.contains(F.relatedTarget)||(t.onBlur&&t.onBlur(F),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))},"aria-labelledby":[E["aria-labelledby"],x["aria-label"]&&!E["aria-labelledby"]?x.id:null].filter(Boolean).join(" ")},descriptionProps:C,errorMessageProps:K,isInvalid:h,validationErrors:v,validationDetails:y}}function af(t,e,n){let r=ba.get(e)||{},{autoComplete:i,name:l=r.name,isDisabled:o=r.isDisabled}=t,{validationBehavior:a,isRequired:u}=r,{visuallyHiddenProps:d}=zl();dr(t.selectRef,e.selectedKey,e.setSelectedKey),vr({validationBehavior:a,focus:()=>{var f;return(f=n.current)===null||f===void 0?void 0:f.focus()}},e,t.selectRef);var c;return{containerProps:{...d,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:i,disabled:o,required:a==="native"&&u,name:l,value:(c=e.selectedKey)!==null&&c!==void 0?c:void 0,onChange:f=>e.setSelectedKey(f.target.value)}}}function sf(t){let{state:e,triggerRef:n,label:r,name:i,isDisabled:l}=t,o=s.useRef(null),{containerProps:a,selectProps:u}=af({...t,selectRef:o},e,n);var d;return e.collection.size<=300?s.createElement("div",{...a,"data-testid":"hidden-select-container"},s.createElement("label",null,r,s.createElement("select",{...u,ref:o},s.createElement("option",null),[...e.collection.getKeys()].map(c=>{let f=e.collection.getItem(c);if(f&&f.type==="item")return s.createElement("option",{key:f.key,value:f.key},f.textValue)})))):i?s.createElement("input",{type:"hidden",autoComplete:u.autoComplete,name:i,disabled:l,value:(d=e.selectedKey)!==null&&d!==void 0?d:""}):null}function uf(t,e){let n=Q(t,{labelable:!0}),{hoverProps:r}=Ue({onHoverStart:()=>e==null?void 0:e.open(!0),onHoverEnd:()=>e==null?void 0:e.close()});return{tooltipProps:A(n,r,{role:"tooltip"})}}function df(t,e,n){let{isDisabled:r,trigger:i}=t,l=te(),o=s.useRef(!1),a=s.useRef(!1),u=()=>{(o.current||a.current)&&e.open(a.current)},d=$=>{!o.current&&!a.current&&e.close($)};s.useEffect(()=>{let $=E=>{n&&n.current&&E.key==="Escape"&&(E.stopPropagation(),e.close(!0))};if(e.isOpen)return document.addEventListener("keydown",$,!0),()=>{document.removeEventListener("keydown",$,!0)}},[n,e]);let c=()=>{i!=="focus"&&(yt()==="pointer"?o.current=!0:o.current=!1,u())},f=()=>{i!=="focus"&&(a.current=!1,o.current=!1,d())},b=()=>{a.current=!1,o.current=!1,d(!0)},p=()=>{vt()&&(a.current=!0,u())},h=()=>{a.current=!1,o.current=!1,d(!0)},{hoverProps:v}=Ue({isDisabled:r,onHoverStart:c,onHoverEnd:f}),{focusableProps:y}=it({isDisabled:r,onFocus:p,onBlur:h},n);return{triggerProps:{"aria-describedby":e.isOpen?l:void 0,...A(y,v,{onPointerDown:b,onKeyDown:b,tabIndex:void 0})},tooltipProps:{id:l}}}const Be=w.defineRecipe({className:"nimbus-button",base:{borderRadius:"200",display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",borderWidth:"1px",borderColor:"transparent",cursor:"button",flexShrink:"0",outline:"0",lineHeight:"1.2",isolation:"isolate",fontWeight:"500",transitionProperty:"common",transitionDuration:"moderate",focusVisibleRing:"outside",_disabled:{layerStyle:"disabled"},_icon:{flexShrink:"0"}},variants:{size:{"2xs":{h:"600",minW:"600",fontSize:"300",fontWeight:"500",lineHeight:"400",px:"200",gap:"100",_icon:{width:"400",height:"400"}},xs:{h:"800",minW:"800",fontSize:"350",fontWeight:"500",lineHeight:"400",px:"300",gap:"100",_icon:{width:"500",height:"500"}},md:{h:"1000",minW:"1000",fontSize:"400",lineHeight:"500",px:"400",gap:"200",_icon:{width:"600",height:"600"}}},variant:{solid:{bg:"colorPalette.9",color:"colorPalette.contrast",_hover:{bg:"colorPalette.10"},_expanded:{bg:"colorPalette.10"}},subtle:{bg:"colorPalette.3",color:"colorPalette.11",_hover:{bg:"colorPalette.4"},_expanded:{bg:"colorPalette.4"}},outline:{borderWidth:"1px",borderColor:"colorPalette.7",color:"colorPalette.11",transitionProperty:"background-color, border-color, color",transitionDuration:"moderate",_hover:{bg:"colorPalette.3",borderColor:"colorPalette.8"},_expanded:{bg:"colorPalette.subtle"}},ghost:{color:"colorPalette.11",_hover:{bg:"colorPalette.4"},_expanded:{bg:"colorPalette.4"}},link:{color:"colorPalette.11",_hover:{textDecoration:"underline"}}},tone:{primary:{colorPalette:"primary"},critical:{colorPalette:"critical"},neutral:{colorPalette:"neutral"},info:{colorPalette:"info"}}},defaultVariants:{size:"md",variant:"subtle"}});function cf(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var ff=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,pf=cf(function(t){return ff.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});const{withContext:bf}=w.createRecipeContext({recipe:Be}),hf=bf("button",{defaultProps:{type:"button"},shouldForwardProp(t,e){const n=!(e!=null&&e.includes(t))&&!w.defaultSystem.isValidProperty(t);return pf(t)&&n&&!t.includes("onPress")}}),ln=s.forwardRef((t,e)=>{const{as:n,asChild:r,children:i,...l}=t,o=s.useRef(null),a=ce(w.mergeRefs(o,e)),u=n||(r?"a":"button")||"button",{buttonProps:d}=rn({...l,elementType:u},a);return P.jsx(hf,{...A(l,d,{as:n,asChild:r,ref:a}),children:i})});ln.displayName="Button";const gf=s.forwardRef(function(e,n){const{children:r,portalled:i=!0,portalRef:l,backdrop:o=!0,...a}=e;return P.jsxs(w.Portal,{disabled:!i,container:l,children:[o&&P.jsx(w.Dialog.Backdrop,{}),P.jsx(w.Dialog.Positioner,{children:P.jsx(w.Dialog.Content,{ref:n,...a,asChild:!1,children:r})})]})}),mf=s.forwardRef(function(e,n){return P.jsx(w.Dialog.CloseTrigger,{position:"absolute",top:"2",insetEnd:"2",...e,asChild:!0,children:P.jsx(ln,{size:"xs",ref:n,children:e.children})})}),vf=w.Dialog.Root,yf=w.Dialog.Footer,$f=w.Dialog.Header,xf=w.Dialog.Body,Sf=w.Dialog.Backdrop,Pf=w.Dialog.Title,Ef=w.Dialog.Description,wf=w.Dialog.Trigger,Cf=w.Dialog.ActionTrigger,xt=s.forwardRef(({children:t,...e},n)=>P.jsx(ln,{px:0,py:0,ref:n,...e,children:t}));xt.displayName="IconButton";const ha=w.defineRecipe({className:"nimbus-link",base:{display:"inline-flex",alignItems:"center",color:"colorPalette.11",borderRadius:"100",focusVisibleRing:"outside",bg:"transparent",outline:"none",cursor:"pointer",textDecoration:"underline",textUnderlineOffset:"3px",_hover:{textDecorationThickness:"12%"}},variants:{size:{xs:{fontSize:"300",lineHeight:"450"},sm:{fontSize:"350",lineHeight:"500"},md:{fontSize:"400",lineHeight:"600"}},fontColor:{primary:{color:"primary"},inherit:{color:"inherit"}}}}),{withContext:Tf}=w.createRecipeContext({recipe:ha}),kf=Tf("a"),ga=s.forwardRef((t,e)=>{const{as:n,asChild:r,children:i,...l}=t,o=s.useRef(null),a=ce(w.mergeRefs(o,e)),u=n||(r?"span":"a")||"a",{linkProps:d}=bd({...l,elementType:u},a);return P.jsx(kf,{...A(l,d,{as:n,asChild:r,ref:a}),children:i})});ga.displayName="Link";const Df=t=>P.jsx(w.List.Root,{...t}),Rf=t=>P.jsx(w.List.Item,{...t}),ma=s.forwardRef((t,e)=>P.jsx(w.SimpleGrid,{ref:e,...t}));ma.displayName="SimpleGrid";const Kf=Object.assign(ma,{Item:w.GridItem}),Lf=t=>P.jsx(w.Table.Root,{...t}),Ff=t=>P.jsx(w.Table.ColumnGroup,{...t}),Mf=t=>P.jsx(w.Table.Column,{...t}),Af=t=>P.jsx(w.Table.Header,{...t}),If=t=>P.jsx(w.Table.Footer,{...t}),Nf=t=>P.jsx(w.Table.Row,{...t}),Bf=t=>P.jsx(w.Table.Cell,{...t}),Of=t=>P.jsx(w.Table.Body,{...t}),zf=t=>P.jsx(w.Table.ColumnHeader,{...t}),va=s.forwardRef((t,e)=>P.jsx(w.Text,{ref:e,...t}));va.displayName="Text";s.createContext(null);s.createContext(null);s.createContext(null);s.createContext(null);s.createContext(null);const Hf=s.createContext({}),Gt=Symbol("default");function Ge({values:t,children:e}){for(let[n,r]of t)e=s.createElement(n.Provider,{value:r},e);return e}function ae(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:l,defaultStyle:o,values:a}=t;return s.useMemo(()=>{let u,d,c;return typeof e=="function"?u=e({...a,defaultClassName:i}):u=e,typeof n=="function"?d=n({...a,defaultStyle:o||{}}):d=n,typeof r=="function"?c=r({...a,defaultChildren:l}):r==null?c=l:c=r,{className:u??i,style:d||o?{...o,...d}:void 0,children:c??l,"data-rac":""}},[e,n,r,i,l,o,a])}function on(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||Gt;if(!n.slots[r]){let i=new Intl.ListFormat().format(Object.keys(n.slots).map(o=>`"${o}"`)),l=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${l} Valid slot names are ${i}.`)}return n.slots[r]}return n}function de(t,e,n){let r=on(n,t.slot)||{},{ref:i,...l}=r,o=ce(s.useMemo(()=>ll(e,i),[e,i])),a=A(l,t);return"style"in l&&l.style&&"style"in t&&t.style&&(typeof l.style=="function"||typeof t.style=="function"?a.style=u=>{let d=typeof l.style=="function"?l.style(u):l.style,c={...u.defaultStyle,...d},f=typeof t.style=="function"?t.style({...u,defaultStyle:c}):t.style;return{...c,...f}}:a.style={...l.style,...t.style}),[a,o]}function Pr(t=!0){let[e,n]=s.useState(t),r=s.useRef(!1),i=s.useCallback(l=>{r.current=!0,n(!!l)},[]);return H(()=>{r.current||n(!1)},[]),[i,e]}function ya(t){const e=/^(data-.*)$/;let n={};for(const r in t)e.test(r)||(n[r]=t[r]);return n}class Er{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new Er(this.type,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}constructor(e,n){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=e,this.key=n}}class wr{get size(){return this.keyMap.size}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),i=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.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);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r: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);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n: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}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");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}UNSTABLE_filter(e){let n=new wr,r=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let l=i.clone(),o=null;for(let a of this.getChildren(i.key))if(zi(a,e,this,n)){let u=a.clone();o==null&&(l.firstChildKey=u.key),n.firstKey==null&&(n.firstKey=l.key),o&&o.parentKey===u.parentKey?(o.nextKey=u.key,u.prevKey=o.key):u.prevKey=null,u.nextKey=null,n.addNode(u),o=u}o&&(o.type!=="header"?(l.lastChildKey=o.key,r==null?l.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=l.key,l.prevKey=r.key),l.nextKey=null,r=l,n.addNode(l)):(n.firstKey===l.key&&(n.firstKey=null),n.removeNode(o.key)))}else if(i.type==="separator"){let l=i.clone();l.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=l.key,l.prevKey=r.key,r=l,n.addNode(l))}else{let l=i.clone();zi(l,e,this,n)&&(n.firstKey==null&&(n.firstKey=l.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===l.parentKey?(r.nextKey=l.key,l.prevKey=r.key):l.prevKey=null,l.nextKey=null,n.addNode(l),r=l)}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let i;r.prevKey!=null&&(i=n.getItem(r.prevKey),i.nextKey=null),n.removeNode(r.key),r=i}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function zi(t,e,n,r){if(t.type==="subdialogtrigger"||t.type==="submenutrigger"){let i=[...n.getChildren(t.key)][0];if(i&&e(i.textValue)){let l=i.clone();return r.addNode(l),!0}else return!1}else return t.type==="header"?!0:e(t.textValue)}class $a{*[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||e===void 0?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e)}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.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,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode,this.invalidateChildIndices(n),this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(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.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}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}}class rt extends $a{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof rt?this.parentNode.level+(this.node.type==="item"?1:0):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var e,n,r;let i=this.nextVisibleSibling,l=this.getMutableNode();l.index=this.index,l.level=this.level,l.parentKey=this.parentNode instanceof rt?this.parentNode.node.key:null;var o;l.prevKey=(o=(e=this.previousVisibleSibling)===null||e===void 0?void 0:e.node.key)!==null&&o!==void 0?o:null;var a;l.nextKey=(a=i==null?void 0:i.node.key)!==null&&a!==void 0?a:null,l.hasChildNodes=!!this.firstChild;var u;l.firstChildKey=(u=(n=this.firstVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&u!==void 0?u:null;var d;if(l.lastChildKey=(d=(r=this.lastVisibleChild)===null||r===void 0?void 0:r.node.key)!==null&&d!==void 0?d:null,(l.colSpan!=null||l.colIndex!=null)&&i){var c,f;let b=((c=l.colIndex)!==null&&c!==void 0?c:l.index)+((f=l.colSpan)!==null&&f!==void 0?f:1);if(b!==i.node.colIndex){let p=i.getMutableNode();p.colIndex=b}}}setProps(e,n,r,i){let l=this.getMutableNode(),{value:o,textValue:a,id:u,...d}=e;if(d.ref=n,l.props=d,l.rendered=r,l.render=i,l.value=o,l.textValue=a||(typeof d.children=="string"?d.children:"")||e["aria-label"]||"",u!=null&&u!==l.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");l.key=u}d.colSpan!=null&&(l.colSpan=d.colSpan),this.hasSetProps=!0,this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(n){let r=n==="none";if(e.isHidden!==r){var i,l;(((i=e.parentNode)===null||i===void 0?void 0:i.firstVisibleChild)===e||((l=e.parentNode)===null||l===void 0?void 0:l.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let o=e.previousVisibleSibling,a=e.nextVisibleSibling;o&&e.ownerDocument.markDirty(o),a&&e.ownerDocument.markDirty(a),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new Er(e,`react-aria-${++n.nodeId}`)}}class Vf extends $a{get isConnected(){return this.isMounted}createElement(e){return new rt(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden)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 r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let l of this.dirtyNodes)l instanceof rt&&(!l.isConnected||l.isHidden)?this.removeNode(l):l.updateChildIndices();for(let l of this.dirtyNodes)l instanceof rt&&(l.isConnected&&!l.isHidden&&(l.updateNode(),this.addNode(l)),l.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,n,r,i;this.nextCollection.commit((r=(e=this.firstVisibleChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(i=(n=this.lastVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&i!==void 0?i: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;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)}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.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}}function xa(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:l=[]}=t,o=s.useMemo(()=>new WeakMap,l);return s.useMemo(()=>{if(n&&typeof e=="function"){let d=[];for(let c of n){let f=o.get(c);if(!f){f=e(c);var a,u;let b=(u=(a=f.props.id)!==null&&a!==void 0?a:c.key)!==null&&u!==void 0?u:c.id;if(b==null)throw new Error("Could not determine key for item");r&&(b=r+":"+b),f=s.cloneElement(f,i?{key:b,id:b,value:c}:{key:b}),o.set(c,f)}d.push(f)}return d}else if(typeof e!="function")return e},[e,n,o,r,i])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const qt=s.createContext(!1);function jf(t){if(s.useContext(qt))return s.createElement(s.Fragment,null,t.children);let n=s.createElement(qt.Provider,{value:!0},t.children);return s.createElement("template",{"data-react-aria-hidden":!0},n)}function Cr(t){let e=(n,r)=>s.useContext(qt)?null:t(n,r);return e.displayName=t.displayName||t.name,s.forwardRef(e)}function _f(){return s.useContext(qt)}const Sa=s.createContext(!1),$t=s.createContext(null);function Pa(t){if(s.useContext($t))return t.content;let{collection:n,document:r}=qf(t.createCollection);return s.createElement(s.Fragment,null,s.createElement(jf,null,s.createElement($t.Provider,{value:r},t.content)),s.createElement(Wf,{render:t.children,collection:n}))}function Wf({collection:t,render:e}){return e(t)}function Uf(t,e,n){let r=_e(),i=s.useRef(r);i.current=r;let l=s.useCallback(()=>i.current?n():e(),[e,n]);return rf.useSyncExternalStore(t,l)}const Gf=typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore:Uf;function qf(t){let[e]=s.useState(()=>new Vf((t==null?void 0:t())||new wr)),n=s.useCallback(o=>e.subscribe(o),[e]),r=s.useCallback(()=>{let o=e.getCollection();return e.isSSR&&e.resetAfterSSR(),o},[e]),i=s.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),l=Gf(n,r,i);return H(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:l,document:e}}const nr=s.createContext(null);function Ea(t,e,n,r,i,l){let o=s.useCallback(u=>{u==null||u.setProps(e,n,r,l)},[e,n,r,l]),a=s.useContext(nr);if(a){let u=a.ownerDocument.nodesByProps.get(e);return u||(u=a.ownerDocument.createElement(t),u.setProps(e,n,r,l),a.appendChild(u),a.ownerDocument.updateCollection(),a.ownerDocument.nodesByProps.set(e,u)),i?s.createElement(nr.Provider,{value:u},i):null}return s.createElement(t,{ref:o},i)}function wa(t,e){let n=({node:i})=>e(i.props,i.props.ref,i),r=s.forwardRef((i,l)=>{let o=s.useContext(Vt);if(!s.useContext(Sa)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(i,l)}return Ea(t,i,l,"children"in i?i.children:null,null,u=>s.createElement(Vt.Provider,{value:o},s.createElement(n,{node:u})))});return r.displayName=e.name,r}function Yf(t,e,n=Ca){let r=({node:l})=>e(l.props,l.props.ref,l),i=s.forwardRef((l,o)=>{let a=n(l);var u;return(u=Ea(t,l,o,null,a,d=>s.createElement(r,{node:d})))!==null&&u!==void 0?u:s.createElement(s.Fragment,null)});return i.displayName=e.name,i}function Ca(t){return xa({...t,addIdAndValue:!0})}const Hi=s.createContext(null);function Ta(t){let e=s.useContext(Hi),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),i=Ca({...t,idScope:r,dependencies:n});return s.useContext($t)&&(i=s.createElement(Zf,null,i)),e=s.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),s.createElement(Hi.Provider,{value:e},i)}function Zf({children:t}){let e=s.useContext($t),n=s.useMemo(()=>s.createElement($t.Provider,{value:null},s.createElement(Sa.Provider,{value:!0},t)),[t]);return _e()?s.createElement(nr.Provider,{value:e},n):je.createPortal(n,e)}const rr=s.createContext({});let Xf=t=>{let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,...i}=t;return i};const Jf=Cr(function(e,n){[e,n]=de(e,n,rr);let{hoverProps:r,isHovered:i}=Ue(e),{isFocused:l,isFocusVisible:o,focusProps:a}=Le({isTextInput:!0,autoFocus:e.autoFocus}),u=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",d=ae({...e,values:{isHovered:i,isFocused:l,isFocusVisible:o,isDisabled:e.disabled||!1,isInvalid:u},defaultClassName:"react-aria-Input"});return s.createElement("input",{...A(Xf(e),a,r),...d,ref:n,"data-focused":l||void 0,"data-disabled":e.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":o||void 0,"data-invalid":u||void 0})}),ka=s.createContext({}),Qf=s.createContext(null),ep=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),Tr=s.createContext({}),tp=Cr(function(e,n){[e,n]=de(e,n,Tr),e=np(e);let r=e,{isPending:i}=r,{buttonProps:l,isPressed:o}=rn(e,n),{focusProps:a,isFocused:u,isFocusVisible:d}=Le(e),{hoverProps:c,isHovered:f}=Ue({...e,isDisabled:e.isDisabled||i}),b={isHovered:f,isPressed:(r.isPressed||o)&&!i,isFocused:u,isFocusVisible:d,isDisabled:e.isDisabled||!1,isPending:i??!1},p=ae({...e,values:b,defaultClassName:"react-aria-Button"}),h=te(l.id),v=te(),y=l["aria-labelledby"];i&&(y?y=`${y} ${v}`:l["aria-label"]&&(y=`${h} ${v}`));let $=s.useRef(i);return s.useEffect(()=>{let E={"aria-labelledby":y||h};(!$.current&&u&&i||$.current&&u&&!i)&&yi(E,"assertive"),$.current=i},[i,u,y,h]),s.createElement("button",{...Q(e,{propNames:ep}),...A(l,a,c),...p,type:l.type==="submit"&&i?"button":l.type,id:h,ref:n,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":i?"true":l["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":b.isPressed||void 0,"data-hovered":f||void 0,"data-focused":u||void 0,"data-pending":i||void 0,"data-focus-visible":d||void 0},s.createElement(Qf.Provider,{value:{id:v}},p.children))});function np(t){return t.isPending&&(t.onPress=void 0,t.onPressStart=void 0,t.onPressEnd=void 0,t.onPressChange=void 0,t.onPressUp=void 0,t.onKeyDown=void 0,t.onKeyUp=void 0,t.onClick=void 0,t.href=void 0),t}const an=s.createContext({}),Da=s.createContext(null);class Vi{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=o=>{if(this.keyMap.set(o.key,o),o.childNodes&&o.type==="section")for(let a of o.childNodes)n(a)};for(let o of e)n(o);let r=null,i=0;for(let[o,a]of this.keyMap)r?(r.nextKey=o,a.prevKey=r.key):(this.firstKey=o,a.prevKey=void 0),a.type==="item"&&(a.index=i++),r=a,r.nextKey=void 0;var l;this.lastKey=(l=r==null?void 0:r.key)!==null&&l!==void 0?l:null}}class be extends Set{constructor(e,n,r){super(e),e instanceof be?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function rp(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function ip(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:l="all"}=t,o=s.useRef(!1),[,a]=s.useState(!1),u=s.useRef(null),d=s.useRef(null),[,c]=s.useState(null),f=s.useMemo(()=>ji(t.selectedKeys),[t.selectedKeys]),b=s.useMemo(()=>ji(t.defaultSelectedKeys,new be),[t.defaultSelectedKeys]),[p,h]=Re(f,b,t.onSelectionChange),v=s.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[y,$]=s.useState(i);i==="replace"&&y==="toggle"&&typeof p=="object"&&p.size===0&&$("replace");let E=s.useRef(i);return s.useEffect(()=>{i!==E.current&&($(i),E.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:y,setSelectionBehavior:$,get isFocused(){return o.current},setFocused(C){o.current=C,a(C)},get focusedKey(){return u.current},get childFocusStrategy(){return d.current},setFocusedKey(C,K="first"){u.current=C,d.current=K,c(C)},selectedKeys:p,setSelectedKeys(C){(r||!rp(C,p))&&h(C)},disabledKeys:v,disabledBehavior:l}}function ji(t,e){return t?t==="all"?"all":new be(t):e}class kr{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 r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Rn(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Rn(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n: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 be([n],n,n);else{let o=this.state.selectedKeys;var i;let a=(i=o.anchorKey)!==null&&i!==void 0?i:n;r=new be(o,a,n);var l;for(let u of this.getKeyRange(a,(l=o.currentKey)!==null&&l!==void 0?l:n))r.delete(u);for(let u of this.getKeyRange(n,a))this.canSelectItem(u)&&r.add(u)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Rn(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],l=e;for(;l!=null;){let o=this.collection.getItem(l);if(o&&(o.type==="item"||o.type==="cell"&&this.allowsCellSelection)&&i.push(l),l===n)return i;l=this.collection.getKeyAfter(l)}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 be(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 be([n],n,n):new be;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new be;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let o=this.collection.getItem(r);(o==null?void 0:o.type)==="item"&&e.push(r);var l;o!=null&&o.hasChildNodes&&(this.allowsCellSelection||o.type!=="item")&&n((l=(i=_c(Lo(o,this.collection)))===null||i===void 0?void 0:i.key)!==null&&l!==void 0?l:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}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 be)}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){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}withCollection(e){return new kr(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function Ra(t){let{filter:e,layoutDelegate:n}=t,r=ip(t),i=s.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),l=s.useCallback(d=>e?new Vi(e(d)):new Vi(d),[e]),o=s.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),a=jc(t,l,o),u=s.useMemo(()=>new kr(a,r,{layoutDelegate:n}),[a,r,n]);return Ka(a,u),{collection:a,disabledKeys:i,selectionManager:u}}function lp(t,e){let n=s.useMemo(()=>e?t.collection.UNSTABLE_filter(e):t.collection,[t.collection,e]),r=t.selectionManager.withCollection(n);return Ka(n,r),{collection:n,selectionManager:r,disabledKeys:t.disabledKeys}}function Ka(t,e){const n=s.useRef(null);s.useEffect(()=>{if(e.focusedKey!=null&&!t.getItem(e.focusedKey)&&n.current){const c=n.current.getItem(e.focusedKey),f=[...n.current.getKeys()].map($=>{const E=n.current.getItem($);return(E==null?void 0:E.type)==="item"?E:null}).filter($=>$!==null),b=[...t.getKeys()].map($=>{const E=t.getItem($);return(E==null?void 0:E.type)==="item"?E:null}).filter($=>$!==null);var r,i;const p=((r=f==null?void 0:f.length)!==null&&r!==void 0?r:0)-((i=b==null?void 0:b.length)!==null&&i!==void 0?i:0);var l,o,a;let h=Math.min(p>1?Math.max(((l=c==null?void 0:c.index)!==null&&l!==void 0?l:0)-p+1,0):(o=c==null?void 0:c.index)!==null&&o!==void 0?o:0,((a=b==null?void 0:b.length)!==null&&a!==void 0?a:0)-1),v=null,y=!1;for(;h>=0;){if(!e.isDisabled(b[h].key)){v=b[h];break}if(h<b.length-1&&!y)h++;else{y=!0;var u,d;h>((u=c==null?void 0:c.index)!==null&&u!==void 0?u:0)&&(h=(d=c==null?void 0:c.index)!==null&&d!==void 0?d:0),h--}}e.setFocusedKey(v?v.key:null)}n.current=t},[t,e])}function op(t){var e;let[n,r]=Re(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),i=s.useMemo(()=>n!=null?[n]:[],[n]),{collection:l,disabledKeys:o,selectionManager:a}=Ra({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:d=>{if(d==="all")return;var c;let f=(c=d.values().next().value)!==null&&c!==void 0?c:null;f===n&&t.onSelectionChange&&t.onSelectionChange(f),r(f)}}),u=n!=null?l.getItem(n):null;return{collection:l,disabledKeys:o,selectionManager:a,selectedKey:n,setSelectedKey:r,selectedItem:u}}function sn(t){let[e,n]=Re(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=s.useCallback(()=>{n(!0)},[n]),i=s.useCallback(()=>{n(!1)},[n]),l=s.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:i,toggle:l}}function ap(t){let[e,n]=Re(t.isExpanded,t.defaultExpanded||!1,t.onExpandedChange);const r=s.useCallback(()=>{n(!0)},[n]),i=s.useCallback(()=>{n(!1)},[n]),l=s.useCallback(()=>{n(!e)},[n,e]);return{isExpanded:e,setExpanded:n,expand:r,collapse:i,toggle:l}}function sp(t){let{allowsMultipleExpanded:e=!1,isDisabled:n=!1}=t,[r,i]=Re(s.useMemo(()=>t.expandedKeys?new Set(t.expandedKeys):void 0,[t.expandedKeys]),s.useMemo(()=>t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,[t.defaultExpandedKeys]),t.onExpandedChange);return s.useEffect(()=>{!e&&r.size>1&&i(new Set([r.values().next().value]))}),{allowsMultipleExpanded:e,isDisabled:n,expandedKeys:r,setExpandedKeys:i,toggleKey(l){let o;e?(o=new Set(r),o.has(l)?o.delete(l):o.add(l)):o=new Set(r.has(l)?[]:[l]),i(o)}}}function up(t){let e=sn(t),[n,r]=s.useState(null),[i,l]=s.useState([]),o=()=>{l([]),e.close()};return{focusStrategy:n,...e,open(d=null){r(d),e.open()},toggle(d=null){r(d),e.toggle()},close(){o()},expandedKeysStack:i,openSubmenu:(d,c)=>{l(f=>c>f.length?f:[...f.slice(0,c),d])},closeSubmenu:(d,c)=>{l(f=>f[c]===d?f.slice(0,c):f)}}}function dp(t){let e=sn(t),[n,r]=s.useState(null),i=op({...t,onSelectionChange:u=>{t.onSelectionChange!=null&&t.onSelectionChange(u),e.close(),l.commitValidation()}}),l=mr({...t,value:i.selectedKey}),[o,a]=s.useState(!1);return{...l,...i,...e,focusStrategy:n,open(u=null){i.collection.size!==0&&(r(u),e.open())},toggle(u=null){i.collection.size!==0&&(r(u),e.toggle())},isFocused:o,setFocused:a}}const cp=1500,_i=500;let Ie={},fp=0,ut=!1,$e=null,Ne=null;function La(t={}){let{delay:e=cp,closeDelay:n=_i}=t,{isOpen:r,open:i,close:l}=sn(t),o=s.useMemo(()=>`${++fp}`,[]),a=s.useRef(null),u=s.useRef(l),d=()=>{Ie[o]=b},c=()=>{for(let h in Ie)h!==o&&(Ie[h](!0),delete Ie[h])},f=()=>{a.current&&clearTimeout(a.current),a.current=null,c(),d(),ut=!0,i(),$e&&(clearTimeout($e),$e=null),Ne&&(clearTimeout(Ne),Ne=null)},b=h=>{h||n<=0?(a.current&&clearTimeout(a.current),a.current=null,u.current()):a.current||(a.current=setTimeout(()=>{a.current=null,u.current()},n)),$e&&(clearTimeout($e),$e=null),ut&&(Ne&&clearTimeout(Ne),Ne=setTimeout(()=>{delete Ie[o],Ne=null,ut=!1},Math.max(_i,n)))},p=()=>{c(),d(),!r&&!$e&&!ut?$e=setTimeout(()=>{$e=null,ut=!0,f()},e):r||f()};return s.useEffect(()=>{u.current=l},[l]),s.useEffect(()=>()=>{a.current&&clearTimeout(a.current),Ie[o]&&delete Ie[o]},[o]),{isOpen:r,open:h=>{!h&&e>0&&!a.current?p():f()},close:b}}const Fa=s.createContext(null),pp=s.createContext({}),bp=s.createContext(null),hp=Cr(function(e,n){[e,n]=de(e,n,bp);let{validationBehavior:r}=on(Fa)||{};var i,l;let o=(l=(i=e.validationBehavior)!==null&&i!==void 0?i:r)!==null&&l!==void 0?l:"native",a=s.useRef(null),[u,d]=de({},a,rr),[c,f]=Pr(!e["aria-label"]&&!e["aria-labelledby"]),[b,p]=s.useState("input"),{labelProps:h,inputProps:v,descriptionProps:y,errorMessageProps:$,...E}=rc({...ya(e),inputElementType:b,label:f,validationBehavior:o},d),C=s.useCallback(x=>{d.current=x,x&&p(x instanceof HTMLTextAreaElement?"textarea":"input")},[d]),K=ae({...e,values:{isDisabled:e.isDisabled||!1,isInvalid:E.isInvalid,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-TextField"}),T=Q(e);return delete T.id,s.createElement("div",{...T,...K,ref:n,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":E.isInvalid||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0},s.createElement(Ge,{values:[[ka,{...h,ref:c}],[rr,{...A(v,u),ref:C}],[pp,{...v,ref:C}],[an,{slots:{description:y,errorMessage:$}}],[Da,E]]},K.children))}),gp=s.createContext(null),mp=s.createContext(null),vp={CollectionRoot({collection:t,renderDropIndicator:e}){return Wi(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return Wi(t,e,n)}};function Wi(t,e,n){return xa({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var i;let l=r.render(r);if(!n||r.type!=="item")return l;let o=r.key,a=t.getKeyAfter(o);return s.createElement(s.Fragment,null,n({type:"item",key:o,dropPosition:"before"}),l,(a==null||((i=t.getItem(a))===null||i===void 0?void 0:i.type)!=="item")&&n({type:"item",key:o,dropPosition:"after"}))}})}const Dr=s.createContext(vp);var Ma={};Ma={colorSwatchPicker:"تغييرات الألوان",dropzoneLabel:"DropZone",selectPlaceholder:"حدد عنصرًا",tableResizer:"أداة تغيير الحجم"};var Aa={};Aa={colorSwatchPicker:"Цветови мостри",dropzoneLabel:"DropZone",selectPlaceholder:"Изберете предмет",tableResizer:"Преоразмерител"};var Ia={};Ia={colorSwatchPicker:"Vzorky barev",dropzoneLabel:"Místo pro přetažení",selectPlaceholder:"Vyberte položku",tableResizer:"Změna velikosti"};var Na={};Na={colorSwatchPicker:"Farveprøver",dropzoneLabel:"DropZone",selectPlaceholder:"Vælg et element",tableResizer:"Størrelsesændring"};var Ba={};Ba={colorSwatchPicker:"Farbfelder",dropzoneLabel:"Ablegebereich",selectPlaceholder:"Element wählen",tableResizer:"Größenanpassung"};var Oa={};Oa={colorSwatchPicker:"Χρωματικά δείγματα",dropzoneLabel:"DropZone",selectPlaceholder:"Επιλέξτε ένα αντικείμενο",tableResizer:"Αλλαγή μεγέθους"};var za={};za={selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"};var Ha={};Ha={colorSwatchPicker:"Muestras de colores",dropzoneLabel:"DropZone",selectPlaceholder:"Seleccionar un artículo",tableResizer:"Cambiador de tamaño"};var Va={};Va={colorSwatchPicker:"Värvinäidised",dropzoneLabel:"DropZone",selectPlaceholder:"Valige üksus",tableResizer:"Suuruse muutja"};var ja={};ja={colorSwatchPicker:"Värimallit",dropzoneLabel:"DropZone",selectPlaceholder:"Valitse kohde",tableResizer:"Koon muuttaja"};var _a={};_a={colorSwatchPicker:"Échantillons de couleurs",dropzoneLabel:"DropZone",selectPlaceholder:"Sélectionner un élément",tableResizer:"Redimensionneur"};var Wa={};Wa={colorSwatchPicker:"דוגמיות צבע",dropzoneLabel:"DropZone",selectPlaceholder:"בחר פריט",tableResizer:"שינוי גודל"};var Ua={};Ua={colorSwatchPicker:"Uzorci boja",dropzoneLabel:"Zona spuštanja",selectPlaceholder:"Odaberite stavku",tableResizer:"Promjena veličine"};var Ga={};Ga={colorSwatchPicker:"Színtárak",dropzoneLabel:"DropZone",selectPlaceholder:"Válasszon ki egy elemet",tableResizer:"Átméretező"};var qa={};qa={colorSwatchPicker:"Campioni di colore",dropzoneLabel:"Zona di rilascio",selectPlaceholder:"Seleziona un elemento",tableResizer:"Ridimensionamento"};var Ya={};Ya={colorSwatchPicker:"カラースウォッチ",dropzoneLabel:"ドロップゾーン",selectPlaceholder:"項目を選択",tableResizer:"サイズ変更ツール"};var Za={};Za={colorSwatchPicker:"색상 견본",dropzoneLabel:"드롭 영역",selectPlaceholder:"항목 선택",tableResizer:"크기 조정기"};var Xa={};Xa={colorSwatchPicker:"Spalvų pavyzdžiai",dropzoneLabel:"„DropZone“",selectPlaceholder:"Pasirinkite elementą",tableResizer:"Dydžio keitiklis"};var Ja={};Ja={colorSwatchPicker:"Krāsu paraugi",dropzoneLabel:"DropZone",selectPlaceholder:"Izvēlēties vienumu",tableResizer:"Izmēra mainītājs"};var Qa={};Qa={colorSwatchPicker:"Fargekart",dropzoneLabel:"Droppsone",selectPlaceholder:"Velg et element",tableResizer:"Størrelsesendrer"};var es={};es={colorSwatchPicker:"kleurstalen",dropzoneLabel:"DropZone",selectPlaceholder:"Selecteer een item",tableResizer:"Resizer"};var ts={};ts={colorSwatchPicker:"Próbki kolorów",dropzoneLabel:"Strefa upuszczania",selectPlaceholder:"Wybierz element",tableResizer:"Zmiana rozmiaru"};var ns={};ns={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var rs={};rs={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var is={};is={colorSwatchPicker:"Specimene de culoare",dropzoneLabel:"Zonă de plasare",selectPlaceholder:"Selectați un element",tableResizer:"Instrument de redimensionare"};var ls={};ls={colorSwatchPicker:"Цветовые образцы",dropzoneLabel:"DropZone",selectPlaceholder:"Выберите элемент",tableResizer:"Средство изменения размера"};var os={};os={colorSwatchPicker:"Vzorkovníky farieb",dropzoneLabel:"DropZone",selectPlaceholder:"Vyberte položku",tableResizer:"Nástroj na zmenu veľkosti"};var as={};as={colorSwatchPicker:"Barvne palete",dropzoneLabel:"DropZone",selectPlaceholder:"Izberite element",tableResizer:"Spreminjanje velikosti"};var ss={};ss={colorSwatchPicker:"Uzorci boje",dropzoneLabel:"DropZone",selectPlaceholder:"Izaberite stavku",tableResizer:"Promena veličine"};var us={};us={colorSwatchPicker:"Färgrutor",dropzoneLabel:"DropZone",selectPlaceholder:"Välj en artikel",tableResizer:"Storleksändrare"};var ds={};ds={colorSwatchPicker:"Renk örnekleri",dropzoneLabel:"Bırakma Bölgesi",selectPlaceholder:"Bir öğe seçin",tableResizer:"Yeniden boyutlandırıcı"};var cs={};cs={colorSwatchPicker:"Зразки кольорів",dropzoneLabel:"DropZone",selectPlaceholder:"Виберіть елемент",tableResizer:"Засіб змінення розміру"};var fs={};fs={colorSwatchPicker:"颜色色板",dropzoneLabel:"放置区域",selectPlaceholder:"选择一个项目",tableResizer:"尺寸调整器"};var ps={};ps={colorSwatchPicker:"色票",dropzoneLabel:"放置區",selectPlaceholder:"選取項目",tableResizer:"大小調整器"};var bs={};bs={"ar-AE":Ma,"bg-BG":Aa,"cs-CZ":Ia,"da-DK":Na,"de-DE":Ba,"el-GR":Oa,"en-US":za,"es-ES":Ha,"et-EE":Va,"fi-FI":ja,"fr-FR":_a,"he-IL":Wa,"hr-HR":Ua,"hu-HU":Ga,"it-IT":qa,"ja-JP":Ya,"ko-KR":Za,"lt-LT":Xa,"lv-LV":Ja,"nb-NO":Qa,"nl-NL":es,"pl-PL":ts,"pt-BR":ns,"pt-PT":rs,"ro-RO":is,"ru-RU":ls,"sk-SK":os,"sl-SI":as,"sr-SP":ss,"sv-SE":us,"tr-TR":ds,"uk-UA":cs,"zh-CN":fs,"zh-TW":ps};const un=s.createContext({}),hs=s.createContext(null),yp=s.forwardRef(function(e,n){let{render:r}=s.useContext(hs);return s.createElement(s.Fragment,null,r(e,n))});function gs(t,e){var n;let r=t==null?void 0:t.renderDropIndicator,i=t==null||(n=t.isVirtualDragging)===null||n===void 0?void 0:n.call(t),l=s.useCallback(o=>{if(i||e!=null&&e.isDropTarget(o))return r?r(o):s.createElement(yp,{target:o})},[e==null?void 0:e.target,i,r]);return t!=null&&t.useDropIndicator?l:void 0}function $p(t,e,n){var r,i;let l=t.focusedKey,o=null;if(!(e==null||(r=e.isVirtualDragging)===null||r===void 0)&&r.call(e)&&(n==null||(i=n.target)===null||i===void 0?void 0:i.type)==="item"){o=n.target.key;var a;n.target.dropPosition==="after"&&(o=(a=n.collection.getKeyAfter(o))!==null&&a!==void 0?a:o)}return s.useMemo(()=>new Set([l,o].filter(u=>u!=null)),[l,o])}const ms=s.createContext({}),xp=wa("header",function(e,n){return[e,n]=de(e,n,ms),s.createElement("header",{className:"react-aria-Header",...e,ref:n},e.children)}),Sp=s.createContext({}),Rr=s.createContext(null),St=s.createContext(null),Pp=s.forwardRef(function(e,n){[e,n]=de(e,n,Rr);let r=s.useContext(St);return r?s.createElement(vs,{state:r,props:e,listBoxRef:n}):s.createElement(Pa,{content:s.createElement(Ta,e)},i=>s.createElement(Ep,{props:e,listBoxRef:n,collection:i}))});function Ep({props:t,listBoxRef:e,collection:n}){t={...t,collection:n,children:null,items:null};let{layoutDelegate:r}=s.useContext(Dr),i=Ra({...t,layoutDelegate:r});return s.createElement(vs,{state:i,props:t,listBoxRef:e})}function vs({state:t,props:e,listBoxRef:n}){let{filter:r,collectionProps:i,collectionRef:l}=s.useContext(gp)||{};e=s.useMemo(()=>i?{...e,...i}:e,[e,i]);let{dragAndDropHooks:o,layout:a="stack",orientation:u="vertical"}=e;n=ce(s.useMemo(()=>ll(n,l!==void 0?l:null),[l,n]));let d=lp(t,r),{collection:c,selectionManager:f}=d,b=!!(o!=null&&o.useDraggableCollectionState),p=!!(o!=null&&o.useDroppableCollectionState),{direction:h}=Ke(),{disabledBehavior:v,disabledKeys:y}=f,$=hr({usage:"search",sensitivity:"base"}),{isVirtualized:E,layoutDelegate:C,dropTargetDelegate:K,CollectionRoot:T}=s.useContext(Dr),x=s.useMemo(()=>e.keyboardDelegate||new Sr({collection:c,collator:$,ref:n,disabledKeys:y,disabledBehavior:v,layout:a,orientation:u,direction:h,layoutDelegate:C}),[c,$,n,v,y,u,h,e.keyboardDelegate,a,C]),{listBoxProps:M}=zc({...e,shouldSelectOnPressUp:b||e.shouldSelectOnPressUp,keyboardDelegate:x,isVirtualized:E},d,n),F=s.useRef(b),N=s.useRef(p);s.useEffect(()=>{process.env.NODE_ENV!=="production"&&(F.current!==b&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),N.current!==p&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."))},[b,p]);let L,g,R,B=!1,D=null,z=s.useRef(null);if(b&&o){L=o.useDraggableCollectionState({collection:c,selectionManager:f,preview:o.renderDragPreview?z:void 0}),o.useDraggableCollection({},L,n);let re=o.DragPreview;D=o.renderDragPreview?s.createElement(re,{ref:z},o.renderDragPreview):null}if(p&&o){g=o.useDroppableCollectionState({collection:c,selectionManager:f});let re=o.dropTargetDelegate||K||new o.ListDropTargetDelegate(c,n,{orientation:u,layout:a,direction:h});R=o.useDroppableCollection({keyboardDelegate:x,dropTargetDelegate:re},g,n),B=g.isDropTarget({type:"root"})}let{focusProps:m,isFocused:k,isFocusVisible:S}=Le(),O={isDropTarget:B,isEmpty:d.collection.size===0,isFocused:k,isFocusVisible:S,layout:e.layout||"stack",state:d},Y=ae({className:e.className,style:e.style,defaultClassName:"react-aria-ListBox",values:O}),Z=null;return d.collection.size===0&&e.renderEmptyState&&(Z=s.createElement("div",{role:"option",style:{display:"contents"}},e.renderEmptyState(O))),s.createElement(Ll,null,s.createElement("div",{...Q(e),...A(M,m,R==null?void 0:R.collectionProps),...Y,ref:n,slot:e.slot||void 0,onScroll:e.onScroll,"data-drop-target":B||void 0,"data-empty":d.collection.size===0||void 0,"data-focused":k||void 0,"data-focus-visible":S||void 0,"data-layout":e.layout||"stack","data-orientation":e.orientation||"vertical"},s.createElement(Ge,{values:[[Rr,e],[St,d],[un,{dragAndDropHooks:o,dragState:L,dropState:g}],[Sp,{elementType:"div"}],[hs,{render:Tp}],[mp,{name:"ListBoxSection",render:ys}]]},s.createElement(T,{collection:c,scrollRef:n,persistedKeys:$p(f,o,g),renderDropIndicator:gs(o,g)})),Z,D))}function ys(t,e,n,r="react-aria-ListBoxSection"){let i=s.useContext(St),{dragAndDropHooks:l,dropState:o}=s.useContext(un),{CollectionBranch:a}=s.useContext(Dr),[u,d]=Pr();var c;let{headingProps:f,groupProps:b}=qc({heading:d,"aria-label":(c=t["aria-label"])!==null&&c!==void 0?c:void 0}),p=ae({defaultClassName:r,className:t.className,style:t.style,values:{}});return s.createElement("section",{...Q(t),...b,...p,ref:e},s.createElement(ms.Provider,{value:{...f,ref:u}},s.createElement(a,{collection:i.collection,parent:n,renderDropIndicator:gs(l,o)})))}const wp=Yf("section",ys),Cp=wa("item",function(e,n,r){let i=ce(n),l=s.useContext(St),{dragAndDropHooks:o,dragState:a,dropState:u}=s.useContext(un),{optionProps:d,labelProps:c,descriptionProps:f,...b}=Gc({key:r.key,"aria-label":e==null?void 0:e["aria-label"]},l,i),{hoverProps:p,isHovered:h}=Ue({isDisabled:!b.allowsSelection&&!b.hasAction,onHoverStart:r.props.onHoverStart,onHoverChange:r.props.onHoverChange,onHoverEnd:r.props.onHoverEnd}),v=null;a&&o&&(v=o.useDraggableItem({key:r.key},a));let y=null;u&&o&&(y=o.useDroppableItem({target:{type:"item",key:r.key,dropPosition:"on"}},u,i));let $=a&&a.isDragging(r.key),E=ae({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...b,isHovered:h,selectionMode:l.selectionManager.selectionMode,selectionBehavior:l.selectionManager.selectionBehavior,allowsDragging:!!a,isDragging:$,isDropTarget:y==null?void 0:y.isDropTarget}});s.useEffect(()=>{!r.textValue&&process.env.NODE_ENV!=="production"&&console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.")},[r.textValue]);let C=e.href?"a":"div";return s.createElement(C,{...A(d,p,v==null?void 0:v.dragProps,y==null?void 0:y.dropProps),...E,ref:i,"data-allows-dragging":!!a||void 0,"data-selected":b.isSelected||void 0,"data-disabled":b.isDisabled||void 0,"data-hovered":h||void 0,"data-focused":b.isFocused||void 0,"data-focus-visible":b.isFocusVisible||void 0,"data-pressed":b.isPressed||void 0,"data-dragging":$||void 0,"data-drop-target":(y==null?void 0:y.isDropTarget)||void 0,"data-selection-mode":l.selectionManager.selectionMode==="none"?void 0:l.selectionManager.selectionMode},s.createElement(Ge,{values:[[an,{slots:{[Gt]:c,label:c,description:f}}]]},E.children))});function Tp(t,e){e=ce(e);let{dragAndDropHooks:n,dropState:r}=s.useContext(un),{dropIndicatorProps:i,isHidden:l,isDropTarget:o}=n.useDropIndicator(t,r,e);return l?null:s.createElement(Dp,{...t,dropIndicatorProps:i,isDropTarget:o,ref:e})}function kp(t,e){let{dropIndicatorProps:n,isDropTarget:r,...i}=t,l=ae({...i,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:r}});return s.createElement("div",{...n,...l,role:"option",ref:e,"data-drop-target":r||void 0})}const Dp=s.forwardRef(kp),$s=s.createContext({placement:"bottom"}),Kr=s.createContext(null),Ui=s.createContext(null),xs=s.forwardRef(function(e,n){[e,n]=de(e,n,Kr);let r=s.useContext(dn),i=sn(e),l=e.isOpen!=null||e.defaultOpen!=null||!r?i:r,o=bl(n,l.isOpen)||e.isExiting||!1,a=_f(),{direction:u}=Ke();if(a){let d=e.children;return typeof d=="function"&&(d=d({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),s.createElement(s.Fragment,null,d)}return l&&!l.isOpen&&!o?null:s.createElement(Rp,{...e,triggerRef:e.triggerRef,state:l,popoverRef:n,isExiting:o,dir:u})});function Rp({state:t,isExiting:e,UNSTABLE_portalContainer:n,...r}){let i=s.useRef(null),[l,o]=s.useState(0),a=s.useRef(null),u=s.useContext(Ui),d=u&&r.trigger==="SubmenuTrigger";H(()=>{i.current&&t.isOpen&&o(i.current.getBoundingClientRect().width)},[t.isOpen,i]);var c;let{popoverProps:f,underlayProps:b,arrowProps:p,placement:h}=Dc({...r,offset:(c=r.offset)!==null&&c!==void 0?c:8,arrowSize:l,groupRef:d?u:a},t),v=r.popoverRef,y=pl(v,!!h)||r.isEntering||!1,$=ae({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:h,isEntering:y,isExiting:e}}),E=!r.isNonModal||r.trigger==="SubmenuTrigger",[C,K]=s.useState(!1);H(()=>{v.current&&K(E&&!v.current.querySelector("[role=dialog]"))},[v,E]),s.useEffect(()=>{C&&v.current&&!v.current.contains(document.activeElement)&&De(v.current)},[C,v]);let T={...f.style,...$.style},x=s.createElement("div",{...A(Q(r),f),...$,role:C?"dialog":void 0,tabIndex:C?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:v,slot:r.slot||void 0,style:T,dir:r.dir,"data-trigger":r.trigger,"data-placement":h,"data-entering":y||void 0,"data-exiting":e||void 0},!r.isNonModal&&s.createElement(Di,{onDismiss:t.close}),s.createElement($s.Provider,{value:{...p,placement:h,ref:i}},$.children),s.createElement(Di,{onDismiss:t.close}));if(!d)return s.createElement(Ri,{...r,shouldContainFocus:C,isExiting:e,portalContainer:n},!r.isNonModal&&t.isOpen&&s.createElement("div",{"data-testid":"underlay",...b,style:{position:"fixed",inset:0}}),s.createElement("div",{ref:a,style:{display:"contents"}},s.createElement(Ui.Provider,{value:a},x)));var M;return s.createElement(Ri,{...r,shouldContainFocus:C,isExiting:e,portalContainer:(M=n??(u==null?void 0:u.current))!==null&&M!==void 0?M:void 0},x)}const Kp=s.createContext(null),Ss=s.createContext(null),dn=s.createContext(null);function Lp(t){let e=up(t),n=s.useRef(null),{triggerProps:r,overlayProps:i}=Wl({type:"dialog"},e,n);return r.id=te(),i["aria-labelledby"]=r.id,s.createElement(Ge,{values:[[dn,e],[Kp,e],[Ss,i],[Kr,{trigger:"DialogTrigger",triggerRef:n,"aria-labelledby":i["aria-labelledby"]}]]},s.createElement(ud,{...r,ref:n,isPressed:e.isOpen},t.children))}const Fp=s.forwardRef(function(e,n){let r=e["aria-labelledby"];[e,n]=de(e,n,Ss);let{dialogProps:i,titleProps:l}=Xc({...e,"aria-labelledby":r},n),o=s.useContext(dn);!i["aria-label"]&&!i["aria-labelledby"]&&(e["aria-labelledby"]?i["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=ae({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(o==null?void 0:o.close)||(()=>{})}});return s.createElement("section",{...Q(e),...i,...a,ref:n,slot:e.slot||void 0},s.createElement(Ge,{values:[[Hf,{slots:{[Gt]:{},title:{...l,level:2}}}],[Tr,{slots:{[Gt]:{},close:{onPress:()=>o==null?void 0:o.close()}}}]]},a.children))});function Mp(t){return t&&t.__esModule?t.default:t}const Lr=s.createContext(null),Fr=s.createContext(null),Ap=s.forwardRef(function(e,n){[e,n]=de(e,n,Lr);let{children:r,isDisabled:i=!1,isInvalid:l=!1,isRequired:o=!1}=e,a=s.useMemo(()=>typeof r=="function"?r({isOpen:!1,isDisabled:i,isInvalid:l,isRequired:o,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):r,[r,i,l,o]);return s.createElement(Pa,{content:a},u=>s.createElement(Ip,{props:e,collection:u,selectRef:n}))});function Ip({props:t,selectRef:e,collection:n}){let{validationBehavior:r}=on(Fa)||{};var i,l;let o=(l=(i=t.validationBehavior)!==null&&i!==void 0?i:r)!==null&&l!==void 0?l:"native",a=dp({...t,collection:n,children:void 0,validationBehavior:o}),{isFocusVisible:u,focusProps:d}=Le({within:!0}),c=s.useRef(null),[f,b]=Pr(!t["aria-label"]&&!t["aria-labelledby"]),{labelProps:p,triggerProps:h,valueProps:v,menuProps:y,descriptionProps:$,errorMessageProps:E,...C}=of({...ya(t),label:b,validationBehavior:o},a,c),[K,T]=s.useState(null),x=s.useCallback(()=>{c.current&&T(c.current.offsetWidth+"px")},[c]);On({ref:c,onResize:x});let M=s.useMemo(()=>({isOpen:a.isOpen,isFocused:a.isFocused,isFocusVisible:u,isDisabled:t.isDisabled||!1,isInvalid:C.isInvalid||!1,isRequired:t.isRequired||!1}),[a.isOpen,a.isFocused,u,t.isDisabled,C.isInvalid,t.isRequired]),F=ae({...t,values:M,defaultClassName:"react-aria-Select"}),N=Q(t);delete N.id;let L=s.useRef(null);return s.createElement(Ge,{values:[[Lr,t],[Fr,a],[Ps,v],[ka,{...p,ref:f,elementType:"span"}],[Tr,{...h,ref:c,isPressed:a.isOpen}],[dn,a],[Kr,{trigger:"Select",triggerRef:c,scrollRef:L,placement:"bottom start",style:{"--trigger-width":K},"aria-labelledby":y["aria-labelledby"]}],[Rr,{...y,ref:L}],[St,a],[an,{slots:{description:$,errorMessage:E}}],[Da,C]]},s.createElement("div",{...N,...F,...d,ref:e,slot:t.slot||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":u||void 0,"data-open":a.isOpen||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":C.isInvalid||void 0,"data-required":t.isRequired||void 0}),s.createElement(sf,{autoComplete:t.autoComplete,state:a,triggerRef:c,label:b,name:t.name,isDisabled:t.isDisabled}))}const Ps=s.createContext(null),Np=s.forwardRef(function(e,n){var r,i;[e,n]=de(e,n,Ps);let l=s.useContext(Fr),{placeholder:o}=on(Lr),a=l.selectedKey!=null?l.collection.getItem(l.selectedKey):null,u=a==null?void 0:a.props.children;typeof u=="function"&&(u=u({isHovered:!1,isPressed:!1,isSelected:!1,isFocused:!1,isFocusVisible:!1,isDisabled:!1,selectionMode:"single",selectionBehavior:"toggle"}));let d=br(Mp(bs),"react-aria-components");var c,f,b;let p=ae({...e,defaultChildren:(c=u??o)!==null&&c!==void 0?c:d.format("selectPlaceholder"),defaultClassName:"react-aria-SelectValue",values:{selectedItem:(f=(r=l.selectedItem)===null||r===void 0?void 0:r.value)!==null&&f!==void 0?f:null,selectedText:(b=(i=l.selectedItem)===null||i===void 0?void 0:i.textValue)!==null&&b!==void 0?b:null,isPlaceholder:!a}}),h=Q(e);return s.createElement("span",{ref:n,...h,...p,"data-placeholder":!a||void 0},s.createElement(an.Provider,{value:void 0},p.children))}),Bp=s.createContext({}),Es=s.createContext(null),Op=s.forwardRef(function(e,n){[e,n]=de(e,n,Bp);let r=nc(e),{groupProps:i}=Wd(e,r,n),l=ae({...e,values:{isDisabled:r.isDisabled,state:r},defaultClassName:"react-aria-ToggleButtonGroup"});return s.createElement("div",{...i,...l,ref:n,slot:e.slot||void 0,"data-orientation":e.orientation||"horizontal","data-disabled":e.isDisabled||void 0},s.createElement(Es.Provider,{value:r},l.children))}),zp=s.createContext({}),Hp=s.forwardRef(function(e,n){[e,n]=de(e,n,zp);let r=s.useContext(Es),i=Ol(r&&e.id!=null?{isSelected:r.selectedKeys.has(e.id),onChange(v){r.setSelected(e.id,v)}}:e),{buttonProps:l,isPressed:o,isSelected:a,isDisabled:u}=r&&e.id!=null?Ud({...e,id:e.id},r,n):Rl({...e,id:e.id!=null?String(e.id):void 0},i,n),{focusProps:d,isFocused:c,isFocusVisible:f}=Le(e),{hoverProps:b,isHovered:p}=Ue(e),h=ae({...e,id:void 0,values:{isHovered:p,isPressed:o,isFocused:c,isSelected:i.isSelected,isFocusVisible:f,isDisabled:u,state:i},defaultClassName:"react-aria-ToggleButton"});return s.createElement("button",{...A(l,d,b),...h,ref:n,slot:e.slot||void 0,"data-focused":c||void 0,"data-disabled":u||void 0,"data-pressed":o||void 0,"data-selected":a||void 0,"data-hovered":p||void 0,"data-focus-visible":f||void 0})}),Mr=s.createContext(null),ws=s.createContext(null);function Vp(t){let e=La(t),n=s.useRef(null),{triggerProps:r,tooltipProps:i}=df(t,e,n);return s.createElement(Ge,{values:[[Mr,e],[ws,{...i,triggerRef:n}]]},s.createElement(sd,{...r,ref:n},t.children))}const jp=s.forwardRef(function({UNSTABLE_portalContainer:e,...n},r){[n,r]=de(n,r,ws);let i=s.useContext(Mr),l=La(n),o=n.isOpen!=null||n.defaultOpen!=null||!i?l:i,a=bl(r,o.isOpen)||n.isExiting||!1;return!o.isOpen&&!a?null:s.createElement(wc,{portalContainer:e},s.createElement(_p,{...n,tooltipRef:r,isExiting:a}))});function _p(t){let e=s.useContext(Mr),n=s.useRef(null),[r,i]=s.useState(0);H(()=>{n.current&&e.isOpen&&i(n.current.getBoundingClientRect().width)},[e.isOpen,n]);let{overlayProps:l,arrowProps:o,placement:a}=_l({placement:t.placement||"top",targetRef:t.triggerRef,overlayRef:t.tooltipRef,offset:t.offset,crossOffset:t.crossOffset,isOpen:e.isOpen,arrowSize:r,arrowBoundaryOffset:t.arrowBoundaryOffset,shouldFlip:t.shouldFlip,onClose:()=>e.close(!0)}),u=pl(t.tooltipRef,!!a)||t.isEntering||!1,d=ae({...t,defaultClassName:"react-aria-Tooltip",values:{placement:a,isEntering:u,isExiting:t.isExiting,state:e}});t=A(t,l);let{tooltipProps:c}=uf(t,e);return s.createElement("div",{...c,ref:t.tooltipRef,...d,style:{...l.style,...d.style},"data-placement":a??void 0,"data-entering":u||void 0,"data-exiting":t.isExiting||void 0},s.createElement($s.Provider,{value:{...o,placement:a,ref:n}},d.children))}const Cs=w.defineRecipe({className:"nimbus-tooltip",base:{color:"white",textStyle:"xs",fontWeight:"400",background:"slate.12",display:"inline-flex",alignItems:"center",borderRadius:"100",paddingX:"300",paddingY:"100",margin:"100",maxW:"6400",boxShadow:"1"}}),{withContext:Wp}=w.createRecipeContext({recipe:Cs}),Up=Wp("div"),Ts=s.forwardRef(function({children:e,placement:n="bottom",...r},i){return P.jsx(Up,{ref:i,asChild:!0,...r,children:P.jsx(jp,{placement:n,...r,children:e})})});Ts.displayName="Tooltip";const ks=Vp;ks.displayName="TooltipTrigger";const Ds=s.forwardRef(function(e,n){const r=s.useRef(null),i=ce(w.mergeRefs(r,n)),{focusableProps:l}=it(e,i);if(s.isValidElement(e.children))return s.cloneElement(e.children,A(l,e.children.props,{ref:i}))});Ds.displayName="MakeElementFocusable";var Gp=(t,e,n,r,i,l,o,a)=>{let u=document.documentElement,d=["light","dark"];function c(p){(Array.isArray(t)?t:[t]).forEach(h=>{let v=h==="class",y=v&&l?i.map($=>l[$]||$):i;v?(u.classList.remove(...y),u.classList.add(l&&l[p]?l[p]:p)):u.setAttribute(h,p)}),f(p)}function f(p){a&&d.includes(p)&&(u.style.colorScheme=p)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)c(r);else try{let p=localStorage.getItem(e)||n,h=o&&p==="system"?b():p;c(h)}catch{}},Gi=["light","dark"],Rs="(prefers-color-scheme: dark)",qp=typeof window>"u",Ar=X.createContext(void 0),Yp={setTheme:t=>{},themes:[]},Zp=()=>{var t;return(t=X.useContext(Ar))!=null?t:Yp},Xp=t=>X.useContext(Ar)?X.createElement(X.Fragment,null,t.children):X.createElement(Qp,{...t}),Jp=["light","dark"],Qp=({forcedTheme:t,disableTransitionOnChange:e=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i="theme",themes:l=Jp,defaultTheme:o=n?"system":"light",attribute:a="data-theme",value:u,children:d,nonce:c,scriptProps:f})=>{let[b,p]=X.useState(()=>tb(i,o)),[h,v]=X.useState(()=>b==="system"?Fn():b),y=u?Object.values(u):l,$=X.useCallback(T=>{let x=T;if(!x)return;T==="system"&&n&&(x=Fn());let M=u?u[x]:x,F=e?nb(c):null,N=document.documentElement,L=g=>{g==="class"?(N.classList.remove(...y),M&&N.classList.add(M)):g.startsWith("data-")&&(M?N.setAttribute(g,M):N.removeAttribute(g))};if(Array.isArray(a)?a.forEach(L):L(a),r){let g=Gi.includes(o)?o:null,R=Gi.includes(x)?x:g;N.style.colorScheme=R}F==null||F()},[c]),E=X.useCallback(T=>{let x=typeof T=="function"?T(b):T;p(x);try{localStorage.setItem(i,x)}catch{}},[b]),C=X.useCallback(T=>{let x=Fn(T);v(x),b==="system"&&n&&!t&&$("system")},[b,t]);X.useEffect(()=>{let T=window.matchMedia(Rs);return T.addListener(C),C(T),()=>T.removeListener(C)},[C]),X.useEffect(()=>{let T=x=>{x.key===i&&(x.newValue?p(x.newValue):E(o))};return window.addEventListener("storage",T),()=>window.removeEventListener("storage",T)},[E]),X.useEffect(()=>{$(t??b)},[t,b]);let K=X.useMemo(()=>({theme:b,setTheme:E,forcedTheme:t,resolvedTheme:b==="system"?h:b,themes:n?[...l,"system"]:l,systemTheme:n?h:void 0}),[b,E,t,h,n,l]);return X.createElement(Ar.Provider,{value:K},X.createElement(eb,{forcedTheme:t,storageKey:i,attribute:a,enableSystem:n,enableColorScheme:r,defaultTheme:o,value:u,themes:l,nonce:c,scriptProps:f}),d)},eb=X.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:l,value:o,themes:a,nonce:u,scriptProps:d})=>{let c=JSON.stringify([n,e,l,t,a,o,r,i]).slice(1,-1);return X.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?u:"",dangerouslySetInnerHTML:{__html:`(${Gp.toString()})(${c})`}})}),tb=(t,e)=>{if(qp)return;let n;try{n=localStorage.getItem(t)||void 0}catch{}return n||e},nb=t=>{let e=document.createElement("style");return t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},Fn=t=>(t||(t=window.matchMedia(Rs)),t.matches?"dark":"light");function rb(t){return P.jsx(Xp,{attribute:"class",disableTransitionOnChange:!0,...t})}function Ir(){const{resolvedTheme:t,setTheme:e}=Zp();return{colorMode:t,setColorMode:e,toggleColorMode:()=>{e(t==="light"?"dark":"light")}}}function ib(t,e){const{colorMode:n}=Ir();return n==="light"?t:e}function lb(){const{colorMode:t}=Ir();return t==="light"?"Light Theme":"DarkTheme"}const ob=w.defineAnimationStyles({"slide-fade-in":{value:{transformOrigin:"var(--transform-origin)","&[data-placement^=top]":{animationName:"slide-from-bottom, fade-in"},"&[data-placement^=bottom]":{animationName:"slide-from-top, fade-in"},"&[data-placement^=left]":{animationName:"slide-from-right, fade-in"},"&[data-placement^=right]":{animationName:"slide-from-left, fade-in"}}},"slide-fade-out":{value:{transformOrigin:"var(--transform-origin)","&[data-placement^=top]":{animationName:"slide-to-bottom, fade-out"},"&[data-placement^=bottom]":{animationName:"slide-to-top, fade-out"},"&[data-placement^=left]":{animationName:"slide-to-right, fade-out"},"&[data-placement^=right]":{animationName:"slide-to-left, fade-out"}}},"scale-fade-in":{value:{transformOrigin:"var(--transform-origin)",animationName:"scale-in, fade-in"}},"scale-fade-out":{value:{transformOrigin:"var(--transform-origin)",animationName:"scale-out, fade-out"}}});function ab(t){var n;const e={};for(const r in t)(n=t[r])!=null&&n.value?e[r]=t[r].value:e[r]=t[r];return e}const sb=ab(U.themeTokens.breakpoints),ub=w.defineGlobalStyles({"*":{fontFeatureSettings:'"liga", "calt", "case", "ss01", "ss07", "ss08", "tnum"',"--ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--ring-offset-width":"0px","--ring-offset-color":"#fff","--ring-color":"rgba(66, 153, 225, 0.6)","--ring-offset-shadow":"0 0 #0000","--ring-shadow":"0 0 #0000","--focus-ring-color":"colors.primary.7","--brightness":"var(--chakra-empty,/*!*/ /*!*/)","--contrast":"var(--chakra-empty,/*!*/ /*!*/)","--grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--invert":"var(--chakra-empty,/*!*/ /*!*/)","--saturate":"var(--chakra-empty,/*!*/ /*!*/)","--sepia":"var(--chakra-empty,/*!*/ /*!*/)","--drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--global-font-mono":"fonts.mono","--global-font-body":"fonts.body","--global-color-border":"colors.border"},"code *":{fontFeatureSettings:'"calt", "case", "ss01", "ss07", "ss08", "tnum"'},html:{color:"fg",bg:"bg",lineHeight:"1.5",colorPalette:"neutral"},"*::placeholder":{color:"fg.muted/80"},"*::selection":{bg:"colorPalette.9",color:"colorPalette.contrast"}}),db={spin:{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}},pulse:{"50%":{opacity:"0.5"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}},"fade-in":{from:{opacity:0},to:{opacity:1}},"fade-out":{from:{opacity:1},to:{opacity:0}},"slide-from-left-full":{from:{translate:"-100% 0"},to:{translate:"0 0"}},"slide-from-right-full":{from:{translate:"100% 0"},to:{translate:"0 0"}},"slide-from-top-full":{from:{translate:"0 -100%"},to:{translate:"0 0"}},"slide-from-bottom-full":{from:{translate:"0 100%"},to:{translate:"0 0"}},"slide-to-left-full":{from:{translate:"0 0"},to:{translate:"-100% 0"}},"slide-to-right-full":{from:{translate:"0 0"},to:{translate:"100% 0"}},"slide-to-top-full":{from:{translate:"0 0"},to:{translate:"0 -100%"}},"slide-to-bottom-full":{from:{translate:"0 0"},to:{translate:"0 100%"}},"slide-from-top":{"0%":{translate:"0 -0.5rem"},to:{translate:"0"}},"slide-from-bottom":{"0%":{translate:"0 0.5rem"},to:{translate:"0"}},"slide-from-left":{"0%":{translate:"-0.5rem 0"},to:{translate:"0"}},"slide-from-right":{"0%":{translate:"0.5rem 0"},to:{translate:"0"}},"slide-to-top":{"0%":{translate:"0"},to:{translate:"0 -0.5rem"}},"slide-to-bottom":{"0%":{translate:"0"},to:{translate:"0 0.5rem"}},"slide-to-left":{"0%":{translate:"0"},to:{translate:"-0.5rem 0"}},"slide-to-right":{"0%":{translate:"0"},to:{translate:"0.5rem 0"}},"scale-in":{from:{scale:"0.95"},to:{scale:"1"}},"scale-out":{from:{scale:"1"},to:{scale:"0.95"}}},cb=w.defineLayerStyles({disabled:{value:{opacity:"0.5",cursor:"not-allowed"}}}),fb=w.defineRecipe({className:"nimbus-code",base:{fontFamily:"mono",alignItems:"center",display:"inline-flex",borderRadius:"100"},variants:{variant:{solid:{bg:"colorPalette.4",color:"colorPalette.11"},subtle:{bg:"colorPalette.3",color:"colorPalette.11"},outline:{color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted"},surface:{bg:"colorPalette.subtle",color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted"},plain:{color:"colorPalette.fg"}},size:{xs:{textStyle:"2xs",px:"100",minH:"400"},sm:{textStyle:"xs",px:"150",minH:"500"},md:{textStyle:"sm",px:"200",minH:"600"},lg:{textStyle:"sm",px:"250",minH:"700"}}},defaultVariants:{variant:"solid",size:"md"}}),pb=w.defineRecipe({className:"nimbus-heading",base:{fontFamily:"heading",fontWeight:"600"},variants:{size:{xs:{textStyle:"xs"},sm:{textStyle:"sm"},md:{textStyle:"md"},lg:{textStyle:"lg"},xl:{textStyle:"xl"},"2xl":{textStyle:"2xl"},"3xl":{textStyle:"3xl"},"4xl":{textStyle:"4xl"},"5xl":{textStyle:"5xl"},"6xl":{textStyle:"6xl"},"7xl":{textStyle:"7xl"}}},defaultVariants:{size:"xl"}}),bb=w.defineRecipe({className:"nimbus-kbd",base:{display:"inline-flex",alignItems:"center",fontWeight:"medium",fontFamily:"mono",flexShrink:"0",whiteSpace:"nowrap",wordSpacing:"-0.5em",userSelect:"none",px:"100",borderRadius:"100"},variants:{variant:{raised:{bg:"colorPalette.subtle",color:"colorPalette.fg",borderWidth:"1px",borderBottomWidth:"2px",borderColor:"colorPalette.muted"},outline:{borderWidth:"1px",color:"colorPalette.fg"},subtle:{bg:"colorPalette.muted",color:"colorPalette.fg"},plain:{color:"colorPalette.fg"}},size:{sm:{textStyle:"xs",height:"450"},md:{textStyle:"sm",height:"500"},lg:{textStyle:"md",height:"600"}}},defaultVariants:{size:"md",variant:"raised"}}),Nr=w.defineRecipe({className:"nimbus-text-input",base:{display:"block",borderRadius:"200",colorPalette:"neutral",focusVisibleRing:"outside",bg:"transparent",outline:"none",boxShadow:"inset 0 0 0 var(--border-width) var(--border-color)",_placeholder:{opacity:.5,color:"currentColor"},_disabled:{layerStyle:"disabled"},"&[data-invalid='true']":{"--border-color":"colors.critical.7",color:"critical.11"}},variants:{size:{sm:{h:800,textStyle:"sm",px:300},md:{h:1e3,textStyle:"md",px:400}},variant:{solid:{"--border-width":"sizes.25","--border-color":"colors.neutral.7",backgroundColor:"neutral.1",_hover:{backgroundColor:"primary.2"}},ghost:{_hover:{backgroundColor:"primary.2"}}}},defaultVariants:{size:"md",variant:"solid"}}),hb={avatar:tl,button:Be,code:fb,heading:pb,kbd:bb,link:ha,tooltip:Cs,textInput:Nr},gb=w.defineSemanticTokens.colors({bg:{DEFAULT:{value:{_light:"{colors.neutral.1}",_dark:"{colors.neutral.1}"}}},fg:{DEFAULT:{value:{_light:"{colors.neutral.12}",_dark:"{colors.neutral.12}"}}},border:{DEFAULT:{value:"{colors.neutral.6}"},muted:{value:"{colors.neutral.7}"},subtle:{value:"{colors.neutral.6}"},emphasized:{value:"{colors.neutral.8}"},inverted:{value:"{colors.neutral.9}"},critical:{value:"{colors.critical.8}"},warning:{value:"{colors.warning.8}"},positive:{value:"{colors.positive.8}"},info:{value:"{colors.ingo.8}"}},...U.themeTokens.color["system-palettes"],...U.themeTokens.color["brand-palettes"],...U.themeTokens.color["semantic-palettes"]}),mb=w.defineSemanticTokens.shadows(U.themeTokens.shadow),vb=w.defineSemanticTokens.radii({}),yb={colors:gb,shadows:mb,radii:vb},$b=w.defineSlotRecipe({slots:["trigger","backdrop","positioner","content","title","description","closeTrigger","header","body","footer","backdrop"],className:"nimbus-dialog",base:{backdrop:{bg:{_dark:"bg/50",_light:"fg/50"},pos:"fixed",left:0,top:0,w:"100vw",h:"100dvh",zIndex:"modal",_open:{animationName:"fade-in",animationDuration:"slow"},_closed:{animationName:"fade-out",animationDuration:"moderate"}},positioner:{display:"flex",width:"100vw",height:"100dvh",position:"fixed",left:0,top:0,"--dialog-z-index":"zIndex.modal",zIndex:"calc(var(--dialog-z-index) + var(--layer-index, 0))",justifyContent:"center",overscrollBehaviorY:"none"},content:{display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,borderRadius:"200",textStyle:"sm",my:"var(--dialog-margin, var(--dialog-base-margin))","--dialog-z-index":"zIndex.modal",zIndex:"calc(var(--dialog-z-index) + var(--layer-index, 0))",bg:"bg",boxShadow:"lg",_open:{animationDuration:"moderate"},_closed:{animationDuration:"faster"}},header:{flex:0,px:"600",pt:"600",pb:"400"},body:{flex:"1",px:"600",pt:"200",pb:"600"},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"300",px:"600",pt:"200",pb:"400"},title:{textStyle:"lg",fontWeight:"semibold"},description:{color:"fg.muted"}},variants:{placement:{center:{positioner:{alignItems:"center"},content:{"--dialog-base-margin":"auto",mx:"auto"}},top:{positioner:{alignItems:"flex-start"},content:{"--dialog-base-margin":"spacing.1600",mx:"auto"}},bottom:{positioner:{alignItems:"flex-end"},content:{"--dialog-base-margin":"spacing.1600",mx:"auto"}}},scrollBehavior:{inside:{positioner:{overflow:"hidden"},content:{maxH:"calc(100% - 7.5rem)"},body:{overflow:"auto"}},outside:{positioner:{overflow:"auto",pointerEvents:"auto"}}},size:{xs:{content:{maxW:"sm"}},sm:{content:{maxW:"md"}},md:{content:{maxW:"lg"}},lg:{content:{maxW:"2xl"}},xl:{content:{maxW:"4xl"}},cover:{positioner:{padding:"1000"},content:{width:"100%",height:"100%","--dialog-margin":"0"}},full:{content:{maxW:"100vw",minH:"100vh","--dialog-margin":"0",borderRadius:"0"}}},motionPreset:{scale:{content:{_open:{animationName:"scale-in, fade-in"},_closed:{animationName:"scale-out, fade-out"}}},"slide-in-bottom":{content:{_open:{animationName:"slide-from-bottom, fade-in"},_closed:{animationName:"slide-to-bottom, fade-out"}}},"slide-in-top":{content:{_open:{animationName:"slide-from-top, fade-in"},_closed:{animationName:"slide-to-top, fade-out"}}},"slide-in-left":{content:{_open:{animationName:"slide-from-left, fade-in"},_closed:{animationName:"slide-to-left, fade-out"}}},"slide-in-right":{content:{_open:{animationName:"slide-from-right, fade-in"},_closed:{animationName:"slide-to-right, fade-out"}}},none:{}}},defaultVariants:{size:"md",scrollBehavior:"outside",placement:"top",motionPreset:"scale"}}),xb=w.defineSlotRecipe({className:"chakra-list",slots:["root","item","indicator"],base:{root:{display:"flex",flexDirection:"column",gap:"var(--list-gap)","& :where(ul, ol)":{marginTop:"var(--list-gap)"}},item:{whiteSpace:"normal",display:"list-item"},indicator:{marginEnd:"200",minHeight:"1lh",flexShrink:0,display:"inline-block",verticalAlign:"middle"}},variants:{variant:{marker:{root:{listStyle:"revert",listStylePosition:"inside"},item:{_marker:{color:"fg.subtle"}}},plain:{item:{alignItems:"flex-start",display:"inline-flex"}}},align:{center:{item:{alignItems:"center"}},start:{item:{alignItems:"flex-start"}},end:{item:{alignItems:"flex-end"}}}},defaultVariants:{variant:"marker"}}),Sb=w.defineSlotRecipe({className:"chakra-table",slots:["root","header","body","row","columnHeader","cell","footer","caption"],base:{root:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full",textAlign:"start",verticalAlign:"top"},row:{_selected:{bg:"colorPalette.subtle"}},cell:{textAlign:"start",alignItems:"center"},columnHeader:{fontWeight:"medium",textAlign:"start",color:"fg"},caption:{fontWeight:"medium",textStyle:"xs"},footer:{fontWeight:"medium"}},variants:{interactive:{true:{body:{"& tr":{_hover:{bg:"colorPalette.subtle"}}}}},stickyHeader:{true:{header:{"& :where(tr)":{top:"var(--table-sticky-offset, 0)",position:"sticky",zIndex:1}}}},striped:{true:{row:{"&:nth-of-type(odd) td":{bg:"bg.muted"}}}},showColumnBorder:{true:{columnHeader:{"&:not(:last-of-type)":{borderInlineEndWidth:"1px"}},cell:{"&:not(:last-of-type)":{borderInlineEndWidth:"1px"}}}},variant:{line:{columnHeader:{borderBottomWidth:"1px"},cell:{borderBottomWidth:"1px"},row:{bg:"bg"}},outline:{root:{boxShadow:"0 0 0 1px {colors.border}",overflow:"hidden"},columnHeader:{borderBottomWidth:"1px"},header:{bg:"bg.muted"},row:{"&:not(:last-of-type)":{borderBottomWidth:"1px"}},footer:{borderTopWidth:"1px"}}},size:{sm:{root:{textStyle:"sm"},columnHeader:{px:"200",py:"200"},cell:{px:"200",py:"200"}},md:{root:{textStyle:"sm"},columnHeader:{px:"300",py:"300"},cell:{px:"300",py:"300"}},lg:{root:{textStyle:"md"},columnHeader:{px:"400",py:"300"},cell:{px:"400",py:"300"}}}},defaultVariants:{variant:"line",size:"md"}}),Pb=w.defineSlotRecipe({slots:["root","label","indicator"],className:"nimbus-checkbox",base:{root:{colorPalette:"primary",display:"inline-flex",gap:"200",alignItems:"center",verticalAlign:"top",minWidth:"600",minHeight:"600","&[data-disabled='true']":{layerStyle:"disabled"}},label:{flexShrink:0,userSelect:"none",color:"neutral.11","&[data-invalid='true']":{color:"critical.11"}},indicator:{position:"relative",display:"flex",flexShrink:0,alignItems:"center",justifyContent:"center",border:"solid-50",borderRadius:"50",focusRing:"outside",borderColor:"neutral.9",bg:"transparent",color:"neutral.11",_icon:{w:"350",h:"350"},"&:hover":{borderColor:"neutral.10"},"&[data-invalid='true']":{bg:"transparent",borderColor:"critical.9",color:"critical.11","&:hover":{borderColor:"critical.10"}},"&[data-selected='true'], &[data-indeterminate='true']":{bg:"colorPalette.9",borderColor:"colorPalette.9",color:"colorPalette.contrast","&:hover":{bg:"colorPalette.10",borderColor:"colorPalette.10"},"&[data-invalid='true']":{bg:"critical.9",borderColor:"critical.9",color:"critical.contrast","&:hover":{bg:"critical.10",borderColor:"critical.10"}}}}},variants:{size:{md:{label:{fontSize:"350",fontWeight:"400",lineHeight:"400"},indicator:{w:"400",h:"400",zIndex:1,_after:{position:"absolute",content:"''",width:"600",height:"600",zIndex:0}}}}},defaultVariants:{size:"md"}}),Ks=w.defineSlotRecipe({slots:["root","trigger","triggerLabel","options","optionGroup","option"],className:"nimbus-select",base:{root:{colorPalette:"primary",display:"inline-block",position:"relative",maxWidth:"100%",borderRadius:"200","&[data-disabled]":{layerStyle:"disabled",pointerEvents:"none"}},trigger:{cursor:"button",display:"inline-flex",focusRing:"outside",alignItems:"flex-start",borderRadius:"200",color:"neutral.12",width:"100%",userSelect:"none",boxShadow:"inset 0 0 0 var(--border-width) var(--border-color)","& span":{display:"inline-block",my:"auto"},'& [slot="description"]':{display:"none"},"[data-invalid] &":{"--border-width":"sizes.50","--border-color":"colors.critical.7"}},triggerLabel:{"--button-safespace":"sizes.1400",color:"neutral.12",textAlign:"left",marginRight:"var(--button-safespace)",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&[data-placeholder]":{opacity:.5},"[data-invalid] &":{color:"critical.11"}},options:{"--scrollbar-color":"colors.neutral.8","--scrollbar-bg":"colors.neutral.3",bg:"bg",borderRadius:"200",boxShadow:"5",minWidth:"var(--trigger-width)",p:"200",focusRing:"outside",maxHeight:"40svh",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--scrollbar-color) var(--scrollbar-bg)"},optionGroup:{textStyle:"xs",color:"neutral.11",fontWeight:"600",lineHeight:"350",letterSpacing:"25",textTransform:"uppercase",p:"200",borderBottom:"solid-25",borderColor:"neutral.6",mx:"-200",mt:"200",mb:"300"},option:{focusRing:"outside",cursor:"menuitem",color:"neutral.12",textStyle:"sm",p:"200",borderRadius:"200",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",'&[aria-selected="true"], &[data-focused="true"]':{bg:"primary.4"},'& [slot="label"]':{display:"block"},'& [slot="description"]':{display:"block",color:"neutral.11",textStyle:"xs"},'&[data-disabled="true"]':{layerStyle:"disabled"}}},variants:{size:{sm:{root:{},trigger:{h:"800",px:"400",textStyle:"sm"}},md:{root:{},trigger:{h:"1000",px:"400",textStyle:"md"}}},variant:{outline:{root:{bg:"bg","&:hover":{bg:"primary.2"}},trigger:{"--border-width":"sizes.25","--border-color":"colors.neutral.7"}},ghost:{root:{bg:"transparent","&:hover":{bg:"primaryAlpha.2"}},trigger:{"--border-width":"sizes.25","--border-color":"transparent"}}}},defaultVariants:{size:"md",variant:"outline"}}),Eb=w.defineSlotRecipe({slots:["root","disclosure","trigger","panel","accordionTitle","headerContentRight"],className:"nimbus-accordion",base:{root:{width:"100%"},disclosure:{width:"100%"},trigger:{fontSize:"var(--font-size)",focusVisibleRing:"outside",minHeight:"1200",bg:"none",flexGrow:1,display:"flex",alignItems:"center",gap:"8px",width:"auto","& svg":{width:"var(--width)",height:"var(--height)",rotate:"0deg",transition:"rotate 200ms"},'&[aria-expanded="true"] svg':{rotate:"90deg"},"&[disabled]":{layerStyle:"disabled"}},panel:{paddingTop:"var(--padding-top)",paddingBottom:"var(--padding-bottom)",paddingLeft:"var(--padding-left)",'&[aria-hidden="true"]':{display:"none"}},accordionTitle:{fontWeight:"700"}},variants:{size:{md:{trigger:{"--font-size":"fontSizes.500","& svg":{"--width":"sizes.600","--height":"sizes.600"}},panel:{"--padding-top":"spacing.600","--padding-bottom":"spacing.800","--padding-left":"spacing.800"}},sm:{trigger:{"--font-size":"fontSizes.400","& svg":{"--width":"sizes.500","--height":"sizes.500"}},panel:{"--padding-top":"spacing.400","--padding-bottom":"spacing.600","--padding-left":"spacing.700"}}}},defaultVariants:{size:"md"}}),wb={dialog:$b,list:xb,table:Sb,checkbox:Pb,select:Ks,accordion:Eb},Cb=w.defineTextStyles(U.themeTokens.textStyle),Tb=w.defineTokens.durations(U.themeTokens.aspectRatio),kb=w.defineTokens.animations(U.themeTokens.animation),Db=w.defineTokens.blurs(U.themeTokens.blur),Rb=w.defineTokens.borders(U.themeTokens.border),Kb=w.defineTokens.colors({...U.themeTokens.color["blacks-and-whites"]}),Lb=w.defineTokens.durations(U.themeTokens.duration),Fb=w.defineTokens.easings(U.themeTokens.easing),Mb=w.defineTokens.fonts(U.themeTokens.fontFamily),Ab=w.defineTokens.fontSizes(U.themeTokens.fontSize),Ib=w.defineTokens.fontWeights(U.themeTokens.fontWeight),Nb=t=>Object.keys(t).reduce((e,n)=>{const i=parseFloat(t[n].value)/100;return e[n]={value:`${i}em`},e},{}),Bb=w.defineTokens.letterSpacings(Nb(U.themeTokens.letterSpacing)),Ob=w.defineTokens.lineHeights(U.themeTokens.lineHeight),zb=w.defineTokens.radii(U.themeTokens.borderRadius),Hb=w.defineTokens.spacing(U.themeTokens.spacing),Vb=w.defineTokens.sizes({...U.themeTokens.size,"1/2":{value:"50%"},"1/3":{value:"33.333333%"},"2/3":{value:"66.666667%"},"1/4":{value:"25%"},"3/4":{value:"75%"},"1/5":{value:"20%"},"2/5":{value:"40%"},"3/5":{value:"60%"},"4/5":{value:"80%"},"1/6":{value:"16.666667%"},"2/6":{value:"33.333333%"},"3/6":{value:"50%"},"4/6":{value:"66.666667%"},"5/6":{value:"83.333333%"},"1/12":{value:"8.333333%"},"2/12":{value:"16.666667%"},"3/12":{value:"25%"},"4/12":{value:"33.333333%"},"5/12":{value:"41.666667%"},"6/12":{value:"50%"},"7/12":{value:"58.333333%"},"8/12":{value:"66.666667%"},"9/12":{value:"75%"},"10/12":{value:"83.333333%"},"11/12":{value:"91.666667%"},max:{value:"max-content"},min:{value:"min-content"},fit:{value:"fit-content"},prose:{value:"60ch"},full:{value:"100%"},dvh:{value:"100dvh"},svh:{value:"100svh"},lvh:{value:"100lvh"},dvw:{value:"100dvw"},svw:{value:"100svw"},lvw:{value:"100lvw"},vw:{value:"100vw"},vh:{value:"100vh"}}),jb=w.defineTokens.zIndex(U.themeTokens.zIndex),_b=w.defineTokens.cursor(U.themeTokens.cursor),Wb={aspectRatios:Tb,animations:kb,blurs:Db,borders:Rb,colors:Kb,durations:Lb,easings:Fb,fonts:Mb,fontSizes:Ab,fontWeights:Ib,letterSpacings:Bb,lineHeights:Ob,radii:zb,spacing:Hb,sizes:Vb,zIndex:jb,cursor:_b},Ub=w.defineConfig({preflight:!0,cssVarsPrefix:"nimbus",cssVarsRoot:":where(:root, :host)",globalCss:ub,theme:{breakpoints:sb,keyframes:db,tokens:Wb,semanticTokens:yb,recipes:hb,slotRecipes:wb,textStyles:Cb,layerStyles:cb,animationStyles:ob}}),Ls=w.createSystem(w.defaultBaseConfig,Ub);function Gb(){const[t,e]=s.useState(n());function n(){return document.documentElement.style.getPropertyValue("color-scheme")||localStorage.getItem("theme")||"light"}return s.useEffect(()=>{const r=document.documentElement,i=new MutationObserver(()=>{const l=n();e(l)});return i.observe(r,{attributes:!0,attributeFilter:["style"]}),()=>i.disconnect()},[]),t}function qb({children:t,...e}){return P.jsx(w.ChakraProvider,{value:Ls,children:P.jsx(rb,{enableSystem:!1,...e,children:P.jsx(P.Fragment,{children:t})})})}function cn(t){const e={},n={...t};return Object.keys(t).forEach(r=>{Object.prototype.hasOwnProperty.call(t,r)&&w.defaultSystem.isValidProperty(r)&&(e[r]=t[r],delete n[r])}),[e,n]}const{withProvider:Yb,withContext:Fs}=w.createSlotRecipeContext({key:"checkbox"}),Zb=Yb("label","root"),Xb=Fs("span","label"),Jb=Fs("span","indicator"),Ms=s.forwardRef((t,e)=>{const n=s.useRef(null),r=ce(w.mergeRefs(n,e)),i=w.useSlotRecipe({key:"checkbox"}),[l]=i.splitVariantProps(t),[o,a]=cn(t),u=Ol(t),{inputProps:d}=tc(a,u,r),{isFocused:c,focusProps:f}=Le(),b=u.isSelected&&!t.isIndeterminate,p=t.isIndeterminate,h={"data-selected":b,"data-indeterminate":p,"data-invalid":t.isInvalid,"data-disabled":t.isDisabled,"data-focus":c||void 0};return P.jsxs(Zb,{"data-slot":"root",...l,...h,...o,children:[P.jsxs(Jb,{"data-slot":"indicator",...h,children:[b&&P.jsx(se.Check,{}),p&&P.jsx(se.Remove,{}),P.jsx(Br,{as:"span",children:P.jsx("input",{...A(d,f),ref:r})})]}),t.children&&P.jsx(Xb,{"data-slot":"label",...h,children:t.children})]})});Ms.displayName="Checkbox";const fn=s.forwardRef((t,e)=>P.jsx(w.Stack,{ref:e,...t}));fn.displayName="Stack";const Br=t=>{const{as:e="div",...n}=t;return P.jsx(Hl,{elementType:e,...n})};Br.displayName="VisuallyHidden";const{withContext:Qb}=w.createRecipeContext({recipe:Nr}),eh=Qb("input"),As=s.forwardRef((t,e)=>{const n=s.useRef(null),r=ce(w.mergeRefs(n,e)),i=w.useRecipe({recipe:Nr}),[l,o]=i.splitVariantProps(t),[a,u]=cn(o);return P.jsx(hp,{...u,children:P.jsx(eh,{ref:r,...l,...a,asChild:!0,children:P.jsx(Jf,{})})})});As.displayName="TextInput";const Is=s.forwardRef((t,e)=>P.jsx(w.Grid,{ref:e,...t}));Is.displayName="Grid";const th=Object.assign(Is,{Item:w.GridItem}),{withProvider:nh,withContext:Pt}=w.createSlotRecipeContext({key:"select"}),rh=nh("div","root"),ih=Pt("button","trigger"),lh=Pt("span","triggerLabel"),oh=Pt("div","options"),ah=Pt("div","option"),sh=Pt("div","optionGroup"),Ns=()=>{const t=s.useContext(Fr);if(!(t!=null&&t.selectedKey))return null;const e=()=>{t==null||t.setSelectedKey(null)};return P.jsx(xt,{pointerEvents:"all",size:"2xs",variant:"ghost",tone:"primary","aria-label":"Clear Selection",onPress:e,children:P.jsx(se.Close,{})})};Ns.displayName="Select.ClearButton";const Or=s.forwardRef(({children:t,isLoading:e,isDisabled:n,...r},i)=>{const l=w.useSlotRecipe({recipe:Ks}),[o,a]=l.splitVariantProps(r),[u,d]=cn(a),c={...d,isDisabled:e||n};return P.jsx(rh,{asChild:!0,ref:i,...o,...u,children:P.jsxs(Ap,{...c,children:[P.jsxs(w.chakra.div,{position:"relative",children:[P.jsx(ih,{zIndex:0,asChild:!0,children:P.jsx(tp,{children:P.jsx(lh,{asChild:!0,children:P.jsx(Np,{})})})}),P.jsxs(w.Flex,{position:"absolute",top:"0",bottom:"0",zIndex:1,right:"400",pointerEvents:"none",children:[P.jsx(w.Flex,{width:"600",my:"auto",children:P.jsx(Ns,{})}),P.jsx(w.Flex,{my:"auto",w:"600",h:"600",pointerEvents:"none",children:P.jsx(xe,{color:"neutral.9",asChild:!0,m:"auto",w:"400",h:"400",children:e?P.jsx(xe,{asChild:!0,animation:"spin",animationDuration:"slowest",children:P.jsx(se.Loop,{})}):P.jsx(se.KeyboardArrowDown,{})})})]})]}),P.jsx(xs,{children:t})]})})});Or.displayName="Select.Root";const zr=t=>s.forwardRef(t),Hr=zr((t,e)=>{const[n,r]=cn(t);return P.jsx(oh,{asChild:!0,...n,children:P.jsx(Pp,{ref:e,...r})})});Hr.displayName="Select.Options";const Vr=zr((t,e)=>P.jsx(ah,{asChild:!0,ref:e,children:P.jsx(Cp,{...t})}));Vr.displayName="Select.Option";const jr=zr(({label:t,items:e,children:n,...r},i)=>{if(e&&typeof n!="function")throw new Error('SelectOptionGroup: When "items" is provided, "children" must be a function');return P.jsxs(wp,{ref:i,...r,children:[P.jsx(sh,{asChild:!0,children:P.jsx(xp,{children:t})}),e?P.jsx(Ta,{items:e,children:l=>typeof n=="function"?n(l):null}):n]})});jr.displayName="Select.OptionGroup";const uh={Root:Or,Options:Hr,Option:Vr,OptionGroup:jr},{withProvider:dh,withContext:Et}=w.createSlotRecipeContext({key:"accordion"}),ch=dh("div","root"),fh=Et("div","disclosure"),ph=Et("button","trigger"),bh=Et("div","panel"),hh=Et("div","accordionTitle"),ir=Et("div","headerContentRight"),_r=s.createContext(null),Bs=s.createContext(null),gh=s.forwardRef(({children:t,onExpandedChange:e,...n},r)=>{const i=sp({...n,onExpandedChange:a=>{e==null||e(a.size>0)}}),l=w.useSlotRecipe({key:"accordion"}),[o]=l.splitVariantProps(n);return P.jsx(Bs.Provider,{value:i,children:P.jsx(ch,{"data-slot":"root",ref:r,...o,children:t})})}),mh=s.forwardRef(({children:t},e)=>{const n=s.useContext(_r);if(!n)throw new Error("Accordion.Header must be used within Accordion.Item");const r=s.Children.toArray(t).reduce((i,l)=>(s.isValidElement(l)&&l.type===ir?i.rightContent.push(l):i.main.push(l),i),{main:[],rightContent:[]});return P.jsxs(w.Flex,{justifyContent:"space-between",alignItems:"center",borderBottom:"solid-25",borderColor:"neutral.4",children:[P.jsxs(ph,{ref:w.mergeRefs(n.triggerRef,e),...n.buttonProps,"data-slot":"trigger",outline:n.isFocusVisible?void 0:"none",children:[P.jsx(se.KeyboardArrowRight,{}),P.jsx(hh,{"data-slot":"accordionTitle",children:r.main})]}),r.rightContent.length>0&&P.jsx(ir,{"data-slot":"headerContentRight",children:r.rightContent})]})}),vh=s.forwardRef((t,e)=>{const n=s.useContext(_r),r=ce(w.mergeRefs(n==null?void 0:n.panelRef,e));return P.jsx(bh,{ref:r,...w.mergeProps({...n==null?void 0:n.panelProps,...t}),"data-slot":"panel",children:t.children})}),yh=s.forwardRef(({children:t,id:e,isDisabled:n,isExpanded:r,onExpandedChange:i,value:l},o)=>{const a=te(),d=l||(e||a),c=s.useContext(Bs),f=c?c.expandedKeys.has(d):r,b=ap({isExpanded:f,onExpandedChange:x=>{c&&c.toggleKey(d),i==null||i(x)}}),p=s.useRef(null),h=s.useRef(null),v=n||(c==null?void 0:c.isDisabled)||!1,{buttonProps:y,panelProps:$}=Jc({isExpanded:b.isExpanded,isDisabled:v},b,p),{buttonProps:E}=rn(y,h),{focusProps:C,isFocusVisible:K}=Le(),T={isExpanded:b.isExpanded,triggerRef:h,panelRef:p,buttonProps:A(E,C),panelProps:$,isFocusVisible:K};return P.jsx(_r.Provider,{value:T,children:P.jsx(fh,{"data-slot":"disclosure","data-value":d,"data-expanded":b.isExpanded,ref:o,children:t})})}),$h={Root:gh,Item:yh,Header:mh,Content:vh,HeaderRightContent:ir},xh=w.defineRecipe({className:"nimbus-loading-spinner",base:{display:"inline-flex",alignItems:"center",justifyContent:"center","& svg":{overflow:"visible",transform:"scale(calc(1 - 2/12))"},"& svg [data-svg-path='spinner-pointer']":{stroke:"colorPalette.10",animationName:"spin",animationDuration:"0.5s",animationTimingFunction:"linear",animationIterationCount:"infinite",transformOrigin:"center center 0"},"& svg [data-svg-path='spinner-circle']":{stroke:"colorPalette.5"}},variants:{size:{"2xs":{width:"350",height:"350"},xs:{width:"500",height:"500"},sm:{width:"600",height:"600"},md:{width:"800",height:"800"},lg:{width:"1000",height:"1000"}},tone:{primary:{colorPalette:"ctvioletAlpha"},white:{colorPalette:"whiteAlpha"}}},defaultVariants:{size:"sm",tone:"primary"}}),{withContext:Sh}=w.createRecipeContext({recipe:xh}),Ph=Sh("div"),Eh="M22.5 12C22.5 13.3789 22.2284 14.7443 21.7007 16.0182C21.1731 17.2921 20.3996 18.4496 19.4246 19.4246C18.4496 20.3996 17.2921 21.1731 16.0182 21.7007C14.7443 22.2284 13.3789 22.5 12 22.5C10.6211 22.5 9.25574 22.2284 7.98182 21.7007C6.7079 21.1731 5.55039 20.3996 4.57538 19.4246C3.60036 18.4496 2.82694 17.2921 2.29926 16.0182C1.77159 14.7443 1.5 13.3789 1.5 12C1.5 10.6211 1.77159 9.25574 2.29927 7.98182C2.82694 6.7079 3.60037 5.55039 4.57538 4.57538C5.5504 3.60036 6.70791 2.82694 7.98183 2.29926C9.25575 1.77159 10.6211 1.5 12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60037 19.4246 4.57538C20.3996 5.5504 21.1731 6.70791 21.7007 7.98183C22.2284 9.25575 22.5 10.6211 22.5 12L22.5 12Z",wh="M12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60036 19.4246 4.57538C20.3996 5.55039 21.1731 6.70791 21.7007 7.98183C22.2284 9.25574 22.5 10.6211 22.5 12",Os=s.forwardRef(({"aria-label":t="Loading data",...e},n)=>{const{progressBarProps:r}=lf({isIndeterminate:!0,"aria-label":t,...e});return P.jsx(Ph,{ref:n,...A(e,r),"aria-label":t,children:P.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:[P.jsx("path",{d:Eh,"data-svg-path":"spinner-circle",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),P.jsx("path",{d:wh,"data-svg-path":"spinner-pointer",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})]})})});Os.displayName="LoadingSpinner";const Ch=w.defineSlotRecipe({slots:["root","header","content"],className:"nimbus-card",base:{root:{colorPalette:"slate",display:"inline-flex",alignItems:"flex-start",borderRadius:"300",focusVisibleRing:"outside"}},variants:{cardPadding:{sm:{root:{padding:"200"}},md:{root:{padding:"400"}},lg:{root:{padding:"600"}}},borderStyle:{none:{},outlined:{root:{border:"solid-25",borderColor:"colorPalette.3"}}},elevation:{none:{},elevated:{root:{shadow:"1"}}},backgroundStyle:{default:{root:{backgroundColor:"colorPalette.contrast"}},muted:{root:{backgroundColor:"colorPalette.2"}}}}}),{withProvider:Th,withContext:zs}=w.createSlotRecipeContext({recipe:Ch}),kh=Th("div","root"),Dh=zs("div","header"),Rh=zs("div","content"),Wr=s.createContext(void 0),Ur=s.forwardRef(({children:t,...e},n)=>{const{isFocused:r,isFocusVisible:i,focusProps:l}=Le(),[o,a]=s.useState(null),[u,d]=s.useState(null),c=s.useMemo(()=>({setHeader:a,setContent:d}),[a,d]);return P.jsx(Wr.Provider,{value:c,children:P.jsxs(kh,{ref:n,...A(e,l),"data-focus":r||void 0,"data-focus-visible":i||void 0,tabIndex:0,children:[P.jsxs(fn,{direction:"column",gap:"200",children:[o,u]}),t]})})});Ur.displayName="Card.Root";const Gr=({children:t,...e})=>{const n=s.useContext(Wr);return s.useEffect(()=>{if(n){const r=P.jsx(Dh,{...e,children:t});return n.setHeader(r),()=>n.setHeader(null)}},[t,e]),null};Gr.displayName="Card.Header";const qr=({children:t,...e})=>{const n=s.useContext(Wr);return s.useEffect(()=>{if(n){const r=P.jsx(Rh,{...e,children:t});return n.setContent(r),()=>n.setContent(null)}},[t,e]),null};qr.displayName="Card.Content";const Kh={Root:Ur,Header:Gr,Content:qr},Lh=w.defineRecipe({className:"nimbus-badge",base:{display:"inline-flex",alignItems:"center",borderRadius:"200",justifyContent:"center",whiteSpace:"nowrap",verticalAlign:"middle",py:"25",fontWeight:"500",backgroundColor:"colorPalette.3",color:"colorPalette.11",w:"auto",userSelect:"none",_icon:{flexShrink:"0"}},variants:{size:{"2xs":{fontSize:"300",gap:"100",h:"600",lineHeight:"350",px:"200",_icon:{width:"400",height:"400"}},xs:{fontSize:"350",gap:"100",h:"800",lineHeight:"400",px:"300",_icon:{width:"500",height:"500"}},md:{fontSize:"400",gap:"200",h:"1000",lineHeight:"500",px:"400",_icon:{width:"600",height:"600"}}}},defaultVariants:{size:"md"}}),{withContext:Fh}=w.createRecipeContext({recipe:Lh}),Mh=Fh("span"),Ah=s.forwardRef((t,e)=>{const{as:n,asChild:r,children:i,...l}=t,o=s.useRef(null),a=ce(w.mergeRefs(o,e)),u=n||"span";return P.jsx(Mh,{as:u,...A(l,{ref:a}),children:i})}),Ih=w.defineSlotRecipe({slots:["root","title","description","icon","actions","dismissButton"],className:"nimbus-alert",base:{root:{display:"inline-flex",flexDirection:"row",gap:"200",width:"100%"},icon:{marginTop:"50","& svg":{width:"500",height:"500",color:"colorPalette.11"}},title:{color:"colorPalette.11"},description:{color:"colorPalette.11"}},variants:{tone:{critical:{root:{colorPalette:"critical"}},info:{root:{colorPalette:"info"}},warning:{root:{colorPalette:"amber"}},positive:{root:{colorPalette:"positive"}}},variant:{flat:{},outlined:{root:{border:"solid-25",borderColor:"colorPalette.5",backgroundColor:"colorPalette.2",padding:"200",borderRadius:"200"}}}}}),{withProvider:Nh,withContext:wt}=w.createSlotRecipeContext({recipe:Ih}),Bh=Nh("div","root"),Oh=wt("div","title"),zh=wt("div","description"),Hh=wt("div","icon"),Vh=wt("div","actions"),jh=wt("div","dismissButton"),_h=t=>{switch(t){case"critical":return P.jsx(se.ErrorOutline,{});case"info":return P.jsx(se.Info,{});case"warning":return P.jsx(se.WarningAmber,{});case"positive":return P.jsx(se.CheckCircleOutline,{});default:return null}},Ct=s.createContext(void 0),Hs=s.forwardRef(({children:t,...e},n)=>{const[r,i]=s.useState(null),[l,o]=s.useState(null),[a,u]=s.useState(null),[d,c]=s.useState(null),f=s.useMemo(()=>({setTitle:i,setDescription:o,setActions:u,setDismiss:c}),[i,o,u,c]);return P.jsx(Ct.Provider,{value:f,children:P.jsxs(Bh,{ref:n,...e,role:"alert",children:[P.jsx(Hh,{alignItems:"flex-start",children:_h(e.tone)}),P.jsxs(fn,{flex:"1",gap:"200",children:[P.jsxs(xe,{children:[r,l]}),a]}),d,t]})})});Hs.displayName="Alert.Root";const Vs=({children:t,...e})=>{const n=s.useContext(Ct);return s.useEffect(()=>{if(n){const r=P.jsx(Oh,{...e,fontWeight:"600",children:t});return n.setTitle(r),()=>n.setTitle(null)}},[t,e]),null};Vs.displayName="Alert.Title";const js=({children:t,...e})=>{const n=s.useContext(Ct);return s.useEffect(()=>{if(n){const r=P.jsx(zh,{...e,children:t});return n.setDescription(r),()=>n.setDescription(null)}},[t,e]),null};js.displayName="Alert.Description";const _s=({children:t,...e})=>{const n=s.useContext(Ct);return s.useEffect(()=>{if(n){const r=P.jsx(Vh,{...e,children:t});return n.setActions(r),()=>n.setActions(null)}},[t,e]),null};_s.displayName="Alert.Actions";const Ws=({children:t,...e})=>{const n=s.useContext(Ct);return s.useEffect(()=>{if(n){const r=P.jsx(jh,{children:P.jsx(xt,{"aria-label":"Dismiss",...e,variant:"ghost",size:"2xs",children:P.jsx(se.Clear,{role:"img"})})});return n.setDismiss(r),()=>n.setDismiss(null)}},[t,e]),null};Ws.displayName="Alert.DismissButton";const Wh={Root:Hs,Title:Vs,Description:js,Actions:_s,DismissButton:Ws};var Xi,Ji,Qi,el;const Uh=w.defineSlotRecipe({slots:["root","button"],className:"nimbus-toggle-button-group",base:{root:{display:"inline-flex"},button:{...Be.base,...(Xi=Be.variants)==null?void 0:Xi.variant.outline,borderRadius:"0",borderRightWidth:"0","&:first-of-type":{borderLeftRadius:"200"},"&:last-of-type":{borderRightWidth:"1px",borderRightRadius:"200"},"&[data-selected=true]":(Ji=Be.variants)==null?void 0:Ji.variant.solid}},variants:{size:{xs:{button:(Qi=Be.variants)==null?void 0:Qi.size.xs},md:{button:(el=Be.variants)==null?void 0:el.size.md}},tone:{primary:{button:{colorPalette:"primary"}},critical:{button:{colorPalette:"critical"}},neutral:{button:{colorPalette:"neutral"}}}},defaultVariants:{size:"md"}}),{withContext:Gh,withProvider:qh}=w.createSlotRecipeContext({recipe:Uh}),Yh=qh(Op,"root"),Zh=Gh(Hp,"button"),Yr=s.forwardRef(({children:t,...e},n)=>P.jsx(Yh,{ref:n,...e,children:t}));Yr.displayName="ToggleButtonGroup.Root";const Zr=s.forwardRef(({children:t,...e},n)=>P.jsx(Zh,{...e,ref:n,children:t}));Zr.displayName="ToggleButtonGroup.Button";const Xh={Root:Yr,Button:Zr},Jh=`
18
18
  "label"
19
19
  "input"
20
20
  "description"
21
21
  "error"
22
- `,Qb=`
22
+ `,Qh=`
23
23
  "label input"
24
24
  "label description"
25
25
  "label error"
26
- `,eh=w.defineSlotRecipe({slots:["root","label","input","description","error","popover"],className:"nimbus-ui-form-field",base:{root:{"--grid-gap":"spacing.100",display:"grid",width:"auto"},label:{gridArea:"label",fontWeight:"500",color:"neutral.11",fontSize:"var(--form-field-font-size)",lineHeight:"var(--form-field-line-height)"},input:{gridArea:"input"},description:{gridArea:"description",color:"neutral.11",fontSize:"var(--form-field-font-size)",lineHeight:"var(--form-field-line-height)"},error:{gridArea:"error",color:"critical.11",fontSize:"var(--form-field-font-size)",lineHeight:"var(--form-field-line-height)"},popover:{"--scrollbar-color":"colors.neutral.8","--scrollbar-bg":"colors.neutral.3",bg:"neutral.1",maxWidth:"xl",borderRadius:"200",boxShadow:"6",border:"solid-25",borderColor:"neutral.8",maxHeight:"40svh",overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--scrollbar-color) var(--scrollbar-bg)",focusRing:"outside"}},variants:{size:{md:{root:{"--form-field-font-size":"fontSizes.350","--form-field-line-height":"lineHeights.500"}},sm:{root:{"--form-field-font-size":"fontSizes.300","--form-field-line-height":"lineHeights.450"}}},direction:{column:{root:{gridTemplateAreas:Jb},input:{mt:"var(--grid-gap)"},description:{mt:"var(--grid-gap)"},error:{mt:"var(--grid-gap)"}},row:{root:{gridTemplateAreas:Qb,gridTemplateColumns:"auto 1fr",gridColumnGap:"200"},description:{mt:"var(--grid-gap)"},error:{mt:"var(--grid-gap)"}}}},defaultVariants:{direction:"column",size:"md"}}),{withProvider:th,withContext:Tt}=w.createSlotRecipeContext({recipe:eh}),rh=th("div","root"),nh=Tt("div","label"),oh=Tt("div","input"),ih=Tt("div","description"),lh=Tt("div","error"),ah=Tt("div","popover"),sh=s.forwardRef(({isInvalid:t,isRequired:e,isDisabled:r,isReadOnly:n,children:o,...i},l)=>{const[a,u]=s.useState({label:null,description:null,error:null,info:null,input:null,isInvalid:t,isRequired:e,isDisabled:r,isReadOnly:n}),{labelProps:c,fieldProps:d,descriptionProps:f,errorMessageProps:v}=$n({label:a.label,description:a.description,errorMessage:a.error});s.useEffect(()=>{u(b=>({...b,isInvalid:t,isRequired:e,isDisabled:r,isReadOnly:n}))},[t,e,r,n]);const p={...d,isInvalid:t,isRequired:e,isDisabled:r,isReadOnly:n};return P.jsx(qe.Provider,{value:{context:a,setContext:u},children:P.jsxs(rh,{ref:l,...i,children:[a.label&&P.jsxs(nh,{...a.labelSlotProps,children:[P.jsxs("label",{...c,children:[a.label,e&&P.jsx("sup",{"aria-hidden":"true",children:"*"})]}),a.info&&P.jsxs(Lp,{children:[P.jsx(xe,{as:"span",display:"inline-block",position:"relative",width:"1ch",height:"1ch",ml:"200",children:P.jsx(xe,{as:"span",display:"inline-flex",position:"absolute",top:"50%",right:"50%",transform:"translate(50%, -50%)",children:P.jsx(xt,{"aria-label":"__MORE INFO",size:"2xs",tone:"info",variant:"link",children:P.jsx(se.HelpOutline,{})})})}),P.jsx(xs,{children:P.jsx(ah,{asChild:!0,children:P.jsx(Fp,{children:P.jsx(xe,{p:"300",children:a.info})})})})]})]}),a.input&&P.jsx(oh,{...a.inputSlotProps,children:s.Children.map(a.input,b=>s.isValidElement(b)?s.cloneElement(b,p):b)}),a.description&&P.jsx(ih,{...f,...a.descriptionSlotProps,children:a.description}),t&&a.error&&P.jsxs(lh,{...v,...a.errorSlotProps,children:[P.jsx(xe,{as:se.ErrorOutline,display:"inline-flex",boxSize:"400",verticalAlign:"text-bottom",mr:"100"}),a.error]}),o]})})}),uh=({children:t,...e})=>{const{setContext:r}=s.useContext(qe);return s.useEffect(()=>{r(n=>({...n,label:t,labelSlotProps:e}))},[t,r]),null},ch=({children:t,...e})=>{const{setContext:r}=s.useContext(qe);return s.useEffect(()=>{r(n=>({...n,input:t,inputSlotProps:e}))},[t,r]),null},dh=({children:t,...e})=>{const{setContext:r}=s.useContext(qe);return s.useEffect(()=>{r(n=>({...n,description:t,descriptionSlotProps:e}))},[t,r]),null},fh=({children:t,...e})=>{const{setContext:r}=s.useContext(qe);return s.useEffect(()=>{r(n=>({...n,error:t,errorSlotProps:e}))},[t,r]),null},ph=({children:t})=>{const{setContext:e}=s.useContext(qe);return s.useEffect(()=>{e(r=>({...r,info:t}))},[t,e]),null},qe=s.createContext({context:{label:null,description:null,error:null,info:null,input:null},setContext:()=>{}}),vh={Root:sh,Label:uh,Input:ch,Description:dh,Error:fh,InfoBox:ph};function on(){return on=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},on.apply(null,arguments)}var Us=["shift","alt","meta","mod","ctrl"],bh={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function we(t){return(t&&bh[t]||t||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function hh(t){return Us.includes(t)}function Fr(t,e){return e===void 0&&(e=","),t.split(e)}function Mr(t,e,r){e===void 0&&(e="+");var n=t.toLocaleLowerCase().split(e).map(function(l){return we(l)}),o={alt:n.includes("alt"),ctrl:n.includes("ctrl")||n.includes("control"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(function(l){return!Us.includes(l)});return on({},o,{keys:i,description:r,hotkey:t})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(t){t.key!==void 0&&Gs([we(t.key),we(t.code)])}),document.addEventListener("keyup",function(t){t.key!==void 0&&qs([we(t.key),we(t.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){Ce.clear()})})();var Ce=new Set;function Xn(t){return Array.isArray(t)}function gh(t,e){e===void 0&&(e=",");var r=Xn(t)?t:t.split(e);return r.every(function(n){return Ce.has(n.trim().toLowerCase())})}function Gs(t){var e=Array.isArray(t)?t:[t];Ce.has("meta")&&Ce.forEach(function(r){return!hh(r)&&Ce.delete(r.toLowerCase())}),e.forEach(function(r){return Ce.add(r.toLowerCase())})}function qs(t){var e=Array.isArray(t)?t:[t];t==="meta"?Ce.clear():e.forEach(function(r){return Ce.delete(r.toLowerCase())})}function mh(t,e,r){(typeof r=="function"&&r(t,e)||r===!0)&&t.preventDefault()}function yh(t,e,r){return typeof r=="function"?r(t,e):r===!0||r===void 0}function $h(t){return Ys(t,["input","textarea","select"])}function Ys(t,e){e===void 0&&(e=!1);var r=t.target,n=t.composed,o=null;return xh(r)&&n?o=t.composedPath()[0]&&t.composedPath()[0].tagName:o=r&&r.tagName,Xn(e)?!!(o&&e&&e.some(function(i){var l;return i.toLowerCase()===((l=o)==null?void 0:l.toLowerCase())})):!!(o&&e&&e)}function xh(t){return!!t.tagName&&!t.tagName.startsWith("-")&&t.tagName.includes("-")}function Sh(t,e){return t.length===0&&e?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):e?t.some(function(r){return e.includes(r)})||t.includes("*"):!0}var Ph=function(e,r,n){n===void 0&&(n=!1);var o=r.alt,i=r.meta,l=r.mod,a=r.shift,u=r.ctrl,c=r.keys,d=e.key,f=e.code,v=e.ctrlKey,p=e.metaKey,b=e.shiftKey,m=e.altKey,y=we(f),$=d.toLowerCase();if(!(c!=null&&c.includes(y))&&!(c!=null&&c.includes($))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(y))return!1;if(!n){if(o===!m&&$!=="alt"||a===!b&&$!=="shift")return!1;if(l){if(!p&&!v)return!1}else if(i===!p&&$!=="meta"&&$!=="os"||u===!v&&$!=="ctrl"&&$!=="control")return!1}return c&&c.length===1&&(c.includes($)||c.includes(y))?!0:c?gh(c):!c},Eh=s.createContext(void 0),wh=function(){return s.useContext(Eh)};function Zs(t,e){return t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).reduce(function(r,n){return r&&Zs(t[n],e[n])},!0):t===e}var Ch=s.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Th=function(){return s.useContext(Ch)};function kh(t){var e=s.useRef(void 0);return Zs(e.current,t)||(e.current=t),e.current}var Yo=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},Dh=typeof window<"u"?s.useLayoutEffect:s.useEffect;function Rh(t,e,r,n){var o=s.useState(null),i=o[0],l=o[1],a=s.useRef(!1),u=r instanceof Array?n instanceof Array?void 0:n:r,c=Xn(t)?t.join(u==null?void 0:u.splitKey):t,d=r instanceof Array?r:n instanceof Array?n:void 0,f=s.useCallback(e,d??[]),v=s.useRef(f);d?v.current=f:v.current=e;var p=kh(u),b=Th(),m=b.enabledScopes,y=wh();return Dh(function(){if(!((p==null?void 0:p.enabled)===!1||!Sh(m,p==null?void 0:p.scopes))){var $=function(x,M){var F;if(M===void 0&&(M=!1),!($h(x)&&!Ys(x,p==null?void 0:p.enableOnFormTags))){if(i!==null){var N=i.getRootNode();if((N instanceof Document||N instanceof ShadowRoot)&&N.activeElement!==i&&!i.contains(N.activeElement)){Yo(x);return}}(F=x.target)!=null&&F.isContentEditable&&!(p!=null&&p.enableOnContentEditable)||Fr(c,p==null?void 0:p.splitKey).forEach(function(L){var h,R=Mr(L,p==null?void 0:p.combinationKey);if(Ph(x,R,p==null?void 0:p.ignoreModifiers)||(h=R.keys)!=null&&h.includes("*")){if(p!=null&&p.ignoreEventWhen!=null&&p.ignoreEventWhen(x)||M&&a.current)return;if(mh(x,R,p==null?void 0:p.preventDefault),!yh(x,R,p==null?void 0:p.enabled)){Yo(x);return}v.current(x,R),M||(a.current=!0)}})}},E=function(x){x.key!==void 0&&(Gs(we(x.code)),((p==null?void 0:p.keydown)===void 0&&(p==null?void 0:p.keyup)!==!0||p!=null&&p.keydown)&&$(x))},C=function(x){x.key!==void 0&&(qs(we(x.code)),a.current=!1,p!=null&&p.keyup&&$(x,!0))},K=i||(u==null?void 0:u.document)||document;return K.addEventListener("keyup",C,u==null?void 0:u.eventListenerOptions),K.addEventListener("keydown",E,u==null?void 0:u.eventListenerOptions),y&&Fr(c,p==null?void 0:p.splitKey).forEach(function(T){return y.addHotkey(Mr(T,p==null?void 0:p.combinationKey,p==null?void 0:p.description))}),function(){K.removeEventListener("keyup",C,u==null?void 0:u.eventListenerOptions),K.removeEventListener("keydown",E,u==null?void 0:u.eventListenerOptions),y&&Fr(c,p==null?void 0:p.splitKey).forEach(function(T){return y.removeHotkey(Mr(T,p==null?void 0:p.combinationKey,p==null?void 0:p.description))})}}},[i,c,p,m]),l}function Kh(){var t=s.useRef(!1),e=s.useCallback(function(){return t.current},[]);return s.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e}var Lh=function(t){t===void 0&&(t={});var e=s.useState(t),r=e[0],n=e[1],o=s.useCallback(function(i){n(function(l){return Object.assign({},l,i instanceof Function?i(l):i)})},[]);return[r,o]},Ar,Zo;function Fh(){return Zo||(Zo=1,Ar=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n<t.rangeCount;n++)r.push(t.getRangeAt(n));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return t.removeAllRanges(),function(){t.type==="Caret"&&t.removeAllRanges(),t.rangeCount||r.forEach(function(o){t.addRange(o)}),e&&e.focus()}}),Ar}var Ir,Xo;function Mh(){if(Xo)return Ir;Xo=1;var t=Fh(),e={"text/plain":"Text","text/html":"Url",default:"Text"},r="Copy to clipboard: #{key}, Enter";function n(i){var l=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return i.replace(/#{\s*key\s*}/g,l)}function o(i,l){var a,u,c,d,f,v,p=!1;l||(l={}),a=l.debug||!1;try{c=t(),d=document.createRange(),f=document.getSelection(),v=document.createElement("span"),v.textContent=i,v.ariaHidden="true",v.style.all="unset",v.style.position="fixed",v.style.top=0,v.style.clip="rect(0, 0, 0, 0)",v.style.whiteSpace="pre",v.style.webkitUserSelect="text",v.style.MozUserSelect="text",v.style.msUserSelect="text",v.style.userSelect="text",v.addEventListener("copy",function(m){if(m.stopPropagation(),l.format)if(m.preventDefault(),typeof m.clipboardData>"u"){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var y=e[l.format]||e.default;window.clipboardData.setData(y,i)}else m.clipboardData.clearData(),m.clipboardData.setData(l.format,i);l.onCopy&&(m.preventDefault(),l.onCopy(m.clipboardData))}),document.body.appendChild(v),d.selectNodeContents(v),f.addRange(d);var b=document.execCommand("copy");if(!b)throw new Error("copy command was unsuccessful");p=!0}catch(m){a&&console.error("unable to copy using execCommand: ",m),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(l.format||"text",i),l.onCopy&&l.onCopy(window.clipboardData),p=!0}catch(y){a&&console.error("unable to copy using clipboardData: ",y),a&&console.error("falling back to prompt"),u=n("message"in l?l.message:r),window.prompt(u,i)}}finally{f&&(typeof f.removeRange=="function"?f.removeRange(d):f.removeAllRanges()),v&&document.body.removeChild(v),c()}return p}return Ir=o,Ir}var Ah=Mh();const Ih=Qd(Ah);var Nh=function(){var t=Kh(),e=Lh({value:void 0,error:void 0,noUserInteraction:!0}),r=e[0],n=e[1],o=s.useCallback(function(i){if(t()){var l,a;try{if(typeof i!="string"&&typeof i!="number"){var u=new Error("Cannot copy typeof "+typeof i+" to clipboard, must be a string");process.env.NODE_ENV==="development"&&console.error(u),n({value:i,error:u,noUserInteraction:!0});return}else if(i===""){var u=new Error("Cannot copy empty string to clipboard.");process.env.NODE_ENV==="development"&&console.error(u),n({value:i,error:u,noUserInteraction:!0});return}a=i.toString(),l=Ih(a),n({value:a,error:void 0,noUserInteraction:l})}catch(c){n({value:a,error:c,noUserInteraction:l})}}},[]);return[r,o]};Object.defineProperty(exports,"Bleed",{enumerable:!0,get:()=>w.Bleed});Object.defineProperty(exports,"Code",{enumerable:!0,get:()=>w.Code});Object.defineProperty(exports,"Em",{enumerable:!0,get:()=>w.Em});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>w.Flex});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>w.Heading});Object.defineProperty(exports,"Highlight",{enumerable:!0,get:()=>w.Highlight});Object.defineProperty(exports,"Kbd",{enumerable:!0,get:()=>w.Kbd});Object.defineProperty(exports,"List",{enumerable:!0,get:()=>w.List});Object.defineProperty(exports,"Table",{enumerable:!0,get:()=>w.Table});exports.Accordion=$b;exports.Alert=Wb;exports.Avatar=ni;exports.Badge=Ab;exports.Box=xe;exports.Button=or;exports.Card=Kb;exports.CardContent=qn;exports.CardHeader=Gn;exports.CardRoot=Un;exports.Checkbox=Ms;exports.ColorModeLabel=iv;exports.DialogActionTrigger=Cf;exports.DialogBackdrop=Sf;exports.DialogBody=xf;exports.DialogCloseTrigger=gf;exports.DialogContent=hf;exports.DialogDescription=Ef;exports.DialogFooter=yf;exports.DialogHeader=$f;exports.DialogRoot=mf;exports.DialogTitle=Pf;exports.DialogTrigger=wf;exports.FormField=vh;exports.FormFieldContext=qe;exports.Grid=tb;exports.IconButton=xt;exports.Link=ha;exports.ListItem=Rf;exports.ListRoot=Df;exports.LoadingSpinner=Os;exports.MakeElementFocusable=Ds;exports.NimbusProvider=qv;exports.Select=ub;exports.SimpleGrid=Kf;exports.Stack=dr;exports.TableBody=Of;exports.TableCell=Bf;exports.TableColumn=Mf;exports.TableColumnGroup=Ff;exports.TableColumnHeader=zf;exports.TableFooter=If;exports.TableHeader=Af;exports.TableRoot=Lf;exports.TableRow=Nf;exports.Text=ma;exports.TextInput=As;exports.ToggleButtonGroup=Xb;exports.ToggleButtonGroupButton=Zn;exports.ToggleButtonGroupRoot=Yn;exports.Tooltip=Ts;exports.TooltipTrigger=ks;exports.VisuallyHidden=Bn;exports._SelectOption=Vn;exports._SelectOptionGroup=jn;exports._SelectOptions=Hn;exports._SelectRoot=On;exports.system=Ls;exports.useColorMode=In;exports.useColorModeValue=ov;exports.useColorScheme=Gv;exports.useCopyToClipboard=Nh;exports.useHotkeys=Rh;
26
+ `,eg=w.defineSlotRecipe({slots:["root","label","input","description","error","popover"],className:"nimbus-ui-form-field",base:{root:{"--grid-gap":"spacing.100",display:"grid",width:"auto"},label:{gridArea:"label",fontWeight:"500",color:"neutral.11",fontSize:"var(--form-field-font-size)",lineHeight:"var(--form-field-line-height)"},input:{gridArea:"input"},description:{gridArea:"description",color:"neutral.11",fontSize:"var(--form-field-font-size)",lineHeight:"var(--form-field-line-height)"},error:{gridArea:"error",color:"critical.11",fontSize:"var(--form-field-font-size)",lineHeight:"var(--form-field-line-height)"},popover:{"--scrollbar-color":"colors.neutral.8","--scrollbar-bg":"colors.neutral.3",bg:"neutral.1",maxWidth:"xl",borderRadius:"200",boxShadow:"6",border:"solid-25",borderColor:"neutral.8",maxHeight:"40svh",overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--scrollbar-color) var(--scrollbar-bg)",focusRing:"outside"}},variants:{size:{md:{root:{"--form-field-font-size":"fontSizes.350","--form-field-line-height":"lineHeights.500"}},sm:{root:{"--form-field-font-size":"fontSizes.300","--form-field-line-height":"lineHeights.450"}}},direction:{column:{root:{gridTemplateAreas:Jh},input:{mt:"var(--grid-gap)"},description:{mt:"var(--grid-gap)"},error:{mt:"var(--grid-gap)"}},row:{root:{gridTemplateAreas:Qh,gridTemplateColumns:"auto 1fr",gridColumnGap:"200"},description:{mt:"var(--grid-gap)"},error:{mt:"var(--grid-gap)"}}}},defaultVariants:{direction:"column",size:"md"}}),{withProvider:tg,withContext:Tt}=w.createSlotRecipeContext({recipe:eg}),ng=tg("div","root"),rg=Tt("div","label"),ig=Tt("div","input"),lg=Tt("div","description"),og=Tt("div","error"),ag=Tt("div","popover"),sg=s.forwardRef(({isInvalid:t,isRequired:e,isDisabled:n,isReadOnly:r,children:i,...l},o)=>{const[a,u]=s.useState({label:null,description:null,error:null,info:null,input:null,isInvalid:t,isRequired:e,isDisabled:n,isReadOnly:r}),{labelProps:d,fieldProps:c,descriptionProps:f,errorMessageProps:b}=$r({label:a.label,description:a.description,errorMessage:a.error});s.useEffect(()=>{u(h=>({...h,isInvalid:t,isRequired:e,isDisabled:n,isReadOnly:r}))},[t,e,n,r]);const p={...c,isInvalid:t,isRequired:e,isDisabled:n,isReadOnly:r};return P.jsx(qe.Provider,{value:{context:a,setContext:u},children:P.jsxs(ng,{ref:o,...l,children:[a.label&&P.jsxs(rg,{...a.labelSlotProps,children:[P.jsxs("label",{...d,children:[a.label,e&&P.jsx("sup",{"aria-hidden":"true",children:"*"})]}),a.info&&P.jsxs(Lp,{children:[P.jsx(xe,{as:"span",display:"inline-block",position:"relative",width:"1ch",height:"1ch",ml:"200",children:P.jsx(xe,{as:"span",display:"inline-flex",position:"absolute",top:"50%",right:"50%",transform:"translate(50%, -50%)",children:P.jsx(xt,{"aria-label":"__MORE INFO",size:"2xs",tone:"info",variant:"link",children:P.jsx(se.HelpOutline,{})})})}),P.jsx(xs,{children:P.jsx(ag,{asChild:!0,children:P.jsx(Fp,{children:P.jsx(xe,{p:"300",children:a.info})})})})]})]}),a.input&&P.jsx(ig,{...a.inputSlotProps,children:s.Children.map(a.input,h=>s.isValidElement(h)?s.cloneElement(h,p):h)}),a.description&&P.jsx(lg,{...f,...a.descriptionSlotProps,children:a.description}),t&&a.error&&P.jsxs(og,{...b,...a.errorSlotProps,children:[P.jsx(xe,{as:se.ErrorOutline,display:"inline-flex",boxSize:"400",verticalAlign:"text-bottom",mr:"100"}),a.error]}),i]})})}),ug=({children:t,...e})=>{const{setContext:n}=s.useContext(qe);return s.useEffect(()=>{n(r=>({...r,label:t,labelSlotProps:e}))},[t,n]),null},dg=({children:t,...e})=>{const{setContext:n}=s.useContext(qe);return s.useEffect(()=>{n(r=>({...r,input:t,inputSlotProps:e}))},[t,n]),null},cg=({children:t,...e})=>{const{setContext:n}=s.useContext(qe);return s.useEffect(()=>{n(r=>({...r,description:t,descriptionSlotProps:e}))},[t,n]),null},fg=({children:t,...e})=>{const{setContext:n}=s.useContext(qe);return s.useEffect(()=>{n(r=>({...r,error:t,errorSlotProps:e}))},[t,n]),null},pg=({children:t})=>{const{setContext:e}=s.useContext(qe);return s.useEffect(()=>{e(n=>({...n,info:t}))},[t,e]),null},qe=s.createContext({context:{label:null,description:null,error:null,info:null,input:null},setContext:()=>{}}),bg={Root:sg,Label:ug,Input:dg,Description:cg,Error:fg,InfoBox:pg};function lr(){return lr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},lr.apply(null,arguments)}var Us=["shift","alt","meta","mod","ctrl"],hg={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function we(t){return(t&&hg[t]||t||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function gg(t){return Us.includes(t)}function Mn(t,e){return e===void 0&&(e=","),t.split(e)}function An(t,e,n){e===void 0&&(e="+");var r=t.toLocaleLowerCase().split(e).map(function(o){return we(o)}),i={alt:r.includes("alt"),ctrl:r.includes("ctrl")||r.includes("control"),shift:r.includes("shift"),meta:r.includes("meta"),mod:r.includes("mod")},l=r.filter(function(o){return!Us.includes(o)});return lr({},i,{keys:l,description:n,hotkey:t})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(t){t.key!==void 0&&Gs([we(t.key),we(t.code)])}),document.addEventListener("keyup",function(t){t.key!==void 0&&qs([we(t.key),we(t.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){Ce.clear()})})();var Ce=new Set;function Xr(t){return Array.isArray(t)}function mg(t,e){e===void 0&&(e=",");var n=Xr(t)?t:t.split(e);return n.every(function(r){return Ce.has(r.trim().toLowerCase())})}function Gs(t){var e=Array.isArray(t)?t:[t];Ce.has("meta")&&Ce.forEach(function(n){return!gg(n)&&Ce.delete(n.toLowerCase())}),e.forEach(function(n){return Ce.add(n.toLowerCase())})}function qs(t){var e=Array.isArray(t)?t:[t];t==="meta"?Ce.clear():e.forEach(function(n){return Ce.delete(n.toLowerCase())})}function vg(t,e,n){(typeof n=="function"&&n(t,e)||n===!0)&&t.preventDefault()}function yg(t,e,n){return typeof n=="function"?n(t,e):n===!0||n===void 0}function $g(t){return Ys(t,["input","textarea","select"])}function Ys(t,e){e===void 0&&(e=!1);var n=t.target,r=t.composed,i=null;return xg(n)&&r?i=t.composedPath()[0]&&t.composedPath()[0].tagName:i=n&&n.tagName,Xr(e)?!!(i&&e&&e.some(function(l){var o;return l.toLowerCase()===((o=i)==null?void 0:o.toLowerCase())})):!!(i&&e&&e)}function xg(t){return!!t.tagName&&!t.tagName.startsWith("-")&&t.tagName.includes("-")}function Sg(t,e){return t.length===0&&e?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):e?t.some(function(n){return e.includes(n)})||t.includes("*"):!0}var Pg=function(e,n,r){r===void 0&&(r=!1);var i=n.alt,l=n.meta,o=n.mod,a=n.shift,u=n.ctrl,d=n.keys,c=e.key,f=e.code,b=e.ctrlKey,p=e.metaKey,h=e.shiftKey,v=e.altKey,y=we(f),$=c.toLowerCase();if(!(d!=null&&d.includes(y))&&!(d!=null&&d.includes($))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(y))return!1;if(!r){if(i===!v&&$!=="alt"||a===!h&&$!=="shift")return!1;if(o){if(!p&&!b)return!1}else if(l===!p&&$!=="meta"&&$!=="os"||u===!b&&$!=="ctrl"&&$!=="control")return!1}return d&&d.length===1&&(d.includes($)||d.includes(y))?!0:d?mg(d):!d},Eg=s.createContext(void 0),wg=function(){return s.useContext(Eg)};function Zs(t,e){return t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).reduce(function(n,r){return n&&Zs(t[r],e[r])},!0):t===e}var Cg=s.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Tg=function(){return s.useContext(Cg)};function kg(t){var e=s.useRef(void 0);return Zs(e.current,t)||(e.current=t),e.current}var qi=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},Dg=typeof window<"u"?s.useLayoutEffect:s.useEffect;function Rg(t,e,n,r){var i=s.useState(null),l=i[0],o=i[1],a=s.useRef(!1),u=n instanceof Array?r instanceof Array?void 0:r:n,d=Xr(t)?t.join(u==null?void 0:u.splitKey):t,c=n instanceof Array?n:r instanceof Array?r:void 0,f=s.useCallback(e,c??[]),b=s.useRef(f);c?b.current=f:b.current=e;var p=kg(u),h=Tg(),v=h.enabledScopes,y=wg();return Dg(function(){if(!((p==null?void 0:p.enabled)===!1||!Sg(v,p==null?void 0:p.scopes))){var $=function(x,M){var F;if(M===void 0&&(M=!1),!($g(x)&&!Ys(x,p==null?void 0:p.enableOnFormTags))){if(l!==null){var N=l.getRootNode();if((N instanceof Document||N instanceof ShadowRoot)&&N.activeElement!==l&&!l.contains(N.activeElement)){qi(x);return}}(F=x.target)!=null&&F.isContentEditable&&!(p!=null&&p.enableOnContentEditable)||Mn(d,p==null?void 0:p.splitKey).forEach(function(L){var g,R=An(L,p==null?void 0:p.combinationKey);if(Pg(x,R,p==null?void 0:p.ignoreModifiers)||(g=R.keys)!=null&&g.includes("*")){if(p!=null&&p.ignoreEventWhen!=null&&p.ignoreEventWhen(x)||M&&a.current)return;if(vg(x,R,p==null?void 0:p.preventDefault),!yg(x,R,p==null?void 0:p.enabled)){qi(x);return}b.current(x,R),M||(a.current=!0)}})}},E=function(x){x.key!==void 0&&(Gs(we(x.code)),((p==null?void 0:p.keydown)===void 0&&(p==null?void 0:p.keyup)!==!0||p!=null&&p.keydown)&&$(x))},C=function(x){x.key!==void 0&&(qs(we(x.code)),a.current=!1,p!=null&&p.keyup&&$(x,!0))},K=l||(u==null?void 0:u.document)||document;return K.addEventListener("keyup",C),K.addEventListener("keydown",E),y&&Mn(d,p==null?void 0:p.splitKey).forEach(function(T){return y.addHotkey(An(T,p==null?void 0:p.combinationKey,p==null?void 0:p.description))}),function(){K.removeEventListener("keyup",C),K.removeEventListener("keydown",E),y&&Mn(d,p==null?void 0:p.splitKey).forEach(function(T){return y.removeHotkey(An(T,p==null?void 0:p.combinationKey,p==null?void 0:p.description))})}}},[l,d,p,v]),o}function Kg(){var t=s.useRef(!1),e=s.useCallback(function(){return t.current},[]);return s.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e}var Lg=function(t){t===void 0&&(t={});var e=s.useState(t),n=e[0],r=e[1],i=s.useCallback(function(l){r(function(o){return Object.assign({},o,l instanceof Function?l(o):l)})},[]);return[n,i]},In,Yi;function Fg(){return Yi||(Yi=1,In=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r<t.rangeCount;r++)n.push(t.getRangeAt(r));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return t.removeAllRanges(),function(){t.type==="Caret"&&t.removeAllRanges(),t.rangeCount||n.forEach(function(i){t.addRange(i)}),e&&e.focus()}}),In}var Nn,Zi;function Mg(){if(Zi)return Nn;Zi=1;var t=Fg(),e={"text/plain":"Text","text/html":"Url",default:"Text"},n="Copy to clipboard: #{key}, Enter";function r(l){var o=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return l.replace(/#{\s*key\s*}/g,o)}function i(l,o){var a,u,d,c,f,b,p=!1;o||(o={}),a=o.debug||!1;try{d=t(),c=document.createRange(),f=document.getSelection(),b=document.createElement("span"),b.textContent=l,b.ariaHidden="true",b.style.all="unset",b.style.position="fixed",b.style.top=0,b.style.clip="rect(0, 0, 0, 0)",b.style.whiteSpace="pre",b.style.webkitUserSelect="text",b.style.MozUserSelect="text",b.style.msUserSelect="text",b.style.userSelect="text",b.addEventListener("copy",function(v){if(v.stopPropagation(),o.format)if(v.preventDefault(),typeof v.clipboardData>"u"){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var y=e[o.format]||e.default;window.clipboardData.setData(y,l)}else v.clipboardData.clearData(),v.clipboardData.setData(o.format,l);o.onCopy&&(v.preventDefault(),o.onCopy(v.clipboardData))}),document.body.appendChild(b),c.selectNodeContents(b),f.addRange(c);var h=document.execCommand("copy");if(!h)throw new Error("copy command was unsuccessful");p=!0}catch(v){a&&console.error("unable to copy using execCommand: ",v),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(o.format||"text",l),o.onCopy&&o.onCopy(window.clipboardData),p=!0}catch(y){a&&console.error("unable to copy using clipboardData: ",y),a&&console.error("falling back to prompt"),u=r("message"in o?o.message:n),window.prompt(u,l)}}finally{f&&(typeof f.removeRange=="function"?f.removeRange(c):f.removeAllRanges()),b&&document.body.removeChild(b),d()}return p}return Nn=i,Nn}var Ag=Mg();const Ig=Qc(Ag);var Ng=function(){var t=Kg(),e=Lg({value:void 0,error:void 0,noUserInteraction:!0}),n=e[0],r=e[1],i=s.useCallback(function(l){if(t()){var o,a;try{if(typeof l!="string"&&typeof l!="number"){var u=new Error("Cannot copy typeof "+typeof l+" to clipboard, must be a string");process.env.NODE_ENV==="development"&&console.error(u),r({value:l,error:u,noUserInteraction:!0});return}else if(l===""){var u=new Error("Cannot copy empty string to clipboard.");process.env.NODE_ENV==="development"&&console.error(u),r({value:l,error:u,noUserInteraction:!0});return}a=l.toString(),o=Ig(a),r({value:a,error:void 0,noUserInteraction:o})}catch(d){r({value:a,error:d,noUserInteraction:o})}}},[]);return[n,i]};Object.defineProperty(exports,"Bleed",{enumerable:!0,get:()=>w.Bleed});Object.defineProperty(exports,"Code",{enumerable:!0,get:()=>w.Code});Object.defineProperty(exports,"Em",{enumerable:!0,get:()=>w.Em});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>w.Flex});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>w.Heading});Object.defineProperty(exports,"Highlight",{enumerable:!0,get:()=>w.Highlight});Object.defineProperty(exports,"Kbd",{enumerable:!0,get:()=>w.Kbd});Object.defineProperty(exports,"List",{enumerable:!0,get:()=>w.List});Object.defineProperty(exports,"Table",{enumerable:!0,get:()=>w.Table});exports.Accordion=$h;exports.Alert=Wh;exports.Avatar=nl;exports.Badge=Ah;exports.Box=xe;exports.Button=ln;exports.Card=Kh;exports.CardContent=qr;exports.CardHeader=Gr;exports.CardRoot=Ur;exports.Checkbox=Ms;exports.ColorModeLabel=lb;exports.DialogActionTrigger=Cf;exports.DialogBackdrop=Sf;exports.DialogBody=xf;exports.DialogCloseTrigger=mf;exports.DialogContent=gf;exports.DialogDescription=Ef;exports.DialogFooter=yf;exports.DialogHeader=$f;exports.DialogRoot=vf;exports.DialogTitle=Pf;exports.DialogTrigger=wf;exports.FormField=bg;exports.FormFieldContext=qe;exports.Grid=th;exports.IconButton=xt;exports.Link=ga;exports.ListItem=Rf;exports.ListRoot=Df;exports.LoadingSpinner=Os;exports.MakeElementFocusable=Ds;exports.NimbusProvider=qb;exports.Select=uh;exports.SimpleGrid=Kf;exports.Stack=fn;exports.TableBody=Of;exports.TableCell=Bf;exports.TableColumn=Mf;exports.TableColumnGroup=Ff;exports.TableColumnHeader=zf;exports.TableFooter=If;exports.TableHeader=Af;exports.TableRoot=Lf;exports.TableRow=Nf;exports.Text=va;exports.TextInput=As;exports.ToggleButtonGroup=Xh;exports.ToggleButtonGroupButton=Zr;exports.ToggleButtonGroupRoot=Yr;exports.Tooltip=Ts;exports.TooltipTrigger=ks;exports.VisuallyHidden=Br;exports._SelectOption=Vr;exports._SelectOptionGroup=jr;exports._SelectOptions=Hr;exports._SelectRoot=Or;exports.system=Ls;exports.useColorMode=Ir;exports.useColorModeValue=ib;exports.useColorScheme=Gb;exports.useCopyToClipboard=Ng;exports.useHotkeys=Rg;
27
27
  //# sourceMappingURL=index.cjs.map