1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`c95fe82c-4ecb-4c92-8329-22c1b1a9e18d`,e._sentryDebugIdIdentifier=`sentry-dbid-c95fe82c-4ecb-4c92-8329-22c1b1a9e18d`)}catch{}})();import{at as e,it as t,st as n}from"./components-CLmTExWJ.js";import{t as r}from"./react-dom-BBNzd2T7.js";import{a as i}from"./useId-DlmH-COD.js";import{t as a}from"./SSRProvider-C1NbqP1K.js";import{p as o}from"./useFocusable-ZkNhGgtP.js";import{h as s}from"./Button-DdqK24aK.js";var c=n(t(),1),l=(0,c.createContext)(null);(0,c.createContext)(null),(0,c.createContext)(null),(0,c.createContext)(null),(0,c.createContext)(null);var u=(0,c.createContext)({}),d=class e{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let t=new e(this.type,this.key);return t.value=this.value,t.level=this.level,t.hasChildNodes=this.hasChildNodes,t.rendered=this.rendered,t.textValue=this.textValue,t[`aria-label`]=this[`aria-label`],t.index=this.index,t.parentKey=this.parentKey,t.prevKey=this.prevKey,t.nextKey=this.nextKey,t.firstChildKey=this.firstChildKey,t.lastChildKey=this.lastChildKey,t.props=this.props,t.render=this.render,t}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}},f=class e{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}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);return t?.key??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?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw 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 Error(`Cannot add a node to a frozen collection`);this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(t){let n=new e,r=null;for(let e of this)if(e.type===`section`&&e.hasChildNodes){let i=e.clone(),a=null;for(let r of this.getChildren(e.key))if(t(r.textValue)||r.type===`header`){let e=r.clone();a??(i.firstChildKey=e.key),n.firstKey??=i.key,a&&a.parentKey===e.parentKey?(a.nextKey=e.key,e.prevKey=a.key):e.prevKey=null,e.nextKey=null,n.addNode(e),a=e}a&&(a.type===`header`?(n.firstKey===i.key&&(n.firstKey=null),n.removeNode(a.key)):(i.lastChildKey=a.key,r==null?i.prevKey=null:(r.type===`section`||r.type===`separator`)&&(r.nextKey=i.key,i.prevKey=r.key),i.nextKey=null,r=i,n.addNode(i)))}else if(e.type===`separator`){let t=e.clone();t.nextKey=null,r?.type===`section`&&(r.nextKey=t.key,t.prevKey=r.key,r=t,n.addNode(t))}else if(t(e.textValue)){let t=e.clone();n.firstKey??=t.key,r!=null&&r.type!==`section`&&r.type!==`separator`&&r.parentKey===t.parentKey?(r.nextKey=t.key,t.prevKey=r.key):t.prevKey=null,t.nextKey=null,n.addNode(t),r=t}if(r?.type===`separator`&&r.nextKey===null){let e;r.prevKey!=null&&(e=n.getItem(r.prevKey),e.nextKey=null),n.removeNode(r.key),r=e}return n.lastKey=r?.key||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}},p=class{*[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(){return this.parentNode?.isConnected||!1}appendChild(e){this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),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
1:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode;let n=t;for(;n;)n.index++,n=n.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}},m=class e extends p{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.node.type===`item`):0}updateNode(){let t=this.ownerDocument.getMutableNode(this);t.index=this.index,t.level=this.level,t.parentKey=this.parentNode instanceof e?this.parentNode.node.key:null,t.prevKey=this.previousSibling?.node.key??null,t.nextKey=this.nextSibling?.node.key??null,t.hasChildNodes=!!this.firstChild,t.firstChildKey=this.firstChild?.node.key??null,t.lastChildKey=this.lastChild?.node.key??null}setProps(e,t,n,r){let i=this.ownerDocument.getMutableNode(this),{value:a,textValue:o,id:s,...c}=e;if(c.ref=t,i.props=c,i.rendered=n,i.render=r,i.value=a,i.textValue=o||(typeof c.children==`string`?c.children:``)||e[`aria-label`]||``,s!=null&&s!==i.key){if(this.hasSetProps)throw Error(`Cannot change the id of an item`);i.key=s}this.hasSetProps||=(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),!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 d(e,`react-aria-${++t.nodeId}`),this.ownerDocument.startTransaction()}},h=class extends p{get isConnected(){return this.isMounted}createElement(e){return new m(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 t of e)this.addNode(t)}this.markDirty(e)}removeNode(e){for(let t of e)this.removeNode(t);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0||this.updateCollection(),this.collection}updateCollection(){for(let e of this.dirtyNodes)e instanceof m&&e.isConnected&&e.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){let e=this.getMutableCollection();for(let t of this.mutatedNodes)t.isConnected&&e.addNode(t.node);e.commit(this.firstChild?.node.key??null,this.lastChild?.node.key??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 g(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,o=(0,c.useMemo)(()=>new WeakMap,a);return(0,c.useMemo)(()=>
1{if(n&&typeof t==`function`){let e=[];for(let a of n){let n=o.get(a);if(!n){n=t(a);let e=n.props.id??a.key??a.id;if(e==null)throw Error(`Could not determine key for item`);r&&(e=r+`:`+e),n=(0,c.cloneElement)(n,i?{key:e,id:e,value:a}:{key:e}),o.set(a,n)}e.push(n)}return e}else if(typeof t!=`function`)return t},[t,n,o,r,i])}var _=e((e=>{var n=t();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),v=e(((e,t)=>{t.exports=_()})),y=n(r(),1),b=v(),x=(0,c.createContext)(!1),S=(0,c.createContext)(null);function C(e){if((0,c.useContext)(S))return e.content;let{collection:t,document:n}=D(e.createCollection);return c.createElement(c.Fragment,null,c.createElement(s,null,c.createElement(S.Provider,{value:n},e.content)),c.createElement(w,{render:e.children,collection:t}))}function w({collection:e,render:t}){return t(e)}function T(e,t,n){let r=a(),i=(0,c.useRef)(r);return i.current=r,(0,b.useSyncExternalStore)(e,(0,c.useCallback)(()=>i.current?n():t(),[t,n]))}var E=typeof c.useSyncExternalStore==`function`?c.useSyncExternalStore:T;function D(e){let[t]=(0,c.useState)(()=>new h(e?.()||new f)),n=E((0,c.useCallback)(e=>t.subscribe(e),[t]),(0,c.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,c.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t]));return i(()=>(t.isMounted=!0,()=>{t.isMounted=!1}),[t]),{collection:n,document:t}}var O=(0,c.createContext)(null);function k(e,t,n,r,i,a){let o=(0,c.useCallback)(e=>{e?.setProps(t,n,r,a)},[t,n,r,a]),s=(0,c.useContext)(O);if(s){let o=s.ownerDocument.nodesByProps.get(t);return o||(o=s.ownerDocument.createElement(e),o.setProps(t,n,r,a),s.appendChild(o),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,o)),i?c.createElement(O.Provider,{value:o},i):null}return c.createElement(e,{ref:o},i)}function A(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,c.forwardRef)((r,i)=>{if(!(0,c.useContext)(x)){if(t.length>=3)throw Error(t.name+` cannot be rendered outside a collection.`);return t(r,i)}return k(e,r,i,`children`in r?r.children:null,null,e=>c.createElement(n,{node:e}))});return r.displayName=t.name,r}function j(e,t,n=M){let r=({node:e})=>t(e.props,e.props.ref,e),i=(0,c.forwardRef)((t,i)=>k(e,t,i,null,n(t),e=>c.createElement(r,{node:e}))??c.createElement(c.Fragment,null));return i.displayName=t.name,i}function M(e){return g({...e,addIdAndValue:!0})}var N=(0,c.createContext)(null);function P(e){let t=(0,c.useContext)(N),n=(t?.dependencies||[]).concat(e.dependencies),r=e.idScope||t?.idScope,i=M({...e,idScope:r,dependencies:n});return(0,c.useContext)(S)&&(i=c.createElement(F,null,i)),t=(0,c.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),c.createElement(N.Provider,{value:t},i)}function F({children:e}){let t=(0,c.useContext)(S),n=(0,c.useMemo)(()=>c.createElement(S.Provider,{value:null},c.createElement(x.Provider,{value:!0},e)),[e]);return a()?c.createElement(O.Provider,{value:t},n):(0,y.createPortal)(n,t)}var I=(0,c.createContext)({}),L=(0,c.forwardRef)(function(e,t){[e,t]=o(e,t,I);let{elementType:n=`span`,...r}=e;return c.createElement(n,{className:`react-aria-Text`,...r,ref:t})}),R=(0,c.createContext)(null),z=(0,c.createContext)(null),B=(0,c.createContext)(null),V=j(`section`,(e,t,n)=>{let{name:r,render:i}=(0,c.useContext)(B);return console.warn(`<Section> is deprecated. Please use <${r}> instead.`),i(e,t,n,`react-aria-Section`)}),H={CollectionRoot({collection:e,renderDropIndicator:t}){return U(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return U(e,t,n)}};function U(e,t,n){return g({items:t?e.getChildren(t.key):e,depen
1dencies:[n],children(t){let r=t.render(t);if(!n||t.type!==`item`)return r;let i=t.key,a=e.getKeyAfter(i);return c.createElement(c.Fragment,null,n({type:`item`,key:i,dropPosition:`before`}),r,(a==null||e.getItem(a)?.type!==`item`)&&n({type:`item`,key:i,dropPosition:`after`}))}})}var W=(0,c.createContext)(H);function G(e){return(0,c.useMemo)(()=>e==null?null:new Set([e]),[e])}export{l as _,B as a,L as c,C as d,j as f,d as g,f as h,H as i,I as l,g as m,V as n,z as o,P as p,G as r,R as s,W as t,A as u,u as v}; 2//# sourceMappingURL=Collection-Cfz7mbpt.js.map
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.