vendor: 1,229 bytes, line 1
1import{a as r,j as m}from"./jsx-runtime-Dt5Dsy05.js";import{c as _}from"./index-DwjDrkpL.js";import{u as S,S as I}from"./index-CvJcFPCO.js";function P(s){const a=s+"CollectionProvider",[A,E]=_(a),[N,f]=A(a,{collectionRef:{current:null},itemMap:new Map}),u=c=>{const{scope:e,children:l}=c,o=r.useRef(null),t=r.useRef(new Map).current;return m.jsx(N,{scope:e,itemMap:t,collectionRef:o,children:l})};u.displayName=a;const d=s+"CollectionSlot",p=r.forwardRef((c,e)=>{const{scope:l,children:o}=c,t=f(d,l),n=S(e,t.collectionRef);return m.jsx(I,{ref:n,children:o})});p.displayName=d;const C=s+"CollectionItemSlot",R="data-radix-collection-item",x=r.forwardRef((c,e)=>{const{scope:l,children:o,...t}=c,n=r.useRef(null),M=S(e,n),i=f(C,l);return r.useEffect(()=>(i.itemMap.set(n,{ref:n,...t}),()=>void i.itemMap.delete(n))),m.jsx(I,{[R]:"",ref:M,children:o})});x.displayName=C;function T(c){const e=f(s+"CollectionConsumer",c);return r.useCallback(()=>{const o=e.collectionRef.current;if(!o)return[];const t=Array.from(o.querySelectorAll(`[${R}]`));return Array.from(e.itemMap.values()).sort((i,O)=>t.indexOf(i.ref.current)-t.indexOf(O.ref.current))},[e.collectionRef,e.itemMap])}return[{Provider:u,Slot:p,ItemSlot:x},T,E]}export{P as c};
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.