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