1import{i as e,n as t,t as n}from"./jsx-runtime-Cltr0gcK.js";import{i as r,n as i}from"./dist-BjziIh8_.js";var a=Object.defineProperty,o=(e,t)=>a(e,`name`,{value:t,configurable:!0}),s=!!(typeof window<`u`&&window.document&&window.document.createElement);function c(e,t,{checkForDefaultPrevented:n=!0}={}){return o(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}o(c,`composeEventHandlers`);function l(e){if(!s)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}o(l,`getOwnerWindow`);function u(e){if(!s)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}o(u,`getOwnerDocument`);function d(e,t=!1){let{activeElement:n}=u(e);if(!n?.nodeName)return null;if(f(n)&&n.contentDocument)return d(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=u(n).getElementById(e);if(t)return t}}return n}o(d,`getActiveElement`);function f(e){return e.tagName===`IFRAME`}o(f,`isFrame`);var p=e(t(),1),m=n(),h=Object.defineProperty,g=(e,t)=>h(e,`name`,{value:t,configurable:!0});function _(e,t){let n=p.createContext(t);n.displayName=e+`Context`;let r=g(e=>{let{children:t,...r}=e,i=p.useMemo(()=>r,Object.values(r));return(0,m.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=p.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return g(i,`useContext`),[r,i]}g(_,`createContext`);function v(e,t=[]){let n=[];function r(t,r){let i=p.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=g(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=p.useMemo(()=>o,Object.values(o));return(0,m.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=p.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return g(s,`useContext`),[o,s]}g(r,`createContext`);let i=g(()=>{let t=n.map(e=>p.createContext(e));return g(function(n){let r=n?.[e]||t;return p.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,y(i,...t)]}g(v,`createContextScope`);function y(...e){let t=e[0];if(e.length===1)return t;let n=g(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return g(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}g(y,`composeContextScopes`);var b=Object.defineProperty,x=(e,t)=>b(e,`name`,{value:t,configurable:!0});function S(e){let t=e+`CollectionProvider`,[n,a]=v(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=x(e=>{let{scope:t,children:n}=e,r=p.useRef(null),i=p.useRef(new Map).current;return(0,m.jsx)(o,{scope:t,itemMap:i,collectionRef:r,children:n})},`CollectionProvider`);c.displayName=t;let l=e+`CollectionSlot`,u=i(l),d=p.forwardRef((e,t)=>{let{scope:n,children:i}=e,a=s(l,n),o=r(t,a.collectionRef);return(0,m.jsx)(u,{ref:o,children:i})});d.displayName=l;let f=e+`CollectionItemSlot`,h=`data-radix-collection-item`,g=i(f),_=p.forwardRef((e,t)=>{let{scope:n,children:i,...a}=e,o=p.useRef(null),c=r(t,o),l=s(f,n);return p.useEffect(()=>(l.itemMap.set(o,{ref:o,...a}),()=>void l.itemMap.delete(o))),(0,m.jsx)(g,{[h]:``,ref:c,children:i})});_.displayName=f;function y(t){let n=s(e+`CollectionConsumer`,t);return p.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return x(y,`useCollection`),[{Provider:c,Slot:d,ItemSlot:_},y,a]}x(S,`createCollection`);var C=new WeakMap,w=class e extends Map{static{x(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],C.set(this,!0)}set(e,t){return C.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=D(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=T(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=T(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return T(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}
1}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function T(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=E(e,t);return n===-1?void 0:e[n]}x(T,`at`);function E(e,t){let n=e.length,r=D(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}x(E,`toSafeIndex`);function D(e){return e!==e||e===0?0:Math.trunc(e)}x(D,`toSafeInteger`);function O(e){let t=e+`CollectionProvider`,[n,a]=v(t),[o,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new w,setItemMap:x(()=>void 0,`setItemMap`)}),c=x(({state:e,...t})=>e?(0,m.jsx)(u,{...t,state:e}):(0,m.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=x(e=>{let t=b();return(0,m.jsx)(u,{...e,state:t})},`CollectionInit`);l.displayName=t+`Init`;let u=x(e=>{let{scope:t,children:n,state:i}=e,a=p.useRef(null),[s,c]=p.useState(null),l=r(a,c),[u,d]=i;return p.useEffect(()=>{if(!s)return;let e=M(()=>{});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s]),(0,m.jsx)(o,{scope:t,itemMap:u,setItemMap:d,collectionRef:l,collectionRefObject:a,collectionElement:s,children:n})},`CollectionProviderImpl`);u.displayName=t+`Impl`;let d=e+`CollectionSlot`,f=i(d),h=p.forwardRef((e,t)=>{let{scope:n,children:i}=e,a=s(d,n),o=r(t,a.collectionRef);return(0,m.jsx)(f,{ref:o,children:i})});h.displayName=d;let g=e+`CollectionItemSlot`,_=i(g),y=p.forwardRef((e,t)=>{let{scope:n,children:i,...a}=e,o=p.useRef(null),[c,l]=p.useState(null),u=r(t,o,l),{setItemMap:d}=s(g,n),f=p.useRef(a);k(f.current,a)||(f.current=a);let h=f.current;return p.useEffect(()=>{let e=h;return d(t=>c?t.has(c)?t.set(c,{...e,element:c}).toSorted(j):(t.set(c,{...e,element:c}),t.toSorted(j)):t),()=>{d(e=>!c||!e.has(c)?e:(e.delete(c),new w(e)))}},[c,h,d]),(0,m.jsx)(_,{"data-radix-collection-item":``,ref:u,children:i})});y.displayName=g;function b(){return p.useState(new w)}x(b,`useInitCollection`);function S(t){let{itemMap:n}=s(e+`CollectionConsumer`,t);return n}return x(S,`useCollection`),[{Provider:c,Slot:h,ItemSlot:y},{createCollectionScope:a,useCollection:S,useInitCollection:b}]}x(O,`createCollection`);function k(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}x(k,`shallowEqual`);function A(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}x(A,`isElementPreceding`);function j(e,t){return!e[1].element||!t[1].element?0:A(e[1].element,t[1].element)?-1:1}x(j,`sortByDocumentPosition`);function M(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}x(M,`getChildListObserver`);var N=globalThis?.document?p.useLayoutEffect:()=>{},P=Object.defineProperty,F=(e,t)=>P(e,`name`,{value:t,configurable:!0});function I(e,t){return p.useReducer((e,n)=>t[e][n]??e,e)}F(I,`useStateMachine`);var L=F(e=>{let{present:t,children:n}=e,r=R(t),i=typeof n==`function`?n({present:r.isPresent}):p.Children.only(n),a=B(r.ref,H(i));return typeof n==`function`||r.isPresent?p.cloneElement(i,{ref:a}):null},`Presence`);function R(e){let[t,n]=p.useState(),r=p.useRef(null),i=p.useRef(e),a=p.useRef(`none`),o=p.useRef(void 0),[s,c]=I(e?`mounted`:`unmounted`,{mou
1nted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return p.useEffect(()=>{s===`mounted`?(a.current=o.current??V(r.current),o.current=void 0):a.current=`none`},[s]),N(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=V(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),N(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=F(a=>{let o=V(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=F(e=>{e.target===t&&(a.current=V(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:p.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=V(t)}else r.current=null;n(e)},[])}}F(R,`usePresence`);function z(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}F(z,`setRef`);function B(...e){let t=p.useRef(e);return t.current=e,p.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=z(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():z(n[e],null)}}},[])}F(B,`useStableComposedRefs`);function V(e){return e?.animationName||`none`}F(V,`getAnimationName`);function H(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}F(H,`getElementRef`);var U=Object.defineProperty,W=(e,t)=>U(e,`name`,{value:t,configurable:!0}),G=p.useEffectEvent,K=p.useInsertionEffect;function q(e){if(typeof G==`function`)return G(e);let t=p.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof K==`function`?K(()=>{t.current=e}):N(()=>{t.current=e}),p.useMemo(()=>((...e)=>t.current?.(...e)),[])}W(q,`useEffectEvent`);var J=Object.defineProperty,Y=(e,t)=>J(e,`name`,{value:t,configurable:!0}),ee=p.useInsertionEffect||N;function X({prop:e,defaultProp:t,onChange:n=Y(()=>{},`onChange`),caller:r}){let[i,a,o]=Z({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,p.useCallback(t=>{if(s){let n=Q(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Y(X,`useControllableState`);function Z({defaultProp:e,onChange:t}){let[n,r]=p.useState(e),i=p.useRef(n),a=p.useRef(t);return ee(()=>{a.current=t},[t]),p.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Y(Z,`useUncontrolledState`);function Q(e){return typeof e==`function`}Y(Q,`isFunction`);var $=Symbol(`RADIX:SYNC_STATE`);function te(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=q(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=p.useReducer((t,n)=>{if(n.type===$)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),m=d.state,h=p.useRef(m);p.useEffect(()=>{h.current!==m&&(h.current=m,c||l(m))},[m,h,c]);let g=p.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return p.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:$,state:i})},[i,d.state,c]),[g,f]}Y(te,`useControllableStateReducer`);export{v as a,S as i,L as n,c as o,N as r,X as t};
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.