@commercetools/nimbus 0.0.3 → 0.0.4-rc1

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.
@@ -1,27 +0,0 @@
1
- (function(S,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("@chakra-ui/react"),require("@commercetools/nimbus-tokens"),require("react/jsx-runtime"),require("react"),require("@emotion/is-prop-valid"),require("react-dom"),require("next-themes"),require("@commercetools/nimbus-icons"),require("react-hotkeys-hook"),require("react-use")):typeof define=="function"&&define.amd?define(["exports","@chakra-ui/react","@commercetools/nimbus-tokens","react/jsx-runtime","react","@emotion/is-prop-valid","react-dom","next-themes","@commercetools/nimbus-icons","react-hotkeys-hook","react-use"],P):(S=typeof globalThis<"u"?globalThis:S||self,P(S.nimbus={},S.ChakraUI,S.NimbusTokens,S.jsxRuntime,S.React,S.isPropValid,S.ReactDOM,S.NextThemes,S.NimbusIcons,S.ReactHotkeysHook,S.ReactUse))})(this,function(S,P,j,w,s,va,ke,To,ee,ha,ga){"use strict";var aa,ua,da,ca;const Do=P.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:ma}=P.createRecipeContext({recipe:Do}),ba=ma("figure");function ya(n,e){return n.split("")[0].toUpperCase()+e.split("")[0].toUpperCase()}const ko=s.forwardRef((n,e)=>{const{firstName:t,lastName:o,src:l,alt:r,...i}=n,a=`${t} ${o}`,u={"aria-label":`${a} avatar`,ref:e,...i};return w.jsx(ba,{...u,children:l?w.jsx(P.Image,{src:l,alt:r||a}):ya(t,o)})});ko.displayName="Avatar";const fe=s.forwardRef((n,e)=>w.jsx(P.Box,{ref:e,...n}));fe.displayName="Box";const V=typeof document<"u"?s.useLayoutEffect:()=>{};function X(n){const e=s.useRef(null);return V(()=>{e.current=n},[n]),s.useCallback((...t)=>{const o=e.current;return o==null?void 0:o(...t)},[])}function xa(n){let[e,t]=s.useState(n),o=s.useRef(null),l=X(()=>{if(!o.current)return;let i=o.current.next();if(i.done){o.current=null;return}e===i.value?l():t(i.value)});V(()=>{o.current&&l()});let r=X(i=>{o.current=i(e),l()});return[e,r]}const wt={prefix:String(Math.round(Math.random()*1e10)),current:0},$o=s.createContext(wt),Pa=s.createContext(!1);let wa=!!(typeof window<"u"&&window.document&&window.document.createElement),nn=new WeakMap;function Ca(n=!1){let e=s.useContext($o),t=s.useRef(null);if(t.current===null&&!n){var o,l;let r=(l=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||l===void 0||(o=l.ReactCurrentOwner)===null||o===void 0?void 0:o.current;if(r){let i=nn.get(r);i==null?nn.set(r,{id:e.current,state:r.memoizedState}):r.memoizedState!==i.state&&(e.current=i.id,nn.delete(r))}t.current=++e.current}return t.current}function Ea(n){let e=s.useContext($o);e===wt&&!wa&&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 t=Ca(!!n),o=e===wt&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return n||`${o}-${t}`}function Ta(n){let e=s.useId(),[t]=s.useState(be()),o=t||process.env.NODE_ENV==="test"?"react-aria":`react-aria${wt.prefix}`;return n||`${o}-${e}`}const Da=typeof s.useId=="function"?Ta:Ea;function ka(){return!1}function $a(){return!0}function Sa(n){return()=>{}}function be(){return typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore(Sa,ka,$a):s.useContext(Pa)}let Ka=!!(typeof window<"u"&&window.document&&window.document.createElement),ye=new Map;function J(n){let[e,t]=s.useState(n),o=s.useRef(null),l=Da(e),r=s.useCallback(i=>{o.current=i},[]);return Ka&&(ye.has(l)&&!ye.get(l).includes(r)?ye.set(l,[...ye.get(l),r]):ye.set(l,[r])),V(()=>{let i=l;return()=>{ye.delete(i)}},[l]),s.useEffect(()=>{let i=o.current;i&&(o.current=null,t(i))}),l}function Fa(n,e){if(n===e)return n;let t=ye.get(n);if(t)return t.forEach(l=>l(e)),e;let o=ye.get(e);return o?(o.forEach(l=>l(n)),n):e}function Xe(n=[]){let e=J(),[t,o]=xa(e),l=s.useCallback(()=>{o(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,o]);return V(l,[e,l,...n]),t}function xe(...n){return(...e)=>{for(let t of n)typeof t=="function"&&t(...e)}}const _=n=>{var e;return(e=n==null?void 0:n.ownerDocument)!==null&&e!==void 0?e:document},re=n=>n&&"window"in n&&n.window===n?n:_(n).defaultView||window;function So(n){var e,t,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var l=n.length;for(e=0;e<l;e++)n[e]&&(t=So(n[e]))&&(o&&(o+=" "),o+=t)}else for(t in n)n[t]&&(o&&(o+=" "),o+=t);return o}function Ma(){for(var n,e,t=0,o="",l=arguments.length;t<l;t++)(n=arguments[t])&&(e=So(n))&&(o&&(o+=" "),o+=e);return o}function N(...n){let e={...n[0]};for(let t=1;t<n.length;t++){let o=n[t];for(let l in o){let r=e[l],i=o[l];typeof r=="function"&&typeof i=="function"&&l[0]==="o"&&l[1]==="n"&&l.charCodeAt(2)>=65&&l.charCodeAt(2)<=90?e[l]=xe(r,i):(l==="className"||l==="UNSAFE_className")&&typeof r=="string"&&typeof i=="string"?e[l]=Ma(r,i):l==="id"&&r&&i?e.id=Fa(r,i):e[l]=i!==void 0?i:r}}return e}function Ko(...n){return n.length===1&&n[0]?n[0]:e=>{for(let t of n)typeof t=="function"?t(e):t!=null&&(t.current=e)}}const La=new Set(["id"]),Aa=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Ia=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Ba=/^(data-.*)$/;function Z(n,e={}){let{labelable:t,isLink:o,propNames:l}=e,r={};for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(La.has(i)||t&&Aa.has(i)||o&&Ia.has(i)||l!=null&&l.has(i)||Ba.test(i))&&(r[i]=n[i]);return r}function pe(n){if(Na())n.focus({preventScroll:!0});else{let e=Oa(n);n.focus(),za(e)}}let Ct=null;function Na(){if(Ct==null){Ct=!1;try{document.createElement("div").focus({get preventScroll(){return Ct=!0,!0}})}catch{}}return Ct}function Oa(n){let e=n.parentNode,t=[],o=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==o;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&t.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return o instanceof HTMLElement&&t.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),t}function za(n){for(let{element:e,scrollTop:t,scrollLeft:o}of n)e.scrollTop=t,e.scrollLeft=o}function Et(n){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(t=>n.test(t.brand)))||n.test(window.navigator.userAgent)}function on(n){var e;return typeof window<"u"&&window.navigator!=null?n.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ve(n){let e=null;return()=>(e==null&&(e=n()),e)}const Pe=ve(function(){return on(/^Mac/i)}),Ha=ve(function(){return on(/^iPhone/i)}),Fo=ve(function(){return on(/^iPad/i)||Pe()&&navigator.maxTouchPoints>1}),Tt=ve(function(){return Ha()||Fo()}),Va=ve(function(){return Pe()||Tt()}),ln=ve(function(){return Et(/AppleWebKit/i)&&!Mo()}),Mo=ve(function(){return Et(/Chrome/i)}),rn=ve(function(){return Et(/Android/i)}),Wa=ve(function(){return Et(/Firefox/i)}),_a=s.createContext({isNative:!0,open:Ga,useHref:n=>n});function Dt(){return s.useContext(_a)}function Ua(n,e){let t=n.getAttribute("target");return(!t||t==="_self")&&n.origin===location.origin&&!n.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function $e(n,e,t=!0){var o,l;let{metaKey:r,ctrlKey:i,altKey:a,shiftKey:u}=e;Wa()&&(!((l=window.event)===null||l===void 0||(o=l.type)===null||o===void 0)&&o.startsWith("key"))&&n.target==="_blank"&&(Pe()?r=!0:i=!0);let d=ln()&&Pe()&&!Fo()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:i,altKey:a,shiftKey:u}):new MouseEvent("click",{metaKey:r,ctrlKey:i,altKey:a,shiftKey:u,bubbles:!0,cancelable:!0});$e.isOpening=t,pe(n),n.dispatchEvent(d),$e.isOpening=!1}$e.isOpening=!1;function ja(n,e){if(n instanceof HTMLAnchorElement)e(n);else if(n.hasAttribute("data-href")){let t=document.createElement("a");t.href=n.getAttribute("data-href"),n.hasAttribute("data-target")&&(t.target=n.getAttribute("data-target")),n.hasAttribute("data-rel")&&(t.rel=n.getAttribute("data-rel")),n.hasAttribute("data-download")&&(t.download=n.getAttribute("data-download")),n.hasAttribute("data-ping")&&(t.ping=n.getAttribute("data-ping")),n.hasAttribute("data-referrer-policy")&&(t.referrerPolicy=n.getAttribute("data-referrer-policy")),n.appendChild(t),e(t),n.removeChild(t)}}function Ga(n,e){ja(n,t=>$e(t,e))}function Lo(n){let e=Dt();var t;const o=e.useHref((t=n==null?void 0:n.href)!==null&&t!==void 0?t:"");return{href:n!=null&&n.href?o:void 0,target:n==null?void 0:n.target,rel:n==null?void 0:n.rel,download:n==null?void 0:n.download,ping:n==null?void 0:n.ping,referrerPolicy:n==null?void 0:n.referrerPolicy}}let _e=new Map,sn=new Set;function Ao(){if(typeof window>"u")return;function n(o){return"propertyName"in o}let e=o=>{if(!n(o)||!o.target)return;let l=_e.get(o.target);l||(l=new Set,_e.set(o.target,l),o.target.addEventListener("transitioncancel",t,{once:!0})),l.add(o.propertyName)},t=o=>{if(!n(o)||!o.target)return;let l=_e.get(o.target);if(l&&(l.delete(o.propertyName),l.size===0&&(o.target.removeEventListener("transitioncancel",t),_e.delete(o.target)),_e.size===0)){for(let r of sn)r();sn.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?Ao():document.addEventListener("DOMContentLoaded",Ao));function Io(n){requestAnimationFrame(()=>{_e.size===0?n():sn.add(n)})}function Bo(){let n=s.useRef(new Map),e=s.useCallback((l,r,i,a)=>{let u=a!=null&&a.once?(...d)=>{n.current.delete(i),i(...d)}:i;n.current.set(i,{type:r,eventTarget:l,fn:u,options:a}),l.addEventListener(r,u,a)},[]),t=s.useCallback((l,r,i,a)=>{var u;let d=((u=n.current.get(i))===null||u===void 0?void 0:u.fn)||i;l.removeEventListener(r,d,a),n.current.delete(i)},[]),o=s.useCallback(()=>{n.current.forEach((l,r)=>{t(l.eventTarget,l.type,r,l.options)})},[t]);return s.useEffect(()=>o,[o]),{addGlobalListener:e,removeGlobalListener:t,removeAllGlobalListeners:o}}function No(n,e){let{id:t,"aria-label":o,"aria-labelledby":l}=n;return t=J(t),l&&o?l=[...new Set([t,...l.trim().split(/\s+/)])].join(" "):l&&(l=l.trim().split(/\s+/).join(" ")),!o&&!l&&e&&(o=e),{id:t,"aria-label":o,"aria-labelledby":l}}function te(n){const e=s.useRef(null);return s.useMemo(()=>({get current(){return e.current},set current(t){e.current=t,typeof n=="function"?n(t):n&&(n.current=t)}}),[n])}function Oo(n,e){const t=s.useRef(!0),o=s.useRef(null);V(()=>(t.current=!0,()=>{t.current=!1}),[]),V(()=>{t.current?t.current=!1:(!o.current||e.some((l,r)=>!Object.is(l,o[r])))&&n(),o.current=e},e)}function qa(){return typeof window.ResizeObserver<"u"}function an(n){const{ref:e,box:t,onResize:o}=n;s.useEffect(()=>{let l=e==null?void 0:e.current;if(l)if(qa()){const r=new window.ResizeObserver(i=>{i.length&&o()});return r.observe(l,{box:t}),()=>{l&&r.unobserve(l)}}else return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)}},[o,e,t])}function un(n,e){V(()=>{if(n&&n.ref&&e)return n.ref.current=e.current,()=>{n.ref&&(n.ref.current=null)}})}function Je(n,e){if(!n)return!1;let t=window.getComputedStyle(n),o=/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY);return o&&e&&(o=n.scrollHeight!==n.clientHeight||n.scrollWidth!==n.clientWidth),o}function zo(n,e){let t=n;for(Je(t,e)&&(t=t.parentElement);t&&!Je(t,e);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function Za(n,e){const t=[];for(;n&&n!==document.documentElement;)Je(n,e)&&t.push(n),n=n.parentElement;return t}let Ya=0;const dn=new Map;function Xa(n){let[e,t]=s.useState();return V(()=>{if(!n)return;let o=dn.get(n);if(o)t(o.element.id);else{let l=`react-aria-description-${Ya++}`;t(l);let r=document.createElement("div");r.id=l,r.style.display="none",r.textContent=n,document.body.appendChild(r),o={refCount:0,element:r},dn.set(n,o)}return o.refCount++,()=>{o&&--o.refCount===0&&(o.element.remove(),dn.delete(n))}},[n]),{"aria-describedby":n?e:void 0}}function Qe(n,e,t,o){let l=X(t),r=t==null;s.useEffect(()=>{if(r||!n.current)return;let i=n.current;return i.addEventListener(e,l,o),()=>{i.removeEventListener(e,l,o)}},[n,e,o,r,l])}function Ho(n,e){let t=Vo(n,e,"left"),o=Vo(n,e,"top"),l=e.offsetWidth,r=e.offsetHeight,i=n.scrollLeft,a=n.scrollTop,{borderTopWidth:u,borderLeftWidth:d,scrollPaddingTop:c,scrollPaddingRight:f,scrollPaddingBottom:h,scrollPaddingLeft:p}=getComputedStyle(n),g=i+parseInt(d,10),b=a+parseInt(u,10),y=g+n.clientWidth,x=b+n.clientHeight,E=parseInt(c,10)||0,T=parseInt(h,10)||0,L=parseInt(f,10)||0,K=parseInt(p,10)||0;t<=i+K?i=t-parseInt(d,10)-K:t+l>y-L&&(i+=t+l-y+L),o<=b+E?a=o-parseInt(u,10)-E:o+r>x-T&&(a+=o+r-x+T),n.scrollLeft=i,n.scrollTop=a}function Vo(n,e,t){const o=t==="left"?"offsetLeft":"offsetTop";let l=0;for(;e.offsetParent&&(l+=e[o],e.offsetParent!==n);){if(e.offsetParent.contains(n)){l-=n[o];break}e=e.offsetParent}return l}function Wo(n,e){if(n&&document.contains(n)){let i=document.scrollingElement||document.documentElement;if(window.getComputedStyle(i).overflow==="hidden"){let u=Za(n);for(let d of u)Ho(d,n)}else{var t;let{left:u,top:d}=n.getBoundingClientRect();n==null||(t=n.scrollIntoView)===null||t===void 0||t.call(n,{block:"nearest"});let{left:c,top:f}=n.getBoundingClientRect();if(Math.abs(u-c)>1||Math.abs(d-f)>1){var o,l,r;e==null||(l=e.containingElement)===null||l===void 0||(o=l.scrollIntoView)===null||o===void 0||o.call(l,{block:"center",inline:"center"}),(r=n.scrollIntoView)===null||r===void 0||r.call(n,{block:"nearest"})}}}}function cn(n){return n.mozInputSource===0&&n.isTrusted?!0:rn()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function Ja(n){return!rn()&&n.width===0&&n.height===0||n.width===1&&n.height===1&&n.pressure===0&&n.detail===0&&n.pointerType==="mouse"}function fn(n,e,t){let o=s.useRef(e),l=X(()=>{t&&t(o.current)});s.useEffect(()=>{var r;let i=n==null||(r=n.current)===null||r===void 0?void 0:r.form;return i==null||i.addEventListener("reset",l),()=>{i==null||i.removeEventListener("reset",l)}},[n,l])}const Qa="react-aria-clear-focus",Ra="react-aria-focus",_o="react-aria-update-activedescendant";function Ue(n){return Pe()?n.metaKey:n.ctrlKey}function Uo(n,e=!0){let[t,o]=s.useState(!0),l=t&&e;return V(()=>{if(l&&n.current&&"getAnimations"in n.current)for(let r of n.current.getAnimations())r instanceof CSSTransition&&r.cancel()},[n,l]),Go(n,l,s.useCallback(()=>o(!1),[])),l}function jo(n,e){let[t,o]=s.useState(e?"open":"closed");switch(t){case"open":e||o("exiting");break;case"closed":case"exiting":e&&o("open");break}let l=t==="exiting";return Go(n,l,s.useCallback(()=>{o(r=>r==="exiting"?"closed":r)},[])),l}function Go(n,e,t){V(()=>{if(e&&n.current){if(!("getAnimations"in n.current)){t();return}let o=n.current.getAnimations();if(o.length===0){t();return}let l=!1;return Promise.all(o.map(r=>r.finished)).then(()=>{l||ke.flushSync(()=>{t()})}).catch(()=>{}),()=>{l=!0}}},[n,e,t])}function we(n,e,t){let[o,l]=s.useState(n||e),r=s.useRef(n!==void 0),i=n!==void 0;s.useEffect(()=>{let d=r.current;d!==i&&console.warn(`WARN: A component changed from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}.`),r.current=i},[i]);let a=i?n:o,u=s.useCallback((d,...c)=>{let f=(h,...p)=>{t&&(Object.is(a,h)||t(h,...p)),i||(a=h)};typeof d=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),l((p,...g)=>{let b=d(i?a:p,...g);return f(b,...c),i?p:b})):(i||l(d),f(d,...c))},[i,a,t]);return[a,u]}function kt(n,e=-1/0,t=1/0){return Math.min(Math.max(n,e),t)}let je="default",pn="",$t=new WeakMap;function qo(n){if(Tt()){if(je==="default"){const e=_(n);pn=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}je="disabled"}else(n instanceof HTMLElement||n instanceof SVGElement)&&($t.set(n,n.style.userSelect),n.style.userSelect="none")}function St(n){if(Tt()){if(je!=="disabled")return;je="restoring",setTimeout(()=>{Io(()=>{if(je==="restoring"){const e=_(n);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=pn||""),pn="",je="default"}})},300)}else if((n instanceof HTMLElement||n instanceof SVGElement)&&n&&$t.has(n)){let e=$t.get(n);n.style.userSelect==="none"&&(n.style.userSelect=e),n.getAttribute("style")===""&&n.removeAttribute("style"),$t.delete(n)}}const Re=s.createContext({register:()=>{}});Re.displayName="PressResponderContext";function eu(n,e){return e.get?e.get.call(n):e.value}function Zo(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function tu(n,e){var t=Zo(n,e,"get");return eu(n,t)}function nu(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ou(n,e,t){nu(n,e),e.set(n,t)}function lu(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function Yo(n,e,t){var o=Zo(n,e,"set");return lu(n,o,t),t}function ru(n){let e=s.useContext(Re);if(e){let{register:t,...o}=e;n=N(o,n),t()}return un(e,n.ref),n}var Kt=new WeakMap;class Ft{continuePropagation(){Yo(this,Kt,!1)}get shouldStopPropagation(){return tu(this,Kt)}constructor(e,t,o,l){ou(this,Kt,{writable:!0,value:void 0}),Yo(this,Kt,!0);var r;let i=(r=l==null?void 0:l.target)!==null&&r!==void 0?r:o.currentTarget;const a=i==null?void 0:i.getBoundingClientRect();let u,d=0,c,f=null;o.clientX!=null&&o.clientY!=null&&(c=o.clientX,f=o.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=t,this.target=o.currentTarget,this.shiftKey=o.shiftKey,this.metaKey=o.metaKey,this.ctrlKey=o.ctrlKey,this.altKey=o.altKey,this.x=u,this.y=d}}const Xo=Symbol("linkClicked");function Se(n){let{onPress:e,onPressChange:t,onPressStart:o,onPressEnd:l,onPressUp:r,isDisabled:i,isPressed:a,preventFocusOnPress:u,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:c,ref:f,...h}=ru(n),[p,g]=s.useState(!1),b=s.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:y,removeAllGlobalListeners:x}=Bo(),E=X((v,F)=>{let M=b.current;if(i||M.didFirePressStart)return!1;let D=!0;if(M.isTriggeringEvent=!0,o){let I=new Ft("pressstart",F,v);o(I),D=I.shouldStopPropagation}return t&&t(!0),M.isTriggeringEvent=!1,M.didFirePressStart=!0,g(!0),D}),T=X((v,F,M=!0)=>{let D=b.current;if(!D.didFirePressStart)return!1;D.ignoreClickAfterPress=!0,D.didFirePressStart=!1,D.isTriggeringEvent=!0;let I=!0;if(l){let m=new Ft("pressend",F,v);l(m),I=m.shouldStopPropagation}if(t&&t(!1),g(!1),e&&M&&!i){let m=new Ft("press",F,v);e(m),I&&(I=m.shouldStopPropagation)}return D.isTriggeringEvent=!1,I}),L=X((v,F)=>{let M=b.current;if(i)return!1;if(r){M.isTriggeringEvent=!0;let D=new Ft("pressup",F,v);return r(D),M.isTriggeringEvent=!1,D.shouldStopPropagation}return!0}),K=X(v=>{let F=b.current;F.isPressed&&F.target&&(F.isOverTarget&&F.pointerType!=null&&T(he(F.target,v),F.pointerType,!1),F.isPressed=!1,F.isOverTarget=!1,F.activePointerId=null,F.pointerType=null,x(),c||St(F.target))}),$=X(v=>{d&&K(v)}),O=s.useMemo(()=>{let v=b.current,F={onKeyDown(D){if(hn(D.nativeEvent,D.currentTarget)&&D.currentTarget.contains(D.target)){var I;Ro(D.target,D.key)&&D.preventDefault();let m=!0;if(!v.isPressed&&!D.repeat){v.target=D.currentTarget,v.isPressed=!0,m=E(D,"keyboard");let C=D.currentTarget,A=z=>{hn(z,C)&&!z.repeat&&C.contains(z.target)&&v.target&&L(he(v.target,z),"keyboard")};y(_(D.currentTarget),"keyup",xe(A,M),!0)}m&&D.stopPropagation(),D.metaKey&&Pe()&&((I=v.metaKeyEvents)===null||I===void 0||I.set(D.key,D.nativeEvent))}else D.key==="Meta"&&(v.metaKeyEvents=new Map)},onClick(D){if(!(D&&!D.currentTarget.contains(D.target))&&D&&D.button===0&&!v.isTriggeringEvent&&!$e.isOpening){let I=!0;if(i&&D.preventDefault(),!v.ignoreClickAfterPress&&!v.ignoreEmulatedMouseEvents&&!v.isPressed&&(v.pointerType==="virtual"||cn(D.nativeEvent))){!i&&!u&&pe(D.currentTarget);let m=E(D,"virtual"),C=L(D,"virtual"),A=T(D,"virtual");I=m&&C&&A}v.ignoreEmulatedMouseEvents=!1,v.ignoreClickAfterPress=!1,I&&D.stopPropagation()}}},M=D=>{var I;if(v.isPressed&&v.target&&hn(D,v.target)){var m;Ro(D.target,D.key)&&D.preventDefault();let A=D.target;T(he(v.target,D),"keyboard",v.target.contains(A)),x(),D.key!=="Enter"&&vn(v.target)&&v.target.contains(A)&&!D[Xo]&&(D[Xo]=!0,$e(v.target,D,!1)),v.isPressed=!1,(m=v.metaKeyEvents)===null||m===void 0||m.delete(D.key)}else if(D.key==="Meta"&&(!((I=v.metaKeyEvents)===null||I===void 0)&&I.size)){var C;let A=v.metaKeyEvents;v.metaKeyEvents=void 0;for(let z of A.values())(C=v.target)===null||C===void 0||C.dispatchEvent(new KeyboardEvent("keyup",z))}};if(typeof PointerEvent<"u"){F.onPointerDown=C=>{if(C.button!==0||!C.currentTarget.contains(C.target))return;if(Ja(C.nativeEvent)){v.pointerType="virtual";return}mn(C.currentTarget)&&C.preventDefault(),v.pointerType=C.pointerType;let A=!0;if(!v.isPressed){v.isPressed=!0,v.isOverTarget=!0,v.activePointerId=C.pointerId,v.target=C.currentTarget,!i&&!u&&pe(C.currentTarget),c||qo(v.target),A=E(C,v.pointerType);let z=C.target;"releasePointerCapture"in z&&z.releasePointerCapture(C.pointerId),y(_(C.currentTarget),"pointerup",D,!1),y(_(C.currentTarget),"pointercancel",m,!1)}A&&C.stopPropagation()},F.onMouseDown=C=>{C.currentTarget.contains(C.target)&&C.button===0&&(mn(C.currentTarget)&&C.preventDefault(),C.stopPropagation())},F.onPointerUp=C=>{!C.currentTarget.contains(C.target)||v.pointerType==="virtual"||C.button===0&&L(C,v.pointerType||C.pointerType)},F.onPointerEnter=C=>{C.pointerId===v.activePointerId&&v.target&&!v.isOverTarget&&v.pointerType!=null&&(v.isOverTarget=!0,E(he(v.target,C),v.pointerType))},F.onPointerLeave=C=>{C.pointerId===v.activePointerId&&v.target&&v.isOverTarget&&v.pointerType!=null&&(v.isOverTarget=!1,T(he(v.target,C),v.pointerType,!1),$(C))};let D=C=>{C.pointerId===v.activePointerId&&v.isPressed&&C.button===0&&v.target&&(v.target.contains(C.target)&&v.pointerType!=null?T(he(v.target,C),v.pointerType):v.isOverTarget&&v.pointerType!=null&&T(he(v.target,C),v.pointerType,!1),v.isPressed=!1,v.isOverTarget=!1,v.activePointerId=null,v.pointerType=null,x(),c||St(v.target),"ontouchend"in v.target&&C.pointerType!=="mouse"&&y(v.target,"touchend",I,{once:!0}))},I=C=>{Qo(C.currentTarget)&&C.preventDefault()},m=C=>{K(C)};F.onDragStart=C=>{C.currentTarget.contains(C.target)&&K(C)}}else{F.onMouseDown=m=>{if(m.button!==0||!m.currentTarget.contains(m.target))return;if(mn(m.currentTarget)&&m.preventDefault(),v.ignoreEmulatedMouseEvents){m.stopPropagation();return}v.isPressed=!0,v.isOverTarget=!0,v.target=m.currentTarget,v.pointerType=cn(m.nativeEvent)?"virtual":"mouse",!i&&!u&&pe(m.currentTarget),E(m,v.pointerType)&&m.stopPropagation(),y(_(m.currentTarget),"mouseup",D,!1)},F.onMouseEnter=m=>{if(!m.currentTarget.contains(m.target))return;let C=!0;v.isPressed&&!v.ignoreEmulatedMouseEvents&&v.pointerType!=null&&(v.isOverTarget=!0,C=E(m,v.pointerType)),C&&m.stopPropagation()},F.onMouseLeave=m=>{if(!m.currentTarget.contains(m.target))return;let C=!0;v.isPressed&&!v.ignoreEmulatedMouseEvents&&v.pointerType!=null&&(v.isOverTarget=!1,C=T(m,v.pointerType,!1),$(m)),C&&m.stopPropagation()},F.onMouseUp=m=>{m.currentTarget.contains(m.target)&&!v.ignoreEmulatedMouseEvents&&m.button===0&&L(m,v.pointerType||"mouse")};let D=m=>{if(m.button===0){if(v.isPressed=!1,x(),v.ignoreEmulatedMouseEvents){v.ignoreEmulatedMouseEvents=!1;return}v.target&&gn(m,v.target)&&v.pointerType!=null?T(he(v.target,m),v.pointerType):v.target&&v.isOverTarget&&v.pointerType!=null&&T(he(v.target,m),v.pointerType,!1),v.isOverTarget=!1}};F.onTouchStart=m=>{if(!m.currentTarget.contains(m.target))return;let C=iu(m.nativeEvent);if(!C)return;v.activePointerId=C.identifier,v.ignoreEmulatedMouseEvents=!0,v.isOverTarget=!0,v.isPressed=!0,v.target=m.currentTarget,v.pointerType="touch",!i&&!u&&pe(m.currentTarget),c||qo(v.target),E(Ce(v.target,m),v.pointerType)&&m.stopPropagation(),y(re(m.currentTarget),"scroll",I,!0)},F.onTouchMove=m=>{if(!m.currentTarget.contains(m.target))return;if(!v.isPressed){m.stopPropagation();return}let C=Jo(m.nativeEvent,v.activePointerId),A=!0;C&&gn(C,m.currentTarget)?!v.isOverTarget&&v.pointerType!=null&&(v.isOverTarget=!0,A=E(Ce(v.target,m),v.pointerType)):v.isOverTarget&&v.pointerType!=null&&(v.isOverTarget=!1,A=T(Ce(v.target,m),v.pointerType,!1),$(Ce(v.target,m))),A&&m.stopPropagation()},F.onTouchEnd=m=>{if(!m.currentTarget.contains(m.target))return;if(!v.isPressed){m.stopPropagation();return}let C=Jo(m.nativeEvent,v.activePointerId),A=!0;C&&gn(C,m.currentTarget)&&v.pointerType!=null?(L(Ce(v.target,m),v.pointerType),A=T(Ce(v.target,m),v.pointerType)):v.isOverTarget&&v.pointerType!=null&&(A=T(Ce(v.target,m),v.pointerType,!1)),A&&m.stopPropagation(),v.isPressed=!1,v.activePointerId=null,v.isOverTarget=!1,v.ignoreEmulatedMouseEvents=!0,v.target&&!c&&St(v.target),x()},F.onTouchCancel=m=>{m.currentTarget.contains(m.target)&&(m.stopPropagation(),v.isPressed&&K(Ce(v.target,m)))};let I=m=>{v.isPressed&&m.target.contains(v.target)&&K({currentTarget:v.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};F.onDragStart=m=>{m.currentTarget.contains(m.target)&&K(m)}}return F},[y,i,u,x,c,K,$,T,E,L]);return s.useEffect(()=>()=>{var v;c||St((v=b.current.target)!==null&&v!==void 0?v:void 0)},[c]),{isPressed:a||p,pressProps:N(h,O)}}function vn(n){return n.tagName==="A"&&n.hasAttribute("href")}function hn(n,e){const{key:t,code:o}=n,l=e,r=l.getAttribute("role");return(t==="Enter"||t===" "||t==="Spacebar"||o==="Space")&&!(l instanceof re(l).HTMLInputElement&&!el(l,t)||l instanceof re(l).HTMLTextAreaElement||l.isContentEditable)&&!((r==="link"||!r&&vn(l))&&t!=="Enter")}function iu(n){const{targetTouches:e}=n;return e.length>0?e[0]:null}function Jo(n,e){const t=n.changedTouches;for(let o=0;o<t.length;o++){const l=t[o];if(l.identifier===e)return l}return null}function Ce(n,e){let t=0,o=0;return e.targetTouches&&e.targetTouches.length===1&&(t=e.targetTouches[0].clientX,o=e.targetTouches[0].clientY),{currentTarget:n,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:t,clientY:o}}function he(n,e){let t=e.clientX,o=e.clientY;return{currentTarget:n,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:t,clientY:o}}function su(n){let e=0,t=0;return n.width!==void 0?e=n.width/2:n.radiusX!==void 0&&(e=n.radiusX),n.height!==void 0?t=n.height/2:n.radiusY!==void 0&&(t=n.radiusY),{top:n.clientY-t,right:n.clientX+e,bottom:n.clientY+t,left:n.clientX-e}}function au(n,e){return!(n.left>e.right||e.left>n.right||n.top>e.bottom||e.top>n.bottom)}function gn(n,e){let t=e.getBoundingClientRect(),o=su(n);return au(t,o)}function mn(n){return!(n instanceof HTMLElement)||!n.hasAttribute("draggable")}function Qo(n){return n instanceof HTMLInputElement?!1:n instanceof HTMLButtonElement?n.type!=="submit"&&n.type!=="reset":!vn(n)}function Ro(n,e){return n instanceof HTMLInputElement?!el(n,e):Qo(n)}const uu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function el(n,e){return n.type==="checkbox"||n.type==="radio"?e===" ":uu.has(n.type)}const du=s.forwardRef(({children:n,...e},t)=>{let o=s.useRef(!1),l=s.useContext(Re);t=te(t||(l==null?void 0:l.ref));let r=N(l||{},{...e,ref:t,register(){o.current=!0,l&&l.register()}});return un(l,t),s.useEffect(()=>{o.current||(console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),o.current=!0)},[]),s.createElement(Re.Provider,{value:r},n)});function cu({children:n}){let e=s.useMemo(()=>({register:()=>{}}),[]);return s.createElement(Re.Provider,{value:e},n)}class fu{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function tl(n){let e=s.useRef({isFocused:!1,observer:null});V(()=>{const o=e.current;return()=>{o.observer&&(o.observer.disconnect(),o.observer=null)}},[]);let t=X(o=>{n==null||n(o)});return s.useCallback(o=>{if(o.target instanceof HTMLButtonElement||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement||o.target instanceof HTMLSelectElement){e.current.isFocused=!0;let l=o.target,r=i=>{e.current.isFocused=!1,l.disabled&&t(new fu("blur",i)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};l.addEventListener("focusout",r,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&l.disabled){var i;(i=e.current.observer)===null||i===void 0||i.disconnect();let a=l===document.activeElement?null:document.activeElement;l.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),l.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(l,{attributes:!0,attributeFilter:["disabled"]})}},[t])}function nl(n){let{isDisabled:e,onFocus:t,onBlur:o,onFocusChange:l}=n;const r=s.useCallback(u=>{if(u.target===u.currentTarget)return o&&o(u),l&&l(!1),!0},[o,l]),i=tl(r),a=s.useCallback(u=>{const d=_(u.target);u.target===u.currentTarget&&d.activeElement===u.target&&(t&&t(u),l&&l(!0),i(u))},[l,t,i]);return{focusProps:{onFocus:!e&&(t||l||o)?a:void 0,onBlur:!e&&(o||l)?r:void 0}}}let Ke=null,bn=new Set,et=new Map,Fe=!1,yn=!1;const pu={Tab:!0,Escape:!0};function Mt(n,e){for(let t of bn)t(n,e)}function vu(n){return!(n.metaKey||!Pe()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function Lt(n){Fe=!0,vu(n)&&(Ke="keyboard",Mt("keyboard",n))}function ie(n){Ke="pointer",(n.type==="mousedown"||n.type==="pointerdown")&&(Fe=!0,Mt("pointer",n))}function ol(n){cn(n)&&(Fe=!0,Ke="virtual")}function ll(n){n.target===window||n.target===document||(!Fe&&!yn&&(Ke="virtual",Mt("virtual",n)),Fe=!1,yn=!1)}function rl(){Fe=!1,yn=!0}function xn(n){if(typeof window>"u"||et.get(re(n)))return;const e=re(n),t=_(n);let o=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Fe=!0,o.apply(this,arguments)},t.addEventListener("keydown",Lt,!0),t.addEventListener("keyup",Lt,!0),t.addEventListener("click",ol,!0),e.addEventListener("focus",ll,!0),e.addEventListener("blur",rl,!1),typeof PointerEvent<"u"?(t.addEventListener("pointerdown",ie,!0),t.addEventListener("pointermove",ie,!0),t.addEventListener("pointerup",ie,!0)):(t.addEventListener("mousedown",ie,!0),t.addEventListener("mousemove",ie,!0),t.addEventListener("mouseup",ie,!0)),e.addEventListener("beforeunload",()=>{il(n)},{once:!0}),et.set(e,{focus:o})}const il=(n,e)=>{const t=re(n),o=_(n);e&&o.removeEventListener("DOMContentLoaded",e),et.has(t)&&(t.HTMLElement.prototype.focus=et.get(t).focus,o.removeEventListener("keydown",Lt,!0),o.removeEventListener("keyup",Lt,!0),o.removeEventListener("click",ol,!0),t.removeEventListener("focus",ll,!0),t.removeEventListener("blur",rl,!1),typeof PointerEvent<"u"?(o.removeEventListener("pointerdown",ie,!0),o.removeEventListener("pointermove",ie,!0),o.removeEventListener("pointerup",ie,!0)):(o.removeEventListener("mousedown",ie,!0),o.removeEventListener("mousemove",ie,!0),o.removeEventListener("mouseup",ie,!0)),et.delete(t))};function hu(n){const e=_(n);let t;return e.readyState!=="loading"?xn(n):(t=()=>{xn(n)},e.addEventListener("DOMContentLoaded",t)),()=>il(n,t)}typeof document<"u"&&hu();function tt(){return Ke!=="pointer"}function nt(){return Ke}function sl(n){Ke=n,Mt(n,null)}const gu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function mu(n,e,t){var o;const l=typeof window<"u"?re(t==null?void 0:t.target).HTMLInputElement:HTMLInputElement,r=typeof window<"u"?re(t==null?void 0:t.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?re(t==null?void 0:t.target).HTMLElement:HTMLElement,a=typeof window<"u"?re(t==null?void 0:t.target).KeyboardEvent:KeyboardEvent;return n=n||(t==null?void 0:t.target)instanceof l&&!gu.has(t==null||(o=t.target)===null||o===void 0?void 0:o.type)||(t==null?void 0:t.target)instanceof r||(t==null?void 0:t.target)instanceof i&&(t==null?void 0:t.target.isContentEditable),!(n&&e==="keyboard"&&t instanceof a&&!pu[t.key])}function bu(n,e,t){xn(),s.useEffect(()=>{let o=(l,r)=>{mu(!!(t!=null&&t.isTextInput),l,r)&&n(tt())};return bn.add(o),()=>{bn.delete(o)}},e)}function At(n){let{isDisabled:e,onBlurWithin:t,onFocusWithin:o,onFocusWithinChange:l}=n,r=s.useRef({isFocusWithin:!1}),i=s.useCallback(d=>{r.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(r.current.isFocusWithin=!1,t&&t(d),l&&l(!1))},[t,l,r]),a=tl(i),u=s.useCallback(d=>{!r.current.isFocusWithin&&document.activeElement===d.target&&(o&&o(d),l&&l(!0),r.current.isFocusWithin=!0,a(d))},[o,l,a]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:i}}}let It=!1,Pn=0;function wn(){It=!0,setTimeout(()=>{It=!1},50)}function al(n){n.pointerType==="touch"&&wn()}function yu(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",al):document.addEventListener("touchend",wn),Pn++,()=>{Pn--,!(Pn>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",al):document.removeEventListener("touchend",wn))}}function Me(n){let{onHoverStart:e,onHoverChange:t,onHoverEnd:o,isDisabled:l}=n,[r,i]=s.useState(!1),a=s.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;s.useEffect(yu,[]);let{hoverProps:u,triggerHoverEnd:d}=s.useMemo(()=>{let c=(p,g)=>{if(a.pointerType=g,l||g==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let b=p.currentTarget;a.target=b,e&&e({type:"hoverstart",target:b,pointerType:g}),t&&t(!0),i(!0)},f=(p,g)=>{if(a.pointerType="",a.target=null,g==="touch"||!a.isHovered)return;a.isHovered=!1;let b=p.currentTarget;o&&o({type:"hoverend",target:b,pointerType:g}),t&&t(!1),i(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=p=>{It&&p.pointerType==="mouse"||c(p,p.pointerType)},h.onPointerLeave=p=>{!l&&p.currentTarget.contains(p.target)&&f(p,p.pointerType)}):(h.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=p=>{!a.ignoreEmulatedMouseEvents&&!It&&c(p,"mouse"),a.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=p=>{!l&&p.currentTarget.contains(p.target)&&f(p,"mouse")}),{hoverProps:h,triggerHoverEnd:f}},[e,t,o,l,a]);return s.useEffect(()=>{l&&d({currentTarget:a.target},a.pointerType)},[l]),{hoverProps:u,isHovered:r}}function xu(n){let{ref:e,onInteractOutside:t,isDisabled:o,onInteractOutsideStart:l}=n,r=s.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=X(u=>{t&&Bt(u,e)&&(l&&l(u),r.current.isPointerDown=!0)}),a=X(u=>{t&&t(u)});s.useEffect(()=>{let u=r.current;if(o)return;const d=e.current,c=_(d);if(typeof PointerEvent<"u"){let f=h=>{u.isPointerDown&&Bt(h,e)&&a(h),u.isPointerDown=!1};return c.addEventListener("pointerdown",i,!0),c.addEventListener("pointerup",f,!0),()=>{c.removeEventListener("pointerdown",i,!0),c.removeEventListener("pointerup",f,!0)}}else{let f=p=>{u.ignoreEmulatedMouseEvents?u.ignoreEmulatedMouseEvents=!1:u.isPointerDown&&Bt(p,e)&&a(p),u.isPointerDown=!1},h=p=>{u.ignoreEmulatedMouseEvents=!0,u.isPointerDown&&Bt(p,e)&&a(p),u.isPointerDown=!1};return c.addEventListener("mousedown",i,!0),c.addEventListener("mouseup",f,!0),c.addEventListener("touchstart",i,!0),c.addEventListener("touchend",h,!0),()=>{c.removeEventListener("mousedown",i,!0),c.removeEventListener("mouseup",f,!0),c.removeEventListener("touchstart",i,!0),c.removeEventListener("touchend",h,!0)}}},[e,o,i,a])}function Bt(n,e){if(n.button>0)return!1;if(n.target){const t=n.target.ownerDocument;if(!t||!t.documentElement.contains(n.target)||n.target.closest("[data-react-aria-top-layer]"))return!1}return e.current&&!e.current.contains(n.target)}function ul(n){if(!n)return;let e=!0;return t=>{let o={...t,preventDefault(){t.preventDefault()},isDefaultPrevented(){return t.isDefaultPrevented()},stopPropagation(){e?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}};n(o),e&&t.stopPropagation()}}function Pu(n){return{keyboardProps:n.isDisabled?{}:{onKeyDown:ul(n.onKeyDown),onKeyUp:ul(n.onKeyUp)}}}const wu=500;function dl(n){let{isDisabled:e,onLongPressStart:t,onLongPressEnd:o,onLongPress:l,threshold:r=wu,accessibilityDescription:i}=n;const a=s.useRef(void 0);let{addGlobalListener:u,removeGlobalListener:d}=Bo(),{pressProps:c}=Se({isDisabled:e,onPressStart(h){if(h.continuePropagation(),(h.pointerType==="mouse"||h.pointerType==="touch")&&(t&&t({...h,type:"longpressstart"}),a.current=setTimeout(()=>{h.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),l&&l({...h,type:"longpress"}),a.current=void 0},r),h.pointerType==="touch")){let p=g=>{g.preventDefault()};u(h.target,"contextmenu",p,{once:!0}),u(window,"pointerup",()=>{setTimeout(()=>{d(h.target,"contextmenu",p)},30)},{once:!0})}},onPressEnd(h){a.current&&clearTimeout(a.current),o&&(h.pointerType==="mouse"||h.pointerType==="touch")&&o({...h,type:"longpressend"})}}),f=Xa(l&&!e?i:void 0);return{longPressProps:N(c,f)}}function Le(n){const e=_(n);if(nt()==="virtual"){let t=e.activeElement;Io(()=>{e.activeElement===t&&n.isConnected&&pe(n)})}else pe(n)}function Cu(n){const e=re(n);if(!(n instanceof e.HTMLElement)&&!(n instanceof e.SVGElement))return!1;let{display:t,visibility:o}=n.style,l=t!=="none"&&o!=="hidden"&&o!=="collapse";if(l){const{getComputedStyle:r}=n.ownerDocument.defaultView;let{display:i,visibility:a}=r(n);l=i!=="none"&&a!=="hidden"&&a!=="collapse"}return l}function Eu(n,e){return!n.hasAttribute("hidden")&&!n.hasAttribute("data-react-aria-prevent-focus")&&(n.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?n.hasAttribute("open"):!0)}function cl(n,e){return n.nodeName!=="#comment"&&Cu(n)&&Eu(n,e)&&(!n.parentElement||cl(n.parentElement,n))}const fl=s.createContext(null),Cn="react-aria-focus-scope-restore";let U=null;function pl(n){let{children:e,contain:t,restoreFocus:o,autoFocus:l}=n,r=s.useRef(null),i=s.useRef(null),a=s.useRef([]),{parentNode:u}=s.useContext(fl)||{},d=s.useMemo(()=>new $n({scopeRef:a}),[a]);V(()=>{let h=u||q.root;if(q.getTreeNode(h.scopeRef)&&U&&!Nt(U,h.scopeRef)){let p=q.getTreeNode(U);p&&(h=p)}h.addChild(d),q.addNode(d)},[d,u]),V(()=>{let h=q.getTreeNode(a);h&&(h.contain=!!t)},[t]),V(()=>{var h;let p=(h=r.current)===null||h===void 0?void 0:h.nextSibling,g=[],b=y=>y.stopPropagation();for(;p&&p!==i.current;)g.push(p),p.addEventListener(Cn,b),p=p.nextSibling;return a.current=g,()=>{for(let y of g)y.removeEventListener(Cn,b)}},[e]),Fu(a,o,t),$u(a,t),Mu(a,o,t),Ku(a,l),s.useEffect(()=>{const h=_(a.current?a.current[0]:void 0).activeElement;let p=null;if(se(h,a.current)){for(let g of q.traverse())g.scopeRef&&se(h,g.scopeRef.current)&&(p=g);p===q.getTreeNode(a)&&(U=p.scopeRef)}},[a]),V(()=>()=>{var h,p,g;let b=(g=(p=q.getTreeNode(a))===null||p===void 0||(h=p.parent)===null||h===void 0?void 0:h.scopeRef)!==null&&g!==void 0?g:null;(a===U||Nt(a,U))&&(!b||q.getTreeNode(b))&&(U=b),q.removeTreeNode(a)},[a]);let c=s.useMemo(()=>Tu(a),[]),f=s.useMemo(()=>({focusManager:c,parentNode:d}),[d,c]);return s.createElement(fl.Provider,{value:f},s.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:r}),e,s.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:i}))}function Tu(n){return{focusNext(e={}){let t=n.current,{from:o,tabbable:l,wrap:r,accept:i}=e,a=o||_(t[0]).activeElement,u=t[0].previousElementSibling,d=Ae(t),c=ne(d,{tabbable:l,accept:i},t);c.currentNode=se(a,t)?a:u;let f=c.nextNode();return!f&&r&&(c.currentNode=u,f=c.nextNode()),f&&Q(f,!0),f},focusPrevious(e={}){let t=n.current,{from:o,tabbable:l,wrap:r,accept:i}=e,a=o||_(t[0]).activeElement,u=t[t.length-1].nextElementSibling,d=Ae(t),c=ne(d,{tabbable:l,accept:i},t);c.currentNode=se(a,t)?a:u;let f=c.previousNode();return!f&&r&&(c.currentNode=u,f=c.previousNode()),f&&Q(f,!0),f},focusFirst(e={}){let t=n.current,{tabbable:o,accept:l}=e,r=Ae(t),i=ne(r,{tabbable:o,accept:l},t);i.currentNode=t[0].previousElementSibling;let a=i.nextNode();return a&&Q(a,!0),a},focusLast(e={}){let t=n.current,{tabbable:o,accept:l}=e,r=Ae(t),i=ne(r,{tabbable:o,accept:l},t);i.currentNode=t[t.length-1].nextElementSibling;let a=i.previousNode();return a&&Q(a,!0),a}}}const En=["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"])'],Du=En.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";En.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const ku=En.join(':not([hidden]):not([tabindex="-1"]),');function Ae(n){return n[0].parentElement}function ot(n){let e=q.getTreeNode(U);for(;e&&e.scopeRef!==n;){if(e.contain)return!1;e=e.parent}return!0}function $u(n,e){let t=s.useRef(void 0),o=s.useRef(void 0);V(()=>{let l=n.current;if(!e){o.current&&(cancelAnimationFrame(o.current),o.current=void 0);return}const r=_(l?l[0]:void 0);let i=d=>{if(d.key!=="Tab"||d.altKey||d.ctrlKey||d.metaKey||!ot(n)||d.isComposing)return;let c=r.activeElement,f=n.current;if(!f||!se(c,f))return;let h=Ae(f),p=ne(h,{tabbable:!0},f);if(!c)return;p.currentNode=c;let g=d.shiftKey?p.previousNode():p.nextNode();g||(p.currentNode=d.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,g=d.shiftKey?p.previousNode():p.nextNode()),d.preventDefault(),g&&Q(g,!0)},a=d=>{(!U||Nt(U,n))&&se(d.target,n.current)?(U=n,t.current=d.target):ot(n)&&!Ee(d.target,n)?t.current?t.current.focus():U&&U.current&&Tn(U.current):ot(n)&&(t.current=d.target)},u=d=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{let c=nt();if(!((c==="virtual"||c===null)&&rn()&&Mo())&&r.activeElement&&ot(n)&&!Ee(r.activeElement,n))if(U=n,r.body.contains(d.target)){var h;t.current=d.target,(h=t.current)===null||h===void 0||h.focus()}else U.current&&Tn(U.current)})};return r.addEventListener("keydown",i,!1),r.addEventListener("focusin",a,!1),l==null||l.forEach(d=>d.addEventListener("focusin",a,!1)),l==null||l.forEach(d=>d.addEventListener("focusout",u,!1)),()=>{r.removeEventListener("keydown",i,!1),r.removeEventListener("focusin",a,!1),l==null||l.forEach(d=>d.removeEventListener("focusin",a,!1)),l==null||l.forEach(d=>d.removeEventListener("focusout",u,!1))}},[n,e]),V(()=>()=>{o.current&&cancelAnimationFrame(o.current)},[o])}function vl(n){return Ee(n)}function se(n,e){return!n||!e?!1:e.some(t=>t.contains(n))}function Ee(n,e=null){if(n instanceof Element&&n.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:t}of q.traverse(q.getTreeNode(e)))if(t&&se(n,t.current))return!0;return!1}function Su(n){return Ee(n,U)}function Nt(n,e){var t;let o=(t=q.getTreeNode(e))===null||t===void 0?void 0:t.parent;for(;o;){if(o.scopeRef===n)return!0;o=o.parent}return!1}function Q(n,e=!1){if(n!=null&&!e)try{Le(n)}catch{}else if(n!=null)try{n.focus()}catch{}}function hl(n,e=!0){let t=n[0].previousElementSibling,o=Ae(n),l=ne(o,{tabbable:e},n);l.currentNode=t;let r=l.nextNode();return e&&!r&&(o=Ae(n),l=ne(o,{tabbable:!1},n),l.currentNode=t,r=l.nextNode()),r}function Tn(n,e=!0){Q(hl(n,e))}function Ku(n,e){const t=s.useRef(e);s.useEffect(()=>{if(t.current){U=n;const o=_(n.current?n.current[0]:void 0);!se(o.activeElement,U.current)&&n.current&&Tn(n.current)}t.current=!1},[n])}function Fu(n,e,t){V(()=>{if(e||t)return;let o=n.current;const l=_(o?o[0]:void 0);let r=i=>{let a=i.target;se(a,n.current)?U=n:vl(a)||(U=null)};return l.addEventListener("focusin",r,!1),o==null||o.forEach(i=>i.addEventListener("focusin",r,!1)),()=>{l.removeEventListener("focusin",r,!1),o==null||o.forEach(i=>i.removeEventListener("focusin",r,!1))}},[n,e,t])}function gl(n){let e=q.getTreeNode(U);for(;e&&e.scopeRef!==n;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===n}function Mu(n,e,t){const o=s.useRef(typeof document<"u"?_(n.current?n.current[0]:void 0).activeElement:null);V(()=>{let l=n.current;const r=_(l?l[0]:void 0);if(!e||t)return;let i=()=>{(!U||Nt(U,n))&&se(r.activeElement,n.current)&&(U=n)};return r.addEventListener("focusin",i,!1),l==null||l.forEach(a=>a.addEventListener("focusin",i,!1)),()=>{r.removeEventListener("focusin",i,!1),l==null||l.forEach(a=>a.removeEventListener("focusin",i,!1))}},[n,t]),V(()=>{const l=_(n.current?n.current[0]:void 0);if(!e)return;let r=i=>{if(i.key!=="Tab"||i.altKey||i.ctrlKey||i.metaKey||!ot(n)||i.isComposing)return;let a=l.activeElement;if(!Ee(a,n)||!gl(n))return;let u=q.getTreeNode(n);if(!u)return;let d=u.nodeToRestore,c=ne(l.body,{tabbable:!0});c.currentNode=a;let f=i.shiftKey?c.previousNode():c.nextNode();if((!d||!l.body.contains(d)||d===l.body)&&(d=void 0,u.nodeToRestore=void 0),(!f||!Ee(f,n))&&d){c.currentNode=d;do f=i.shiftKey?c.previousNode():c.nextNode();while(Ee(f,n));i.preventDefault(),i.stopPropagation(),f?Q(f,!0):vl(d)?Q(d,!0):a.blur()}};return t||l.addEventListener("keydown",r,!0),()=>{t||l.removeEventListener("keydown",r,!0)}},[n,e,t]),V(()=>{const l=_(n.current?n.current[0]:void 0);if(!e)return;let r=q.getTreeNode(n);if(r){var i;return r.nodeToRestore=(i=o.current)!==null&&i!==void 0?i:void 0,()=>{let a=q.getTreeNode(n);if(!a)return;let u=a.nodeToRestore;if(e&&u&&(l.activeElement&&Ee(l.activeElement,n)||l.activeElement===l.body&&gl(n))){let d=q.clone();requestAnimationFrame(()=>{if(l.activeElement===l.body){let c=d.getTreeNode(n);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){ml(c.nodeToRestore);return}c=c.parent}for(c=d.getTreeNode(n);c;){if(c.scopeRef&&c.scopeRef.current&&q.getTreeNode(c.scopeRef)){let f=hl(c.scopeRef.current,!0);ml(f);return}c=c.parent}}})}}}},[n,e])}function ml(n){n.dispatchEvent(new CustomEvent(Cn,{bubbles:!0,cancelable:!0}))&&Q(n)}function ne(n,e,t){let o=e!=null&&e.tabbable?ku:Du,l=_(n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode(r){var i;return!(e==null||(i=e.from)===null||i===void 0)&&i.contains(r)?NodeFilter.FILTER_REJECT:r.matches(o)&&cl(r)&&(!t||se(r,t))&&(!(e!=null&&e.accept)||e.accept(r))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(l.currentNode=e.from),l}function Lu(n,e={}){return{focusNext(t={}){let o=n.current;if(!o)return null;let{from:l,tabbable:r=e.tabbable,wrap:i=e.wrap,accept:a=e.accept}=t,u=l||_(o).activeElement,d=ne(o,{tabbable:r,accept:a});o.contains(u)&&(d.currentNode=u);let c=d.nextNode();return!c&&i&&(d.currentNode=o,c=d.nextNode()),c&&Q(c,!0),c},focusPrevious(t=e){let o=n.current;if(!o)return null;let{from:l,tabbable:r=e.tabbable,wrap:i=e.wrap,accept:a=e.accept}=t,u=l||_(o).activeElement,d=ne(o,{tabbable:r,accept:a});if(o.contains(u))d.currentNode=u;else{let f=Dn(d);return f&&Q(f,!0),f??null}let c=d.previousNode();if(!c&&i){d.currentNode=o;let f=Dn(d);if(!f)return null;c=f}return c&&Q(c,!0),c??null},focusFirst(t=e){let o=n.current;if(!o)return null;let{tabbable:l=e.tabbable,accept:r=e.accept}=t,a=ne(o,{tabbable:l,accept:r}).nextNode();return a&&Q(a,!0),a},focusLast(t=e){let o=n.current;if(!o)return null;let{tabbable:l=e.tabbable,accept:r=e.accept}=t,i=ne(o,{tabbable:l,accept:r}),a=Dn(i);return a&&Q(a,!0),a??null}}}function Dn(n){let e,t;do t=n.lastChild(),t&&(e=t);while(t);return e}class kn{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,o){let l=this.fastMap.get(t??null);if(!l)return;let r=new $n({scopeRef:e});l.addChild(r),r.parent=l,this.fastMap.set(e,r),o&&(r.nodeToRestore=o)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let o=t.parent;for(let r of this.traverse())r!==t&&t.nodeToRestore&&r.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&se(r.nodeToRestore,t.scopeRef.current)&&(r.nodeToRestore=t.nodeToRestore);let l=t.children;o&&(o.removeChild(t),l.size>0&&l.forEach(r=>o&&o.addChild(r))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e;let t=new kn;var o;for(let l of this.traverse())t.addTreeNode(l.scopeRef,(o=(e=l.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&o!==void 0?o:null,l.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new $n({scopeRef:null}),this.fastMap.set(null,this.root)}}class $n{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 kn;function Te(n={}){let{autoFocus:e=!1,isTextInput:t,within:o}=n,l=s.useRef({isFocused:!1,isFocusVisible:e||tt()}),[r,i]=s.useState(!1),[a,u]=s.useState(()=>l.current.isFocused&&l.current.isFocusVisible),d=s.useCallback(()=>u(l.current.isFocused&&l.current.isFocusVisible),[]),c=s.useCallback(p=>{l.current.isFocused=p,i(p),d()},[d]);bu(p=>{l.current.isFocusVisible=p,d()},[],{isTextInput:t});let{focusProps:f}=nl({isDisabled:o,onFocusChange:c}),{focusWithinProps:h}=At({isDisabled:!o,onFocusWithinChange:c});return{isFocused:r,isFocusVisible:a,focusProps:o?h:f}}let bl=s.createContext(null);function Au(n){let e=s.useContext(bl)||{};un(e,n);let{ref:t,...o}=e;return o}const Iu=s.forwardRef(function(e,t){let{children:o,...l}=e,r=te(t),i={...l,ref:r};return s.createElement(bl.Provider,{value:i},o)});function Ge(n,e){let{focusProps:t}=nl(n),{keyboardProps:o}=Pu(n),l=N(t,o),r=Au(e),i=n.isDisabled?{}:r,a=s.useRef(n.autoFocus);return s.useEffect(()=>{a.current&&e.current&&Le(e.current),a.current=!1},[e]),{focusableProps:N({...l,tabIndex:n.excludeFromTabOrder&&!n.isDisabled?-1:void 0},i)}}function Bu(n,e){let{elementType:t="a",onPress:o,onPressStart:l,onPressEnd:r,onClick:i,isDisabled:a,...u}=n,d={};t!=="a"&&(d={role:"link",tabIndex:a?void 0:0});let{focusableProps:c}=Ge(n,e),{pressProps:f,isPressed:h}=Se({onPress:o,onPressStart:l,onPressEnd:r,isDisabled:a,ref:e}),p=Z(u,{labelable:!0}),g=N(c,f),b=Dt(),y=Lo(n);return{isPressed:h,linkProps:N(p,y,{...g,...d,"aria-disabled":a||void 0,"aria-current":n["aria-current"],onClick:x=>{var E;(E=f.onClick)===null||E===void 0||E.call(f,x),i&&(i(x),console.warn("onClick is deprecated, please use onPress")),!b.isNative&&x.currentTarget instanceof HTMLAnchorElement&&x.currentTarget.href&&!x.isDefaultPrevented()&&Ua(x.currentTarget,x)&&n.href&&(x.preventDefault(),b.open(x.currentTarget,x,n.href,n.routerOptions))}})}}const Nu=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Ou=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function zu(n){if(Intl.Locale){let t=new Intl.Locale(n).maximize(),o=typeof t.getTextInfo=="function"?t.getTextInfo():t.textInfo;if(o)return o.direction==="rtl";if(t.script)return Nu.has(t.script)}let e=n.split("-")[0];return Ou.has(e)}const Hu=Symbol.for("react-aria.i18n.locale");function yl(){let n=typeof window<"u"&&window[Hu]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([n])}catch{n="en-US"}return{locale:n,direction:zu(n)?"rtl":"ltr"}}let Sn=yl(),lt=new Set;function xl(){Sn=yl();for(let n of lt)n(Sn)}function Vu(){let n=be(),[e,t]=s.useState(Sn);return s.useEffect(()=>(lt.size===0&&window.addEventListener("languagechange",xl),lt.add(t),()=>{lt.delete(t),lt.size===0&&window.removeEventListener("languagechange",xl)}),[]),n?{locale:"en-US",direction:"ltr"}:e}const Wu=s.createContext(null);function Ie(){let n=Vu();return s.useContext(Wu)||n}const _u=Symbol.for("react-aria.i18n.locale"),Uu=Symbol.for("react-aria.i18n.strings");let qe;class Ot{getStringForLocale(e,t){let l=this.getStringsForLocale(t)[e];if(!l)throw new Error(`Could not find intl message ${e} in ${t} locale`);return l}getStringsForLocale(e){let t=this.strings[e];return t||(t=ju(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let t=window[_u];if(qe===void 0){let l=window[Uu];if(!l)return null;qe={};for(let r in l)qe[r]=new Ot({[t]:l[r]},t)}let o=qe==null?void 0:qe[e];if(!o)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return o}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,o])=>o)),this.defaultLocale=t}}function ju(n,e,t="en-US"){if(e[n])return e[n];let o=Gu(n);if(e[o])return e[o];for(let l in e)if(l.startsWith(o+"-"))return e[l];return e[t]}function Gu(n){return Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]}const Pl=new Map,wl=new Map;class qu{format(e,t){let o=this.strings.getStringForLocale(e,this.locale);return typeof o=="function"?o(t,this):o}plural(e,t,o="cardinal"){let l=t["="+e];if(l)return typeof l=="function"?l():l;let r=this.locale+":"+o,i=Pl.get(r);i||(i=new Intl.PluralRules(this.locale,{type:o}),Pl.set(r,i));let a=i.select(e);return l=t[a]||t.other,typeof l=="function"?l():l}number(e){let t=wl.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),wl.set(this.locale,t)),t.format(e)}select(e,t){let o=e[t]||e.other;return typeof o=="function"?o():o}constructor(e,t){this.locale=e,this.strings=t}}const Cl=new WeakMap;function Zu(n){let e=Cl.get(n);return e||(e=new Ot(n),Cl.set(n,e)),e}function Yu(n,e){return e&&Ot.getGlobalDictionaryForPackage(e)||Zu(n)}function Kn(n,e){let{locale:t}=Ie(),o=Yu(n,e);return s.useMemo(()=>new qu(t,o),[t,o])}let Fn=new Map,Mn=!1;try{Mn=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let zt=!1;try{zt=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const El={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Xu{format(e){let t="";if(!Mn&&this.options.signDisplay!=null?t=Qu(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!zt){var o;let{unit:l,unitDisplay:r="short",locale:i}=this.resolvedOptions();if(!l)return t;let a=(o=El[l])===null||o===void 0?void 0:o[r];t+=a[i]||a.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let o=this.numberFormatter.formatToParts(e),l=this.numberFormatter.formatToParts(t);return[...o.map(r=>({...r,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...l.map(r=>({...r,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Mn&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!zt&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=Ju(e,t),this.options=t}}function Ju(n,e={}){let{numberingSystem:t}=e;if(t&&n.includes("-nu-")&&(n.includes("-u-")||(n+="-u-"),n+=`-nu-${t}`),e.style==="unit"&&!zt){var o;let{unit:i,unitDisplay:a="short"}=e;if(!i)throw new Error('unit option must be provided with style: "unit"');if(!(!((o=El[i])===null||o===void 0)&&o[a]))throw new Error(`Unsupported unit ${i} with unitDisplay = ${a}`);e={...e,style:"decimal"}}let l=n+(e?Object.entries(e).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(Fn.has(l))return Fn.get(l);let r=new Intl.NumberFormat(n,e);return Fn.set(l,r),r}function Qu(n,e,t){if(e==="auto")return n.format(t);if(e==="never")return n.format(Math.abs(t));{let o=!1;if(e==="always"?o=t>0||Object.is(t,0):e==="exceptZero"&&(Object.is(t,-0)||Object.is(t,0)?t=Math.abs(t):o=t>0),o){let l=n.format(-t),r=n.format(t),i=l.replace(r,"").replace(/\u200e|\u061C/,"");return[...i].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),l.replace(r,"!!!").replace(i,"+").replace("!!!",r)}else return n.format(t)}}function Ru(n={}){let{locale:e}=Ie();return s.useMemo(()=>new Xu(e,n),[e,n])}let Ln=new Map;function An(n){let{locale:e}=Ie(),t=e+(n?Object.entries(n).sort((l,r)=>l[0]<r[0]?-1:1).join():"");if(Ln.has(t))return Ln.get(t);let o=new Intl.Collator(e,n);return Ln.set(t,o),o}function Ht(n,e){let{elementType:t="button",isDisabled:o,onPress:l,onPressStart:r,onPressEnd:i,onPressUp:a,onPressChange:u,preventFocusOnPress:d,allowFocusWhenDisabled:c,onClick:f,href:h,target:p,rel:g,type:b="button"}=n,y;t==="button"?y={type:b,disabled:o}:y={role:"button",tabIndex:o?void 0:0,href:t==="a"&&!o?h:void 0,target:t==="a"?p:void 0,type:t==="input"?b:void 0,disabled:t==="input"?o:void 0,"aria-disabled":!o||t==="input"?void 0:o,rel:t==="a"?g:void 0};let{pressProps:x,isPressed:E}=Se({onPressStart:r,onPressEnd:i,onPressChange:u,onPress:l,onPressUp:a,isDisabled:o,preventFocusOnPress:d,ref:e}),{focusableProps:T}=Ge(n,e);c&&(T.tabIndex=o?-1:T.tabIndex);let L=N(T,x,Z(n,{labelable:!0}));return{isPressed:E,buttonProps:N(y,L,{"aria-haspopup":n["aria-haspopup"],"aria-expanded":n["aria-expanded"],"aria-controls":n["aria-controls"],"aria-pressed":n["aria-pressed"],onClick:K=>{f&&(f(K),console.warn("onClick is deprecated, please use onPress"))}})}}function Tl(n,e,t){const{isSelected:o}=e,{isPressed:l,buttonProps:r}=Ht({...n,onPress:xe(e.toggle,n.onPress)},t);return{isPressed:l,isSelected:o,isDisabled:n.isDisabled||!1,buttonProps:N(r,{"aria-pressed":o})}}function ed(n,e){const{"aria-label":t,"aria-labelledby":o,orientation:l="horizontal"}=n;let[r,i]=s.useState(!1);V(()=>{var g;i(!!(e.current&&(!((g=e.current.parentElement)===null||g===void 0)&&g.closest('[role="toolbar"]'))))});const{direction:a}=Ie(),u=a==="rtl"&&l==="horizontal";let d=Lu(e);const c=g=>{if(g.currentTarget.contains(g.target)){if(l==="horizontal"&&g.key==="ArrowRight"||l==="vertical"&&g.key==="ArrowDown")u?d.focusPrevious():d.focusNext();else if(l==="horizontal"&&g.key==="ArrowLeft"||l==="vertical"&&g.key==="ArrowUp")u?d.focusNext():d.focusPrevious();else if(g.key==="Tab"){g.stopPropagation(),f.current=document.activeElement,g.shiftKey?d.focusFirst():d.focusLast();return}else return;g.stopPropagation(),g.preventDefault()}},f=s.useRef(null),h=g=>{!g.currentTarget.contains(g.relatedTarget)&&!f.current&&(f.current=g.target)},p=g=>{var b;if(f.current&&!g.currentTarget.contains(g.relatedTarget)&&(!((b=e.current)===null||b===void 0)&&b.contains(g.target))){var y;(y=f.current)===null||y===void 0||y.focus(),f.current=null}};return{toolbarProps:{...Z(n,{labelable:!0}),role:r?"group":"toolbar","aria-orientation":l,"aria-label":t,"aria-labelledby":t==null?o:void 0,onKeyDownCapture:r?void 0:c,onFocusCapture:r?void 0:p,onBlurCapture:r?void 0:h}}}function td(n,e,t){let{isDisabled:o}=n,{toolbarProps:l}=ed(n,t);return{groupProps:{...l,role:e.selectionMode==="single"?"radiogroup":l.role,"aria-disabled":o}}}function nd(n,e,t){let o={isSelected:e.selectedKeys.has(n.id),setSelected(u){e.setSelected(n.id,u)},toggle(){e.toggleKey(n.id)}},{isPressed:l,isSelected:r,isDisabled:i,buttonProps:a}=Tl({...n,id:void 0,isDisabled:n.isDisabled||e.isDisabled},o,t);return e.selectionMode==="single"&&(a.role="radio",a["aria-checked"]=o.isSelected,delete a["aria-pressed"]),{isPressed:l,isSelected:r,isDisabled:i,buttonProps:a}}const Dl=7e3;let de=null;function kl(n,e="assertive",t=Dl){de?de.announce(n,e,t):(de=new od,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?de.announce(n,e,t):setTimeout(()=>{de!=null&&de.isAttached()&&(de==null||de.announce(n,e,t))},100))}class od{isAttached(){var e;return(e=this.node)===null||e===void 0?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",o=Dl){var l,r;if(!this.node)return;let i=document.createElement("div");typeof e=="object"?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,t==="assertive"?(l=this.assertiveLog)===null||l===void 0||l.appendChild(i):(r=this.politeLog)===null||r===void 0||r.appendChild(i),e!==""&&setTimeout(()=>{i.remove()},o)}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 $l={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Sl={...$l,customError:!0,valid:!1},rt={isInvalid:!1,validationDetails:$l,validationErrors:[]},ld=s.createContext({}),In="__formValidationState"+Date.now();function Bn(n){if(n[In]){let{realtimeValidation:e,displayValidation:t,updateValidation:o,resetValidation:l,commitValidation:r}=n[In];return{realtimeValidation:e,displayValidation:t,updateValidation:o,resetValidation:l,commitValidation:r}}return rd(n)}function rd(n){let{isInvalid:e,validationState:t,name:o,value:l,builtinValidation:r,validate:i,validationBehavior:a="aria"}=n;t&&(e||(e=t==="invalid"));let u=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:Sl}:null,d=s.useMemo(()=>{if(!i||l==null)return null;let M=id(i,l);return Kl(M)},[i,l]);r!=null&&r.validationDetails.valid&&(r=void 0);let c=s.useContext(ld),f=s.useMemo(()=>o?Array.isArray(o)?o.flatMap(M=>Nn(c[M])):Nn(c[o]):[],[c,o]),[h,p]=s.useState(c),[g,b]=s.useState(!1);c!==h&&(p(c),b(!1));let y=s.useMemo(()=>Kl(g?[]:f),[g,f]),x=s.useRef(rt),[E,T]=s.useState(rt),L=s.useRef(rt),K=()=>{if(!$)return;O(!1);let M=d||r||x.current;On(M,L.current)||(L.current=M,T(M))},[$,O]=s.useState(!1);return s.useEffect(K),{realtimeValidation:u||y||d||r||rt,displayValidation:a==="native"?u||y||E:u||y||d||r||E,updateValidation(M){a==="aria"&&!On(E,M)?T(M):x.current=M},resetValidation(){let M=rt;On(M,L.current)||(L.current=M,T(M)),a==="native"&&O(!1),b(!0)},commitValidation(){a==="native"&&O(!0),b(!0)}}}function Nn(n){return n?Array.isArray(n)?n:[n]:[]}function id(n,e){if(typeof n=="function"){let t=n(e);if(t&&typeof t!="boolean")return Nn(t)}return[]}function Kl(n){return n.length?{isInvalid:!0,validationErrors:n,validationDetails:Sl}:null}function On(n,e){return n===e?!0:!!n&&!!e&&n.isInvalid===e.isInvalid&&n.validationErrors.length===e.validationErrors.length&&n.validationErrors.every((t,o)=>t===e.validationErrors[o])&&Object.entries(n.validationDetails).every(([t,o])=>e.validationDetails[t]===o)}function zn(n,e,t){let{validationBehavior:o,focus:l}=n;V(()=>{if(o==="native"&&(t!=null&&t.current)&&!t.current.disabled){let u=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t.current.setCustomValidity(u),t.current.hasAttribute("title")||(t.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(ad(t.current))}});let r=X(()=>{e.resetValidation()}),i=X(u=>{var d;e.displayValidation.isInvalid||e.commitValidation();let c=t==null||(d=t.current)===null||d===void 0?void 0:d.form;if(!u.defaultPrevented&&t&&c&&ud(c)===t.current){var f;l?l():(f=t.current)===null||f===void 0||f.focus(),sl("keyboard")}u.preventDefault()}),a=X(()=>{e.commitValidation()});s.useEffect(()=>{let u=t==null?void 0:t.current;if(!u)return;let d=u.form;return u.addEventListener("invalid",i),u.addEventListener("change",a),d==null||d.addEventListener("reset",r),()=>{u.removeEventListener("invalid",i),u.removeEventListener("change",a),d==null||d.removeEventListener("reset",r)}},[t,i,a,r,o])}function sd(n){let e=n.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 ad(n){return{isInvalid:!n.validity.valid,validationDetails:sd(n),validationErrors:n.validationMessage?[n.validationMessage]:[]}}function ud(n){for(let e=0;e<n.elements.length;e++){let t=n.elements[e];if(!t.validity.valid)return t}return null}function dd(n,e,t){let{isDisabled:o=!1,isReadOnly:l=!1,value:r,name:i,children:a,"aria-label":u,"aria-labelledby":d,validationState:c="valid",isInvalid:f}=n,h=$=>{$.stopPropagation(),e.setSelected($.target.checked)},p=a!=null,g=u!=null||d!=null;!p&&!g&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:b,isPressed:y}=Se({isDisabled:o}),{pressProps:x,isPressed:E}=Se({isDisabled:o||l,onPress(){e.toggle()}}),{focusableProps:T}=Ge(n,t),L=N(b,T),K=Z(n,{labelable:!0});return fn(t,e.isSelected,e.setSelected),{labelProps:N(x,{onClick:$=>$.preventDefault()}),inputProps:N(K,{"aria-invalid":f||c==="invalid"||void 0,"aria-errormessage":n["aria-errormessage"],"aria-controls":n["aria-controls"],"aria-readonly":l||void 0,onChange:h,disabled:o,...r==null?{}:{value:r},name:i,type:"checkbox",...L}),isSelected:e.isSelected,isPressed:y||E,isDisabled:o,isReadOnly:l,isInvalid:f||c==="invalid"}}function cd(n,e,t){let o=Bn({...n,value:e.isSelected}),{isInvalid:l,validationErrors:r,validationDetails:i}=o.displayValidation,{labelProps:a,inputProps:u,isSelected:d,isPressed:c,isDisabled:f,isReadOnly:h}=dd({...n,isInvalid:l},e,t);zn(n,o,t);let{isIndeterminate:p,isRequired:g,validationBehavior:b="aria"}=n;s.useEffect(()=>{t.current&&(t.current.indeterminate=!!p)});let{pressProps:y}=Se({isDisabled:f||h,onPress(){let{[In]:x}=n,{commitValidation:E}=x||o;E()}});return{labelProps:N(a,y),inputProps:{...u,checked:d,"aria-required":g&&b==="aria"||void 0,required:g&&b==="native"},isSelected:d,isPressed:c,isDisabled:f,isReadOnly:h,isInvalid:l,validationErrors:r,validationDetails:i}}function Hn(n){let{id:e,label:t,"aria-labelledby":o,"aria-label":l,labelElementType:r="label"}=n;e=J(e);let i=J(),a={};t?(o=o?`${i} ${o}`:i,a={id:i,htmlFor:r==="label"?e:void 0}):!o&&!l&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let u=No({id:e,"aria-label":l,"aria-labelledby":o});return{labelProps:a,fieldProps:u}}function Vn(n){let{description:e,errorMessage:t,isInvalid:o,validationState:l}=n,{labelProps:r,fieldProps:i}=Hn(n),a=Xe([!!e,!!t,o,l]),u=Xe([!!e,!!t,o,l]);return i=N(i,{"aria-describedby":[a,u,n["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:r,fieldProps:i,descriptionProps:{id:a},errorMessageProps:{id:u}}}function Fl(n={}){let{isReadOnly:e}=n,[t,o]=we(n.isSelected,n.defaultSelected||!1,n.onChange);function l(i){e||o(i)}function r(){e||o(!t)}return{isSelected:t,setSelected:l,toggle:r}}function fd(n){let{selectionMode:e="single",disallowEmptySelection:t,isDisabled:o=!1}=n,[l,r]=we(s.useMemo(()=>n.selectedKeys?new Set(n.selectedKeys):void 0,[n.selectedKeys]),s.useMemo(()=>n.defaultSelectedKeys?new Set(n.defaultSelectedKeys):new Set,[n.defaultSelectedKeys]),n.onSelectionChange);return{selectionMode:e,isDisabled:o,selectedKeys:l,setSelectedKeys:r,toggleKey(i){let a;e==="multiple"?(a=new Set(l),a.has(i)&&(!t||a.size>1)?a.delete(i):a.add(i)):a=new Set(l.has(i)&&!t?[]:[i]),r(a)},setSelected(i,a){a!==l.has(i)&&this.toggleKey(i)}}}const Ml={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 Ll(n={}){let{style:e,isFocusable:t}=n,[o,l]=s.useState(!1),{focusWithinProps:r}=At({isDisabled:!t,onFocusWithinChange:a=>l(a)}),i=s.useMemo(()=>o?e:e?{...Ml,...e}:Ml,[o]);return{visuallyHiddenProps:{...r,style:i}}}function Al(n){let{children:e,elementType:t="div",isFocusable:o,style:l,...r}=n,{visuallyHiddenProps:i}=Ll(n);return s.createElement(t,N(r,i),e)}function pd(n,e){let{inputElementType:t="input",isDisabled:o=!1,isRequired:l=!1,isReadOnly:r=!1,type:i="text",validationBehavior:a="aria"}=n,[u,d]=we(n.value,n.defaultValue||"",n.onChange),{focusableProps:c}=Ge(n,e),f=Bn({...n,value:u}),{isInvalid:h,validationErrors:p,validationDetails:g}=f.displayValidation,{labelProps:b,fieldProps:y,descriptionProps:x,errorMessageProps:E}=Vn({...n,isInvalid:h,errorMessage:n.errorMessage||p}),T=Z(n,{labelable:!0});const L={type:i,pattern:n.pattern};return fn(e,u,d),zn(n,f,e),s.useEffect(()=>{if(e.current instanceof re(e.current).HTMLTextAreaElement){let K=e.current;Object.defineProperty(K,"defaultValue",{get:()=>K.value,set:()=>{},configurable:!0})}},[e]),{labelProps:b,inputProps:N(T,t==="input"?L:void 0,{disabled:o,readOnly:r,required:l&&a==="native","aria-required":l&&a==="aria"||void 0,"aria-invalid":h||void 0,"aria-errormessage":n["aria-errormessage"],"aria-activedescendant":n["aria-activedescendant"],"aria-autocomplete":n["aria-autocomplete"],"aria-haspopup":n["aria-haspopup"],"aria-controls":n["aria-controls"],value:u,onChange:K=>d(K.target.value),autoComplete:n.autoComplete,autoCapitalize:n.autoCapitalize,maxLength:n.maxLength,minLength:n.minLength,name:n.name,placeholder:n.placeholder,inputMode:n.inputMode,autoCorrect:n.autoCorrect,spellCheck:n.spellCheck,onCopy:n.onCopy,onCut:n.onCut,onPaste:n.onPaste,onCompositionEnd:n.onCompositionEnd,onCompositionStart:n.onCompositionStart,onCompositionUpdate:n.onCompositionUpdate,onSelect:n.onSelect,onBeforeInput:n.onBeforeInput,onInput:n.onInput,...c,...y}),descriptionProps:x,errorMessageProps:E,isInvalid:h,validationErrors:p,validationDetails:g}}const ce={top:"top",bottom:"top",left:"left",right:"left"},Vt={top:"bottom",bottom:"top",left:"right",right:"left"},vd={top:"left",left:"top"},Wn={top:"height",left:"width"},Il={width:"totalWidth",height:"totalHeight"},Wt={};let Y=typeof document<"u"?window.visualViewport:null;function Bl(n){let e=0,t=0,o=0,l=0,r=0,i=0,a={};var u;let d=((u=Y==null?void 0:Y.scale)!==null&&u!==void 0?u:1)>1;if(n.tagName==="BODY"){let g=document.documentElement;o=g.clientWidth,l=g.clientHeight;var c;e=(c=Y==null?void 0:Y.width)!==null&&c!==void 0?c:o;var f;t=(f=Y==null?void 0:Y.height)!==null&&f!==void 0?f:l,a.top=g.scrollTop||n.scrollTop,a.left=g.scrollLeft||n.scrollLeft,Y&&(r=Y.offsetTop,i=Y.offsetLeft)}else({width:e,height:t,top:r,left:i}=Ze(n)),a.top=n.scrollTop,a.left=n.scrollLeft,o=e,l=t;if(ln()&&(n.tagName==="BODY"||n.tagName==="HTML")&&d){a.top=0,a.left=0;var h;r=(h=Y==null?void 0:Y.pageTop)!==null&&h!==void 0?h:0;var p;i=(p=Y==null?void 0:Y.pageLeft)!==null&&p!==void 0?p:0}return{width:e,height:t,totalWidth:o,totalHeight:l,scroll:a,top:r,left:i}}function hd(n){return{top:n.scrollTop,left:n.scrollLeft,width:n.scrollWidth,height:n.scrollHeight}}function Nl(n,e,t,o,l,r,i){var a;let u=(a=l.scroll[n])!==null&&a!==void 0?a:0,d=o[Wn[n]],c=o.scroll[ce[n]]+r,f=d+o.scroll[ce[n]]-r,h=e-u+i[n]-o[ce[n]],p=e-u+t+i[n]-o[ce[n]];return h<c?c-h:p>f?Math.max(f-p,c-h):0}function gd(n){let e=window.getComputedStyle(n);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 Ol(n){if(Wt[n])return Wt[n];let[e,t]=n.split(" "),o=ce[e]||"right",l=vd[o];ce[t]||(t="center");let r=Wn[o],i=Wn[l];return Wt[n]={placement:e,crossPlacement:t,axis:o,crossAxis:l,size:r,crossSize:i},Wt[n]}function _n(n,e,t,o,l,r,i,a,u,d){let{placement:c,crossPlacement:f,axis:h,crossAxis:p,size:g,crossSize:b}=o,y={};var x;y[p]=(x=n[p])!==null&&x!==void 0?x:0;var E,T,L,K;f==="center"?y[p]+=(((E=n[b])!==null&&E!==void 0?E:0)-((T=t[b])!==null&&T!==void 0?T:0))/2:f!==p&&(y[p]+=((L=n[b])!==null&&L!==void 0?L:0)-((K=t[b])!==null&&K!==void 0?K:0)),y[p]+=r;const $=n[p]-t[b]+u+d,O=n[p]+n[b]-u-d;if(y[p]=kt(y[p],$,O),c===h){const v=a?i[g]:e[Il[g]];y[Vt[h]]=Math.floor(v-n[h]+l)}else y[h]=Math.floor(n[h]+n[g]+l);return y}function md(n,e,t,o,l,r,i,a){const u=o?t.height:e[Il.height];var d;let c=n.top!=null?t.top+n.top:t.top+(u-((d=n.bottom)!==null&&d!==void 0?d:0)-i);var f,h,p,g,b,y;let x=a!=="top"?Math.max(0,e.height+e.top+((f=e.scroll.top)!==null&&f!==void 0?f:0)-c-(((h=l.top)!==null&&h!==void 0?h:0)+((p=l.bottom)!==null&&p!==void 0?p:0)+r)):Math.max(0,c+i-(e.top+((g=e.scroll.top)!==null&&g!==void 0?g:0))-(((b=l.top)!==null&&b!==void 0?b:0)+((y=l.bottom)!==null&&y!==void 0?y:0)+r));return Math.min(e.height-r*2,x)}function zl(n,e,t,o,l,r){let{placement:i,axis:a,size:u}=r;var d,c;if(i===a)return Math.max(0,t[a]-n[a]-((d=n.scroll[a])!==null&&d!==void 0?d:0)+e[a]-((c=o[a])!==null&&c!==void 0?c:0)-o[Vt[a]]-l);var f;return Math.max(0,n[u]+n[a]+n.scroll[a]-e[a]-t[a]-t[u]-((f=o[a])!==null&&f!==void 0?f:0)-o[Vt[a]]-l)}function bd(n,e,t,o,l,r,i,a,u,d,c,f,h,p,g,b){let y=Ol(n),{size:x,crossAxis:E,crossSize:T,placement:L,crossPlacement:K}=y,$=_n(e,a,t,y,c,f,d,h,g,b),O=c,v=zl(a,d,e,l,r+c,y);if(i&&o[x]>v){let Ve=Ol(`${Vt[L]} ${K}`),Pt=_n(e,a,t,Ve,c,f,d,h,g,b);zl(a,d,e,l,r+c,Ve)>v&&(y=Ve,$=Pt,O=c)}let F="bottom";y.axis==="top"?y.placement==="top"?F="top":y.placement==="bottom"&&(F="bottom"):y.crossAxis==="top"&&(y.crossPlacement==="top"?F="bottom":y.crossPlacement==="bottom"&&(F="top"));let M=Nl(E,$[E],t[T],a,u,r,d);$[E]+=M;let D=md($,a,d,h,l,r,t.height,F);p&&p<D&&(D=p),t.height=Math.min(t.height,D),$=_n(e,a,t,y,O,f,d,h,g,b),M=Nl(E,$[E],t[T],a,u,r,d),$[E]+=M;let I={},m=e[E]+.5*e[T]-$[E]-l[ce[E]];const C=g/2+b;var A,z,H,k;const W=ce[E]==="left"?((A=l.left)!==null&&A!==void 0?A:0)+((z=l.right)!==null&&z!==void 0?z:0):((H=l.top)!==null&&H!==void 0?H:0)+((k=l.bottom)!==null&&k!==void 0?k:0),le=t[T]-W-g/2-b,bt=e[E]+g/2-($[E]+l[ce[E]]),yt=e[E]+e[T]-g/2-($[E]+l[ce[E]]),xt=kt(m,bt,yt);return I[E]=kt(xt,C,le),{position:$,maxHeight:D,arrowOffsetLeft:I.left,arrowOffsetTop:I.top,placement:y.placement}}function yd(n){let{placement:e,targetNode:t,overlayNode:o,scrollNode:l,padding:r,shouldFlip:i,boundaryElement:a,offset:u,crossOffset:d,maxHeight:c,arrowSize:f=0,arrowBoundaryOffset:h=0}=n,p=o instanceof HTMLElement?xd(o):document.documentElement,g=p===document.documentElement;const b=window.getComputedStyle(p).position;let y=!!b&&b!=="static",x=g?Ze(t):Hl(t,p);if(!g){let{marginTop:I,marginLeft:m}=window.getComputedStyle(t);x.top+=parseInt(I,10)||0,x.left+=parseInt(m,10)||0}let E=Ze(o),T=gd(o);var L,K;E.width+=((L=T.left)!==null&&L!==void 0?L:0)+((K=T.right)!==null&&K!==void 0?K:0);var $,O;E.height+=(($=T.top)!==null&&$!==void 0?$:0)+((O=T.bottom)!==null&&O!==void 0?O:0);let v=hd(l),F=Bl(a),M=Bl(p),D=a.tagName==="BODY"?Ze(p):Hl(p,a);return p.tagName==="HTML"&&a.tagName==="BODY"&&(M.scroll.top=0,M.scroll.left=0),bd(e,x,E,v,T,r,i,F,M,D,u,d,y,c,f,h)}function Ze(n){let{top:e,left:t,width:o,height:l}=n.getBoundingClientRect(),{scrollTop:r,scrollLeft:i,clientTop:a,clientLeft:u}=document.documentElement;return{top:e+r-a,left:t+i-u,width:o,height:l}}function Hl(n,e){let t=window.getComputedStyle(n),o;if(t.position==="fixed"){let{top:l,left:r,width:i,height:a}=n.getBoundingClientRect();o={top:l,left:r,width:i,height:a}}else{o=Ze(n);let l=Ze(e),r=window.getComputedStyle(e);l.top+=(parseInt(r.borderTopWidth,10)||0)-e.scrollTop,l.left+=(parseInt(r.borderLeftWidth,10)||0)-e.scrollLeft,o.top-=l.top,o.left-=l.left}return o.top-=parseInt(t.marginTop,10)||0,o.left-=parseInt(t.marginLeft,10)||0,o}function xd(n){let e=n.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Vl(e)&&(e=document.documentElement),e==null)for(e=n.parentElement;e&&!Vl(e);)e=e.parentElement;return e||document.documentElement}function Vl(n){let e=window.getComputedStyle(n);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 Wl=new WeakMap;function Pd(n){let{triggerRef:e,isOpen:t,onClose:o}=n;s.useEffect(()=>{if(!t||o===null)return;let l=r=>{let i=r.target;if(!e.current||i instanceof Node&&!i.contains(e.current)||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement)return;let a=o||Wl.get(e.current);a&&a()};return window.addEventListener("scroll",l,!0),()=>{window.removeEventListener("scroll",l,!0)}},[t,o,e])}let G=typeof document<"u"?window.visualViewport:null;function _l(n){let{direction:e}=Ie(),{arrowSize:t=0,targetRef:o,overlayRef:l,scrollRef:r=l,placement:i="bottom",containerPadding:a=12,shouldFlip:u=!0,boundaryElement:d=typeof document<"u"?document.body:null,offset:c=0,crossOffset:f=0,shouldUpdatePosition:h=!0,isOpen:p=!0,onClose:g,maxHeight:b,arrowBoundaryOffset:y=0}=n,[x,E]=s.useState(null),T=[h,i,l.current,o.current,r.current,a,u,d,c,f,p,e,b,y,t],L=s.useRef(G==null?void 0:G.scale);s.useEffect(()=>{p&&(L.current=G==null?void 0:G.scale)},[p]);let K=s.useCallback(()=>{if(h===!1||!p||!l.current||!o.current||!d||(G==null?void 0:G.scale)!==L.current)return;let M=null;if(r.current&&r.current.contains(document.activeElement)){var D;let k=(D=document.activeElement)===null||D===void 0?void 0:D.getBoundingClientRect(),W=r.current.getBoundingClientRect();var I;if(M={type:"top",offset:((I=k==null?void 0:k.top)!==null&&I!==void 0?I:0)-W.top},M.offset>W.height/2){M.type="bottom";var m;M.offset=((m=k==null?void 0:k.bottom)!==null&&m!==void 0?m:0)-W.bottom}}let C=l.current;if(!b&&l.current){var A;C.style.top="0px",C.style.bottom="";var z;C.style.maxHeight=((z=(A=window.visualViewport)===null||A===void 0?void 0:A.height)!==null&&z!==void 0?z:window.innerHeight)+"px"}let H=yd({placement:Cd(i,e),overlayNode:l.current,targetNode:o.current,scrollNode:r.current||l.current,padding:a,shouldFlip:u,boundaryElement:d,offset:c,crossOffset:f,maxHeight:b,arrowSize:t,arrowBoundaryOffset:y});if(H.position){if(C.style.top="",C.style.bottom="",C.style.left="",C.style.right="",Object.keys(H.position).forEach(k=>C.style[k]=H.position[k]+"px"),C.style.maxHeight=H.maxHeight!=null?H.maxHeight+"px":"",M&&document.activeElement&&r.current){let k=document.activeElement.getBoundingClientRect(),W=r.current.getBoundingClientRect(),le=k[M.type]-W[M.type];r.current.scrollTop+=le-M.offset}E(H)}},T);V(K,T),wd(K),an({ref:l,onResize:K}),an({ref:o,onResize:K});let $=s.useRef(!1);V(()=>{let M,D=()=>{$.current=!0,clearTimeout(M),M=setTimeout(()=>{$.current=!1},500),K()},I=()=>{$.current&&D()};return G==null||G.addEventListener("resize",D),G==null||G.addEventListener("scroll",I),()=>{G==null||G.removeEventListener("resize",D),G==null||G.removeEventListener("scroll",I)}},[K]);let O=s.useCallback(()=>{$.current||g==null||g()},[g,$]);Pd({triggerRef:o,isOpen:p,onClose:g&&O});var v,F;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...x==null?void 0:x.position,maxHeight:(v=x==null?void 0:x.maxHeight)!==null&&v!==void 0?v:"100vh"}},placement:(F=x==null?void 0:x.placement)!==null&&F!==void 0?F:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:x==null?void 0:x.arrowOffsetLeft,top:x==null?void 0:x.arrowOffsetTop}},updatePosition:K}}function wd(n){V(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n])}function Cd(n,e){return e==="rtl"?n.replace("start","right").replace("end","left"):n.replace("start","left").replace("end","right")}const ge=[];function Ed(n,e){let{onClose:t,shouldCloseOnBlur:o,isOpen:l,isDismissable:r=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:a}=n;s.useEffect(()=>(l&&ge.push(e),()=>{let g=ge.indexOf(e);g>=0&&ge.splice(g,1)}),[l,e]);let u=()=>{ge[ge.length-1]===e&&t&&t()},d=g=>{(!a||a(g.target))&&ge[ge.length-1]===e&&(g.stopPropagation(),g.preventDefault())},c=g=>{(!a||a(g.target))&&(ge[ge.length-1]===e&&(g.stopPropagation(),g.preventDefault()),u())},f=g=>{g.key==="Escape"&&!i&&!g.nativeEvent.isComposing&&(g.stopPropagation(),g.preventDefault(),u())};xu({ref:e,onInteractOutside:r&&l?c:void 0,onInteractOutsideStart:d});let{focusWithinProps:h}=At({isDisabled:!o,onBlurWithin:g=>{!g.relatedTarget||Su(g.relatedTarget)||(!a||a(g.relatedTarget))&&(t==null||t())}}),p=g=>{g.target===g.currentTarget&&g.preventDefault()};return{overlayProps:{onKeyDown:f,...h},underlayProps:{onPointerDown:p}}}function Ul(n,e,t){let{type:o}=n,{isOpen:l}=e;s.useEffect(()=>{t&&t.current&&Wl.set(t.current,e.close)});let r;o==="menu"?r=!0:o==="listbox"&&(r="listbox");let i=J();return{triggerProps:{"aria-haspopup":r,"aria-expanded":l,"aria-controls":l?i:void 0,onPress:e.toggle},overlayProps:{id:i}}}const Un=typeof document<"u"&&window.visualViewport,Td=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let _t=0,jn;function Dd(n={}){let{isDisabled:e}=n;V(()=>{if(!e)return _t++,_t===1&&(Tt()?jn=$d():jn=kd()),()=>{_t--,_t===0&&jn()}},[e])}function kd(){return xe(Ye(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Ye(document.documentElement,"overflow","hidden"))}function $d(){let n,e,t=d=>{n=zo(d.target,!0),!(n===document.documentElement&&n===document.body)&&n instanceof HTMLElement&&window.getComputedStyle(n).overscrollBehavior==="auto"&&(e=Ye(n,"overscrollBehavior","contain"))},o=d=>{if(!n||n===document.documentElement||n===document.body){d.preventDefault();return}n.scrollHeight===n.clientHeight&&n.scrollWidth===n.clientWidth&&d.preventDefault()},l=()=>{e&&e()},r=d=>{let c=d.target;Sd(c)&&(a(),c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",Un&&(Un.height<window.innerHeight?requestAnimationFrame(()=>{jl(c)}):Un.addEventListener("resize",()=>jl(c),{once:!0}))}))},i=null,a=()=>{if(i)return;let d=()=>{window.scrollTo(0,0)},c=window.pageXOffset,f=window.pageYOffset;i=xe(it(window,"scroll",d),Ye(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Ye(document.documentElement,"overflow","hidden"),Ye(document.body,"marginTop",`-${f}px`),()=>{window.scrollTo(c,f)}),window.scrollTo(0,0)},u=xe(it(document,"touchstart",t,{passive:!1,capture:!0}),it(document,"touchmove",o,{passive:!1,capture:!0}),it(document,"touchend",l,{passive:!1,capture:!0}),it(document,"focus",r,!0));return()=>{e==null||e(),i==null||i(),u()}}function Ye(n,e,t){let o=n.style[e];return n.style[e]=t,()=>{n.style[e]=o}}function it(n,e,t,o){return n.addEventListener(e,t,o),()=>{n.removeEventListener(e,t,o)}}function jl(n){let e=document.scrollingElement||document.documentElement,t=n;for(;t&&t!==e;){let o=zo(t);if(o!==document.documentElement&&o!==document.body&&o!==t){let l=o.getBoundingClientRect().top,r=t.getBoundingClientRect().top;r>l+t.clientHeight&&(o.scrollTop+=r-l)}t=o.parentElement}}function Sd(n){return n instanceof HTMLInputElement&&!Td.has(n.type)||n instanceof HTMLTextAreaElement||n instanceof HTMLElement&&n.isContentEditable}const Gn=s.createContext(null);function Kd(n){let{children:e}=n,t=s.useContext(Gn),[o,l]=s.useState(0),r=s.useMemo(()=>({parent:t,modalCount:o,addModal(){l(i=>i+1),t&&t.addModal()},removeModal(){l(i=>i-1),t&&t.removeModal()}}),[t,o]);return s.createElement(Gn.Provider,{value:r},e)}function Fd(){let n=s.useContext(Gn);return{modalProviderProps:{"aria-hidden":n&&n.modalCount>0?!0:void 0}}}function Md(n){let{modalProviderProps:e}=Fd();return s.createElement("div",{"data-overlay-container":!0,...n,...e})}function Ld(n){return s.createElement(Kd,null,s.createElement(Md,n))}function Ad(n){let e=be(),{portalContainer:t=e?null:document.body,...o}=n;if(s.useEffect(()=>{if(t!=null&&t.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[t]),!t)return null;let l=s.createElement(Ld,o);return ke.createPortal(l,t)}var Gl={};Gl={dismiss:"تجاهل"};var ql={};ql={dismiss:"Отхвърляне"};var Zl={};Zl={dismiss:"Odstranit"};var Yl={};Yl={dismiss:"Luk"};var Xl={};Xl={dismiss:"Schließen"};var Jl={};Jl={dismiss:"Απόρριψη"};var Ql={};Ql={dismiss:"Dismiss"};var Rl={};Rl={dismiss:"Descartar"};var er={};er={dismiss:"Lõpeta"};var tr={};tr={dismiss:"Hylkää"};var nr={};nr={dismiss:"Rejeter"};var or={};or={dismiss:"התעלם"};var lr={};lr={dismiss:"Odbaci"};var rr={};rr={dismiss:"Elutasítás"};var ir={};ir={dismiss:"Ignora"};var sr={};sr={dismiss:"閉じる"};var ar={};ar={dismiss:"무시"};var ur={};ur={dismiss:"Atmesti"};var dr={};dr={dismiss:"Nerādīt"};var cr={};cr={dismiss:"Lukk"};var fr={};fr={dismiss:"Negeren"};var pr={};pr={dismiss:"Zignoruj"};var vr={};vr={dismiss:"Descartar"};var hr={};hr={dismiss:"Dispensar"};var gr={};gr={dismiss:"Revocare"};var mr={};mr={dismiss:"Пропустить"};var br={};br={dismiss:"Zrušiť"};var yr={};yr={dismiss:"Opusti"};var xr={};xr={dismiss:"Odbaci"};var Pr={};Pr={dismiss:"Avvisa"};var wr={};wr={dismiss:"Kapat"};var Cr={};Cr={dismiss:"Скасувати"};var Er={};Er={dismiss:"取消"};var Tr={};Tr={dismiss:"關閉"};var Dr={};Dr={"ar-AE":Gl,"bg-BG":ql,"cs-CZ":Zl,"da-DK":Yl,"de-DE":Xl,"el-GR":Jl,"en-US":Ql,"es-ES":Rl,"et-EE":er,"fi-FI":tr,"fr-FR":nr,"he-IL":or,"hr-HR":lr,"hu-HU":rr,"it-IT":ir,"ja-JP":sr,"ko-KR":ar,"lt-LT":ur,"lv-LV":dr,"nb-NO":cr,"nl-NL":fr,"pl-PL":pr,"pt-BR":vr,"pt-PT":hr,"ro-RO":gr,"ru-RU":mr,"sk-SK":br,"sl-SI":yr,"sr-SP":xr,"sv-SE":Pr,"tr-TR":wr,"uk-UA":Cr,"zh-CN":Er,"zh-TW":Tr};function Id(n){return n&&n.__esModule?n.default:n}function kr(n){let{onDismiss:e,...t}=n,o=Kn(Id(Dr),"@react-aria/overlays"),l=No(t,o.format("dismiss")),r=()=>{e&&e()};return s.createElement(Al,null,s.createElement("button",{...l,tabIndex:-1,onClick:r,style:{width:1,height:1}}))}let st=new WeakMap,ae=[];function Bd(n,e=document.body){let t=new Set(n),o=new Set,l=u=>{for(let h of u.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))t.add(h);let d=h=>{if(t.has(h)||h.parentElement&&o.has(h.parentElement)&&h.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let p of t)if(h.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&&r(u),f!==NodeFilter.FILTER_REJECT){let h=c.nextNode();for(;h!=null;)r(h),h=c.nextNode()}},r=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"),o.add(u),st.set(u,c+1))};ae.length&&ae[ae.length-1].disconnect(),l(e);let i=new MutationObserver(u=>{for(let d of u)if(!(d.type!=="childList"||d.addedNodes.length===0)&&![...t,...o].some(c=>c.contains(d.target))){for(let c of d.removedNodes)c instanceof Element&&(t.delete(c),o.delete(c));for(let c of d.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?t.add(c):c instanceof Element&&l(c)}});i.observe(e,{childList:!0,subtree:!0});let a={observe(){i.observe(e,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return ae.push(a),()=>{i.disconnect();for(let u of o){let d=st.get(u);d!=null&&(d===1?(u.removeAttribute("aria-hidden"),st.delete(u)):st.set(u,d-1))}a===ae[ae.length-1]?(ae.pop(),ae.length&&ae[ae.length-1].observe()):ae.splice(ae.indexOf(a),1)}}function Nd(n,e){let{triggerRef:t,popoverRef:o,isNonModal:l,isKeyboardDismissDisabled:r,shouldCloseOnInteractOutside:i,...a}=n,{overlayProps:u,underlayProps:d}=Ed({isOpen:e.isOpen&&!a["data-react-aria-top-layer"],onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!l,isKeyboardDismissDisabled:r,shouldCloseOnInteractOutside:i},o),{overlayProps:c,arrowProps:f,placement:h}=_l({...a,targetRef:t,overlayRef:o,isOpen:e.isOpen,onClose:l?e.close:null});return Dd({isDisabled:l||!e.isOpen}),V(()=>{if(e.isOpen&&!l&&o.current)return Bd([o.current])},[l,e.isOpen,o]),{popoverProps:N(u,c),arrowProps:f,underlayProps:d,placement:h}}const Od=s.createContext({});function zd(){var n;return(n=s.useContext(Od))!==null&&n!==void 0?n:{}}const $r=s.createContext(null);function Hd(n){let e=be(),{portalContainer:t=e?null:document.body,isExiting:o}=n,[l,r]=s.useState(!1),i=s.useMemo(()=>({contain:l,setContain:r}),[l,r]),{getContainer:a}=zd();if(!n.portalContainer&&a&&(t=a()),!t)return null;let u=n.children;return n.disableFocusManagement||(u=s.createElement(pl,{restoreFocus:!0,contain:l&&!o},u)),u=s.createElement($r.Provider,{value:i},s.createElement(cu,null,u)),ke.createPortal(u,t)}function Vd(){let n=s.useContext($r),e=n==null?void 0:n.setContain;V(()=>{e==null||e(!0)},[e])}const qn=new WeakMap;function Wd(n){return typeof n=="string"?n.replace(/\s*/g,""):""+n}function _d(n,e){let t=qn.get(n);if(!t)throw new Error("Unknown list");return`${t.id}-option-${Wd(e)}`}function Zn(n){return Va()?n.altKey:n.ctrlKey}const Ud=1e3;function Sr(n){let{keyboardDelegate:e,selectionManager:t,onTypeSelect:o}=n,l=s.useRef({search:"",timeout:void 0}).current,r=i=>{let a=jd(i.key);if(!(!a||i.ctrlKey||i.metaKey||!i.currentTarget.contains(i.target))){if(a===" "&&l.search.trim().length>0&&(i.preventDefault(),"continuePropagation"in i||i.stopPropagation()),l.search+=a,e.getKeyForSearch!=null){let u=e.getKeyForSearch(l.search,t.focusedKey);u==null&&(u=e.getKeyForSearch(l.search)),u!=null&&(t.setFocusedKey(u),o&&o(u))}clearTimeout(l.timeout),l.timeout=setTimeout(()=>{l.search=""},Ud)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?r:void 0}}}function jd(n){return n.length===1||!/^[A-Z]/i.test(n)?n:""}function Gd(n){let{selectionManager:e,keyboardDelegate:t,ref:o,autoFocus:l=!1,shouldFocusWrap:r=!1,disallowEmptySelection:i=!1,disallowSelectAll:a=!1,selectOnFocus:u=e.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:c,allowsTabNavigation:f=!1,isVirtualized:h,scrollRef:p=o,linkBehavior:g="action"}=n,{direction:b}=Ie(),y=Dt(),x=m=>{var C;if(m.altKey&&m.key==="Tab"&&m.preventDefault(),!(!((C=o.current)===null||C===void 0)&&C.contains(m.target)))return;const A=(B,We)=>{if(B!=null){if(e.isLink(B)&&g==="selection"&&u&&!Zn(m)){var De;ke.flushSync(()=>{e.setFocusedKey(B,We)});let fa=(De=p.current)===null||De===void 0?void 0:De.querySelector(`[data-key="${CSS.escape(B.toString())}"]`),pa=e.getItemProps(B);fa&&y.open(fa,m,pa.href,pa.routerOptions);return}if(e.setFocusedKey(B,We),e.isLink(B)&&g==="override")return;m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(B):u&&!Zn(m)&&e.replaceSelection(B)}};switch(m.key){case"ArrowDown":if(t.getKeyBelow){var z,H,k;let B=e.focusedKey!=null?(z=t.getKeyBelow)===null||z===void 0?void 0:z.call(t,e.focusedKey):(H=t.getFirstKey)===null||H===void 0?void 0:H.call(t);B==null&&r&&(B=(k=t.getFirstKey)===null||k===void 0?void 0:k.call(t,e.focusedKey)),B!=null&&(m.preventDefault(),A(B))}break;case"ArrowUp":if(t.getKeyAbove){var W,le,bt;let B=e.focusedKey!=null?(W=t.getKeyAbove)===null||W===void 0?void 0:W.call(t,e.focusedKey):(le=t.getLastKey)===null||le===void 0?void 0:le.call(t);B==null&&r&&(B=(bt=t.getLastKey)===null||bt===void 0?void 0:bt.call(t,e.focusedKey)),B!=null&&(m.preventDefault(),A(B))}break;case"ArrowLeft":if(t.getKeyLeftOf){var yt,xt,Ve;let B=e.focusedKey!=null?(yt=t.getKeyLeftOf)===null||yt===void 0?void 0:yt.call(t,e.focusedKey):null;B==null&&r&&(B=b==="rtl"?(xt=t.getFirstKey)===null||xt===void 0?void 0:xt.call(t,e.focusedKey):(Ve=t.getLastKey)===null||Ve===void 0?void 0:Ve.call(t,e.focusedKey)),B!=null&&(m.preventDefault(),A(B,b==="rtl"?"first":"last"))}break;case"ArrowRight":if(t.getKeyRightOf){var Pt,tn,Eo;let B=e.focusedKey!=null?(Pt=t.getKeyRightOf)===null||Pt===void 0?void 0:Pt.call(t,e.focusedKey):null;B==null&&r&&(B=b==="rtl"?(tn=t.getLastKey)===null||tn===void 0?void 0:tn.call(t,e.focusedKey):(Eo=t.getFirstKey)===null||Eo===void 0?void 0:Eo.call(t,e.focusedKey)),B!=null&&(m.preventDefault(),A(B,b==="rtl"?"last":"first"))}break;case"Home":if(t.getFirstKey){if(e.focusedKey===null&&m.shiftKey)return;m.preventDefault();let B=t.getFirstKey(e.focusedKey,Ue(m));e.setFocusedKey(B),B!=null&&(Ue(m)&&m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(B):u&&e.replaceSelection(B))}break;case"End":if(t.getLastKey){if(e.focusedKey===null&&m.shiftKey)return;m.preventDefault();let B=t.getLastKey(e.focusedKey,Ue(m));e.setFocusedKey(B),B!=null&&(Ue(m)&&m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(B):u&&e.replaceSelection(B))}break;case"PageDown":if(t.getKeyPageBelow&&e.focusedKey!=null){let B=t.getKeyPageBelow(e.focusedKey);B!=null&&(m.preventDefault(),A(B))}break;case"PageUp":if(t.getKeyPageAbove&&e.focusedKey!=null){let B=t.getKeyPageAbove(e.focusedKey);B!=null&&(m.preventDefault(),A(B))}break;case"a":Ue(m)&&e.selectionMode==="multiple"&&a!==!0&&(m.preventDefault(),e.selectAll());break;case"Escape":!i&&e.selectedKeys.size!==0&&(m.stopPropagation(),m.preventDefault(),e.clearSelection());break;case"Tab":if(!f){if(m.shiftKey)o.current.focus();else{let B=ne(o.current,{tabbable:!0}),We,De;do De=B.lastChild(),De&&(We=De);while(De);We&&!We.contains(document.activeElement)&&pe(We)}break}}},E=s.useRef({top:0,left:0});Qe(p,"scroll",h?void 0:()=>{var m,C,A,z;E.current={top:(A=(m=p.current)===null||m===void 0?void 0:m.scrollTop)!==null&&A!==void 0?A:0,left:(z=(C=p.current)===null||C===void 0?void 0:C.scrollLeft)!==null&&z!==void 0?z:0}});let T=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 C,A;let k=le=>{le!=null&&(e.setFocusedKey(le),u&&e.replaceSelection(le))},W=m.relatedTarget;var z,H;W&&m.currentTarget.compareDocumentPosition(W)&Node.DOCUMENT_POSITION_FOLLOWING?k((z=e.lastSelectedKey)!==null&&z!==void 0?z:(C=t.getLastKey)===null||C===void 0?void 0:C.call(t)):k((H=e.firstSelectedKey)!==null&&H!==void 0?H:(A=t.getFirstKey)===null||A===void 0?void 0:A.call(t))}else!h&&p.current&&(p.current.scrollTop=E.current.top,p.current.scrollLeft=E.current.left);if(e.focusedKey!=null&&p.current){let k=p.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);k&&(k.contains(document.activeElement)||pe(k),nt()==="keyboard"&&Wo(k,{containingElement:o.current}))}}},L=m=>{m.currentTarget.contains(m.relatedTarget)||e.setFocused(!1)},K=s.useRef(!1);Qe(o,Ra,c?m=>{let{detail:C}=m;m.stopPropagation(),e.setFocused(!0),(C==null?void 0:C.focusStrategy)==="first"&&(K.current=!0)}:void 0);let $=X(()=>{var m,C;let A=(C=(m=t.getFirstKey)===null||m===void 0?void 0:m.call(t))!==null&&C!==void 0?C:null;if(A==null){var z;(z=o.current)===null||z===void 0||z.dispatchEvent(new CustomEvent(_o,{cancelable:!0,bubbles:!0})),e.collection.size>0&&(K.current=!1)}else e.setFocusedKey(A),K.current=!1});Oo(()=>{K.current&&$()},[e.collection,$]);let O=X(()=>{e.collection.size>0&&(K.current=!1)});Oo(()=>{O()},[e.focusedKey,O]),Qe(o,Qa,c?m=>{m.stopPropagation(),e.setFocused(!1),e.setFocusedKey(null)}:void 0);const v=s.useRef(l);s.useEffect(()=>{if(v.current){var m,C;let H=null;var A;l==="first"&&(H=(A=(m=t.getFirstKey)===null||m===void 0?void 0:m.call(t))!==null&&A!==void 0?A:null);var z;l==="last"&&(H=(z=(C=t.getLastKey)===null||C===void 0?void 0:C.call(t))!==null&&z!==void 0?z:null);let k=e.selectedKeys;if(k.size){for(let W of k)if(e.canSelectItem(W)){H=W;break}}e.setFocused(!0),e.setFocusedKey(H),H==null&&!c&&o.current&&Le(o.current)}},[]);let F=s.useRef(e.focusedKey);s.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==F.current||v.current)&&p.current&&o.current){let m=nt(),C=o.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!C)return;(m==="keyboard"||v.current)&&(Ho(p.current,C),m!=="virtual"&&Wo(C,{containingElement:o.current}))}!c&&e.isFocused&&e.focusedKey==null&&F.current!=null&&o.current&&Le(o.current),F.current=e.focusedKey,v.current=!1}),Qe(o,"react-aria-focus-scope-restore",m=>{m.preventDefault(),e.setFocused(!0)});let M={onKeyDown:x,onFocus:T,onBlur:L,onMouseDown(m){p.current===m.target&&m.preventDefault()}},{typeSelectProps:D}=Sr({keyboardDelegate:t,selectionManager:e});d||(M=N(D,M));let I;return c?I=-1:I=e.focusedKey==null?0:-1,{collectionProps:{...M,tabIndex:I}}}function qd(n){let{id:e,selectionManager:t,key:o,ref:l,shouldSelectOnPressUp:r,shouldUseVirtualFocus:i,focus:a,isDisabled:u,onAction:d,allowsDifferentPressOrigin:c,linkBehavior:f="action"}=n,h=Dt();e=J(e);let p=k=>{if(k.pointerType==="keyboard"&&Zn(k))t.toggleSelection(o);else{if(t.selectionMode==="none")return;if(t.isLink(o)){if(f==="selection"&&l.current){let W=t.getItemProps(o);h.open(l.current,k,W.href,W.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(f==="override"||f==="none")return}t.selectionMode==="single"?t.isSelected(o)&&!t.disallowEmptySelection?t.toggleSelection(o):t.replaceSelection(o):k&&k.shiftKey?t.extendSelection(o):t.selectionBehavior==="toggle"||k&&(Ue(k)||k.pointerType==="touch"||k.pointerType==="virtual")?t.toggleSelection(o):t.replaceSelection(o)}};s.useEffect(()=>{if(o===t.focusedKey&&t.isFocused)if(!i)a?a():document.activeElement!==l.current&&l.current&&Le(l.current);else{var W;let le=new CustomEvent(_o,{cancelable:!0,bubbles:!0});(W=l.current)===null||W===void 0||W.dispatchEvent(le)}},[l,o,t.focusedKey,t.childFocusStrategy,t.isFocused,i]),u=u||t.isDisabled(o);let g={};!i&&!u?g={tabIndex:o===t.focusedKey?0:-1,onFocus(k){k.target===l.current&&t.setFocusedKey(o)}}:u&&(g.onMouseDown=k=>{k.preventDefault()});let b=t.isLink(o)&&f==="override",y=t.isLink(o)&&f!=="selection"&&f!=="none",x=!u&&t.canSelectItem(o)&&!b,E=(d||y)&&!u,T=E&&(t.selectionBehavior==="replace"?!x:!x||t.isEmpty),L=E&&x&&t.selectionBehavior==="replace",K=T||L,$=s.useRef(null),O=K&&x,v=s.useRef(!1),F=s.useRef(!1),M=k=>{if(d&&d(),y&&l.current){let W=t.getItemProps(o);h.open(l.current,k,W.href,W.routerOptions)}},D={};r?(D.onPressStart=k=>{$.current=k.pointerType,v.current=O,k.pointerType==="keyboard"&&(!K||Fr())&&p(k)},c?(D.onPressUp=T?void 0:k=>{k.pointerType==="mouse"&&x&&p(k)},D.onPress=T?M:k=>{k.pointerType!=="keyboard"&&k.pointerType!=="mouse"&&x&&p(k)}):D.onPress=k=>{if(T||L&&k.pointerType!=="mouse"){if(k.pointerType==="keyboard"&&!Kr())return;M(k)}else k.pointerType!=="keyboard"&&x&&p(k)}):(D.onPressStart=k=>{$.current=k.pointerType,v.current=O,F.current=T,x&&(k.pointerType==="mouse"&&!T||k.pointerType==="keyboard"&&(!E||Fr()))&&p(k)},D.onPress=k=>{(k.pointerType==="touch"||k.pointerType==="pen"||k.pointerType==="virtual"||k.pointerType==="keyboard"&&K&&Kr()||k.pointerType==="mouse"&&F.current)&&(K?M(k):x&&p(k))}),g["data-key"]=o,D.preventFocusOnPress=i;let{pressProps:I,isPressed:m}=Se(D),C=L?k=>{$.current==="mouse"&&(k.stopPropagation(),k.preventDefault(),M(k))}:void 0,{longPressProps:A}=dl({isDisabled:!O,onLongPress(k){k.pointerType==="touch"&&(p(k),t.setSelectionBehavior("toggle"))}}),z=k=>{$.current==="touch"&&v.current&&k.preventDefault()},H=t.isLink(o)?k=>{$e.isOpening||k.preventDefault()}:void 0;return{itemProps:N(g,x||T?I:{},O?A:{},{onDoubleClick:C,onDragStartCapture:z,onClick:H,id:e}),isPressed:m,isSelected:t.isSelected(o),isFocused:t.isFocused&&t.focusedKey===o,isDisabled:u,allowsSelection:x,hasAction:K}}function Kr(){let n=window.event;return(n==null?void 0:n.key)==="Enter"}function Fr(){let n=window.event;return(n==null?void 0:n.key)===" "||(n==null?void 0:n.code)==="Space"}class Mr{getItemRect(e){let t=this.ref.current;if(!t)return null;let o=e!=null?t.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null;if(!o)return null;let l=t.getBoundingClientRect(),r=o.getBoundingClientRect();return{x:r.left-l.left+t.scrollLeft,y:r.top-l.top+t.scrollTop,width:r.width,height:r.height}}getContentSize(){let e=this.ref.current;var t,o;return{width:(t=e==null?void 0:e.scrollWidth)!==null&&t!==void 0?t:0,height:(o=e==null?void 0:e.scrollHeight)!==null&&o!==void 0?o:0}}getVisibleRect(){let e=this.ref.current;var t,o,l,r;return{x:(t=e==null?void 0:e.scrollLeft)!==null&&t!==void 0?t:0,y:(o=e==null?void 0:e.scrollTop)!==null&&o!==void 0?o:0,width:(l=e==null?void 0:e.offsetWidth)!==null&&l!==void 0?l:0,height:(r=e==null?void 0:e.offsetHeight)!==null&&r!==void 0?r:0}}constructor(e){this.ref=e}}class Yn{isDisabled(e){var t;return this.disabledBehavior==="all"&&(((t=e.props)===null||t===void 0?void 0:t.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){let o=e;for(;o!=null;){let l=this.collection.getItem(o);if((l==null?void 0:l.type)==="item"&&!this.isDisabled(l))return o;o=t(o)}return null}getNextKey(e){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,o=>this.collection.getKeyAfter(o))}getPreviousKey(e){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,o=>this.collection.getKeyBefore(o))}findKey(e,t,o){let l=e,r=this.layoutDelegate.getItemRect(l);if(!r||l==null)return null;let i=r;do{if(l=t(l),l==null)break;r=this.layoutDelegate.getItemRect(l)}while(r&&o(i,r)&&l!=null);return l}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,t=>this.getNextKey(t),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,t=>this.getPreviousKey(t),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let t=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[t](o))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,o=>this.getNextColumn(o,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let t=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[t](o))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,o=>this.getNextColumn(o,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,t=>this.collection.getKeyAfter(t))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,t=>this.collection.getKeyBefore(t))}getKeyPageAbove(e){let t=this.ref.current,o=this.layoutDelegate.getItemRect(e);if(!o)return null;if(t&&!Je(t))return this.getFirstKey();let l=e;if(this.orientation==="horizontal"){let r=Math.max(0,o.x+o.width-this.layoutDelegate.getVisibleRect().width);for(;o&&o.x>r&&l!=null;)l=this.getKeyAbove(l),o=l==null?null:this.layoutDelegate.getItemRect(l)}else{let r=Math.max(0,o.y+o.height-this.layoutDelegate.getVisibleRect().height);for(;o&&o.y>r&&l!=null;)l=this.getKeyAbove(l),o=l==null?null:this.layoutDelegate.getItemRect(l)}return l??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,o=this.layoutDelegate.getItemRect(e);if(!o)return null;if(t&&!Je(t))return this.getLastKey();let l=e;if(this.orientation==="horizontal"){let r=Math.min(this.layoutDelegate.getContentSize().width,o.y-o.width+this.layoutDelegate.getVisibleRect().width);for(;o&&o.x<r&&l!=null;)l=this.getKeyBelow(l),o=l==null?null:this.layoutDelegate.getItemRect(l)}else{let r=Math.min(this.layoutDelegate.getContentSize().height,o.y-o.height+this.layoutDelegate.getVisibleRect().height);for(;o&&o.y<r&&l!=null;)l=this.getKeyBelow(l),o=l==null?null:this.layoutDelegate.getItemRect(l)}return l??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let o=this.collection,l=t||this.getFirstKey();for(;l!=null;){let r=o.getItem(l);if(!r)return null;let i=r.textValue.slice(0,e.length);if(r.textValue&&this.collator.compare(i,e)===0)return l;l=this.getNextKey(l)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||"all",this.orientation=t.orientation||"vertical",this.direction=t.direction,this.layout=t.layout||"stack",this.layoutDelegate=t.layoutDelegate||new Mr(t.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 Mr(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function Zd(n){let{selectionManager:e,collection:t,disabledKeys:o,ref:l,keyboardDelegate:r,layoutDelegate:i}=n,a=An({usage:"search",sensitivity:"base"}),u=e.disabledBehavior,d=s.useMemo(()=>r||new Yn({collection:t,disabledKeys:o,disabledBehavior:u,ref:l,collator:a,layoutDelegate:i}),[r,i,t,o,l,a,u]),{collectionProps:c}=Gd({...n,ref:l,selectionManager:e,keyboardDelegate:d});return{listProps:c}}function Yd(n,e,t){let o=Z(n,{labelable:!0}),l=n.selectionBehavior||"toggle",r=n.linkBehavior||(l==="replace"?"action":"override");l==="toggle"&&r==="action"&&(r="override");let{listProps:i}=Zd({...n,ref:t,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,linkBehavior:r}),{focusWithinProps:a}=At({onFocusWithin:n.onFocus,onBlurWithin:n.onBlur,onFocusWithinChange:n.onFocusChange}),u=J(n.id);qn.set(e,{id:u,shouldUseVirtualFocus:n.shouldUseVirtualFocus,shouldSelectOnPressUp:n.shouldSelectOnPressUp,shouldFocusOnHover:n.shouldFocusOnHover,isVirtualized:n.isVirtualized,onAction:n.onAction,linkBehavior:r});let{labelProps:d,fieldProps:c}=Hn({...n,id:u,labelElementType:"span"});return{labelProps:d,listBoxProps:N(o,a,e.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...N(c,i)})}}class Xd{build(e,t){return this.context=t,Lr(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:o}=e;if(s.isValidElement(t)&&t.type===s.Fragment)yield*this.iterateCollection({children:t.props.children,items:o});else if(typeof t=="function"){if(!o)throw new Error("props.children was a function but props.items is missing");let l=0;for(let r of o)yield*this.getFullNode({value:r,index:l},{renderer:t}),l++}else{let l=[];s.Children.forEach(t,i=>{i&&l.push(i)});let r=0;for(let i of l){let a=this.getFullNode({element:i,index:r},{});for(let u of a)r++,yield u}}}getKey(e,t,o,l){if(e.key!=null)return e.key;if(t.type==="cell"&&t.key!=null)return`${l}${t.key}`;let r=t.value;if(r!=null){var i;let a=(i=r.key)!==null&&i!==void 0?i:r.id;if(a==null)throw new Error("No key found for item");return a}return l?`${l}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,o,l){if(s.isValidElement(e.element)&&e.element.type===s.Fragment){let y=[];s.Children.forEach(e.element.props.children,E=>{y.push(E)});var r;let x=(r=e.index)!==null&&r!==void 0?r:0;for(const E of y)yield*this.getFullNode({element:E,index:x++},t,o,l);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let y=this.cache.get(e.value);if(y&&(!y.shouldInvalidate||!y.shouldInvalidate(this.context))){y.index=e.index,y.parentKey=l?l.key:null,yield y;return}i=t.renderer(e.value)}if(s.isValidElement(i)){let y=i.type;if(typeof y!="function"&&typeof y.getCollectionNode!="function"){let L=i.type;throw new Error(`Unknown element <${L}> in collection.`)}let x=y.getCollectionNode(i.props,this.context);var a;let E=(a=e.index)!==null&&a!==void 0?a:0,T=x.next();for(;!T.done&&T.value;){let L=T.value;e.index=E;var u;let K=(u=L.key)!==null&&u!==void 0?u:null;K==null&&(K=L.element?null:this.getKey(i,e,t,o));let O=[...this.getFullNode({...L,key:K,index:E,wrapper:Jd(e.wrapper,L.wrapper)},this.getChildState(t,L),o?`${o}${i.key}`:i.key,l)];for(let v of O){var d,c;v.value=(c=(d=L.value)!==null&&d!==void 0?d:e.value)!==null&&c!==void 0?c:null,v.value&&this.cache.set(v.value,v);var f;if(e.type&&v.type!==e.type)throw new Error(`Unsupported type <${Xn(v.type)}> in <${Xn((f=l==null?void 0:l.type)!==null&&f!==void 0?f:"unknown parent type")}>. Only <${Xn(e.type)}> is supported.`);E++,yield v}T=x.next(O)}return}if(e.key==null||e.type==null)return;let h=this;var p,g;let b={type:e.type,props:e.props,key:e.key,parentKey:l?l.key:null,value:(p=e.value)!==null&&p!==void 0?p:null,level:l?l.level+1:0,index:e.index,rendered:e.rendered,textValue:(g=e.textValue)!==null&&g!==void 0?g:"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Lr(function*(){if(!e.hasChildNodes||!e.childNodes)return;let y=0;for(let x of e.childNodes()){x.key!=null&&(x.key=`${b.key}${x.key}`);let E=h.getFullNode({...x,index:y},h.getChildState(t,x),b.key,b);for(let T of E)y++,yield T}})};yield b}constructor(){this.cache=new WeakMap}}function Lr(n){let e=[],t=null;return{*[Symbol.iterator](){for(let o of e)yield o;t||(t=n());for(let o of t)e.push(o),yield o}}}function Jd(n,e){if(n&&e)return t=>n(e(t));if(n)return n;if(e)return e}function Xn(n){return n[0].toUpperCase()+n.slice(1)}function Qd(n,e,t){let o=s.useMemo(()=>new Xd,[]),{children:l,items:r,collection:i}=n;return s.useMemo(()=>{if(i)return i;let u=o.build({children:l,items:r},t);return e(u)},[o,l,r,i,t,e])}function Ar(n,e){return typeof e.getChildren=="function"?e.getChildren(n.key):n.childNodes}function Rd(n){return ec(n)}function ec(n,e){for(let t of n)return t}function Jn(n,e,t){if(e.parentKey===t.parentKey)return e.index-t.index;let o=[...Ir(n,e),e],l=[...Ir(n,t),t],r=o.slice(0,l.length).findIndex((i,a)=>i!==l[a]);return r!==-1?(e=o[r],t=l[r],e.index-t.index):o.findIndex(i=>i===t)>=0?1:(l.findIndex(i=>i===e)>=0,-1)}function Ir(n,e){let t=[],o=e;for(;(o==null?void 0:o.parentKey)!=null;)o=n.getItem(o.parentKey),o&&t.unshift(o);return t}const Br=new WeakMap;function tc(n){let e=Br.get(n);if(e!=null)return e;let t=0,o=l=>{for(let r of l)r.type==="section"?o(Ar(r,n)):t++};return o(n),Br.set(n,t),t}function nc(n,e,t){var o,l;let{key:r}=n,i=qn.get(e);var a;let u=(a=n.isDisabled)!==null&&a!==void 0?a:e.selectionManager.isDisabled(r);var d;let c=(d=n.isSelected)!==null&&d!==void 0?d:e.selectionManager.isSelected(r);var f;let h=(f=n.shouldSelectOnPressUp)!==null&&f!==void 0?f:i==null?void 0:i.shouldSelectOnPressUp;var p;let g=(p=n.shouldFocusOnHover)!==null&&p!==void 0?p:i==null?void 0:i.shouldFocusOnHover;var b;let y=(b=n.shouldUseVirtualFocus)!==null&&b!==void 0?b:i==null?void 0:i.shouldUseVirtualFocus;var x;let E=(x=n.isVirtualized)!==null&&x!==void 0?x:i==null?void 0:i.isVirtualized,T=Xe(),L=Xe(),K={role:"option","aria-disabled":u||void 0,"aria-selected":e.selectionManager.selectionMode!=="none"?c:void 0};Pe()&&ln()||(K["aria-label"]=n["aria-label"],K["aria-labelledby"]=T,K["aria-describedby"]=L);let $=e.collection.getItem(r);if(E){let H=Number($==null?void 0:$.index);K["aria-posinset"]=Number.isNaN(H)?void 0:H+1,K["aria-setsize"]=tc(e.collection)}let O=i!=null&&i.onAction?()=>{var H;return i==null||(H=i.onAction)===null||H===void 0?void 0:H.call(i,r)}:void 0,v=_d(e,r),{itemProps:F,isPressed:M,isFocused:D,hasAction:I,allowsSelection:m}=qd({selectionManager:e.selectionManager,key:r,ref:t,shouldSelectOnPressUp:h,allowsDifferentPressOrigin:h&&g,isVirtualized:E,shouldUseVirtualFocus:y,isDisabled:u,onAction:O||!($==null||(o=$.props)===null||o===void 0)&&o.onAction?xe($==null||(l=$.props)===null||l===void 0?void 0:l.onAction,O):void 0,linkBehavior:i==null?void 0:i.linkBehavior,id:v}),{hoverProps:C}=Me({isDisabled:u||!g,onHoverStart(){tt()||(e.selectionManager.setFocused(!0),e.selectionManager.setFocusedKey(r))}}),A=Z($==null?void 0:$.props);delete A.id;let z=Lo($==null?void 0:$.props);return{optionProps:{...K,...N(A,F,C,z),id:v},labelProps:{id:T},descriptionProps:{id:L},isFocused:D,isFocusVisible:D&&tt(),isSelected:c,isDisabled:u,isPressed:M,allowsSelection:m,hasAction:I}}function oc(n){let{heading:e,"aria-label":t}=n,o=J();return{itemProps:{role:"presentation"},headingProps:e?{id:o,role:"presentation"}:{},groupProps:{role:"group","aria-label":t,"aria-labelledby":e?o:void 0}}}var Nr={};Nr={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Or={};Or={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var zr={};zr={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Hr={};Hr={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var Vr={};Vr={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var Wr={};Wr={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var _r={};_r={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Ur={};Ur={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var jr={};jr={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Gr={};Gr={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var qr={};qr={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var Zr={};Zr={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Yr={};Yr={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Xr={};Xr={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Jr={};Jr={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var Qr={};Qr={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var Rr={};Rr={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var ei={};ei={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var ti={};ti={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var ni={};ni={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var oi={};oi={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var li={};li={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var ri={};ri={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var ii={};ii={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var si={};si={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var ai={};ai={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var ui={};ui={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var di={};di={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var ci={};ci={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var fi={};fi={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var pi={};pi={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var vi={};vi={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var hi={};hi={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var gi={};gi={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var mi={};mi={"ar-AE":Nr,"bg-BG":Or,"cs-CZ":zr,"da-DK":Hr,"de-DE":Vr,"el-GR":Wr,"en-US":_r,"es-ES":Ur,"et-EE":jr,"fi-FI":Gr,"fr-FR":qr,"he-IL":Zr,"hr-HR":Yr,"hu-HU":Xr,"it-IT":Jr,"ja-JP":Qr,"ko-KR":Rr,"lt-LT":ei,"lv-LV":ti,"nb-NO":ni,"nl-NL":oi,"pl-PL":li,"pt-BR":ri,"pt-PT":ii,"ro-RO":si,"ru-RU":ai,"sk-SK":ui,"sl-SI":di,"sr-SP":ci,"sv-SE":fi,"tr-TR":pi,"uk-UA":vi,"zh-CN":hi,"zh-TW":gi};function lc(n){return n&&n.__esModule?n.default:n}function rc(n,e,t){let{type:o="menu",isDisabled:l,trigger:r="press"}=n,i=J(),{triggerProps:a,overlayProps:u}=Ul({type:o},e,t),d=p=>{if(!l&&!(r==="longPress"&&!p.altKey)&&t&&t.current)switch(p.key){case"Enter":case" ":if(r==="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=Kn(lc(mi),"@react-aria/menu"),{longPressProps:f}=dl({isDisabled:l||r!=="longPress",accessibilityDescription:c.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),h={onPressStart(p){p.pointerType!=="touch"&&p.pointerType!=="keyboard"&&!l&&e.open(p.pointerType==="virtual"?"first":null)},onPress(p){p.pointerType==="touch"&&!l&&e.toggle()}};return delete a.onPress,{menuTriggerProps:{...a,...r==="press"?h:f,id:i,onKeyDown:d},menuProps:{...u,"aria-labelledby":i,autoFocus:e.focusStrategy||!0,onClose:e.close}}}function ic(n,e){let{role:t="dialog"}=n,o=Xe();o=n["aria-label"]?void 0:o;let l=s.useRef(!1);return s.useEffect(()=>{if(e.current&&!e.current.contains(document.activeElement)){Le(e.current);let r=setTimeout(()=>{document.activeElement===e.current&&(l.current=!0,e.current&&(e.current.blur(),Le(e.current)),l.current=!1)},500);return()=>{clearTimeout(r)}}},[e]),Vd(),{dialogProps:{...Z(n,{labelable:!0}),role:t,tabIndex:-1,"aria-labelledby":n["aria-labelledby"]||o,onBlur:r=>{l.current&&r.stopPropagation()}},titleProps:{id:o}}}function sc(n,e,t){let{isDisabled:o}=n,l=J(),r=J(),a=!be()&&"onbeforematch"in document.body,u=s.useRef(null),d=s.useCallback(()=>{u.current=requestAnimationFrame(()=>{t.current&&t.current.setAttribute("hidden","until-found")}),ke.flushSync(()=>{e.toggle()})},[t,e]);return Qe(t,"beforematch",a?d:null),V(()=>{u.current&&cancelAnimationFrame(u.current),a&&t.current&&!o&&(e.isExpanded?t.current.removeAttribute("hidden"):t.current.setAttribute("hidden","until-found"))},[o,t,e.isExpanded,a]),s.useEffect(()=>()=>{u.current&&cancelAnimationFrame(u.current)},[]),{buttonProps:{id:l,"aria-expanded":e.isExpanded,"aria-controls":r,onPress:c=>{!o&&c.pointerType!=="keyboard"&&e.toggle()},isDisabled:o,onPressStart(c){c.pointerType==="keyboard"&&!o&&e.toggle()}},panelProps:{id:r,role:"group","aria-labelledby":l,"aria-hidden":!e.isExpanded,hidden:a?!0:!e.isExpanded}}}function ac(n){let{value:e=0,minValue:t=0,maxValue:o=100,valueLabel:l,isIndeterminate:r,formatOptions:i={style:"percent"}}=n,a=Z(n,{labelable:!0}),{labelProps:u,fieldProps:d}=Hn({...n,labelElementType:"span"});e=kt(e,t,o);let c=(e-t)/(o-t),f=Ru(i);if(!r&&!l){let h=i.style==="percent"?c:e;l=f.format(h)}return{progressBarProps:N(a,{...d,"aria-valuenow":r?void 0:e,"aria-valuemin":t,"aria-valuemax":o,"aria-valuetext":r?void 0:l,role:"progressbar"}),labelProps:u}}const bi=new WeakMap;function uc(n,e,t){let{keyboardDelegate:o,isDisabled:l,isRequired:r,name:i,validationBehavior:a="aria"}=n,u=An({usage:"search",sensitivity:"base"}),d=s.useMemo(()=>o||new Yn(e.collection,e.disabledKeys,t,u),[o,e.collection,e.disabledKeys,u]),{menuTriggerProps:c,menuProps:f}=rc({isDisabled:l,type:"listbox"},e,t),h=v=>{switch(v.key){case"ArrowLeft":{var F,M;v.preventDefault();let m=e.selectedKey!=null?(F=d.getKeyAbove)===null||F===void 0?void 0:F.call(d,e.selectedKey):(M=d.getFirstKey)===null||M===void 0?void 0:M.call(d);m&&e.setSelectedKey(m);break}case"ArrowRight":{var D,I;v.preventDefault();let m=e.selectedKey!=null?(D=d.getKeyBelow)===null||D===void 0?void 0:D.call(d,e.selectedKey):(I=d.getFirstKey)===null||I===void 0?void 0:I.call(d);m&&e.setSelectedKey(m);break}}},{typeSelectProps:p}=Sr({keyboardDelegate:d,selectionManager:e.selectionManager,onTypeSelect(v){e.setSelectedKey(v)}}),{isInvalid:g,validationErrors:b,validationDetails:y}=e.displayValidation,{labelProps:x,fieldProps:E,descriptionProps:T,errorMessageProps:L}=Vn({...n,labelElementType:"span",isInvalid:g,errorMessage:n.errorMessage||b});p.onKeyDown=p.onKeyDownCapture,delete p.onKeyDownCapture;let K=Z(n,{labelable:!0}),$=N(p,c,E),O=J();return bi.set(e,{isDisabled:l,isRequired:r,name:i,validationBehavior:a}),{labelProps:{...x,onClick:()=>{if(!n.isDisabled){var v;(v=t.current)===null||v===void 0||v.focus(),sl("keyboard")}}},triggerProps:N(K,{...$,isDisabled:l,onKeyDown:xe($.onKeyDown,h,n.onKeyDown),onKeyUp:n.onKeyUp,"aria-labelledby":[O,$["aria-labelledby"],$["aria-label"]&&!$["aria-labelledby"]?$.id:null].filter(Boolean).join(" "),onFocus(v){e.isFocused||(n.onFocus&&n.onFocus(v),n.onFocusChange&&n.onFocusChange(!0),e.setFocused(!0))},onBlur(v){e.isOpen||(n.onBlur&&n.onBlur(v),n.onFocusChange&&n.onFocusChange(!1),e.setFocused(!1))}}),valueProps:{id:O},menuProps:{...f,autoFocus:e.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:v=>{v.currentTarget.contains(v.relatedTarget)||(n.onBlur&&n.onBlur(v),n.onFocusChange&&n.onFocusChange(!1),e.setFocused(!1))},"aria-labelledby":[E["aria-labelledby"],$["aria-label"]&&!E["aria-labelledby"]?$.id:null].filter(Boolean).join(" ")},descriptionProps:T,errorMessageProps:L,isInvalid:g,validationErrors:b,validationDetails:y}}function dc(n,e,t){let o=bi.get(e)||{},{autoComplete:l,name:r=o.name,isDisabled:i=o.isDisabled}=n,{validationBehavior:a,isRequired:u}=o,{visuallyHiddenProps:d}=Ll();fn(n.selectRef,e.selectedKey,e.setSelectedKey),zn({validationBehavior:a,focus:()=>{var f;return(f=t.current)===null||f===void 0?void 0:f.focus()}},e,n.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:l,disabled:i,required:a==="native"&&u,name:r,value:(c=e.selectedKey)!==null&&c!==void 0?c:"",onChange:f=>e.setSelectedKey(f.target.value)}}}function cc(n){let{state:e,triggerRef:t,label:o,name:l,isDisabled:r}=n,i=s.useRef(null),{containerProps:a,selectProps:u}=dc({...n,selectRef:i},e,t);var d;return e.collection.size<=300?s.createElement("div",{...a,"data-testid":"hidden-select-container"},s.createElement("label",null,o,s.createElement("select",{...u,ref:i},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)})))):l?s.createElement("input",{type:"hidden",autoComplete:u.autoComplete,name:l,disabled:r,value:(d=e.selectedKey)!==null&&d!==void 0?d:""}):null}function fc(n,e){let t=Z(n,{labelable:!0}),{hoverProps:o}=Me({onHoverStart:()=>e==null?void 0:e.open(!0),onHoverEnd:()=>e==null?void 0:e.close()});return{tooltipProps:N(t,o,{role:"tooltip"})}}function pc(n,e,t){let{isDisabled:o,trigger:l}=n,r=J(),i=s.useRef(!1),a=s.useRef(!1),u=()=>{(i.current||a.current)&&e.open(a.current)},d=x=>{!i.current&&!a.current&&e.close(x)};s.useEffect(()=>{let x=E=>{t&&t.current&&E.key==="Escape"&&(E.stopPropagation(),e.close(!0))};if(e.isOpen)return document.addEventListener("keydown",x,!0),()=>{document.removeEventListener("keydown",x,!0)}},[t,e]);let c=()=>{l!=="focus"&&(nt()==="pointer"?i.current=!0:i.current=!1,u())},f=()=>{l!=="focus"&&(a.current=!1,i.current=!1,d())},h=()=>{a.current=!1,i.current=!1,d(!0)},p=()=>{tt()&&(a.current=!0,u())},g=()=>{a.current=!1,i.current=!1,d(!0)},{hoverProps:b}=Me({isDisabled:o,onHoverStart:c,onHoverEnd:f}),{focusableProps:y}=Ge({isDisabled:o,onFocus:p,onBlur:g},t);return{triggerProps:{"aria-describedby":e.isOpen?r:void 0,...N(y,b,{onPointerDown:h,onKeyDown:h})},tooltipProps:{id:r}}}const Be=P.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:"error"},neutral:{colorPalette:"neutral"},info:{colorPalette:"info"}}},defaultVariants:{size:"md",variant:"subtle"}}),{withContext:vc}=P.createRecipeContext({recipe:Be}),hc=vc("button",{defaultProps:{type:"button"},shouldForwardProp(n,e){const t=!(e!=null&&e.includes(n))&&!P.defaultSystem.isValidProperty(n);return va(n)&&t&&!n.includes("onPress")}}),Ut=s.forwardRef((n,e)=>{const{as:t,asChild:o,children:l,...r}=n,i=s.useRef(null),a=te(P.mergeRefs(i,e)),u=t||(o?"a":"button")||"button",{buttonProps:d}=Ht({...r,elementType:u},a);return w.jsx(hc,{...N(r,d,{as:t,asChild:o,ref:a}),children:l})});Ut.displayName="Button";const gc=s.forwardRef(function(e,t){const{children:o,portalled:l=!0,portalRef:r,backdrop:i=!0,...a}=e;return w.jsxs(P.Portal,{disabled:!l,container:r,children:[i&&w.jsx(P.Dialog.Backdrop,{}),w.jsx(P.Dialog.Positioner,{children:w.jsx(P.Dialog.Content,{ref:t,...a,asChild:!1,children:o})})]})}),mc=s.forwardRef(function(e,t){return w.jsx(P.Dialog.CloseTrigger,{position:"absolute",top:"2",insetEnd:"2",...e,asChild:!0,children:w.jsx(Ut,{size:"xs",ref:t,children:e.children})})}),bc=P.Dialog.Root,yc=P.Dialog.Footer,xc=P.Dialog.Header,Pc=P.Dialog.Body,wc=P.Dialog.Backdrop,Cc=P.Dialog.Title,Ec=P.Dialog.Description,Tc=P.Dialog.Trigger,Dc=P.Dialog.ActionTrigger,at=s.forwardRef(({children:n,...e},t)=>w.jsx(Ut,{px:0,py:0,ref:t,...e,children:n}));at.displayName="IconButton";const yi=P.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:kc}=P.createRecipeContext({recipe:yi}),$c=kc("a"),xi=s.forwardRef((n,e)=>{const{as:t,asChild:o,children:l,...r}=n,i=s.useRef(null),a=te(P.mergeRefs(i,e)),u=t||(o?"span":"a")||"a",{linkProps:d}=Bu({...r,elementType:u},a);return w.jsx($c,{...N(r,d,{as:t,asChild:o,ref:a}),children:l})});xi.displayName="Link";const Sc=n=>w.jsx(P.List.Root,{...n}),Kc=n=>w.jsx(P.List.Item,{...n}),Pi=s.forwardRef((n,e)=>w.jsx(P.SimpleGrid,{ref:e,...n}));Pi.displayName="SimpleGrid";const Fc=Object.assign(Pi,{Item:P.GridItem}),Mc=n=>w.jsx(P.Table.Root,{...n}),Lc=n=>w.jsx(P.Table.ColumnGroup,{...n}),Ac=n=>w.jsx(P.Table.Column,{...n}),Ic=n=>w.jsx(P.Table.Header,{...n}),Bc=n=>w.jsx(P.Table.Footer,{...n}),Nc=n=>w.jsx(P.Table.Row,{...n}),Oc=n=>w.jsx(P.Table.Cell,{...n}),zc=n=>w.jsx(P.Table.Body,{...n}),Hc=n=>w.jsx(P.Table.ColumnHeader,{...n}),wi=s.forwardRef((n,e)=>w.jsx(P.Text,{ref:e,...n}));wi.displayName="Text",s.createContext(null),s.createContext(null),s.createContext(null),s.createContext(null),s.createContext(null);const Vc=s.createContext({}),jt=Symbol("default");function Ne({values:n,children:e}){for(let[t,o]of n)e=s.createElement(t.Provider,{value:o},e);return e}function R(n){let{className:e,style:t,children:o,defaultClassName:l,defaultChildren:r,defaultStyle:i,values:a}=n;return s.useMemo(()=>{let u,d,c;return typeof e=="function"?u=e({...a,defaultClassName:l}):u=e,typeof t=="function"?d=t({...a,defaultStyle:i||{}}):d=t,typeof o=="function"?c=o({...a,defaultChildren:r}):o==null?c=r:c=o,{className:u??l,style:d||i?{...i,...d}:void 0,children:c??r,"data-rac":""}},[e,t,o,l,r,i,a])}function Gt(n,e){let t=s.useContext(n);if(e===null)return null;if(t&&typeof t=="object"&&"slots"in t&&t.slots){let o=new Intl.ListFormat().format(Object.keys(t.slots).map(r=>`"${r}"`));if(!e&&!t.slots[jt])throw new Error(`A slot prop is required. Valid slot names are ${o}.`);let l=e||jt;if(!t.slots[l])throw new Error(`Invalid slot "${e}". Valid slot names are ${o}.`);return t.slots[l]}return t}function oe(n,e,t){let o=Gt(t,n.slot)||{},{ref:l,...r}=o,i=te(s.useMemo(()=>Ko(e,l),[e,l])),a=N(r,n);return"style"in r&&r.style&&"style"in n&&n.style&&(typeof r.style=="function"||typeof n.style=="function"?a.style=u=>{let d=typeof r.style=="function"?r.style(u):r.style,c={...u.defaultStyle,...d},f=typeof n.style=="function"?n.style({...u,defaultStyle:c}):n.style;return{...c,...f}}:a.style={...r.style,...n.style}),[a,i]}function Qn(){let[n,e]=s.useState(!0),t=s.useRef(!1),o=s.useCallback(l=>{t.current=!0,e(!!l)},[]);return V(()=>{t.current||e(!1)},[]),[o,n]}function Ci(n){const e=/^(data-.*)$/;let t={};for(const o in n)e.test(o)||(t[o]=n[o]);return t}class Rn{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new Rn(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}constructor(e,t){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.type=e,this.key=t}}class eo{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 t=this.keyMap;return{*[Symbol.iterator](){let o=t.get(e),l=(o==null?void 0:o.firstChildKey)!=null?t.get(o.firstChildKey):null;for(;l;)yield l,l=l.nextKey!=null?t.get(l.nextKey):void 0}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!=="item"&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);var o;return(o=t==null?void 0:t.key)!==null&&o!==void 0?o:null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!=="item"&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.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 t;return(t=e==null?void 0:e.key)!==null&&t!==void 0?t:null}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t}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,t,o=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=t,this.frozen=!o}filter(e){let t=new eo,o=null;for(let l of this)if(l.type==="section"&&l.hasChildNodes){let r=l.clone(),i=null;for(let a of this.getChildren(l.key))if(e(a.textValue)||a.type==="header"){let u=a.clone();i==null&&(r.firstChildKey=u.key),t.firstKey==null&&(t.firstKey=r.key),i&&i.parentKey===u.parentKey?(i.nextKey=u.key,u.prevKey=i.key):u.prevKey=null,u.nextKey=null,t.addNode(u),i=u}i&&(i.type!=="header"?(r.lastChildKey=i.key,o==null?r.prevKey=null:(o.type==="section"||o.type==="separator")&&(o.nextKey=r.key,r.prevKey=o.key),r.nextKey=null,o=r,t.addNode(r)):(t.firstKey===r.key&&(t.firstKey=null),t.removeNode(i.key)))}else if(l.type==="separator"){let r=l.clone();r.nextKey=null,(o==null?void 0:o.type)==="section"&&(o.nextKey=r.key,r.prevKey=o.key,o=r,t.addNode(r))}else if(e(l.textValue)){let r=l.clone();t.firstKey==null&&(t.firstKey=r.key),o!=null&&o.type!=="section"&&o.type!=="separator"&&o.parentKey===r.parentKey?(o.nextKey=r.key,r.prevKey=o.key):r.prevKey=null,r.nextKey=null,t.addNode(r),o=r}if((o==null?void 0:o.type)==="separator"&&o.nextKey===null){let l;o.prevKey!=null&&(l=t.getItem(o.prevKey),l.nextKey=null),t.removeNode(o.key),o=l}return t.lastKey=(o==null?void 0:o.key)||null,t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class Ei{*[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}appendChild(e){this.ownerDocument.startTransaction(),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),e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode;let o=t;for(;o;)o.index++,o=o.nextSibling;e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(e){if(e.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let t=e.nextSibling;for(;t;)t.index--,t=t.nextSibling;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.removeNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=e}}class ut extends Ei{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof ut?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var e,t,o,l;let r=this.ownerDocument.getMutableNode(this);r.index=this.index,r.level=this.level,r.parentKey=this.parentNode instanceof ut?this.parentNode.node.key:null;var i;r.prevKey=(i=(e=this.previousSibling)===null||e===void 0?void 0:e.node.key)!==null&&i!==void 0?i:null;var a;r.nextKey=(a=(t=this.nextSibling)===null||t===void 0?void 0:t.node.key)!==null&&a!==void 0?a:null,r.hasChildNodes=!!this.firstChild;var u;r.firstChildKey=(u=(o=this.firstChild)===null||o===void 0?void 0:o.node.key)!==null&&u!==void 0?u:null;var d;r.lastChildKey=(d=(l=this.lastChild)===null||l===void 0?void 0:l.node.key)!==null&&d!==void 0?d:null}setProps(e,t,o,l){let r=this.ownerDocument.getMutableNode(this),{value:i,textValue:a,id:u,...d}=e;if(d.ref=t,r.props=d,r.rendered=o,r.render=l,r.value=i,r.textValue=a||(typeof d.children=="string"?d.children:"")||e["aria-label"]||"",u!=null&&u!==r.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");r.key=u}this.hasSetProps||(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),this.hasSetProps=!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new Rn(e,`react-aria-${++t.nodeId}`),this.ownerDocument.startTransaction()}}class Wc extends Ei{get isConnected(){return this.isMounted}createElement(e){return new ut(e,this)}getMutableNode(e){let t=e.node;return this.mutatedNodes.has(e)||(t=e.node.clone(),this.mutatedNodes.add(e),e.node=t),this.markDirty(e),t}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(e){this.dirtyNodes.add(e)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(e){let t=this.getMutableCollection();if(!t.getItem(e.node.key)){t.addNode(e.node);for(let o of e)this.addNode(o)}this.markDirty(e)}removeNode(e){for(let o of e)this.removeNode(o);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0?this.collection:(this.updateCollection(),this.collection)}updateCollection(){for(let r of this.dirtyNodes)r instanceof ut&&r.isConnected&&r.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,t;let r=this.getMutableCollection();for(let i of this.mutatedNodes)i.isConnected&&r.addNode(i.node);var o,l;r.commit((o=(e=this.firstChild)===null||e===void 0?void 0:e.node.key)!==null&&o!==void 0?o:null,(l=(t=this.lastChild)===null||t===void 0?void 0:t.node.key)!==null&&l!==void 0?l:null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let e of this.subscriptions)e()}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.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=e,this.collectionMutated=!0}}function Ti(n){let{children:e,items:t,idScope:o,addIdAndValue:l,dependencies:r=[]}=n,i=s.useMemo(()=>new WeakMap,r);return s.useMemo(()=>{if(t&&typeof e=="function"){let d=[];for(let c of t){let f=i.get(c);if(!f){f=e(c);var a,u;let h=(u=(a=f.props.id)!==null&&a!==void 0?a:c.key)!==null&&u!==void 0?u:c.id;if(h==null)throw new Error("Could not determine key for item");o&&(h=o+":"+h),f=s.cloneElement(f,l?{key:h,id:h,value:c}:{key:h}),i.set(c,f)}d.push(f)}return d}else if(typeof e!="function")return e},[e,t,i,o,l])}if(typeof HTMLTemplateElement<"u"){const n=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:n.call(this)}})}const qt=s.createContext(!1),_c=typeof DocumentFragment<"u"?new DocumentFragment:null;function Uc(n){let e=s.useContext(qt),t=be();if(e)return s.createElement(s.Fragment,null,n.children);let o=s.createElement(qt.Provider,{value:!0},n.children);return t?s.createElement("template",{"data-react-aria-hidden":!0},o):ke.createPortal(o,_c)}function Di(n){let e=(t,o)=>s.useContext(qt)?null:n(t,o);return e.displayName=n.displayName||n.name,s.forwardRef(e)}function jc(){return s.useContext(qt)}var Zt={exports:{}},to={};/**
2
- * @license React
3
- * use-sync-external-store-shim.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var ki;function Gc(){if(ki)return to;ki=1;var n=s;function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var t=typeof Object.is=="function"?Object.is:e,o=n.useState,l=n.useEffect,r=n.useLayoutEffect,i=n.useDebugValue;function a(f,h){var p=h(),g=o({inst:{value:p,getSnapshot:h}}),b=g[0].inst,y=g[1];return r(function(){b.value=p,b.getSnapshot=h,u(b)&&y({inst:b})},[f,p,h]),l(function(){return u(b)&&y({inst:b}),f(function(){u(b)&&y({inst:b})})},[f]),i(p),p}function u(f){var h=f.getSnapshot;f=f.value;try{var p=h();return!t(f,p)}catch{return!0}}function d(f,h){return h()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return to.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:c,to}var no={};/**
10
- * @license React
11
- * use-sync-external-store-shim.development.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var $i;function qc(){return $i||($i=1,process.env.NODE_ENV!=="production"&&function(){function n(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function e(p,g){c||l.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 b=g();if(!f){var y=g();r(b,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}y=i({inst:{value:b,getSnapshot:g}});var x=y[0].inst,E=y[1];return u(function(){x.value=b,x.getSnapshot=g,t(x)&&E({inst:x})},[p,b,g]),a(function(){return t(x)&&E({inst:x}),p(function(){t(x)&&E({inst:x})})},[p]),d(b),b}function t(p){var g=p.getSnapshot;p=p.value;try{var b=g();return!r(p,b)}catch{return!0}}function o(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var l=s,r=typeof Object.is=="function"?Object.is:n,i=l.useState,a=l.useEffect,u=l.useLayoutEffect,d=l.useDebugValue,c=!1,f=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:e;no.useSyncExternalStore=l.useSyncExternalStore!==void 0?l.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),no}var Si;function Zc(){return Si||(Si=1,process.env.NODE_ENV==="production"?Zt.exports=Gc():Zt.exports=qc()),Zt.exports}var Yc=Zc();const Ki=s.createContext(!1),dt=s.createContext(null);function Fi(n){if(s.useContext(dt))return n.content;let{collection:t,document:o}=Rc(n.createCollection);return s.createElement(s.Fragment,null,s.createElement(Uc,null,s.createElement(dt.Provider,{value:o},n.content)),s.createElement(Xc,{render:n.children,collection:t}))}function Xc({collection:n,render:e}){return e(n)}function Jc(n,e,t){let o=be(),l=s.useRef(o);l.current=o;let r=s.useCallback(()=>l.current?t():e(),[e,t]);return Yc.useSyncExternalStore(n,r)}const Qc=typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore:Jc;function Rc(n){let[e]=s.useState(()=>new Wc((n==null?void 0:n())||new eo)),t=s.useCallback(i=>e.subscribe(i),[e]),o=s.useCallback(()=>{let i=e.getCollection();return e.isSSR&&e.resetAfterSSR(),i},[e]),l=s.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),r=Qc(t,o,l);return V(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:r,document:e}}const oo=s.createContext(null);function Mi(n,e,t,o,l,r){let i=s.useCallback(u=>{u==null||u.setProps(e,t,o,r)},[e,t,o,r]),a=s.useContext(oo);if(a){let u=a.ownerDocument.nodesByProps.get(e);return u||(u=a.ownerDocument.createElement(n),u.setProps(e,t,o,r),a.appendChild(u),a.ownerDocument.updateCollection(),a.ownerDocument.nodesByProps.set(e,u)),l?s.createElement(oo.Provider,{value:u},l):null}return s.createElement(n,{ref:i},l)}function Li(n,e){let t=({node:l})=>e(l.props,l.props.ref,l),o=s.forwardRef((l,r)=>{if(!s.useContext(Ki)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(l,r)}return Mi(n,l,r,"children"in l?l.children:null,null,a=>s.createElement(t,{node:a}))});return o.displayName=e.name,o}function ef(n,e,t=Ai){let o=({node:r})=>e(r.props,r.props.ref,r),l=s.forwardRef((r,i)=>{let a=t(r);var u;return(u=Mi(n,r,i,null,a,d=>s.createElement(o,{node:d})))!==null&&u!==void 0?u:s.createElement(s.Fragment,null)});return l.displayName=e.name,l}function Ai(n){return Ti({...n,addIdAndValue:!0})}const Ii=s.createContext(null);function Bi(n){let e=s.useContext(Ii),t=((e==null?void 0:e.dependencies)||[]).concat(n.dependencies),o=n.idScope||(e==null?void 0:e.idScope),l=Ai({...n,idScope:o,dependencies:t});return s.useContext(dt)&&(l=s.createElement(tf,null,l)),e=s.useMemo(()=>({dependencies:t,idScope:o}),[o,...t]),s.createElement(Ii.Provider,{value:e},l)}function tf({children:n}){let e=s.useContext(dt),t=s.useMemo(()=>s.createElement(dt.Provider,{value:null},s.createElement(Ki.Provider,{value:!0},n)),[n]);return be()?s.createElement(oo.Provider,{value:e},t):ke.createPortal(t,e)}const Ni=s.createContext({}),nf=s.createContext(null),of=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),lo=s.createContext({}),lf=Di(function(e,t){[e,t]=oe(e,t,lo),e=rf(e);let o=e,{isPending:l}=o,{buttonProps:r,isPressed:i}=Ht(e,t),{focusProps:a,isFocused:u,isFocusVisible:d}=Te(e),{hoverProps:c,isHovered:f}=Me({...e,isDisabled:e.isDisabled||l}),h={isHovered:f,isPressed:(o.isPressed||i)&&!l,isFocused:u,isFocusVisible:d,isDisabled:e.isDisabled||!1,isPending:l??!1},p=R({...e,values:h,defaultClassName:"react-aria-Button"}),g=J(r.id),b=J(),y=r["aria-labelledby"];l&&(y?y=`${y} ${b}`:r["aria-label"]&&(y=`${g} ${b}`));let x=s.useRef(l);return s.useEffect(()=>{let E={"aria-labelledby":y||g};(!x.current&&u&&l||x.current&&u&&!l)&&kl(E,"assertive"),x.current=l},[l,u,y,g]),s.createElement("button",{...Z(e,{propNames:of}),...N(r,a,c),...p,type:r.type==="submit"&&l?"button":r.type,id:g,ref:t,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":l?"true":r["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":h.isPressed||void 0,"data-hovered":f||void 0,"data-focused":u||void 0,"data-pending":l||void 0,"data-focus-visible":d||void 0},s.createElement(nf.Provider,{value:{id:b}},p.children))});function rf(n){return n.isPending&&(n.onPress=void 0,n.onPressStart=void 0,n.onPressEnd=void 0,n.onPressChange=void 0,n.onPressUp=void 0,n.onKeyDown=void 0,n.onKeyUp=void 0,n.onClick=void 0,n.href=void 0),n}const Yt=s.createContext({}),Oi=s.createContext(null);class zi{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);var o;return t&&(o=t.prevKey)!==null&&o!==void 0?o:null}getKeyAfter(e){let t=this.keyMap.get(e);var o;return t&&(o=t.nextKey)!==null&&o!==void 0?o:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){let t=this.keyMap.get(e);return(t==null?void 0:t.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=i=>{if(this.keyMap.set(i.key,i),i.childNodes&&i.type==="section")for(let a of i.childNodes)t(a)};for(let i of e)t(i);let o=null,l=0;for(let[i,a]of this.keyMap)o?(o.nextKey=i,a.prevKey=o.key):(this.firstKey=i,a.prevKey=void 0),a.type==="item"&&(a.index=l++),o=a,o.nextKey=void 0;var r;this.lastKey=(r=o==null?void 0:o.key)!==null&&r!==void 0?r:null}}class ue extends Set{constructor(e,t,o){super(e),e instanceof ue?(this.anchorKey=t??e.anchorKey,this.currentKey=o??e.currentKey):(this.anchorKey=t??null,this.currentKey=o??null)}}function sf(n,e){if(n.size!==e.size)return!1;for(let t of n)if(!e.has(t))return!1;return!0}function af(n){let{selectionMode:e="none",disallowEmptySelection:t=!1,allowDuplicateSelectionEvents:o,selectionBehavior:l="toggle",disabledBehavior:r="all"}=n,i=s.useRef(!1),[,a]=s.useState(!1),u=s.useRef(null),d=s.useRef(null),[,c]=s.useState(null),f=s.useMemo(()=>Hi(n.selectedKeys),[n.selectedKeys]),h=s.useMemo(()=>Hi(n.defaultSelectedKeys,new ue),[n.defaultSelectedKeys]),[p,g]=we(f,h,n.onSelectionChange),b=s.useMemo(()=>n.disabledKeys?new Set(n.disabledKeys):new Set,[n.disabledKeys]),[y,x]=s.useState(l);l==="replace"&&y==="toggle"&&typeof p=="object"&&p.size===0&&x("replace");let E=s.useRef(l);return s.useEffect(()=>{l!==E.current&&(x(l),E.current=l)},[l]),{selectionMode:e,disallowEmptySelection:t,selectionBehavior:y,setSelectionBehavior:x,get isFocused(){return i.current},setFocused(T){i.current=T,a(T)},get focusedKey(){return u.current},get childFocusStrategy(){return d.current},setFocusedKey(T,L="first"){u.current=T,d.current=L,c(T)},selectedKeys:p,setSelectedKeys(T){(o||!sf(T,p))&&g(T)},disabledKeys:b,disabledBehavior:r}}function Hi(n,e){return n?n==="all"?"all":new ue(n):e}class uf{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,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}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 t=this.getKey(e);return t==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(t):this.state.selectedKeys.has(t)}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(),t=this.state.selectedKeys;return this._isSelectAll=e.every(o=>t.has(o)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let o of this.state.selectedKeys){let l=this.collection.getItem(o);(!e||l&&Jn(this.collection,l,e)<0)&&(e=l)}var t;return(t=e==null?void 0:e.key)!==null&&t!==void 0?t:null}get lastSelectedKey(){let e=null;for(let o of this.state.selectedKeys){let l=this.collection.getItem(o);(!e||l&&Jn(this.collection,l,e)>0)&&(e=l)}var t;return(t=e==null?void 0:e.key)!==null&&t!==void 0?t: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 t=this.getKey(e);if(t==null)return;let o;if(this.state.selectedKeys==="all")o=new ue([t],t,t);else{let i=this.state.selectedKeys;var l;let a=(l=i.anchorKey)!==null&&l!==void 0?l:t;o=new ue(i,a,t);var r;for(let u of this.getKeyRange(a,(r=i.currentKey)!==null&&r!==void 0?r:t))o.delete(u);for(let u of this.getKeyRange(t,a))this.canSelectItem(u)&&o.add(u)}this.state.setSelectedKeys(o)}getKeyRange(e,t){let o=this.collection.getItem(e),l=this.collection.getItem(t);return o&&l?Jn(this.collection,o,l)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){var o;if(!((o=this.layoutDelegate)===null||o===void 0)&&o.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let l=[],r=e;for(;r!=null;){let i=this.collection.getItem(r);if(i&&(i.type==="item"||i.type==="cell"&&this.allowsCellSelection)&&l.push(r),r===t)return l;r=this.collection.getKeyAfter(r)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type==="cell"&&this.allowsCellSelection)return e;for(;t&&t.type!=="item"&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!=="item"?null:t.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let o=new ue(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);o.has(t)?o.delete(t):this.canSelectItem(t)&&(o.add(t),o.anchorKey=t,o.currentKey=t),!(this.disallowEmptySelection&&o.size===0)&&this.state.setSelectedKeys(o)}replaceSelection(e){if(this.selectionMode==="none")return;let t=this.getKey(e);if(t==null)return;let o=this.canSelectItem(t)?new ue([t],t,t):new ue;this.state.setSelectedKeys(o)}setSelectedKeys(e){if(this.selectionMode==="none")return;let t=new ue;for(let o of e){let l=this.getKey(o);if(l!=null&&(t.add(l),this.selectionMode==="single"))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=[],t=o=>{for(;o!=null;){if(this.canSelectItem(o)){var l;let i=this.collection.getItem(o);(i==null?void 0:i.type)==="item"&&e.push(o);var r;i!=null&&i.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&t((r=(l=Rd(Ar(i,this.collection)))===null||l===void 0?void 0:l.key)!==null&&r!==void 0?r:null)}o=this.collection.getKeyAfter(o)}};return t(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 ue)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||t&&(t.pointerType==="touch"||t.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let o of e)if(!t.has(o))return!1;for(let o of t)if(!e.has(o))return!1;return!0}canSelectItem(e){var t;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let o=this.collection.getItem(e);return!(!o||!(o==null||(t=o.props)===null||t===void 0)&&t.isDisabled||o.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var t,o;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((o=this.collection.getItem(e))===null||o===void 0||(t=o.props)===null||t===void 0)&&t.isDisabled))}isLink(e){var t,o;return!!(!((o=this.collection.getItem(e))===null||o===void 0||(t=o.props)===null||t===void 0)&&t.href)}getItemProps(e){var t;return(t=this.collection.getItem(e))===null||t===void 0?void 0:t.props}constructor(e,t,o){this.collection=e,this.state=t;var l;this.allowsCellSelection=(l=o==null?void 0:o.allowsCellSelection)!==null&&l!==void 0?l:!1,this._isSelectAll=null,this.layoutDelegate=(o==null?void 0:o.layoutDelegate)||null}}function Vi(n){let{filter:e,layoutDelegate:t}=n,o=af(n),l=s.useMemo(()=>n.disabledKeys?new Set(n.disabledKeys):new Set,[n.disabledKeys]),r=s.useCallback(c=>e?new zi(e(c)):new zi(c),[e]),i=s.useMemo(()=>({suppressTextValueWarning:n.suppressTextValueWarning}),[n.suppressTextValueWarning]),a=Qd(n,r,i),u=s.useMemo(()=>new uf(a,o,{layoutDelegate:t}),[a,o,t]);const d=s.useRef(null);return s.useEffect(()=>{if(o.focusedKey!=null&&!a.getItem(o.focusedKey)&&d.current){const x=d.current.getItem(o.focusedKey),E=[...d.current.getKeys()].map(v=>{const F=d.current.getItem(v);return(F==null?void 0:F.type)==="item"?F:null}).filter(v=>v!==null),T=[...a.getKeys()].map(v=>{const F=a.getItem(v);return(F==null?void 0:F.type)==="item"?F:null}).filter(v=>v!==null);var c,f;const L=((c=E==null?void 0:E.length)!==null&&c!==void 0?c:0)-((f=T==null?void 0:T.length)!==null&&f!==void 0?f:0);var h,p,g;let K=Math.min(L>1?Math.max(((h=x==null?void 0:x.index)!==null&&h!==void 0?h:0)-L+1,0):(p=x==null?void 0:x.index)!==null&&p!==void 0?p:0,((g=T==null?void 0:T.length)!==null&&g!==void 0?g:0)-1),$=null,O=!1;for(;K>=0;){if(!u.isDisabled(T[K].key)){$=T[K];break}if(K<T.length-1&&!O)K++;else{O=!0;var b,y;K>((b=x==null?void 0:x.index)!==null&&b!==void 0?b:0)&&(K=(y=x==null?void 0:x.index)!==null&&y!==void 0?y:0),K--}}o.setFocusedKey($?$.key:null)}d.current=a},[a,u,o,o.focusedKey]),{collection:a,disabledKeys:l,selectionManager:u}}function df(n){var e;let[t,o]=we(n.selectedKey,(e=n.defaultSelectedKey)!==null&&e!==void 0?e:null,n.onSelectionChange),l=s.useMemo(()=>t!=null?[t]:[],[t]),{collection:r,disabledKeys:i,selectionManager:a}=Vi({...n,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:l,onSelectionChange:d=>{if(d==="all")return;var c;let f=(c=d.values().next().value)!==null&&c!==void 0?c:null;f===t&&n.onSelectionChange&&n.onSelectionChange(f),o(f)}}),u=t!=null?r.getItem(t):null;return{collection:r,disabledKeys:i,selectionManager:a,selectedKey:t,setSelectedKey:o,selectedItem:u}}function Xt(n){let[e,t]=we(n.isOpen,n.defaultOpen||!1,n.onOpenChange);const o=s.useCallback(()=>{t(!0)},[t]),l=s.useCallback(()=>{t(!1)},[t]),r=s.useCallback(()=>{t(!e)},[t,e]);return{isOpen:e,setOpen:t,open:o,close:l,toggle:r}}function cf(n){let[e,t]=we(n.isExpanded,n.defaultExpanded||!1,n.onExpandedChange);const o=s.useCallback(()=>{t(!0)},[t]),l=s.useCallback(()=>{t(!1)},[t]),r=s.useCallback(()=>{t(!e)},[t,e]);return{isExpanded:e,setExpanded:t,expand:o,collapse:l,toggle:r}}function ff(n){let{allowsMultipleExpanded:e=!1,isDisabled:t=!1}=n,[o,l]=we(s.useMemo(()=>n.expandedKeys?new Set(n.expandedKeys):void 0,[n.expandedKeys]),s.useMemo(()=>n.defaultExpandedKeys?new Set(n.defaultExpandedKeys):new Set,[n.defaultExpandedKeys]),n.onExpandedChange);return s.useEffect(()=>{!e&&o.size>1&&l(new Set([o.values().next().value]))}),{allowsMultipleExpanded:e,isDisabled:t,expandedKeys:o,setExpandedKeys:l,toggleKey(r){let i;e?(i=new Set(o),i.has(r)?i.delete(r):i.add(r)):i=new Set(o.has(r)?[]:[r]),l(i)}}}function pf(n){let e=Xt(n),[t,o]=s.useState(null),[l,r]=s.useState([]),i=()=>{r([]),e.close()};return{focusStrategy:t,...e,open(d=null){o(d),e.open()},toggle(d=null){o(d),e.toggle()},close(){i()},expandedKeysStack:l,openSubmenu:(d,c)=>{r(f=>c>f.length?f:[...f.slice(0,c),d])},closeSubmenu:(d,c)=>{r(f=>f[c]===d?f.slice(0,c):f)}}}function vf(n){let e=Xt(n),[t,o]=s.useState(null),l=df({...n,onSelectionChange:u=>{n.onSelectionChange!=null&&n.onSelectionChange(u),e.close(),r.commitValidation()}}),r=Bn({...n,value:l.selectedKey}),[i,a]=s.useState(!1);return{...r,...l,...e,focusStrategy:t,open(u=null){l.collection.size!==0&&(o(u),e.open())},toggle(u=null){l.collection.size!==0&&(o(u),e.toggle())},isFocused:i,setFocused:a}}const hf=1500,Wi=500;let Oe={},gf=0,ct=!1,me=null,ze=null;function _i(n={}){let{delay:e=hf,closeDelay:t=Wi}=n,{isOpen:o,open:l,close:r}=Xt(n),i=s.useMemo(()=>`${++gf}`,[]),a=s.useRef(null),u=s.useRef(r),d=()=>{Oe[i]=h},c=()=>{for(let g in Oe)g!==i&&(Oe[g](!0),delete Oe[g])},f=()=>{a.current&&clearTimeout(a.current),a.current=null,c(),d(),ct=!0,l(),me&&(clearTimeout(me),me=null),ze&&(clearTimeout(ze),ze=null)},h=g=>{g||t<=0?(a.current&&clearTimeout(a.current),a.current=null,u.current()):a.current||(a.current=setTimeout(()=>{a.current=null,u.current()},t)),me&&(clearTimeout(me),me=null),ct&&(ze&&clearTimeout(ze),ze=setTimeout(()=>{delete Oe[i],ze=null,ct=!1},Math.max(Wi,t)))},p=()=>{c(),d(),!o&&!me&&!ct?me=setTimeout(()=>{me=null,ct=!0,f()},e):o||f()};return s.useEffect(()=>{u.current=r},[r]),s.useEffect(()=>()=>{a.current&&clearTimeout(a.current),Oe[i]&&delete Oe[i]},[i]),{isOpen:o,open:g=>{!g&&e>0&&!a.current?p():f()},close:h}}const Ui=s.createContext(null),ro=s.createContext({});let mf=n=>{let{onHoverStart:e,onHoverChange:t,onHoverEnd:o,...l}=n;return l};const bf=Di(function(e,t){[e,t]=oe(e,t,ro);let{hoverProps:o,isHovered:l}=Me(e),{isFocused:r,isFocusVisible:i,focusProps:a}=Te({isTextInput:!0,autoFocus:e.autoFocus}),u=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",d=R({...e,values:{isHovered:l,isFocused:r,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:u},defaultClassName:"react-aria-Input"});return s.createElement("input",{...N(mf(e),a,o),...d,ref:t,"data-focused":r||void 0,"data-disabled":e.disabled||void 0,"data-hovered":l||void 0,"data-focus-visible":i||void 0,"data-invalid":u||void 0})}),yf=s.createContext({}),xf=s.createContext(null),Pf=s.forwardRef(function(e,t){[e,t]=oe(e,t,xf);let{validationBehavior:o}=Gt(Ui)||{};var l,r;let i=(r=(l=e.validationBehavior)!==null&&l!==void 0?l:o)!==null&&r!==void 0?r:"native",a=s.useRef(null),[u,d]=oe({},a,ro),[c,f]=Qn(),[h,p]=s.useState("input"),{labelProps:g,inputProps:b,descriptionProps:y,errorMessageProps:x,...E}=pd({...Ci(e),inputElementType:h,label:f,validationBehavior:i},d),T=s.useCallback($=>{d.current=$,$&&p($ instanceof HTMLTextAreaElement?"textarea":"input")},[d]),L=R({...e,values:{isDisabled:e.isDisabled||!1,isInvalid:E.isInvalid,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-TextField"}),K=Z(e);return delete K.id,s.createElement("div",{...K,...L,ref:t,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(Ne,{values:[[Ni,{...g,ref:c}],[ro,{...N(b,u),ref:T}],[yf,{...b,ref:T}],[Yt,{slots:{description:y,errorMessage:x}}],[Oi,E]]},L.children))}),wf=s.createContext(null),Cf=s.createContext(null),Ef={CollectionRoot({collection:n,renderDropIndicator:e}){return ji(n,null,e)},CollectionBranch({collection:n,parent:e,renderDropIndicator:t}){return ji(n,e,t)}};function ji(n,e,t){return Ti({items:e?n.getChildren(e.key):n,dependencies:[t],children(o){var l;let r=o.render(o);if(!t||o.type!=="item")return r;let i=o.key,a=n.getKeyAfter(i);return s.createElement(s.Fragment,null,t({type:"item",key:i,dropPosition:"before"}),r,(a==null||((l=n.getItem(a))===null||l===void 0?void 0:l.type)!=="item")&&t({type:"item",key:i,dropPosition:"after"}))}})}const io=s.createContext(Ef);var Gi={};Gi={colorSwatchPicker:"تغييرات الألوان",dropzoneLabel:"DropZone",selectPlaceholder:"حدد عنصرًا",tableResizer:"أداة تغيير الحجم"};var qi={};qi={colorSwatchPicker:"Цветови мостри",dropzoneLabel:"DropZone",selectPlaceholder:"Изберете предмет",tableResizer:"Преоразмерител"};var Zi={};Zi={colorSwatchPicker:"Vzorky barev",dropzoneLabel:"Místo pro přetažení",selectPlaceholder:"Vyberte položku",tableResizer:"Změna velikosti"};var Yi={};Yi={colorSwatchPicker:"Farveprøver",dropzoneLabel:"DropZone",selectPlaceholder:"Vælg et element",tableResizer:"Størrelsesændring"};var Xi={};Xi={colorSwatchPicker:"Farbfelder",dropzoneLabel:"Ablegebereich",selectPlaceholder:"Element wählen",tableResizer:"Größenanpassung"};var Ji={};Ji={colorSwatchPicker:"Χρωματικά δείγματα",dropzoneLabel:"DropZone",selectPlaceholder:"Επιλέξτε ένα αντικείμενο",tableResizer:"Αλλαγή μεγέθους"};var Qi={};Qi={selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"};var Ri={};Ri={colorSwatchPicker:"Muestras de colores",dropzoneLabel:"DropZone",selectPlaceholder:"Seleccionar un artículo",tableResizer:"Cambiador de tamaño"};var es={};es={colorSwatchPicker:"Värvinäidised",dropzoneLabel:"DropZone",selectPlaceholder:"Valige üksus",tableResizer:"Suuruse muutja"};var ts={};ts={colorSwatchPicker:"Värimallit",dropzoneLabel:"DropZone",selectPlaceholder:"Valitse kohde",tableResizer:"Koon muuttaja"};var ns={};ns={colorSwatchPicker:"Échantillons de couleurs",dropzoneLabel:"DropZone",selectPlaceholder:"Sélectionner un élément",tableResizer:"Redimensionneur"};var os={};os={colorSwatchPicker:"דוגמיות צבע",dropzoneLabel:"DropZone",selectPlaceholder:"בחר פריט",tableResizer:"שינוי גודל"};var ls={};ls={colorSwatchPicker:"Uzorci boja",dropzoneLabel:"Zona spuštanja",selectPlaceholder:"Odaberite stavku",tableResizer:"Promjena veličine"};var rs={};rs={colorSwatchPicker:"Színtárak",dropzoneLabel:"DropZone",selectPlaceholder:"Válasszon ki egy elemet",tableResizer:"Átméretező"};var is={};is={colorSwatchPicker:"Campioni di colore",dropzoneLabel:"Zona di rilascio",selectPlaceholder:"Seleziona un elemento",tableResizer:"Ridimensionamento"};var ss={};ss={colorSwatchPicker:"カラースウォッチ",dropzoneLabel:"ドロップゾーン",selectPlaceholder:"項目を選択",tableResizer:"サイズ変更ツール"};var as={};as={colorSwatchPicker:"색상 견본",dropzoneLabel:"드롭 영역",selectPlaceholder:"항목 선택",tableResizer:"크기 조정기"};var us={};us={colorSwatchPicker:"Spalvų pavyzdžiai",dropzoneLabel:"„DropZone“",selectPlaceholder:"Pasirinkite elementą",tableResizer:"Dydžio keitiklis"};var ds={};ds={colorSwatchPicker:"Krāsu paraugi",dropzoneLabel:"DropZone",selectPlaceholder:"Izvēlēties vienumu",tableResizer:"Izmēra mainītājs"};var cs={};cs={colorSwatchPicker:"Fargekart",dropzoneLabel:"Droppsone",selectPlaceholder:"Velg et element",tableResizer:"Størrelsesendrer"};var fs={};fs={colorSwatchPicker:"kleurstalen",dropzoneLabel:"DropZone",selectPlaceholder:"Selecteer een item",tableResizer:"Resizer"};var ps={};ps={colorSwatchPicker:"Próbki kolorów",dropzoneLabel:"Strefa upuszczania",selectPlaceholder:"Wybierz element",tableResizer:"Zmiana rozmiaru"};var vs={};vs={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var hs={};hs={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var gs={};gs={colorSwatchPicker:"Specimene de culoare",dropzoneLabel:"Zonă de plasare",selectPlaceholder:"Selectați un element",tableResizer:"Instrument de redimensionare"};var ms={};ms={colorSwatchPicker:"Цветовые образцы",dropzoneLabel:"DropZone",selectPlaceholder:"Выберите элемент",tableResizer:"Средство изменения размера"};var bs={};bs={colorSwatchPicker:"Vzorkovníky farieb",dropzoneLabel:"DropZone",selectPlaceholder:"Vyberte položku",tableResizer:"Nástroj na zmenu veľkosti"};var ys={};ys={colorSwatchPicker:"Barvne palete",dropzoneLabel:"DropZone",selectPlaceholder:"Izberite element",tableResizer:"Spreminjanje velikosti"};var xs={};xs={colorSwatchPicker:"Uzorci boje",dropzoneLabel:"DropZone",selectPlaceholder:"Izaberite stavku",tableResizer:"Promena veličine"};var Ps={};Ps={colorSwatchPicker:"Färgrutor",dropzoneLabel:"DropZone",selectPlaceholder:"Välj en artikel",tableResizer:"Storleksändrare"};var ws={};ws={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 Es={};Es={colorSwatchPicker:"颜色色板",dropzoneLabel:"放置区域",selectPlaceholder:"选择一个项目",tableResizer:"尺寸调整器"};var Ts={};Ts={colorSwatchPicker:"色票",dropzoneLabel:"放置區",selectPlaceholder:"選取項目",tableResizer:"大小調整器"};var Ds={};Ds={"ar-AE":Gi,"bg-BG":qi,"cs-CZ":Zi,"da-DK":Yi,"de-DE":Xi,"el-GR":Ji,"en-US":Qi,"es-ES":Ri,"et-EE":es,"fi-FI":ts,"fr-FR":ns,"he-IL":os,"hr-HR":ls,"hu-HU":rs,"it-IT":is,"ja-JP":ss,"ko-KR":as,"lt-LT":us,"lv-LV":ds,"nb-NO":cs,"nl-NL":fs,"pl-PL":ps,"pt-BR":vs,"pt-PT":hs,"ro-RO":gs,"ru-RU":ms,"sk-SK":bs,"sl-SI":ys,"sr-SP":xs,"sv-SE":Ps,"tr-TR":ws,"uk-UA":Cs,"zh-CN":Es,"zh-TW":Ts};const Jt=s.createContext({}),ks=s.createContext(null),Tf=s.forwardRef(function(e,t){let{render:o}=s.useContext(ks);return s.createElement(s.Fragment,null,o(e,t))});function $s(n,e){var t;let o=n==null?void 0:n.renderDropIndicator,l=n==null||(t=n.isVirtualDragging)===null||t===void 0?void 0:t.call(n),r=s.useCallback(i=>{if(l||e!=null&&e.isDropTarget(i))return o?o(i):s.createElement(Tf,{target:i})},[e==null?void 0:e.target,l,o]);return n!=null&&n.useDropIndicator?r:void 0}function Df(n,e,t){var o,l;let r=n.focusedKey,i=null;if(!(e==null||(o=e.isVirtualDragging)===null||o===void 0)&&o.call(e)&&(t==null||(l=t.target)===null||l===void 0?void 0:l.type)==="item"){i=t.target.key;var a;t.target.dropPosition==="after"&&(i=(a=t.collection.getKeyAfter(i))!==null&&a!==void 0?a:i)}return s.useMemo(()=>new Set([r,i].filter(u=>u!=null)),[r,i])}const Ss=s.createContext({}),kf=Li("header",function(e,t){return[e,t]=oe(e,t,Ss),s.createElement("header",{className:"react-aria-Header",...e,ref:t},e.children)}),$f=s.createContext({}),so=s.createContext(null),ft=s.createContext(null),Sf=s.forwardRef(function(e,t){[e,t]=oe(e,t,so);let o=s.useContext(ft);return o?s.createElement(Ks,{state:o,props:e,listBoxRef:t}):s.createElement(Fi,{content:s.createElement(Bi,e)},l=>s.createElement(Kf,{props:e,listBoxRef:t,collection:l}))});function Kf({props:n,listBoxRef:e,collection:t}){n={...n,collection:t,children:null,items:null};let{layoutDelegate:o}=s.useContext(io),{filterFn:l,collectionProps:r,collectionRef:i}=s.useContext(wf)||{};e=te(s.useMemo(()=>Ko(e,i!==void 0?i:null),[i,e]));let a=s.useMemo(()=>l?t.filter(l):t,[t,l]),u=Vi({...n,collection:a,layoutDelegate:o});return s.createElement(Ks,{state:u,props:{...n,...r},listBoxRef:e})}function Ks({state:n,props:e,listBoxRef:t}){let{dragAndDropHooks:o,layout:l="stack",orientation:r="vertical"}=e,{collection:i,selectionManager:a}=n,u=!!(o!=null&&o.useDraggableCollectionState),d=!!(o!=null&&o.useDroppableCollectionState),{direction:c}=Ie(),{disabledBehavior:f,disabledKeys:h}=a,p=An({usage:"search",sensitivity:"base"}),{isVirtualized:g,layoutDelegate:b,dropTargetDelegate:y,CollectionRoot:x}=s.useContext(io),E=s.useMemo(()=>e.keyboardDelegate||new Yn({collection:i,collator:p,ref:t,disabledKeys:h,disabledBehavior:f,layout:l,orientation:r,direction:c,layoutDelegate:b}),[i,p,t,f,h,r,c,e.keyboardDelegate,l,b]),{listBoxProps:T}=Yd({...e,shouldSelectOnPressUp:u||e.shouldSelectOnPressUp,keyboardDelegate:E,isVirtualized:g},n,t),L=s.useRef(u),K=s.useRef(d);s.useEffect(()=>{L.current!==u&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),K.current!==d&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.")},[u,d]);let $,O,v,F=!1,M=null,D=s.useRef(null);if(u&&o){$=o.useDraggableCollectionState({collection:i,selectionManager:a,preview:o.renderDragPreview?D:void 0}),o.useDraggableCollection({},$,t);let k=o.DragPreview;M=o.renderDragPreview?s.createElement(k,{ref:D},o.renderDragPreview):null}if(d&&o){O=o.useDroppableCollectionState({collection:i,selectionManager:a});let k=o.dropTargetDelegate||y||new o.ListDropTargetDelegate(i,t,{orientation:r,layout:l,direction:c});v=o.useDroppableCollection({keyboardDelegate:E,dropTargetDelegate:k},O,t),F=O.isDropTarget({type:"root"})}let{focusProps:I,isFocused:m,isFocusVisible:C}=Te(),A={isDropTarget:F,isEmpty:n.collection.size===0,isFocused:m,isFocusVisible:C,layout:e.layout||"stack",state:n},z=R({className:e.className,style:e.style,defaultClassName:"react-aria-ListBox",values:A}),H=null;return n.collection.size===0&&e.renderEmptyState&&(H=s.createElement("div",{role:"option",style:{display:"contents"}},e.renderEmptyState(A))),s.createElement(pl,null,s.createElement("div",{...Z(e),...N(T,I,v==null?void 0:v.collectionProps),...z,ref:t,slot:e.slot||void 0,onScroll:e.onScroll,"data-drop-target":F||void 0,"data-empty":n.collection.size===0||void 0,"data-focused":m||void 0,"data-focus-visible":C||void 0,"data-layout":e.layout||"stack","data-orientation":e.orientation||"vertical"},s.createElement(Ne,{values:[[so,e],[ft,n],[Jt,{dragAndDropHooks:o,dragState:$,dropState:O}],[$f,{elementType:"div"}],[ks,{render:Lf}],[Cf,{name:"ListBoxSection",render:Fs}]]},s.createElement(x,{collection:i,scrollRef:t,persistedKeys:Df(a,o,O),renderDropIndicator:$s(o,O)})),H,M))}function Fs(n,e,t,o="react-aria-ListBoxSection"){let l=s.useContext(ft),{dragAndDropHooks:r,dropState:i}=s.useContext(Jt),{CollectionBranch:a}=s.useContext(io),[u,d]=Qn();var c;let{headingProps:f,groupProps:h}=oc({heading:d,"aria-label":(c=n["aria-label"])!==null&&c!==void 0?c:void 0}),p=R({defaultClassName:o,className:n.className,style:n.style,values:{}});return s.createElement("section",{...Z(n),...h,...p,ref:e},s.createElement(Ss.Provider,{value:{...f,ref:u}},s.createElement(a,{collection:l.collection,parent:t,renderDropIndicator:$s(r,i)})))}const Ff=ef("section",Fs),Mf=Li("item",function(e,t,o){let l=te(t),r=s.useContext(ft),{dragAndDropHooks:i,dragState:a,dropState:u}=s.useContext(Jt),{optionProps:d,labelProps:c,descriptionProps:f,...h}=nc({key:o.key,"aria-label":e==null?void 0:e["aria-label"]},r,l),{hoverProps:p,isHovered:g}=Me({isDisabled:!h.allowsSelection&&!h.hasAction,onHoverStart:o.props.onHoverStart,onHoverChange:o.props.onHoverChange,onHoverEnd:o.props.onHoverEnd}),b=null;a&&i&&(b=i.useDraggableItem({key:o.key},a));let y=null;u&&i&&(y=i.useDroppableItem({target:{type:"item",key:o.key,dropPosition:"on"}},u,l));let x=a&&a.isDragging(o.key),E=R({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...h,isHovered:g,selectionMode:r.selectionManager.selectionMode,selectionBehavior:r.selectionManager.selectionBehavior,allowsDragging:!!a,isDragging:x,isDropTarget:y==null?void 0:y.isDropTarget}});s.useEffect(()=>{o.textValue||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.")},[o.textValue]);let T=e.href?"a":"div";return s.createElement(T,{...N(d,p,b==null?void 0:b.dragProps,y==null?void 0:y.dropProps),...E,ref:l,"data-allows-dragging":!!a||void 0,"data-selected":h.isSelected||void 0,"data-disabled":h.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":h.isFocused||void 0,"data-focus-visible":h.isFocusVisible||void 0,"data-pressed":h.isPressed||void 0,"data-dragging":x||void 0,"data-drop-target":(y==null?void 0:y.isDropTarget)||void 0,"data-selection-mode":r.selectionManager.selectionMode==="none"?void 0:r.selectionManager.selectionMode},s.createElement(Ne,{values:[[Yt,{slots:{label:c,description:f}}]]},E.children))});function Lf(n,e){e=te(e);let{dragAndDropHooks:t,dropState:o}=s.useContext(Jt),{dropIndicatorProps:l,isHidden:r,isDropTarget:i}=t.useDropIndicator(n,o,e);return r?null:s.createElement(If,{...n,dropIndicatorProps:l,isDropTarget:i,ref:e})}function Af(n,e){let{dropIndicatorProps:t,isDropTarget:o,...l}=n,r=R({...l,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:o}});return s.createElement("div",{...t,...r,role:"option",ref:e,"data-drop-target":o||void 0})}const If=s.forwardRef(Af),Ms=s.createContext({placement:"bottom"}),ao=s.createContext(null),Ls=s.forwardRef(function(e,t){[e,t]=oe(e,t,ao);let o=s.useContext(Qt),l=Xt(e),r=e.isOpen!=null||e.defaultOpen!=null||!o?l:o,i=jo(t,r.isOpen)||e.isExiting||!1;if(jc()){let u=e.children;return typeof u=="function"&&(u=u({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),s.createElement(s.Fragment,null,u)}return r&&!r.isOpen&&!i?null:s.createElement(Bf,{...e,triggerRef:e.triggerRef,state:r,popoverRef:t,isExiting:i})});function Bf({state:n,isExiting:e,UNSTABLE_portalContainer:t,...o}){let l=s.useRef(null),[r,i]=s.useState(0);V(()=>{l.current&&n.isOpen&&i(l.current.getBoundingClientRect().width)},[n.isOpen,l]);var a;let{popoverProps:u,underlayProps:d,arrowProps:c,placement:f}=Nd({...o,offset:(a=o.offset)!==null&&a!==void 0?a:8,arrowSize:r},n),h=o.popoverRef,p=Uo(h,!!f)||o.isEntering||!1,g=R({...o,defaultClassName:"react-aria-Popover",values:{trigger:o.trigger||null,placement:f,isEntering:p,isExiting:e}}),b={...u.style,...g.style};return s.createElement(Hd,{...o,isExiting:e,portalContainer:t},!o.isNonModal&&n.isOpen&&s.createElement("div",{"data-testid":"underlay",...d,style:{position:"fixed",inset:0}}),s.createElement("div",{...N(Z(o),u),...g,ref:h,slot:o.slot||void 0,style:b,"data-trigger":o.trigger,"data-placement":f,"data-entering":p||void 0,"data-exiting":e||void 0},!o.isNonModal&&s.createElement(kr,{onDismiss:n.close}),s.createElement(Ms.Provider,{value:{...c,placement:f,ref:l}},g.children),s.createElement(kr,{onDismiss:n.close})))}const Nf=s.createContext(null),As=s.createContext(null),Qt=s.createContext(null);function Of(n){let e=pf(n),t=s.useRef(null),{triggerProps:o,overlayProps:l}=Ul({type:"dialog"},e,t);return o.id=J(),l["aria-labelledby"]=o.id,s.createElement(Ne,{values:[[Qt,e],[Nf,e],[As,l],[ao,{trigger:"DialogTrigger",triggerRef:t}]]},s.createElement(du,{...o,ref:t,isPressed:e.isOpen},n.children))}const zf=s.forwardRef(function(e,t){let o=e["aria-labelledby"];[e,t]=oe(e,t,As);let{dialogProps:l,titleProps:r}=ic({...e,"aria-labelledby":o},t),i=s.useContext(Qt);!l["aria-label"]&&!l["aria-labelledby"]&&(e["aria-labelledby"]?l["aria-labelledby"]=e["aria-labelledby"]: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=R({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(i==null?void 0:i.close)||(()=>{})}});return s.createElement("section",{...Z(e),...l,...a,ref:t,slot:e.slot||void 0},s.createElement(Ne,{values:[[Vc,{slots:{[jt]:{},title:{...r,level:2}}}],[lo,{slots:{[jt]:{},close:{onPress:()=>i==null?void 0:i.close()}}}]]},a.children))});function Hf(n){return n&&n.__esModule?n.default:n}const uo=s.createContext(null),co=s.createContext(null),Vf=s.forwardRef(function(e,t){[e,t]=oe(e,t,uo);let{children:o,isDisabled:l=!1,isInvalid:r=!1,isRequired:i=!1}=e,a=s.useMemo(()=>typeof o=="function"?o({isOpen:!1,isDisabled:l,isInvalid:r,isRequired:i,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):o,[o,l,r,i]);return s.createElement(Fi,{content:a},u=>s.createElement(Wf,{props:e,collection:u,selectRef:t}))});function Wf({props:n,selectRef:e,collection:t}){let{validationBehavior:o}=Gt(Ui)||{};var l,r;let i=(r=(l=n.validationBehavior)!==null&&l!==void 0?l:o)!==null&&r!==void 0?r:"native",a=vf({...n,collection:t,children:void 0,validationBehavior:i}),{isFocusVisible:u,focusProps:d}=Te({within:!0}),c=s.useRef(null),[f,h]=Qn(),{labelProps:p,triggerProps:g,valueProps:b,menuProps:y,descriptionProps:x,errorMessageProps:E,...T}=uc({...Ci(n),label:h,validationBehavior:i},a,c),[L,K]=s.useState(null),$=s.useCallback(()=>{c.current&&K(c.current.offsetWidth+"px")},[c]);an({ref:c,onResize:$});let O=s.useMemo(()=>({isOpen:a.isOpen,isFocused:a.isFocused,isFocusVisible:u,isDisabled:n.isDisabled||!1,isInvalid:T.isInvalid||!1,isRequired:n.isRequired||!1}),[a.isOpen,a.isFocused,u,n.isDisabled,T.isInvalid,n.isRequired]),v=R({...n,values:O,defaultClassName:"react-aria-Select"}),F=Z(n);delete F.id;let M=s.useRef(null);return s.createElement(Ne,{values:[[uo,n],[co,a],[Is,b],[Ni,{...p,ref:f,elementType:"span"}],[lo,{...g,ref:c,isPressed:a.isOpen}],[Qt,a],[ao,{trigger:"Select",triggerRef:c,scrollRef:M,placement:"bottom start",style:{"--trigger-width":L}}],[so,{...y,ref:M}],[ft,a],[Yt,{slots:{description:x,errorMessage:E}}],[Oi,T]]},s.createElement("div",{...F,...v,...d,ref:e,slot:n.slot||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":u||void 0,"data-open":a.isOpen||void 0,"data-disabled":n.isDisabled||void 0,"data-invalid":T.isInvalid||void 0,"data-required":n.isRequired||void 0}),s.createElement(cc,{autoComplete:n.autoComplete,state:a,triggerRef:c,label:h,name:n.name,isDisabled:n.isDisabled}))}const Is=s.createContext(null),_f=s.forwardRef(function(e,t){var o,l;[e,t]=oe(e,t,Is);let r=s.useContext(co),{placeholder:i}=Gt(uo),a=r.selectedKey!=null?r.collection.getItem(r.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=Kn(Hf(Ds),"react-aria-components");var c,f,h;let p=R({...e,defaultChildren:(c=u??i)!==null&&c!==void 0?c:d.format("selectPlaceholder"),defaultClassName:"react-aria-SelectValue",values:{selectedItem:(f=(o=r.selectedItem)===null||o===void 0?void 0:o.value)!==null&&f!==void 0?f:null,selectedText:(h=(l=r.selectedItem)===null||l===void 0?void 0:l.textValue)!==null&&h!==void 0?h:null,isPlaceholder:!a}}),g=Z(e);return s.createElement("span",{ref:t,...g,...p,"data-placeholder":!a||void 0},s.createElement(Yt.Provider,{value:void 0},p.children))}),Uf=s.createContext({}),Bs=s.createContext(null),jf=s.forwardRef(function(e,t){[e,t]=oe(e,t,Uf);let o=fd(e),{groupProps:l}=td(e,o,t),r=R({...e,values:{isDisabled:o.isDisabled,state:o},defaultClassName:"react-aria-ToggleButtonGroup"});return s.createElement("div",{...l,...r,ref:t,slot:e.slot||void 0,"data-orientation":e.orientation||"horizontal","data-disabled":e.isDisabled||void 0},s.createElement(Bs.Provider,{value:o},r.children))}),Gf=s.createContext({}),qf=s.forwardRef(function(e,t){[e,t]=oe(e,t,Gf);let o=s.useContext(Bs),l=Fl(o&&e.id!=null?{isSelected:o.selectedKeys.has(e.id),onChange(b){o.setSelected(e.id,b)}}:e),{buttonProps:r,isPressed:i,isSelected:a,isDisabled:u}=o&&e.id!=null?nd({...e,id:e.id},o,t):Tl({...e,id:e.id!=null?String(e.id):void 0},l,t),{focusProps:d,isFocused:c,isFocusVisible:f}=Te(e),{hoverProps:h,isHovered:p}=Me(e),g=R({...e,id:void 0,values:{isHovered:p,isPressed:i,isFocused:c,isSelected:l.isSelected,isFocusVisible:f,isDisabled:u,state:l},defaultClassName:"react-aria-ToggleButton"});return s.createElement("button",{...N(r,d,h),...g,ref:t,slot:e.slot||void 0,"data-focused":c||void 0,"data-disabled":u||void 0,"data-pressed":i||void 0,"data-selected":a||void 0,"data-hovered":p||void 0,"data-focus-visible":f||void 0})}),fo=s.createContext(null),Ns=s.createContext(null);function Zf(n){let e=_i(n),t=s.useRef(null),{triggerProps:o,tooltipProps:l}=pc(n,e,t);return s.createElement(Ne,{values:[[fo,e],[Ns,{...l,triggerRef:t}]]},s.createElement(Iu,{...o,ref:t},n.children))}const Yf=s.forwardRef(function({UNSTABLE_portalContainer:e,...t},o){[t,o]=oe(t,o,Ns);let l=s.useContext(fo),r=_i(t),i=t.isOpen!=null||t.defaultOpen!=null||!l?r:l,a=jo(o,i.isOpen)||t.isExiting||!1;return!i.isOpen&&!a?null:s.createElement(Ad,{portalContainer:e},s.createElement(Xf,{...t,tooltipRef:o,isExiting:a}))});function Xf(n){let e=s.useContext(fo),t=s.useRef(null),[o,l]=s.useState(0);V(()=>{t.current&&e.isOpen&&l(t.current.getBoundingClientRect().width)},[e.isOpen,t]);let{overlayProps:r,arrowProps:i,placement:a}=_l({placement:n.placement||"top",targetRef:n.triggerRef,overlayRef:n.tooltipRef,offset:n.offset,crossOffset:n.crossOffset,isOpen:e.isOpen,arrowSize:o,arrowBoundaryOffset:n.arrowBoundaryOffset,shouldFlip:n.shouldFlip,onClose:()=>e.close(!0)}),u=Uo(n.tooltipRef,!!a)||n.isEntering||!1,d=R({...n,defaultClassName:"react-aria-Tooltip",values:{placement:a,isEntering:u,isExiting:n.isExiting,state:e}});n=N(n,r);let{tooltipProps:c}=fc(n,e);return s.createElement("div",{...c,ref:n.tooltipRef,...d,style:{...r.style,...d.style},"data-placement":a??void 0,"data-entering":u||void 0,"data-exiting":n.isExiting||void 0},s.createElement(Ms.Provider,{value:{...i,placement:a,ref:t}},d.children))}const Os=P.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:Jf}=P.createRecipeContext({recipe:Os}),Qf=Jf("div"),zs=s.forwardRef(function({children:e,placement:t="bottom",...o},l){return w.jsx(Qf,{ref:l,asChild:!0,...o,children:w.jsx(Yf,{placement:t,...o,children:e})})});zs.displayName="Tooltip";const Hs=Zf;Hs.displayName="TooltipTrigger";const Vs=s.forwardRef(function(e,t){const o=s.useRef(null),l=te(P.mergeRefs(o,t)),{focusableProps:r}=Ge(e,l);if(s.isValidElement(e.children))return s.cloneElement(e.children,N(r,e.children.props,{ref:l}))});Vs.displayName="MakeElementFocusable";function Rf(n){return w.jsx(To.ThemeProvider,{attribute:"class",disableTransitionOnChange:!0,...n})}function po(){const{resolvedTheme:n,setTheme:e}=To.useTheme();return{colorMode:n,setColorMode:e,toggleColorMode:()=>{e(n==="light"?"dark":"light")}}}function ep(n,e){const{colorMode:t}=po();return t==="light"?n:e}function tp(){const{colorMode:n}=po();return n==="light"?"Light Theme":"DarkTheme"}const np=P.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 op(n){var t;const e={};for(const o in n)(t=n[o])!=null&&t.value?e[o]=n[o].value:e[o]=n[o];return e}const lp=op(j.themeTokens.breakpoints),rp=P.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"}}),ip={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"}}},sp=P.defineLayerStyles({disabled:{value:{opacity:"0.5",cursor:"not-allowed"}}}),ap=P.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"}}),up=P.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"}}),dp=P.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"}}),vo=P.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.error.7",color:"error.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"}}),cp={avatar:Do,button:Be,code:ap,heading:up,kbd:dp,link:yi,tooltip:Os,textInput:vo},fp=P.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}"},error:{value:"{colors.error.8}"},warning:{value:"{colors.danger.8}"},success:{value:"{colors.success.8}"},info:{value:"{colors.ingo.8}"}},...j.themeTokens.color["system-palettes"],...j.themeTokens.color["brand-palettes"],...j.themeTokens.color["semantic-palettes"]}),pp=P.defineSemanticTokens.shadows(j.themeTokens.shadow),vp=P.defineSemanticTokens.radii({}),hp={colors:fp,shadows:pp,radii:vp},gp=P.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"}}),mp=P.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"}}),bp=P.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"}}),yp=P.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:"error.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:"error.9",color:"error.11","&:hover":{borderColor:"error.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:"error.9",borderColor:"error.9",color:"error.contrast","&:hover":{bg:"error.10",borderColor:"error.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"}}),Ws=P.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.error.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:"error.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"}}),xp=P.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"}}),Pp={dialog:gp,list:mp,table:bp,checkbox:yp,select:Ws,accordion:xp},wp=P.defineTextStyles(j.themeTokens.textStyle),Cp=P.defineTokens.durations(j.themeTokens.aspectRatio),Ep=P.defineTokens.animations(j.themeTokens.animation),Tp=P.defineTokens.blurs(j.themeTokens.blur),Dp=P.defineTokens.borders(j.themeTokens.border),kp=P.defineTokens.colors({...j.themeTokens.color["blacks-and-whites"]}),$p=P.defineTokens.durations(j.themeTokens.duration),Sp=P.defineTokens.easings(j.themeTokens.easing),Kp=P.defineTokens.fonts(j.themeTokens.fontFamily),Fp=P.defineTokens.fontSizes(j.themeTokens.fontSize),Mp=P.defineTokens.fontWeights(j.themeTokens.fontWeight),Lp=n=>Object.keys(n).reduce((e,t)=>{const l=parseFloat(n[t].value)/100;return e[t]={value:`${l}em`},e},{}),Ap=P.defineTokens.letterSpacings(Lp(j.themeTokens.letterSpacing)),Ip=P.defineTokens.lineHeights(j.themeTokens.lineHeight),Bp=P.defineTokens.radii(j.themeTokens.borderRadius),Np=P.defineTokens.spacing(j.themeTokens.spacing),Op=P.defineTokens.sizes({...j.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"}}),zp=P.defineTokens.zIndex(j.themeTokens.zIndex),Hp=P.defineTokens.cursor(j.themeTokens.cursor),Vp={aspectRatios:Cp,animations:Ep,blurs:Tp,borders:Dp,colors:kp,durations:$p,easings:Sp,fonts:Kp,fontSizes:Fp,fontWeights:Mp,letterSpacings:Ap,lineHeights:Ip,radii:Bp,spacing:Np,sizes:Op,zIndex:zp,cursor:Hp},Wp=P.defineConfig({preflight:!0,cssVarsPrefix:"nimbus",cssVarsRoot:":where(:root, :host)",globalCss:rp,theme:{breakpoints:lp,keyframes:ip,tokens:Vp,semanticTokens:hp,recipes:cp,slotRecipes:Pp,textStyles:wp,layerStyles:sp,animationStyles:np}}),_s=P.createSystem(P.defaultBaseConfig,Wp);function _p(){const[n,e]=s.useState(t());function t(){return document.documentElement.style.getPropertyValue("color-scheme")||localStorage.getItem("theme")||"light"}return s.useEffect(()=>{const o=document.documentElement,l=new MutationObserver(()=>{const r=t();e(r)});return l.observe(o,{attributes:!0,attributeFilter:["style"]}),()=>l.disconnect()},[]),n}function Up({children:n,...e}){return w.jsx(P.ChakraProvider,{value:_s,children:w.jsx(Rf,{enableSystem:!1,...e,children:w.jsx(w.Fragment,{children:n})})})}function Rt(n){const e={},t={...n};return Object.keys(n).forEach(o=>{Object.prototype.hasOwnProperty.call(n,o)&&P.defaultSystem.isValidProperty(o)&&(e[o]=n[o],delete t[o])}),[e,t]}const{withProvider:jp,withContext:Us}=P.createSlotRecipeContext({key:"checkbox"}),Gp=jp("label","root"),qp=Us("span","label"),Zp=Us("span","indicator"),js=s.forwardRef((n,e)=>{const t=s.useRef(null),o=te(P.mergeRefs(t,e)),l=P.useSlotRecipe({key:"checkbox"}),[r]=l.splitVariantProps(n),[i,a]=Rt(n),u=Fl(n),{inputProps:d}=cd(a,u,o),{isFocused:c,focusProps:f}=Te(),h=u.isSelected&&!n.isIndeterminate,p=n.isIndeterminate,g={"data-selected":h,"data-indeterminate":p,"data-invalid":n.isInvalid,"data-disabled":n.isDisabled,"data-focus":c||void 0};return w.jsxs(Gp,{"data-slot":"root",...r,...g,...i,children:[w.jsxs(Zp,{"data-slot":"indicator",...g,children:[h&&w.jsx(ee.Check,{}),p&&w.jsx(ee.Remove,{}),w.jsx(ho,{as:"span",children:w.jsx("input",{...N(d,f),ref:o})})]}),n.children&&w.jsx(qp,{"data-slot":"label",...g,children:n.children})]})});js.displayName="Checkbox";const en=s.forwardRef((n,e)=>w.jsx(P.Stack,{ref:e,...n}));en.displayName="Stack";const ho=n=>{const{as:e="div",...t}=n;return w.jsx(Al,{elementType:e,...t})};ho.displayName="VisuallyHidden";const{withContext:Yp}=P.createRecipeContext({recipe:vo}),Xp=Yp("input"),Gs=s.forwardRef((n,e)=>{const t=s.useRef(null),o=te(P.mergeRefs(t,e)),l=P.useRecipe({recipe:vo}),[r,i]=l.splitVariantProps(n),[a,u]=Rt(i);return w.jsx(Pf,{...u,children:w.jsx(Xp,{ref:o,...r,...a,asChild:!0,children:w.jsx(bf,{})})})});Gs.displayName="TextInput";const qs=s.forwardRef((n,e)=>w.jsx(P.Grid,{ref:e,...n}));qs.displayName="Grid";const Jp=Object.assign(qs,{Item:P.GridItem}),{withProvider:Qp,withContext:pt}=P.createSlotRecipeContext({key:"select"}),Rp=Qp("div","root"),ev=pt("button","trigger"),tv=pt("span","triggerLabel"),nv=pt("div","options"),ov=pt("div","option"),lv=pt("div","optionGroup"),Zs=()=>{const n=s.useContext(co);if(!(n!=null&&n.selectedKey))return null;const e=()=>{n==null||n.setSelectedKey(null)};return w.jsx(at,{pointerEvents:"all",size:"2xs",variant:"ghost",tone:"primary","aria-label":"Clear Selection",onPress:e,children:w.jsx(ee.Close,{})})};Zs.displayName="Select.ClearButton";const go=s.forwardRef(({children:n,isLoading:e,isDisabled:t,...o},l)=>{const r=P.useSlotRecipe({recipe:Ws}),[i,a]=r.splitVariantProps(o),[u,d]=Rt(a),c={...d,isDisabled:e||t};return w.jsx(Rp,{asChild:!0,ref:l,...i,...u,children:w.jsxs(Vf,{...c,children:[w.jsxs(P.chakra.div,{position:"relative",children:[w.jsx(ev,{zIndex:0,asChild:!0,children:w.jsx(lf,{children:w.jsx(tv,{asChild:!0,children:w.jsx(_f,{})})})}),w.jsxs(P.Flex,{position:"absolute",top:"0",bottom:"0",zIndex:1,right:"400",pointerEvents:"none",children:[w.jsx(P.Flex,{width:"600",my:"auto",children:w.jsx(Zs,{})}),w.jsx(P.Flex,{my:"auto",w:"600",h:"600",pointerEvents:"none",children:w.jsx(fe,{color:"neutral.9",asChild:!0,m:"auto",w:"400",h:"400",children:e?w.jsx(fe,{asChild:!0,animation:"spin",animationDuration:"slowest",children:w.jsx(ee.Loop,{})}):w.jsx(ee.KeyboardArrowDown,{})})})]})]}),w.jsx(Ls,{children:n})]})})});go.displayName="Select.Root";const mo=n=>s.forwardRef(n),bo=mo((n,e)=>{const[t,o]=Rt(n);return w.jsx(nv,{asChild:!0,...t,children:w.jsx(Sf,{ref:e,...o})})});bo.displayName="Select.Options";const yo=mo((n,e)=>w.jsx(ov,{asChild:!0,ref:e,children:w.jsx(Mf,{...n})}));yo.displayName="Select.Option";const xo=mo(({label:n,items:e,children:t,...o},l)=>{if(e&&typeof t!="function")throw new Error('SelectOptionGroup: When "items" is provided, "children" must be a function');return w.jsxs(Ff,{ref:l,...o,children:[w.jsx(lv,{asChild:!0,children:w.jsx(kf,{children:n})}),e?w.jsx(Bi,{items:e,children:r=>typeof t=="function"?t(r):null}):t]})});xo.displayName="Select.OptionGroup";const rv={Root:go,Options:bo,Option:yo,OptionGroup:xo},{withProvider:iv,withContext:vt}=P.createSlotRecipeContext({key:"accordion"}),sv=iv("div","root"),av=vt("div","disclosure"),uv=vt("button","trigger"),dv=vt("div","panel"),cv=vt("div","accordionTitle"),Po=vt("div","headerContentRight"),wo=s.createContext(null),Ys=s.createContext(null),fv=s.forwardRef(({children:n,onExpandedChange:e,...t},o)=>{const l=ff({...t,onExpandedChange:a=>{e==null||e(a.size>0)}}),r=P.useSlotRecipe({key:"accordion"}),[i]=r.splitVariantProps(t);return w.jsx(Ys.Provider,{value:l,children:w.jsx(sv,{"data-slot":"root",ref:o,...i,children:n})})}),pv=s.forwardRef(({children:n},e)=>{const t=s.useContext(wo);if(!t)throw new Error("Accordion.Header must be used within Accordion.Item");const o=s.Children.toArray(n).reduce((l,r)=>(s.isValidElement(r)&&r.type===Po?l.rightContent.push(r):l.main.push(r),l),{main:[],rightContent:[]});return w.jsxs(P.Flex,{justifyContent:"space-between",alignItems:"center",borderBottom:"solid-25",borderColor:"neutral.4",children:[w.jsxs(uv,{ref:P.mergeRefs(t.triggerRef,e),...t.buttonProps,"data-slot":"trigger",outline:t.isFocusVisible?void 0:"none",children:[w.jsx(ee.KeyboardArrowRight,{}),w.jsx(cv,{"data-slot":"accordionTitle",children:o.main})]}),o.rightContent.length>0&&w.jsx(Po,{"data-slot":"headerContentRight",children:o.rightContent})]})}),vv=s.forwardRef((n,e)=>{const t=s.useContext(wo),o=te(P.mergeRefs(t==null?void 0:t.panelRef,e));return w.jsx(dv,{ref:o,...P.mergeProps({...t==null?void 0:t.panelProps,...n}),"data-slot":"panel",children:n.children})}),hv=s.forwardRef(({children:n,id:e,isDisabled:t,isExpanded:o,onExpandedChange:l,value:r},i)=>{const a=J(),d=r||(e||a),c=s.useContext(Ys),f=c?c.expandedKeys.has(d):o,h=cf({isExpanded:f,onExpandedChange:$=>{c&&c.toggleKey(d),l==null||l($)}}),p=s.useRef(null),g=s.useRef(null),b=t||(c==null?void 0:c.isDisabled)||!1,{buttonProps:y,panelProps:x}=sc({isExpanded:h.isExpanded,isDisabled:b},h,p),{buttonProps:E}=Ht(y,g),{focusProps:T,isFocusVisible:L}=Te(),K={isExpanded:h.isExpanded,triggerRef:g,panelRef:p,buttonProps:N(E,T),panelProps:x,isFocusVisible:L};return w.jsx(wo.Provider,{value:K,children:w.jsx(av,{"data-slot":"disclosure","data-value":d,"data-expanded":h.isExpanded,ref:i,children:n})})}),gv={Root:fv,Item:hv,Header:pv,Content:vv,HeaderRightContent:Po},mv=P.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:bv}=P.createRecipeContext({recipe:mv}),yv=bv("div"),xv="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",Pv="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",Xs=s.forwardRef(({"aria-label":n="Loading data",...e},t)=>{const{progressBarProps:o}=ac({isIndeterminate:!0,"aria-label":n,...e});return w.jsx(yv,{ref:t,...N(e,o),"aria-label":n,children:w.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:[w.jsx("path",{d:xv,"data-svg-path":"spinner-circle",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),w.jsx("path",{d:Pv,"data-svg-path":"spinner-pointer",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})]})})});Xs.displayName="LoadingSpinner";const wv=P.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:Cv,withContext:Js}=P.createSlotRecipeContext({recipe:wv}),Ev=Cv("div","root"),Tv=Js("div","header"),Dv=Js("div","content"),Co=s.createContext(void 0),Qs=s.forwardRef(({children:n,...e},t)=>{const{isFocused:o,isFocusVisible:l,focusProps:r}=Te(),[i,a]=s.useState(null),[u,d]=s.useState(null),c=s.useMemo(()=>({setHeader:a,setContent:d}),[a,d]);return w.jsx(Co.Provider,{value:c,children:w.jsxs(Ev,{ref:t,...N(e,r),"data-focus":o||void 0,"data-focus-visible":l||void 0,tabIndex:0,children:[w.jsxs(en,{direction:"column",gap:"200",children:[i,u]}),n]})})});Qs.displayName="Card.Root";const Rs=({children:n,...e})=>{const t=s.useContext(Co);return s.useEffect(()=>{if(t){const o=w.jsx(Tv,{...e,children:n});return t.setHeader(o),()=>t.setHeader(null)}},[n,e]),null};Rs.displayName="Card.Header";const ea=({children:n,...e})=>{const t=s.useContext(Co);return s.useEffect(()=>{if(t){const o=w.jsx(Dv,{...e,children:n});return t.setContent(o),()=>t.setContent(null)}},[n,e]),null};ea.displayName="Card.Content";const kv={Root:Qs,Header:Rs,Content:ea},$v=P.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:Sv}=P.createRecipeContext({recipe:$v}),Kv=Sv("span"),Fv=s.forwardRef((n,e)=>{const{as:t,asChild:o,children:l,...r}=n,i=s.useRef(null),a=te(P.mergeRefs(i,e)),u=t||"span";return w.jsx(Kv,{as:u,...N(r,{ref:a}),children:l})}),Mv=P.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:"error"}},info:{root:{colorPalette:"info"}},warning:{root:{colorPalette:"amber"}},positive:{root:{colorPalette:"success"}}},variant:{flat:{},outlined:{root:{border:"solid-25",borderColor:"colorPalette.5",backgroundColor:"colorPalette.2",padding:"200",borderRadius:"200"}}}}}),{withProvider:Lv,withContext:ht}=P.createSlotRecipeContext({recipe:Mv}),Av=Lv("div","root"),Iv=ht("div","title"),Bv=ht("div","description"),Nv=ht("div","icon"),Ov=ht("div","actions"),zv=ht("div","dismissButton"),Hv=n=>{switch(n){case"critical":return w.jsx(ee.ErrorOutline,{});case"info":return w.jsx(ee.Info,{});case"warning":return w.jsx(ee.WarningAmber,{});case"positive":return w.jsx(ee.CheckCircleOutline,{});default:return null}},gt=s.createContext(void 0),ta=s.forwardRef(({children:n,...e},t)=>{const[o,l]=s.useState(null),[r,i]=s.useState(null),[a,u]=s.useState(null),[d,c]=s.useState(null),f=s.useMemo(()=>({setTitle:l,setDescription:i,setActions:u,setDismiss:c}),[l,i,u,c]);return w.jsx(gt.Provider,{value:f,children:w.jsxs(Av,{ref:t,...e,role:"alert",children:[w.jsx(Nv,{alignItems:"flex-start",children:Hv(e.tone)}),w.jsxs(en,{flex:"1",gap:"200",children:[w.jsxs(fe,{children:[o,r]}),a]}),d,n]})})});ta.displayName="Alert.Root";const na=({children:n,...e})=>{const t=s.useContext(gt);return s.useEffect(()=>{if(t){const o=w.jsx(Iv,{...e,fontWeight:"600",children:n});return t.setTitle(o),()=>t.setTitle(null)}},[n,e]),null};na.displayName="Alert.Title";const oa=({children:n,...e})=>{const t=s.useContext(gt);return s.useEffect(()=>{if(t){const o=w.jsx(Bv,{...e,children:n});return t.setDescription(o),()=>t.setDescription(null)}},[n,e]),null};oa.displayName="Alert.Description";const la=({children:n,...e})=>{const t=s.useContext(gt);return s.useEffect(()=>{if(t){const o=w.jsx(Ov,{...e,children:n});return t.setActions(o),()=>t.setActions(null)}},[n,e]),null};la.displayName="Alert.Actions";const ra=({children:n,...e})=>{const t=s.useContext(gt);return s.useEffect(()=>{if(t){const o=w.jsx(zv,{children:w.jsx(at,{"aria-label":"Dismiss",...e,variant:"ghost",size:"2xs",children:w.jsx(ee.Clear,{role:"img"})})});return t.setDismiss(o),()=>t.setDismiss(null)}},[n,e]),null};ra.displayName="Alert.DismissButton";const Vv={Root:ta,Title:na,Description:oa,Actions:la,DismissButton:ra},Wv=P.defineSlotRecipe({slots:["root","button"],className:"nimbus-toggle-button-group",base:{root:{display:"inline-flex"},button:{...Be.base,...(aa=Be.variants)==null?void 0:aa.variant.outline,borderRadius:"0",borderRightWidth:"0","&:first-of-type":{borderLeftRadius:"200"},"&:last-of-type":{borderRightWidth:"1px",borderRightRadius:"200"},"&[data-selected=true]":(ua=Be.variants)==null?void 0:ua.variant.solid}},variants:{size:{xs:{button:(da=Be.variants)==null?void 0:da.size.xs},md:{button:(ca=Be.variants)==null?void 0:ca.size.md}},tone:{primary:{button:{colorPalette:"primary"}},critical:{button:{colorPalette:"error"}},neutral:{button:{colorPalette:"neutral"}}}},defaultVariants:{size:"md"}}),{withContext:_v,withProvider:Uv}=P.createSlotRecipeContext({recipe:Wv}),jv=Uv(jf,"root"),Gv=_v(qf,"button"),ia=s.forwardRef(({children:n,...e},t)=>w.jsx(jv,{ref:t,...e,children:n}));ia.displayName="ToggleButtonGroup.Root";const sa=s.forwardRef(({children:n,...e},t)=>w.jsx(Gv,{...e,ref:t,children:n}));sa.displayName="ToggleButtonGroup.Button";const qv={Root:ia,Button:sa},Zv=P.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:"350",lineHeight:"500"},input:{gridArea:"input"},description:{gridArea:"description",color:"neutral.11",fontSize:"350",lineHeight:"500"},error:{gridArea:"error",color:"error.11",fontSize:"350",lineHeight:"500"},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:{direction:{column:{root:{gridTemplateAreas:`
18
- "label"
19
- "input"
20
- "description"
21
- "error"
22
- `},input:{mt:"var(--grid-gap)"},description:{mt:"var(--grid-gap)"},error:{mt:"var(--grid-gap)"}},row:{root:{gridTemplateAreas:`
23
- "label input"
24
- "label description"
25
- "label error"
26
- `,gridTemplateColumns:"auto 1fr",gridColumnGap:"200"},description:{mt:"var(--grid-gap)"},error:{mt:"var(--grid-gap)"}}}},defaultVariants:{direction:"column"}}),{withProvider:Yv,withContext:mt}=P.createSlotRecipeContext({recipe:Zv}),Xv=Yv("div","root"),Jv=mt("div","label"),Qv=mt("div","input"),Rv=mt("div","description"),e0=mt("div","error"),t0=mt("div","popover"),n0=s.forwardRef(({isInvalid:n,isRequired:e,isDisabled:t,isReadOnly:o,children:l,...r},i)=>{const[a,u]=s.useState({label:null,description:null,error:null,info:null,input:null,isInvalid:n,isRequired:e,isDisabled:t,isReadOnly:o}),{labelProps:d,fieldProps:c,descriptionProps:f,errorMessageProps:h}=Vn({label:a.label,description:a.description,errorMessage:a.error});s.useEffect(()=>{u(g=>({...g,isInvalid:n,isRequired:e,isDisabled:t,isReadOnly:o}))},[n,e,t,o]);const p={...c,isInvalid:n,isRequired:e,isDisabled:t,isReadOnly:o};return w.jsx(He.Provider,{value:{context:a,setContext:u},children:w.jsxs(Xv,{ref:i,...r,children:[a.label&&w.jsxs(Jv,{...a.labelSlotProps,children:[w.jsxs("label",{...d,children:[a.label,e&&w.jsx("sup",{"aria-hidden":"true",children:"*"})]}),a.info&&w.jsxs(Of,{children:[w.jsx(fe,{as:"span",display:"inline-block",position:"relative",width:"1ch",height:"1ch",ml:"200",children:w.jsx(fe,{as:"span",display:"inline-flex",position:"absolute",top:"50%",right:"50%",transform:"translate(50%, -50%)",children:w.jsx(at,{"aria-label":"__MORE INFO",size:"2xs",tone:"info",variant:"link",children:w.jsx(ee.HelpOutline,{})})})}),w.jsx(Ls,{children:w.jsx(t0,{asChild:!0,children:w.jsx(zf,{children:w.jsx(fe,{p:"300",children:a.info})})})})]})]}),a.input&&w.jsx(Qv,{...a.inputSlotProps,children:s.Children.map(a.input,g=>s.isValidElement(g)?s.cloneElement(g,p):g)}),a.description&&w.jsx(Rv,{...f,...a.descriptionSlotProps,children:a.description}),n&&a.error&&w.jsxs(e0,{...h,...a.errorSlotProps,children:[w.jsx(fe,{as:ee.ErrorOutline,display:"inline-flex",boxSize:"400",verticalAlign:"text-bottom",mr:"100"}),a.error]}),l]})})}),o0=({children:n,...e})=>{const{setContext:t}=s.useContext(He);return s.useEffect(()=>{t(o=>({...o,label:n,labelSlotProps:e}))},[n,t]),null},l0=({children:n,...e})=>{const{setContext:t}=s.useContext(He);return s.useEffect(()=>{t(o=>({...o,input:n,inputSlotProps:e}))},[n,t]),null},r0=({children:n,...e})=>{const{setContext:t}=s.useContext(He);return s.useEffect(()=>{t(o=>({...o,description:n,descriptionSlotProps:e}))},[n,t]),null},i0=({children:n,...e})=>{const{setContext:t}=s.useContext(He);return s.useEffect(()=>{t(o=>({...o,error:n,errorSlotProps:e}))},[n,t]),null},s0=({children:n})=>{const{setContext:e}=s.useContext(He);return s.useEffect(()=>{e(t=>({...t,info:n}))},[n,e]),null},He=s.createContext({context:{label:null,description:null,error:null,info:null,input:null},setContext:()=>{}}),a0={Root:n0,Label:o0,Input:l0,Description:r0,Error:i0,InfoBox:s0};Object.defineProperty(S,"Bleed",{enumerable:!0,get:()=>P.Bleed}),Object.defineProperty(S,"Code",{enumerable:!0,get:()=>P.Code}),Object.defineProperty(S,"Em",{enumerable:!0,get:()=>P.Em}),Object.defineProperty(S,"Flex",{enumerable:!0,get:()=>P.Flex}),Object.defineProperty(S,"Heading",{enumerable:!0,get:()=>P.Heading}),Object.defineProperty(S,"Highlight",{enumerable:!0,get:()=>P.Highlight}),Object.defineProperty(S,"Kbd",{enumerable:!0,get:()=>P.Kbd}),Object.defineProperty(S,"List",{enumerable:!0,get:()=>P.List}),Object.defineProperty(S,"Table",{enumerable:!0,get:()=>P.Table}),Object.defineProperty(S,"useHotkeys",{enumerable:!0,get:()=>ha.useHotkeys}),Object.defineProperty(S,"useCopyToClipboard",{enumerable:!0,get:()=>ga.useCopyToClipboard}),S.Accordion=gv,S.Alert=Vv,S.Avatar=ko,S.Badge=Fv,S.Box=fe,S.Button=Ut,S.Card=kv,S.Checkbox=js,S.ColorModeLabel=tp,S.DialogActionTrigger=Dc,S.DialogBackdrop=wc,S.DialogBody=Pc,S.DialogCloseTrigger=mc,S.DialogContent=gc,S.DialogDescription=Ec,S.DialogFooter=yc,S.DialogHeader=xc,S.DialogRoot=bc,S.DialogTitle=Cc,S.DialogTrigger=Tc,S.FormField=a0,S.FormFieldContext=He,S.Grid=Jp,S.IconButton=at,S.Link=xi,S.ListItem=Kc,S.ListRoot=Sc,S.LoadingSpinner=Xs,S.MakeElementFocusable=Vs,S.NimbusProvider=Up,S.Select=rv,S.SimpleGrid=Fc,S.Stack=en,S.TableBody=zc,S.TableCell=Oc,S.TableColumn=Ac,S.TableColumnGroup=Lc,S.TableColumnHeader=Hc,S.TableFooter=Bc,S.TableHeader=Ic,S.TableRoot=Mc,S.TableRow=Nc,S.Text=wi,S.TextInput=Gs,S.ToggleButtonGroup=qv,S.Tooltip=zs,S.TooltipTrigger=Hs,S.VisuallyHidden=ho,S._SelectOption=yo,S._SelectOptionGroup=xo,S._SelectOptions=bo,S._SelectRoot=go,S.system=_s,S.useColorMode=po,S.useColorModeValue=ep,S.useColorScheme=_p,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
27
- //# sourceMappingURL=index.umd.cjs.map