"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1295],{1295:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r.d(t,{N:()=>p});var l,i=r(12115),o=r(18166),a=r(88068),c=r(95155);function f(e){let t=function(e){let t=i.forwardRef((e,t)=>{let{children:r,...n}=e;if(i.isValidElement(r)){let e,l;let o=(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.ref:(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.props.ref:r.props.ref||r.ref,c=function(e,t){let r={...t};for(let n in t){let l=e[n],i=t[n];/^on[A-Z]/.test(n)?l&&i?r[n]=(...e)=>{let t=i(...e);return l(...e),t}:l&&(r[n]=l):"style"===n?r[n]={...l,...i}:"className"===n&&(r[n]=[l,i].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==i.Fragment&&(c.ref=t?(0,a.t)(t,o):o),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),r=i.forwardRef((e,r)=>{let{children:n,...l}=e,o=i.Children.toArray(n),a=o.find(s);if(a){let e=a.props.children,n=o.map(t=>t!==a?t:i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null);return(0,c.jsx)(t,{...l,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,n):null})}return(0,c.jsx)(t,{...l,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}var u=Symbol("radix.slottable");function s(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===u}function p(e){let t=e+"CollectionProvider",[r,n]=(0,o.A)(t),[l,u]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:r}=e,n=i.useRef(null),o=i.useRef(new Map).current;return(0,c.jsx)(l,{scope:t,itemMap:o,collectionRef:n,children:r})};s.displayName=t;let p=e+"CollectionSlot",d=f(p),m=i.forwardRef((e,t)=>{let{scope:r,children:n}=e,l=u(p,r),i=(0,a.s)(t,l.collectionRef);return(0,c.jsx)(d,{ref:i,children:n})});m.displayName=p;let y=e+"CollectionItemSlot",R="data-radix-collection-item",C=f(y),h=i.forwardRef((e,t)=>{let{scope:r,children:n,...l}=e,o=i.useRef(null),f=(0,a.s)(t,o),s=u(y,r);return i.useEffect(()=>(s.itemMap.set(o,{ref:o,...l}),()=>void s.itemMap.delete(o))),(0,c.jsx)(C,{[R]:"",ref:f,children:n})});return h.displayName=y,[{Provider:s,Slot:m,ItemSlot:h},function(t){let r=u(e+"CollectionConsumer",t);return i.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(R,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}}}]);