1import{r as a,a as p}from"./i18n-vendor-CgdUv56d.js";import{a5 as be,m as le,a6 as Q,H as ee,a7 as Ke,j as at,a8 as vl,a9 as ml,l as q,I as ie,q as Le,s as xl,Y as Sl,U as ct,h as W,aa as J,D as ut,P as Kl,R as Cl,A as Re,ab as wl,ac as Pl,ad as ze,i as dt,V as ft,y as Ce,ae as ye,a1 as Dl,af as El,_ as ae,M as Be,ag as ht,ah as we,ai as We,Z as Pe,L as Il,aj as Fl,w as re,N as Ml,ak as kl,B as bt,O as Ll,a0 as yt,al as Rl,F as pt,am as qe,T as Bl,an as Tl,n as gt,G as Al,u as de,ao as Vl,v as ne,ap as Ol,aq as Nl,ar as Ul,K as _l,Q as zl,as as Wl}from"./Dialog-CtGabwxG.js";import{s as ql,r as $t}from"./ariakit-vendor-Rr0LjWYd.js";const vt="react-aria-clear-focus",De="react-aria-focus";function Te(i){let e=mt(be(i));e!==i&&(e&&Ee(e,i),i&&pe(i,e))}function Ee(i,e){i.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function pe(i,e){i.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),i.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function mt(i){let e=le(i),t=e==null?void 0:e.getAttribute("aria-activedescendant");return t&&i.getElementById(t)||e}var xt={};xt={collectionLabel:"Ù
ÙØªØ±ØØ§Øª"};var St={};St={collectionLabel:"ÐÑедложениÑ"};var Kt={};Kt={collectionLabel:"Návrhy"};var Ct={};Ct={collectionLabel:"Forslag"};var wt={};wt={collectionLabel:"Empfehlungen"};var Pt={};Pt={collectionLabel:"Î ÏοÏάÏειÏ"};var Dt={};Dt={collectionLabel:"Suggestions"};var Et={};Et={collectionLabel:"Sugerencias"};var It={};It={collectionLabel:"Soovitused"};var Ft={};Ft={collectionLabel:"Ehdotukset"};var Mt={};Mt={collectionLabel:"Suggestions"};var kt={};kt={collectionLabel:"×צע×ת"};var Lt={};Lt={collectionLabel:"Prijedlozi"};var Rt={};Rt={collectionLabel:"Javaslatok"};var Bt={};Bt={collectionLabel:"Suggerimenti"};var Tt={};Tt={collectionLabel:"åè£"};var At={};At={collectionLabel:"ì ì"};var Vt={};Vt={collectionLabel:"PasiÅ«lymai"};var Ot={};Ot={collectionLabel:"Ieteikumi"};var Nt={};Nt={collectionLabel:"Forslag"};var Ut={};Ut={collectionLabel:"Suggesties"};var _t={};_t={collectionLabel:"Sugestie"};var zt={};zt={collectionLabel:"Sugestões"};var Wt={};Wt={collectionLabel:"Sugestões"};var qt={};qt={collectionLabel:"Sugestii"};var Ht={};Ht={collectionLabel:"ÐÑедложениÑ"};var jt={};jt={collectionLabel:"Návrhy"};var Gt={};Gt={collectionLabel:"Predlogi"};var Yt={};Yt={collectionLabel:"Predlozi"};var Qt={};Qt={collectionLabel:"Förslag"};var Xt={};Xt={collectionLabel:"Ãneriler"};var Zt={};Zt={collectionLabel:"ÐÑопозиÑÑÑ"};var Jt={};Jt={collectionLabel:"建议"};var el={};el={collectionLabel:"建è°"};var tl={};tl={"ar-AE":xt,"bg-BG":St,"cs-CZ":Kt,"da-DK":Ct,"de-DE":wt,"el-GR":Pt,"en-US":Dt,"es-ES":Et,"et-EE":It,"fi-FI":Ft,"fr-FR":Mt,"he-IL":kt,"hr-HR":Lt,"hu-HU":Rt,"it-IT":Bt,"ja-JP":Tt,"ko-KR":At,"lt-LT":Vt,"lv-LV":Ot,"nb-NO":Nt,"nl-NL":Ut,"pl-PL":_t,"pt-BR":zt,"pt-PT":Wt,"ro-RO":qt,"ru-RU":Ht,"sk-SK":jt,"sl-SI":Gt,"sr-SP":Yt,"sv-SE":Qt,"tr-TR":Xt,"uk-UA":Zt,"zh-CN":Jt,"zh-TW":el};function ce(i,e,t,l){let n=Q(t),r=t==null;a.useEffect(()=>{if(r||!i.current)return;let s=i.current;return s.addEventListener(e,n,l),()=>{s.removeEventListener(e,n,l)}},[i,e,l,r])}function Hl(i){return i&&i.__esModule?i.default:i}function jl(i,e){let{inputRef:t,collectionRef:l,filter:n,disableAutoFocusFirst:r=!1,disableVirtualFocus:s=!1}=i,u=ee(),o=a.useRef(void 0),f=a.useRef(!1),d=a.useRef(null),h=Ke()==="virtual"&&(at()||vl()),[y,g]=a.useState(!h&&!s),[m,P]=a.useState(!1);a.useEffect(()=>()=>clearTimeout(o.current),[]);let D=Q(c=>{!c.isTrusted&&y&&t.current&&le(be(t.current))!==t.current&&ml()!=="touch"&&t.current.focus();let v=q(c);c.isTrusted||!v||d.current===v.id||(clearTimeout(o.current),v!==l.current?f.current?(d.current=v.id,o.current=setTimeout(()=>{e.setFocusedNodeId(v.id)},500)):(d.current=v.id,e.setFocusedNodeId(v.id)):d.current&&!document.getElementById(d.current)&&(d.current=null,e.setFocusedNodeId(null)),f.current=!1)}),[E,S]=a.useState(null),w=a.useCallback(c=>{S(c),c!=null?(c.getAttribute("tabindex")!=null&&g(!1),P(!0)):P(!1)},[]);ie(()=>(E!=null&&E.addEventListener("focusin",D),()=>{E==null||E.removeEventListener("focusin",D)}),[E]);let I=Le(a.useMemo(()=>xl(l,w),[l,w])),B=a.useCallback(()=>{var c;f.current=!0,(c=l.current)==null||c.dispatchEvent(new CustomEvent(De,{cancelable:!0,bubbles:!0,detail:{focusStrategy:"first"}}))},[l]),F=a.useCallback(c=>{var O;Te(le()),d.current=null,e.setFocusedNodeId(null);let v=new CustomEvent(vt,{cancelable:!0,bubbles:!0,detail:{clearFocusKey:c}});clearTimeout(o.current),f.current=!1,(O=l.current)==null||O.dispatchEvent(v)},[l,e]),C=a.useRef("");ce(t,"input",c=>{let{inputType:v}=c;C.current=v});let T=c=>{C.current==="insertText"&&!r?B():C.current&&(C.current.includes("insert")||C.current.includes("delete")||C.current.includes("history"))&&(F(!0),mt(document)===t.current&&pe(t.current,null)),e.setInputValue(c)},k=a.useRef(null),K=c=>{var z,j;if(k.current=q(c),c.nativeEvent.isComposing)return;let v=d.current;switch(v!==null&&be(t.current).getElementById(v)==null&&(d.current=null,v=null),c.key){case"a":if(J(c))return;break;case"Escape":if(c.isDefaultPrevented())return;break;case" ":return;case"Tab":"continuePropagation"in c&&c.continuePropagation();return;case"Home":case"End":case"PageDown":case"PageUp":case"ArrowUp":case"ArrowDown":case"ArrowRight":case"ArrowLeft":{if((c.key==="Home"||c.key==="End")&&v==null&&c.shift
1Key)return;if((c.key==="ArrowRight"||c.key==="ArrowLeft")&&e.inputValue.length>0){if(v==null){c.isPropagationStopped()||c.stopPropagation();return}break}c.preventDefault();let N=new CustomEvent(De,{cancelable:!0,bubbles:!0});(z=l.current)==null||z.dispatchEvent(N);break}}c.isPropagationStopped()||c.stopPropagation();let O=!0;if(l.current!==null)if(v==null)O=((j=l.current)==null?void 0:j.dispatchEvent(new KeyboardEvent(c.nativeEvent.type,c.nativeEvent)))||!1;else{let N=document.getElementById(v);N&&(O=(N==null?void 0:N.dispatchEvent(new KeyboardEvent(c.nativeEvent.type,c.nativeEvent)))||!1)}if(O)switch(c.key){case"ArrowLeft":case"ArrowRight":F();break;case"Enter":if(v!=null){let N=document.getElementById(v);N==null||N.dispatchEvent(new PointerEvent("click",c.nativeEvent))}break}else c.preventDefault()},L=Q(c=>{var v;if(q(c)===k.current){c.stopImmediatePropagation();let O=d.current;if(O==null)(v=l.current)==null||v.dispatchEvent(new KeyboardEvent(c.type,c));else{let z=document.getElementById(O);z==null||z.dispatchEvent(new KeyboardEvent(c.type,c))}}});a.useEffect(()=>(document.addEventListener("keyup",L,!0),()=>{document.removeEventListener("keyup",L,!0)}),[]);let U=Sl(Hl(tl),"@react-aria/autocomplete"),M=ct({id:u,"aria-label":U.format("collectionLabel")}),b=a.useCallback((c,v)=>n?n(c,e.inputValue,v):!0,[e.inputValue,n]),x=c=>{if(!c.isTrusted)return;let v=d.current?document.getElementById(d.current):null;v&&Ee(v,c.relatedTarget)},R=c=>{if(!c.isTrusted)return;if(d.current?document.getElementById(d.current):null){let O=q(c);queueMicrotask(()=>{Ee(O,l.current),pe(l.current,O)})}},A=c=>{c.button!==0||c.pointerType==="touch"||d.current==null||t.current==null||q(c)===t.current&&F()},V={value:e.inputValue,onChange:T},_={onKeyDown:K,"aria-activedescendant":e.focusedNodeId??void 0,onBlur:x,onFocus:R,onPointerDown:A};return m&&(V={...V,...y&&_,enterKeyHint:"go","aria-controls":u,"aria-autocomplete":"list",autoCorrect:"off",spellCheck:"false",autoComplete:"off"}),{inputProps:V,collectionProps:W(M,{shouldUseVirtualFocus:y,disallowTypeAhead:y}),collectionRef:I,filter:n!=null?b:void 0}}function Gl(i){let{onInputChange:e,inputValue:t,defaultInputValue:l=""}=i,n=f=>{e&&e(f)},[r,s]=a.useState(null),[u,o]=ut(t,l,n);return{inputValue:u,setInputValue:o,focusedNodeId:r,setFocusedNodeId:s}}const Yl=a.createContext(null),Ql=a.createContext(null),ll=a.createContext(null),Xl=a.createContext(null);function un(i){let e=Kl(Yl,i.slot);i=W(e,i);let{filter:t,disableAutoFocusFirst:l}=i,n=Gl(i),r=a.useRef(null),s=a.useRef(null),{inputProps:u,collectionProps:o,collectionRef:f,filter:d}=jl({...Cl(i),filter:t,disableAutoFocusFirst:l,inputRef:r,collectionRef:s},n);return p.createElement(Re,{values:[[Ql,n],[Xl,{...u,ref:r}],[ll,{...o,filter:d,ref:f}]]},i.children)}class il{constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)==null?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e
1:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}}class te extends il{constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){var e;return this.parentNode instanceof te?this.parentNode.level+(((e=this.parentNode.node)==null?void 0:e.type)==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){var l,n,r,s,u,o,f,d;let e=this.nextVisibleSibling,t=this.getMutableNode();if(t!=null&&(t.index=this.index,t.level=this.level,t.parentKey=this.parentNode instanceof te?((l=this.parentNode.node)==null?void 0:l.key)??null:null,t.prevKey=((r=(n=this.previousVisibleSibling)==null?void 0:n.node)==null?void 0:r.key)??null,t.nextKey=((s=e==null?void 0:e.node)==null?void 0:s.key)??null,t.hasChildNodes=!!this.firstChild,t.firstChildKey=((o=(u=this.firstVisibleChild)==null?void 0:u.node)==null?void 0:o.key)??null,t.lastChildKey=((d=(f=this.lastVisibleChild)==null?void 0:f.node)==null?void 0:d.key)??null,(t.colSpan!=null||t.colIndex!=null)&&e)){let h=(t.colIndex??t.index)+(t.colSpan??1);if(e.node!=null&&h!==e.node.colIndex){let y=e.getMutableNode();y.colIndex=h}}}setProps(e,t,l,n,r){let s,{value:u,textValue:o,id:f,...d}=e;if(this.node==null?(s=new l(f??`react-aria-${++this.ownerDocument.nodeId}`),this.node=s):s=this.getMutableNode(),d.ref=t,s.props=d,s.rendered=n,s.render=r,s.value=u,e["aria-label"]&&(s["aria-label"]=e["aria-label"]),s.textValue=o||(typeof d.children=="string"?d.children:"")||e["aria-label"]||"",f!=null&&f!==s.key)throw new Error("Cannot change the id of an item");d.colSpan!=null&&(s.colSpan=d.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(t){var n,r;let l=t==="none";if(e.isHidden!==l){(((n=e.parentNode)==null?void 0:n.firstVisibleChild)===e||((r=e.parentNode)==null?void 0:r.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let s=e.previousVisibleSibling,u=e.nextVisibleSibling;s&&e.ownerDocument.markDirty(s),u&&e.ownerDocument.markDirty(u),e.isHidden=l,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class Zl extends il{constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}get isConnected(){return!0}createElement(e){return new te(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let l of e)this.addNode(l);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){var e,t,l,n;for(let r of this.dirtyNodes)r instanceof te&&(!r.isConnected||r.isHidden)?this.removeNode(r):r.updateChildIndices();for(let r of this.dirtyNodes)r instanceof te?(r.isConnected&&!r.isHidden&&(r.updateNode(),this.addNode(r)),r.node&&this.dirtyNodes.delete(r),r.isMutated=!1):this.dirtyNodes.delete(r);this.nextCollection&&(this.nextCollection.commit(((t=(e=this.first
1VisibleChild)==null?void 0:e.node)==null?void 0:t.key)??null,((n=(l=this.lastVisibleChild)==null?void 0:l.node)==null?void 0:n.key)??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function nl(i){let{children:e,items:t,idScope:l,addIdAndValue:n,dependencies:r=[]}=i,s=a.useMemo(()=>new WeakMap,r);return a.useMemo(()=>{if(t&&typeof e=="function"){let u=[];for(let o of t){let f=s.get(o);if(!f){f=e(o);let d=f.props.id??o.key??o.id;if(d==null)throw new Error("Could not determine key for item");l!=null&&f.props.id==null&&(d=l+":"+d),f=a.cloneElement(f,n?{key:d,id:d,value:o}:{key:d}),s.set(o,f)}u.push(f)}return u}else if(typeof e!="function")return e},[e,t,s,l,n])}const rl=a.createContext(!1),ue=a.createContext(null);function Jl(i){if(a.useContext(ue))return i.content;let{collection:t,document:l}=ii(i.createCollection);return p.createElement(p.Fragment,null,p.createElement(wl,null,p.createElement(ue.Provider,{value:l},i.content)),p.createElement(ei,{render:i.children,collection:t}))}function ei({collection:i,render:e}){return e(i)}function ti(i,e,t){let l=dt(),n=a.useRef(l);n.current=l;let r=a.useCallback(()=>n.current?t():e(),[e,t]);return ql.useSyncExternalStore(i,r)}const li=typeof p.useSyncExternalStore=="function"?p.useSyncExternalStore:ti;function ii(i){let[e]=a.useState(()=>new Zl((i==null?void 0:i())||new Pl)),t=a.useCallback(s=>e.subscribe(s),[e]),l=a.useCallback(()=>{let s=e.getCollection();return e.isSSR&&e.resetAfterSSR(),s},[e]),n=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]);return{collection:li(t,l,n),document:e}}const Ie=a.createContext(null);function ni(i){var t;return t=class extends ft{},t.type=i,t}function ri(i,e,t,l,n,r){typeof i=="string"&&(i=ni(i));let s=a.useCallback(o=>{o==null||o.setProps(e,t,i,l,r)},[e,t,l,r,i]),u=a.useContext(Ie);if(u){let o=u.ownerDocument.nodesByProps.get(e);return o||(o=u.ownerDocument.createElement(i.type),o.setProps(e,t,i,l,r),u.appendChild(o),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(e,o)),n?p.createElement(Ie.Provider,{value:o},n):null}return p.createElement(i.type,{ref:s},n)}function sl(i,e){let t=({node:n})=>e(n.props,n.props.ref,n),l=a.forwardRef((n,r)=>{let s=a.useContext(ze);if(!a.useContext(rl)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(n,r)}return ri(i,n,r,"children"in n?n.children:null,null,o=>p.createElement(ze.Provider,{value:s},p.createElement(t,{node:o})))});return l.displayName=e.name,l}function si(i){return nl({...i,addIdAndValue:!0})}const He=a.createContext(null);function oi(i){let e=a.useContext(He),t=((e==null?void 0:e.dependencies)||[]).concat(i.dependencies),l=i.idScope??(e==null?void 0:e.idScope),n=si({...i,idScope:l,dependencies:t});
1return a.useContext(ue)&&(n=p.createElement(ai,null,n)),e=a.useMemo(()=>({dependencies:t,idScope:l}),[l,...t]),p.createElement(He.Provider,{value:e},n)}function ai({children:i}){let e=a.useContext(ue),t=a.useMemo(()=>p.createElement(ue.Provider,{value:null},p.createElement(rl.Provider,{value:!0},i)),[i]);return dt()?p.createElement(Ie.Provider,{value:e},t):$t.createPortal(t,e)}const ci=a.createContext(null),ui={CollectionRoot({collection:i,renderDropIndicator:e}){return je(i,null,e)},CollectionBranch({collection:i,parent:e,renderDropIndicator:t}){return je(i,e,t)}};function je(i,e,t){return nl({items:e?i.getChildren(e.key):i,dependencies:[t],children(l){if(l.type==="content")return p.createElement(p.Fragment,null);let n=l.render(l);return!t||l.type!=="item"?n:p.createElement(p.Fragment,null,t({type:"item",key:l.key,dropPosition:"before"}),n,di(i,l,t))}})}function di(i,e,t){let l=e.key,n=i.getKeyAfter(l),r=n!=null?i.getItem(n):null;for(;r!=null&&r.type!=="item";)n=i.getKeyAfter(r.key),r=n!=null?i.getItem(n):null;let s=e.nextKey!=null?i.getItem(e.nextKey):null;for(;s!=null&&s.type!=="item";)s=s.nextKey!=null?i.getItem(s.nextKey):null;let u=[];if(s==null){let o=e;for(;(o==null?void 0:o.type)==="item"&&(!r||o.parentKey!==r.parentKey&&r.level<o.level);){let f=t({type:"item",key:o.key,dropPosition:"after"});a.isValidElement(f)&&u.push(a.cloneElement(f,{key:`${o.key}-after`})),o=o.parentKey!=null?i.getItem(o.parentKey):null}}return u}const Ae=a.createContext(ui);function dn(i){return a.useMemo(()=>i!=null?new Set([i]):null,[i])}const fn=a.createContext({});function ol(i){let{id:e,label:t,"aria-labelledby":l,"aria-label":n,labelElementType:r="label"}=i;e=ee(e);let s=ee(),u={};t&&(l=l?`${s} ${l}`:s,u={id:s,htmlFor:r==="label"?e:void 0});let o=ct({id:e,"aria-label":n,"aria-labelledby":l});return{labelProps:u,fieldProps:o}}const fi=a.createContext({});function Ge(i,e){let t=[],l=document.scrollingElement||document.documentElement;do Ce(i,e)&&t.push(i),i=i.parentElement;while(i&&i!==l);return t}function Fe(i,e,t={}){let{block:l="nearest",inline:n="nearest"}=t;if(i===e)return;let r=i.scrollTop,s=i.scrollLeft,u=e.getBoundingClientRect(),o=i.getBoundingClientRect(),f=window.getComputedStyle(e),d=window.getComputedStyle(i),h=document.scrollingElement||document.documentElement,y=i===h?0:o.top,g=i===h?i.clientHeight:o.bottom,m=i===h?0:o.left,P=i===h?i.clientWidth:o.right,D=parseInt(f.scrollMarginTop,10)||0,E=parseInt(f.scrollMarginBottom,10)||0,S=parseInt(f.scrollMarginLeft,10)||0,w=parseInt(f.scrollMarginRight,10)||0,I=parseInt(d.scrollPaddingTop,10)||0,B=parseInt(d.scrollPaddingBottom,10)||0,F=parseInt(d.scrollPaddingLeft,10)||0,C=parseInt(d.scrollPaddingRight,10)||0,T=parseInt(d.borderTopWidth,10)||0,k=parseInt(d.borderBottomWidth,10)||0,K=parseInt(d.borderLeftWidth,10)||0,L=parseInt(d.borderRightWidth,10)||0,U=u.top-D,M=u.bottom+E,b=u.left-S,x=u.right+w,R=i===h?0:K+L,A=i===h?0:T+k,V=i.offsetWidth-i.clientWidth-R,_=i.offsetHeight-i.clientHeight-A,c=y+T+I,v=g-k-B-_,O=m+K+F,z=P-L-C;d.direction==="rtl"&&!at()?O+=V:z-=V;let j=U<c||M>v,N=b<O||x>z;if(j&&l==="start")r+=U-c;else if(j&&l==="center")r+=(U+M)/2-(c+v)/2;else if(j&&l==="end")r+=M-v;else if(j&&l==="nearest"){let G=U-c,Y=M-v;r+=Math.abs(G)<=Math.abs(Y)?G:Y}if(N&&n==="start")s+=b-O;else if(N&&n==="center")s+=(b+x)/2-(O+z)/2;else if(N&&n==="end")s+=x-z;else if(N&&n==="nearest"){let G=b-O,Y=x-z;s+=Math.abs(G)<=Math.abs(Y)?G:Y}i.scrollTo({left:s,top:r})}function Ye(i,e={}){var l,n,r;let{containingElement:t}=e;if(i&&i.isConnected){let s=document.scrollingElement||document.documentElement;if(window.getComputedStyle(s).overflow==="hidden"){let{left:o,top:f}=i.getBoundingClientRect(),d=Ge(i,!0);for(let g of d)Fe(g,i);let{left:h,top:y}=i.getBoundingClientRect();if(Math.abs(o-h)>1||Math.abs(f-y)>1){d=t?Ge(t,!0):[];for(let g of d)Fe(g,t,{block:"center",inline:"center"})}}else{let{left:o,top:f}=i.getBoundingClientRect();(l=i==null?void 0:i.scrollIntoView)==null||l.call(i,{block:"nearest"});let{left:d,top:h}=i.getBoundingClientRect();(Math.abs(o-d)>1||Math.abs(f-h)>1)&&((n=t==null?void 0:t.scrollIntoView)==null||n.call(t,{block:"center",inline:"center"}),(r=i.scrollIntoView)==null||r.call(i,{block:"nearest"}))}}}let hi=0;const $e=new Map;function bi(i){let[e,t]=a.useState();return ie(()=>{if(!i)return;let l=$e.get(i);
1if(l)t(l.element.id);else{let n=`react-aria-description-${hi++}`;t(n);let r=document.createElement("div");r.id=n,r.style.display="none",r.textContent=i,document.body.appendChild(r),l={refCount:0,element:r},$e.set(i,l)}return l.refCount++,()=>{l&&--l.refCount===0&&(l.element.remove(),$e.delete(i))}},[i]),{"aria-describedby":i?e:void 0}}const hn=a.createContext(null),al={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},cl={...al,customError:!0,valid:!1},oe={isInvalid:!1,validationDetails:al,validationErrors:[]},yi=a.createContext({}),Qe="__reactAriaFormValidationState";function bn(i){if(i[Qe]){let{realtimeValidation:e,displayValidation:t,updateValidation:l,resetValidation:n,commitValidation:r}=i[Qe];return{realtimeValidation:e,displayValidation:t,updateValidation:l,resetValidation:n,commitValidation:r}}return pi(i)}function pi(i){let{isInvalid:e,validationState:t,name:l,value:n,builtinValidation:r,validate:s,validationBehavior:u="aria"}=i;t&&(e||(e=t==="invalid"));let o=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:cl}:null,f=a.useMemo(()=>{if(!s||n==null)return null;let K=gi(s,n);return Xe(K)},[s,n]);r!=null&&r.validationDetails.valid&&(r=void 0);let d=a.useContext(yi),h=a.useMemo(()=>l?Array.isArray(l)?l.flatMap(K=>Me(d[K])):Me(d[l]):[],[d,l]),[y,g]=a.useState(d),[m,P]=a.useState(!1);d!==y&&(g(d),P(!1));let D=a.useMemo(()=>Xe(m?[]:h),[m,h]),E=a.useRef(oe),[S,w]=a.useState(oe),I=a.useRef(oe),B=()=>{if(!F)return;C(!1);let K=f||r||E.current;ve(K,I.current)||(I.current=K,w(K))},[F,C]=a.useState(!1);return a.useEffect(B),{realtimeValidation:o||D||f||r||oe,displayValidation:u==="native"?o||D||S:o||D||f||r||S,updateV
1alidation(K){u==="aria"&&!ve(S,K)?w(K):E.current=K},resetValidation(){let K=oe;ve(K,I.current)||(I.current=K,w(K)),u==="native"&&C(!1),P(!0)},commitValidation(){u==="native"&&C(!0),P(!0)}}}function Me(i){return i?Array.isArray(i)?i:[i]:[]}function gi(i,e){if(typeof i=="function"){let t=i(e);if(t&&typeof t!="boolean")return Me(t)}return[]}function Xe(i){return i.length?{isInvalid:!0,validationErrors:i,validationDetails:cl}:null}function ve(i,e){return i===e?!0:!!i&&!!e&&i.isInvalid===e.isInvalid&&i.validationErrors.length===e.validationErrors.length&&i.validationErrors.every((t,l)=>t===e.validationErrors[l])&&Object.entries(i.validationDetails).every(([t,l])=>e.validationDetails[t]===l)}const yn=a.createContext(null);function pn(i){let{description:e,errorMessage:t,isInvalid:l,validationState:n}=i,{labelProps:r,fieldProps:s}=ol(i),u=ye([!!e,!!t,l,n]),o=ye([!!e,!!t,l,n]);return s=W(s,{"aria-describedby":[u,o,i["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:r,fieldProps:s,descriptionProps:{id:u},errorMessageProps:{id:o}}}function gn(i,e,t){let l=Q(n=>{t&&!n.defaultPrevented&&t(e)});a.useEffect(()=>{var r;let n=(r=i==null?void 0:i.current)==null?void 0:r.form;return n==null||n.addEventListener("reset",l),()=>{n==null||n.removeEventListener("reset",l)}},[i])}function $n(i,e,t){let{validationBehavior:l,focus:n}=i;ie(()=>{if(l==="native"&&(t!=null&&t.current)&&!t.current.disabled){let f=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t.current.setCustomValidity(f),t.current.hasAttribute("title")||(t.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(vi(t.current))}});let r=a.useRef(!1),s=Q(()=>{r.current||e.resetValidation()}),u=Q(f=>{var h,y;e.displayValidation.isInvalid||e.commitValidation();let d=(h=t==null?void 0:t.current)==null?void 0:h.form;!f.defaultPrevented&&t&&d&&mi(d)===t.current&&(n?n():(y=t.current)==null||y.focus(),Dl("keyboard")),f.preventDefault()}),o=Q(()=>{e.commitValidation()});a.useEffect(()=>{let f=t==null?void 0:t.current;if(!f)return;let d=f.form,h=d==null?void 0:d.reset;return d&&(d.reset=()=>{r.current=!window.event||window.event.type==="message"&&q(window.event)instanceof MessagePort,h==null||h.call(d),r.current=!1}),f.addEventListener("invalid",u),f.addEventListener("change",o),d==null||d.addEventListener("reset",s),()=>{f.removeEventListener("invalid",u),f.removeEventListener("change",o),d==null||d.removeEventListener("reset",s),d&&(d.reset=h)}},[t,l])}function $i(i){let e=i.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 vi(i){return{isInvalid:!i.validity.valid,validationDetails:$i(i),validationErrors:i.validationMessage?[i.validationMessage]:[]}}function mi(i){var e;for(let t=0;t<i.elements.length;t++){let l=i.elements[t];if(((e=l.validity)==null?void 0:e.valid)===!1)return l}return null}const ge=a.createContext({}),ul=a.createContext(null),xi=a.forwardRef(function(e,t){let{render:l}=a.useContext(ul);return p.createElement(p.Fragment,null,l(e,t))});function dl(i,e){var r;let t=i==null?void 0:i.renderDropIndicator,l=(r=i==null?void 0:i.isVirtualDragging)==null?void 0:r.call(i),n=a.useCallback(s=>{if(l||e!=null&&e.isDropTarget(s))return t?t(s):p.createElement(xi,{target:s})},[e==null?void 0:e.target,l,t]);return i!=null&&i.useDropIndicator?n:void 0}function Si(i,e,t){var r,s,u;let l=i.focusedKey,n=null;if((r=e==null?void 0:e.isVirtualDragging)!=null&&r.call(e)&&((s=t==null?void 0:t.target)==null?void 0:s.type)==="item"&&(n=t.target.key,t.target.dropPosition==="after")){let o=t.collection.getKeyAfter(n),f=null;if(o!=null){let d=((u=t.collection.getItem(n))==null?void 0:u.level)??0;for(;o;){let h=t.collection.getItem(o);if(!h)break;if(h.type!=="item"){o=t.collection.getKeyAfter(o);continue}if((h.level??0)<=d)break;f=o,o=t.collection.getKeyAfter(o)}}n=o??f??n}return a.useMemo(()=>new Set([l,n].filter(o=>o!=null)),[l,n])}const Ki=a.createContext({}),Ci=a.createContext(null);function wi(i){let e=a.useRef({});return p.createElement(Ci.Provider,{value:e},i.children)}const Pi=a.createContext({isSelected:!1}),Di=a.createContext({}),Ne=class Ne extends ft{filter(e,t){let l=t.getItem(this.prevKey);if(l&&l.type!=="separator"){let n=this.clone();return t.addDescendants(n,e),n}return null}};Ne.type="separator";let Ze=Ne;const Ve=new WeakMap;function Ei(i){return typeof i=="string"?i.replace(/\s*/g,""):""+i}function Ii(i,e){let t=Ve.get(i);if(!t)throw new Error("Unknown list");return`${t.id}-option-${Ei(e)}`}function ke(i){return El()?i.altKey:i.ctrlKey}function he(i,e){var n,r;let t=`[data-key="${CSS.escape(String(e))}"]`,l=(n=i.current)==null?void 0:n.dataset.collection;return l&&(t=`[data-collection="${CSS.escape(l)}"]${t}`),(r=i.current)==null?void 0:r.querySelector(t)}const fl=new WeakMap;function Fi(i){let e=ee();return fl.set(i,e),e}function Mi(i){return fl.get(i)}const ki=1e3;function Li(i){let{keyboardDelegate:e,selectionManager:t,onTypeSelect:l}=i,n=a.useRef({search:"",timeout:void 0}).current,r=s=>{let u=Ri(s.key);if(!(!u||s.ctrlKey||s.metaKey||!ae(s.currentTarget,q(s))||n.search.length===0&&u===" ")){if(u===" "&&n.search.trim().length>0&&(s.preventDefault(),"continuePropagation"in s||s.stopPropagation()),n.search+=u,e.getKeyForSearch!=null){let o=e.getKeyForSearch(n.search,t.focusedKey);o==null&&(o=e.getKeyForSearch(n.search)),o!=null&&(t.setFocusedKey(o),l&&l(o))}clearTimeout(n.timeout),n.timeout=setTimeout(()=>{n.search=""},ki)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?r:void 0}}}function Ri(i){return i.length===1||!/^[A-Z]/i.test(i)?i:""}function Je(i,e){const t=a.useRef(!0),l=a.useRef(null);ie(()=>(t.current=!0,()=>{t.current=!1}),[]),ie(()=>{t.current?t.current=!1:(!l.current||e.some((n,r)=>!Object.is(n,l[r])))&&i(),l.current=e},e)}function Bi(i){let{selectionManager:e,keyboardDelegate:t,ref:l,autoFocus:n=!1,shouldFocusWrap:r=!1,disallowEmptySelection:s=!1,disallowSelectAll:u=!1,escapeKeyBehavior:o="clearSelection",selectOnFocus:f=e.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:h,allowsTabNavigation:y=!1,scrollRef:g=l,linkBehavior:m="action"}=i,{direction:P}=Be(),D=ht(),E=b=>{var R,A,V,_,c,v,O,z,j,N,G,Y,Ue,_e;if(b.altKey&&b.key==="Tab"&&b.preventDefault(),!l.current||!ae(l.current,q(b)))return;const x=($,X)=>{if($!=null){if(e.isLink($)&&m==="selection"&&f&&!ke(b)){$t.flushSync(()=>{e.setFocusedKey($,X)});let Z=he(l,$),se=e.getItemProps($);Z&&D.open(Z,b,se.href,se.routerOptions);return}if(e.setFocusedKey($,X),e.isLink($)&&m==="override")return;b.shiftKey&&e.selectionMode==="multiple"?e.extendSelection($):f&&!ke(b)&&e.replaceSelection($)}};switch(b.key){case"ArrowDown":if(t.getKeyBelow){let $=e.focusedKey!=null?(R=t.getKeyBelow)==null?void 0:R.call(t,e.focusedKey):(A=t.getFirstKey)==null?void 0:A.call(t);$==null&&r&&($=(V=t.getFirstKey)==null?void 0:V.call(t,e.focusedKey)),$!=null&&(b.preventDefault(),x($))}break;case"ArrowUp":if(t.getKeyAbove){let $=e.focusedKey!=null?(_=t.getKeyAbove)==null?void 0:_.call(t,e.focusedKey):(c=t.getLastKey)==null?void 0:c.call(t);$==null&&r&&($=(v=t.getLastKey)==null?void 0:v.call(t,e.focusedKey)),$!=null&&(b.preventDefault(),x($))}break;case"ArrowLeft":if(t.getKeyLeftOf){let $=e.focusedKey!=null?(O=t.getKeyLeftOf)==null?void 0:O.call(t,e.focusedKey):(z=t.getFirstKey)==null?void 0:z.call(t);$==null&&r&&($=P==="rtl"?(j=t.getFirstKey)==null?void 0:j.call(t,e.focusedKey):(N=t.getLastKey)==null?void 0:N.call(t,e.focusedKey)),$!=null&&(b.preventDefault(),x($,P==="rtl"?"first":"last"))}break;case"ArrowRight":if(t.getKeyRightOf){let $=e.focusedKey!=null?(G=t.getKeyRightOf)==null?void 0:G.call(t,e.focusedKey):(Y=t.getFirstKey)==null?void 0:Y.call(t);$==null&&r&&($=P==="rtl"?(Ue=t.getLastKey)==null?void 0:Ue.call(t,e.focusedKey):(_e=t.getFirstKey)==null?void 0:_e.call(t,e.focusedKey)),$!=null&&(b.preventDefault(),x($,P==="rtl"?"last":"first"))}break;case"Home":if(t.getFirstKey){if(e.focusedKey===null&&b.shiftKey)return;b.preventDefault();let $=t.getFirstKey(e.focusedKey,J(b));e.setFocusedKey($),$!=null&&(J(b)&&b.shiftKey&&e.selectionMode==="multiple"?e.extendSelection($):f&&e.replaceSelection($))}break;case"End":if(t.getLastKey){if(e.focusedKey===null&&b.shiftKey)return;b.preventDefault();let $=t.getLastKey(e.focusedKey,J(b));e.setFocusedKey($),$!=null&&(J(b)&&b.shiftKey&&e.selectionMode==="multiple"?e.extendSelection($):f&&e.replaceSelection($))}break;case"PageDown":if(t.getKeyPageBelow&&e.focusedKey!=null){let $=t.getKeyPageBelow(e.focusedKey);$!=null&&(b.preventDefault(),x($))}break;case"PageUp":if(t.getKeyPageAbove&&e.focusedKey!=null){let $=t.getKeyPageAbove(e.focusedKey);$!=null&&(b.preventDefault(),x($))}break;case"a":J(b)&&e.selectionMode==="multiple"&&u!==!0&&(b.preventDefault(),e.selectAll());break;case"Escape":o==="clearSelection"&&!s&&e.selectedKeys.size!==0&&(b.stopPropagation(),b.preventDefault(),e.clearSelection());break;case"Tab":if(!y){if(b.shiftKey)l.current.focus();else{let $=Il(l.current,{tabbable:!0}),X,Z;do Z=$.lastChild(),Z&&(X=Z);while(Z);let se=le();X&&(!We(X)||se&&!Fl(se))&&Pe(X)}break}}},S=a.useRef({top:0,left:0});ce(g,"scroll",()=>{var b,x;
1S.current={top:((b=g.current)==null?void 0:b.scrollTop)??0,left:((x=g.current)==null?void 0:x.scrollLeft)??0}});let w=b=>{var x,R;if(e.isFocused){ae(b.currentTarget,q(b))||e.setFocused(!1);return}if(ae(b.currentTarget,q(b))){if(e.setFocused(!0),e.focusedKey==null){let A=_=>{_!=null&&(e.setFocusedKey(_),f&&!e.isSelected(_)&&e.replaceSelection(_))},V=b.relatedTarget;V&&b.currentTarget.compareDocumentPosition(V)&Node.DOCUMENT_POSITION_FOLLOWING?A(e.lastSelectedKey??((x=t.getLastKey)==null?void 0:x.call(t))):A(e.firstSelectedKey??((R=t.getFirstKey)==null?void 0:R.call(t)))}else g.current&&(g.current.scrollTop=S.current.top,g.current.scrollLeft=S.current.left);if(e.focusedKey!=null&&g.current){let A=he(l,e.focusedKey);A instanceof HTMLElement&&(!We(A)&&!h&&Pe(A),Ke()==="keyboard"&&Ye(A,{containingElement:l.current}))}}},I=b=>{ae(b.currentTarget,b.relatedTarget)||e.setFocused(!1)},B=a.useRef(!1);ce(l,De,h?b=>{let{detail:x}=b;b.stopPropagation(),e.setFocused(!0),(x==null?void 0:x.focusStrategy)==="first"&&(B.current=!0)}:void 0),Je(()=>{var b;if(B.current){let x=((b=t.getFirstKey)==null?void 0:b.call(t))??null;if(x==null){let R=le();Te(l.current),pe(R,null),e.collection.size>0&&(B.current=!1)}else e.setFocusedKey(x),B.current=!1}},[e.collection]),Je(()=>{e.collection.size>0&&(B.current=!1)},[e.focusedKey]),ce(l,vt,h?b=>{var x;b.stopPropagation(),e.setFocused(!1),(x=b.detail)!=null&&x.clearFocusKey&&e.setFocusedKey(null)}:void 0);const F=a.useRef(n),C=a.useRef(!1);a.useEffect(()=>{var b,x;if(F.current){let R=null;n==="first"&&(R=((b=t.getFirstKey)==null?void 0:b.call(t))??null),n==="last"&&(R=((x=t.getLastKey)==null?void 0:x.call(t))??null);let A=e.selectedKeys;if(A.size){for(let V of A)if(e.canSelectItem(V)){R=V;break}}e.setFocused(!0),e.setFocusedKey(R),R==null&&!h&&l.current&&we(l.current),e.collection.size>0&&(F.current=!1,C.current=!0)}});let T=a.useRef(e.focusedKey),k=a.useRef(null);a.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==T.current||C.current)&&g.current&&l.current){let b=Ke(),x=he(l,e.focusedKey);if(!(x instanceof HTMLElement))return;(b==="keyboard"||C.current)&&(k.current&&cancelAnimationFrame(k.current),k.current=requestAnimationFrame(()=>{g.current&&(Fe(g.current,x),b!=="virtual"&&Ye(x,{containingElement:l.current}))}))}!h&&e.isFocused&&e.focusedKey==null&&T.current!=null&&l.current&&we(l.current),T.current=e.focusedKey,C.current=!1}),a.useEffect(()=>()=>{k.current&&cancelAnimationFrame(k.current)},[]),ce(l,"react-aria-focus-scope-restore",b=>{b.preventDefault(),e.setFocused(!0)});let K={onKeyDown:E,onFocus:w,onBlur:I,onMouseDown(b){g.current===q(b)&&b.preventDefault()}},{typeSelectProps:L}=Li({keyboardDelegate:t,selectionManager:e});d||(K=W(L,K));let U;h||(U=e.focusedKey==null?0:-1);let M=Fi(e.collection);return{collectionProps:W(K,{tabIndex:U,"data-collection":M})}}class et{constructor(e){this.ref=e}getItemRect(e){let t=this.ref.current;if(!t)return null;let l=e!=null?he(this.ref,e):null;if(!l)return null;let n=t.getBoundingClientRect(),r=l.getBoundingClientRect();return{x:r.left-n.left-t.clientLeft+t.scrollLeft,y:r.top-n.top-t.clientTop+t.scrollTop,width:r.width,height:r.height}}getContentSize(){let e=this.ref.current;return{width:(e==null?void 0:e.scrollWidth)??0,height:(e==null?void 0:e.scrollHeight)??0}}getVisibleRect(){let e=this.ref.current;return{x:(e==null?void 0:e.scrollLeft)??0,y:(e==null?void 0:e.scrollTop)??0,width:(e==null?void 0:e.clientWidth)??0,height:(e==null?void 0:e.clientHeight)??0}}}class hl{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 et(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 et(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){var t;return this.disabledBehavior==="all"&&(((t=e.props)==null?void 0:t.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){let l=e;for(;l!=null;){let n=this.collection.getItem(l);if((n==null?void 0:n.type)==="item"&&!this.isDisabled(n))return l;l=t(l)}return null}getNextKey(e){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,l=>this.collection.getKeyAfter(l))}getPreviousKey(e){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,l=>this.collection.getKeyBefore(l))}findKey(e,t,l){let n=e,r=this.layoutDelegate.getItemRect(n);if(!r||n==null)return null;let s=r;do{if(n=t(n),n==null)break;r=this.layoutDelegate.getItemRect(n)}while(r&&l(s,r)&&n!=null);return n}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)}
1getKeyAbove(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,l=>this.layoutDelegate[t](l))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,l=>this.getNextColumn(l,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,l=>this.layoutDelegate[t](l))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,l=>this.getNextColumn(l,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,l=this.layoutDelegate.getItemRect(e);if(!l)return null;if(t&&!Ce(t))return this.getFirstKey();let n=e;if(this.orientation==="horizontal"){let r=Math.max(0,l.x+l.width-this.layoutDelegate.getVisibleRect().width);for(;l&&l.x>r&&n!=null;)n=this.getKeyAbove(n),l=n==null?null:this.layoutDelegate.getItemRect(n)}else{let r=Math.max(0,l.y+l.height-this.layoutDelegate.getVisibleRect().height);for(;l&&l.y>r&&n!=null;)n=this.getKeyAbove(n),l=n==null?null:this.layoutDelegate.getItemRect(n)}return n??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,l=this.layoutDelegate.getItemRect(e);if(!l)return null;if(t&&!Ce(t))return this.getLastKey();let n=e;if(this.orientation==="horizontal"){let r=Math.min(this.layoutDelegate.getContentSize().width,l.x-l.width+this.layoutDelegate.getVisibleRect().width);for(;l&&l.x<r&&n!=null;)n=this.getKeyBelow(n),l=n==null?null:this.layoutDelegate.getItemRect(n)}else{let r=Math.min(this.layoutDelegate.getContentSize().height,l.y-l.height+this.layoutDelegate.getVisibleRect().height);for(;l&&l.y<r&&n!=null;)n=this.getKeyBelow(n),l=n==null?null:this.layoutDelegate.getItemRect(n)}return n??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let l=this.collection,n=t||this.getFirstKey();for(;n!=null;){let r=l.getItem(n);if(!r)return null;let s=r.textValue.slice(0,e.length);if(r.textValue&&this.collator.compare(s,e)===0)return n;n=this.getNextKey(n)}return null}}let me=new Map;function bl(i){let{locale:e}=Be(),t=e+(i?Object.entries(i).sort((n,r)=>n[0]<r[0]?-1:1).join():"");if(me.has(t))return me.get(t);let l=new Intl.Collator(e,i);return me.set(t,l),l}function Ti(i){let{selectionManager:e,collection:t,disabledKeys:l,ref:n,keyboardDelegate:r,layoutDelegate:s,orientation:u}=i,o=bl({usage:"search",sensitivity:"base"}),f=e.disabledBehavior,d=a.useMemo(()=>r||new hl({collection:t,disabledKeys:l,disabledBehavior:f,ref:n,collator:o,layoutDelegate:s,orientation:u}),[r,s,t,l,n,o,f,u]),{collectionProps:h}=Bi({...i,ref:n,selectionManager:e,keyboardDelegate:d});return{listProps:h}}function Ai(i,e,t){let l=re(i,{labelable:!0}),n=i.selectionBehavior||"toggle",r=i.orientation||"vertical",s=i.linkBehavior||(n==="replace"?"action":"override");n==="toggle"&&s==="action"&&(s="override");let{listProps:u}=Ti({...i,ref:t,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,linkBehavior:s}),{focusWithinProps:o}=Ml({onFocusWithin:i.onFocus,onBlurWithin:i.onBlur,onFocusWithinChange:i.onFocusChange}),f=ee(i.id);Ve.set(e,{id:f,shouldUseVirtualFocus:i.shouldUseVirtualFocus,shouldSelectOnPressUp:i.shouldSelectOnPressUp,shouldFocusOnHover:i.shouldFocusOnHover,isVirtualized:i.isVirtualized,onAction:i.onAction,linkBehavior:s,UNSTABLE_itemBehavior:i.UNSTABLE_itemBehavior});let{labelProps:d,fieldProps:h}=ol({...i,id:f,labelElementType:"span"});return{labelProps:d,listBoxProps:W(l,o,e.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox","aria-orientation":r,...W(h,u)})}}const Vi=500;function Oi(i){let{isDisabled:e,onLongPressStart:t,onLongPressEnd:l,onLongPress:n,threshold:r=Vi,accessibilityDescription:s}=i;const u=a.useRef(void 0);let{addGlobalListener:o,removeGlobalListener:f}=kl(),{pressProps:d}=bt({isDisabled:e,onPressStart(y){if(y.continuePropagation(),(y.pointerType==="mouse"||y.pointerType==="touch")&&(t&&t({...y,type:"longpressstart"}),u.current=setTimeout(()=>{y.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),be(y.target).activeElement!==y.target&&Pe(y.target),n&&n({...y,type:"longpress"}),u.current=void 0},r),y.pointerType==="touch")){let g=P=>{P.preventDefault()},m=Ll(y.target);o(y.target,"contextmenu",g,{once:!0}),o(m,"pointerup",()=>{setTimeout(()=>{f(y.target,"contextmenu",g)},30)},{once:!0})}},onPressEnd(y){u.current&&clearTimeout(u.current),l&&(y.pointerType==="mouse"||y.pointerType==="touch")&&l({...y,type:"longpressend"})}}),h=bi(n&&!e?s:void 0);return{longPressProps:W(d,h)}}function Ni(i){let{id:e,selectionManager:t,key:l,ref:n,shouldSelectOnPressUp:r,shouldUseVirtualFocus:s,focus:u,isDisabled:o,onAction:f,allowsDifferentPressOrigin:d,linkBehavior:h="action"}=i,y=ht();e=ee(e);let g=c=>{if(c.pointerType==="keyboard"&&ke(c))t.toggleSelection(l);else{if(t.selectionMode==="none")return;
1if(t.isLink(l)){if(h==="selection"&&n.current){let v=t.getItemProps(l);y.open(n.current,c,v.href,v.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(h==="override"||h==="none")return}t.selectionMode==="single"?t.isSelected(l)&&!t.disallowEmptySelection?t.toggleSelection(l):t.replaceSelection(l):c&&c.shiftKey?t.extendSelection(l):t.selectionBehavior==="toggle"||c&&(J(c)||c.pointerType==="touch"||c.pointerType==="virtual")?t.toggleSelection(l):t.replaceSelection(l)}};a.useEffect(()=>{l===t.focusedKey&&t.isFocused&&(s?Te(n.current):u?u():le()!==n.current&&n.current&&we(n.current))},[n,l,t.focusedKey,t.childFocusStrategy,t.isFocused,s]),o=o||t.isDisabled(l);let m={};!s&&!o?m={tabIndex:l===t.focusedKey?0:-1,onFocus(c){q(c)===n.current&&t.setFocusedKey(l)}}:o&&(m.onMouseDown=c=>{c.preventDefault()}),a.useEffect(()=>{o&&t.focusedKey===l&&t.setFocusedKey(null)},[t,o,l]);let P=t.isLink(l)&&h==="override",D=f&&i.UNSTABLE_itemBehavior==="action",E=t.isLink(l)&&h!=="selection"&&h!=="none",S=!o&&t.canSelectItem(l)&&!P&&!D,w=(f||E)&&!o,I=w&&(t.selectionBehavior==="replace"?!S:!S||t.isEmpty),B=w&&S&&t.selectionBehavior==="replace",F=I||B,C=a.useRef(null),T=F&&S,k=a.useRef(!1),K=a.useRef(!1),L=t.getItemProps(l),U=c=>{var v;f&&(f(),(v=n.current)==null||v.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),E&&n.current&&y.open(n.current,c,L.href,L.routerOptions)},M={ref:n};if(r?(M.onPressStart=c=>{C.current=c.pointerType,k.current=T,c.pointerType==="keyboard"&&(!F||lt(c.key))&&g(c)},d?(M.onPressUp=I?void 0:c=>{c.pointerType==="mouse"&&S&&g(c)},M.onPress=I?U:c=>{c.pointerType!=="keyboard"&&c.pointerType!=="mouse"&&S&&g(c)}):M.onPress=c=>{if(I||B&&c.pointerType!=="mouse"){if(c.pointerType==="keyboard"&&!tt(c.key))return;U(c)}else c.pointerType!=="keyboard"&&S&&g(c)}):(M.onPressStart=c=>{C.current=c.pointerType,k.current=T,K.current=I,S&&(c.pointerType==="mouse"&&!I||c.pointerType==="keyboard"&&(!w||lt(c.key)))&&g(c)},M.onPress=c=>{(c.pointerType==="touch"||c.pointerType==="pen"||c.pointerType==="virtual"||c.pointerType==="keyboard"&&F&&tt(c.key)||c.pointerType==="mouse"&&K.current)&&(F?U(c):S&&g(c))}),m["data-collection"]=Mi(t.collection),m["data-key"]=l,M.preventFocusOnPress=s,s&&(M=W(M,{onPressStart(c){c.pointerType!=="touch"&&(t.setFocused(!0),t.setFocusedKey(l))},onPress(c){c.pointerType==="touch"&&(t.setFocused(!0),t.setFocusedKey(l))}})),L)for(let c of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])L[c]&&(M[c]=yt(M[c],L[c]));let{pressProps:b,isPressed:x}=bt(M),R=B?c=>{C.current==="mouse"&&(c.stopPropagation(),c.preventDefault(),U(c))}:void 0,{longPressProps:A}=Oi({isDisabled:!T,onLongPress(c){c.pointerType==="touch"&&(g(c),t.setSelectionBehavior("toggle"))}}),V=c=>{C.current==="touch"&&k.current&&c.preventDefault()},_=h!=="none"&&t.isLink(l)?c=>{Rl.isOpening||c.preventDefault()}:void 0;return{itemProps:W(m,S||I||s&&!o?b:{},T?A:{},{onDoubleClick:R,onDragStartCapture:V,onClick:_,id:e},s?{onMouseDown:c=>c.preventDefault()}:void 0),isPressed:x,isSelected:t.isSelected(l),isFocused:t.isFocused&&t.focu
1sedKey===l,isDisabled:o,allowsSelection:S,hasAction:F}}function tt(i){return i==="Enter"}function lt(i){return i===" "}function yl(i,e){return typeof e.getChildren=="function"?e.getChildren(i.key):i.childNodes}function Ui(i){return _i(i)}function _i(i,e){for(let t of i)return t}function xe(i,e,t){if(e.parentKey===t.parentKey)return e.index-t.index;let l=[...it(i,e),e],n=[...it(i,t),t],r=l.slice(0,n.length).findIndex((s,u)=>s!==n[u]);return r!==-1?(e=l[r],t=n[r],e.index-t.index):l.findIndex(s=>s===t)>=0?1:(n.findIndex(s=>s===e)>=0,-1)}function it(i,e){let t=[],l=e;for(;(l==null?void 0:l.parentKey)!=null;)l=i.getItem(l.parentKey),l&&t.unshift(l);return t}const nt=new WeakMap;function zi(i){let e=nt.get(i);if(e!=null)return e;let t=0,l=n=>{for(let r of n)r.type==="section"?l(yl(r,i)):r.type==="item"&&t++};return l(i),nt.set(i,t),t}function Wi(i,e,t){var k,K;let{key:l}=i,n=Ve.get(e),r=i.isDisabled??e.selectionManager.isDisabled(l),s=i.isSelected??e.selectionManager.isSelected(l),u=i.shouldSelectOnPressUp??(n==null?void 0:n.shouldSelectOnPressUp),o=i.shouldFocusOnHover??(n==null?void 0:n.shouldFocusOnHover),f=i.shouldUseVirtualFocus??(n==null?void 0:n.shouldUseVirtualFocus),d=i.isVirtualized??(n==null?void 0:n.isVirtualized),h=ye(),y=ye(),g={role:"option","aria-disabled":r||void 0,"aria-selected":e.selectionManager.selectionMode!=="none"?s:void 0,"aria-label":i["aria-label"],"aria-labelledby":h,"aria-describedby":y},m=e.collection.getItem(l);if(d){let L=Number(m==null?void 0:m.index);g["aria-posinset"]=Number.isNaN(L)?void 0:L+1,g["aria-setsize"]=zi(e.collection)}let P=n!=null&&n.onAction?()=>{var L;return(L=n==null?void 0:n.onAction)==null?void 0:L.call(n,l)}:void 0,D=Ii(e,l),{itemProps:E,isPressed:S,isFocused:w,hasAction:I,allowsSelection:B}=Ni({selectionManager:e.selectionManager,key:l,ref:t,shouldSelectOnPressUp:u,allowsDifferentPressOrigin:u&&o,isVirtualized:d,shouldUseVirtualFocus:f,isDisabled:r,onAction:P||(k=m==null?void 0:m.props)!=null&&k.onAction?yt((K=m==null?void 0:m.props)==null?void 0:K.onAction,P):void 0,linkBehavior:n==null?void 0:n.linkBehavior,UNSTABLE_itemBehavior:n==null?void 0:n.UNSTABLE_itemBehavior,id:D}),{hoverProps:F}=pt({isDisabled:r||!o,onHoverStart(){qe()||(e.selectionManager.setFocused(!0),e.selectionManager.setFocusedKey(l))}}),C=re(m==null?void 0:m.props);delete C.id;let T=Bl(m==null?void 0:m.props);return{optionProps:{...g,...W(C,E,F,T),id:D},labelProps:{id:h},descriptionProps:{id:y},isFocused:w,isFocusVisible:w&&e.selectionManager.isFocused&&qe(),isSelected:s,isDisabled:r,isPressed:S,allowsSelection:B,hasAction:I}}function qi(i){let{heading:e,"aria-label":t}=i,l=ee();return{itemProps:{role:"presentation"},headingProps:e?{id:l,role:"presentation",onMouseDown:n=>{n.preventDefault()}}:{},groupProps:{role:"group","aria-label":t,"aria-labelledby":e?l:void 0}}}function Hi(i){const e=a.version.split(".");return parseInt(e[0],10)>=19?i:i?"true":void 0}class rt{constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&s.type==="section")for(let u of s.childNodes)t(u)};for(let s of e)t(s);let l=null,n=0,r=0;for(let[s,u]of this.keyMap)l?(l.nextKey=s,u.prevKey=l.key):(this.firstKey=s,u.prevKey=void 0),u.type==="item"&&(u.index=n++),(u.type==="section"||u.type==="item")&&r++,l=u,l.nextKey=void 0;this._size=r,this.lastKey=(l==null?void 0:l.key)??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??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)||[]}}class H extends Set{constructor(e,t,l){super(e),e instanceof H?(this.anchorKey=t??e.anchorKey,this.currentKey=l??e.currentKey):(this.anchorKey=t??null,this.currentKey=l??null)}}function ji(i,e){if(i.size!==e.size)return!1;for(let t of i)if(!e.has(t))return!1;return!0}function Gi(i){let{selectionMode:e="none",disallowEmptySelection:t=!1,allowDuplicateSelectionEvents:l,selectionBehavior:n="toggle",disabledBehavior:r="all"}=i,s=a.useRef(!1),[,u]=a.useState(!1),o=a.useRef(null),f=a.useRef(null),[,d]=a.use
1State(null),h=a.useMemo(()=>st(i.selectedKeys),[i.selectedKeys]),y=a.useMemo(()=>st(i.defaultSelectedKeys,new H),[i.defaultSelectedKeys]),[g,m]=ut(h,y,i.onSelectionChange),P=a.useMemo(()=>i.disabledKeys?new Set(i.disabledKeys):new Set,[i.disabledKeys]),[D,E]=a.useState(n);n==="replace"&&D==="toggle"&&typeof g=="object"&&g.size===0&&E("replace");let S=a.useRef(n);return a.useEffect(()=>{n!==S.current&&(E(n),S.current=n)},[n]),{selectionMode:e,disallowEmptySelection:t,selectionBehavior:D,setSelectionBehavior:E,get isFocused(){return s.current},setFocused(w){s.current=w,u(w)},get focusedKey(){return o.current},get childFocusStrategy(){return f.current},setFocusedKey(w,I="first"){o.current=w,f.current=I,d(w)},selectedKeys:g,setSelectedKeys(w){(l||!ji(w,g))&&m(w)},disabledKeys:P,disabledBehavior:r}}function st(i,e){return i?i==="all"?"all":new H(i):e}class Oe{constructor(e,t,l){this.collection=e,this.state=t,this.allowsCellSelection=(l==null?void 0:l.allowsCellSelection)??!1,this._isSelectAll=null,this.layoutDelegate=(l==null?void 0:l.layoutDelegate)||null,this.fullCollection=(l==null?void 0:l.fullCollection)||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,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(l=>t.has(l)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let l=this.collection.getItem(t);(!e||l&&xe(this.collection,l,e)<0)&&(e=l)}return(e==null?void 0:e.key)??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let l=this.collection.getItem(t);(!e||l&&xe(this.collection,l,e)>0)&&(e=l)}return(e==null?void 0:e.key)??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let l;if(this.state.selectedKeys==="all")l=new H([t],t,t);else{let n=this.state.selectedKeys,r=n.anchorKey??t;l=new H(n,r,t);for(let s of this.getKeyRange(r,n.currentKey??t))l.delete(s);for(let s of this.getKeyRange(t,r))this.canSelectItem(s)&&l.add(s)}this.state.setSelectedKeys(l)}getKeyRange(e,t){let l=this.collection.getItem(e),n=this.collection.getItem(t);return l&&n?xe(this.collection,l,n)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){var r;if((r=this.layoutDelegate)!=null&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let l=[],n=e;for(;n!=null;){let s=this.collection.getItem(n);if(s&&(s.type==="item"||s.type==="cell"&&this.allowsCellSelection)&&l.push(n),n===t)return l;n=this.collection.getKeyAfter(n)}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;
1let l=new H(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);l.has(t)?l.delete(t):this.canSelectItem(t)&&(l.add(t),l.anchorKey=t,l.currentKey=t),!(this.disallowEmptySelection&&l.size===0)&&this.state.setSelectedKeys(l)}replaceSelection(e){if(this.selectionMode==="none")return;let t=this.getKey(e);if(t==null)return;let l=this.canSelectItem(t)?new H([t],t,t):new H;this.state.setSelectedKeys(l)}setSelectedKeys(e){if(this.selectionMode==="none")return;let t=new H;for(let l of e){let n=this.getKey(l);if(n!=null&&(t.add(n),this.selectionMode==="single"))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=this.fullCollection??this.collection,t=[],l=n=>{var r;for(;n!=null;){if(this.canSelectItemIn(n,e)){let s=e.getItem(n);(s==null?void 0:s.type)==="item"&&t.push(n),s!=null&&s.hasChildNodes&&(this.allowsCellSelection||s.type!=="item")&&l(((r=Ui(yl(s,e)))==null?void 0:r.key)??null)}n=e.getKeyAfter(n)}};return l(e.getFirstKey()),t}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 H)}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 l of e)if(!t.has(l))return!1;for(let l of t)if(!e.has(l))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let l=t.getItem(e);return!(!l||(n=l==null?void 0:l.props)!=null&&n.isDisabled||l.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var t,l;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!((l=(t=this.collection.getItem(e))==null?void 0:t.props)!=null&&l.isDisabled))}isLink(e){var t,l;return!!((l=(t=this.collection.getItem(e))==null?void 0:t.props)!=null&&l.href)}getItemProps(e){var t;return(t=this.collection.getItem(e))==null?void 0:t.props}withCollection(e){return new Oe(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class Yi{build(e,t){return this.context=t,ot(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:l}=e;if(p.isValidElement(t)&&t.type===p.Fragment)yield*this.iterateCollection({children:t.props.children,items:l});else if(typeof t=="function"){if(!l)throw new Error("props.children was a function but props.items is missing");let n=0;for(let r of l)yield*this.getFullNode({value:r,index:n},{renderer:t}),n++}else{let n=[];p.Children.forEach(t,s=>{s&&n.push(s)});let r=0;for(let s of n){let u=this.getFullNode({element:s,index:r},{});for(let o of u)r++,yield o}}}getKey(e,t,l,n){if(e.key!=null)return e.key;if(t.type==="cell"&&t.key!=null)return`${n}${t.key}`;let r=t.value;if(r!=null){let s=r.key??r.id;if(s==null)throw new Error("No key found for item");return s}return n?`${n}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,l,n){if(p.isValidElement(e.element)&&e.element.type===p.Fragment){let o=[];p.Children.forEach(e.element.props.children,d=>{o.push(d)});let f=e.index??0;for(const d of o)yield*this.getFullNode({element:d,index:f++},t,l,n);return}let r=e.element;if(!r&&e.value&&t&&t.renderer){let o=this.cache.get(e.value);if(o&&(!o.shouldInvalidate||!o.shouldInvalidate(this.context))){o.index=e.index,o.parentKey=n?n.key:null,yield o;return}r=t.renderer(e.value)}if(p.isValidElement(r)){let o=r.type;if(typeof o!="function"&&typeof o.getCollectionNode!="function"){let y=r.type;throw new Error(`Unknown element <${y}> in collection.`)}let f=o.getCollectionNode(r.props,this.context),d=e.index??0,h=f.next();for(;!h.done&&h.value;){let y=h.value;e.index=d;let g=y.key??null;g==null&&(g=y.element?null:this.getKey(r,e,t,l));let P=[...this.getFullNode({...y,key:g,index:d,wrapper:Qi(e.wrapper,y.wrapper)},this.getChildState(t,y),l?`${l}${r.key}`:r.key,n)];for(let D of P){if(D.value=y.value??e.value??null,D.value&&this.cache.set(D.value,D),e.type&&D.type!==e.type)throw new Error(`Unsupported type <${Se(D.type)}> in <${Se((n==null?void 0:n.type)??"unknown parent type")}>. Only <${Se(e.type)}> is supported.`);d++,yield D}h=f.next(P)}return}if(e.key==null||e.type==null)return;let s=this,u={type:e.type,props:e.props,key:e.key,parentKey:n?n.key:null,value:e.value??null,level:((n==null?void 0:n.level)??0)+((n==null?void 0:n.type)==="item"?1:0),index:e.index,rendered:e.rendered,textValue:e.textValue??"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:ot(function*(){if(!e.hasChildNodes||!e.childNodes)return;let o=0;
1for(let f of e.childNodes()){f.key!=null&&(f.key=`${u.key}${f.key}`);let d=s.getFullNode({...f,index:o},s.getChildState(t,f),u.key,u);for(let h of d)o++,yield h}})};yield u}constructor(){this.cache=new WeakMap}}function ot(i){let e=[],t=null;return{*[Symbol.iterator](){for(let l of e)yield l;t||(t=i());for(let l of t)e.push(l),yield l}}}function Qi(i,e){if(i&&e)return t=>i(e(t));if(i)return i;if(e)return e}function Se(i){return i[0].toUpperCase()+i.slice(1)}function Xi(i,e,t){let l=a.useMemo(()=>new Yi,[]),{children:n,items:r,collection:s}=i;return a.useMemo(()=>{if(s)return s;let o=l.build({children:n,items:r},t);return e(o)},[l,n,r,s,t,e])}function Zi(i){let{filter:e,layoutDelegate:t}=i,l=Gi(i),n=a.useMemo(()=>i.disabledKeys?new Set(i.disabledKeys):new Set,[i.disabledKeys]),r=a.useCallback(f=>e?new rt(e(f)):new rt(f),[e]),s=a.useMemo(()=>({suppressTextValueWarning:i.suppressTextValueWarning}),[i.suppressTextValueWarning]),u=Xi(i,r,s),o=a.useMemo(()=>new Oe(u,l,{layoutDelegate:t}),[u,l,t]);return pl(u,o),{collection:u,disabledKeys:n,selectionManager:o}}function Ji(i,e){let t=a.useMemo(()=>e?i.collection.filter(e):i.collection,[i.collection,e]),l=i.selectionManager.withCollection(t);return pl(t,l),{collection:t,selectionManager:l,disabledKeys:i.disabledKeys}}function pl(i,e){const t=a.useRef(null);a.useEffect(()=>{if(e.focusedKey!=null&&!i.getItem(e.focusedKey)&&t.current){let l=t.current.getKeyAfter(e.focusedKey),n=null;for(;l!=null;){let r=i.getItem(l);if(r&&r.type==="item"&&!e.isDisabled(l)){n=l;break}l=t.current.getKeyAfter(l)}if(n==null)for(l=t.current.getKeyBefore(e.focusedKey);l!=null;){let r=i.getItem(l);if(r&&r.type==="item"&&!e.isDisabled(l)){n=l;break}l=t.current.getKeyBefore(l)}e.setFocusedKey(n)}t.current=i},[i,e])}function en(i,e){let{collection:t,onLoadMore:l,scrollOffset:n=1}=i,r=a.useRef(null),s=Q(u=>{for(let o of u)o.isIntersecting&&l&&l()});ie(()=>(e.current&&(r.current=new IntersectionObserver(s,{root:Tl(e==null?void 0:e.current),rootMargin:`0px ${100*n}% ${100*n}% ${100*n}%`}),r.current.observe(e.current)),()=>{r.current&&r.current.disconnect()}),[t,e,n])}const gl=a.createContext(null),fe=a.createContext(null),vn=a.forwardRef(function(e,t){[e,t]=gt(e,t,gl);let l=a.useContext(fe);return l?p.createElement($l,{state:l,props:e,listBoxRef:t}):p.createElement(Jl,{content:p.createElement(oi,e)},n=>p.createElement(tn,{props:e,listBoxRef:t,collection:n}))});function tn({props:i,listBoxRef:e,collection:t}){i={...i,collection:t,children:null,items:null};let{layoutDelegate:l}=a.useContext(Ae),n=Zi({...i,layoutDelegate:l});return p.createElement($l,{state:n,props:i,listBoxRef:e})}function $l({state:i,props:e,listBoxRef:t}){[e,t]=gt(e,t,ll);let{dragAndDropHooks:l,layout:n="stack",orientation:r="vertical",filter:s}=e,u=Ji(i,s),{collection:o,selectionManager:f}=u,d=!!(l!=null&&l.useDraggableCollectionState),h=!!(l!=null&&l.useDroppableCollectionState),{direction:y}=Be(),{disabledBehavior:g,disabledKeys:m}=f,P=bl({usage:"search",sensitivity:"base"}),{isVirtualized:D,layoutDelegate:E,dropTargetDelegate:S,CollectionRoot:w}=a.useContext(Ae),I=a.useMemo(()=>e.keyboardDelegate||new hl({collection:o,collator:P,ref:t,disabledKeys:m,disabledBehavior:g,layout:n,orientation:r,direction:y,layoutDelegate:E}),[o,P,t,g,m,r,y,e.keyboardDelegate,n,E]),{listBoxProps:B}=Ai({...e,shouldSelectOnPressUp:d||e.shouldSelectOnPressUp,keyboardDelegate:I,isVirtualized:D},u,t);a.useRef(d),a.useRef(h),a.useEffect(()=>{},[d,h]);let F,C,T,k=!1,K=null,L=a.useRef(null);if(d&&l){F=l.useDraggableCollectionState({collection:o,selectionManager:f,preview:l.renderDragPreview?L:void 0}),l.useDraggableCollection({},F,t);let c=l.DragPreview;K=l.renderDragPreview?p.createElement(c,{ref:L},l.renderDragPreview):null}if(h&&l){C=l.useDroppableCollectionState({collection:o,selectionManager:f});let c=l.dropTargetDelegate||S||new l.ListDropTargetDelegate(o,t,{orientation:r,layout:n,direction:y});T=l.useDroppableCollection({keyboardDelegate:I,dropTargetDelegate:c},C,t),k=C.isDropTarget({type:"root"})}let{focusProps:U,isFocused:M,isFocusVisible:b}=Al(),x=u.collection.size===0,R={isDropTarget:k,isEmpty:x,isFocused:M,isFocusVisible:b,layout:e.layout||"stack",orientation:r,state:u},A=de({...e,children:void 0,defaultClassName:"react-aria-ListBox",values:R}),V=null;x&&e.renderEmptyState&&(V=p.createElement("div",{role:"option",style:{display:"contents"}},e.renderEmptyState(R)));let _=re(e,{global:!0});return p.createElement(Vl,null,p.createElement(ne.div,{...W(_,A,B,U,T==null?void 0:T.collectionProps),ref:t,slot:e.slot||void 0,onScroll:e.onScroll,"data-drop-target":k||void 0,"data-empty":x||void 0,"data-focused":M||void 0,"data-focus-visible":b||void 0,"data-layout":e.layout||"stack","data-orientation":r},p.createElement(Re,{values:[[gl,e],[fe,u],[ge,{dragAndDropHooks:l,dragState:F,dropState:C}],[Di,{elementType:"div"}],[ul,{render:nn}],[ci,{name:"ListBoxSection",render:ln}]]},p.createElement(wi,null,p.createElement(w,{collection:o,scrollRef:t,persistedKeys:Si(f,l,C),renderDropIndicator:dl(l,C)}))),V,K))}function ln(i,e,t,l="react-aria-ListBoxSection"){let n=a.useContext(fe),{dragAndDropHooks:r,dropState:s}
1=a.useContext(ge),{CollectionBranch:u}=a.useContext(Ae),[o,f]=zl(),{headingProps:d,groupProps:h}=qi({heading:f,"aria-label":i["aria-label"]??void 0}),y=de({...i,id:void 0,children:void 0,defaultClassName:l,values:void 0}),g=re(i,{global:!0});return delete g.id,p.createElement(ne.section,{...W(g,y,h),ref:e},p.createElement(Ki.Provider,{value:{...d,ref:o}},p.createElement(u,{collection:n.collection,parent:t,renderDropIndicator:dl(r,s)})))}const mn=sl(Ol,function(e,t,l){let n=Le(t),r=a.useContext(fe),{dragAndDropHooks:s,dragState:u,dropState:o}=a.useContext(ge),{optionProps:f,labelProps:d,descriptionProps:h,...y}=Wi({key:l.key,"aria-label":e==null?void 0:e["aria-label"]},r,n),{hoverProps:g,isHovered:m}=pt({isDisabled:!y.allowsSelection&&!y.hasAction,onHoverStart:l.props.onHoverStart,onHoverChange:l.props.onHoverChange,onHoverEnd:l.props.onHoverEnd}),{keyboardProps:P}=Nl(e),{focusProps:D}=Ul(e),E=null;u&&s&&(E=s.useDraggableItem({key:l.key,hasAction:y.hasAction},u));let S=null;o&&s&&(S=s.useDroppableItem({target:{type:"item",key:l.key,dropPosition:"on"}},o,n));let w=u&&u.isDragging(l.key),I=de({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...y,isHovered:m,selectionMode:r.selectionManager.selectionMode,selectionBehavior:r.selectionManager.selectionBehavior,allowsDragging:!!u,isDragging:w,isDropTarget:S==null?void 0:S.isDropTarget}});a.useEffect(()=>{l.textValue},[l.textValue]);let B=e.href?ne.a:ne.div,F=re(e,{global:!0});return delete F.id,delete F.onClick,e.href&&f.tabIndex==null&&(f.tabIndex=-1),p.createElement(B,{...W(F,I,f,g,P,D,E==null?void 0:E.dragProps,S==null?void 0:S.dropProps),ref:n,"data-allows-dragging":!!u||void 0,"data-selected":y.isSelected||void 0,"data-disabled":y.isDisabled||void 0,"data-hovered":m||void 0,"data-focused":y.isFocused||void 0,"data-focus-visible":y.isFocusVisible||void 0,"data-pressed":y.isPressed||void 0,"data-dragging":w||void 0,"data-drop-target":(S==null?void 0:S.isDropTarget)||void 0,"data-selection-mode":r.selectionManager.selectionMode==="none"?void 0:r.selectionManager.selectionMode},p.createElement(Re,{values:[[fi,{slots:{[_l]:d,label:d,description:h}}],[Pi,{isSelected:y.isSelected}]]},I.children))});function nn(i,e){e=Le(e);let{dragAndDropHooks:t,dropState:l}=a.useContext(ge),{dropIndicatorProps:n,isHidden:r,isDropTarget:s}=t.useDropIndicator(i,l,e);return r?null:p.createElement(sn,{...i,dropIndicatorProps:n,isDropTarget:s,ref:e})}function rn(i,e){let{dropIndicatorProps:t,isDropTarget:l,...n}=i,r=de({...n,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:l}});return p.createElement(ne.div,{...t,...r,role:"option",ref:e,"data-drop-target":l||void 0})}const sn=a.forwardRef(rn);sl(Wl,function(e,t,l){let n=a.useContext(fe),{isLoading:r,onLoadMore:s,scrollOffset:u,...o}=e,f=a.useRef(null),d=a.useMemo(()=>({onLoadMore:s,collection:n==null?void 0:n.collection,sentinelRef:f,scrollOffset:u}),[s,u,n==null?void 0:n.collection]);en(d,f);let h=de({...o,id:void 0,children:l.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),y={tabIndex:-1};return p.createElement(p.Fragment,null,p.createElement("div",{style:{position:"relative",width:0,height:0},inert:Hi(!0)},p.createElement("div",{"data-testid":"loadMoreSentinel",ref:f,style:{position:"absolute",height:1,width:1}})),r&&h.children&&p.createElement(ne.div,{...W(re(e,{global:!0}),y),...h,role:"option",ref:t},h.children))});export{gn as $,hl as A,Li as B,gl as C,fe as D,bn as a,pn as b,$n as c,bl as d,ce as e,yn as f,fn as g,fi as h,hn as i,wi as j,Pi as k,Ni as l,Bi as m,Zi as n,Jl as o,oi as p,sl as q,Ae as r,dn as s,Hi as t,ui as u,Xl as v,mn as w,un as x,vn as y,Oi as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.