module.exports=[9392,a=>{"use strict";var b=a.i(72131);let c=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});a.s(["CompositeListContext",0,c,"useCompositeListContext",0,function(){return b.useContext(c)}])},79923,a=>{"use strict";var b=a.i(72131),c=a.i(79549),d=a.i(54401),e=a.i(57738),f=a.i(9392),g=a.i(87924);function h(){return new Map}function i(){return new Set}function j(a,b){let c=a.compareDocumentPosition(b);return c&Node.DOCUMENT_POSITION_FOLLOWING||c&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:c&Node.DOCUMENT_POSITION_PRECEDING||c&Node.DOCUMENT_POSITION_CONTAINS?1:0}a.s(["CompositeList",0,function(a){let{children:k,elementsRef:l,labelsRef:m,onMapChange:n}=a,o=(0,d.useStableCallback)(n),p=b.useRef(0),q=(0,c.useRefWithInit)(i).current,r=(0,c.useRefWithInit)(h).current,[s,t]=b.useState(0),u=b.useRef(s),v=(0,d.useStableCallback)((a,b)=>{r.set(a,b??null),u.current+=1,t(u.current)}),w=(0,d.useStableCallback)(a=>{r.delete(a),u.current+=1,t(u.current)}),x=b.useMemo(()=>{let a=new Map;return Array.from(r.keys()).filter(a=>a.isConnected).sort(j).forEach((b,c)=>{let d=r.get(b)??{};a.set(b,{...d,index:c})}),a},[r,s]);(0,e.useIsoLayoutEffect)(()=>{if("function"!=typeof MutationObserver||0===x.size)return;let a=new MutationObserver(a=>{let b=new Set,c=a=>b.has(a)?b.delete(a):b.add(a);a.forEach(a=>{a.removedNodes.forEach(c),a.addedNodes.forEach(c)}),0===b.size&&(u.current+=1,t(u.current))});return x.forEach((b,c)=>{c.parentElement&&a.observe(c.parentElement,{childList:!0})}),()=>{a.disconnect()}},[x]),(0,e.useIsoLayoutEffect)(()=>{u.current===s&&(l.current.length!==x.size&&(l.current.length=x.size),m&&m.current.length!==x.size&&(m.current.length=x.size),p.current=x.size),o(x)},[o,x,l,m,s]),(0,e.useIsoLayoutEffect)(()=>()=>{l.current=[]},[l]),(0,e.useIsoLayoutEffect)(()=>()=>{m&&(m.current=[])},[m]);let y=(0,d.useStableCallback)(a=>(q.add(a),()=>{q.delete(a)}));(0,e.useIsoLayoutEffect)(()=>{q.forEach(a=>a(x))},[q,x]);let z=b.useMemo(()=>({register:v,unregister:w,subscribeMapChange:y,elementsRef:l,labelsRef:m,nextIndexRef:p}),[v,w,y,l,m,p]);return(0,g.jsx)(f.CompositeListContext.Provider,{value:z,children:k})}])},62903,a=>{"use strict";var b=a.i(72131);let c=b.createContext(void 0);a.s(["useDirection",0,function(){let a=b.useContext(c);return a?.direction??"ltr"}])},92403,a=>{"use strict";var b,c=a.i(72131),d=a.i(57738),e=a.i(9392);let f=((b={})[b.None=0]="None",b[b.GuessFromOrder=1]="GuessFromOrder",b);a.s(["IndexGuessBehavior",0,f,"useCompositeListItem",0,function(a={}){let{label:b,metadata:g,textRef:h,indexGuessBehavior:i,index:j}=a,{register:k,unregister:l,subscribeMapChange:m,elementsRef:n,labelsRef:o,nextIndexRef:p}=(0,e.useCompositeListContext)(),q=c.useRef(-1),[r,s]=c.useState(j??(i===f.GuessFromOrder?()=>{if(-1===q.current){let a=p.current;p.current+=1,q.current=a}return q.current}:-1)),t=c.useRef(null),u=c.useCallback(a=>{if(t.current=a,-1!==r&&null!==a&&(n.current[r]=a,o)){let c=void 0!==b;o.current[r]=c?b:h?.current?.textContent??a.textContent}},[r,n,o,b,h]);return(0,d.useIsoLayoutEffect)(()=>{if(null!=j)return;let a=t.current;if(a)return k(a,g),()=>{l(a)}},[j,k,l,g]),(0,d.useIsoLayoutEffect)(()=>{if(null==j)return m(a=>{let b=t.current?a.get(t.current)?.index:null;null!=b&&s(b)})},[j,m,s]),{ref:u,index:r}}])}];

//# sourceMappingURL=node_modules_%40base-ui_react_internals_0ok2paw._.js.map