@nqlib/nqui 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{command-palette-DhoWGyk_.js → command-palette-CHUiGh5m.js} +2 -2
  2. package/dist/{command-palette-D24rOeE6.cjs → command-palette-DsvP2QNP.cjs} +2 -2
  3. package/dist/command.cjs.js +1 -1
  4. package/dist/command.es.js +1 -1
  5. package/dist/components/custom/table-of-contents.d.ts +2 -2
  6. package/dist/components/custom/table-of-contents.d.ts.map +1 -1
  7. package/dist/components/ui/combobox.d.ts +5 -3
  8. package/dist/components/ui/combobox.d.ts.map +1 -1
  9. package/dist/{debug-panel-BjfW-YVo.js → debug-panel-BcYzsTp2.js} +1 -1
  10. package/dist/{debug-panel-CpqsKuxd.cjs → debug-panel-mwtujy5J.cjs} +1 -1
  11. package/dist/debug.cjs.js +1 -1
  12. package/dist/debug.es.js +1 -1
  13. package/dist/{input-shared-CDgy_NdJ.cjs → input-shared-C9Try5fg.cjs} +1 -1
  14. package/dist/{input-shared-NnOiyHpu.js → input-shared-DXf3Edqt.js} +1 -1
  15. package/dist/lib/floating-surface.d.ts +6 -2
  16. package/dist/lib/floating-surface.d.ts.map +1 -1
  17. package/dist/nqui.cjs.js +10 -10
  18. package/dist/nqui.es.js +17 -16
  19. package/dist/styles.css +9 -9
  20. package/docs/components/README.md +2 -0
  21. package/docs/components/nqui-combobox.md +15 -2
  22. package/docs/components/nqui-command-palette.md +7 -0
  23. package/docs/components/nqui-command.md +41 -0
  24. package/docs/nqui-skills/ELEVATION.md +33 -6
  25. package/docs/nqui-skills/RECIPES.md +85 -0
  26. package/docs/nqui-skills/_claude-commands/README.md +50 -0
  27. package/docs/nqui-skills/_claude-commands/design/SKILL.md +111 -0
  28. package/docs/nqui-skills/_claude-commands/edit/SKILL.md +97 -0
  29. package/docs/nqui-skills/nqui-components/SKILL.md +1 -0
  30. package/package.json +1 -1
  31. package/scripts/build-styles.js +4 -3
  32. package/scripts/install-claude-skills.js +46 -7
package/dist/nqui.cjs.js CHANGED
@@ -1,15 +1,15 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),h=require("./utils-IjLH3w2e.cjs"),Qo=require("./compose-refs-D-We677R.cjs"),_e=require("./keyboard-BapbM2wb.cjs"),Ct=require("./enhanced-calendar-CRdrKPtj.cjs"),He=require("./sonner-CP8np0BP.cjs"),o=require("react/jsx-runtime"),g=require("./input-shared-CDgy_NdJ.cjs"),S=require("./debug-panel-CpqsKuxd.cjs"),oe=require("class-variance-authority"),be=require("@radix-ui/react-slot"),re=require("./button-DGv8EsM0.cjs"),U=require("@hugeicons/react"),Y=require("@hugeicons/core-free-icons"),O=require("./command-palette-D24rOeE6.cjs"),qe=require("./carousel-BWW6geWQ.cjs"),xe=require("./drawer-DVarEy65.cjs"),nd=require("react-dom"),sr=require("react-resizable-panels"),Ue=require("./sortable-C0YyABea.cjs");function Jo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const i=Jo(E),ir=Jo(be);function ad(e,t={}){if(!e)return"";try{return new Intl.DateTimeFormat("en-US",{month:t.month??"long",day:t.day??"numeric",year:t.year??"numeric",...t}).format(new Date(e))}catch{return""}}const To=e=>{const t=e.tagName.match(/^H(\d)$/i);return t?parseInt(t[1],10):0};function en({selector:e="h1, h2, h3, h4, h5, h6",rootMargin:t="-100px 0px -66%",threshold:r=0,offset:n=0,enabled:a=!0,container:s=null}={}){const[l,c]=E.useState(null),[d,p]=E.useState([]),[u,f]=E.useState(null),m=E.useRef(null),b=E.useRef(null),v=E.useRef(null),x=E.useRef(new Map),w=E.useRef(new Map),C=E.useRef(new Set),N=E.useRef(new Set),y=E.useCallback(k=>{f(k),c(k)},[]);return E.useEffect(()=>{if(!a)return;const M=Array.from((s||document).querySelectorAll(e));if(M.length===0)return;x.current.clear(),w.current.clear(),M.forEach((T,D)=>{const $=T.id||T.getAttribute("data-id")||T.textContent?.trim().toLowerCase().replace(/\s+/g,"-")||"";if($){x.current.set($,T),!T.id&&!T.getAttribute("data-id")&&(T.id=$);const z=To(T);let V=null;for(let P=D+1;P<M.length;P++){const W=M[P],L=To(W);if(L>0&&L<=z){V=W;break}}if(V){let P=document.querySelector(`[data-content-section="${$}"]`);P||(P=document.createElement("div"),P.setAttribute("data-content-section",$),P.style.position="absolute",P.style.width="1px",P.style.height="1px",P.style.pointerEvents="none",P.style.visibility="hidden",V.parentElement?.insertBefore(P,V)),w.current.set($,P)}else{let P=document.querySelector(`[data-content-section="${$}"]`);P||(P=document.createElement("div"),P.setAttribute("data-content-section",$),P.style.position="absolute",P.style.width="1px",P.style.height="1px",P.style.pointerEvents="none",P.style.visibility="hidden",document.body.appendChild(P)),w.current.set($,P)}}}),m.current=new IntersectionObserver(T=>{if(u!==null)return;let D=-1,$=null;for(const z of T)z.intersectionRatio>D&&(D=z.intersectionRatio,$=z);if($&&$.isIntersecting){const z=$.target.id||$.target.getAttribute("data-id")||"";z&&c(z)}else{const z=s?s.getBoundingClientRect().top:0,V=Array.from(x.current.entries()).map(([P,W])=>({id:P,el:W,rect:W.getBoundingClientRect()})).filter(({rect:P})=>(s?P.top-z:P.top)<=n+100).sort((P,W)=>{const L=s?P.rect.top-z:P.rect.top;return(s?W.rect.top-z:W.rect.top)-L});V.length>0&&c(V[0].id)}},{root:s||null,rootMargin:t,threshold:r}),b.current=new IntersectionObserver(T=>{if(u!==null)return;const D=C.current;T.forEach(V=>{const P=V.target.id||V.target.getAttribute("data-id")||"";P&&(V.isIntersecting?D.add(P):D.delete(P))});const $=new Set(D);N.current.forEach(V=>$.add(V));const z=Array.from($);p(z),z.length>0&&!l&&c(z[0])},{root:s||null,rootMargin:"0px",threshold:.98}),v.current=new IntersectionObserver(T=>{if(u!==null)return;const D=N.current;T.forEach(P=>{const W=P.target.getAttribute("data-content-section");if(!W)return;if(C.current.has(W)){D.delete(W);return}const K=P.target.getBoundingClientRect(),q=s?s.getBoundingClientRect():null,X=s?q.top:0,H=s?q.bottom:window.innerHeight,Q=x.current.get(W),Z=Q?Q.getBoundingClientRect():null,te=Z?Z.bottom<X:!1,J=K.top>X,ve=K.top<H;te&&J&&ve?D.add(W):D.delete(W)});const $=C.current,z=new Set($);N.current.forEach(P=>z.add(P));const V=Array.from(z);p(V)},{root:s||null,rootMargin:"0px",threshold:0}),M.forEach(T=>{m.current&&m.current.observe(T),b.current&&b.current.observe(T)}),w.current.forEach(T=>{v.current&&v.current.observe(T)});const _=setTimeout(()=>{if(u!==null)return;const T=s?s.getBoundingClientRect():null,D=s?s.clientHeight:window.innerHeight,$=s?T.top:0,z=s?T.bottom:window.innerHeight,V=Array.from(x.current.entries()).map(([K,q])=>({id:K,el:q,rect:q.getBoundingClientRect()})).filter(({rect:K})=>(s?K.top-$:K.top)<=D/2).sort((K,q)=>{const X=s?K.rect.top-$:K.rect.top;return(s?q.rect.top-$:q.rect.top)-X});V.length>0&&c(V[0].id);const P=[];x.current.forEach((K,q)=>{const X=K.getBoundingClientRect();X.top<z&&X.bottom>$&&P.push(q)});const W=[];w.current.forEach((K,q)=>{if(P.includes(q))return;const X=x.current.get(q),H=X?X.getBoundingClientRect():null,Q=K.getBoundingClientRect(),Z=H?H.bottom<$:!1,te=Q.top>$,J=Q.top<z;Z&&te&&J&&W.push(q)});const L=new Set([...P,...W]);L.size>0&&(p(Array.from(L)),C.current=new Set(P),N.current=new Set(W))},100),j=()=>{if(u!==null)return;const T=s?s.getBoundingClientRect():null,D=s?T.top:0,$=s?T.bottom:window.innerHeight;let z=!1;if(w.current.forEach((L,K)=>{if(C.current.has(K)){N.current.has(K)&&(N.current.delete(K),z=!0);return}const q=x.current.get(K),X=q?q.getBoundingClientRect():null,H=L.getBoundingClientRect(),Q=X?X.bottom<D:!1,Z=H.top>D,te=H.top<$,J=Q&&Z&&te,ve=N.current.has(K);J&&!ve?(N.current.add(K),z=!0):!J&&ve&&(N.current.delete(K),z=!0)}),!z)return;const V=C.current,P=new Set(V);N.current.forEach(L=>P.add(L));const W=Array.from(P);p(W)};let R=null;const F=()=>{R&&clearTimeout(R),R=setTimeout(()=>{j()},16)};return(s||window).addEventListener("scroll",F,{passive:!0}),()=>{clearTimeout(_),R&&clearTimeout(R),(s||window).removeEventListener("scroll",F),m.current&&m.current.disconnect(),b.current&&b.current.disconnect(),v.current&&v.current.disconnect(),w.current.forEach(D=>{D.remove()}),x.current.clear(),w.current.clear(),C.current.clear(),N.current.clear()}},[e,t,r,n,a,u,s]),E.useEffect(()=>{if(u!==null){let k;const M=()=>{clearTimeout(k),k=setTimeout(()=>{f(null)},150)},I=s||window;I.addEventListener("scroll",M,{passive:!0});const _=setTimeout(()=>{f(null)},500);return()=>{clearTimeout(_),I.removeEventListener("scroll",M),clearTimeout(k)}}},[u,s]),{activeId:u!==null?u:l,visibleIds:u!==null?[u]:d,setActiveId:y}}const Gt=768;function tn(){const[e,t]=i.useState(void 0);return i.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Gt-1}px)`),n=()=>{t(window.innerWidth<Gt)};return r.addEventListener("change",n),t(window.innerWidth<Gt),()=>r.removeEventListener("change",n)},[]),!!e}function sd(){const{resolvedTheme:e}=He.z();return E.useMemo(()=>e==="dark"||typeof document<"u"&&document.documentElement.classList.contains("dark")?"dark":"light",[e])}function id(e,t){const[r,n]=i.useState(!1);return i.useEffect(()=>{const a=e.current;if(!a)return;const s=new IntersectionObserver(([l])=>{l?.isIntersecting&&(n(!0),t?.once&&s.disconnect())},{rootMargin:t?.margin});return s.observe(a),()=>s.disconnect()},[e,t?.once,t?.margin]),{isInView:r}}const rn=typeof window<"u"?i.useLayoutEffect:i.useEffect;function ld(e){const t=i.useRef(e);return rn(()=>{t.current=e}),t}function cd(e){const t=i.useRef(null);return t.current===null&&(t.current=e()),t}function dd(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>((...r)=>t.current?.(...r)),[])}function ud(e,t){const r=dd(e),n=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(n.current),[]),i.useCallback((...s)=>{window.clearTimeout(n.current),n.current=window.setTimeout(()=>r(...s),t)},[r,t])}const _o=new Map,pd=16,fd=4,md=40;function gd({label:e,cacheKey:t,iconSize:r,maxWidth:n,className:a}){const s=_o.get(t);if(s!==void 0)return s;const l=document.createElement("div");if(l.className=`inline-flex items-center rounded-md border px-1.5 text-xs font-semibold h-5 gap-1 shrink-0 absolute invisible pointer-events-none ${a??""}`,l.style.whiteSpace="nowrap",r){const d=document.createElement("span");d.className="shrink-0",d.style.width=`${r}px`,d.style.height=`${r}px`,l.appendChild(d)}if(n){const d=document.createElement("span");d.className="truncate",d.style.maxWidth=`${n}px`,d.textContent=e,l.appendChild(d)}else l.textContent=e;document.body.appendChild(l);const c=l.offsetWidth;return document.body.removeChild(l),_o.set(t,c),c}function hd({items:e,getLabel:t,containerRef:r,lineCount:n,cacheKeyPrefix:a="",containerPadding:s=pd,badgeGap:l=fd,overflowBadgeWidth:c=md,iconSize:d,maxWidth:p,className:u}){const[f,m]=i.useState(0);return i.useEffect(()=>{if(!r.current)return;function v(){if(r.current){const w=r.current.clientWidth-s;m(w)}}v();const x=new ResizeObserver(v);return x.observe(r.current),()=>{x.disconnect()}},[r,s]),i.useMemo(()=>{if(!f||e.length===0)return{visibleItems:e,hiddenCount:0,containerWidth:f};let v=0,x=1;const w=[];for(const C of e){const N=t(C),y=a?`${a}:${N}`:N,M=gd({label:N,cacheKey:y,iconSize:d,maxWidth:p,className:u})+l;if(v+M<=f)v+=M,w.push(C);else if(x<n)x++,v=M,w.push(C);else{v+c>f&&w.length>0&&w.pop();break}}return{visibleItems:w,hiddenCount:Math.max(0,e.length-w.length),containerWidth:f}},[e,t,f,n,a,d,p,u,l,c])}var ge="Accordion",vd=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[lr,bd,xd]=S.createCollection(ge),[yt]=g.createContextScope(ge,[xd,S.createCollapsibleScope]),cr=S.createCollapsibleScope(),on=E.forwardRef((e,t)=>{const{type:r,...n}=e,a=n,s=n;return o.jsx(lr.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?o.jsx(Sd,{...s,ref:t}):o.jsx(yd,{...a,ref:t})})});on.displayName=ge;var[nn,wd]=yt(ge),[an,Cd]=yt(ge,{collapsible:!1}),yd=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},collapsible:s=!1,...l}=e,[c,d]=g.useControllableState({prop:r,defaultProp:n??"",onChange:a,caller:ge});return o.jsx(nn,{scope:e.__scopeAccordion,value:E.useMemo(()=>c?[c]:[],[c]),onItemOpen:d,onItemClose:E.useCallback(()=>s&&d(""),[s,d]),children:o.jsx(an,{scope:e.__scopeAccordion,collapsible:s,children:o.jsx(sn,{...l,ref:t})})})}),Sd=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...s}=e,[l,c]=g.useControllableState({prop:r,defaultProp:n??[],onChange:a,caller:ge}),d=E.useCallback(u=>c((f=[])=>[...f,u]),[c]),p=E.useCallback(u=>c((f=[])=>f.filter(m=>m!==u)),[c]);return o.jsx(nn,{scope:e.__scopeAccordion,value:l,onItemOpen:d,onItemClose:p,children:o.jsx(an,{scope:e.__scopeAccordion,collapsible:!0,children:o.jsx(sn,{...s,ref:t})})})}),[Nd,St]=yt(ge),sn=E.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:a,orientation:s="vertical",...l}=e,c=E.useRef(null),d=g.useComposedRefs(c,t),p=bd(r),f=S.useDirection(a)==="ltr",m=g.composeEventHandlers(e.onKeyDown,b=>{if(!vd.includes(b.key))return;const v=b.target,x=p().filter(j=>!j.ref.current?.disabled),w=x.findIndex(j=>j.ref.current===v),C=x.length;if(w===-1)return;b.preventDefault();let N=w;const y=0,k=C-1,M=()=>{N=w+1,N>k&&(N=y)},I=()=>{N=w-1,N<y&&(N=k)};switch(b.key){case"Home":N=y;break;case"End":N=k;break;case"ArrowRight":s==="horizontal"&&(f?M():I());break;case"ArrowDown":s==="vertical"&&M();break;case"ArrowLeft":s==="horizontal"&&(f?I():M());break;case"ArrowUp":s==="vertical"&&I();break}const _=N%C;x[_].ref.current?.focus()});return o.jsx(Nd,{scope:r,disabled:n,direction:a,orientation:s,children:o.jsx(lr.Slot,{scope:r,children:o.jsx(g.Primitive.div,{...l,"data-orientation":s,ref:d,onKeyDown:n?void 0:m})})})}),ct="AccordionItem",[Md,dr]=yt(ct),ln=E.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...a}=e,s=St(ct,r),l=wd(ct,r),c=cr(r),d=g.useId(),p=n&&l.value.includes(n)||!1,u=s.disabled||e.disabled;return o.jsx(Md,{scope:r,open:p,disabled:u,triggerId:d,children:o.jsx(S.Root,{"data-orientation":s.orientation,"data-state":mn(p),...c,...a,ref:t,disabled:u,open:p,onOpenChange:f=>{f?l.onItemOpen(n):l.onItemClose(n)}})})});ln.displayName=ct;var cn="AccordionHeader",dn=E.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=St(ge,r),s=dr(cn,r);return o.jsx(g.Primitive.h3,{"data-orientation":a.orientation,"data-state":mn(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});dn.displayName=cn;var Kt="AccordionTrigger",un=E.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=St(ge,r),s=dr(Kt,r),l=Cd(Kt,r),c=cr(r);return o.jsx(lr.ItemSlot,{scope:r,children:o.jsx(S.Trigger,{"aria-disabled":s.open&&!l.collapsible||void 0,"data-orientation":a.orientation,id:s.triggerId,...c,...n,ref:t})})});un.displayName=Kt;var pn="AccordionContent",fn=E.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=St(ge,r),s=dr(pn,r),l=cr(r);return o.jsx(S.Content,{role:"region","aria-labelledby":s.triggerId,"data-orientation":a.orientation,...l,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});fn.displayName=pn;function mn(e){return e?"open":"closed"}var kd=on,Rd=ln,Ed=dn,jd=un,Id=fn,gn="AlertDialog",[Td]=g.createContextScope(gn,[O.createDialogScope]),ye=O.createDialogScope(),hn=e=>{const{__scopeAlertDialog:t,...r}=e,n=ye(t);return o.jsx(O.Root,{...n,...r,modal:!0})};hn.displayName=gn;var _d="AlertDialogTrigger",vn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ye(r);return o.jsx(O.Trigger,{...a,...n,ref:t})});vn.displayName=_d;var Pd="AlertDialogPortal",bn=e=>{const{__scopeAlertDialog:t,...r}=e,n=ye(t);return o.jsx(O.Portal,{...n,...r})};bn.displayName=Pd;var Ad="AlertDialogOverlay",xn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ye(r);return o.jsx(O.Overlay,{...a,...n,ref:t})});xn.displayName=Ad;var Le="AlertDialogContent",[Dd,Od]=Td(Le),Ld=be.createSlottable("AlertDialogContent"),wn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...a}=e,s=ye(r),l=i.useRef(null),c=g.useComposedRefs(t,l),d=i.useRef(null);return o.jsx(O.WarningProvider,{contentName:Le,titleName:Cn,docsSlug:"alert-dialog",children:o.jsx(Dd,{scope:r,cancelRef:d,children:o.jsxs(O.Content,{role:"alertdialog",...s,...a,ref:c,onOpenAutoFocus:g.composeEventHandlers(a.onOpenAutoFocus,p=>{p.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[o.jsx(Ld,{children:n}),o.jsx(zd,{contentRef:l})]})})})});wn.displayName=Le;var Cn="AlertDialogTitle",yn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ye(r);return o.jsx(O.Title,{...a,...n,ref:t})});yn.displayName=Cn;var Sn="AlertDialogDescription",Nn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ye(r);return o.jsx(O.Description,{...a,...n,ref:t})});Nn.displayName=Sn;var $d="AlertDialogAction",Mn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ye(r);return o.jsx(O.Close,{...a,...n,ref:t})});Mn.displayName=$d;var kn="AlertDialogCancel",Rn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:a}=Od(kn,r),s=ye(r),l=g.useComposedRefs(t,a);return o.jsx(O.Close,{...s,...n,ref:l})});Rn.displayName=kn;var zd=({contentRef:e})=>{const t=`\`${Le}\` requires a description for the component to be accessible for screen reader users.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),v=require("./utils-IjLH3w2e.cjs"),Qo=require("./compose-refs-D-We677R.cjs"),_e=require("./keyboard-BapbM2wb.cjs"),Ct=require("./enhanced-calendar-CRdrKPtj.cjs"),He=require("./sonner-CP8np0BP.cjs"),o=require("react/jsx-runtime"),g=require("./input-shared-C9Try5fg.cjs"),S=require("./debug-panel-mwtujy5J.cjs"),oe=require("class-variance-authority"),be=require("@radix-ui/react-slot"),re=require("./button-DGv8EsM0.cjs"),U=require("@hugeicons/react"),Y=require("@hugeicons/core-free-icons"),O=require("./command-palette-DsvP2QNP.cjs"),qe=require("./carousel-BWW6geWQ.cjs"),xe=require("./drawer-DVarEy65.cjs"),nd=require("react-dom"),sr=require("react-resizable-panels"),Ue=require("./sortable-C0YyABea.cjs");function Jo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const i=Jo(E),ir=Jo(be);function ad(e,t={}){if(!e)return"";try{return new Intl.DateTimeFormat("en-US",{month:t.month??"long",day:t.day??"numeric",year:t.year??"numeric",...t}).format(new Date(e))}catch{return""}}const To=e=>{const t=e.tagName.match(/^H(\d)$/i);return t?parseInt(t[1],10):0};function en({selector:e="h1, h2, h3, h4, h5, h6",rootMargin:t="-100px 0px -66%",threshold:r=0,offset:n=0,enabled:a=!0,container:s=null}={}){const[l,c]=E.useState(null),[d,f]=E.useState([]),[u,p]=E.useState(null),m=E.useRef(null),b=E.useRef(null),h=E.useRef(null),x=E.useRef(new Map),w=E.useRef(new Map),C=E.useRef(new Set),N=E.useRef(new Set),y=E.useCallback(k=>{p(k),c(k)},[]);return E.useEffect(()=>{if(!a)return;const M=Array.from((s||document).querySelectorAll(e));if(M.length===0)return;x.current.clear(),w.current.clear(),M.forEach((T,D)=>{const $=T.id||T.getAttribute("data-id")||T.textContent?.trim().toLowerCase().replace(/\s+/g,"-")||"";if($){x.current.set($,T),!T.id&&!T.getAttribute("data-id")&&(T.id=$);const z=To(T);let V=null;for(let P=D+1;P<M.length;P++){const W=M[P],L=To(W);if(L>0&&L<=z){V=W;break}}if(V){let P=document.querySelector(`[data-content-section="${$}"]`);P||(P=document.createElement("div"),P.setAttribute("data-content-section",$),P.style.position="absolute",P.style.width="1px",P.style.height="1px",P.style.pointerEvents="none",P.style.visibility="hidden",V.parentElement?.insertBefore(P,V)),w.current.set($,P)}else{let P=document.querySelector(`[data-content-section="${$}"]`);P||(P=document.createElement("div"),P.setAttribute("data-content-section",$),P.style.position="absolute",P.style.width="1px",P.style.height="1px",P.style.pointerEvents="none",P.style.visibility="hidden",document.body.appendChild(P)),w.current.set($,P)}}}),m.current=new IntersectionObserver(T=>{if(u!==null)return;let D=-1,$=null;for(const z of T)z.intersectionRatio>D&&(D=z.intersectionRatio,$=z);if($&&$.isIntersecting){const z=$.target.id||$.target.getAttribute("data-id")||"";z&&c(z)}else{const z=s?s.getBoundingClientRect().top:0,V=Array.from(x.current.entries()).map(([P,W])=>({id:P,el:W,rect:W.getBoundingClientRect()})).filter(({rect:P})=>(s?P.top-z:P.top)<=n+100).sort((P,W)=>{const L=s?P.rect.top-z:P.rect.top;return(s?W.rect.top-z:W.rect.top)-L});V.length>0&&c(V[0].id)}},{root:s||null,rootMargin:t,threshold:r}),b.current=new IntersectionObserver(T=>{if(u!==null)return;const D=C.current;T.forEach(V=>{const P=V.target.id||V.target.getAttribute("data-id")||"";P&&(V.isIntersecting?D.add(P):D.delete(P))});const $=new Set(D);N.current.forEach(V=>$.add(V));const z=Array.from($);f(z),z.length>0&&!l&&c(z[0])},{root:s||null,rootMargin:"0px",threshold:.98}),h.current=new IntersectionObserver(T=>{if(u!==null)return;const D=N.current;T.forEach(P=>{const W=P.target.getAttribute("data-content-section");if(!W)return;if(C.current.has(W)){D.delete(W);return}const K=P.target.getBoundingClientRect(),q=s?s.getBoundingClientRect():null,X=s?q.top:0,H=s?q.bottom:window.innerHeight,Q=x.current.get(W),Z=Q?Q.getBoundingClientRect():null,te=Z?Z.bottom<X:!1,J=K.top>X,ve=K.top<H;te&&J&&ve?D.add(W):D.delete(W)});const $=C.current,z=new Set($);N.current.forEach(P=>z.add(P));const V=Array.from(z);f(V)},{root:s||null,rootMargin:"0px",threshold:0}),M.forEach(T=>{m.current&&m.current.observe(T),b.current&&b.current.observe(T)}),w.current.forEach(T=>{h.current&&h.current.observe(T)});const _=setTimeout(()=>{if(u!==null)return;const T=s?s.getBoundingClientRect():null,D=s?s.clientHeight:window.innerHeight,$=s?T.top:0,z=s?T.bottom:window.innerHeight,V=Array.from(x.current.entries()).map(([K,q])=>({id:K,el:q,rect:q.getBoundingClientRect()})).filter(({rect:K})=>(s?K.top-$:K.top)<=D/2).sort((K,q)=>{const X=s?K.rect.top-$:K.rect.top;return(s?q.rect.top-$:q.rect.top)-X});V.length>0&&c(V[0].id);const P=[];x.current.forEach((K,q)=>{const X=K.getBoundingClientRect();X.top<z&&X.bottom>$&&P.push(q)});const W=[];w.current.forEach((K,q)=>{if(P.includes(q))return;const X=x.current.get(q),H=X?X.getBoundingClientRect():null,Q=K.getBoundingClientRect(),Z=H?H.bottom<$:!1,te=Q.top>$,J=Q.top<z;Z&&te&&J&&W.push(q)});const L=new Set([...P,...W]);L.size>0&&(f(Array.from(L)),C.current=new Set(P),N.current=new Set(W))},100),j=()=>{if(u!==null)return;const T=s?s.getBoundingClientRect():null,D=s?T.top:0,$=s?T.bottom:window.innerHeight;let z=!1;if(w.current.forEach((L,K)=>{if(C.current.has(K)){N.current.has(K)&&(N.current.delete(K),z=!0);return}const q=x.current.get(K),X=q?q.getBoundingClientRect():null,H=L.getBoundingClientRect(),Q=X?X.bottom<D:!1,Z=H.top>D,te=H.top<$,J=Q&&Z&&te,ve=N.current.has(K);J&&!ve?(N.current.add(K),z=!0):!J&&ve&&(N.current.delete(K),z=!0)}),!z)return;const V=C.current,P=new Set(V);N.current.forEach(L=>P.add(L));const W=Array.from(P);f(W)};let R=null;const F=()=>{R&&clearTimeout(R),R=setTimeout(()=>{j()},16)};return(s||window).addEventListener("scroll",F,{passive:!0}),()=>{clearTimeout(_),R&&clearTimeout(R),(s||window).removeEventListener("scroll",F),m.current&&m.current.disconnect(),b.current&&b.current.disconnect(),h.current&&h.current.disconnect(),w.current.forEach(D=>{D.remove()}),x.current.clear(),w.current.clear(),C.current.clear(),N.current.clear()}},[e,t,r,n,a,u,s]),E.useEffect(()=>{if(u!==null){let k;const M=()=>{clearTimeout(k),k=setTimeout(()=>{p(null)},150)},I=s||window;I.addEventListener("scroll",M,{passive:!0});const _=setTimeout(()=>{p(null)},500);return()=>{clearTimeout(_),I.removeEventListener("scroll",M),clearTimeout(k)}}},[u,s]),{activeId:u!==null?u:l,visibleIds:u!==null?[u]:d,setActiveId:y}}const Gt=768;function tn(){const[e,t]=i.useState(void 0);return i.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Gt-1}px)`),n=()=>{t(window.innerWidth<Gt)};return r.addEventListener("change",n),t(window.innerWidth<Gt),()=>r.removeEventListener("change",n)},[]),!!e}function sd(){const{resolvedTheme:e}=He.z();return E.useMemo(()=>e==="dark"||typeof document<"u"&&document.documentElement.classList.contains("dark")?"dark":"light",[e])}function id(e,t){const[r,n]=i.useState(!1);return i.useEffect(()=>{const a=e.current;if(!a)return;const s=new IntersectionObserver(([l])=>{l?.isIntersecting&&(n(!0),t?.once&&s.disconnect())},{rootMargin:t?.margin});return s.observe(a),()=>s.disconnect()},[e,t?.once,t?.margin]),{isInView:r}}const rn=typeof window<"u"?i.useLayoutEffect:i.useEffect;function ld(e){const t=i.useRef(e);return rn(()=>{t.current=e}),t}function cd(e){const t=i.useRef(null);return t.current===null&&(t.current=e()),t}function dd(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>((...r)=>t.current?.(...r)),[])}function ud(e,t){const r=dd(e),n=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(n.current),[]),i.useCallback((...s)=>{window.clearTimeout(n.current),n.current=window.setTimeout(()=>r(...s),t)},[r,t])}const _o=new Map,pd=16,fd=4,md=40;function gd({label:e,cacheKey:t,iconSize:r,maxWidth:n,className:a}){const s=_o.get(t);if(s!==void 0)return s;const l=document.createElement("div");if(l.className=`inline-flex items-center rounded-md border px-1.5 text-xs font-semibold h-5 gap-1 shrink-0 absolute invisible pointer-events-none ${a??""}`,l.style.whiteSpace="nowrap",r){const d=document.createElement("span");d.className="shrink-0",d.style.width=`${r}px`,d.style.height=`${r}px`,l.appendChild(d)}if(n){const d=document.createElement("span");d.className="truncate",d.style.maxWidth=`${n}px`,d.textContent=e,l.appendChild(d)}else l.textContent=e;document.body.appendChild(l);const c=l.offsetWidth;return document.body.removeChild(l),_o.set(t,c),c}function hd({items:e,getLabel:t,containerRef:r,lineCount:n,cacheKeyPrefix:a="",containerPadding:s=pd,badgeGap:l=fd,overflowBadgeWidth:c=md,iconSize:d,maxWidth:f,className:u}){const[p,m]=i.useState(0);return i.useEffect(()=>{if(!r.current)return;function h(){if(r.current){const w=r.current.clientWidth-s;m(w)}}h();const x=new ResizeObserver(h);return x.observe(r.current),()=>{x.disconnect()}},[r,s]),i.useMemo(()=>{if(!p||e.length===0)return{visibleItems:e,hiddenCount:0,containerWidth:p};let h=0,x=1;const w=[];for(const C of e){const N=t(C),y=a?`${a}:${N}`:N,M=gd({label:N,cacheKey:y,iconSize:d,maxWidth:f,className:u})+l;if(h+M<=p)h+=M,w.push(C);else if(x<n)x++,h=M,w.push(C);else{h+c>p&&w.length>0&&w.pop();break}}return{visibleItems:w,hiddenCount:Math.max(0,e.length-w.length),containerWidth:p}},[e,t,p,n,a,d,f,u,l,c])}var ge="Accordion",vd=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[lr,bd,xd]=S.createCollection(ge),[yt]=g.createContextScope(ge,[xd,S.createCollapsibleScope]),cr=S.createCollapsibleScope(),on=E.forwardRef((e,t)=>{const{type:r,...n}=e,a=n,s=n;return o.jsx(lr.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?o.jsx(Sd,{...s,ref:t}):o.jsx(yd,{...a,ref:t})})});on.displayName=ge;var[nn,wd]=yt(ge),[an,Cd]=yt(ge,{collapsible:!1}),yd=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},collapsible:s=!1,...l}=e,[c,d]=g.useControllableState({prop:r,defaultProp:n??"",onChange:a,caller:ge});return o.jsx(nn,{scope:e.__scopeAccordion,value:E.useMemo(()=>c?[c]:[],[c]),onItemOpen:d,onItemClose:E.useCallback(()=>s&&d(""),[s,d]),children:o.jsx(an,{scope:e.__scopeAccordion,collapsible:s,children:o.jsx(sn,{...l,ref:t})})})}),Sd=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...s}=e,[l,c]=g.useControllableState({prop:r,defaultProp:n??[],onChange:a,caller:ge}),d=E.useCallback(u=>c((p=[])=>[...p,u]),[c]),f=E.useCallback(u=>c((p=[])=>p.filter(m=>m!==u)),[c]);return o.jsx(nn,{scope:e.__scopeAccordion,value:l,onItemOpen:d,onItemClose:f,children:o.jsx(an,{scope:e.__scopeAccordion,collapsible:!0,children:o.jsx(sn,{...s,ref:t})})})}),[Nd,St]=yt(ge),sn=E.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:a,orientation:s="vertical",...l}=e,c=E.useRef(null),d=g.useComposedRefs(c,t),f=bd(r),p=S.useDirection(a)==="ltr",m=g.composeEventHandlers(e.onKeyDown,b=>{if(!vd.includes(b.key))return;const h=b.target,x=f().filter(j=>!j.ref.current?.disabled),w=x.findIndex(j=>j.ref.current===h),C=x.length;if(w===-1)return;b.preventDefault();let N=w;const y=0,k=C-1,M=()=>{N=w+1,N>k&&(N=y)},I=()=>{N=w-1,N<y&&(N=k)};switch(b.key){case"Home":N=y;break;case"End":N=k;break;case"ArrowRight":s==="horizontal"&&(p?M():I());break;case"ArrowDown":s==="vertical"&&M();break;case"ArrowLeft":s==="horizontal"&&(p?I():M());break;case"ArrowUp":s==="vertical"&&I();break}const _=N%C;x[_].ref.current?.focus()});return o.jsx(Nd,{scope:r,disabled:n,direction:a,orientation:s,children:o.jsx(lr.Slot,{scope:r,children:o.jsx(g.Primitive.div,{...l,"data-orientation":s,ref:d,onKeyDown:n?void 0:m})})})}),ct="AccordionItem",[Md,dr]=yt(ct),ln=E.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...a}=e,s=St(ct,r),l=wd(ct,r),c=cr(r),d=g.useId(),f=n&&l.value.includes(n)||!1,u=s.disabled||e.disabled;return o.jsx(Md,{scope:r,open:f,disabled:u,triggerId:d,children:o.jsx(S.Root,{"data-orientation":s.orientation,"data-state":mn(f),...c,...a,ref:t,disabled:u,open:f,onOpenChange:p=>{p?l.onItemOpen(n):l.onItemClose(n)}})})});ln.displayName=ct;var cn="AccordionHeader",dn=E.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=St(ge,r),s=dr(cn,r);return o.jsx(g.Primitive.h3,{"data-orientation":a.orientation,"data-state":mn(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});dn.displayName=cn;var Kt="AccordionTrigger",un=E.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=St(ge,r),s=dr(Kt,r),l=Cd(Kt,r),c=cr(r);return o.jsx(lr.ItemSlot,{scope:r,children:o.jsx(S.Trigger,{"aria-disabled":s.open&&!l.collapsible||void 0,"data-orientation":a.orientation,id:s.triggerId,...c,...n,ref:t})})});un.displayName=Kt;var pn="AccordionContent",fn=E.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=St(ge,r),s=dr(pn,r),l=cr(r);return o.jsx(S.Content,{role:"region","aria-labelledby":s.triggerId,"data-orientation":a.orientation,...l,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});fn.displayName=pn;function mn(e){return e?"open":"closed"}var kd=on,Rd=ln,Ed=dn,jd=un,Id=fn,gn="AlertDialog",[Td]=g.createContextScope(gn,[O.createDialogScope]),ye=O.createDialogScope(),hn=e=>{const{__scopeAlertDialog:t,...r}=e,n=ye(t);return o.jsx(O.Root,{...n,...r,modal:!0})};hn.displayName=gn;var _d="AlertDialogTrigger",vn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ye(r);return o.jsx(O.Trigger,{...a,...n,ref:t})});vn.displayName=_d;var Pd="AlertDialogPortal",bn=e=>{const{__scopeAlertDialog:t,...r}=e,n=ye(t);return o.jsx(O.Portal,{...n,...r})};bn.displayName=Pd;var Ad="AlertDialogOverlay",xn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ye(r);return o.jsx(O.Overlay,{...a,...n,ref:t})});xn.displayName=Ad;var Le="AlertDialogContent",[Dd,Od]=Td(Le),Ld=be.createSlottable("AlertDialogContent"),wn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...a}=e,s=ye(r),l=i.useRef(null),c=g.useComposedRefs(t,l),d=i.useRef(null);return o.jsx(O.WarningProvider,{contentName:Le,titleName:Cn,docsSlug:"alert-dialog",children:o.jsx(Dd,{scope:r,cancelRef:d,children:o.jsxs(O.Content,{role:"alertdialog",...s,...a,ref:c,onOpenAutoFocus:g.composeEventHandlers(a.onOpenAutoFocus,f=>{f.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[o.jsx(Ld,{children:n}),o.jsx(zd,{contentRef:l})]})})})});wn.displayName=Le;var Cn="AlertDialogTitle",yn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ye(r);return o.jsx(O.Title,{...a,...n,ref:t})});yn.displayName=Cn;var Sn="AlertDialogDescription",Nn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ye(r);return o.jsx(O.Description,{...a,...n,ref:t})});Nn.displayName=Sn;var $d="AlertDialogAction",Mn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ye(r);return o.jsx(O.Close,{...a,...n,ref:t})});Mn.displayName=$d;var kn="AlertDialogCancel",Rn=i.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:a}=Od(kn,r),s=ye(r),l=g.useComposedRefs(t,a);return o.jsx(O.Close,{...s,...n,ref:l})});Rn.displayName=kn;var zd=({contentRef:e})=>{const t=`\`${Le}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${Le}\` by passing a \`${Sn}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
5
5
  Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Le}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
6
6
 
7
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Fd=hn,Hd=vn,Gd=bn,Bd=xn,Vd=wn,Wd=Mn,Kd=Rn,qd=yn,Ud=Nn,Yd="AspectRatio",En=i.forwardRef((e,t)=>{const{ratio:r=1/1,style:n,...a}=e;return o.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/r}%`},"data-radix-aspect-ratio-wrapper":"",children:o.jsx(g.Primitive.div,{...a,ref:t,style:{...n,position:"absolute",top:0,right:0,bottom:0,left:0}})})});En.displayName=Yd;var Xd=En,rt={exports:{}},Bt={};var Po;function Zd(){if(Po)return Bt;Po=1;var e=E;function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function c(f,m){var b=m(),v=n({inst:{value:b,getSnapshot:m}}),x=v[0].inst,w=v[1];return s(function(){x.value=b,x.getSnapshot=m,d(x)&&w({inst:x})},[f,b,m]),a(function(){return d(x)&&w({inst:x}),f(function(){d(x)&&w({inst:x})})},[f]),l(b),b}function d(f){var m=f.getSnapshot;f=f.value;try{var b=m();return!r(f,b)}catch{return!0}}function p(f,m){return m()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:c;return Bt.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Bt}var Vt={};var Ao;function Qd(){return Ao||(Ao=1,process.env.NODE_ENV!=="production"&&(function(){function e(b,v){return b===v&&(b!==0||1/b===1/v)||b!==b&&v!==v}function t(b,v){u||a.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=v();if(!f){var w=v();s(x,w)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}w=l({inst:{value:x,getSnapshot:v}});var C=w[0].inst,N=w[1];return d(function(){C.value=x,C.getSnapshot=v,r(C)&&N({inst:C})},[b,x,v]),c(function(){return r(C)&&N({inst:C}),b(function(){r(C)&&N({inst:C})})},[b]),p(x),x}function r(b){var v=b.getSnapshot;b=b.value;try{var x=v();return!s(b,x)}catch{return!0}}function n(b,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=E,s=typeof Object.is=="function"?Object.is:e,l=a.useState,c=a.useEffect,d=a.useLayoutEffect,p=a.useDebugValue,u=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;Vt.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Vt}var Do;function Jd(){return Do||(Do=1,process.env.NODE_ENV==="production"?rt.exports=Zd():rt.exports=Qd()),rt.exports}var eu=Jd();function tu(){return eu.useSyncExternalStore(ru,()=>!0,()=>!1)}function ru(){return()=>{}}var Nt="Checkbox",[ou]=g.createContextScope(Nt),[nu,ur]=ou(Nt);function au(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:a,disabled:s,form:l,name:c,onCheckedChange:d,required:p,value:u="on",internal_do_not_use_render:f}=e,[m,b]=g.useControllableState({prop:r,defaultProp:a??!1,onChange:d,caller:Nt}),[v,x]=i.useState(null),[w,C]=i.useState(null),N=i.useRef(!1),y=v?!!l||!!v.closest("form"):!0,k={checked:m,disabled:s,setChecked:b,control:v,setControl:x,name:c,form:l,value:u,hasConsumerStoppedPropagationRef:N,required:p,defaultChecked:ke(a)?!1:a,isFormControl:y,bubbleInput:w,setBubbleInput:C};return o.jsx(nu,{scope:t,...k,children:su(f)?f(k):n})}var jn="CheckboxTrigger",In=i.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},a)=>{const{control:s,value:l,disabled:c,checked:d,required:p,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:m,isFormControl:b,bubbleInput:v}=ur(jn,e),x=g.useComposedRefs(a,u),w=i.useRef(d);return i.useEffect(()=>{const C=s?.form;if(C){const N=()=>f(w.current);return C.addEventListener("reset",N),()=>C.removeEventListener("reset",N)}},[s,f]),o.jsx(g.Primitive.button,{type:"button",role:"checkbox","aria-checked":ke(d)?"mixed":d,"aria-required":p,"data-state":An(d),"data-disabled":c?"":void 0,disabled:c,value:l,...n,ref:x,onKeyDown:g.composeEventHandlers(t,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:g.composeEventHandlers(r,C=>{f(N=>ke(N)?!0:!N),v&&b&&(m.current=C.isPropagationStopped(),m.current||C.stopPropagation())})})});In.displayName=jn;var Mt=i.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:a,defaultChecked:s,required:l,disabled:c,value:d,onCheckedChange:p,form:u,...f}=e;return o.jsx(au,{__scopeCheckbox:r,checked:a,defaultChecked:s,disabled:c,required:l,onCheckedChange:p,name:n,form:u,value:d,internal_do_not_use_render:({isFormControl:m})=>o.jsxs(o.Fragment,{children:[o.jsx(In,{...f,ref:t,__scopeCheckbox:r}),m&&o.jsx(Pn,{__scopeCheckbox:r})]})})});Mt.displayName=Nt;var Tn="CheckboxIndicator",pr=i.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...a}=e,s=ur(Tn,r);return o.jsx(g.Presence,{present:n||ke(s.checked)||s.checked===!0,children:o.jsx(g.Primitive.span,{"data-state":An(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});pr.displayName=Tn;var _n="CheckboxBubbleInput",Pn=i.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:a,checked:s,defaultChecked:l,required:c,disabled:d,name:p,value:u,form:f,bubbleInput:m,setBubbleInput:b}=ur(_n,e),v=g.useComposedRefs(r,b),x=S.usePrevious(s),w=S.useSize(n);i.useEffect(()=>{const N=m;if(!N)return;const y=window.HTMLInputElement.prototype,M=Object.getOwnPropertyDescriptor(y,"checked").set,I=!a.current;if(x!==s&&M){const _=new Event("click",{bubbles:I});N.indeterminate=ke(s),M.call(N,ke(s)?!1:s),N.dispatchEvent(_)}},[m,x,s,a]);const C=i.useRef(ke(s)?!1:s);return o.jsx(g.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??C.current,required:c,disabled:d,name:p,value:u,form:f,...t,tabIndex:-1,ref:v,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Pn.displayName=_n;function su(e){return typeof e=="function"}function ke(e){return e==="indeterminate"}function An(e){return ke(e)?"indeterminate":e?"checked":"unchecked"}var qt=["Enter"," "],iu=["ArrowDown","PageUp","Home"],Dn=["ArrowUp","PageDown","End"],lu=[...iu,...Dn],cu={ltr:[...qt,"ArrowRight"],rtl:[...qt,"ArrowLeft"]},du={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ye="Menu",[Ve,uu,pu]=S.createCollection(Ye),[Pe,Xe]=g.createContextScope(Ye,[pu,S.createPopperScope,S.createRovingFocusGroupScope]),Ze=S.createPopperScope(),On=S.createRovingFocusGroupScope(),[Ln,Re]=Pe(Ye),[fu,Qe]=Pe(Ye),$n=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:s,modal:l=!0}=e,c=Ze(t),[d,p]=i.useState(null),u=i.useRef(!1),f=g.useCallbackRef(s),m=S.useDirection(a);return i.useEffect(()=>{const b=()=>{u.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>u.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),o.jsx(S.Root2,{...c,children:o.jsx(Ln,{scope:t,open:r,onOpenChange:f,content:d,onContentChange:p,children:o.jsx(fu,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:m,modal:l,children:n})})})};$n.displayName=Ye;var mu="MenuAnchor",fr=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=Ze(r);return o.jsx(S.Anchor,{...a,...n,ref:t})});fr.displayName=mu;var mr="MenuPortal",[gu,zn]=Pe(mr,{forceMount:void 0}),Fn=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:a}=e,s=Re(mr,t);return o.jsx(gu,{scope:t,forceMount:r,children:o.jsx(g.Presence,{present:r||s.open,children:o.jsx(g.Portal,{asChild:!0,container:a,children:n})})})};Fn.displayName=mr;var ue="MenuContent",[hu,gr]=Pe(ue),Hn=i.forwardRef((e,t)=>{const r=zn(ue,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,s=Re(ue,e.__scopeMenu),l=Qe(ue,e.__scopeMenu);return o.jsx(Ve.Provider,{scope:e.__scopeMenu,children:o.jsx(g.Presence,{present:n||s.open,children:o.jsx(Ve.Slot,{scope:e.__scopeMenu,children:l.modal?o.jsx(vu,{...a,ref:t}):o.jsx(bu,{...a,ref:t})})})})}),vu=i.forwardRef((e,t)=>{const r=Re(ue,e.__scopeMenu),n=i.useRef(null),a=g.useComposedRefs(t,n);return i.useEffect(()=>{const s=n.current;if(s)return g.hideOthers(s)},[]),o.jsx(hr,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:g.composeEventHandlers(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),bu=i.forwardRef((e,t)=>{const r=Re(ue,e.__scopeMenu);return o.jsx(hr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),xu=be.createSlot("MenuContent.ScrollLock"),hr=i.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:p,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:m,onDismiss:b,disableOutsideScroll:v,...x}=e,w=Re(ue,r),C=Qe(ue,r),N=Ze(r),y=On(r),k=uu(r),[M,I]=i.useState(null),_=i.useRef(null),j=g.useComposedRefs(t,_,w.onContentChange),R=i.useRef(0),F=i.useRef(""),A=i.useRef(0),T=i.useRef(null),D=i.useRef("right"),$=i.useRef(0),z=v?g.ReactRemoveScroll:i.Fragment,V=v?{as:xu,allowPinchZoom:!0}:void 0,P=L=>{const K=F.current+L,q=k().filter(J=>!J.disabled),X=document.activeElement,H=q.find(J=>J.ref.current===X)?.textValue,Q=q.map(J=>J.textValue),Z=Tu(Q,K,H),te=q.find(J=>J.textValue===Z)?.ref.current;(function J(ve){F.current=ve,window.clearTimeout(R.current),ve!==""&&(R.current=window.setTimeout(()=>J(""),1e3))})(K),te&&setTimeout(()=>te.focus())};i.useEffect(()=>()=>window.clearTimeout(R.current),[]),g.useFocusGuards();const W=i.useCallback(L=>D.current===T.current?.side&&Pu(L,T.current?.area),[]);return o.jsx(hu,{scope:r,searchRef:F,onItemEnter:i.useCallback(L=>{W(L)&&L.preventDefault()},[W]),onItemLeave:i.useCallback(L=>{W(L)||(_.current?.focus(),I(null))},[W]),onTriggerLeave:i.useCallback(L=>{W(L)&&L.preventDefault()},[W]),pointerGraceTimerRef:A,onPointerGraceIntentChange:i.useCallback(L=>{T.current=L},[]),children:o.jsx(z,{...V,children:o.jsx(g.FocusScope,{asChild:!0,trapped:a,onMountAutoFocus:g.composeEventHandlers(s,L=>{L.preventDefault(),_.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:o.jsx(g.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:m,onDismiss:b,children:o.jsx(S.Root$1,{asChild:!0,...y,dir:C.dir,orientation:"vertical",loop:n,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:g.composeEventHandlers(d,L=>{C.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(S.Content$1,{role:"menu","aria-orientation":"vertical","data-state":na(w.open),"data-radix-menu-content":"",dir:C.dir,...N,...x,ref:j,style:{outline:"none",...x.style},onKeyDown:g.composeEventHandlers(x.onKeyDown,L=>{const q=L.target.closest("[data-radix-menu-content]")===L.currentTarget,X=L.ctrlKey||L.altKey||L.metaKey,H=L.key.length===1;q&&(L.key==="Tab"&&L.preventDefault(),!X&&H&&P(L.key));const Q=_.current;if(L.target!==Q||!lu.includes(L.key))return;L.preventDefault();const te=k().filter(J=>!J.disabled).map(J=>J.ref.current);Dn.includes(L.key)&&te.reverse(),ju(te)}),onBlur:g.composeEventHandlers(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(R.current),F.current="")}),onPointerMove:g.composeEventHandlers(e.onPointerMove,We(L=>{const K=L.target,q=$.current!==L.clientX;if(L.currentTarget.contains(K)&&q){const X=L.clientX>$.current?"right":"left";D.current=X,$.current=L.clientX}}))})})})})})})});Hn.displayName=ue;var wu="MenuGroup",vr=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(g.Primitive.div,{role:"group",...n,ref:t})});vr.displayName=wu;var Cu="MenuLabel",Gn=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(g.Primitive.div,{...n,ref:t})});Gn.displayName=Cu;var dt="MenuItem",Oo="menu.itemSelect",kt=i.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...a}=e,s=i.useRef(null),l=Qe(dt,e.__scopeMenu),c=gr(dt,e.__scopeMenu),d=g.useComposedRefs(t,s),p=i.useRef(!1),u=()=>{const f=s.current;if(!r&&f){const m=new CustomEvent(Oo,{bubbles:!0,cancelable:!0});f.addEventListener(Oo,b=>n?.(b),{once:!0}),g.dispatchDiscreteCustomEvent(f,m),m.defaultPrevented?p.current=!1:l.onClose()}};return o.jsx(Bn,{...a,ref:d,disabled:r,onClick:g.composeEventHandlers(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),p.current=!0},onPointerUp:g.composeEventHandlers(e.onPointerUp,f=>{p.current||f.currentTarget?.click()}),onKeyDown:g.composeEventHandlers(e.onKeyDown,f=>{const m=c.searchRef.current!=="";r||m&&f.key===" "||qt.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});kt.displayName=dt;var Bn=i.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:a,...s}=e,l=gr(dt,r),c=On(r),d=i.useRef(null),p=g.useComposedRefs(t,d),[u,f]=i.useState(!1),[m,b]=i.useState("");return i.useEffect(()=>{const v=d.current;v&&b((v.textContent??"").trim())},[s.children]),o.jsx(Ve.ItemSlot,{scope:r,disabled:n,textValue:a??m,children:o.jsx(S.Item,{asChild:!0,...c,focusable:!n,children:o.jsx(g.Primitive.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...s,ref:p,onPointerMove:g.composeEventHandlers(e.onPointerMove,We(v=>{n?l.onItemLeave(v):(l.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,We(v=>l.onItemLeave(v))),onFocus:g.composeEventHandlers(e.onFocus,()=>f(!0)),onBlur:g.composeEventHandlers(e.onBlur,()=>f(!1))})})})}),yu="MenuCheckboxItem",Vn=i.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...a}=e;return o.jsx(Yn,{scope:e.__scopeMenu,checked:r,children:o.jsx(kt,{role:"menuitemcheckbox","aria-checked":ut(r)?"mixed":r,...a,ref:t,"data-state":wr(r),onSelect:g.composeEventHandlers(a.onSelect,()=>n?.(ut(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Vn.displayName=yu;var Wn="MenuRadioGroup",[Su,Nu]=Pe(Wn,{value:void 0,onValueChange:()=>{}}),Kn=i.forwardRef((e,t)=>{const{value:r,onValueChange:n,...a}=e,s=g.useCallbackRef(n);return o.jsx(Su,{scope:e.__scopeMenu,value:r,onValueChange:s,children:o.jsx(vr,{...a,ref:t})})});Kn.displayName=Wn;var qn="MenuRadioItem",Un=i.forwardRef((e,t)=>{const{value:r,...n}=e,a=Nu(qn,e.__scopeMenu),s=r===a.value;return o.jsx(Yn,{scope:e.__scopeMenu,checked:s,children:o.jsx(kt,{role:"menuitemradio","aria-checked":s,...n,ref:t,"data-state":wr(s),onSelect:g.composeEventHandlers(n.onSelect,()=>a.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Un.displayName=qn;var br="MenuItemIndicator",[Yn,Mu]=Pe(br,{checked:!1}),Xn=i.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...a}=e,s=Mu(br,r);return o.jsx(g.Presence,{present:n||ut(s.checked)||s.checked===!0,children:o.jsx(g.Primitive.span,{...a,ref:t,"data-state":wr(s.checked)})})});Xn.displayName=br;var ku="MenuSeparator",Zn=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(g.Primitive.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Zn.displayName=ku;var Ru="MenuArrow",Qn=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=Ze(r);return o.jsx(S.Arrow,{...a,...n,ref:t})});Qn.displayName=Ru;var xr="MenuSub",[Eu,Jn]=Pe(xr),ea=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:a}=e,s=Re(xr,t),l=Ze(t),[c,d]=i.useState(null),[p,u]=i.useState(null),f=g.useCallbackRef(a);return i.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),o.jsx(S.Root2,{...l,children:o.jsx(Ln,{scope:t,open:n,onOpenChange:f,content:p,onContentChange:u,children:o.jsx(Eu,{scope:t,contentId:g.useId(),triggerId:g.useId(),trigger:c,onTriggerChange:d,children:r})})})};ea.displayName=xr;var Be="MenuSubTrigger",ta=i.forwardRef((e,t)=>{const r=Re(Be,e.__scopeMenu),n=Qe(Be,e.__scopeMenu),a=Jn(Be,e.__scopeMenu),s=gr(Be,e.__scopeMenu),l=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,p={__scopeMenu:e.__scopeMenu},u=i.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return i.useEffect(()=>u,[u]),i.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),d(null)}},[c,d]),o.jsx(fr,{asChild:!0,...p,children:o.jsx(Bn,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":na(r.open),...e,ref:g.composeRefs(t,a.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:g.composeEventHandlers(e.onPointerMove,We(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!l.current&&(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,We(f=>{u();const m=r.content?.getBoundingClientRect();if(m){const b=r.content?.dataset.side,v=b==="right",x=v?-5:5,w=m[v?"left":"right"],C=m[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:w,y:m.top},{x:C,y:m.top},{x:C,y:m.bottom},{x:w,y:m.bottom}],side:b}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:g.composeEventHandlers(e.onKeyDown,f=>{const m=s.searchRef.current!=="";e.disabled||m&&f.key===" "||cu[n.dir].includes(f.key)&&(r.onOpenChange(!0),r.content?.focus(),f.preventDefault())})})})});ta.displayName=Be;var ra="MenuSubContent",oa=i.forwardRef((e,t)=>{const r=zn(ue,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,s=Re(ue,e.__scopeMenu),l=Qe(ue,e.__scopeMenu),c=Jn(ra,e.__scopeMenu),d=i.useRef(null),p=g.useComposedRefs(t,d);return o.jsx(Ve.Provider,{scope:e.__scopeMenu,children:o.jsx(g.Presence,{present:n||s.open,children:o.jsx(Ve.Slot,{scope:e.__scopeMenu,children:o.jsx(hr,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:p,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{l.isUsingKeyboardRef.current&&d.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:g.composeEventHandlers(e.onFocusOutside,u=>{u.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:g.composeEventHandlers(e.onEscapeKeyDown,u=>{l.onClose(),u.preventDefault()}),onKeyDown:g.composeEventHandlers(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),m=du[l.dir].includes(u.key);f&&m&&(s.onOpenChange(!1),c.trigger?.focus(),u.preventDefault())})})})})})});oa.displayName=ra;function na(e){return e?"open":"closed"}function ut(e){return e==="indeterminate"}function wr(e){return ut(e)?"indeterminate":e?"checked":"unchecked"}function ju(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function Iu(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function Tu(e,t,r){const a=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let l=Iu(e,Math.max(s,0));a.length===1&&(l=l.filter(p=>p!==r));const d=l.find(p=>p.toLowerCase().startsWith(a.toLowerCase()));return d!==r?d:void 0}function _u(e,t){const{x:r,y:n}=e;let a=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const c=t[s],d=t[l],p=c.x,u=c.y,f=d.x,m=d.y;u>n!=m>n&&r<(f-p)*(n-u)/(m-u)+p&&(a=!a)}return a}function Pu(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return _u(r,t)}function We(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Cr=$n,yr=fr,Sr=Fn,Nr=Hn,Mr=vr,kr=Gn,Rr=kt,Er=Vn,jr=Kn,Ir=Un,Tr=Xn,_r=Zn,Pr=Qn,Ar=ea,Dr=ta,Or=oa,Lr="ContextMenu",[Au]=g.createContextScope(Lr,[Xe]),ne=Xe(),[Du,aa]=Au(Lr),sa=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:n,dir:a,modal:s=!0}=e,[l,c]=i.useState(!1),d=ne(t),p=g.useCallbackRef(n),u=i.useCallback(f=>{c(f),p(f)},[p]);return o.jsx(Du,{scope:t,open:l,onOpenChange:u,modal:s,children:o.jsx(Cr,{...d,dir:a,open:l,onOpenChange:u,modal:s,children:r})})};sa.displayName=Lr;var ia="ContextMenuTrigger",la=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,disabled:n=!1,...a}=e,s=aa(ia,r),l=ne(r),c=i.useRef({x:0,y:0}),d=i.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),p=i.useRef(0),u=i.useCallback(()=>window.clearTimeout(p.current),[]),f=m=>{c.current={x:m.clientX,y:m.clientY},s.onOpenChange(!0)};return i.useEffect(()=>u,[u]),i.useEffect(()=>{n&&u()},[n,u]),o.jsxs(o.Fragment,{children:[o.jsx(yr,{...l,virtualRef:d}),o.jsx(g.Primitive.span,{"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,...a,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:n?e.onContextMenu:g.composeEventHandlers(e.onContextMenu,m=>{u(),f(m),m.preventDefault()}),onPointerDown:n?e.onPointerDown:g.composeEventHandlers(e.onPointerDown,ot(m=>{u(),p.current=window.setTimeout(()=>f(m),700)})),onPointerMove:n?e.onPointerMove:g.composeEventHandlers(e.onPointerMove,ot(u)),onPointerCancel:n?e.onPointerCancel:g.composeEventHandlers(e.onPointerCancel,ot(u)),onPointerUp:n?e.onPointerUp:g.composeEventHandlers(e.onPointerUp,ot(u))})]})});la.displayName=ia;var Ou="ContextMenuPortal",ca=e=>{const{__scopeContextMenu:t,...r}=e,n=ne(t);return o.jsx(Sr,{...n,...r})};ca.displayName=Ou;var da="ContextMenuContent",ua=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=aa(da,r),s=ne(r),l=i.useRef(!1);return o.jsx(Nr,{...s,...n,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),!c.defaultPrevented&&l.current&&c.preventDefault(),l.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),!c.defaultPrevented&&!a.modal&&(l.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ua.displayName=da;var Lu="ContextMenuGroup",pa=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Mr,{...a,...n,ref:t})});pa.displayName=Lu;var $u="ContextMenuLabel",fa=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(kr,{...a,...n,ref:t})});fa.displayName=$u;var zu="ContextMenuItem",ma=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Rr,{...a,...n,ref:t})});ma.displayName=zu;var Fu="ContextMenuCheckboxItem",ga=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Er,{...a,...n,ref:t})});ga.displayName=Fu;var Hu="ContextMenuRadioGroup",ha=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(jr,{...a,...n,ref:t})});ha.displayName=Hu;var Gu="ContextMenuRadioItem",va=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Ir,{...a,...n,ref:t})});va.displayName=Gu;var Bu="ContextMenuItemIndicator",ba=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Tr,{...a,...n,ref:t})});ba.displayName=Bu;var Vu="ContextMenuSeparator",xa=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(_r,{...a,...n,ref:t})});xa.displayName=Vu;var Wu="ContextMenuArrow",Ku=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Pr,{...a,...n,ref:t})});Ku.displayName=Wu;var wa="ContextMenuSub",Ca=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:n,open:a,defaultOpen:s}=e,l=ne(t),[c,d]=g.useControllableState({prop:a,defaultProp:s??!1,onChange:n,caller:wa});return o.jsx(Ar,{...l,open:c,onOpenChange:d,children:r})};Ca.displayName=wa;var qu="ContextMenuSubTrigger",ya=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Dr,{...a,...n,ref:t})});ya.displayName=qu;var Uu="ContextMenuSubContent",Sa=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Or,{...a,...n,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Sa.displayName=Uu;function ot(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var Yu=sa,Xu=la,Na=ca,Zu=ua,Qu=pa,Ju=fa,ep=ma,tp=ga,rp=ha,op=va,Ma=ba,np=xa,ap=Ca,sp=ya,ip=Sa,Rt="DropdownMenu",[lp]=g.createContextScope(Rt,[Xe]),ae=Xe(),[cp,ka]=lp(Rt),Ra=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,d=ae(t),p=i.useRef(null),[u,f]=g.useControllableState({prop:a,defaultProp:s??!1,onChange:l,caller:Rt});return o.jsx(cp,{scope:t,triggerId:g.useId(),triggerRef:p,contentId:g.useId(),open:u,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),modal:c,children:o.jsx(Cr,{...d,open:u,onOpenChange:f,dir:n,modal:c,children:r})})};Ra.displayName=Rt;var Ea="DropdownMenuTrigger",ja=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,s=ka(Ea,r),l=ae(r);return o.jsx(yr,{asChild:!0,...l,children:o.jsx(g.Primitive.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:g.composeRefs(t,s.triggerRef),onPointerDown:g.composeEventHandlers(e.onPointerDown,c=>{!n&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:g.composeEventHandlers(e.onKeyDown,c=>{n||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});ja.displayName=Ea;var dp="DropdownMenuPortal",Ia=e=>{const{__scopeDropdownMenu:t,...r}=e,n=ae(t);return o.jsx(Sr,{...n,...r})};Ia.displayName=dp;var Ta="DropdownMenuContent",_a=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ka(Ta,r),s=ae(r),l=i.useRef(!1);return o.jsx(Nr,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...n,ref:t,onCloseAutoFocus:g.composeEventHandlers(e.onCloseAutoFocus,c=>{l.current||a.triggerRef.current?.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:g.composeEventHandlers(e.onInteractOutside,c=>{const d=c.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0,u=d.button===2||p;(!a.modal||u)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});_a.displayName=Ta;var up="DropdownMenuGroup",Pa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Mr,{...a,...n,ref:t})});Pa.displayName=up;var pp="DropdownMenuLabel",Aa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(kr,{...a,...n,ref:t})});Aa.displayName=pp;var fp="DropdownMenuItem",Da=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Rr,{...a,...n,ref:t})});Da.displayName=fp;var mp="DropdownMenuCheckboxItem",Oa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Er,{...a,...n,ref:t})});Oa.displayName=mp;var gp="DropdownMenuRadioGroup",La=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(jr,{...a,...n,ref:t})});La.displayName=gp;var hp="DropdownMenuRadioItem",$a=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Ir,{...a,...n,ref:t})});$a.displayName=hp;var vp="DropdownMenuItemIndicator",za=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Tr,{...a,...n,ref:t})});za.displayName=vp;var bp="DropdownMenuSeparator",Fa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(_r,{...a,...n,ref:t})});Fa.displayName=bp;var xp="DropdownMenuArrow",wp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Pr,{...a,...n,ref:t})});wp.displayName=xp;var Cp=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:a,defaultOpen:s}=e,l=ae(t),[c,d]=g.useControllableState({prop:n,defaultProp:s??!1,onChange:a,caller:"DropdownMenuSub"});return o.jsx(Ar,{...l,open:c,onOpenChange:d,children:r})},yp="DropdownMenuSubTrigger",Ha=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Dr,{...a,...n,ref:t})});Ha.displayName=yp;var Sp="DropdownMenuSubContent",Ga=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Or,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ga.displayName=Sp;var Np=Ra,Ba=ja,Va=Ia,$r=_a,Mp=Pa,zr=Aa,Fr=Da,Hr=Oa,kp=La,Gr=$a,Wa=za,Br=Fa,Rp=Cp,Vr=Ha,Wr=Ga,Wt,Et="HoverCard",[Ka]=g.createContextScope(Et,[S.createPopperScope]),jt=S.createPopperScope(),[Ep,It]=Ka(Et),qa=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:a,onOpenChange:s,openDelay:l=700,closeDelay:c=300}=e,d=jt(t),p=i.useRef(0),u=i.useRef(0),f=i.useRef(!1),m=i.useRef(!1),[b,v]=g.useControllableState({prop:n,defaultProp:a??!1,onChange:s,caller:Et}),x=i.useCallback(()=>{clearTimeout(u.current),p.current=window.setTimeout(()=>v(!0),l)},[l,v]),w=i.useCallback(()=>{clearTimeout(p.current),!f.current&&!m.current&&(u.current=window.setTimeout(()=>v(!1),c))},[c,v]),C=i.useCallback(()=>v(!1),[v]);return i.useEffect(()=>()=>{clearTimeout(p.current),clearTimeout(u.current)},[]),o.jsx(Ep,{scope:t,open:b,onOpenChange:v,onOpen:x,onClose:w,onDismiss:C,hasSelectionRef:f,isPointerDownOnContentRef:m,children:o.jsx(S.Root2,{...d,children:r})})};qa.displayName=Et;var Ua="HoverCardTrigger",Ya=i.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,a=It(Ua,r),s=jt(r);return o.jsx(S.Anchor,{asChild:!0,...s,children:o.jsx(g.Primitive.a,{"data-state":a.open?"open":"closed",...n,ref:t,onPointerEnter:g.composeEventHandlers(e.onPointerEnter,ft(a.onOpen)),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,ft(a.onClose)),onFocus:g.composeEventHandlers(e.onFocus,a.onOpen),onBlur:g.composeEventHandlers(e.onBlur,a.onClose),onTouchStart:g.composeEventHandlers(e.onTouchStart,l=>l.preventDefault())})})});Ya.displayName=Ua;var Kr="HoverCardPortal",[jp,Ip]=Ka(Kr,{forceMount:void 0}),Xa=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:a}=e,s=It(Kr,t);return o.jsx(jp,{scope:t,forceMount:r,children:o.jsx(g.Presence,{present:r||s.open,children:o.jsx(g.Portal,{asChild:!0,container:a,children:n})})})};Xa.displayName=Kr;var pt="HoverCardContent",Za=i.forwardRef((e,t)=>{const r=Ip(pt,e.__scopeHoverCard),{forceMount:n=r.forceMount,...a}=e,s=It(pt,e.__scopeHoverCard);return o.jsx(g.Presence,{present:n||s.open,children:o.jsx(Tp,{"data-state":s.open?"open":"closed",...a,onPointerEnter:g.composeEventHandlers(e.onPointerEnter,ft(s.onOpen)),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,ft(s.onClose)),ref:t})})});Za.displayName=pt;var Tp=i.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,...c}=e,d=It(pt,r),p=jt(r),u=i.useRef(null),f=g.useComposedRefs(t,u),[m,b]=i.useState(!1);return i.useEffect(()=>{if(m){const v=document.body;return Wt=v.style.userSelect||v.style.webkitUserSelect,v.style.userSelect="none",v.style.webkitUserSelect="none",()=>{v.style.userSelect=Wt,v.style.webkitUserSelect=Wt}}},[m]),i.useEffect(()=>{if(u.current){const v=()=>{b(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",v),()=>{document.removeEventListener("pointerup",v),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),i.useEffect(()=>{u.current&&Ap(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),o.jsx(g.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:g.composeEventHandlers(s,v=>{v.preventDefault()}),onDismiss:d.onDismiss,children:o.jsx(S.Content$1,{...p,...c,onPointerDown:g.composeEventHandlers(c.onPointerDown,v=>{v.currentTarget.contains(v.target)&&b(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:f,style:{...c.style,userSelect:m?"text":void 0,WebkitUserSelect:m?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),_p="HoverCardArrow",Pp=i.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,a=jt(r);return o.jsx(S.Arrow,{...a,...n,ref:t})});Pp.displayName=_p;function ft(e){return t=>t.pointerType==="touch"?void 0:e()}function Ap(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}var Dp=qa,Op=Ya,Lp=Xa,$p=Za,Je="Menubar",[Ut,zp,Fp]=S.createCollection(Je),[Qa]=g.createContextScope(Je,[Fp,S.createRovingFocusGroupScope]),se=Xe(),Ja=S.createRovingFocusGroupScope(),[Hp,qr]=Qa(Je),es=i.forwardRef((e,t)=>{const{__scopeMenubar:r,value:n,onValueChange:a,defaultValue:s,loop:l=!0,dir:c,...d}=e,p=S.useDirection(c),u=Ja(r),[f,m]=g.useControllableState({prop:n,onChange:a,defaultProp:s??"",caller:Je}),[b,v]=i.useState(null);return o.jsx(Hp,{scope:r,value:f,onMenuOpen:i.useCallback(x=>{m(x),v(x)},[m]),onMenuClose:i.useCallback(()=>m(""),[m]),onMenuToggle:i.useCallback(x=>{m(w=>w?"":x),v(x)},[m]),dir:p,loop:l,children:o.jsx(Ut.Provider,{scope:r,children:o.jsx(Ut.Slot,{scope:r,children:o.jsx(S.Root$1,{asChild:!0,...u,orientation:"horizontal",loop:l,dir:p,currentTabStopId:b,onCurrentTabStopIdChange:v,children:o.jsx(g.Primitive.div,{role:"menubar",...d,ref:t})})})})})});es.displayName=Je;var Ur="MenubarMenu",[Gp,ts]=Qa(Ur),rs=e=>{const{__scopeMenubar:t,value:r,...n}=e,a=g.useId(),s=r||a||"LEGACY_REACT_AUTO_VALUE",l=qr(Ur,t),c=se(t),d=i.useRef(null),p=i.useRef(!1),u=l.value===s;return i.useEffect(()=>{u||(p.current=!1)},[u]),o.jsx(Gp,{scope:t,value:s,triggerId:g.useId(),triggerRef:d,contentId:g.useId(),wasKeyboardTriggerOpenRef:p,children:o.jsx(Cr,{...c,open:u,onOpenChange:f=>{f||l.onMenuClose()},modal:!1,dir:l.dir,...n})})};rs.displayName=Ur;var Yt="MenubarTrigger",os=i.forwardRef((e,t)=>{const{__scopeMenubar:r,disabled:n=!1,...a}=e,s=Ja(r),l=se(r),c=qr(Yt,r),d=ts(Yt,r),p=i.useRef(null),u=g.useComposedRefs(t,p,d.triggerRef),[f,m]=i.useState(!1),b=c.value===d.value;return o.jsx(Ut.ItemSlot,{scope:r,value:d.value,disabled:n,children:o.jsx(S.Item,{asChild:!0,...s,focusable:!n,tabStopId:d.value,children:o.jsx(yr,{asChild:!0,...l,children:o.jsx(g.Primitive.button,{type:"button",role:"menuitem",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":b,"aria-controls":b?d.contentId:void 0,"data-highlighted":f?"":void 0,"data-state":b?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:u,onPointerDown:g.composeEventHandlers(e.onPointerDown,v=>{!n&&v.button===0&&v.ctrlKey===!1&&(c.onMenuOpen(d.value),b||v.preventDefault())}),onPointerEnter:g.composeEventHandlers(e.onPointerEnter,()=>{c.value&&!b&&(c.onMenuOpen(d.value),p.current?.focus())}),onKeyDown:g.composeEventHandlers(e.onKeyDown,v=>{n||(["Enter"," "].includes(v.key)&&c.onMenuToggle(d.value),v.key==="ArrowDown"&&c.onMenuOpen(d.value),["Enter"," ","ArrowDown"].includes(v.key)&&(d.wasKeyboardTriggerOpenRef.current=!0,v.preventDefault()))}),onFocus:g.composeEventHandlers(e.onFocus,()=>m(!0)),onBlur:g.composeEventHandlers(e.onBlur,()=>m(!1))})})})})});os.displayName=Yt;var Bp="MenubarPortal",ns=e=>{const{__scopeMenubar:t,...r}=e,n=se(t);return o.jsx(Sr,{...n,...r})};ns.displayName=Bp;var Xt="MenubarContent",as=i.forwardRef((e,t)=>{const{__scopeMenubar:r,align:n="start",...a}=e,s=se(r),l=qr(Xt,r),c=ts(Xt,r),d=zp(r),p=i.useRef(!1);return o.jsx(Nr,{id:c.contentId,"aria-labelledby":c.triggerId,"data-radix-menubar-content":"",...s,...a,ref:t,align:n,onCloseAutoFocus:g.composeEventHandlers(e.onCloseAutoFocus,u=>{!l.value&&!p.current&&c.triggerRef.current?.focus(),p.current=!1,u.preventDefault()}),onFocusOutside:g.composeEventHandlers(e.onFocusOutside,u=>{const f=u.target;d().some(b=>b.ref.current?.contains(f))&&u.preventDefault()}),onInteractOutside:g.composeEventHandlers(e.onInteractOutside,()=>{p.current=!0}),onEntryFocus:u=>{c.wasKeyboardTriggerOpenRef.current||u.preventDefault()},onKeyDown:g.composeEventHandlers(e.onKeyDown,u=>{if(["ArrowRight","ArrowLeft"].includes(u.key)){const f=u.target,m=f.hasAttribute("data-radix-menubar-subtrigger"),b=f.closest("[data-radix-menubar-content]")!==u.currentTarget,x=(l.dir==="rtl"?"ArrowRight":"ArrowLeft")===u.key;if(!x&&m||b&&x)return;let N=d().filter(M=>!M.disabled).map(M=>M.value);x&&N.reverse();const y=N.indexOf(c.value);N=l.loop?rf(N,y+1):N.slice(y+1);const[k]=N;k&&l.onMenuOpen(k)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});as.displayName=Xt;var Vp="MenubarGroup",ss=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Mr,{...a,...n,ref:t})});ss.displayName=Vp;var Wp="MenubarLabel",is=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(kr,{...a,...n,ref:t})});is.displayName=Wp;var Kp="MenubarItem",ls=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Rr,{...a,...n,ref:t})});ls.displayName=Kp;var qp="MenubarCheckboxItem",cs=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Er,{...a,...n,ref:t})});cs.displayName=qp;var Up="MenubarRadioGroup",ds=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(jr,{...a,...n,ref:t})});ds.displayName=Up;var Yp="MenubarRadioItem",us=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Ir,{...a,...n,ref:t})});us.displayName=Yp;var Xp="MenubarItemIndicator",ps=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Tr,{...a,...n,ref:t})});ps.displayName=Xp;var Zp="MenubarSeparator",fs=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(_r,{...a,...n,ref:t})});fs.displayName=Zp;var Qp="MenubarArrow",Jp=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Pr,{...a,...n,ref:t})});Jp.displayName=Qp;var ms="MenubarSub",gs=e=>{const{__scopeMenubar:t,children:r,open:n,onOpenChange:a,defaultOpen:s}=e,l=se(t),[c,d]=g.useControllableState({prop:n,defaultProp:s??!1,onChange:a,caller:ms});return o.jsx(Ar,{...l,open:c,onOpenChange:d,children:r})};gs.displayName=ms;var ef="MenubarSubTrigger",hs=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Dr,{"data-radix-menubar-subtrigger":"",...a,...n,ref:t})});hs.displayName=ef;var tf="MenubarSubContent",vs=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Or,{...a,"data-radix-menubar-content":"",...n,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});vs.displayName=tf;function rf(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var of=es,nf=rs,af=os,sf=ns,lf=as,cf=ss,df=is,uf=ls,pf=cs,ff=ds,mf=us,bs=ps,gf=fs,hf=gs,vf=hs,bf=vs,Ae="NavigationMenu",[Yr,xs,xf]=S.createCollection(Ae),[Zt,wf,Cf]=S.createCollection(Ae),[Xr]=g.createContextScope(Ae,[xf,Cf]),[yf,pe]=Xr(Ae),[Sf,Nf]=Xr(Ae),ws=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,value:n,onValueChange:a,defaultValue:s,delayDuration:l=200,skipDelayDuration:c=300,orientation:d="horizontal",dir:p,...u}=e,[f,m]=i.useState(null),b=g.useComposedRefs(t,R=>m(R)),v=S.useDirection(p),x=i.useRef(0),w=i.useRef(0),C=i.useRef(0),[N,y]=i.useState(!0),[k,M]=g.useControllableState({prop:n,onChange:R=>{const F=R!=="",A=c>0;F?(window.clearTimeout(C.current),A&&y(!1)):(window.clearTimeout(C.current),C.current=window.setTimeout(()=>y(!0),c)),a?.(R)},defaultProp:s??"",caller:Ae}),I=i.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>M(""),150)},[M]),_=i.useCallback(R=>{window.clearTimeout(w.current),M(R)},[M]),j=i.useCallback(R=>{k===R?window.clearTimeout(w.current):x.current=window.setTimeout(()=>{window.clearTimeout(w.current),M(R)},l)},[k,M,l]);return i.useEffect(()=>()=>{window.clearTimeout(x.current),window.clearTimeout(w.current),window.clearTimeout(C.current)},[]),o.jsx(Cs,{scope:r,isRootMenu:!0,value:k,dir:v,orientation:d,rootNavigationMenu:f,onTriggerEnter:R=>{window.clearTimeout(x.current),N?j(R):_(R)},onTriggerLeave:()=>{window.clearTimeout(x.current),I()},onContentEnter:()=>window.clearTimeout(w.current),onContentLeave:I,onItemSelect:R=>{M(F=>F===R?"":R)},onItemDismiss:()=>M(""),children:o.jsx(g.Primitive.nav,{"aria-label":"Main","data-orientation":d,dir:v,...u,ref:b})})});ws.displayName=Ae;var Qt="NavigationMenuSub",Mf=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,value:n,onValueChange:a,defaultValue:s,orientation:l="horizontal",...c}=e,d=pe(Qt,r),[p,u]=g.useControllableState({prop:n,onChange:a,defaultProp:s??"",caller:Qt});return o.jsx(Cs,{scope:r,isRootMenu:!1,value:p,dir:d.dir,orientation:l,rootNavigationMenu:d.rootNavigationMenu,onTriggerEnter:f=>u(f),onItemSelect:f=>u(f),onItemDismiss:()=>u(""),children:o.jsx(g.Primitive.div,{"data-orientation":l,...c,ref:t})})});Mf.displayName=Qt;var Cs=e=>{const{scope:t,isRootMenu:r,rootNavigationMenu:n,dir:a,orientation:s,children:l,value:c,onItemSelect:d,onItemDismiss:p,onTriggerEnter:u,onTriggerLeave:f,onContentEnter:m,onContentLeave:b}=e,[v,x]=i.useState(null),[w,C]=i.useState(new Map),[N,y]=i.useState(null);return o.jsx(yf,{scope:t,isRootMenu:r,rootNavigationMenu:n,value:c,previousValue:S.usePrevious(c),baseId:g.useId(),dir:a,orientation:s,viewport:v,onViewportChange:x,indicatorTrack:N,onIndicatorTrackChange:y,onTriggerEnter:g.useCallbackRef(u),onTriggerLeave:g.useCallbackRef(f),onContentEnter:g.useCallbackRef(m),onContentLeave:g.useCallbackRef(b),onItemSelect:g.useCallbackRef(d),onItemDismiss:g.useCallbackRef(p),onViewportContentChange:i.useCallback((k,M)=>{C(I=>(I.set(k,M),new Map(I)))},[]),onViewportContentRemove:i.useCallback(k=>{C(M=>M.has(k)?(M.delete(k),new Map(M)):M)},[]),children:o.jsx(Yr.Provider,{scope:t,children:o.jsx(Sf,{scope:t,items:w,children:l})})})},ys="NavigationMenuList",Ss=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,...n}=e,a=pe(ys,r),s=o.jsx(g.Primitive.ul,{"data-orientation":a.orientation,...n,ref:t});return o.jsx(g.Primitive.div,{style:{position:"relative"},ref:a.onIndicatorTrackChange,children:o.jsx(Yr.Slot,{scope:r,children:a.isRootMenu?o.jsx(Ps,{asChild:!0,children:s}):s})})});Ss.displayName=ys;var Ns="NavigationMenuItem",[kf,Ms]=Xr(Ns),ks=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,value:n,...a}=e,s=g.useId(),l=n||s||"LEGACY_REACT_AUTO_VALUE",c=i.useRef(null),d=i.useRef(null),p=i.useRef(null),u=i.useRef(()=>{}),f=i.useRef(!1),m=i.useCallback((v="start")=>{if(c.current){u.current();const x=er(c.current);x.length&&Jr(v==="start"?x:x.reverse())}},[]),b=i.useCallback(()=>{if(c.current){const v=er(c.current);v.length&&(u.current=Pf(v))}},[]);return o.jsx(kf,{scope:r,value:l,triggerRef:d,contentRef:c,focusProxyRef:p,wasEscapeCloseRef:f,onEntryKeyDown:m,onFocusProxyEnter:m,onRootContentClose:b,onContentFocusOutside:b,children:o.jsx(g.Primitive.li,{...a,ref:t})})});ks.displayName=Ns;var Jt="NavigationMenuTrigger",Rs=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,disabled:n,...a}=e,s=pe(Jt,e.__scopeNavigationMenu),l=Ms(Jt,e.__scopeNavigationMenu),c=i.useRef(null),d=g.useComposedRefs(c,l.triggerRef,t),p=Ds(s.baseId,l.value),u=Os(s.baseId,l.value),f=i.useRef(!1),m=i.useRef(!1),b=l.value===s.value;return o.jsxs(o.Fragment,{children:[o.jsx(Yr.ItemSlot,{scope:r,value:l.value,children:o.jsx(As,{asChild:!0,children:o.jsx(g.Primitive.button,{id:p,disabled:n,"data-disabled":n?"":void 0,"data-state":eo(b),"aria-expanded":b,"aria-controls":u,...a,ref:d,onPointerEnter:g.composeEventHandlers(e.onPointerEnter,()=>{m.current=!1,l.wasEscapeCloseRef.current=!1}),onPointerMove:g.composeEventHandlers(e.onPointerMove,mt(()=>{n||m.current||l.wasEscapeCloseRef.current||f.current||(s.onTriggerEnter(l.value),f.current=!0)})),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,mt(()=>{n||(s.onTriggerLeave(),f.current=!1)})),onClick:g.composeEventHandlers(e.onClick,()=>{s.onItemSelect(l.value),m.current=b}),onKeyDown:g.composeEventHandlers(e.onKeyDown,v=>{const w={horizontal:"ArrowDown",vertical:s.dir==="rtl"?"ArrowLeft":"ArrowRight"}[s.orientation];b&&v.key===w&&(l.onEntryKeyDown(),v.preventDefault())})})})}),b&&o.jsxs(o.Fragment,{children:[o.jsx(S.Root$2,{"aria-hidden":!0,tabIndex:0,ref:l.focusProxyRef,onFocus:v=>{const x=l.contentRef.current,w=v.relatedTarget,C=w===c.current,N=x?.contains(w);(C||!N)&&l.onFocusProxyEnter(C?"start":"end")}}),s.viewport&&o.jsx("span",{"aria-owns":u})]})]})});Rs.displayName=Jt;var Rf="NavigationMenuLink",Lo="navigationMenu.linkSelect",Es=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,active:n,onSelect:a,...s}=e;return o.jsx(As,{asChild:!0,children:o.jsx(g.Primitive.a,{"data-active":n?"":void 0,"aria-current":n?"page":void 0,...s,ref:t,onClick:g.composeEventHandlers(e.onClick,l=>{const c=l.target,d=new CustomEvent(Lo,{bubbles:!0,cancelable:!0});if(c.addEventListener(Lo,p=>a?.(p),{once:!0}),g.dispatchDiscreteCustomEvent(c,d),!d.defaultPrevented&&!l.metaKey){const p=new CustomEvent(st,{bubbles:!0,cancelable:!0});g.dispatchDiscreteCustomEvent(c,p)}},{checkForDefaultPrevented:!1})})})});Es.displayName=Rf;var Zr="NavigationMenuIndicator",js=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=pe(Zr,e.__scopeNavigationMenu),s=!!a.value;return a.indicatorTrack?nd.createPortal(o.jsx(g.Presence,{present:r||s,children:o.jsx(Ef,{...n,ref:t})}),a.indicatorTrack):null});js.displayName=Zr;var Ef=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,...n}=e,a=pe(Zr,r),s=xs(r),[l,c]=i.useState(null),[d,p]=i.useState(null),u=a.orientation==="horizontal",f=!!a.value;i.useEffect(()=>{const v=s().find(x=>x.value===a.value)?.ref.current;v&&c(v)},[s,a.value]);const m=()=>{l&&p({size:u?l.offsetWidth:l.offsetHeight,offset:u?l.offsetLeft:l.offsetTop})};return tr(l,m),tr(a.indicatorTrack,m),d?o.jsx(g.Primitive.div,{"aria-hidden":!0,"data-state":f?"visible":"hidden","data-orientation":a.orientation,...n,ref:t,style:{position:"absolute",...u?{left:0,width:d.size+"px",transform:`translateX(${d.offset}px)`}:{top:0,height:d.size+"px",transform:`translateY(${d.offset}px)`},...n.style}}):null}),ze="NavigationMenuContent",Is=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=pe(ze,e.__scopeNavigationMenu),s=Ms(ze,e.__scopeNavigationMenu),l=g.useComposedRefs(s.contentRef,t),c=s.value===a.value,d={value:s.value,triggerRef:s.triggerRef,focusProxyRef:s.focusProxyRef,wasEscapeCloseRef:s.wasEscapeCloseRef,onContentFocusOutside:s.onContentFocusOutside,onRootContentClose:s.onRootContentClose,...n};return a.viewport?o.jsx(jf,{forceMount:r,...d,ref:l}):o.jsx(g.Presence,{present:r||c,children:o.jsx(Ts,{"data-state":eo(c),...d,ref:l,onPointerEnter:g.composeEventHandlers(e.onPointerEnter,a.onContentEnter),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,mt(a.onContentLeave)),style:{pointerEvents:!c&&a.isRootMenu?"none":void 0,...d.style}})})});Is.displayName=ze;var jf=i.forwardRef((e,t)=>{const r=pe(ze,e.__scopeNavigationMenu),{onViewportContentChange:n,onViewportContentRemove:a}=r;return g.useLayoutEffect2(()=>{n(e.value,{ref:t,...e})},[e,t,n]),g.useLayoutEffect2(()=>()=>a(e.value),[e.value,a]),null}),st="navigationMenu.rootContentDismiss",Ts=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,value:n,triggerRef:a,focusProxyRef:s,wasEscapeCloseRef:l,onRootContentClose:c,onContentFocusOutside:d,...p}=e,u=pe(ze,r),f=i.useRef(null),m=g.useComposedRefs(f,t),b=Ds(u.baseId,n),v=Os(u.baseId,n),x=xs(r),w=i.useRef(null),{onItemDismiss:C}=u;i.useEffect(()=>{const y=f.current;if(u.isRootMenu&&y){const k=()=>{C(),c(),y.contains(document.activeElement)&&a.current?.focus()};return y.addEventListener(st,k),()=>y.removeEventListener(st,k)}},[u.isRootMenu,e.value,a,C,c]);const N=i.useMemo(()=>{const k=x().map(F=>F.value);u.dir==="rtl"&&k.reverse();const M=k.indexOf(u.value),I=k.indexOf(u.previousValue),_=n===u.value,j=I===k.indexOf(n);if(!_&&!j)return w.current;const R=(()=>{if(M!==I){if(_&&I!==-1)return M>I?"from-end":"from-start";if(j&&M!==-1)return M>I?"to-start":"to-end"}return null})();return w.current=R,R},[u.previousValue,u.value,u.dir,x,n]);return o.jsx(Ps,{asChild:!0,children:o.jsx(g.DismissableLayer,{id:v,"aria-labelledby":b,"data-motion":N,"data-orientation":u.orientation,...p,ref:m,disableOutsidePointerEvents:!1,onDismiss:()=>{const y=new Event(st,{bubbles:!0,cancelable:!0});f.current?.dispatchEvent(y)},onFocusOutside:g.composeEventHandlers(e.onFocusOutside,y=>{d();const k=y.target;u.rootNavigationMenu?.contains(k)&&y.preventDefault()}),onPointerDownOutside:g.composeEventHandlers(e.onPointerDownOutside,y=>{const k=y.target,M=x().some(_=>_.ref.current?.contains(k)),I=u.isRootMenu&&u.viewport?.contains(k);(M||I||!u.isRootMenu)&&y.preventDefault()}),onKeyDown:g.composeEventHandlers(e.onKeyDown,y=>{const k=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!k){const I=er(y.currentTarget),_=document.activeElement,j=I.findIndex(A=>A===_),F=y.shiftKey?I.slice(0,j).reverse():I.slice(j+1,I.length);Jr(F)?y.preventDefault():s.current?.focus()}}),onEscapeKeyDown:g.composeEventHandlers(e.onEscapeKeyDown,y=>{l.current=!0})})})}),Qr="NavigationMenuViewport",_s=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=!!pe(Qr,e.__scopeNavigationMenu).value;return o.jsx(g.Presence,{present:r||s,children:o.jsx(If,{...n,ref:t})})});_s.displayName=Qr;var If=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,children:n,...a}=e,s=pe(Qr,r),l=g.useComposedRefs(t,s.onViewportChange),c=Nf(ze,e.__scopeNavigationMenu),[d,p]=i.useState(null),[u,f]=i.useState(null),m=d?d?.width+"px":void 0,b=d?d?.height+"px":void 0,v=!!s.value,x=v?s.value:s.previousValue;return tr(u,()=>{u&&p({width:u.offsetWidth,height:u.offsetHeight})}),o.jsx(g.Primitive.div,{"data-state":eo(v),"data-orientation":s.orientation,...a,ref:l,style:{pointerEvents:!v&&s.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":m,"--radix-navigation-menu-viewport-height":b,...a.style},onPointerEnter:g.composeEventHandlers(e.onPointerEnter,s.onContentEnter),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,mt(s.onContentLeave)),children:Array.from(c.items).map(([C,{ref:N,forceMount:y,...k}])=>{const M=x===C;return o.jsx(g.Presence,{present:y||M,children:o.jsx(Ts,{...k,ref:g.composeRefs(N,I=>{M&&I&&f(I)})})},C)})})}),Tf="FocusGroup",Ps=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,...n}=e,a=pe(Tf,r);return o.jsx(Zt.Provider,{scope:r,children:o.jsx(Zt.Slot,{scope:r,children:o.jsx(g.Primitive.div,{dir:a.dir,...n,ref:t})})})}),$o=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],_f="FocusGroupItem",As=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,...n}=e,a=wf(r),s=pe(_f,r);return o.jsx(Zt.ItemSlot,{scope:r,children:o.jsx(g.Primitive.button,{...n,ref:t,onKeyDown:g.composeEventHandlers(e.onKeyDown,l=>{if(["Home","End",...$o].includes(l.key)){let d=a().map(f=>f.ref.current);if([s.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(l.key)&&d.reverse(),$o.includes(l.key)){const f=d.indexOf(l.currentTarget);d=d.slice(f+1)}setTimeout(()=>Jr(d)),l.preventDefault()}})})})});function er(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Jr(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}function Pf(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const r=t.dataset.tabindex;t.setAttribute("tabindex",r)})}}function tr(e,t){const r=g.useCallbackRef(t);g.useLayoutEffect2(()=>{let n=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}},[e,r])}function eo(e){return e?"open":"closed"}function Ds(e,t){return`${e}-trigger-${t}`}function Os(e,t){return`${e}-content-${t}`}function mt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Af=ws,Df=Ss,Of=ks,Lf=Rs,$f=Es,zf=js,Ff=Is,Hf=_s,to="Progress",ro=100,[Gf]=g.createContextScope(to),[Bf,Vf]=Gf(to),Ls=i.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:a,getValueLabel:s=Wf,...l}=e;(a||a===0)&&!zo(a)&&console.error(Kf(`${a}`,"Progress"));const c=zo(a)?a:ro;n!==null&&!Fo(n,c)&&console.error(qf(`${n}`,"Progress"));const d=Fo(n,c)?n:null,p=gt(d)?s(d,c):void 0;return o.jsx(Bf,{scope:r,value:d,max:c,children:o.jsx(g.Primitive.div,{"aria-valuemax":c,"aria-valuemin":0,"aria-valuenow":gt(d)?d:void 0,"aria-valuetext":p,role:"progressbar","data-state":Fs(d,c),"data-value":d??void 0,"data-max":c,...l,ref:t})})});Ls.displayName=to;var $s="ProgressIndicator",zs=i.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,a=Vf($s,r);return o.jsx(g.Primitive.div,{"data-state":Fs(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...n,ref:t})});zs.displayName=$s;function Wf(e,t){return`${Math.round(e/t*100)}%`}function Fs(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function gt(e){return typeof e=="number"}function zo(e){return gt(e)&&!isNaN(e)&&e>0}function Fo(e,t){return gt(e)&&!isNaN(e)&&e<=t&&e>=0}function Kf(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ro}\`.`}function qf(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
7
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Fd=hn,Hd=vn,Gd=bn,Bd=xn,Vd=wn,Wd=Mn,Kd=Rn,qd=yn,Ud=Nn,Yd="AspectRatio",En=i.forwardRef((e,t)=>{const{ratio:r=1/1,style:n,...a}=e;return o.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/r}%`},"data-radix-aspect-ratio-wrapper":"",children:o.jsx(g.Primitive.div,{...a,ref:t,style:{...n,position:"absolute",top:0,right:0,bottom:0,left:0}})})});En.displayName=Yd;var Xd=En,rt={exports:{}},Bt={};var Po;function Zd(){if(Po)return Bt;Po=1;var e=E;function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function c(p,m){var b=m(),h=n({inst:{value:b,getSnapshot:m}}),x=h[0].inst,w=h[1];return s(function(){x.value=b,x.getSnapshot=m,d(x)&&w({inst:x})},[p,b,m]),a(function(){return d(x)&&w({inst:x}),p(function(){d(x)&&w({inst:x})})},[p]),l(b),b}function d(p){var m=p.getSnapshot;p=p.value;try{var b=m();return!r(p,b)}catch{return!0}}function f(p,m){return m()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Bt.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Bt}var Vt={};var Ao;function Qd(){return Ao||(Ao=1,process.env.NODE_ENV!=="production"&&(function(){function e(b,h){return b===h&&(b!==0||1/b===1/h)||b!==b&&h!==h}function t(b,h){u||a.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=h();if(!p){var w=h();s(x,w)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}w=l({inst:{value:x,getSnapshot:h}});var C=w[0].inst,N=w[1];return d(function(){C.value=x,C.getSnapshot=h,r(C)&&N({inst:C})},[b,x,h]),c(function(){return r(C)&&N({inst:C}),b(function(){r(C)&&N({inst:C})})},[b]),f(x),x}function r(b){var h=b.getSnapshot;b=b.value;try{var x=h();return!s(b,x)}catch{return!0}}function n(b,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=E,s=typeof Object.is=="function"?Object.is:e,l=a.useState,c=a.useEffect,d=a.useLayoutEffect,f=a.useDebugValue,u=!1,p=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;Vt.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Vt}var Do;function Jd(){return Do||(Do=1,process.env.NODE_ENV==="production"?rt.exports=Zd():rt.exports=Qd()),rt.exports}var eu=Jd();function tu(){return eu.useSyncExternalStore(ru,()=>!0,()=>!1)}function ru(){return()=>{}}var Nt="Checkbox",[ou]=g.createContextScope(Nt),[nu,ur]=ou(Nt);function au(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:a,disabled:s,form:l,name:c,onCheckedChange:d,required:f,value:u="on",internal_do_not_use_render:p}=e,[m,b]=g.useControllableState({prop:r,defaultProp:a??!1,onChange:d,caller:Nt}),[h,x]=i.useState(null),[w,C]=i.useState(null),N=i.useRef(!1),y=h?!!l||!!h.closest("form"):!0,k={checked:m,disabled:s,setChecked:b,control:h,setControl:x,name:c,form:l,value:u,hasConsumerStoppedPropagationRef:N,required:f,defaultChecked:ke(a)?!1:a,isFormControl:y,bubbleInput:w,setBubbleInput:C};return o.jsx(nu,{scope:t,...k,children:su(p)?p(k):n})}var jn="CheckboxTrigger",In=i.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},a)=>{const{control:s,value:l,disabled:c,checked:d,required:f,setControl:u,setChecked:p,hasConsumerStoppedPropagationRef:m,isFormControl:b,bubbleInput:h}=ur(jn,e),x=g.useComposedRefs(a,u),w=i.useRef(d);return i.useEffect(()=>{const C=s?.form;if(C){const N=()=>p(w.current);return C.addEventListener("reset",N),()=>C.removeEventListener("reset",N)}},[s,p]),o.jsx(g.Primitive.button,{type:"button",role:"checkbox","aria-checked":ke(d)?"mixed":d,"aria-required":f,"data-state":An(d),"data-disabled":c?"":void 0,disabled:c,value:l,...n,ref:x,onKeyDown:g.composeEventHandlers(t,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:g.composeEventHandlers(r,C=>{p(N=>ke(N)?!0:!N),h&&b&&(m.current=C.isPropagationStopped(),m.current||C.stopPropagation())})})});In.displayName=jn;var Mt=i.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:a,defaultChecked:s,required:l,disabled:c,value:d,onCheckedChange:f,form:u,...p}=e;return o.jsx(au,{__scopeCheckbox:r,checked:a,defaultChecked:s,disabled:c,required:l,onCheckedChange:f,name:n,form:u,value:d,internal_do_not_use_render:({isFormControl:m})=>o.jsxs(o.Fragment,{children:[o.jsx(In,{...p,ref:t,__scopeCheckbox:r}),m&&o.jsx(Pn,{__scopeCheckbox:r})]})})});Mt.displayName=Nt;var Tn="CheckboxIndicator",pr=i.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...a}=e,s=ur(Tn,r);return o.jsx(g.Presence,{present:n||ke(s.checked)||s.checked===!0,children:o.jsx(g.Primitive.span,{"data-state":An(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});pr.displayName=Tn;var _n="CheckboxBubbleInput",Pn=i.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:a,checked:s,defaultChecked:l,required:c,disabled:d,name:f,value:u,form:p,bubbleInput:m,setBubbleInput:b}=ur(_n,e),h=g.useComposedRefs(r,b),x=S.usePrevious(s),w=S.useSize(n);i.useEffect(()=>{const N=m;if(!N)return;const y=window.HTMLInputElement.prototype,M=Object.getOwnPropertyDescriptor(y,"checked").set,I=!a.current;if(x!==s&&M){const _=new Event("click",{bubbles:I});N.indeterminate=ke(s),M.call(N,ke(s)?!1:s),N.dispatchEvent(_)}},[m,x,s,a]);const C=i.useRef(ke(s)?!1:s);return o.jsx(g.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??C.current,required:c,disabled:d,name:f,value:u,form:p,...t,tabIndex:-1,ref:h,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Pn.displayName=_n;function su(e){return typeof e=="function"}function ke(e){return e==="indeterminate"}function An(e){return ke(e)?"indeterminate":e?"checked":"unchecked"}var qt=["Enter"," "],iu=["ArrowDown","PageUp","Home"],Dn=["ArrowUp","PageDown","End"],lu=[...iu,...Dn],cu={ltr:[...qt,"ArrowRight"],rtl:[...qt,"ArrowLeft"]},du={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ye="Menu",[Ve,uu,pu]=S.createCollection(Ye),[Pe,Xe]=g.createContextScope(Ye,[pu,S.createPopperScope,S.createRovingFocusGroupScope]),Ze=S.createPopperScope(),On=S.createRovingFocusGroupScope(),[Ln,Re]=Pe(Ye),[fu,Qe]=Pe(Ye),$n=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:s,modal:l=!0}=e,c=Ze(t),[d,f]=i.useState(null),u=i.useRef(!1),p=g.useCallbackRef(s),m=S.useDirection(a);return i.useEffect(()=>{const b=()=>{u.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>u.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),o.jsx(S.Root2,{...c,children:o.jsx(Ln,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:f,children:o.jsx(fu,{scope:t,onClose:i.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:u,dir:m,modal:l,children:n})})})};$n.displayName=Ye;var mu="MenuAnchor",fr=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=Ze(r);return o.jsx(S.Anchor,{...a,...n,ref:t})});fr.displayName=mu;var mr="MenuPortal",[gu,zn]=Pe(mr,{forceMount:void 0}),Fn=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:a}=e,s=Re(mr,t);return o.jsx(gu,{scope:t,forceMount:r,children:o.jsx(g.Presence,{present:r||s.open,children:o.jsx(g.Portal,{asChild:!0,container:a,children:n})})})};Fn.displayName=mr;var ue="MenuContent",[hu,gr]=Pe(ue),Hn=i.forwardRef((e,t)=>{const r=zn(ue,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,s=Re(ue,e.__scopeMenu),l=Qe(ue,e.__scopeMenu);return o.jsx(Ve.Provider,{scope:e.__scopeMenu,children:o.jsx(g.Presence,{present:n||s.open,children:o.jsx(Ve.Slot,{scope:e.__scopeMenu,children:l.modal?o.jsx(vu,{...a,ref:t}):o.jsx(bu,{...a,ref:t})})})})}),vu=i.forwardRef((e,t)=>{const r=Re(ue,e.__scopeMenu),n=i.useRef(null),a=g.useComposedRefs(t,n);return i.useEffect(()=>{const s=n.current;if(s)return g.hideOthers(s)},[]),o.jsx(hr,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:g.composeEventHandlers(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),bu=i.forwardRef((e,t)=>{const r=Re(ue,e.__scopeMenu);return o.jsx(hr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),xu=be.createSlot("MenuContent.ScrollLock"),hr=i.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:m,onDismiss:b,disableOutsideScroll:h,...x}=e,w=Re(ue,r),C=Qe(ue,r),N=Ze(r),y=On(r),k=uu(r),[M,I]=i.useState(null),_=i.useRef(null),j=g.useComposedRefs(t,_,w.onContentChange),R=i.useRef(0),F=i.useRef(""),A=i.useRef(0),T=i.useRef(null),D=i.useRef("right"),$=i.useRef(0),z=h?g.ReactRemoveScroll:i.Fragment,V=h?{as:xu,allowPinchZoom:!0}:void 0,P=L=>{const K=F.current+L,q=k().filter(J=>!J.disabled),X=document.activeElement,H=q.find(J=>J.ref.current===X)?.textValue,Q=q.map(J=>J.textValue),Z=Tu(Q,K,H),te=q.find(J=>J.textValue===Z)?.ref.current;(function J(ve){F.current=ve,window.clearTimeout(R.current),ve!==""&&(R.current=window.setTimeout(()=>J(""),1e3))})(K),te&&setTimeout(()=>te.focus())};i.useEffect(()=>()=>window.clearTimeout(R.current),[]),g.useFocusGuards();const W=i.useCallback(L=>D.current===T.current?.side&&Pu(L,T.current?.area),[]);return o.jsx(hu,{scope:r,searchRef:F,onItemEnter:i.useCallback(L=>{W(L)&&L.preventDefault()},[W]),onItemLeave:i.useCallback(L=>{W(L)||(_.current?.focus(),I(null))},[W]),onTriggerLeave:i.useCallback(L=>{W(L)&&L.preventDefault()},[W]),pointerGraceTimerRef:A,onPointerGraceIntentChange:i.useCallback(L=>{T.current=L},[]),children:o.jsx(z,{...V,children:o.jsx(g.FocusScope,{asChild:!0,trapped:a,onMountAutoFocus:g.composeEventHandlers(s,L=>{L.preventDefault(),_.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:o.jsx(g.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:m,onDismiss:b,children:o.jsx(S.Root$1,{asChild:!0,...y,dir:C.dir,orientation:"vertical",loop:n,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:g.composeEventHandlers(d,L=>{C.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(S.Content$1,{role:"menu","aria-orientation":"vertical","data-state":na(w.open),"data-radix-menu-content":"",dir:C.dir,...N,...x,ref:j,style:{outline:"none",...x.style},onKeyDown:g.composeEventHandlers(x.onKeyDown,L=>{const q=L.target.closest("[data-radix-menu-content]")===L.currentTarget,X=L.ctrlKey||L.altKey||L.metaKey,H=L.key.length===1;q&&(L.key==="Tab"&&L.preventDefault(),!X&&H&&P(L.key));const Q=_.current;if(L.target!==Q||!lu.includes(L.key))return;L.preventDefault();const te=k().filter(J=>!J.disabled).map(J=>J.ref.current);Dn.includes(L.key)&&te.reverse(),ju(te)}),onBlur:g.composeEventHandlers(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(R.current),F.current="")}),onPointerMove:g.composeEventHandlers(e.onPointerMove,We(L=>{const K=L.target,q=$.current!==L.clientX;if(L.currentTarget.contains(K)&&q){const X=L.clientX>$.current?"right":"left";D.current=X,$.current=L.clientX}}))})})})})})})});Hn.displayName=ue;var wu="MenuGroup",vr=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(g.Primitive.div,{role:"group",...n,ref:t})});vr.displayName=wu;var Cu="MenuLabel",Gn=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(g.Primitive.div,{...n,ref:t})});Gn.displayName=Cu;var dt="MenuItem",Oo="menu.itemSelect",kt=i.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...a}=e,s=i.useRef(null),l=Qe(dt,e.__scopeMenu),c=gr(dt,e.__scopeMenu),d=g.useComposedRefs(t,s),f=i.useRef(!1),u=()=>{const p=s.current;if(!r&&p){const m=new CustomEvent(Oo,{bubbles:!0,cancelable:!0});p.addEventListener(Oo,b=>n?.(b),{once:!0}),g.dispatchDiscreteCustomEvent(p,m),m.defaultPrevented?f.current=!1:l.onClose()}};return o.jsx(Bn,{...a,ref:d,disabled:r,onClick:g.composeEventHandlers(e.onClick,u),onPointerDown:p=>{e.onPointerDown?.(p),f.current=!0},onPointerUp:g.composeEventHandlers(e.onPointerUp,p=>{f.current||p.currentTarget?.click()}),onKeyDown:g.composeEventHandlers(e.onKeyDown,p=>{const m=c.searchRef.current!=="";r||m&&p.key===" "||qt.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});kt.displayName=dt;var Bn=i.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:a,...s}=e,l=gr(dt,r),c=On(r),d=i.useRef(null),f=g.useComposedRefs(t,d),[u,p]=i.useState(!1),[m,b]=i.useState("");return i.useEffect(()=>{const h=d.current;h&&b((h.textContent??"").trim())},[s.children]),o.jsx(Ve.ItemSlot,{scope:r,disabled:n,textValue:a??m,children:o.jsx(S.Item,{asChild:!0,...c,focusable:!n,children:o.jsx(g.Primitive.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...s,ref:f,onPointerMove:g.composeEventHandlers(e.onPointerMove,We(h=>{n?l.onItemLeave(h):(l.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,We(h=>l.onItemLeave(h))),onFocus:g.composeEventHandlers(e.onFocus,()=>p(!0)),onBlur:g.composeEventHandlers(e.onBlur,()=>p(!1))})})})}),yu="MenuCheckboxItem",Vn=i.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...a}=e;return o.jsx(Yn,{scope:e.__scopeMenu,checked:r,children:o.jsx(kt,{role:"menuitemcheckbox","aria-checked":ut(r)?"mixed":r,...a,ref:t,"data-state":wr(r),onSelect:g.composeEventHandlers(a.onSelect,()=>n?.(ut(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Vn.displayName=yu;var Wn="MenuRadioGroup",[Su,Nu]=Pe(Wn,{value:void 0,onValueChange:()=>{}}),Kn=i.forwardRef((e,t)=>{const{value:r,onValueChange:n,...a}=e,s=g.useCallbackRef(n);return o.jsx(Su,{scope:e.__scopeMenu,value:r,onValueChange:s,children:o.jsx(vr,{...a,ref:t})})});Kn.displayName=Wn;var qn="MenuRadioItem",Un=i.forwardRef((e,t)=>{const{value:r,...n}=e,a=Nu(qn,e.__scopeMenu),s=r===a.value;return o.jsx(Yn,{scope:e.__scopeMenu,checked:s,children:o.jsx(kt,{role:"menuitemradio","aria-checked":s,...n,ref:t,"data-state":wr(s),onSelect:g.composeEventHandlers(n.onSelect,()=>a.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Un.displayName=qn;var br="MenuItemIndicator",[Yn,Mu]=Pe(br,{checked:!1}),Xn=i.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...a}=e,s=Mu(br,r);return o.jsx(g.Presence,{present:n||ut(s.checked)||s.checked===!0,children:o.jsx(g.Primitive.span,{...a,ref:t,"data-state":wr(s.checked)})})});Xn.displayName=br;var ku="MenuSeparator",Zn=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(g.Primitive.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Zn.displayName=ku;var Ru="MenuArrow",Qn=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=Ze(r);return o.jsx(S.Arrow,{...a,...n,ref:t})});Qn.displayName=Ru;var xr="MenuSub",[Eu,Jn]=Pe(xr),ea=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:a}=e,s=Re(xr,t),l=Ze(t),[c,d]=i.useState(null),[f,u]=i.useState(null),p=g.useCallbackRef(a);return i.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),o.jsx(S.Root2,{...l,children:o.jsx(Ln,{scope:t,open:n,onOpenChange:p,content:f,onContentChange:u,children:o.jsx(Eu,{scope:t,contentId:g.useId(),triggerId:g.useId(),trigger:c,onTriggerChange:d,children:r})})})};ea.displayName=xr;var Be="MenuSubTrigger",ta=i.forwardRef((e,t)=>{const r=Re(Be,e.__scopeMenu),n=Qe(Be,e.__scopeMenu),a=Jn(Be,e.__scopeMenu),s=gr(Be,e.__scopeMenu),l=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,f={__scopeMenu:e.__scopeMenu},u=i.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return i.useEffect(()=>u,[u]),i.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),d(null)}},[c,d]),o.jsx(fr,{asChild:!0,...f,children:o.jsx(Bn,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":na(r.open),...e,ref:g.composeRefs(t,a.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:g.composeEventHandlers(e.onPointerMove,We(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!r.open&&!l.current&&(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,We(p=>{u();const m=r.content?.getBoundingClientRect();if(m){const b=r.content?.dataset.side,h=b==="right",x=h?-5:5,w=m[h?"left":"right"],C=m[h?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+x,y:p.clientY},{x:w,y:m.top},{x:C,y:m.top},{x:C,y:m.bottom},{x:w,y:m.bottom}],side:b}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:g.composeEventHandlers(e.onKeyDown,p=>{const m=s.searchRef.current!=="";e.disabled||m&&p.key===" "||cu[n.dir].includes(p.key)&&(r.onOpenChange(!0),r.content?.focus(),p.preventDefault())})})})});ta.displayName=Be;var ra="MenuSubContent",oa=i.forwardRef((e,t)=>{const r=zn(ue,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,s=Re(ue,e.__scopeMenu),l=Qe(ue,e.__scopeMenu),c=Jn(ra,e.__scopeMenu),d=i.useRef(null),f=g.useComposedRefs(t,d);return o.jsx(Ve.Provider,{scope:e.__scopeMenu,children:o.jsx(g.Presence,{present:n||s.open,children:o.jsx(Ve.Slot,{scope:e.__scopeMenu,children:o.jsx(hr,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:f,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{l.isUsingKeyboardRef.current&&d.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:g.composeEventHandlers(e.onFocusOutside,u=>{u.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:g.composeEventHandlers(e.onEscapeKeyDown,u=>{l.onClose(),u.preventDefault()}),onKeyDown:g.composeEventHandlers(e.onKeyDown,u=>{const p=u.currentTarget.contains(u.target),m=du[l.dir].includes(u.key);p&&m&&(s.onOpenChange(!1),c.trigger?.focus(),u.preventDefault())})})})})})});oa.displayName=ra;function na(e){return e?"open":"closed"}function ut(e){return e==="indeterminate"}function wr(e){return ut(e)?"indeterminate":e?"checked":"unchecked"}function ju(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function Iu(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function Tu(e,t,r){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let l=Iu(e,Math.max(s,0));a.length===1&&(l=l.filter(f=>f!==r));const d=l.find(f=>f.toLowerCase().startsWith(a.toLowerCase()));return d!==r?d:void 0}function _u(e,t){const{x:r,y:n}=e;let a=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const c=t[s],d=t[l],f=c.x,u=c.y,p=d.x,m=d.y;u>n!=m>n&&r<(p-f)*(n-u)/(m-u)+f&&(a=!a)}return a}function Pu(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return _u(r,t)}function We(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Cr=$n,yr=fr,Sr=Fn,Nr=Hn,Mr=vr,kr=Gn,Rr=kt,Er=Vn,jr=Kn,Ir=Un,Tr=Xn,_r=Zn,Pr=Qn,Ar=ea,Dr=ta,Or=oa,Lr="ContextMenu",[Au]=g.createContextScope(Lr,[Xe]),ne=Xe(),[Du,aa]=Au(Lr),sa=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:n,dir:a,modal:s=!0}=e,[l,c]=i.useState(!1),d=ne(t),f=g.useCallbackRef(n),u=i.useCallback(p=>{c(p),f(p)},[f]);return o.jsx(Du,{scope:t,open:l,onOpenChange:u,modal:s,children:o.jsx(Cr,{...d,dir:a,open:l,onOpenChange:u,modal:s,children:r})})};sa.displayName=Lr;var ia="ContextMenuTrigger",la=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,disabled:n=!1,...a}=e,s=aa(ia,r),l=ne(r),c=i.useRef({x:0,y:0}),d=i.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),f=i.useRef(0),u=i.useCallback(()=>window.clearTimeout(f.current),[]),p=m=>{c.current={x:m.clientX,y:m.clientY},s.onOpenChange(!0)};return i.useEffect(()=>u,[u]),i.useEffect(()=>{n&&u()},[n,u]),o.jsxs(o.Fragment,{children:[o.jsx(yr,{...l,virtualRef:d}),o.jsx(g.Primitive.span,{"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,...a,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:n?e.onContextMenu:g.composeEventHandlers(e.onContextMenu,m=>{u(),p(m),m.preventDefault()}),onPointerDown:n?e.onPointerDown:g.composeEventHandlers(e.onPointerDown,ot(m=>{u(),f.current=window.setTimeout(()=>p(m),700)})),onPointerMove:n?e.onPointerMove:g.composeEventHandlers(e.onPointerMove,ot(u)),onPointerCancel:n?e.onPointerCancel:g.composeEventHandlers(e.onPointerCancel,ot(u)),onPointerUp:n?e.onPointerUp:g.composeEventHandlers(e.onPointerUp,ot(u))})]})});la.displayName=ia;var Ou="ContextMenuPortal",ca=e=>{const{__scopeContextMenu:t,...r}=e,n=ne(t);return o.jsx(Sr,{...n,...r})};ca.displayName=Ou;var da="ContextMenuContent",ua=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=aa(da,r),s=ne(r),l=i.useRef(!1);return o.jsx(Nr,{...s,...n,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),!c.defaultPrevented&&l.current&&c.preventDefault(),l.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),!c.defaultPrevented&&!a.modal&&(l.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ua.displayName=da;var Lu="ContextMenuGroup",pa=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Mr,{...a,...n,ref:t})});pa.displayName=Lu;var $u="ContextMenuLabel",fa=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(kr,{...a,...n,ref:t})});fa.displayName=$u;var zu="ContextMenuItem",ma=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Rr,{...a,...n,ref:t})});ma.displayName=zu;var Fu="ContextMenuCheckboxItem",ga=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Er,{...a,...n,ref:t})});ga.displayName=Fu;var Hu="ContextMenuRadioGroup",ha=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(jr,{...a,...n,ref:t})});ha.displayName=Hu;var Gu="ContextMenuRadioItem",va=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Ir,{...a,...n,ref:t})});va.displayName=Gu;var Bu="ContextMenuItemIndicator",ba=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Tr,{...a,...n,ref:t})});ba.displayName=Bu;var Vu="ContextMenuSeparator",xa=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(_r,{...a,...n,ref:t})});xa.displayName=Vu;var Wu="ContextMenuArrow",Ku=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Pr,{...a,...n,ref:t})});Ku.displayName=Wu;var wa="ContextMenuSub",Ca=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:n,open:a,defaultOpen:s}=e,l=ne(t),[c,d]=g.useControllableState({prop:a,defaultProp:s??!1,onChange:n,caller:wa});return o.jsx(Ar,{...l,open:c,onOpenChange:d,children:r})};Ca.displayName=wa;var qu="ContextMenuSubTrigger",ya=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Dr,{...a,...n,ref:t})});ya.displayName=qu;var Uu="ContextMenuSubContent",Sa=i.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=ne(r);return o.jsx(Or,{...a,...n,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Sa.displayName=Uu;function ot(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var Yu=sa,Xu=la,Na=ca,Zu=ua,Qu=pa,Ju=fa,ep=ma,tp=ga,rp=ha,op=va,Ma=ba,np=xa,ap=Ca,sp=ya,ip=Sa,Rt="DropdownMenu",[lp]=g.createContextScope(Rt,[Xe]),ae=Xe(),[cp,ka]=lp(Rt),Ra=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,d=ae(t),f=i.useRef(null),[u,p]=g.useControllableState({prop:a,defaultProp:s??!1,onChange:l,caller:Rt});return o.jsx(cp,{scope:t,triggerId:g.useId(),triggerRef:f,contentId:g.useId(),open:u,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(m=>!m),[p]),modal:c,children:o.jsx(Cr,{...d,open:u,onOpenChange:p,dir:n,modal:c,children:r})})};Ra.displayName=Rt;var Ea="DropdownMenuTrigger",ja=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,s=ka(Ea,r),l=ae(r);return o.jsx(yr,{asChild:!0,...l,children:o.jsx(g.Primitive.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:g.composeRefs(t,s.triggerRef),onPointerDown:g.composeEventHandlers(e.onPointerDown,c=>{!n&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:g.composeEventHandlers(e.onKeyDown,c=>{n||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});ja.displayName=Ea;var dp="DropdownMenuPortal",Ia=e=>{const{__scopeDropdownMenu:t,...r}=e,n=ae(t);return o.jsx(Sr,{...n,...r})};Ia.displayName=dp;var Ta="DropdownMenuContent",_a=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ka(Ta,r),s=ae(r),l=i.useRef(!1);return o.jsx(Nr,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...n,ref:t,onCloseAutoFocus:g.composeEventHandlers(e.onCloseAutoFocus,c=>{l.current||a.triggerRef.current?.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:g.composeEventHandlers(e.onInteractOutside,c=>{const d=c.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,u=d.button===2||f;(!a.modal||u)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});_a.displayName=Ta;var up="DropdownMenuGroup",Pa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Mr,{...a,...n,ref:t})});Pa.displayName=up;var pp="DropdownMenuLabel",Aa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(kr,{...a,...n,ref:t})});Aa.displayName=pp;var fp="DropdownMenuItem",Da=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Rr,{...a,...n,ref:t})});Da.displayName=fp;var mp="DropdownMenuCheckboxItem",Oa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Er,{...a,...n,ref:t})});Oa.displayName=mp;var gp="DropdownMenuRadioGroup",La=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(jr,{...a,...n,ref:t})});La.displayName=gp;var hp="DropdownMenuRadioItem",$a=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Ir,{...a,...n,ref:t})});$a.displayName=hp;var vp="DropdownMenuItemIndicator",za=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Tr,{...a,...n,ref:t})});za.displayName=vp;var bp="DropdownMenuSeparator",Fa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(_r,{...a,...n,ref:t})});Fa.displayName=bp;var xp="DropdownMenuArrow",wp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Pr,{...a,...n,ref:t})});wp.displayName=xp;var Cp=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:a,defaultOpen:s}=e,l=ae(t),[c,d]=g.useControllableState({prop:n,defaultProp:s??!1,onChange:a,caller:"DropdownMenuSub"});return o.jsx(Ar,{...l,open:c,onOpenChange:d,children:r})},yp="DropdownMenuSubTrigger",Ha=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Dr,{...a,...n,ref:t})});Ha.displayName=yp;var Sp="DropdownMenuSubContent",Ga=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ae(r);return o.jsx(Or,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ga.displayName=Sp;var Np=Ra,Ba=ja,Va=Ia,$r=_a,Mp=Pa,zr=Aa,Fr=Da,Hr=Oa,kp=La,Gr=$a,Wa=za,Br=Fa,Rp=Cp,Vr=Ha,Wr=Ga,Wt,Et="HoverCard",[Ka]=g.createContextScope(Et,[S.createPopperScope]),jt=S.createPopperScope(),[Ep,It]=Ka(Et),qa=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:a,onOpenChange:s,openDelay:l=700,closeDelay:c=300}=e,d=jt(t),f=i.useRef(0),u=i.useRef(0),p=i.useRef(!1),m=i.useRef(!1),[b,h]=g.useControllableState({prop:n,defaultProp:a??!1,onChange:s,caller:Et}),x=i.useCallback(()=>{clearTimeout(u.current),f.current=window.setTimeout(()=>h(!0),l)},[l,h]),w=i.useCallback(()=>{clearTimeout(f.current),!p.current&&!m.current&&(u.current=window.setTimeout(()=>h(!1),c))},[c,h]),C=i.useCallback(()=>h(!1),[h]);return i.useEffect(()=>()=>{clearTimeout(f.current),clearTimeout(u.current)},[]),o.jsx(Ep,{scope:t,open:b,onOpenChange:h,onOpen:x,onClose:w,onDismiss:C,hasSelectionRef:p,isPointerDownOnContentRef:m,children:o.jsx(S.Root2,{...d,children:r})})};qa.displayName=Et;var Ua="HoverCardTrigger",Ya=i.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,a=It(Ua,r),s=jt(r);return o.jsx(S.Anchor,{asChild:!0,...s,children:o.jsx(g.Primitive.a,{"data-state":a.open?"open":"closed",...n,ref:t,onPointerEnter:g.composeEventHandlers(e.onPointerEnter,ft(a.onOpen)),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,ft(a.onClose)),onFocus:g.composeEventHandlers(e.onFocus,a.onOpen),onBlur:g.composeEventHandlers(e.onBlur,a.onClose),onTouchStart:g.composeEventHandlers(e.onTouchStart,l=>l.preventDefault())})})});Ya.displayName=Ua;var Kr="HoverCardPortal",[jp,Ip]=Ka(Kr,{forceMount:void 0}),Xa=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:a}=e,s=It(Kr,t);return o.jsx(jp,{scope:t,forceMount:r,children:o.jsx(g.Presence,{present:r||s.open,children:o.jsx(g.Portal,{asChild:!0,container:a,children:n})})})};Xa.displayName=Kr;var pt="HoverCardContent",Za=i.forwardRef((e,t)=>{const r=Ip(pt,e.__scopeHoverCard),{forceMount:n=r.forceMount,...a}=e,s=It(pt,e.__scopeHoverCard);return o.jsx(g.Presence,{present:n||s.open,children:o.jsx(Tp,{"data-state":s.open?"open":"closed",...a,onPointerEnter:g.composeEventHandlers(e.onPointerEnter,ft(s.onOpen)),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,ft(s.onClose)),ref:t})})});Za.displayName=pt;var Tp=i.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,...c}=e,d=It(pt,r),f=jt(r),u=i.useRef(null),p=g.useComposedRefs(t,u),[m,b]=i.useState(!1);return i.useEffect(()=>{if(m){const h=document.body;return Wt=h.style.userSelect||h.style.webkitUserSelect,h.style.userSelect="none",h.style.webkitUserSelect="none",()=>{h.style.userSelect=Wt,h.style.webkitUserSelect=Wt}}},[m]),i.useEffect(()=>{if(u.current){const h=()=>{b(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",h),()=>{document.removeEventListener("pointerup",h),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),i.useEffect(()=>{u.current&&Ap(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),o.jsx(g.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:g.composeEventHandlers(s,h=>{h.preventDefault()}),onDismiss:d.onDismiss,children:o.jsx(S.Content$1,{...f,...c,onPointerDown:g.composeEventHandlers(c.onPointerDown,h=>{h.currentTarget.contains(h.target)&&b(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:p,style:{...c.style,userSelect:m?"text":void 0,WebkitUserSelect:m?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),_p="HoverCardArrow",Pp=i.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,a=jt(r);return o.jsx(S.Arrow,{...a,...n,ref:t})});Pp.displayName=_p;function ft(e){return t=>t.pointerType==="touch"?void 0:e()}function Ap(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}var Dp=qa,Op=Ya,Lp=Xa,$p=Za,Je="Menubar",[Ut,zp,Fp]=S.createCollection(Je),[Qa]=g.createContextScope(Je,[Fp,S.createRovingFocusGroupScope]),se=Xe(),Ja=S.createRovingFocusGroupScope(),[Hp,qr]=Qa(Je),es=i.forwardRef((e,t)=>{const{__scopeMenubar:r,value:n,onValueChange:a,defaultValue:s,loop:l=!0,dir:c,...d}=e,f=S.useDirection(c),u=Ja(r),[p,m]=g.useControllableState({prop:n,onChange:a,defaultProp:s??"",caller:Je}),[b,h]=i.useState(null);return o.jsx(Hp,{scope:r,value:p,onMenuOpen:i.useCallback(x=>{m(x),h(x)},[m]),onMenuClose:i.useCallback(()=>m(""),[m]),onMenuToggle:i.useCallback(x=>{m(w=>w?"":x),h(x)},[m]),dir:f,loop:l,children:o.jsx(Ut.Provider,{scope:r,children:o.jsx(Ut.Slot,{scope:r,children:o.jsx(S.Root$1,{asChild:!0,...u,orientation:"horizontal",loop:l,dir:f,currentTabStopId:b,onCurrentTabStopIdChange:h,children:o.jsx(g.Primitive.div,{role:"menubar",...d,ref:t})})})})})});es.displayName=Je;var Ur="MenubarMenu",[Gp,ts]=Qa(Ur),rs=e=>{const{__scopeMenubar:t,value:r,...n}=e,a=g.useId(),s=r||a||"LEGACY_REACT_AUTO_VALUE",l=qr(Ur,t),c=se(t),d=i.useRef(null),f=i.useRef(!1),u=l.value===s;return i.useEffect(()=>{u||(f.current=!1)},[u]),o.jsx(Gp,{scope:t,value:s,triggerId:g.useId(),triggerRef:d,contentId:g.useId(),wasKeyboardTriggerOpenRef:f,children:o.jsx(Cr,{...c,open:u,onOpenChange:p=>{p||l.onMenuClose()},modal:!1,dir:l.dir,...n})})};rs.displayName=Ur;var Yt="MenubarTrigger",os=i.forwardRef((e,t)=>{const{__scopeMenubar:r,disabled:n=!1,...a}=e,s=Ja(r),l=se(r),c=qr(Yt,r),d=ts(Yt,r),f=i.useRef(null),u=g.useComposedRefs(t,f,d.triggerRef),[p,m]=i.useState(!1),b=c.value===d.value;return o.jsx(Ut.ItemSlot,{scope:r,value:d.value,disabled:n,children:o.jsx(S.Item,{asChild:!0,...s,focusable:!n,tabStopId:d.value,children:o.jsx(yr,{asChild:!0,...l,children:o.jsx(g.Primitive.button,{type:"button",role:"menuitem",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":b,"aria-controls":b?d.contentId:void 0,"data-highlighted":p?"":void 0,"data-state":b?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:u,onPointerDown:g.composeEventHandlers(e.onPointerDown,h=>{!n&&h.button===0&&h.ctrlKey===!1&&(c.onMenuOpen(d.value),b||h.preventDefault())}),onPointerEnter:g.composeEventHandlers(e.onPointerEnter,()=>{c.value&&!b&&(c.onMenuOpen(d.value),f.current?.focus())}),onKeyDown:g.composeEventHandlers(e.onKeyDown,h=>{n||(["Enter"," "].includes(h.key)&&c.onMenuToggle(d.value),h.key==="ArrowDown"&&c.onMenuOpen(d.value),["Enter"," ","ArrowDown"].includes(h.key)&&(d.wasKeyboardTriggerOpenRef.current=!0,h.preventDefault()))}),onFocus:g.composeEventHandlers(e.onFocus,()=>m(!0)),onBlur:g.composeEventHandlers(e.onBlur,()=>m(!1))})})})})});os.displayName=Yt;var Bp="MenubarPortal",ns=e=>{const{__scopeMenubar:t,...r}=e,n=se(t);return o.jsx(Sr,{...n,...r})};ns.displayName=Bp;var Xt="MenubarContent",as=i.forwardRef((e,t)=>{const{__scopeMenubar:r,align:n="start",...a}=e,s=se(r),l=qr(Xt,r),c=ts(Xt,r),d=zp(r),f=i.useRef(!1);return o.jsx(Nr,{id:c.contentId,"aria-labelledby":c.triggerId,"data-radix-menubar-content":"",...s,...a,ref:t,align:n,onCloseAutoFocus:g.composeEventHandlers(e.onCloseAutoFocus,u=>{!l.value&&!f.current&&c.triggerRef.current?.focus(),f.current=!1,u.preventDefault()}),onFocusOutside:g.composeEventHandlers(e.onFocusOutside,u=>{const p=u.target;d().some(b=>b.ref.current?.contains(p))&&u.preventDefault()}),onInteractOutside:g.composeEventHandlers(e.onInteractOutside,()=>{f.current=!0}),onEntryFocus:u=>{c.wasKeyboardTriggerOpenRef.current||u.preventDefault()},onKeyDown:g.composeEventHandlers(e.onKeyDown,u=>{if(["ArrowRight","ArrowLeft"].includes(u.key)){const p=u.target,m=p.hasAttribute("data-radix-menubar-subtrigger"),b=p.closest("[data-radix-menubar-content]")!==u.currentTarget,x=(l.dir==="rtl"?"ArrowRight":"ArrowLeft")===u.key;if(!x&&m||b&&x)return;let N=d().filter(M=>!M.disabled).map(M=>M.value);x&&N.reverse();const y=N.indexOf(c.value);N=l.loop?rf(N,y+1):N.slice(y+1);const[k]=N;k&&l.onMenuOpen(k)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});as.displayName=Xt;var Vp="MenubarGroup",ss=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Mr,{...a,...n,ref:t})});ss.displayName=Vp;var Wp="MenubarLabel",is=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(kr,{...a,...n,ref:t})});is.displayName=Wp;var Kp="MenubarItem",ls=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Rr,{...a,...n,ref:t})});ls.displayName=Kp;var qp="MenubarCheckboxItem",cs=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Er,{...a,...n,ref:t})});cs.displayName=qp;var Up="MenubarRadioGroup",ds=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(jr,{...a,...n,ref:t})});ds.displayName=Up;var Yp="MenubarRadioItem",us=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Ir,{...a,...n,ref:t})});us.displayName=Yp;var Xp="MenubarItemIndicator",ps=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Tr,{...a,...n,ref:t})});ps.displayName=Xp;var Zp="MenubarSeparator",fs=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(_r,{...a,...n,ref:t})});fs.displayName=Zp;var Qp="MenubarArrow",Jp=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Pr,{...a,...n,ref:t})});Jp.displayName=Qp;var ms="MenubarSub",gs=e=>{const{__scopeMenubar:t,children:r,open:n,onOpenChange:a,defaultOpen:s}=e,l=se(t),[c,d]=g.useControllableState({prop:n,defaultProp:s??!1,onChange:a,caller:ms});return o.jsx(Ar,{...l,open:c,onOpenChange:d,children:r})};gs.displayName=ms;var ef="MenubarSubTrigger",hs=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Dr,{"data-radix-menubar-subtrigger":"",...a,...n,ref:t})});hs.displayName=ef;var tf="MenubarSubContent",vs=i.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,a=se(r);return o.jsx(Or,{...a,"data-radix-menubar-content":"",...n,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});vs.displayName=tf;function rf(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var of=es,nf=rs,af=os,sf=ns,lf=as,cf=ss,df=is,uf=ls,pf=cs,ff=ds,mf=us,bs=ps,gf=fs,hf=gs,vf=hs,bf=vs,Ae="NavigationMenu",[Yr,xs,xf]=S.createCollection(Ae),[Zt,wf,Cf]=S.createCollection(Ae),[Xr]=g.createContextScope(Ae,[xf,Cf]),[yf,pe]=Xr(Ae),[Sf,Nf]=Xr(Ae),ws=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,value:n,onValueChange:a,defaultValue:s,delayDuration:l=200,skipDelayDuration:c=300,orientation:d="horizontal",dir:f,...u}=e,[p,m]=i.useState(null),b=g.useComposedRefs(t,R=>m(R)),h=S.useDirection(f),x=i.useRef(0),w=i.useRef(0),C=i.useRef(0),[N,y]=i.useState(!0),[k,M]=g.useControllableState({prop:n,onChange:R=>{const F=R!=="",A=c>0;F?(window.clearTimeout(C.current),A&&y(!1)):(window.clearTimeout(C.current),C.current=window.setTimeout(()=>y(!0),c)),a?.(R)},defaultProp:s??"",caller:Ae}),I=i.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>M(""),150)},[M]),_=i.useCallback(R=>{window.clearTimeout(w.current),M(R)},[M]),j=i.useCallback(R=>{k===R?window.clearTimeout(w.current):x.current=window.setTimeout(()=>{window.clearTimeout(w.current),M(R)},l)},[k,M,l]);return i.useEffect(()=>()=>{window.clearTimeout(x.current),window.clearTimeout(w.current),window.clearTimeout(C.current)},[]),o.jsx(Cs,{scope:r,isRootMenu:!0,value:k,dir:h,orientation:d,rootNavigationMenu:p,onTriggerEnter:R=>{window.clearTimeout(x.current),N?j(R):_(R)},onTriggerLeave:()=>{window.clearTimeout(x.current),I()},onContentEnter:()=>window.clearTimeout(w.current),onContentLeave:I,onItemSelect:R=>{M(F=>F===R?"":R)},onItemDismiss:()=>M(""),children:o.jsx(g.Primitive.nav,{"aria-label":"Main","data-orientation":d,dir:h,...u,ref:b})})});ws.displayName=Ae;var Qt="NavigationMenuSub",Mf=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,value:n,onValueChange:a,defaultValue:s,orientation:l="horizontal",...c}=e,d=pe(Qt,r),[f,u]=g.useControllableState({prop:n,onChange:a,defaultProp:s??"",caller:Qt});return o.jsx(Cs,{scope:r,isRootMenu:!1,value:f,dir:d.dir,orientation:l,rootNavigationMenu:d.rootNavigationMenu,onTriggerEnter:p=>u(p),onItemSelect:p=>u(p),onItemDismiss:()=>u(""),children:o.jsx(g.Primitive.div,{"data-orientation":l,...c,ref:t})})});Mf.displayName=Qt;var Cs=e=>{const{scope:t,isRootMenu:r,rootNavigationMenu:n,dir:a,orientation:s,children:l,value:c,onItemSelect:d,onItemDismiss:f,onTriggerEnter:u,onTriggerLeave:p,onContentEnter:m,onContentLeave:b}=e,[h,x]=i.useState(null),[w,C]=i.useState(new Map),[N,y]=i.useState(null);return o.jsx(yf,{scope:t,isRootMenu:r,rootNavigationMenu:n,value:c,previousValue:S.usePrevious(c),baseId:g.useId(),dir:a,orientation:s,viewport:h,onViewportChange:x,indicatorTrack:N,onIndicatorTrackChange:y,onTriggerEnter:g.useCallbackRef(u),onTriggerLeave:g.useCallbackRef(p),onContentEnter:g.useCallbackRef(m),onContentLeave:g.useCallbackRef(b),onItemSelect:g.useCallbackRef(d),onItemDismiss:g.useCallbackRef(f),onViewportContentChange:i.useCallback((k,M)=>{C(I=>(I.set(k,M),new Map(I)))},[]),onViewportContentRemove:i.useCallback(k=>{C(M=>M.has(k)?(M.delete(k),new Map(M)):M)},[]),children:o.jsx(Yr.Provider,{scope:t,children:o.jsx(Sf,{scope:t,items:w,children:l})})})},ys="NavigationMenuList",Ss=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,...n}=e,a=pe(ys,r),s=o.jsx(g.Primitive.ul,{"data-orientation":a.orientation,...n,ref:t});return o.jsx(g.Primitive.div,{style:{position:"relative"},ref:a.onIndicatorTrackChange,children:o.jsx(Yr.Slot,{scope:r,children:a.isRootMenu?o.jsx(Ps,{asChild:!0,children:s}):s})})});Ss.displayName=ys;var Ns="NavigationMenuItem",[kf,Ms]=Xr(Ns),ks=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,value:n,...a}=e,s=g.useId(),l=n||s||"LEGACY_REACT_AUTO_VALUE",c=i.useRef(null),d=i.useRef(null),f=i.useRef(null),u=i.useRef(()=>{}),p=i.useRef(!1),m=i.useCallback((h="start")=>{if(c.current){u.current();const x=er(c.current);x.length&&Jr(h==="start"?x:x.reverse())}},[]),b=i.useCallback(()=>{if(c.current){const h=er(c.current);h.length&&(u.current=Pf(h))}},[]);return o.jsx(kf,{scope:r,value:l,triggerRef:d,contentRef:c,focusProxyRef:f,wasEscapeCloseRef:p,onEntryKeyDown:m,onFocusProxyEnter:m,onRootContentClose:b,onContentFocusOutside:b,children:o.jsx(g.Primitive.li,{...a,ref:t})})});ks.displayName=Ns;var Jt="NavigationMenuTrigger",Rs=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,disabled:n,...a}=e,s=pe(Jt,e.__scopeNavigationMenu),l=Ms(Jt,e.__scopeNavigationMenu),c=i.useRef(null),d=g.useComposedRefs(c,l.triggerRef,t),f=Ds(s.baseId,l.value),u=Os(s.baseId,l.value),p=i.useRef(!1),m=i.useRef(!1),b=l.value===s.value;return o.jsxs(o.Fragment,{children:[o.jsx(Yr.ItemSlot,{scope:r,value:l.value,children:o.jsx(As,{asChild:!0,children:o.jsx(g.Primitive.button,{id:f,disabled:n,"data-disabled":n?"":void 0,"data-state":eo(b),"aria-expanded":b,"aria-controls":u,...a,ref:d,onPointerEnter:g.composeEventHandlers(e.onPointerEnter,()=>{m.current=!1,l.wasEscapeCloseRef.current=!1}),onPointerMove:g.composeEventHandlers(e.onPointerMove,mt(()=>{n||m.current||l.wasEscapeCloseRef.current||p.current||(s.onTriggerEnter(l.value),p.current=!0)})),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,mt(()=>{n||(s.onTriggerLeave(),p.current=!1)})),onClick:g.composeEventHandlers(e.onClick,()=>{s.onItemSelect(l.value),m.current=b}),onKeyDown:g.composeEventHandlers(e.onKeyDown,h=>{const w={horizontal:"ArrowDown",vertical:s.dir==="rtl"?"ArrowLeft":"ArrowRight"}[s.orientation];b&&h.key===w&&(l.onEntryKeyDown(),h.preventDefault())})})})}),b&&o.jsxs(o.Fragment,{children:[o.jsx(S.Root$2,{"aria-hidden":!0,tabIndex:0,ref:l.focusProxyRef,onFocus:h=>{const x=l.contentRef.current,w=h.relatedTarget,C=w===c.current,N=x?.contains(w);(C||!N)&&l.onFocusProxyEnter(C?"start":"end")}}),s.viewport&&o.jsx("span",{"aria-owns":u})]})]})});Rs.displayName=Jt;var Rf="NavigationMenuLink",Lo="navigationMenu.linkSelect",Es=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,active:n,onSelect:a,...s}=e;return o.jsx(As,{asChild:!0,children:o.jsx(g.Primitive.a,{"data-active":n?"":void 0,"aria-current":n?"page":void 0,...s,ref:t,onClick:g.composeEventHandlers(e.onClick,l=>{const c=l.target,d=new CustomEvent(Lo,{bubbles:!0,cancelable:!0});if(c.addEventListener(Lo,f=>a?.(f),{once:!0}),g.dispatchDiscreteCustomEvent(c,d),!d.defaultPrevented&&!l.metaKey){const f=new CustomEvent(st,{bubbles:!0,cancelable:!0});g.dispatchDiscreteCustomEvent(c,f)}},{checkForDefaultPrevented:!1})})})});Es.displayName=Rf;var Zr="NavigationMenuIndicator",js=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=pe(Zr,e.__scopeNavigationMenu),s=!!a.value;return a.indicatorTrack?nd.createPortal(o.jsx(g.Presence,{present:r||s,children:o.jsx(Ef,{...n,ref:t})}),a.indicatorTrack):null});js.displayName=Zr;var Ef=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,...n}=e,a=pe(Zr,r),s=xs(r),[l,c]=i.useState(null),[d,f]=i.useState(null),u=a.orientation==="horizontal",p=!!a.value;i.useEffect(()=>{const h=s().find(x=>x.value===a.value)?.ref.current;h&&c(h)},[s,a.value]);const m=()=>{l&&f({size:u?l.offsetWidth:l.offsetHeight,offset:u?l.offsetLeft:l.offsetTop})};return tr(l,m),tr(a.indicatorTrack,m),d?o.jsx(g.Primitive.div,{"aria-hidden":!0,"data-state":p?"visible":"hidden","data-orientation":a.orientation,...n,ref:t,style:{position:"absolute",...u?{left:0,width:d.size+"px",transform:`translateX(${d.offset}px)`}:{top:0,height:d.size+"px",transform:`translateY(${d.offset}px)`},...n.style}}):null}),ze="NavigationMenuContent",Is=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=pe(ze,e.__scopeNavigationMenu),s=Ms(ze,e.__scopeNavigationMenu),l=g.useComposedRefs(s.contentRef,t),c=s.value===a.value,d={value:s.value,triggerRef:s.triggerRef,focusProxyRef:s.focusProxyRef,wasEscapeCloseRef:s.wasEscapeCloseRef,onContentFocusOutside:s.onContentFocusOutside,onRootContentClose:s.onRootContentClose,...n};return a.viewport?o.jsx(jf,{forceMount:r,...d,ref:l}):o.jsx(g.Presence,{present:r||c,children:o.jsx(Ts,{"data-state":eo(c),...d,ref:l,onPointerEnter:g.composeEventHandlers(e.onPointerEnter,a.onContentEnter),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,mt(a.onContentLeave)),style:{pointerEvents:!c&&a.isRootMenu?"none":void 0,...d.style}})})});Is.displayName=ze;var jf=i.forwardRef((e,t)=>{const r=pe(ze,e.__scopeNavigationMenu),{onViewportContentChange:n,onViewportContentRemove:a}=r;return g.useLayoutEffect2(()=>{n(e.value,{ref:t,...e})},[e,t,n]),g.useLayoutEffect2(()=>()=>a(e.value),[e.value,a]),null}),st="navigationMenu.rootContentDismiss",Ts=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,value:n,triggerRef:a,focusProxyRef:s,wasEscapeCloseRef:l,onRootContentClose:c,onContentFocusOutside:d,...f}=e,u=pe(ze,r),p=i.useRef(null),m=g.useComposedRefs(p,t),b=Ds(u.baseId,n),h=Os(u.baseId,n),x=xs(r),w=i.useRef(null),{onItemDismiss:C}=u;i.useEffect(()=>{const y=p.current;if(u.isRootMenu&&y){const k=()=>{C(),c(),y.contains(document.activeElement)&&a.current?.focus()};return y.addEventListener(st,k),()=>y.removeEventListener(st,k)}},[u.isRootMenu,e.value,a,C,c]);const N=i.useMemo(()=>{const k=x().map(F=>F.value);u.dir==="rtl"&&k.reverse();const M=k.indexOf(u.value),I=k.indexOf(u.previousValue),_=n===u.value,j=I===k.indexOf(n);if(!_&&!j)return w.current;const R=(()=>{if(M!==I){if(_&&I!==-1)return M>I?"from-end":"from-start";if(j&&M!==-1)return M>I?"to-start":"to-end"}return null})();return w.current=R,R},[u.previousValue,u.value,u.dir,x,n]);return o.jsx(Ps,{asChild:!0,children:o.jsx(g.DismissableLayer,{id:h,"aria-labelledby":b,"data-motion":N,"data-orientation":u.orientation,...f,ref:m,disableOutsidePointerEvents:!1,onDismiss:()=>{const y=new Event(st,{bubbles:!0,cancelable:!0});p.current?.dispatchEvent(y)},onFocusOutside:g.composeEventHandlers(e.onFocusOutside,y=>{d();const k=y.target;u.rootNavigationMenu?.contains(k)&&y.preventDefault()}),onPointerDownOutside:g.composeEventHandlers(e.onPointerDownOutside,y=>{const k=y.target,M=x().some(_=>_.ref.current?.contains(k)),I=u.isRootMenu&&u.viewport?.contains(k);(M||I||!u.isRootMenu)&&y.preventDefault()}),onKeyDown:g.composeEventHandlers(e.onKeyDown,y=>{const k=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!k){const I=er(y.currentTarget),_=document.activeElement,j=I.findIndex(A=>A===_),F=y.shiftKey?I.slice(0,j).reverse():I.slice(j+1,I.length);Jr(F)?y.preventDefault():s.current?.focus()}}),onEscapeKeyDown:g.composeEventHandlers(e.onEscapeKeyDown,y=>{l.current=!0})})})}),Qr="NavigationMenuViewport",_s=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=!!pe(Qr,e.__scopeNavigationMenu).value;return o.jsx(g.Presence,{present:r||s,children:o.jsx(If,{...n,ref:t})})});_s.displayName=Qr;var If=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,children:n,...a}=e,s=pe(Qr,r),l=g.useComposedRefs(t,s.onViewportChange),c=Nf(ze,e.__scopeNavigationMenu),[d,f]=i.useState(null),[u,p]=i.useState(null),m=d?d?.width+"px":void 0,b=d?d?.height+"px":void 0,h=!!s.value,x=h?s.value:s.previousValue;return tr(u,()=>{u&&f({width:u.offsetWidth,height:u.offsetHeight})}),o.jsx(g.Primitive.div,{"data-state":eo(h),"data-orientation":s.orientation,...a,ref:l,style:{pointerEvents:!h&&s.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":m,"--radix-navigation-menu-viewport-height":b,...a.style},onPointerEnter:g.composeEventHandlers(e.onPointerEnter,s.onContentEnter),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,mt(s.onContentLeave)),children:Array.from(c.items).map(([C,{ref:N,forceMount:y,...k}])=>{const M=x===C;return o.jsx(g.Presence,{present:y||M,children:o.jsx(Ts,{...k,ref:g.composeRefs(N,I=>{M&&I&&p(I)})})},C)})})}),Tf="FocusGroup",Ps=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,...n}=e,a=pe(Tf,r);return o.jsx(Zt.Provider,{scope:r,children:o.jsx(Zt.Slot,{scope:r,children:o.jsx(g.Primitive.div,{dir:a.dir,...n,ref:t})})})}),$o=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],_f="FocusGroupItem",As=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,...n}=e,a=wf(r),s=pe(_f,r);return o.jsx(Zt.ItemSlot,{scope:r,children:o.jsx(g.Primitive.button,{...n,ref:t,onKeyDown:g.composeEventHandlers(e.onKeyDown,l=>{if(["Home","End",...$o].includes(l.key)){let d=a().map(p=>p.ref.current);if([s.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(l.key)&&d.reverse(),$o.includes(l.key)){const p=d.indexOf(l.currentTarget);d=d.slice(p+1)}setTimeout(()=>Jr(d)),l.preventDefault()}})})})});function er(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Jr(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}function Pf(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const r=t.dataset.tabindex;t.setAttribute("tabindex",r)})}}function tr(e,t){const r=g.useCallbackRef(t);g.useLayoutEffect2(()=>{let n=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}},[e,r])}function eo(e){return e?"open":"closed"}function Ds(e,t){return`${e}-trigger-${t}`}function Os(e,t){return`${e}-content-${t}`}function mt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Af=ws,Df=Ss,Of=ks,Lf=Rs,$f=Es,zf=js,Ff=Is,Hf=_s,to="Progress",ro=100,[Gf]=g.createContextScope(to),[Bf,Vf]=Gf(to),Ls=i.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:a,getValueLabel:s=Wf,...l}=e;(a||a===0)&&!zo(a)&&console.error(Kf(`${a}`,"Progress"));const c=zo(a)?a:ro;n!==null&&!Fo(n,c)&&console.error(qf(`${n}`,"Progress"));const d=Fo(n,c)?n:null,f=gt(d)?s(d,c):void 0;return o.jsx(Bf,{scope:r,value:d,max:c,children:o.jsx(g.Primitive.div,{"aria-valuemax":c,"aria-valuemin":0,"aria-valuenow":gt(d)?d:void 0,"aria-valuetext":f,role:"progressbar","data-state":Fs(d,c),"data-value":d??void 0,"data-max":c,...l,ref:t})})});Ls.displayName=to;var $s="ProgressIndicator",zs=i.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,a=Vf($s,r);return o.jsx(g.Primitive.div,{"data-state":Fs(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...n,ref:t})});zs.displayName=$s;function Wf(e,t){return`${Math.round(e/t*100)}%`}function Fs(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function gt(e){return typeof e=="number"}function zo(e){return gt(e)&&!isNaN(e)&&e>0}function Fo(e,t){return gt(e)&&!isNaN(e)&&e<=t&&e>=0}function Kf(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ro}\`.`}function qf(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
8
8
  - a positive number
9
9
  - less than the value passed to \`max\` (or ${ro} if no \`max\` prop is set)
10
10
  - \`null\` or \`undefined\` if the progress is indeterminate.
11
11
 
12
- Defaulting to \`null\`.`}var Uf=Ls,Yf=zs,oo="Radio",[Xf,Hs]=g.createContextScope(oo),[Zf,Qf]=Xf(oo),Gs=i.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:a=!1,required:s,disabled:l,value:c="on",onCheck:d,form:p,...u}=e,[f,m]=i.useState(null),b=g.useComposedRefs(t,w=>m(w)),v=i.useRef(!1),x=f?p||!!f.closest("form"):!0;return o.jsxs(Zf,{scope:r,checked:a,disabled:l,children:[o.jsx(g.Primitive.button,{type:"button",role:"radio","aria-checked":a,"data-state":Ks(a),"data-disabled":l?"":void 0,disabled:l,value:c,...u,ref:b,onClick:g.composeEventHandlers(e.onClick,w=>{a||d?.(),x&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})}),x&&o.jsx(Ws,{control:f,bubbles:!v.current,name:n,value:c,checked:a,required:s,disabled:l,form:p,style:{transform:"translateX(-100%)"}})]})});Gs.displayName=oo;var Bs="RadioIndicator",Vs=i.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...a}=e,s=Qf(Bs,r);return o.jsx(g.Presence,{present:n||s.checked,children:o.jsx(g.Primitive.span,{"data-state":Ks(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:t})})});Vs.displayName=Bs;var Jf="RadioBubbleInput",Ws=i.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...a},s)=>{const l=i.useRef(null),c=g.useComposedRefs(l,s),d=S.usePrevious(r),p=S.useSize(t);return i.useEffect(()=>{const u=l.current;if(!u)return;const f=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(f,"checked").set;if(d!==r&&b){const v=new Event("click",{bubbles:n});b.call(u,r),u.dispatchEvent(v)}},[d,r,n]),o.jsx(g.Primitive.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:c,style:{...a.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ws.displayName=Jf;function Ks(e){return e?"checked":"unchecked"}var em=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Tt="RadioGroup",[tm]=g.createContextScope(Tt,[S.createRovingFocusGroupScope,Hs]),qs=S.createRovingFocusGroupScope(),Us=Hs(),[rm,om]=tm(Tt),Ys=i.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:a,value:s,required:l=!1,disabled:c=!1,orientation:d,dir:p,loop:u=!0,onValueChange:f,...m}=e,b=qs(r),v=S.useDirection(p),[x,w]=g.useControllableState({prop:s,defaultProp:a??null,onChange:f,caller:Tt});return o.jsx(rm,{scope:r,name:n,required:l,disabled:c,value:x,onValueChange:w,children:o.jsx(S.Root$1,{asChild:!0,...b,orientation:d,dir:v,loop:u,children:o.jsx(g.Primitive.div,{role:"radiogroup","aria-required":l,"aria-orientation":d,"data-disabled":c?"":void 0,dir:v,...m,ref:t})})})});Ys.displayName=Tt;var Xs="RadioGroupItem",Zs=i.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...a}=e,s=om(Xs,r),l=s.disabled||n,c=qs(r),d=Us(r),p=i.useRef(null),u=g.useComposedRefs(t,p),f=s.value===a.value,m=i.useRef(!1);return i.useEffect(()=>{const b=x=>{em.includes(x.key)&&(m.current=!0)},v=()=>m.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",v)}},[]),o.jsx(S.Item,{asChild:!0,...c,focusable:!l,active:f,children:o.jsx(Gs,{disabled:l,required:s.required,checked:f,...d,...a,name:s.name,ref:u,onCheck:()=>s.onValueChange(a.value),onKeyDown:g.composeEventHandlers(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:g.composeEventHandlers(a.onFocus,()=>{m.current&&p.current?.click()})})})});Zs.displayName=Xs;var nm="RadioGroupIndicator",Qs=i.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,a=Us(r);return o.jsx(Vs,{...a,...n,ref:t})});Qs.displayName=nm;var Js=Ys,it=Zs,rr=Qs;function am(e,t){return i.useReducer((r,n)=>t[r][n]??r,e)}var no="ScrollArea",[ei]=g.createContextScope(no),[sm,fe]=ei(no),ti=i.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:a,scrollHideDelay:s=600,...l}=e,[c,d]=i.useState(null),[p,u]=i.useState(null),[f,m]=i.useState(null),[b,v]=i.useState(null),[x,w]=i.useState(null),[C,N]=i.useState(0),[y,k]=i.useState(0),[M,I]=i.useState(!1),[_,j]=i.useState(!1),R=g.useComposedRefs(t,A=>d(A)),F=S.useDirection(a);return o.jsx(sm,{scope:r,type:n,dir:F,scrollHideDelay:s,scrollArea:c,viewport:p,onViewportChange:u,content:f,onContentChange:m,scrollbarX:b,onScrollbarXChange:v,scrollbarXEnabled:M,onScrollbarXEnabledChange:I,scrollbarY:x,onScrollbarYChange:w,scrollbarYEnabled:_,onScrollbarYEnabledChange:j,onCornerWidthChange:N,onCornerHeightChange:k,children:o.jsx(g.Primitive.div,{dir:F,...l,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});ti.displayName=no;var ri="ScrollAreaViewport",oi=i.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:a,...s}=e,l=fe(ri,r),c=i.useRef(null),d=g.useComposedRefs(t,c,l.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),o.jsx(g.Primitive.div,{"data-radix-scroll-area-viewport":"",...s,ref:d,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:o.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});oi.displayName=ri;var we="ScrollAreaScrollbar",ni=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=fe(we,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=a,c=e.orientation==="horizontal";return i.useEffect(()=>(c?s(!0):l(!0),()=>{c?s(!1):l(!1)}),[c,s,l]),a.type==="hover"?o.jsx(im,{...n,ref:t,forceMount:r}):a.type==="scroll"?o.jsx(lm,{...n,ref:t,forceMount:r}):a.type==="auto"?o.jsx(ai,{...n,ref:t,forceMount:r}):a.type==="always"?o.jsx(ao,{...n,ref:t}):null});ni.displayName=we;var im=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=fe(we,e.__scopeScrollArea),[s,l]=i.useState(!1);return i.useEffect(()=>{const c=a.scrollArea;let d=0;if(c){const p=()=>{window.clearTimeout(d),l(!0)},u=()=>{d=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return c.addEventListener("pointerenter",p),c.addEventListener("pointerleave",u),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",p),c.removeEventListener("pointerleave",u)}}},[a.scrollArea,a.scrollHideDelay]),o.jsx(g.Presence,{present:r||s,children:o.jsx(ai,{"data-state":s?"visible":"hidden",...n,ref:t})})}),lm=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=fe(we,e.__scopeScrollArea),s=e.orientation==="horizontal",l=Pt(()=>d("SCROLL_END"),100),[c,d]=am("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return i.useEffect(()=>{if(c==="idle"){const p=window.setTimeout(()=>d("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(p)}},[c,a.scrollHideDelay,d]),i.useEffect(()=>{const p=a.viewport,u=s?"scrollLeft":"scrollTop";if(p){let f=p[u];const m=()=>{const b=p[u];f!==b&&(d("SCROLL"),l()),f=b};return p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[a.viewport,s,d,l]),o.jsx(g.Presence,{present:r||c!=="hidden",children:o.jsx(ao,{"data-state":c==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:g.composeEventHandlers(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),ai=i.forwardRef((e,t)=>{const r=fe(we,e.__scopeScrollArea),{forceMount:n,...a}=e,[s,l]=i.useState(!1),c=e.orientation==="horizontal",d=Pt(()=>{if(r.viewport){const p=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;l(c?p:u)}},10);return Fe(r.viewport,d),Fe(r.content,d),o.jsx(g.Presence,{present:n||s,children:o.jsx(ao,{"data-state":s?"visible":"hidden",...a,ref:t})})}),ao=i.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,a=fe(we,e.__scopeScrollArea),s=i.useRef(null),l=i.useRef(0),[c,d]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=di(c.viewport,c.content),u={...n,sizes:c,onSizesChange:d,hasThumb:p>0&&p<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:m=>l.current=m};function f(m,b){return mm(m,l.current,c,b)}return r==="horizontal"?o.jsx(cm,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const m=a.viewport.scrollLeft,b=Ho(m,c,a.dir);s.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:m=>{a.viewport&&(a.viewport.scrollLeft=m)},onDragScroll:m=>{a.viewport&&(a.viewport.scrollLeft=f(m,a.dir))}}):r==="vertical"?o.jsx(dm,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const m=a.viewport.scrollTop,b=Ho(m,c);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:m=>{a.viewport&&(a.viewport.scrollTop=m)},onDragScroll:m=>{a.viewport&&(a.viewport.scrollTop=f(m))}}):null}),cm=i.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,s=fe(we,e.__scopeScrollArea),[l,c]=i.useState(),d=i.useRef(null),p=g.useComposedRefs(t,d,s.onScrollbarXChange);return i.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),o.jsx(ii,{"data-orientation":"horizontal",...a,ref:p,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":_t(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(s.viewport){const m=s.viewport.scrollLeft+u.deltaX;e.onWheelScroll(m),pi(m,f)&&u.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&n({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:vt(l.paddingLeft),paddingEnd:vt(l.paddingRight)}})}})}),dm=i.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,s=fe(we,e.__scopeScrollArea),[l,c]=i.useState(),d=i.useRef(null),p=g.useComposedRefs(t,d,s.onScrollbarYChange);return i.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),o.jsx(ii,{"data-orientation":"vertical",...a,ref:p,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":_t(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(s.viewport){const m=s.viewport.scrollTop+u.deltaY;e.onWheelScroll(m),pi(m,f)&&u.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&n({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:vt(l.paddingTop),paddingEnd:vt(l.paddingBottom)}})}})}),[um,si]=ei(we),ii=i.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:a,onThumbChange:s,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:p,onWheelScroll:u,onResize:f,...m}=e,b=fe(we,r),[v,x]=i.useState(null),w=g.useComposedRefs(t,R=>x(R)),C=i.useRef(null),N=i.useRef(""),y=b.viewport,k=n.content-n.viewport,M=g.useCallbackRef(u),I=g.useCallbackRef(d),_=Pt(f,10);function j(R){if(C.current){const F=R.clientX-C.current.left,A=R.clientY-C.current.top;p({x:F,y:A})}}return i.useEffect(()=>{const R=F=>{const A=F.target;v?.contains(A)&&M(F,k)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[y,v,k,M]),i.useEffect(I,[n,I]),Fe(v,_),Fe(b.content,_),o.jsx(um,{scope:r,scrollbar:v,hasThumb:a,onThumbChange:g.useCallbackRef(s),onThumbPointerUp:g.useCallbackRef(l),onThumbPositionChange:I,onThumbPointerDown:g.useCallbackRef(c),children:o.jsx(g.Primitive.div,{...m,ref:w,style:{position:"absolute",...m.style},onPointerDown:g.composeEventHandlers(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),C.current=v.getBoundingClientRect(),N.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),j(R))}),onPointerMove:g.composeEventHandlers(e.onPointerMove,j),onPointerUp:g.composeEventHandlers(e.onPointerUp,R=>{const F=R.target;F.hasPointerCapture(R.pointerId)&&F.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=N.current,b.viewport&&(b.viewport.style.scrollBehavior=""),C.current=null})})})}),ht="ScrollAreaThumb",li=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=si(ht,e.__scopeScrollArea);return o.jsx(g.Presence,{present:r||a.hasThumb,children:o.jsx(pm,{ref:t,...n})})}),pm=i.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...a}=e,s=fe(ht,r),l=si(ht,r),{onThumbPositionChange:c}=l,d=g.useComposedRefs(t,f=>l.onThumbChange(f)),p=i.useRef(void 0),u=Pt(()=>{p.current&&(p.current(),p.current=void 0)},100);return i.useEffect(()=>{const f=s.viewport;if(f){const m=()=>{if(u(),!p.current){const b=gm(f,c);p.current=b,c()}};return c(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[s.viewport,u,c]),o.jsx(g.Primitive.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:g.composeEventHandlers(e.onPointerDownCapture,f=>{const b=f.target.getBoundingClientRect(),v=f.clientX-b.left,x=f.clientY-b.top;l.onThumbPointerDown({x:v,y:x})}),onPointerUp:g.composeEventHandlers(e.onPointerUp,l.onThumbPointerUp)})});li.displayName=ht;var so="ScrollAreaCorner",ci=i.forwardRef((e,t)=>{const r=fe(so,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?o.jsx(fm,{...e,ref:t}):null});ci.displayName=so;var fm=i.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,a=fe(so,r),[s,l]=i.useState(0),[c,d]=i.useState(0),p=!!(s&&c);return Fe(a.scrollbarX,()=>{const u=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(u),d(u)}),Fe(a.scrollbarY,()=>{const u=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(u),l(u)}),p?o.jsx(g.Primitive.div,{...n,ref:t,style:{width:s,height:c,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function vt(e){return e?parseInt(e,10):0}function di(e,t){const r=e/t;return isNaN(r)?0:r}function _t(e){const t=di(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function mm(e,t,r,n="ltr"){const a=_t(r),s=a/2,l=t||s,c=a-l,d=r.scrollbar.paddingStart+l,p=r.scrollbar.size-r.scrollbar.paddingEnd-c,u=r.content-r.viewport,f=n==="ltr"?[0,u]:[u*-1,0];return ui([d,p],f)(e)}function Ho(e,t,r="ltr"){const n=_t(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-a,l=t.content-t.viewport,c=s-n,d=r==="ltr"?[0,l]:[l*-1,0],p=S.clamp(e,d);return ui([0,l],[0,c])(p)}function ui(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function pi(e,t){return e>0&&e<t}var gm=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function a(){const s={left:e.scrollLeft,top:e.scrollTop},l=r.left!==s.left,c=r.top!==s.top;(l||c)&&t(),r=s,n=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(n)};function Pt(e,t){const r=g.useCallbackRef(e),n=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(n.current),[]),i.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function Fe(e,t){const r=g.useCallbackRef(t);g.useLayoutEffect2(()=>{let n=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}},[e,r])}var fi=ti,mi=oi,gi=ci,hi="Toggle",io=i.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:a,...s}=e,[l,c]=g.useControllableState({prop:r,onChange:a,defaultProp:n??!1,caller:hi});return o.jsx(g.Primitive.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:g.composeEventHandlers(e.onClick,()=>{e.disabled||c(!l)})})});io.displayName=hi;var hm=io,Ee="ToggleGroup",[vi]=g.createContextScope(Ee,[S.createRovingFocusGroupScope]),bi=S.createRovingFocusGroupScope(),lo=E.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const a=n;return o.jsx(vm,{...a,ref:t})}if(r==="multiple"){const a=n;return o.jsx(bm,{...a,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Ee}\``)});lo.displayName=Ee;var[xi,wi]=vi(Ee),vm=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...s}=e,[l,c]=g.useControllableState({prop:r,defaultProp:n??"",onChange:a,caller:Ee});return o.jsx(xi,{scope:e.__scopeToggleGroup,type:"single",value:E.useMemo(()=>l?[l]:[],[l]),onItemActivate:c,onItemDeactivate:E.useCallback(()=>c(""),[c]),children:o.jsx(Ci,{...s,ref:t})})}),bm=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...s}=e,[l,c]=g.useControllableState({prop:r,defaultProp:n??[],onChange:a,caller:Ee}),d=E.useCallback(u=>c((f=[])=>[...f,u]),[c]),p=E.useCallback(u=>c((f=[])=>f.filter(m=>m!==u)),[c]);return o.jsx(xi,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:d,onItemDeactivate:p,children:o.jsx(Ci,{...s,ref:t})})});lo.displayName=Ee;var[xm,wm]=vi(Ee),Ci=E.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:s,dir:l,loop:c=!0,...d}=e,p=bi(r),u=S.useDirection(l),f={role:"group",dir:u,...d};return o.jsx(xm,{scope:r,rovingFocus:a,disabled:n,children:a?o.jsx(S.Root$1,{asChild:!0,...p,orientation:s,dir:u,loop:c,children:o.jsx(g.Primitive.div,{...f,ref:t})}):o.jsx(g.Primitive.div,{...f,ref:t})})}),bt="ToggleGroupItem",yi=E.forwardRef((e,t)=>{const r=wi(bt,e.__scopeToggleGroup),n=wm(bt,e.__scopeToggleGroup),a=bi(e.__scopeToggleGroup),s=r.value.includes(e.value),l=n.disabled||e.disabled,c={...e,pressed:s,disabled:l},d=E.useRef(null);return n.rovingFocus?o.jsx(S.Item,{asChild:!0,...a,focusable:!l,active:s,ref:d,children:o.jsx(Go,{...c,ref:t})}):o.jsx(Go,{...c,ref:t})});yi.displayName=bt;var Go=E.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...a}=e,s=wi(bt,r),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},c=s.type==="single"?l:void 0;return o.jsx(io,{...c,...a,ref:t,onPressedChange:d=>{d?s.onItemActivate(n):s.onItemDeactivate(n)}})}),Cm=lo,ym=yi;function Sm({className:e,children:t,...r}){return o.jsxs(fi,{"data-slot":"scroll-area",className:h.cn("relative",e),...r,children:[o.jsx(mi,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] ring-offset-background outline-none transition-[color,box-shadow] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:t}),o.jsx(Ke,{}),o.jsx(gi,{})]})}function Ke({className:e,orientation:t="vertical",...r}){return o.jsx(ni,{"data-slot":"scroll-area-scrollbar","data-orientation":t,orientation:t,className:h.cn("data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5 data-[orientation=vertical]:border-l data-[orientation=vertical]:border-l-transparent flex touch-none p-0.5 transition-colors select-none",e),...r,children:o.jsx(li,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border/80 hover:bg-border"})})}const Oe=2,Me=16;function Nm(e,t,r){if(!e||!t)return{};const{scrollTop:n,scrollLeft:a,scrollHeight:s,scrollWidth:l,clientHeight:c,clientWidth:d}=e,p=r==="vertical"||r==="both",u=r==="horizontal"||r==="both",f=s>c+Oe,m=l>d+Oe;if(!f&&!m)return{maskImage:"none",WebkitMaskImage:"none"};const b=[];if(p&&f){const x=n<=Oe,w=n+c>=s-Oe;x&&w?b.push("none"):x?b.push(`linear-gradient(to bottom, white, white calc(100% - ${Me}px), transparent)`):w?b.push(`linear-gradient(to bottom, transparent, white ${Me}px, white)`):b.push(`linear-gradient(to bottom, transparent, white ${Me}px, white calc(100% - ${Me}px), transparent)`)}if(u&&m){const x=a<=Oe,w=a+d>=l-Oe;x&&w?b.length&&b.push("none"):x?b.push(`linear-gradient(to right, white, white calc(100% - ${Me}px), transparent)`):w?b.push(`linear-gradient(to right, transparent, white ${Me}px, white)`):b.push(`linear-gradient(to right, transparent, white ${Me}px, white calc(100% - ${Me}px), transparent)`)}const v=b.filter(x=>x!=="none").join(", ")||"none";return v==="none"?{maskImage:"none",WebkitMaskImage:"none"}:{maskImage:v,WebkitMaskImage:v}}const At=i.forwardRef(({className:e,children:t,fadeMask:r=!0,hideScrollbar:n=!1,orientation:a="vertical",onScroll:s,viewportRef:l,viewportStyle:c,...d},p)=>{const u=E.useRef(null),f=E.useCallback(w=>{u.current=w,l&&(typeof l=="function"?l(w):l.current=w)},[l]),[m,b]=E.useState({}),v=E.useCallback(()=>{b(w=>{const C=Nm(u.current,r,a);return w.maskImage===C.maskImage&&w.WebkitMaskImage===C.WebkitMaskImage?w:C})},[r,a]);E.useEffect(()=>{const w=u.current;if(!w)return;v(),w.addEventListener("scroll",v,{passive:!0});const C=new ResizeObserver(v);return C.observe(w),()=>{C.disconnect(),w.removeEventListener("scroll",v)}},[v]),E.useEffect(()=>{if(a!=="both")return;const w=u.current;if(!w)return;const C=20,N=y=>{if(y.ctrlKey)return;const k=y.wheelDeltaX,M=y.wheelDeltaY;let I=Number.isFinite(y.deltaX)?y.deltaX:k!=null?-k:0,_=Number.isFinite(y.deltaY)?y.deltaY:M!=null?-M:0;y.deltaMode===1?(I*=C,_*=C):y.deltaMode===2&&(I*=w.clientWidth,_*=w.clientHeight);const{scrollLeft:j,scrollTop:R,scrollWidth:F,scrollHeight:A,clientWidth:T,clientHeight:D}=w,$=F>T&&(I>0?j<F-T:j>0),z=A>D&&(_>0?R<A-D:R>0);($||z)&&($&&(w.scrollLeft+=I),z&&(w.scrollTop+=_),y.preventDefault())};return w.addEventListener("wheel",N,{passive:!1}),()=>w.removeEventListener("wheel",N)},[a]);const x=h.cn("size-full rounded-[inherit] ring-offset-background outline-none transition-[color,box-shadow,mask-image] duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a==="vertical"&&"overflow-x-hidden",a==="horizontal"&&"overflow-y-hidden");return o.jsxs(fi,{ref:p,"data-slot":"scroll-area",className:h.cn("relative",e),...d,children:[o.jsx(mi,{ref:f,"data-slot":"scroll-area-viewport",className:x,style:{...c??{},...r?m:{},...a==="both"?{touchAction:"pan-x pan-y"}:{}},onScroll:s,children:t}),!n&&(a==="vertical"||a==="both")&&o.jsx(Ke,{orientation:"vertical"}),!n&&(a==="horizontal"||a==="both")&&o.jsx(Ke,{orientation:"horizontal"}),o.jsx(gi,{})]})});At.displayName="EnhancedScrollArea";const Mm=oe.cva("h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-2.5! inline-flex min-w-0 max-w-full items-center justify-center w-fit whitespace-nowrap [&>svg]:pointer-events-none ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-colors overflow-hidden group/badge",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive text-destructive dark:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function co({className:e,variant:t="default",asChild:r=!1,children:n,...a}){const s=r?ir.Root:"span";return o.jsx(s,{"data-slot":"badge","data-variant":t,className:h.cn(Mm({variant:t}),e),...a,children:r?n:re.wrapInlineLabelTextNodes(n)})}const Si=oe.cva("h-5 gap-1 rounded-full border px-2 py-0.5 text-[0.625rem] font-medium inline-flex min-w-0 max-w-full items-center justify-center w-fit whitespace-nowrap transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-in-out [&>svg]:size-2.5 [&>svg]:pointer-events-none has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive overflow-hidden group/badge",{variants:{variant:{default:["bg-primary text-primary-foreground border border-primary","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-primary/90 hover:border-primary/90","focus:bg-primary/80 focus:border-primary/80"],destructive:["bg-destructive text-destructive-foreground border border-destructive","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-destructive/90 hover:border-destructive/90","focus:bg-destructive/80 focus:border-destructive/80","focus-visible:ring-destructive"],secondary:["bg-secondary text-secondary-foreground border border-border","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-secondary/90 hover:border-border","focus:bg-secondary/80 focus:border-border"],success:["bg-success text-success-foreground border border-success","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-success/90 hover:border-success/90","focus:bg-success/80 focus:border-success/80"],warning:["bg-warning text-warning-foreground border border-warning","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-warning/90 hover:border-warning/90","focus:bg-warning/80 focus:border-warning/80"],info:["bg-info text-info-foreground border border-info","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-info/90 hover:border-info/90","focus:bg-info/80 focus:border-info/80"],outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}}),xt=i.forwardRef(({className:e,variant:t,asChild:r=!1,children:n,...a},s)=>{if(!(t&&["default","destructive","secondary","success","warning","info"].includes(t))&&t){const p=t==="outline"||t==="ghost"||t==="link"?"outline":t==="destructive"?"destructive":t==="secondary"?"secondary":"default";return o.jsx(co,{variant:p,className:e,...a,children:n})}const d=r?be.Slot:"span";return o.jsx(d,{"data-slot":"badge","data-variant":t,className:h.cn(Si({variant:t,className:e})),ref:s,...a,children:r?n:re.wrapInlineLabelTextNodes(n)})});co.displayName="Badge";xt.displayName="EnhancedBadge";const Bo=`
12
+ Defaulting to \`null\`.`}var Uf=Ls,Yf=zs,oo="Radio",[Xf,Hs]=g.createContextScope(oo),[Zf,Qf]=Xf(oo),Gs=i.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:a=!1,required:s,disabled:l,value:c="on",onCheck:d,form:f,...u}=e,[p,m]=i.useState(null),b=g.useComposedRefs(t,w=>m(w)),h=i.useRef(!1),x=p?f||!!p.closest("form"):!0;return o.jsxs(Zf,{scope:r,checked:a,disabled:l,children:[o.jsx(g.Primitive.button,{type:"button",role:"radio","aria-checked":a,"data-state":Ks(a),"data-disabled":l?"":void 0,disabled:l,value:c,...u,ref:b,onClick:g.composeEventHandlers(e.onClick,w=>{a||d?.(),x&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})}),x&&o.jsx(Ws,{control:p,bubbles:!h.current,name:n,value:c,checked:a,required:s,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Gs.displayName=oo;var Bs="RadioIndicator",Vs=i.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...a}=e,s=Qf(Bs,r);return o.jsx(g.Presence,{present:n||s.checked,children:o.jsx(g.Primitive.span,{"data-state":Ks(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:t})})});Vs.displayName=Bs;var Jf="RadioBubbleInput",Ws=i.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...a},s)=>{const l=i.useRef(null),c=g.useComposedRefs(l,s),d=S.usePrevious(r),f=S.useSize(t);return i.useEffect(()=>{const u=l.current;if(!u)return;const p=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==r&&b){const h=new Event("click",{bubbles:n});b.call(u,r),u.dispatchEvent(h)}},[d,r,n]),o.jsx(g.Primitive.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:c,style:{...a.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ws.displayName=Jf;function Ks(e){return e?"checked":"unchecked"}var em=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Tt="RadioGroup",[tm]=g.createContextScope(Tt,[S.createRovingFocusGroupScope,Hs]),qs=S.createRovingFocusGroupScope(),Us=Hs(),[rm,om]=tm(Tt),Ys=i.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:a,value:s,required:l=!1,disabled:c=!1,orientation:d,dir:f,loop:u=!0,onValueChange:p,...m}=e,b=qs(r),h=S.useDirection(f),[x,w]=g.useControllableState({prop:s,defaultProp:a??null,onChange:p,caller:Tt});return o.jsx(rm,{scope:r,name:n,required:l,disabled:c,value:x,onValueChange:w,children:o.jsx(S.Root$1,{asChild:!0,...b,orientation:d,dir:h,loop:u,children:o.jsx(g.Primitive.div,{role:"radiogroup","aria-required":l,"aria-orientation":d,"data-disabled":c?"":void 0,dir:h,...m,ref:t})})})});Ys.displayName=Tt;var Xs="RadioGroupItem",Zs=i.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...a}=e,s=om(Xs,r),l=s.disabled||n,c=qs(r),d=Us(r),f=i.useRef(null),u=g.useComposedRefs(t,f),p=s.value===a.value,m=i.useRef(!1);return i.useEffect(()=>{const b=x=>{em.includes(x.key)&&(m.current=!0)},h=()=>m.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",h)}},[]),o.jsx(S.Item,{asChild:!0,...c,focusable:!l,active:p,children:o.jsx(Gs,{disabled:l,required:s.required,checked:p,...d,...a,name:s.name,ref:u,onCheck:()=>s.onValueChange(a.value),onKeyDown:g.composeEventHandlers(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:g.composeEventHandlers(a.onFocus,()=>{m.current&&f.current?.click()})})})});Zs.displayName=Xs;var nm="RadioGroupIndicator",Qs=i.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,a=Us(r);return o.jsx(Vs,{...a,...n,ref:t})});Qs.displayName=nm;var Js=Ys,it=Zs,rr=Qs;function am(e,t){return i.useReducer((r,n)=>t[r][n]??r,e)}var no="ScrollArea",[ei]=g.createContextScope(no),[sm,fe]=ei(no),ti=i.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:a,scrollHideDelay:s=600,...l}=e,[c,d]=i.useState(null),[f,u]=i.useState(null),[p,m]=i.useState(null),[b,h]=i.useState(null),[x,w]=i.useState(null),[C,N]=i.useState(0),[y,k]=i.useState(0),[M,I]=i.useState(!1),[_,j]=i.useState(!1),R=g.useComposedRefs(t,A=>d(A)),F=S.useDirection(a);return o.jsx(sm,{scope:r,type:n,dir:F,scrollHideDelay:s,scrollArea:c,viewport:f,onViewportChange:u,content:p,onContentChange:m,scrollbarX:b,onScrollbarXChange:h,scrollbarXEnabled:M,onScrollbarXEnabledChange:I,scrollbarY:x,onScrollbarYChange:w,scrollbarYEnabled:_,onScrollbarYEnabledChange:j,onCornerWidthChange:N,onCornerHeightChange:k,children:o.jsx(g.Primitive.div,{dir:F,...l,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});ti.displayName=no;var ri="ScrollAreaViewport",oi=i.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:a,...s}=e,l=fe(ri,r),c=i.useRef(null),d=g.useComposedRefs(t,c,l.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),o.jsx(g.Primitive.div,{"data-radix-scroll-area-viewport":"",...s,ref:d,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:o.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});oi.displayName=ri;var we="ScrollAreaScrollbar",ni=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=fe(we,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=a,c=e.orientation==="horizontal";return i.useEffect(()=>(c?s(!0):l(!0),()=>{c?s(!1):l(!1)}),[c,s,l]),a.type==="hover"?o.jsx(im,{...n,ref:t,forceMount:r}):a.type==="scroll"?o.jsx(lm,{...n,ref:t,forceMount:r}):a.type==="auto"?o.jsx(ai,{...n,ref:t,forceMount:r}):a.type==="always"?o.jsx(ao,{...n,ref:t}):null});ni.displayName=we;var im=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=fe(we,e.__scopeScrollArea),[s,l]=i.useState(!1);return i.useEffect(()=>{const c=a.scrollArea;let d=0;if(c){const f=()=>{window.clearTimeout(d),l(!0)},u=()=>{d=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return c.addEventListener("pointerenter",f),c.addEventListener("pointerleave",u),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",f),c.removeEventListener("pointerleave",u)}}},[a.scrollArea,a.scrollHideDelay]),o.jsx(g.Presence,{present:r||s,children:o.jsx(ai,{"data-state":s?"visible":"hidden",...n,ref:t})})}),lm=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=fe(we,e.__scopeScrollArea),s=e.orientation==="horizontal",l=Pt(()=>d("SCROLL_END"),100),[c,d]=am("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return i.useEffect(()=>{if(c==="idle"){const f=window.setTimeout(()=>d("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(f)}},[c,a.scrollHideDelay,d]),i.useEffect(()=>{const f=a.viewport,u=s?"scrollLeft":"scrollTop";if(f){let p=f[u];const m=()=>{const b=f[u];p!==b&&(d("SCROLL"),l()),p=b};return f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[a.viewport,s,d,l]),o.jsx(g.Presence,{present:r||c!=="hidden",children:o.jsx(ao,{"data-state":c==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:g.composeEventHandlers(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:g.composeEventHandlers(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),ai=i.forwardRef((e,t)=>{const r=fe(we,e.__scopeScrollArea),{forceMount:n,...a}=e,[s,l]=i.useState(!1),c=e.orientation==="horizontal",d=Pt(()=>{if(r.viewport){const f=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;l(c?f:u)}},10);return Fe(r.viewport,d),Fe(r.content,d),o.jsx(g.Presence,{present:n||s,children:o.jsx(ao,{"data-state":s?"visible":"hidden",...a,ref:t})})}),ao=i.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,a=fe(we,e.__scopeScrollArea),s=i.useRef(null),l=i.useRef(0),[c,d]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=di(c.viewport,c.content),u={...n,sizes:c,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:m=>l.current=m};function p(m,b){return mm(m,l.current,c,b)}return r==="horizontal"?o.jsx(cm,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const m=a.viewport.scrollLeft,b=Ho(m,c,a.dir);s.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:m=>{a.viewport&&(a.viewport.scrollLeft=m)},onDragScroll:m=>{a.viewport&&(a.viewport.scrollLeft=p(m,a.dir))}}):r==="vertical"?o.jsx(dm,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const m=a.viewport.scrollTop,b=Ho(m,c);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:m=>{a.viewport&&(a.viewport.scrollTop=m)},onDragScroll:m=>{a.viewport&&(a.viewport.scrollTop=p(m))}}):null}),cm=i.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,s=fe(we,e.__scopeScrollArea),[l,c]=i.useState(),d=i.useRef(null),f=g.useComposedRefs(t,d,s.onScrollbarXChange);return i.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),o.jsx(ii,{"data-orientation":"horizontal",...a,ref:f,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":_t(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,p)=>{if(s.viewport){const m=s.viewport.scrollLeft+u.deltaX;e.onWheelScroll(m),pi(m,p)&&u.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&n({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:vt(l.paddingLeft),paddingEnd:vt(l.paddingRight)}})}})}),dm=i.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,s=fe(we,e.__scopeScrollArea),[l,c]=i.useState(),d=i.useRef(null),f=g.useComposedRefs(t,d,s.onScrollbarYChange);return i.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),o.jsx(ii,{"data-orientation":"vertical",...a,ref:f,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":_t(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,p)=>{if(s.viewport){const m=s.viewport.scrollTop+u.deltaY;e.onWheelScroll(m),pi(m,p)&&u.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&n({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:vt(l.paddingTop),paddingEnd:vt(l.paddingBottom)}})}})}),[um,si]=ei(we),ii=i.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:a,onThumbChange:s,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:u,onResize:p,...m}=e,b=fe(we,r),[h,x]=i.useState(null),w=g.useComposedRefs(t,R=>x(R)),C=i.useRef(null),N=i.useRef(""),y=b.viewport,k=n.content-n.viewport,M=g.useCallbackRef(u),I=g.useCallbackRef(d),_=Pt(p,10);function j(R){if(C.current){const F=R.clientX-C.current.left,A=R.clientY-C.current.top;f({x:F,y:A})}}return i.useEffect(()=>{const R=F=>{const A=F.target;h?.contains(A)&&M(F,k)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[y,h,k,M]),i.useEffect(I,[n,I]),Fe(h,_),Fe(b.content,_),o.jsx(um,{scope:r,scrollbar:h,hasThumb:a,onThumbChange:g.useCallbackRef(s),onThumbPointerUp:g.useCallbackRef(l),onThumbPositionChange:I,onThumbPointerDown:g.useCallbackRef(c),children:o.jsx(g.Primitive.div,{...m,ref:w,style:{position:"absolute",...m.style},onPointerDown:g.composeEventHandlers(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),C.current=h.getBoundingClientRect(),N.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),j(R))}),onPointerMove:g.composeEventHandlers(e.onPointerMove,j),onPointerUp:g.composeEventHandlers(e.onPointerUp,R=>{const F=R.target;F.hasPointerCapture(R.pointerId)&&F.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=N.current,b.viewport&&(b.viewport.style.scrollBehavior=""),C.current=null})})})}),ht="ScrollAreaThumb",li=i.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=si(ht,e.__scopeScrollArea);return o.jsx(g.Presence,{present:r||a.hasThumb,children:o.jsx(pm,{ref:t,...n})})}),pm=i.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...a}=e,s=fe(ht,r),l=si(ht,r),{onThumbPositionChange:c}=l,d=g.useComposedRefs(t,p=>l.onThumbChange(p)),f=i.useRef(void 0),u=Pt(()=>{f.current&&(f.current(),f.current=void 0)},100);return i.useEffect(()=>{const p=s.viewport;if(p){const m=()=>{if(u(),!f.current){const b=gm(p,c);f.current=b,c()}};return c(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[s.viewport,u,c]),o.jsx(g.Primitive.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:g.composeEventHandlers(e.onPointerDownCapture,p=>{const b=p.target.getBoundingClientRect(),h=p.clientX-b.left,x=p.clientY-b.top;l.onThumbPointerDown({x:h,y:x})}),onPointerUp:g.composeEventHandlers(e.onPointerUp,l.onThumbPointerUp)})});li.displayName=ht;var so="ScrollAreaCorner",ci=i.forwardRef((e,t)=>{const r=fe(so,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?o.jsx(fm,{...e,ref:t}):null});ci.displayName=so;var fm=i.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,a=fe(so,r),[s,l]=i.useState(0),[c,d]=i.useState(0),f=!!(s&&c);return Fe(a.scrollbarX,()=>{const u=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(u),d(u)}),Fe(a.scrollbarY,()=>{const u=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(u),l(u)}),f?o.jsx(g.Primitive.div,{...n,ref:t,style:{width:s,height:c,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function vt(e){return e?parseInt(e,10):0}function di(e,t){const r=e/t;return isNaN(r)?0:r}function _t(e){const t=di(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function mm(e,t,r,n="ltr"){const a=_t(r),s=a/2,l=t||s,c=a-l,d=r.scrollbar.paddingStart+l,f=r.scrollbar.size-r.scrollbar.paddingEnd-c,u=r.content-r.viewport,p=n==="ltr"?[0,u]:[u*-1,0];return ui([d,f],p)(e)}function Ho(e,t,r="ltr"){const n=_t(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-a,l=t.content-t.viewport,c=s-n,d=r==="ltr"?[0,l]:[l*-1,0],f=S.clamp(e,d);return ui([0,l],[0,c])(f)}function ui(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function pi(e,t){return e>0&&e<t}var gm=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function a(){const s={left:e.scrollLeft,top:e.scrollTop},l=r.left!==s.left,c=r.top!==s.top;(l||c)&&t(),r=s,n=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(n)};function Pt(e,t){const r=g.useCallbackRef(e),n=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(n.current),[]),i.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function Fe(e,t){const r=g.useCallbackRef(t);g.useLayoutEffect2(()=>{let n=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}},[e,r])}var fi=ti,mi=oi,gi=ci,hi="Toggle",io=i.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:a,...s}=e,[l,c]=g.useControllableState({prop:r,onChange:a,defaultProp:n??!1,caller:hi});return o.jsx(g.Primitive.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:g.composeEventHandlers(e.onClick,()=>{e.disabled||c(!l)})})});io.displayName=hi;var hm=io,Ee="ToggleGroup",[vi]=g.createContextScope(Ee,[S.createRovingFocusGroupScope]),bi=S.createRovingFocusGroupScope(),lo=E.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const a=n;return o.jsx(vm,{...a,ref:t})}if(r==="multiple"){const a=n;return o.jsx(bm,{...a,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Ee}\``)});lo.displayName=Ee;var[xi,wi]=vi(Ee),vm=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...s}=e,[l,c]=g.useControllableState({prop:r,defaultProp:n??"",onChange:a,caller:Ee});return o.jsx(xi,{scope:e.__scopeToggleGroup,type:"single",value:E.useMemo(()=>l?[l]:[],[l]),onItemActivate:c,onItemDeactivate:E.useCallback(()=>c(""),[c]),children:o.jsx(Ci,{...s,ref:t})})}),bm=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...s}=e,[l,c]=g.useControllableState({prop:r,defaultProp:n??[],onChange:a,caller:Ee}),d=E.useCallback(u=>c((p=[])=>[...p,u]),[c]),f=E.useCallback(u=>c((p=[])=>p.filter(m=>m!==u)),[c]);return o.jsx(xi,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:d,onItemDeactivate:f,children:o.jsx(Ci,{...s,ref:t})})});lo.displayName=Ee;var[xm,wm]=vi(Ee),Ci=E.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:s,dir:l,loop:c=!0,...d}=e,f=bi(r),u=S.useDirection(l),p={role:"group",dir:u,...d};return o.jsx(xm,{scope:r,rovingFocus:a,disabled:n,children:a?o.jsx(S.Root$1,{asChild:!0,...f,orientation:s,dir:u,loop:c,children:o.jsx(g.Primitive.div,{...p,ref:t})}):o.jsx(g.Primitive.div,{...p,ref:t})})}),bt="ToggleGroupItem",yi=E.forwardRef((e,t)=>{const r=wi(bt,e.__scopeToggleGroup),n=wm(bt,e.__scopeToggleGroup),a=bi(e.__scopeToggleGroup),s=r.value.includes(e.value),l=n.disabled||e.disabled,c={...e,pressed:s,disabled:l},d=E.useRef(null);return n.rovingFocus?o.jsx(S.Item,{asChild:!0,...a,focusable:!l,active:s,ref:d,children:o.jsx(Go,{...c,ref:t})}):o.jsx(Go,{...c,ref:t})});yi.displayName=bt;var Go=E.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...a}=e,s=wi(bt,r),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},c=s.type==="single"?l:void 0;return o.jsx(io,{...c,...a,ref:t,onPressedChange:d=>{d?s.onItemActivate(n):s.onItemDeactivate(n)}})}),Cm=lo,ym=yi;function Sm({className:e,children:t,...r}){return o.jsxs(fi,{"data-slot":"scroll-area",className:v.cn("relative",e),...r,children:[o.jsx(mi,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] ring-offset-background outline-none transition-[color,box-shadow] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:t}),o.jsx(Ke,{}),o.jsx(gi,{})]})}function Ke({className:e,orientation:t="vertical",...r}){return o.jsx(ni,{"data-slot":"scroll-area-scrollbar","data-orientation":t,orientation:t,className:v.cn("data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5 data-[orientation=vertical]:border-l data-[orientation=vertical]:border-l-transparent flex touch-none p-0.5 transition-colors select-none",e),...r,children:o.jsx(li,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border/80 hover:bg-border"})})}const Oe=2,Me=16;function Nm(e,t,r){if(!e||!t)return{};const{scrollTop:n,scrollLeft:a,scrollHeight:s,scrollWidth:l,clientHeight:c,clientWidth:d}=e,f=r==="vertical"||r==="both",u=r==="horizontal"||r==="both",p=s>c+Oe,m=l>d+Oe;if(!p&&!m)return{maskImage:"none",WebkitMaskImage:"none"};const b=[];if(f&&p){const x=n<=Oe,w=n+c>=s-Oe;x&&w?b.push("none"):x?b.push(`linear-gradient(to bottom, white, white calc(100% - ${Me}px), transparent)`):w?b.push(`linear-gradient(to bottom, transparent, white ${Me}px, white)`):b.push(`linear-gradient(to bottom, transparent, white ${Me}px, white calc(100% - ${Me}px), transparent)`)}if(u&&m){const x=a<=Oe,w=a+d>=l-Oe;x&&w?b.length&&b.push("none"):x?b.push(`linear-gradient(to right, white, white calc(100% - ${Me}px), transparent)`):w?b.push(`linear-gradient(to right, transparent, white ${Me}px, white)`):b.push(`linear-gradient(to right, transparent, white ${Me}px, white calc(100% - ${Me}px), transparent)`)}const h=b.filter(x=>x!=="none").join(", ")||"none";return h==="none"?{maskImage:"none",WebkitMaskImage:"none"}:{maskImage:h,WebkitMaskImage:h}}const At=i.forwardRef(({className:e,children:t,fadeMask:r=!0,hideScrollbar:n=!1,orientation:a="vertical",onScroll:s,viewportRef:l,viewportStyle:c,...d},f)=>{const u=E.useRef(null),p=E.useCallback(w=>{u.current=w,l&&(typeof l=="function"?l(w):l.current=w)},[l]),[m,b]=E.useState({}),h=E.useCallback(()=>{b(w=>{const C=Nm(u.current,r,a);return w.maskImage===C.maskImage&&w.WebkitMaskImage===C.WebkitMaskImage?w:C})},[r,a]);E.useEffect(()=>{const w=u.current;if(!w)return;h(),w.addEventListener("scroll",h,{passive:!0});const C=new ResizeObserver(h);return C.observe(w),()=>{C.disconnect(),w.removeEventListener("scroll",h)}},[h]),E.useEffect(()=>{if(a!=="both")return;const w=u.current;if(!w)return;const C=20,N=y=>{if(y.ctrlKey)return;const k=y.wheelDeltaX,M=y.wheelDeltaY;let I=Number.isFinite(y.deltaX)?y.deltaX:k!=null?-k:0,_=Number.isFinite(y.deltaY)?y.deltaY:M!=null?-M:0;y.deltaMode===1?(I*=C,_*=C):y.deltaMode===2&&(I*=w.clientWidth,_*=w.clientHeight);const{scrollLeft:j,scrollTop:R,scrollWidth:F,scrollHeight:A,clientWidth:T,clientHeight:D}=w,$=F>T&&(I>0?j<F-T:j>0),z=A>D&&(_>0?R<A-D:R>0);($||z)&&($&&(w.scrollLeft+=I),z&&(w.scrollTop+=_),y.preventDefault())};return w.addEventListener("wheel",N,{passive:!1}),()=>w.removeEventListener("wheel",N)},[a]);const x=v.cn("size-full rounded-[inherit] ring-offset-background outline-none transition-[color,box-shadow,mask-image] duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a==="vertical"&&"overflow-x-hidden",a==="horizontal"&&"overflow-y-hidden");return o.jsxs(fi,{ref:f,"data-slot":"scroll-area",className:v.cn("relative",e),...d,children:[o.jsx(mi,{ref:p,"data-slot":"scroll-area-viewport",className:x,style:{...c??{},...r?m:{},...a==="both"?{touchAction:"pan-x pan-y"}:{}},onScroll:s,children:t}),!n&&(a==="vertical"||a==="both")&&o.jsx(Ke,{orientation:"vertical"}),!n&&(a==="horizontal"||a==="both")&&o.jsx(Ke,{orientation:"horizontal"}),o.jsx(gi,{})]})});At.displayName="EnhancedScrollArea";const Mm=oe.cva("h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-2.5! inline-flex min-w-0 max-w-full items-center justify-center w-fit whitespace-nowrap [&>svg]:pointer-events-none ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-colors overflow-hidden group/badge",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive text-destructive dark:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function co({className:e,variant:t="default",asChild:r=!1,children:n,...a}){const s=r?ir.Root:"span";return o.jsx(s,{"data-slot":"badge","data-variant":t,className:v.cn(Mm({variant:t}),e),...a,children:r?n:re.wrapInlineLabelTextNodes(n)})}const Si=oe.cva("h-5 gap-1 rounded-full border px-2 py-0.5 text-[0.625rem] font-medium inline-flex min-w-0 max-w-full items-center justify-center w-fit whitespace-nowrap transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-in-out [&>svg]:size-2.5 [&>svg]:pointer-events-none has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive overflow-hidden group/badge",{variants:{variant:{default:["bg-primary text-primary-foreground border border-primary","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-primary/90 hover:border-primary/90","focus:bg-primary/80 focus:border-primary/80"],destructive:["bg-destructive text-destructive-foreground border border-destructive","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-destructive/90 hover:border-destructive/90","focus:bg-destructive/80 focus:border-destructive/80","focus-visible:ring-destructive"],secondary:["bg-secondary text-secondary-foreground border border-border","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-secondary/90 hover:border-border","focus:bg-secondary/80 focus:border-border"],success:["bg-success text-success-foreground border border-success","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-success/90 hover:border-success/90","focus:bg-success/80 focus:border-success/80"],warning:["bg-warning text-warning-foreground border border-warning","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-warning/90 hover:border-warning/90","focus:bg-warning/80 focus:border-warning/80"],info:["bg-info text-info-foreground border border-info","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-info/90 hover:border-info/90","focus:bg-info/80 focus:border-info/80"],outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}}),xt=i.forwardRef(({className:e,variant:t,asChild:r=!1,children:n,...a},s)=>{if(!(t&&["default","destructive","secondary","success","warning","info"].includes(t))&&t){const f=t==="outline"||t==="ghost"||t==="link"?"outline":t==="destructive"?"destructive":t==="secondary"?"secondary":"default";return o.jsx(co,{variant:f,className:e,...a,children:n})}const d=r?be.Slot:"span";return o.jsx(d,{"data-slot":"badge","data-variant":t,className:v.cn(Si({variant:t,className:e})),ref:s,...a,children:r?n:re.wrapInlineLabelTextNodes(n)})});co.displayName="Badge";xt.displayName="EnhancedBadge";const Bo=`
13
13
  .checkbox-animated-label {
14
14
  box-sizing: border-box;
15
15
  padding: 0;
@@ -167,7 +167,7 @@ Defaulting to \`null\`.`}var Uf=Ls,Yf=zs,oo="Radio",[Xf,Hs]=g.createContextScope
167
167
  .checkbox-round-input[data-state="checked"]::after {
168
168
  transform: rotate(45deg) scale(1);
169
169
  }
170
- `,km=oe.cva("",{variants:{variant:{square:"",round:""}},defaultVariants:{variant:"square"}}),Ni=i.forwardRef(({className:e,children:t,id:r,gap:n=3,...a},s)=>{const l=E.useId(),c=r||l,d=typeof n=="number"?`gap-${n}`:n,p=o.jsx(Mt,{ref:s,id:c,className:h.cn("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...a,children:o.jsx(pr,{className:h.cn("grid place-content-center text-current"),children:o.jsx(U.HugeiconsIcon,{icon:Y.Tick02Icon,size:16,className:"h-4 w-4"})})});return t?o.jsxs("label",{htmlFor:c,className:h.cn("flex items-center cursor-pointer text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",d),children:[p,t]}):p}),Mi=i.forwardRef(({className:e,variant:t="square",children:r,disabled:n,gap:a=3,...s},l)=>{const c=t==="round"?"checkbox-round-input":"checkbox-animated-input",d=o.jsx(Mt,{ref:l,"data-slot":"checkbox",className:h.cn(c,e),disabled:n,...s,children:o.jsx(pr,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current"})});return r?o.jsxs(o.Fragment,{children:[o.jsx("style",{children:Bo}),o.jsxs("label",{className:h.cn("checkbox-animated-label",typeof a=="number"?`flex items-center gap-${a}`:`flex items-center ${a}`,"cursor-pointer","relative",n&&"cursor-not-allowed opacity-50"),"data-disabled":n?"true":void 0,children:[d,o.jsx("span",{className:"checkbox-animated-text text-foreground",children:r})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("style",{children:Bo}),d]})});Ni.displayName=Mt.displayName;Mi.displayName="EnhancedCheckbox";const uo=Np,po=Ba,ki=Mp,Ri=Va,Ei=Rp,fo=kp,mo=i.forwardRef(({className:e,inset:t,children:r,...n},a)=>o.jsxs(Vr,{ref:a,className:h.cn("flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm transition-colors data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",g.floatingListItemInteractive,t&&"pl-8",e),...n,children:[r,o.jsx(U.HugeiconsIcon,{icon:Y.ArrowRight01Icon,size:16,className:"ml-auto"})]}));mo.displayName=Vr.displayName;const go=i.forwardRef(({className:e,sideOffset:t=6,alignOffset:r=-4,...n},a)=>o.jsx(Wr,{ref:a,sideOffset:t,alignOffset:r,className:h.cn(g.floatingSurface,"z-[var(--z-popover)] min-w-[8rem] overflow-hidden p-1 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n}));go.displayName=Wr.displayName;const Dt=i.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(Va,{children:o.jsx($r,{ref:n,sideOffset:t,className:h.cn(g.floatingSurface,"z-[var(--z-popover)] max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden p-1 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})}));Dt.displayName=$r.displayName;const ho=i.forwardRef(({className:e,inset:t,...r},n)=>o.jsx(Fr,{ref:n,className:h.cn("relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",g.floatingListItemInteractive,t&&"pl-8",e),...r}));ho.displayName=Fr.displayName;const vo=i.forwardRef(({className:e,children:t,checked:r,...n},a)=>o.jsxs(Hr,{ref:a,className:h.cn("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",g.floatingListItemInteractive,e),checked:r,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(Wa,{children:o.jsx(U.HugeiconsIcon,{icon:Y.Tick02Icon,size:16,className:"h-4 w-4"})})}),t]}));vo.displayName=Hr.displayName;const $e=i.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(Gr,{ref:n,className:h.cn("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",g.floatingListItemInteractive,e),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(Wa,{children:o.jsx(U.HugeiconsIcon,{icon:Y.CircleIcon,size:8,className:"h-2 w-2 fill-current"})})}),t]}));$e.displayName=Gr.displayName;const Ot=i.forwardRef(({className:e,inset:t,...r},n)=>o.jsx(zr,{ref:n,className:h.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Ot.displayName=zr.displayName;const Lt=i.forwardRef(({className:e,...t},r)=>o.jsx(Br,{ref:r,className:h.cn("bg-border/50 -mx-1 my-1 h-px",e),...t}));Lt.displayName=Br.displayName;const bo=({className:e,...t})=>o.jsx("span",{className:h.cn("ml-auto text-xs tracking-widest opacity-60",e),...t});bo.displayName="DropdownMenuShortcut";const Rm=uo,ji=i.forwardRef(({className:e,...t},r)=>(i.useEffect(()=>{const n="enhanced-dropdown-menu-styles";if(document.getElementById(n))return;const a=document.createElement("style");a.id=n,a.textContent=`
170
+ `,km=oe.cva("",{variants:{variant:{square:"",round:""}},defaultVariants:{variant:"square"}}),Ni=i.forwardRef(({className:e,children:t,id:r,gap:n=3,...a},s)=>{const l=E.useId(),c=r||l,d=typeof n=="number"?`gap-${n}`:n,f=o.jsx(Mt,{ref:s,id:c,className:v.cn("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...a,children:o.jsx(pr,{className:v.cn("grid place-content-center text-current"),children:o.jsx(U.HugeiconsIcon,{icon:Y.Tick02Icon,size:16,className:"h-4 w-4"})})});return t?o.jsxs("label",{htmlFor:c,className:v.cn("flex items-center cursor-pointer text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",d),children:[f,t]}):f}),Mi=i.forwardRef(({className:e,variant:t="square",children:r,disabled:n,gap:a=3,...s},l)=>{const c=t==="round"?"checkbox-round-input":"checkbox-animated-input",d=o.jsx(Mt,{ref:l,"data-slot":"checkbox",className:v.cn(c,e),disabled:n,...s,children:o.jsx(pr,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current"})});return r?o.jsxs(o.Fragment,{children:[o.jsx("style",{children:Bo}),o.jsxs("label",{className:v.cn("checkbox-animated-label",typeof a=="number"?`flex items-center gap-${a}`:`flex items-center ${a}`,"cursor-pointer","relative",n&&"cursor-not-allowed opacity-50"),"data-disabled":n?"true":void 0,children:[d,o.jsx("span",{className:"checkbox-animated-text text-foreground",children:r})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("style",{children:Bo}),d]})});Ni.displayName=Mt.displayName;Mi.displayName="EnhancedCheckbox";const uo=Np,po=Ba,ki=Mp,Ri=Va,Ei=Rp,fo=kp,mo=i.forwardRef(({className:e,inset:t,children:r,...n},a)=>o.jsxs(Vr,{ref:a,className:v.cn("flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm transition-colors data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",g.floatingListItemInteractive,t&&"pl-8",e),...n,children:[r,o.jsx(U.HugeiconsIcon,{icon:Y.ArrowRight01Icon,size:16,className:"ml-auto"})]}));mo.displayName=Vr.displayName;const go=i.forwardRef(({className:e,sideOffset:t=6,alignOffset:r=-4,...n},a)=>o.jsx(Wr,{ref:a,sideOffset:t,alignOffset:r,className:v.cn(g.floatingSurface,"z-[var(--z-popover)] min-w-[8rem] overflow-hidden p-1 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n}));go.displayName=Wr.displayName;const Dt=i.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(Va,{children:o.jsx($r,{ref:n,sideOffset:t,className:v.cn(g.floatingSurface,"z-[var(--z-popover)] max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden p-1 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})}));Dt.displayName=$r.displayName;const ho=i.forwardRef(({className:e,inset:t,...r},n)=>o.jsx(Fr,{ref:n,className:v.cn("relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",g.floatingListItemInteractive,t&&"pl-8",e),...r}));ho.displayName=Fr.displayName;const vo=i.forwardRef(({className:e,children:t,checked:r,...n},a)=>o.jsxs(Hr,{ref:a,className:v.cn("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",g.floatingListItemInteractive,e),checked:r,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(Wa,{children:o.jsx(U.HugeiconsIcon,{icon:Y.Tick02Icon,size:16,className:"h-4 w-4"})})}),t]}));vo.displayName=Hr.displayName;const $e=i.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(Gr,{ref:n,className:v.cn("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",g.floatingListItemInteractive,e),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(Wa,{children:o.jsx(U.HugeiconsIcon,{icon:Y.CircleIcon,size:8,className:"h-2 w-2 fill-current"})})}),t]}));$e.displayName=Gr.displayName;const Ot=i.forwardRef(({className:e,inset:t,...r},n)=>o.jsx(zr,{ref:n,className:v.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Ot.displayName=zr.displayName;const Lt=i.forwardRef(({className:e,...t},r)=>o.jsx(Br,{ref:r,className:v.cn("bg-border/50 -mx-1 my-1 h-px",e),...t}));Lt.displayName=Br.displayName;const bo=({className:e,...t})=>o.jsx("span",{className:v.cn("ml-auto text-xs tracking-widest opacity-60",e),...t});bo.displayName="DropdownMenuShortcut";const Rm=uo,ji=i.forwardRef(({className:e,...t},r)=>(i.useEffect(()=>{const n="enhanced-dropdown-menu-styles";if(document.getElementById(n))return;const a=document.createElement("style");a.id=n,a.textContent=`
171
171
  /* Enhanced DropdownMenu Trigger - Layered shadow with semi-transparent border */
172
172
  .enhanced-dropdown-trigger {
173
173
  border: 1px solid color-mix(in oklch, var(--border) 50%, transparent) !important;
@@ -263,7 +263,7 @@ Defaulting to \`null\`.`}var Uf=Ls,Yf=zs,oo="Radio",[Xf,Hs]=g.createContextScope
263
263
  /* Focus ring */
264
264
  0 0 0 2px var(--ring) !important;
265
265
  }
266
- `,document.head.appendChild(a)},[]),o.jsx(po,{ref:r,className:h.cn("enhanced-dropdown-trigger",e),...t})));ji.displayName=Ba.displayName;const Ii=i.forwardRef(({className:e,...t},r)=>o.jsx(Dt,{ref:r,className:e,...t}));Ii.displayName=$r.displayName;const Ti=i.forwardRef(({className:e,...t},r)=>o.jsx(ho,{ref:r,className:e,...t}));Ti.displayName=Fr.displayName;const _i=i.forwardRef(({className:e,...t},r)=>o.jsx(vo,{ref:r,className:e,...t}));_i.displayName=Hr.displayName;const Pi=i.forwardRef(({className:e,...t},r)=>o.jsx($e,{ref:r,className:e,...t}));Pi.displayName=Gr.displayName;const Ai=i.forwardRef(({className:e,...t},r)=>o.jsx(Ot,{ref:r,className:e,...t}));Ai.displayName=zr.displayName;const Di=i.forwardRef(({className:e,...t},r)=>o.jsx(Lt,{ref:r,className:e,...t}));Di.displayName=Br.displayName;const Oi=({className:e,...t})=>o.jsx(bo,{className:e,...t});Oi.displayName="DropdownMenuShortcut";const Em=ki,jm=Ri,Im=Ei,Li=i.forwardRef(({className:e,...t},r)=>o.jsx(go,{ref:r,className:e,...t}));Li.displayName=Wr.displayName;const $i=i.forwardRef(({className:e,...t},r)=>o.jsx(mo,{ref:r,className:e,...t}));$i.displayName=Vr.displayName;const Tm=fo,Vo="nqui-combobox-styles-v1";function zi(){i.useEffect(()=>{if(document.getElementById(Vo))return;const e=document.createElement("style");e.id=Vo,e.textContent=`
266
+ `,document.head.appendChild(a)},[]),o.jsx(po,{ref:r,className:v.cn("enhanced-dropdown-trigger",e),...t})));ji.displayName=Ba.displayName;const Ii=i.forwardRef(({className:e,...t},r)=>o.jsx(Dt,{ref:r,className:e,...t}));Ii.displayName=$r.displayName;const Ti=i.forwardRef(({className:e,...t},r)=>o.jsx(ho,{ref:r,className:e,...t}));Ti.displayName=Fr.displayName;const _i=i.forwardRef(({className:e,...t},r)=>o.jsx(vo,{ref:r,className:e,...t}));_i.displayName=Hr.displayName;const Pi=i.forwardRef(({className:e,...t},r)=>o.jsx($e,{ref:r,className:e,...t}));Pi.displayName=Gr.displayName;const Ai=i.forwardRef(({className:e,...t},r)=>o.jsx(Ot,{ref:r,className:e,...t}));Ai.displayName=zr.displayName;const Di=i.forwardRef(({className:e,...t},r)=>o.jsx(Lt,{ref:r,className:e,...t}));Di.displayName=Br.displayName;const Oi=({className:e,...t})=>o.jsx(bo,{className:e,...t});Oi.displayName="DropdownMenuShortcut";const Em=ki,jm=Ri,Im=Ei,Li=i.forwardRef(({className:e,...t},r)=>o.jsx(go,{ref:r,className:e,...t}));Li.displayName=Wr.displayName;const $i=i.forwardRef(({className:e,...t},r)=>o.jsx(mo,{ref:r,className:e,...t}));$i.displayName=Vr.displayName;const Tm=fo,Vo="nqui-combobox-styles-v1";function zi(){i.useEffect(()=>{if(document.getElementById(Vo))return;const e=document.createElement("style");e.id=Vo,e.textContent=`
267
267
  [data-slot="input-group"]:has([data-slot="input-group-control"].enhanced-combobox-input) {
268
268
  border: 1px solid color-mix(in oklch, var(--input) 50%, transparent) !important;
269
269
  box-shadow:
@@ -342,7 +342,7 @@ Defaulting to \`null\`.`}var Uf=Ls,Yf=zs,oo="Radio",[Xf,Hs]=g.createContextScope
342
342
  --tw-ring-offset-width: 0 !important;
343
343
  box-shadow: none !important;
344
344
  }
345
- `,document.head.appendChild(e)},[])}function or(e){if(e==null||typeof e=="boolean")return"";if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(or).filter(Boolean).join(" ");if(i.isValidElement(e)){const t=e.props;if(t.children!=null)return or(t.children)}return""}const Fi=i.createContext(null);function he(){const e=i.useContext(Fi);if(!e)throw new Error("Combobox components must be used within Combobox");return e}function Hi({value:e,defaultValue:t,onValueChange:r,items:n,multiple:a=!1,disabled:s=!1,searchPlaceholder:l="Search...",open:c,defaultOpen:d,onOpenChange:p,modal:u=!1,debug:f=!1,children:m,...b}){const[v,x]=i.useState(void 0),[w,C]=i.useState(t??(a?[]:void 0)),N=e!==void 0,y=N?e:w,k=i.useCallback(H=>{N||C(H),r?.(H)},[N,r]),[M,I]=i.useState(d??!1),_=c!==void 0,j=_?c:M,R=i.useCallback(H=>{_||I(H),p?.(H)},[_,p]),[F,A]=i.useState(""),[T,D]=i.useState({}),$=i.useCallback((H,Q)=>{D(Z=>Z[H]===Q?Z:{...Z,[H]:Q})},[]),z=i.useCallback(H=>T[H],[T]),V=i.useMemo(()=>a||typeof y!="string"||!y?"":T[y]??y,[a,y,T]),P=i.useRef(!1),W=i.useCallback((H,Q)=>{if(!P.current){P.current=!0;try{if($(H,Q),a){const Z=Array.isArray(y)?[...y]:[],te=Z.indexOf(H);te>=0?Z.splice(te,1):Z.push(H),k(Z);return}k(H),R(!1)}finally{queueMicrotask(()=>{P.current=!1})}}},[a,y,k,R,$]),L=i.useCallback(H=>a?Array.isArray(y)&&y.includes(H):y===H,[a,y]),K=i.useCallback(H=>{if(n==null)return!0;const Q=F.trim().toLowerCase();return Q?String(H).toLowerCase().includes(Q):!0},[n,F]),q=n==null,X={open:j,setOpen:R,value:y,setValue:k,search:F,setSearch:A,items:n,multiple:a,disabled:!!s,registerLabel:$,getLabel:z,selectedLabel:V,shouldFilter:q,searchPlaceholder:l,onItemSelect:W,isSelected:L,filterItems:K,listboxIdAria:v,setListboxIdAria:x};return i.useEffect(()=>{},[f,j,y,F,v]),o.jsx(Fi.Provider,{value:X,children:o.jsx(S.Root2$1,{"data-slot":"combobox",open:j,onOpenChange:H=>{s||(R(H),H||A(""))},modal:u,...b,children:m})})}const xo=i.forwardRef(function({className:t,onClick:r,...n},a){const{setOpen:s,disabled:l}=he();return o.jsx(S.Anchor2,{ref:a,"data-slot":"combobox-anchor",className:h.cn("w-full min-w-0",!l&&"cursor-pointer",t),onClick:c=>{r?.(c),!l&&s(!0)},...n})});xo.displayName="ComboboxAnchor";function Gi({className:e,placeholder:t,onClick:r,...n}){const{value:a,getLabel:s,setOpen:l,disabled:c}=he(),d=Array.isArray(a)?a[0]:a,p=d!=null?s(d)??d:"",u=typeof p=="string"?p:String(p),f=!!(t&&u.length===0);return o.jsx("span",{"data-slot":"combobox-value","data-placeholder":f?"true":void 0,className:h.cn(f?"text-muted-foreground":"text-foreground",!c&&"cursor-pointer",e),onClick:m=>{r?.(m),!c&&l(!0)},...n,children:f?t:u})}function wo({className:e,children:t,onClick:r,showSelectedLabel:n=!1,fallbackLabel:a="Pick",variant:s="default","aria-label":l,...c}){const{setOpen:d,disabled:p,multiple:u,selectedLabel:f,open:m,listboxIdAria:b}=he(),v=n&&!u?f||a:null,x=s==="icon-addon",w=v!=null||t!=null&&t!==!1&&(typeof t=="string"?t.trim().length>0:i.Children.count(t)>0),C=l??(!x&&!w&&!n&&!u?f?`${f}, open to change`:"Open to choose":void 0);return o.jsxs("button",{type:"button","data-slot":"combobox-trigger","data-variant":s,className:h.cn("inline-flex items-center justify-center gap-1.5 text-center [&_svg:not([class*='size-'])]:size-3.5 [&_svg]:shrink-0",e),disabled:p,"aria-hidden":x?!0:void 0,tabIndex:x?-1:void 0,"aria-expanded":x?void 0:m,"aria-controls":x?void 0:m?b:void 0,"aria-haspopup":x?void 0:"listbox","aria-label":C,onClick:N=>{r?.(N),N.preventDefault(),d(!0)},...c,children:[v!=null?re.wrapInlineLabelTextNodes(o.jsx("span",{className:"min-w-0 max-w-[12rem] truncate",children:v})):re.wrapInlineLabelTextNodes(t),o.jsx(U.HugeiconsIcon,{icon:Y.ArrowDown01Icon,strokeWidth:2,className:"text-muted-foreground size-3.5 pointer-events-none"})]})}function Co({className:e,disabled:t,...r}){const{setValue:n,setSearch:a,multiple:s,disabled:l}=he(),c=l||t;return o.jsx(O.InputGroupButton,{variant:"ghost",size:"icon-xs","data-slot":"combobox-clear",disabled:c,className:h.cn(e),onClick:d=>{d.preventDefault(),d.stopPropagation(),a(""),n(s?[]:"")},...r,children:o.jsx(U.HugeiconsIcon,{icon:Y.Cancel01Icon,strokeWidth:2,className:"pointer-events-none"})})}function Bi({className:e,children:t,disabled:r=!1,showTrigger:n=!0,showClear:a=!1,placeholder:s,onChange:l,onFocus:c,onKeyDown:d,...p}){const u=he(),{setOpen:f,selectedLabel:m,disabled:b,open:v,search:x,setSearch:w,multiple:C,listboxIdAria:N}=u,y=b||r,k=C?v?x:"":v?x:m;return zi(),o.jsx(S.Anchor2,{asChild:!0,children:o.jsx("div",{className:h.cn("w-full min-w-0",e),children:o.jsxs(O.InputGroup,{className:"w-auto",children:[o.jsx(O.InputGroupInput,{"data-slot":"input-group-control",role:"combobox","aria-expanded":v,"aria-autocomplete":"list","aria-controls":v?N:void 0,disabled:y,value:k,placeholder:s,className:"enhanced-combobox-input",onClick:()=>f(!0),onChange:M=>{w(M.target.value),f(!0),l?.(M)},onFocus:M=>{f(!0),c?.(M)},onKeyDown:M=>{M.key==="ArrowDown"&&v&&(M.preventDefault(),document.querySelector("[data-slot=combobox-content] [data-slot=command-input]")?.focus()),d?.(M)},...p}),o.jsxs(O.InputGroupAddon,{align:"inline-end",children:[n&&o.jsx(O.InputGroupButton,{size:"icon-xs",variant:"ghost",asChild:!0,"data-slot":"input-group-button",className:"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",disabled:y,children:o.jsx(wo,{variant:"icon-addon"})}),a&&o.jsx(Co,{disabled:y})]}),t]})})})}function Vi({className:e,side:t="bottom",sideOffset:r=6,align:n="start",alignOffset:a=0,onOpenAutoFocus:s,showPanelSearch:l=!1,children:c,onPointerDownCapture:d,...p}){const{shouldFilter:u,search:f,setSearch:m,setOpen:b,disabled:v,searchPlaceholder:x}=he(),w=o.jsx(O.CommandInput,{value:f,onValueChange:C=>{m(C),b(!0)},placeholder:x,disabled:v,tabIndex:l?0:-1,className:"pointer-events-auto"});return o.jsx(S.Portal,{children:o.jsx(S.Content2,{"data-slot":"combobox-content",side:t,sideOffset:r,align:n,alignOffset:a,className:h.cn(g.floatingSurface,"!pointer-events-auto data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-[min(24rem,var(--radix-popover-content-available-height))] w-[var(--radix-popover-trigger-width)] max-w-[min(100vw,var(--radix-popover-content-available-width))] min-w-[var(--radix-popover-trigger-width)] origin-[var(--radix-popover-content-transform-origin)] p-0 z-[var(--z-popover)] outline-hidden overflow-hidden",e),onOpenAutoFocus:C=>{l||C.preventDefault(),s?.(C)},onPointerDownCapture:d,...p,children:o.jsxs(O.Command,{className:"group/cmdk relative flex !h-auto min-h-0 w-full max-w-full flex-col overflow-hidden rounded-none! border-0 bg-transparent p-1 shadow-none max-h-[min(24rem,var(--radix-popover-content-available-height,24rem))]",shouldFilter:u,disablePointerSelection:!1,loop:!0,children:[l?w:o.jsx("div",{className:"sr-only pointer-events-none",children:w}),c]})})})}function Wi({className:e,placeholder:t="Select…",maxShownItems:r=2,id:n,...a}){const{value:s,setOpen:l,open:c,disabled:d,getLabel:p,setValue:u,listboxIdAria:f}=he(),[m,b]=i.useState(!1),v=n??i.useId();zi();const x=Array.isArray(s)?s:[],w=m?x:x.slice(0,r),C=x.length-w.length,N=i.useCallback(y=>{u(x.filter(k=>k!==y))},[x,u]);return o.jsx(S.Anchor2,{asChild:!0,children:o.jsx("div",{className:h.cn("w-full min-w-0",e),...a,children:o.jsxs(O.InputGroup,{className:h.cn("h-auto min-h-8 w-auto items-start gap-0 py-0.5",d&&"pointer-events-none opacity-50"),"data-disabled":d?"":void 0,children:[o.jsx("div",{id:v,"data-slot":"input-group-control",role:"combobox",tabIndex:d?-1:0,"aria-expanded":c,"aria-controls":c?f:void 0,"aria-disabled":d,className:h.cn("enhanced-combobox-input text-foreground flex min-h-7 min-w-0 flex-1 cursor-pointer flex-wrap items-center gap-1 border-0 bg-transparent px-2.5 py-1 text-left text-sm shadow-none outline-none",d&&"cursor-not-allowed"),onClick:()=>!d&&l(!c),onKeyDown:y=>{d||(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),l(!c))},children:x.length===0?o.jsx("span",{className:"text-muted-foreground",children:t}):o.jsxs(o.Fragment,{children:[w.map(y=>o.jsxs(xt,{variant:"outline",className:"max-w-full !rounded-md py-0 pl-1.5 pr-0.5",children:[o.jsx("span",{className:"min-w-0 max-w-[10rem] truncate",children:p(y)??y}),o.jsx("span",{role:"presentation",className:"inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-sm opacity-70 hover:bg-accent hover:text-accent-foreground hover:opacity-100",onPointerDown:k=>{k.preventDefault(),k.stopPropagation()},onClick:k=>{k.stopPropagation(),N(y)},children:o.jsx(U.HugeiconsIcon,{icon:Y.Cancel01Icon,strokeWidth:2,className:"size-3 pointer-events-none"})})]},y)),(C>0||m)&&o.jsx(xt,{variant:"outline",className:"cursor-pointer !rounded-md",onPointerDown:y=>{y.preventDefault(),y.stopPropagation()},onClick:y=>{y.stopPropagation(),b(k=>!k)},children:m?"Show less":`+${C} more`})]})}),o.jsx(O.InputGroupAddon,{align:"inline-end",className:"self-start pt-1",children:o.jsx(U.HugeiconsIcon,{icon:Y.ArrowUpDownIcon,strokeWidth:2,className:"text-muted-foreground/80 size-4 shrink-0","aria-hidden":!0})})]})})})}function _m(e){if(typeof e=="function")return{staticNodes:[],renderFn:e};const t=[];let r;const n=a=>{if(!(a==null||a===!0||a===!1)){if(typeof a=="function"){r=a;return}if(Array.isArray(a)){a.forEach(n);return}if(i.isValidElement(a)&&a.type===i.Fragment){const s=a.props.children;if(s==null)return;Array.isArray(s)?s.forEach(n):n(s);return}t.push(a)}};return n(e),{staticNodes:t,renderFn:r}}function Ki({className:e,children:t,...r}){const{items:n,filterItems:a,search:s,open:l,setListboxIdAria:c}=he(),{staticNodes:d,renderFn:p}=_m(t),u=i.useMemo(()=>!p||!n?null:n.filter(a).map(b=>p(b)),[p,n,a,s]),f=i.useRef(null);return i.useLayoutEffect(()=>{if(!l){c(void 0);return}requestAnimationFrame(()=>{const b=f.current?.id;b&&c(b)})},[l,c,n,u,d]),o.jsxs(O.CommandList,{ref:f,"data-slot":"combobox-list",className:h.cn("pointer-events-auto relative z-[1] min-h-0 flex-1","max-h-[min(18rem,max(0px,calc(var(--radix-popover-content-available-height,24rem)-5.5rem)))]",e),...r,children:[d,u]})}function qi({className:e,children:t,value:r,keywords:n,onPointerDown:a,onMouseDown:s,onSelect:l,...c}){const d=he(),p=i.useMemo(()=>or(t),[t]);i.useEffect(()=>{d.registerLabel(r,p||r)},[d,r,p]);const u=p||r,f=i.useRef(!1);return o.jsx(O.CommandItem,{"data-slot":"combobox-item",value:u,keywords:[r,u,...n??[]],"data-checked":d.isSelected(r)?!0:void 0,onSelect:m=>{f.current||(d.onItemSelect(r,p||r),l?.(m))},onPointerDown:m=>{a?.(m)},onMouseDown:m=>{m.button===0&&(m.preventDefault(),f.current=!0,d.onItemSelect(r,p||r),window.setTimeout(()=>{f.current=!1},0),s?.(m))},className:h.cn("transition-colors hover:bg-accent hover:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground min-h-8 my-0.5 mx-1 gap-2 rounded-md px-2.5 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-3.5 relative flex w-auto cursor-pointer items-center outline-hidden select-none aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...c,children:t})}function Ui({className:e,...t}){return o.jsx(O.CommandGroup,{"data-slot":"combobox-group",className:h.cn(e),...t})}function Yi({className:e,...t}){return o.jsx("div",{"data-slot":"combobox-label",className:h.cn("cmdk-group-heading text-muted-foreground px-2 py-1.5 text-xs [&_svg]:hidden",e),...t})}function Xi({...e}){return o.jsx(O.CommandGroup,{"data-slot":"combobox-collection",...e})}function Zi({className:e,...t}){return o.jsx(O.CommandEmpty,{"data-slot":"combobox-empty",className:h.cn("text-muted-foreground py-6 text-center text-xs",e),...t})}function Qi({className:e,...t}){return o.jsx(O.CommandSeparator,{"data-slot":"combobox-separator",className:h.cn(e),...t})}function Ji({className:e,...t}){return o.jsx("div",{"data-slot":"combobox-chips",className:h.cn("bg-input/20 dark:bg-input/30 border-input focus-within:border-ring focus-within:ring-ring/30 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive dark:has-aria-invalid:border-destructive/50 flex min-h-7 flex-wrap items-center gap-1 rounded-md border bg-clip-padding px-2 py-0.5 text-xs transition-colors focus-within:ring-[2px] has-aria-invalid:ring-[2px] has-data-[slot=combobox-chip]:px-1",e),...t})}function el({className:e,children:t,showRemove:r=!0,value:n,...a}){const{setValue:s,value:l,getLabel:c,multiple:d}=he(),p=i.useCallback(()=>{!d||!Array.isArray(l)||s(l.filter(u=>u!==n))},[n,d,s,l]);return o.jsxs("div",{"data-slot":"combobox-chip",className:h.cn("bg-muted-foreground/10 text-foreground flex h-[calc(--spacing(4.75))] min-w-0 max-w-full w-fit items-center justify-center gap-1 overflow-hidden rounded-[calc(var(--radius-sm)-2px)] px-1.5 text-xs font-medium whitespace-nowrap has-data-[slot=combobox-chip-remove]:pr-0 has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50",e),...a,children:[re.wrapInlineLabelTextNodes(t??c(n)??n),r&&o.jsx(re.Button,{type:"button",variant:"ghost",size:"icon",className:"-ml-1 opacity-50 hover:opacity-100","data-slot":"combobox-chip-remove",onClick:u=>{u.stopPropagation(),p()},children:o.jsx(U.HugeiconsIcon,{icon:Y.Cancel01Icon,strokeWidth:2,className:"pointer-events-none"})})]})}function tl({className:e,...t}){const{disabled:r,setSearch:n,setOpen:a,search:s}=he();return o.jsx(O.CommandInput,{"data-slot":"combobox-chip-input",className:h.cn("min-w-16 flex-1 border-0 bg-transparent p-0 text-xs shadow-none outline-none",e),disabled:r,value:s,onValueChange:l=>{n(l),a(!0)},...t})}function rl(){return i.useRef(null)}const Wo=`
345
+ `,document.head.appendChild(e)},[])}function or(e){if(e==null||typeof e=="boolean")return"";if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(or).filter(Boolean).join(" ");if(i.isValidElement(e)){const t=e.props;if(t.children!=null)return or(t.children)}return""}const Fi=i.createContext(null);function he(){const e=i.useContext(Fi);if(!e)throw new Error("Combobox components must be used within Combobox");return e}function Hi({value:e,defaultValue:t,onValueChange:r,items:n,multiple:a=!1,disabled:s=!1,searchPlaceholder:l="Search...",open:c,defaultOpen:d,onOpenChange:f,modal:u=!1,debug:p=!1,children:m,...b}){const[h,x]=i.useState(void 0),[w,C]=i.useState(t??(a?[]:void 0)),N=e!==void 0,y=N?e:w,k=i.useCallback(H=>{N||C(H),r?.(H)},[N,r]),[M,I]=i.useState(d??!1),_=c!==void 0,j=_?c:M,R=i.useCallback(H=>{_||I(H),f?.(H)},[_,f]),[F,A]=i.useState(""),[T,D]=i.useState({}),$=i.useCallback((H,Q)=>{D(Z=>Z[H]===Q?Z:{...Z,[H]:Q})},[]),z=i.useCallback(H=>T[H],[T]),V=i.useMemo(()=>a||typeof y!="string"||!y?"":T[y]??y,[a,y,T]),P=i.useRef(!1),W=i.useCallback((H,Q)=>{if(!P.current){P.current=!0;try{if($(H,Q),a){const Z=Array.isArray(y)?[...y]:[],te=Z.indexOf(H);te>=0?Z.splice(te,1):Z.push(H),k(Z);return}k(H),R(!1)}finally{queueMicrotask(()=>{P.current=!1})}}},[a,y,k,R,$]),L=i.useCallback(H=>a?Array.isArray(y)&&y.includes(H):y===H,[a,y]),K=i.useCallback(H=>{if(n==null)return!0;const Q=F.trim().toLowerCase();return Q?String(H).toLowerCase().includes(Q):!0},[n,F]),q=n==null,X={open:j,setOpen:R,value:y,setValue:k,search:F,setSearch:A,items:n,multiple:a,disabled:!!s,registerLabel:$,getLabel:z,selectedLabel:V,shouldFilter:q,searchPlaceholder:l,onItemSelect:W,isSelected:L,filterItems:K,listboxIdAria:h,setListboxIdAria:x};return i.useEffect(()=>{},[p,j,y,F,h]),o.jsx(Fi.Provider,{value:X,children:o.jsx(S.Root2$1,{"data-slot":"combobox",open:j,onOpenChange:H=>{s||(R(H),H||A(""))},modal:u,...b,children:m})})}const xo=i.forwardRef(function({className:t,onClick:r,...n},a){const{setOpen:s,disabled:l}=he();return o.jsx(S.Anchor2,{ref:a,"data-slot":"combobox-anchor",className:v.cn("w-full min-w-0",!l&&"cursor-pointer",t),onClick:c=>{r?.(c),!l&&s(!0)},...n})});xo.displayName="ComboboxAnchor";function Gi({className:e,placeholder:t,onClick:r,...n}){const{value:a,getLabel:s,setOpen:l,disabled:c}=he(),d=Array.isArray(a)?a[0]:a,f=d!=null?s(d)??d:"",u=typeof f=="string"?f:String(f),p=!!(t&&u.length===0);return o.jsx("span",{"data-slot":"combobox-value","data-placeholder":p?"true":void 0,className:v.cn(p?"text-muted-foreground":"text-foreground",!c&&"cursor-pointer",e),onClick:m=>{r?.(m),!c&&l(!0)},...n,children:p?t:u})}function wo({className:e,children:t,onClick:r,showSelectedLabel:n=!1,fallbackLabel:a="Pick",variant:s="default","aria-label":l,...c}){const{setOpen:d,disabled:f,multiple:u,selectedLabel:p,open:m,listboxIdAria:b}=he(),h=n&&!u?p||a:null,x=s==="icon-addon",w=h!=null||t!=null&&t!==!1&&(typeof t=="string"?t.trim().length>0:i.Children.count(t)>0),C=l??(!x&&!w&&!n&&!u?p?`${p}, open to change`:"Open to choose":void 0);return o.jsxs("button",{type:"button","data-slot":"combobox-trigger","data-variant":s,className:v.cn("inline-flex items-center justify-center gap-1.5 text-center [&_svg:not([class*='size-'])]:size-3.5 [&_svg]:shrink-0",e),disabled:f,"aria-hidden":x?!0:void 0,tabIndex:x?-1:void 0,"aria-expanded":x?void 0:m,"aria-controls":x?void 0:m?b:void 0,"aria-haspopup":x?void 0:"listbox","aria-label":C,onClick:N=>{r?.(N),N.preventDefault(),d(!0)},...c,children:[h!=null?re.wrapInlineLabelTextNodes(o.jsx("span",{className:"min-w-0 max-w-[12rem] truncate",children:h})):re.wrapInlineLabelTextNodes(t),o.jsx(U.HugeiconsIcon,{icon:Y.ArrowDown01Icon,strokeWidth:2,className:"text-muted-foreground size-3.5 pointer-events-none"})]})}function Co({className:e,disabled:t,...r}){const{setValue:n,setSearch:a,multiple:s,disabled:l}=he(),c=l||t;return o.jsx(O.InputGroupButton,{variant:"ghost",size:"icon-xs","data-slot":"combobox-clear",disabled:c,className:v.cn(e),onClick:d=>{d.preventDefault(),d.stopPropagation(),a(""),n(s?[]:"")},...r,children:o.jsx(U.HugeiconsIcon,{icon:Y.Cancel01Icon,strokeWidth:2,className:"pointer-events-none"})})}function Bi({className:e,children:t,disabled:r=!1,showTrigger:n=!0,showClear:a=!1,placeholder:s,onChange:l,onFocus:c,onKeyDown:d,...f}){const u=he(),{setOpen:p,selectedLabel:m,disabled:b,open:h,search:x,setSearch:w,multiple:C,listboxIdAria:N}=u,y=b||r,k=C?h?x:"":h?x:m;return zi(),o.jsx(S.Anchor2,{asChild:!0,children:o.jsx("div",{className:v.cn("w-full min-w-0",e),children:o.jsxs(O.InputGroup,{className:"w-auto",children:[o.jsx(O.InputGroupInput,{"data-slot":"input-group-control",role:"combobox","aria-expanded":h,"aria-autocomplete":"list","aria-controls":h?N:void 0,disabled:y,value:k,placeholder:s,className:"enhanced-combobox-input",onClick:()=>p(!0),onChange:M=>{w(M.target.value),p(!0),l?.(M)},onFocus:M=>{p(!0),c?.(M)},onKeyDown:M=>{M.key==="ArrowDown"&&h&&(M.preventDefault(),document.querySelector("[data-slot=combobox-content] [data-slot=command-input]")?.focus()),d?.(M)},...f}),o.jsxs(O.InputGroupAddon,{align:"inline-end",children:[n&&o.jsx(O.InputGroupButton,{size:"icon-xs",variant:"ghost",asChild:!0,"data-slot":"input-group-button",className:"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",disabled:y,children:o.jsx(wo,{variant:"icon-addon"})}),a&&o.jsx(Co,{disabled:y})]}),t]})})})}function Vi({className:e,side:t="bottom",sideOffset:r=6,align:n="start",alignOffset:a=0,onOpenAutoFocus:s,showPanelSearch:l=!1,children:c,onPointerDownCapture:d,...f}){const{shouldFilter:u,search:p,setSearch:m,setOpen:b,disabled:h,searchPlaceholder:x}=he(),w=o.jsx(O.CommandInput,{value:p,onValueChange:C=>{m(C),b(!0)},placeholder:x,disabled:h,tabIndex:l?0:-1,className:"pointer-events-auto"});return o.jsx(S.Portal,{children:o.jsx(S.Content2,{"data-slot":"combobox-content",side:t,sideOffset:r,align:n,alignOffset:a,className:v.cn(g.floatingSurface,"!pointer-events-auto data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-[min(24rem,var(--radix-popover-content-available-height))] w-[var(--radix-popover-trigger-width)] max-w-[min(100vw,var(--radix-popover-content-available-width))] min-w-[var(--radix-popover-trigger-width)] origin-[var(--radix-popover-content-transform-origin)] p-0 z-[var(--z-popover)] outline-hidden overflow-hidden",e),onOpenAutoFocus:C=>{l||C.preventDefault(),s?.(C)},onPointerDownCapture:d,...f,children:o.jsxs(O.Command,{className:"group/cmdk relative flex !h-auto min-h-0 w-full max-w-full flex-col overflow-hidden rounded-none! border-0 bg-transparent p-1 shadow-none max-h-[min(24rem,var(--radix-popover-content-available-height,24rem))]",shouldFilter:u,disablePointerSelection:!1,loop:!0,children:[l?w:o.jsx("div",{className:"sr-only pointer-events-none",children:w}),c]})})})}function Wi({className:e,placeholder:t="Select…",maxShownItems:r=2,id:n,...a}){const{value:s,setOpen:l,open:c,disabled:d,getLabel:f,setValue:u,listboxIdAria:p}=he(),[m,b]=i.useState(!1),h=n??i.useId();zi();const x=Array.isArray(s)?s:[],w=m?x:x.slice(0,r),C=x.length-w.length,N=i.useCallback(y=>{u(x.filter(k=>k!==y))},[x,u]);return o.jsx(S.Anchor2,{asChild:!0,children:o.jsx("div",{className:v.cn("w-full min-w-0",e),...a,children:o.jsxs(O.InputGroup,{className:v.cn("h-auto min-h-8 w-auto items-start gap-0 py-0.5",d&&"pointer-events-none opacity-50"),"data-disabled":d?"":void 0,children:[o.jsx("div",{id:h,"data-slot":"input-group-control",role:"combobox",tabIndex:d?-1:0,"aria-expanded":c,"aria-controls":c?p:void 0,"aria-disabled":d,className:v.cn("enhanced-combobox-input text-foreground flex min-h-7 min-w-0 flex-1 cursor-pointer flex-wrap items-center gap-1 border-0 bg-transparent px-2.5 py-1 text-left text-sm shadow-none outline-none",d&&"cursor-not-allowed"),onClick:()=>!d&&l(!c),onKeyDown:y=>{d||(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),l(!c))},children:x.length===0?o.jsx("span",{className:"text-muted-foreground",children:t}):o.jsxs(o.Fragment,{children:[w.map(y=>o.jsxs(xt,{variant:"outline",className:"max-w-full !rounded-md py-0 pl-1.5 pr-0.5",children:[o.jsx("span",{className:"min-w-0 max-w-[10rem] truncate",children:f(y)??y}),o.jsx("span",{role:"presentation",className:"inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-sm opacity-70 hover:bg-accent hover:text-accent-foreground hover:opacity-100",onPointerDown:k=>{k.preventDefault(),k.stopPropagation()},onClick:k=>{k.stopPropagation(),N(y)},children:o.jsx(U.HugeiconsIcon,{icon:Y.Cancel01Icon,strokeWidth:2,className:"size-3 pointer-events-none"})})]},y)),(C>0||m)&&o.jsx(xt,{variant:"outline",className:"cursor-pointer !rounded-md",onPointerDown:y=>{y.preventDefault(),y.stopPropagation()},onClick:y=>{y.stopPropagation(),b(k=>!k)},children:m?"Show less":`+${C} more`})]})}),o.jsx(O.InputGroupAddon,{align:"inline-end",className:"self-start pt-1",children:o.jsx(U.HugeiconsIcon,{icon:Y.ArrowUpDownIcon,strokeWidth:2,className:"text-muted-foreground/80 size-4 shrink-0","aria-hidden":!0})})]})})})}function _m(e){if(typeof e=="function")return{staticNodes:[],renderFn:e};const t=[];let r;const n=a=>{if(!(a==null||a===!0||a===!1)){if(typeof a=="function"){r=a;return}if(Array.isArray(a)){a.forEach(n);return}if(i.isValidElement(a)&&a.type===i.Fragment){const s=a.props.children;if(s==null)return;Array.isArray(s)?s.forEach(n):n(s);return}t.push(a)}};return n(e),{staticNodes:t,renderFn:r}}function Ki({className:e,children:t,renderItem:r,...n}){const{items:a,filterItems:s,search:l,open:c,setListboxIdAria:d}=he(),{staticNodes:f,renderFn:u}=_m(t),p=r??u,m=i.useMemo(()=>!p||!a?null:a.filter(s).map(x=>p(x)),[p,a,s,l]),b=i.useRef(null);return i.useLayoutEffect(()=>{if(!c){d(void 0);return}requestAnimationFrame(()=>{const x=b.current?.id;x&&d(x)})},[c,d,a,m,f]),o.jsxs(O.CommandList,{ref:b,"data-slot":"combobox-list",className:v.cn("pointer-events-auto relative z-[1] min-h-0 flex-1","max-h-[min(18rem,max(0px,calc(var(--radix-popover-content-available-height,24rem)-5.5rem)))]",e),...n,children:[f,m]})}function qi({className:e,children:t,value:r,keywords:n,onPointerDown:a,onMouseDown:s,onSelect:l,...c}){const d=he(),f=i.useMemo(()=>or(t),[t]);i.useEffect(()=>{d.registerLabel(r,f||r)},[d,r,f]);const u=f||r,p=i.useRef(!1);return o.jsx(O.CommandItem,{"data-slot":"combobox-item",value:u,keywords:[r,u,...n??[]],"data-checked":d.isSelected(r)?!0:void 0,onSelect:m=>{p.current||(d.onItemSelect(r,f||r),l?.(m))},onPointerDown:m=>{a?.(m)},onMouseDown:m=>{m.button===0&&(m.preventDefault(),p.current=!0,d.onItemSelect(r,f||r),window.setTimeout(()=>{p.current=!1},0),s?.(m))},className:v.cn("transition-colors hover:bg-accent hover:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground min-h-8 my-0.5 mx-1 gap-2 rounded-md px-2.5 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-3.5 relative flex w-auto cursor-pointer items-center outline-hidden select-none aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...c,children:t})}function Ui({className:e,...t}){return o.jsx(O.CommandGroup,{"data-slot":"combobox-group",className:v.cn(e),...t})}function Yi({className:e,...t}){return o.jsx("div",{"data-slot":"combobox-label",className:v.cn("cmdk-group-heading text-muted-foreground px-2 py-1.5 text-xs [&_svg]:hidden",e),...t})}function Xi({...e}){return o.jsx(O.CommandGroup,{"data-slot":"combobox-collection",...e})}function Zi({className:e,...t}){return o.jsx(O.CommandEmpty,{"data-slot":"combobox-empty",className:v.cn("text-muted-foreground py-6 text-center text-xs",e),...t})}function Qi({className:e,...t}){return o.jsx(O.CommandSeparator,{"data-slot":"combobox-separator",className:v.cn(e),...t})}function Ji({className:e,...t}){return o.jsx("div",{"data-slot":"combobox-chips",className:v.cn("bg-input/20 dark:bg-input/30 border-input focus-within:border-ring focus-within:ring-ring/30 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive dark:has-aria-invalid:border-destructive/50 flex min-h-7 flex-wrap items-center gap-1 rounded-md border bg-clip-padding px-2 py-0.5 text-xs transition-colors focus-within:ring-[2px] has-aria-invalid:ring-[2px] has-data-[slot=combobox-chip]:px-1",e),...t})}function el({className:e,children:t,showRemove:r=!0,value:n,...a}){const{setValue:s,value:l,getLabel:c,multiple:d}=he(),f=i.useCallback(()=>{!d||!Array.isArray(l)||s(l.filter(u=>u!==n))},[n,d,s,l]);return o.jsxs("div",{"data-slot":"combobox-chip",className:v.cn("bg-muted-foreground/10 text-foreground flex h-[calc(--spacing(4.75))] min-w-0 max-w-full w-fit items-center justify-center gap-1 overflow-hidden rounded-[calc(var(--radius-sm)-2px)] px-1.5 text-xs font-medium whitespace-nowrap has-data-[slot=combobox-chip-remove]:pr-0 has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50",e),...a,children:[re.wrapInlineLabelTextNodes(t??c(n)??n),r&&o.jsx(re.Button,{type:"button",variant:"ghost",size:"icon",className:"-ml-1 opacity-50 hover:opacity-100","data-slot":"combobox-chip-remove",onClick:u=>{u.stopPropagation(),f()},children:o.jsx(U.HugeiconsIcon,{icon:Y.Cancel01Icon,strokeWidth:2,className:"pointer-events-none"})})]})}function tl({className:e,...t}){const{disabled:r,setSearch:n,setOpen:a,search:s}=he();return o.jsx(O.CommandInput,{"data-slot":"combobox-chip-input",className:v.cn("min-w-16 flex-1 border-0 bg-transparent p-0 text-xs shadow-none outline-none",e),disabled:r,value:s,onValueChange:l=>{n(l),a(!0)},...t})}function rl(){return i.useRef(null)}const Wo=`
346
346
  .progress-block {
347
347
  width: 100%;
348
348
  height: 100%;
@@ -353,7 +353,7 @@ Defaulting to \`null\`.`}var Uf=Ls,Yf=zs,oo="Radio",[Xf,Hs]=g.createContextScope
353
353
  .progress-block-hover:hover {
354
354
  opacity: 0.5;
355
355
  }
356
- `,Pm=50,Ko=20,qo=100,Am=8,ol=oe.cva("",{variants:{variant:{default:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-destructive",neutral:"bg-muted-foreground"}},defaultVariants:{variant:"default"}}),nl=oe.cva("",{variants:{variant:{default:"bg-blue-200 dark:bg-blue-500/30",success:"bg-emerald-200 dark:bg-emerald-500/30",warning:"bg-yellow-200 dark:bg-yellow-500/30",error:"bg-red-200 dark:bg-red-500/30",neutral:"bg-gray-200 dark:bg-gray-500/40"}},defaultVariants:{variant:"default"}}),al=({filled:e,isFirst:t,isLast:r,variant:n,hoverEffect:a})=>o.jsx("div",{className:h.cn("size-full overflow-hidden px-[0.5px] transition sm:px-px",t&&"rounded-l-[4px] pl-0",r&&"rounded-r-[4px] pr-0"),style:{minWidth:"4px"},children:o.jsx("div",{className:h.cn("progress-block size-full",e?ol({variant:n}):nl({variant:n}),a&&"progress-block-hover")})});al.displayName="ProgressBlock";const sl=i.forwardRef(({value:e,max:t=100,style:r="dash",blocks:n,variant:a="default",showTooltip:s=!1,hoverEffect:l=!1,showAnimation:c=!1,label:d,height:p,className:u,...f},m)=>{const b=E.useRef(null),[v,x]=E.useState(null),w=i.useCallback(j=>{typeof m=="function"?m(j):m&&(m.current=j),b.current=j},[m]),C=Math.max(0,Math.min(100,e/t*100));E.useEffect(()=>{if(r!=="dash"||n!==void 0||!b.current)return;const j=()=>{b.current&&x(b.current.offsetWidth)};if(j(),typeof ResizeObserver<"u"){const R=new ResizeObserver(j);return R.observe(b.current),()=>{R.disconnect()}}else return window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}},[n,r]);const N=E.useMemo(()=>{if(r!=="dash")return 0;if(n!==void 0)return Math.max(Ko,Math.min(qo,n));if(v!==null){const j=Math.floor(v/Am);return Math.max(Ko,Math.min(qo,j))}return Pm},[n,v,r]),y=E.useMemo(()=>r!=="dash"?0:Math.round(C/100*N),[C,N,r]),k=E.useMemo(()=>r!=="dash"?[]:Array.from({length:N},(j,R)=>({filled:R<y,isFirst:R===0,isLast:R===N-1})),[N,y,r]),M=ol({variant:a}),I=nl({variant:a});if(r==="solid"){const j=o.jsxs("div",{ref:m,role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":d||`Progress: ${Math.round(C)}%`,className:h.cn("flex w-full items-center",u),...f,children:[o.jsx("div",{className:h.cn("relative flex w-full items-center rounded-full",I,p||"h-2"),children:o.jsx("div",{className:h.cn("h-full rounded-full",M,c&&"transform-gpu transition-all duration-200 ease-in-out"),style:{width:`${C}%`}})}),d&&o.jsx("span",{className:h.cn("ml-2 whitespace-nowrap text-sm font-medium leading-none","text-foreground"),children:d})]});return s?o.jsxs(S.Tooltip,{children:[o.jsx(S.TooltipTrigger,{asChild:!0,children:j}),o.jsxs(S.TooltipContent,{side:"top",sideOffset:10,align:"center",children:[Math.round(C),"%"]})]}):j}const _=o.jsx("div",{ref:w,role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":`Progress: ${Math.round(C)}%`,className:h.cn("group flex w-full items-center",p||"h-8",u),...f,children:k.map((j,R)=>o.jsx(al,{filled:j.filled,isFirst:j.isFirst,isLast:j.isLast,variant:a||"default",hoverEffect:l},R))});return s?o.jsxs(o.Fragment,{children:[o.jsx("style",{children:Wo}),o.jsxs(S.Tooltip,{children:[o.jsx(S.TooltipTrigger,{asChild:!0,children:_}),o.jsxs(S.TooltipContent,{side:"top",sideOffset:10,align:"center",children:[Math.round(C),"%"]})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("style",{children:Wo}),_]})});sl.displayName="EnhancedProgress";const Dm=oe.cva("size-full flex-1 transition-all",{variants:{variant:{default:"bg-primary",neutral:"bg-muted-foreground",success:"bg-success",warning:"bg-warning",error:"bg-destructive"}},defaultVariants:{variant:"default"}});function Om({className:e,value:t,variant:r,...n}){return o.jsx(Uf,{"data-slot":"progress",className:h.cn("bg-muted h-1 rounded-md relative flex w-full items-center overflow-x-hidden",e),...n,children:o.jsx(Yf,{"data-slot":"progress-indicator",className:h.cn(Dm({variant:r})),style:{transform:`translateX(-${100-(t||0)}%)`}})})}const il=E.createContext(void 0),ll=i.forwardRef(({className:e,variant:t="animated",disabled:r,gap:n=3,children:a,...s},l)=>{const c=i.useRef(null),[d,p]=i.useState({}),[u,f]=i.useState(!1),[m,b]=i.useState(s.value||s.defaultValue||""),v=i.useCallback(y=>{b(y),s.onValueChange?.(y)},[s,m,t]);i.useEffect(()=>{s.value!==void 0&&s.value!==null&&b(s.value)},[s.value,m,t]);const x=i.useCallback(y=>{typeof l=="function"?l(y):l&&(l.current=y),c.current=y},[l]),w=i.useCallback(()=>{if(t!=="sliding"||!c.current){f(!1);return}if(!m){f(!1);return}let y=m;if(!y&&c.current){const A=c.current.querySelector('[data-slot="radio-group-item"][data-state="checked"]');if(A){const T=A.querySelector('input[type="radio"]');T&&(y=T.value)}else{const T=c.current.querySelector('input[type="radio"]:checked');T&&(y=T.value)}}if(!y){f(!1);return}const k=c.current.querySelector('[data-slot="radio-group-item"][data-state="checked"]');let M=null;if(k){const A=k.id;A&&(M=c.current.querySelector(`label[for="${A}"]`),M||(M=k.parentElement?.querySelector("label")))}else{const A=Array.from(c.current.querySelectorAll("label.sliding-indicator-target"));for(const T of A){const D=T.htmlFor;if(D){const z=c.current.querySelector(`#${D}`)?.querySelector('input[type="radio"]');if(z&&z.value===y&&z.checked){M=T;break}}}}if(!M){f(!1);return}const I=c.current.getBoundingClientRect(),_=M.getBoundingClientRect(),j=c.current.scrollLeft||0,R=c.current.scrollTop||0,F={left:`${_.left-I.left+j}px`,top:`${_.top-I.top+R}px`,width:`${_.width}px`,height:`${_.height}px`};p(F),f(!0)},[t,m]);i.useEffect(()=>{if(t!=="sliding")return;const y=requestAnimationFrame(()=>{requestAnimationFrame(w)}),k=new ResizeObserver(()=>{requestAnimationFrame(()=>{requestAnimationFrame(w)})}),M=new MutationObserver(()=>{requestAnimationFrame(()=>{requestAnimationFrame(w)})}),I=()=>{requestAnimationFrame(()=>{requestAnimationFrame(w)})};return c.current&&(k.observe(c.current),M.observe(c.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state","class","checked"]})),window.addEventListener("resize",I),()=>{cancelAnimationFrame(y),k.disconnect(),M.disconnect(),window.removeEventListener("resize",I)}},[t,w,m,a]);const C=typeof n=="number"?`gap-${n}`:n,N=h.cn(t==="sliding"?"sliding-indicator-container isolate flex flex-row items-center gap-0 rounded-full bg-muted p-[3px] box-border overflow-x-auto min-h-7 min-w-0":`grid ${C} w-full`,e);return o.jsx(il.Provider,{value:{variant:t,disabled:r,value:m},children:o.jsxs(Js,{ref:x,"data-slot":"radio-group",className:N,disabled:r,value:s.value,defaultValue:s.defaultValue,onValueChange:v,...Object.fromEntries(Object.entries(s).filter(([y])=>!["value","defaultValue","onValueChange","disabled"].includes(y))),children:[t==="sliding"&&u&&o.jsx("div",{className:h.cn("sliding-indicator rounded-full border border-input bg-background shadow-sm box-border"),style:d,"aria-hidden":"true"}),a]})})});ll.displayName="EnhancedRadioGroup";const cl=i.forwardRef(({className:e,children:t,spacing:r="default",...n},a)=>{const s=E.useContext(il);if(!s)throw new Error("EnhancedRadioGroupItem must be used within EnhancedRadioGroup");const{variant:l,disabled:c,value:d}=s,p=c||n.disabled,u=E.useId(),f=d===n.value;if(l==="animated"){const b={compact:"gap-2",default:"gap-3",comfortable:"gap-4"};return o.jsxs("label",{className:h.cn("flex items-center cursor-pointer relative",t?"w-full":"inline-flex w-auto max-w-full",b[r],"group/radio-item",p&&"cursor-not-allowed opacity-50"),"data-disabled":p,children:[o.jsx(it,{ref:a,"data-slot":"radio-group-item",className:h.cn("border-input text-primary dark:data-[state=unchecked]:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 data-[state=checked]:bg-primary dark:data-[state=checked]:bg-primary data-[state=checked]:border-transparent flex size-4 rounded-full transition-none focus-visible:ring-[2px] aria-invalid:ring-[2px] peer relative aspect-square shrink-0 border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:animate-[radio-pulse_0.7s_forwards]",e),disabled:p,...n,children:o.jsx(rr,{"data-slot":"radio-group-indicator",className:"group-aria-invalid/radio-group-item:text-destructive flex size-4 items-center justify-center text-primary-foreground",children:o.jsx(U.HugeiconsIcon,{icon:Y.CircleIcon,strokeWidth:2,className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current"})})}),t&&o.jsx("span",{className:"text-sm font-medium leading-normal text-foreground select-none",children:t})]})}if(l==="sliding"){const b=i.Children.toArray(t).some(x=>{if(!i.isValidElement(x))return!1;const w=x.props;return w?.className?.includes("h-")||w?.className?.includes("w-")}),v=n.id||`radio-sliding-${n.value}-${u.replace(/:/g,"-")}`;return o.jsxs("div",{className:h.cn("relative min-w-0",b?"shrink-0":"flex-1"),children:[o.jsx(it,{ref:a,"data-slot":"radio-group-item",id:v,className:"sr-only",disabled:p,...n}),o.jsx("label",{htmlFor:v,className:h.cn("sliding-indicator-target relative z-[var(--z-content)] inline-flex cursor-pointer items-center justify-center rounded-full border border-transparent text-xs font-medium leading-normal transition-colors motion-safe:duration-200",b?"size-7 p-0":"h-7 w-full min-w-0 px-1.5 py-0.5",f?"text-foreground shadow-none":"text-muted-foreground hover:bg-accent hover:text-accent-foreground",p&&"cursor-not-allowed opacity-50"),children:t&&o.jsx("span",{children:t})})]})}const m={compact:"gap-2",default:"gap-3",comfortable:"gap-4"};return o.jsxs("label",{className:h.cn("flex items-center cursor-pointer relative",t?"w-full":"inline-flex w-auto max-w-full",m[r],p&&"cursor-not-allowed opacity-50"),children:[o.jsx(it,{ref:a,"data-slot":"radio-group-item",className:h.cn("border-input text-primary dark:data-[state=unchecked]:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 data-[state=checked]:bg-primary dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary flex size-4 rounded-full transition-none focus-visible:ring-[2px] aria-invalid:ring-[2px] peer relative aspect-square shrink-0 border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",e),disabled:p,...n,children:o.jsx(rr,{"data-slot":"radio-group-indicator",className:"group-aria-invalid/radio-group-item:text-destructive flex size-4 items-center justify-center text-primary-foreground",children:o.jsx(U.HugeiconsIcon,{icon:Y.CircleIcon,strokeWidth:2,className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current"})})}),t&&o.jsx("span",{className:"text-sm font-medium leading-normal text-foreground select-none",children:t})]})});cl.displayName="EnhancedRadioGroupItem";function Lm({className:e,...t}){return o.jsx(Js,{"data-slot":"radio-group",className:h.cn("grid gap-3 w-full",e),...t})}function $m({className:e,children:t,id:r,...n}){const a=E.useId(),s=r||a,l=o.jsx(it,{"data-slot":"radio-group-item",id:s,className:h.cn("border-input text-primary dark:data-[state=unchecked]:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 data-[state=checked]:bg-primary dark:data-[state=checked]:bg-primary data-[state=checked]:border-transparent flex size-4 rounded-full transition-none focus-visible:ring-[2px] aria-invalid:ring-[2px] group/radio-group-item peer relative aspect-square shrink-0 border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:o.jsx(rr,{"data-slot":"radio-group-indicator",className:"group-aria-invalid/radio-group-item:text-destructive flex size-4 items-center justify-center text-primary-foreground",children:o.jsx(U.HugeiconsIcon,{icon:Y.CircleIcon,strokeWidth:2,className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current"})})});return t?o.jsxs("label",{htmlFor:s,className:"flex items-center gap-3 cursor-pointer text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:[l,t]}):l}const Uo=`
356
+ `,Pm=50,Ko=20,qo=100,Am=8,ol=oe.cva("",{variants:{variant:{default:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-destructive",neutral:"bg-muted-foreground"}},defaultVariants:{variant:"default"}}),nl=oe.cva("",{variants:{variant:{default:"bg-blue-200 dark:bg-blue-500/30",success:"bg-emerald-200 dark:bg-emerald-500/30",warning:"bg-yellow-200 dark:bg-yellow-500/30",error:"bg-red-200 dark:bg-red-500/30",neutral:"bg-gray-200 dark:bg-gray-500/40"}},defaultVariants:{variant:"default"}}),al=({filled:e,isFirst:t,isLast:r,variant:n,hoverEffect:a})=>o.jsx("div",{className:v.cn("size-full overflow-hidden px-[0.5px] transition sm:px-px",t&&"rounded-l-[4px] pl-0",r&&"rounded-r-[4px] pr-0"),style:{minWidth:"4px"},children:o.jsx("div",{className:v.cn("progress-block size-full",e?ol({variant:n}):nl({variant:n}),a&&"progress-block-hover")})});al.displayName="ProgressBlock";const sl=i.forwardRef(({value:e,max:t=100,style:r="dash",blocks:n,variant:a="default",showTooltip:s=!1,hoverEffect:l=!1,showAnimation:c=!1,label:d,height:f,className:u,...p},m)=>{const b=E.useRef(null),[h,x]=E.useState(null),w=i.useCallback(j=>{typeof m=="function"?m(j):m&&(m.current=j),b.current=j},[m]),C=Math.max(0,Math.min(100,e/t*100));E.useEffect(()=>{if(r!=="dash"||n!==void 0||!b.current)return;const j=()=>{b.current&&x(b.current.offsetWidth)};if(j(),typeof ResizeObserver<"u"){const R=new ResizeObserver(j);return R.observe(b.current),()=>{R.disconnect()}}else return window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}},[n,r]);const N=E.useMemo(()=>{if(r!=="dash")return 0;if(n!==void 0)return Math.max(Ko,Math.min(qo,n));if(h!==null){const j=Math.floor(h/Am);return Math.max(Ko,Math.min(qo,j))}return Pm},[n,h,r]),y=E.useMemo(()=>r!=="dash"?0:Math.round(C/100*N),[C,N,r]),k=E.useMemo(()=>r!=="dash"?[]:Array.from({length:N},(j,R)=>({filled:R<y,isFirst:R===0,isLast:R===N-1})),[N,y,r]),M=ol({variant:a}),I=nl({variant:a});if(r==="solid"){const j=o.jsxs("div",{ref:m,role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":d||`Progress: ${Math.round(C)}%`,className:v.cn("flex w-full items-center",u),...p,children:[o.jsx("div",{className:v.cn("relative flex w-full items-center rounded-full",I,f||"h-2"),children:o.jsx("div",{className:v.cn("h-full rounded-full",M,c&&"transform-gpu transition-all duration-200 ease-in-out"),style:{width:`${C}%`}})}),d&&o.jsx("span",{className:v.cn("ml-2 whitespace-nowrap text-sm font-medium leading-none","text-foreground"),children:d})]});return s?o.jsxs(S.Tooltip,{children:[o.jsx(S.TooltipTrigger,{asChild:!0,children:j}),o.jsxs(S.TooltipContent,{side:"top",sideOffset:10,align:"center",children:[Math.round(C),"%"]})]}):j}const _=o.jsx("div",{ref:w,role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":`Progress: ${Math.round(C)}%`,className:v.cn("group flex w-full items-center",f||"h-8",u),...p,children:k.map((j,R)=>o.jsx(al,{filled:j.filled,isFirst:j.isFirst,isLast:j.isLast,variant:a||"default",hoverEffect:l},R))});return s?o.jsxs(o.Fragment,{children:[o.jsx("style",{children:Wo}),o.jsxs(S.Tooltip,{children:[o.jsx(S.TooltipTrigger,{asChild:!0,children:_}),o.jsxs(S.TooltipContent,{side:"top",sideOffset:10,align:"center",children:[Math.round(C),"%"]})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("style",{children:Wo}),_]})});sl.displayName="EnhancedProgress";const Dm=oe.cva("size-full flex-1 transition-all",{variants:{variant:{default:"bg-primary",neutral:"bg-muted-foreground",success:"bg-success",warning:"bg-warning",error:"bg-destructive"}},defaultVariants:{variant:"default"}});function Om({className:e,value:t,variant:r,...n}){return o.jsx(Uf,{"data-slot":"progress",className:v.cn("bg-muted h-1 rounded-md relative flex w-full items-center overflow-x-hidden",e),...n,children:o.jsx(Yf,{"data-slot":"progress-indicator",className:v.cn(Dm({variant:r})),style:{transform:`translateX(-${100-(t||0)}%)`}})})}const il=E.createContext(void 0),ll=i.forwardRef(({className:e,variant:t="animated",disabled:r,gap:n=3,children:a,...s},l)=>{const c=i.useRef(null),[d,f]=i.useState({}),[u,p]=i.useState(!1),[m,b]=i.useState(s.value||s.defaultValue||""),h=i.useCallback(y=>{b(y),s.onValueChange?.(y)},[s,m,t]);i.useEffect(()=>{s.value!==void 0&&s.value!==null&&b(s.value)},[s.value,m,t]);const x=i.useCallback(y=>{typeof l=="function"?l(y):l&&(l.current=y),c.current=y},[l]),w=i.useCallback(()=>{if(t!=="sliding"||!c.current){p(!1);return}if(!m){p(!1);return}let y=m;if(!y&&c.current){const A=c.current.querySelector('[data-slot="radio-group-item"][data-state="checked"]');if(A){const T=A.querySelector('input[type="radio"]');T&&(y=T.value)}else{const T=c.current.querySelector('input[type="radio"]:checked');T&&(y=T.value)}}if(!y){p(!1);return}const k=c.current.querySelector('[data-slot="radio-group-item"][data-state="checked"]');let M=null;if(k){const A=k.id;A&&(M=c.current.querySelector(`label[for="${A}"]`),M||(M=k.parentElement?.querySelector("label")))}else{const A=Array.from(c.current.querySelectorAll("label.sliding-indicator-target"));for(const T of A){const D=T.htmlFor;if(D){const z=c.current.querySelector(`#${D}`)?.querySelector('input[type="radio"]');if(z&&z.value===y&&z.checked){M=T;break}}}}if(!M){p(!1);return}const I=c.current.getBoundingClientRect(),_=M.getBoundingClientRect(),j=c.current.scrollLeft||0,R=c.current.scrollTop||0,F={left:`${_.left-I.left+j}px`,top:`${_.top-I.top+R}px`,width:`${_.width}px`,height:`${_.height}px`};f(F),p(!0)},[t,m]);i.useEffect(()=>{if(t!=="sliding")return;const y=requestAnimationFrame(()=>{requestAnimationFrame(w)}),k=new ResizeObserver(()=>{requestAnimationFrame(()=>{requestAnimationFrame(w)})}),M=new MutationObserver(()=>{requestAnimationFrame(()=>{requestAnimationFrame(w)})}),I=()=>{requestAnimationFrame(()=>{requestAnimationFrame(w)})};return c.current&&(k.observe(c.current),M.observe(c.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state","class","checked"]})),window.addEventListener("resize",I),()=>{cancelAnimationFrame(y),k.disconnect(),M.disconnect(),window.removeEventListener("resize",I)}},[t,w,m,a]);const C=typeof n=="number"?`gap-${n}`:n,N=v.cn(t==="sliding"?"sliding-indicator-container isolate flex flex-row items-center gap-0 rounded-full bg-muted p-[3px] box-border overflow-x-auto min-h-7 min-w-0":`grid ${C} w-full`,e);return o.jsx(il.Provider,{value:{variant:t,disabled:r,value:m},children:o.jsxs(Js,{ref:x,"data-slot":"radio-group",className:N,disabled:r,value:s.value,defaultValue:s.defaultValue,onValueChange:h,...Object.fromEntries(Object.entries(s).filter(([y])=>!["value","defaultValue","onValueChange","disabled"].includes(y))),children:[t==="sliding"&&u&&o.jsx("div",{className:v.cn("sliding-indicator rounded-full border border-input bg-background shadow-sm box-border"),style:d,"aria-hidden":"true"}),a]})})});ll.displayName="EnhancedRadioGroup";const cl=i.forwardRef(({className:e,children:t,spacing:r="default",...n},a)=>{const s=E.useContext(il);if(!s)throw new Error("EnhancedRadioGroupItem must be used within EnhancedRadioGroup");const{variant:l,disabled:c,value:d}=s,f=c||n.disabled,u=E.useId(),p=d===n.value;if(l==="animated"){const b={compact:"gap-2",default:"gap-3",comfortable:"gap-4"};return o.jsxs("label",{className:v.cn("flex items-center cursor-pointer relative",t?"w-full":"inline-flex w-auto max-w-full",b[r],"group/radio-item",f&&"cursor-not-allowed opacity-50"),"data-disabled":f,children:[o.jsx(it,{ref:a,"data-slot":"radio-group-item",className:v.cn("border-input text-primary dark:data-[state=unchecked]:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 data-[state=checked]:bg-primary dark:data-[state=checked]:bg-primary data-[state=checked]:border-transparent flex size-4 rounded-full transition-none focus-visible:ring-[2px] aria-invalid:ring-[2px] peer relative aspect-square shrink-0 border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:animate-[radio-pulse_0.7s_forwards]",e),disabled:f,...n,children:o.jsx(rr,{"data-slot":"radio-group-indicator",className:"group-aria-invalid/radio-group-item:text-destructive flex size-4 items-center justify-center text-primary-foreground",children:o.jsx(U.HugeiconsIcon,{icon:Y.CircleIcon,strokeWidth:2,className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current"})})}),t&&o.jsx("span",{className:"text-sm font-medium leading-normal text-foreground select-none",children:t})]})}if(l==="sliding"){const b=i.Children.toArray(t).some(x=>{if(!i.isValidElement(x))return!1;const w=x.props;return w?.className?.includes("h-")||w?.className?.includes("w-")}),h=n.id||`radio-sliding-${n.value}-${u.replace(/:/g,"-")}`;return o.jsxs("div",{className:v.cn("relative min-w-0",b?"shrink-0":"flex-1"),children:[o.jsx(it,{ref:a,"data-slot":"radio-group-item",id:h,className:"sr-only",disabled:f,...n}),o.jsx("label",{htmlFor:h,className:v.cn("sliding-indicator-target relative z-[var(--z-content)] inline-flex cursor-pointer items-center justify-center rounded-full border border-transparent text-xs font-medium leading-normal transition-colors motion-safe:duration-200",b?"size-7 p-0":"h-7 w-full min-w-0 px-1.5 py-0.5",p?"text-foreground shadow-none":"text-muted-foreground hover:bg-accent hover:text-accent-foreground",f&&"cursor-not-allowed opacity-50"),children:t&&o.jsx("span",{children:t})})]})}const m={compact:"gap-2",default:"gap-3",comfortable:"gap-4"};return o.jsxs("label",{className:v.cn("flex items-center cursor-pointer relative",t?"w-full":"inline-flex w-auto max-w-full",m[r],f&&"cursor-not-allowed opacity-50"),children:[o.jsx(it,{ref:a,"data-slot":"radio-group-item",className:v.cn("border-input text-primary dark:data-[state=unchecked]:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 data-[state=checked]:bg-primary dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary flex size-4 rounded-full transition-none focus-visible:ring-[2px] aria-invalid:ring-[2px] peer relative aspect-square shrink-0 border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",e),disabled:f,...n,children:o.jsx(rr,{"data-slot":"radio-group-indicator",className:"group-aria-invalid/radio-group-item:text-destructive flex size-4 items-center justify-center text-primary-foreground",children:o.jsx(U.HugeiconsIcon,{icon:Y.CircleIcon,strokeWidth:2,className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current"})})}),t&&o.jsx("span",{className:"text-sm font-medium leading-normal text-foreground select-none",children:t})]})});cl.displayName="EnhancedRadioGroupItem";function Lm({className:e,...t}){return o.jsx(Js,{"data-slot":"radio-group",className:v.cn("grid gap-3 w-full",e),...t})}function $m({className:e,children:t,id:r,...n}){const a=E.useId(),s=r||a,l=o.jsx(it,{"data-slot":"radio-group-item",id:s,className:v.cn("border-input text-primary dark:data-[state=unchecked]:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 data-[state=checked]:bg-primary dark:data-[state=checked]:bg-primary data-[state=checked]:border-transparent flex size-4 rounded-full transition-none focus-visible:ring-[2px] aria-invalid:ring-[2px] group/radio-group-item peer relative aspect-square shrink-0 border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:o.jsx(rr,{"data-slot":"radio-group-indicator",className:"group-aria-invalid/radio-group-item:text-destructive flex size-4 items-center justify-center text-primary-foreground",children:o.jsx(U.HugeiconsIcon,{icon:Y.CircleIcon,strokeWidth:2,className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current"})})});return t?o.jsxs("label",{htmlFor:s,className:"flex items-center gap-3 cursor-pointer text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:[l,t]}):l}const Uo=`
357
357
  .rating-wrapper {
358
358
  display: inline-flex;
359
359
  flex-direction: row-reverse;
@@ -471,7 +471,7 @@ Defaulting to \`null\`.`}var Uf=Ls,Yf=zs,oo="Radio",[Xf,Hs]=g.createContextScope
471
471
  cursor: not-allowed;
472
472
  opacity: 0.5;
473
473
  }
474
- `,dl=i.forwardRef(({className:e,value:t,defaultValue:r=0,onValueChange:n,maxRating:a=5,allowHalf:s=!0,disabled:l=!1,showTooltip:c=!0,tooltipContent:d,starSize:p="h-6 w-6",...u},f)=>{const m=E.useRef(null),b=f||m,v=E.useMemo(()=>{const _=[];if(s)for(let j=.5;j<=a;j+=.5)_.push(j);else for(let j=1;j<=a;j+=1)_.push(j);return _.reverse()},[a,s]),[x,w]=i.useState(r),C=t!==void 0?t:x,N=i.useCallback(_=>{const j=parseFloat(_.target.value);t===void 0&&w(j),n?.(j)},[t,n]);E.useEffect(()=>{t===void 0&&w(r)},[r,t]);const y=E.useId(),k=E.useRef(void 0);k.current===void 0&&(k.current=`rating-${y.replace(/:/g,"")}`);const M=k.current,I=o.jsx("fieldset",{ref:b,className:h.cn("rating-wrapper",l&&"opacity-50",e),disabled:l,role:"radiogroup","aria-label":`Rating: ${C} out of ${a} stars`,...u,children:v.map(_=>{const j=_.toString(),R=`rating-${M}-${j.replace(".","-")}`,A=s&&_%1!==0?`${Math.floor(_)} 1/2 ${_===.5?"star":"stars"}`:`${_} ${_===1?"star":"stars"}`;return o.jsxs(i.Fragment,{children:[o.jsx("input",{type:"radio",id:R,name:M,value:j,checked:C===_,onChange:N,disabled:l,"aria-label":A}),o.jsx("label",{htmlFor:R,title:A,"aria-label":A})]},j)})});return c?o.jsxs(o.Fragment,{children:[o.jsx("style",{children:Uo}),o.jsxs(S.Tooltip,{children:[o.jsx(S.TooltipTrigger,{asChild:!0,children:I}),o.jsx(S.TooltipContent,{side:"top",sideOffset:8,children:d?d(C):`${C} ${C===1?"star":"stars"}`})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("style",{children:Uo}),I]})});dl.displayName="Rating";const zm=`
474
+ `,dl=i.forwardRef(({className:e,value:t,defaultValue:r=0,onValueChange:n,maxRating:a=5,allowHalf:s=!0,disabled:l=!1,showTooltip:c=!0,tooltipContent:d,starSize:f="h-6 w-6",...u},p)=>{const m=E.useRef(null),b=p||m,h=E.useMemo(()=>{const _=[];if(s)for(let j=.5;j<=a;j+=.5)_.push(j);else for(let j=1;j<=a;j+=1)_.push(j);return _.reverse()},[a,s]),[x,w]=i.useState(r),C=t!==void 0?t:x,N=i.useCallback(_=>{const j=parseFloat(_.target.value);t===void 0&&w(j),n?.(j)},[t,n]);E.useEffect(()=>{t===void 0&&w(r)},[r,t]);const y=E.useId(),k=E.useRef(void 0);k.current===void 0&&(k.current=`rating-${y.replace(/:/g,"")}`);const M=k.current,I=o.jsx("fieldset",{ref:b,className:v.cn("rating-wrapper",l&&"opacity-50",e),disabled:l,role:"radiogroup","aria-label":`Rating: ${C} out of ${a} stars`,...u,children:h.map(_=>{const j=_.toString(),R=`rating-${M}-${j.replace(".","-")}`,A=s&&_%1!==0?`${Math.floor(_)} 1/2 ${_===.5?"star":"stars"}`:`${_} ${_===1?"star":"stars"}`;return o.jsxs(i.Fragment,{children:[o.jsx("input",{type:"radio",id:R,name:M,value:j,checked:C===_,onChange:N,disabled:l,"aria-label":A}),o.jsx("label",{htmlFor:R,title:A,"aria-label":A})]},j)})});return c?o.jsxs(o.Fragment,{children:[o.jsx("style",{children:Uo}),o.jsxs(S.Tooltip,{children:[o.jsx(S.TooltipTrigger,{asChild:!0,children:I}),o.jsx(S.TooltipContent,{side:"top",sideOffset:8,children:d?d(C):`${C} ${C===1?"star":"stars"}`})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("style",{children:Uo}),I]})});dl.displayName="Rating";const zm=`
475
475
  .tracker-block {
476
476
  width: 100%;
477
477
  height: 100%;
@@ -482,7 +482,7 @@ Defaulting to \`null\`.`}var Uf=Ls,Yf=zs,oo="Radio",[Xf,Hs]=g.createContextScope
482
482
  .tracker-block-hover:hover {
483
483
  opacity: 0.5;
484
484
  }
485
- `,ul=({color:e,tooltip:t,defaultBackgroundColor:r,hoverEffect:n,isFirst:a,isLast:s})=>{const l=o.jsx("div",{className:h.cn("size-full overflow-hidden px-[0.5px] transition sm:px-px cursor-pointer",a&&"rounded-l-[4px] pl-0",s&&"rounded-r-[4px] pr-0"),style:{minWidth:"4px"},children:o.jsx("div",{className:h.cn("tracker-block size-full",e||r||"bg-muted",n&&"tracker-block-hover")})});return t?o.jsxs(S.Tooltip,{delayDuration:300,children:[o.jsx(S.TooltipTrigger,{asChild:!0,children:l}),o.jsx(S.TooltipContent,{side:"top",sideOffset:10,align:"center",children:t})]}):l};ul.displayName="TrackerBlock";const pl=i.forwardRef(({data:e=[],defaultBackgroundColor:t="bg-muted",className:r,hoverEffect:n=!1,...a},s)=>{const l=e.map((c,d)=>o.jsx(ul,{defaultBackgroundColor:t,hoverEffect:n,isFirst:d===0,isLast:d===e.length-1,...c},c.key??d));return o.jsxs(o.Fragment,{children:[o.jsx("style",{children:zm}),o.jsx("div",{ref:s,className:h.cn("group flex h-8 w-full items-center",r),...a,children:l})]})});pl.displayName="Tracker";const $t=E.createContext(void 0);function Fm(e,t,r){const[n,a]=E.useState([]);return E.useEffect(()=>{if(!e){a([]);return}let s=document;if(r)if(typeof r=="string"){const p=document.querySelector(r);p instanceof HTMLElement&&(s=p)}else"current"in r?r.current instanceof HTMLElement&&(s=r.current):r instanceof HTMLElement&&(s=r);const l=Array.from(s.querySelectorAll(t));if(l.length===0){a([]);return}const c=[],d=[];l.forEach(p=>{const u=parseInt(p.tagName.charAt(1)),f=p.textContent?.trim()||"";let m=p.id;m||(m=f.toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-"),p.id=m);const b={id:m,label:f,level:u};for(;d.length>0&&d[d.length-1].level>=u;)d.pop();if(d.length===0)c.push(b);else{const v=d[d.length-1];v.children||(v.children=[]),v.children.push(b)}d.push(b)}),a(c)},[e,t,r]),n}const fl=i.forwardRef(({className:e,items:t,autoDetect:r=!1,headingSelector:n="h1, h2, h3, h4, h5, h6",container:a,scrollContainer:s,activeId:l,onActiveChange:c,scrollOffset:d=0,smoothScroll:p=!0,enableScrollSpy:u=!0,title:f="On this page",variant:m="normal",...b},v)=>{const x=l!==void 0,w=Fm(r,n,a),C=E.useMemo(()=>t&&t.length>0?t:r&&w.length>0?w:[],[t,w,r]),N=i.useMemo(()=>{if(!a)return null;if(typeof a=="string"){const A=document.querySelector(a);return A instanceof HTMLElement?A:null}return"current"in a?a.current:a instanceof HTMLElement?a:null},[a]),y=i.useMemo(()=>{const A=s||a;if(!A)return null;if(typeof A=="string"){const T=document.querySelector(A);return T instanceof HTMLElement?T:null}return"current"in A?A.current:A instanceof HTMLElement?A:null},[s,a]),k=en({selector:n,rootMargin:"-100px 0px -66%",threshold:0,offset:d,enabled:u&&!x&&C.length>0,container:y||N}),M=x?l:k.activeId,I=x?l?[l]:[]:k.visibleIds,_=i.useRef(null);i.useEffect(()=>{if(I.length>0&&C.length>0){let A=-1;const T=[],D=$=>{$.forEach(z=>{T.push(z),z.children&&D(z.children)})};D(C);for(let $=0;$<T.length;$++)I.includes(T[$].id)&&(A=$);A>=0&&(_.current=T[A].id)}},[I,C]);const j=A=>{const T=document.getElementById(A);if(T){const D=y||N;if(D){const $=T.getBoundingClientRect().top,z=D.getBoundingClientRect().top,V=$-z+D.scrollTop-d;D.scrollTo({top:V,behavior:p?"smooth":"auto"})}else{const z=T.getBoundingClientRect().top+window.pageYOffset-d;window.scrollTo({top:z,behavior:p?"smooth":"auto"})}x||k.setActiveId(A),c?.(A)}};E.useEffect(()=>{!x&&M!==null&&c?.(M)},[M,x,c]);const{flatItems:R,activePathIds:F}=E.useMemo(()=>{if(m!=="circuit"&&m!=="clerk")return{flatItems:[],activePathIds:new Set};const A=[],T=new Map,D=(z,V)=>{z.forEach(P=>{A.push({...P,parentId:V}),V&&T.set(P.id,V),P.children&&D(P.children,P.id)})};D(C);const $=new Set;if(M){let z=M;for(;z;)$.add(z),z=T.get(z)}return{flatItems:A,activePathIds:$}},[C,m,M]);return C.length===0?null:o.jsx($t.Provider,{value:{activeId:M,visibleIds:I,onItemClick:j,scrollOffset:d,smoothScroll:p,variant:m},children:o.jsxs("div",{ref:v,className:h.cn("relative min-h-0 text-sm","overflow-auto","[scrollbar-width:none]","[mask-image:linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent)]",e),...b,children:[f&&o.jsx("div",{className:"px-4 py-2 font-semibold text-foreground sticky top-0 bg-background/80 backdrop-blur-sm z-10 border-b border-border",children:f}),o.jsx("nav",{className:"py-3",children:m==="circuit"?o.jsx(bl,{items:R,activePathIds:F,visibleIds:I,lastActiveIdRef:_}):m==="clerk"?o.jsx(yl,{items:R,activePathIds:F,visibleIds:I,lastActiveIdRef:_}):o.jsx(ml,{items:C,visibleIds:I,lastActiveIdRef:_})})]})})});fl.displayName="TableOfContents";const ml=i.memo(({items:e,visibleIds:t=[],lastActiveIdRef:r})=>{const n=E.useRef(null),a=E.useMemo(()=>{const l=c=>{const d=[];return c.forEach(p=>{d.push(p),p.children&&d.push(...l(p.children))}),d};return l(e)},[e]),s=i.useMemo(()=>{const l=r?.current;return t.length>0?new Set(t):l?new Set([l]):new Set},[t,r]);return o.jsxs(o.Fragment,{children:[o.jsx(gl,{containerRef:n,activeIds:t,lastActiveIdRef:r,items:a}),o.jsx("div",{ref:n,className:h.cn("flex flex-col border-s border-foreground/10"),children:a.map(l=>o.jsx(hl,{item:l,isVisible:s.has(l.id)},l.id))})]})});ml.displayName="NormalTableOfContentsList";const gl=i.memo(({containerRef:e,activeIds:t,lastActiveIdRef:r,items:n})=>{const a=E.useRef(null),s=i.useCallback((c,d)=>{const p=a.current;p&&(p.style.setProperty("--normal-top",`${c}px`),p.style.setProperty("--normal-height",`${d}px`))},[]),l=i.useCallback(()=>{if(!e.current){s(0,0);return}const c=e.current;if(c.clientHeight===0){s(0,0);return}let d=t;if(t.length===0&&r?.current&&(d=[r.current]),d.length===0){s(0,0);return}let p=Number.MAX_VALUE,u=0;for(const f of d){const m=c.querySelector(`a[href="#${f}"]`);if(!m)continue;const b=getComputedStyle(m);p=Math.min(p,m.offsetTop+parseFloat(b.paddingTop)),u=Math.max(u,m.offsetTop+m.clientHeight-parseFloat(b.paddingBottom))}p===Number.MAX_VALUE?s(0,0):s(p,u-p)},[e,t,s,r]);return E.useEffect(()=>{if(!e.current)return;const c=e.current,d=new ResizeObserver(l);return d.observe(c),l(),()=>{d.disconnect()}},[l]),E.useEffect(()=>{l()},[t,l]),o.jsx("div",{ref:a,role:"none",className:"absolute top-0 w-px bg-primary transition-[translate,height] ease-linear",style:{transform:"translateY(var(--normal-top, 0px))",height:"var(--normal-height, 0px)"}})});gl.displayName="NormalThumb";const hl=i.memo(({item:e,isVisible:t=!1})=>{const r=E.useContext($t),{onItemClick:n}=r,a=t,s=e.level<=2?12:e.level===3?24:32;return o.jsx("a",{href:`#${e.id}`,onClick:l=>{l.preventDefault(),n(e.id)},style:{paddingInlineStart:`${s}px`},className:h.cn("prose relative py-1.5 text-sm transition-colors wrap-anywhere first:pt-0 last:pb-0","text-muted-foreground hover:text-foreground dark:hover:text-foreground","data-[active=true]:text-primary","no-underline hover:no-underline"),"data-active":a,children:e.label})});hl.displayName="NormalTableOfContentsItem";function Hm(e){return e<=2?14:e===3?26:36}function lt(e){return e>=3?10:0}const vl=i.memo(({containerRef:e,activeIds:t,className:r,lastActiveIdRef:n,items:a})=>{const s=E.useRef(null),[l,c]=i.useState({top:0,height:0}),d=i.useCallback((u,f)=>{c({top:u,height:f})},[]),p=i.useCallback(()=>{if(!e.current){d(0,0);return}const u=e.current;if(u.clientHeight===0){d(0,0);return}let f=t;if(t.length===0&&n?.current&&(f=[n.current]),f.length===0){d(0,0);return}let m=Number.MAX_VALUE,b=0;for(const v of f){const x=u.querySelector(`a[href="#${v}"]`);if(!x)continue;const w=getComputedStyle(x),C=parseFloat(w.paddingTop),N=parseFloat(w.paddingBottom),y=x.offsetTop+C,k=x.offsetTop+x.clientHeight-N;m=Math.min(m,y),b=Math.max(b,k)}m===Number.MAX_VALUE?d(0,0):d(m,b-m)},[e,t,d,n]);return E.useEffect(()=>{if(!e.current)return;const u=e.current,f=new ResizeObserver(()=>{requestAnimationFrame(()=>{p()})});return f.observe(u),requestAnimationFrame(()=>{p()}),()=>{f.disconnect()}},[p]),E.useEffect(()=>{requestAnimationFrame(()=>{p()})},[t,p]),o.jsx("div",{ref:s,role:"none",className:h.cn("absolute w-full bg-primary transition-[top,height] ease-linear",r),style:{top:`${l.top}px`,height:`${l.height}px`}})});vl.displayName="CircuitThumb";const bl=i.memo(({items:e,activePathIds:t,visibleIds:r=[],lastActiveIdRef:n})=>{const a=E.useRef(null),[s,l]=E.useState();return E.useEffect(()=>{if(!a.current)return;const c=a.current;function d(){c.clientHeight===0||c.clientWidth===0||requestAnimationFrame(()=>{if(c.clientHeight===0||c.clientWidth===0)return;let f=0,m=0;const b=[];for(let v=0;v<e.length;v++){const x=c.querySelector(`a[href="#${e[v].id}"]`);if(!x)continue;const w=getComputedStyle(x),C=lt(e[v].level)+1,N=x.offsetTop+parseFloat(w.paddingTop),y=x.offsetTop+x.clientHeight-parseFloat(w.paddingBottom);f=Math.max(C,f),m=Math.max(m,y),b.push(`${v===0?"M":"L"}${C} ${N}`),b.push(`L${C} ${y}`)}l({path:b.join(" "),width:f+1,height:m})})}const p=new ResizeObserver(d),u=setTimeout(()=>{d()},50);return p.observe(c),()=>{clearTimeout(u),p.disconnect()}},[e]),o.jsxs(o.Fragment,{children:[s&&o.jsxs(o.Fragment,{children:[o.jsx("svg",{className:"absolute start-0 top-0 rtl:-scale-x-100 pointer-events-none",width:s.width,height:s.height,style:{zIndex:0,color:"color-mix(in oklch, var(--foreground) 15%, transparent)"},"aria-hidden":"true",children:o.jsx("path",{d:s.path,stroke:"currentColor",strokeWidth:"1",fill:"none",vectorEffect:"non-scaling-stroke"})}),o.jsx("div",{className:"absolute start-0 top-0 rtl:-scale-x-100",style:{width:s.width,height:s.height,maskImage:`url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s.width} ${s.height}"><path d="${s.path}" stroke="black" stroke-width="1" fill="none" /></svg>`)}")`,zIndex:1},children:o.jsx(vl,{containerRef:a,activeIds:r,lastActiveIdRef:n,items:e})})]}),o.jsx("div",{ref:a,className:"flex flex-col",children:e.map((c,d)=>{const p=n?.current,u=r.length>0?r.includes(c.id):p===c.id;return o.jsx(xl,{item:c,upper:e[d-1]?.level,lower:e[d+1]?.level,isVisible:u},c.id)})})]})});bl.displayName="CircuitTableOfContentsList";const xl=i.memo(({item:e,upper:t=e.level,lower:r=e.level,isVisible:n=!1})=>{const a=E.useContext($t),{onItemClick:s}=a,l=n,c=lt(e.level),d=lt(t),p=lt(r);return o.jsxs("a",{href:`#${e.id}`,onClick:u=>{u.preventDefault(),s(e.id)},style:{paddingInlineStart:Hm(e.level)},className:h.cn("prose relative py-1.5 text-sm transition-colors wrap-anywhere first:pt-0 last:pb-0","text-muted-foreground","hover:text-foreground dark:hover:text-foreground","data-[active=true]:text-primary","no-underline hover:no-underline"),"data-active":l,children:[c!==d&&o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",className:"absolute -top-1.5 start-0 size-4 rtl:-scale-x-100",children:o.jsx("line",{x1:d,y1:"0",x2:c,y2:"12",className:"stroke-foreground/10",strokeWidth:"1"})}),o.jsx("div",{className:h.cn("absolute inset-y-0 w-px",c!==d&&"top-1.5",c!==p&&"bottom-1.5"),style:{insetInlineStart:`${c}px`,backgroundColor:"color-mix(in oklch, var(--foreground) 15%, transparent)"}}),e.label]})});xl.displayName="CircuitTableOfContentsItem";const nt=4,Gm=4;function Bm(e){return e<=2?0:13}function Vm(e){return e<=2?15:e===3?27:39}function Wm(e,t){for(let r=0;r<e.length;r++){const n=e[r],a=e[r+1];if(t>=n.top&&t<=n.bottom)return n.offset;if(a&&t>n.bottom&&t<a.top){const s=(t-n.bottom)/(a.top-n.bottom);return n.offset+s*(a.offset-n.offset)}}return e[e.length-1]?.offset??1}const wl=i.memo(({containerRef:e,activeIds:t,items:r,className:n,onCircleYChange:a,lastActiveIdRef:s})=>{const l=E.useRef(null),[c,d]=i.useState({top:0,height:0,circleY:0}),p=i.useCallback((f,m,b)=>{d({top:f,height:m,circleY:b}),a?.(b)},[a]),u=i.useCallback(()=>{if(!e.current){p(0,0,0);return}const f=e.current;if(f.clientHeight===0){p(0,0,0);return}let m=t;if(t.length===0&&s?.current&&(m=[s.current]),m.length===0){p(0,0,0);return}let b=-1;for(let j=0;j<r.length;j++)m.includes(r[j].id)&&(b=j);if(b===-1){p(0,0,0);return}const v=f.querySelector(`a[href="#${r[b].id}"]`);if(!v){p(0,0,0);return}const x=getComputedStyle(v),w=parseFloat(x.paddingTop),C=parseFloat(x.paddingBottom),N=v.clientHeight-w-C,y=v.offsetTop+w+N/2,k=f.querySelector(`a[href="#${r[0]?.id}"]`);if(!k){p(0,y,y);return}const M=getComputedStyle(k),I=k.offsetTop+parseFloat(M.paddingTop),_=y-I;p(I,Math.max(0,_),y)},[e,t,r,p,s]);return E.useEffect(()=>{if(!e.current)return;const f=e.current,m=new ResizeObserver(()=>{requestAnimationFrame(()=>{u()})});return m.observe(f),requestAnimationFrame(()=>{u()}),()=>{m.disconnect()}},[u]),E.useEffect(()=>{requestAnimationFrame(()=>{u()})},[t,u]),o.jsx("div",{ref:l,role:"none",className:h.cn("absolute w-full bg-primary transition-[top,height] duration-150 ease-out",n),style:{top:`${c.top}px`,height:`${c.height}px`}})});wl.displayName="ClerkThumb";const Cl=i.memo(({circleX:e,circleY:t,opacity:r})=>o.jsx("div",{role:"none","aria-hidden":"true",className:"bg-primary pointer-events-none absolute size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full transition-[left,top,opacity] duration-150 ease-out",style:{left:`${e}px`,top:`${t}px`,opacity:r}}));Cl.displayName="ClerkThumbCircle";const yl=i.memo(({items:e,activePathIds:t,visibleIds:r=[],lastActiveIdRef:n})=>{const a=E.useRef(null),[s,l]=E.useState(),[c,d]=i.useState(0),[p,u]=i.useState(0),f=i.useMemo(()=>{const m=n?.current;let b=null;if(r.length>0){let w=-1;for(let C=0;C<e.length;C++)r.includes(e[C].id)&&(w=C);w>=0&&(b=e[w].id)}else m&&(b=m);if(!b)return new Set;const v=e.findIndex(w=>w.id===b);if(v===-1)return new Set;const x=new Set;for(let w=0;w<=v;w++)x.add(e[w].id);return x},[e,r,n]);return E.useEffect(()=>{if(!a.current)return;const m=a.current;function b(){m.clientHeight===0||m.clientWidth===0||requestAnimationFrame(()=>{if(m.clientHeight===0||m.clientWidth===0)return;let w=0,C=0;const N=[],y=[];for(let k=0;k<e.length;k++){const M=m.querySelector(`a[href="#${e[k].id}"]`);if(!M)continue;const I=getComputedStyle(M),_=Math.max(Gm,Bm(e[k].level)+1),j=M.offsetTop+parseFloat(I.paddingTop),R=parseFloat(I.paddingBottom),F=M.offsetTop+M.clientHeight-R;w=Math.max(_,w),C=Math.max(C,F),y.push({offset:_,top:j,bottom:F})}for(let k=0;k<y.length;k++){const M=y[k],I=y[k-1],_=y[k+1];if(k===0?N.push(`M${M.offset} ${M.top}`):I&&M.offset!==I.offset?N.push(`Q${M.offset} ${M.top},${M.offset} ${M.top+nt}`):N.push(`L${M.offset} ${M.top}`),_&&M.offset!==_.offset){const j=M.bottom;N.push(`L${M.offset} ${j-nt}`);const R=_.top,F=_.offset-M.offset,A=R-j,T=Math.sqrt(F*F+A*A),D=Math.min(nt/T,.5),$=M.offset+F*D,z=j+A*D;N.push(`Q${M.offset} ${j},${$} ${z}`);const V=1-Math.min(nt/T,.5),P=M.offset+F*V,W=j+A*V;N.push(`L${P} ${W}`)}else N.push(`L${M.offset} ${M.bottom}`)}l({path:N.join(" "),width:w+1,height:C,segments:y})})}const v=new ResizeObserver(b),x=setTimeout(()=>{b()},50);return v.observe(m),()=>{clearTimeout(x),v.disconnect()}},[e]),o.jsxs(o.Fragment,{children:[s&&o.jsxs(o.Fragment,{children:[o.jsx("svg",{className:"absolute start-0 top-0 rtl:-scale-x-100 pointer-events-none",width:s.width+3,height:s.height+3,style:{zIndex:0,color:"color-mix(in oklch, var(--foreground) 15%, transparent)"},"aria-hidden":"true",children:o.jsx("path",{d:s.path,stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round",fill:"none",vectorEffect:"non-scaling-stroke"})}),o.jsx("div",{className:"absolute start-0 top-0 rtl:-scale-x-100",style:{width:s.width,height:s.height,maskImage:`url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s.width} ${s.height}"><path d="${s.path}" stroke="black" stroke-width="2" stroke-linejoin="round" stroke-linecap="round" fill="none" /></svg>`)}")`,zIndex:1},children:o.jsx(wl,{containerRef:a,activeIds:r,items:e,lastActiveIdRef:n,onCircleYChange:m=>{d(m),u(m>0?1:0)}})})]}),s&&s.segments&&c>0&&o.jsx(Cl,{circleX:Wm(s.segments,c),circleY:c,opacity:p}),o.jsx("div",{ref:a,className:"flex flex-col",children:e.map((m,b)=>o.jsx(Sl,{item:m,upper:e[b-1]?.level,lower:e[b+1]?.level,isVisible:f.has(m.id)},m.id))})]})});yl.displayName="ClerkTableOfContentsList";const Sl=i.memo(({item:e,upper:t=e.level,lower:r=e.level,isVisible:n=!1})=>{const a=E.useContext($t),{onItemClick:s}=a,l=n;return o.jsx("a",{href:`#${e.id}`,onClick:c=>{c.preventDefault(),s(e.id)},style:{paddingInlineStart:Vm(e.level)},className:h.cn("prose relative py-1.5 text-sm transition-colors duration-150 ease-out wrap-anywhere first:pt-0 last:pb-0","text-muted-foreground","hover:text-foreground dark:hover:text-foreground","data-[active=true]:text-primary","no-underline hover:no-underline"),"data-active":l,children:e.label})});Sl.displayName="ClerkTableOfContentsItem";const Nl=i.forwardRef(({className:e,...t},r)=>o.jsxs("svg",{ref:r,viewBox:"395 246 250 235",xmlns:"http://www.w3.org/2000/svg",className:h.cn("size-6 shrink-0",e),style:{overflow:"visible"},...t,children:[o.jsx("path",{className:"fill-black dark:fill-white",d:"M469.108582,314.094421 C431.519775,349.843567 439.122101,411.045959 484.146210,435.450684 C502.171906,445.221313 521.469482,447.166870 541.256226,441.475830 C545.471863,440.263367 547.134644,441.030762 548.303101,445.304016 C550.528503,453.442261 555.354675,459.913788 562.493469,464.605347 C564.263489,465.768524 566.397522,466.517853 568.055725,469.091949 C556.050537,475.584198 543.065369,478.190948 529.968201,479.123474 C497.323944,481.447784 467.867676,472.398834 444.312469,449.414490 C403.608948,409.697510 395.680359,346.476105 436.406464,297.996155 C475.279724,251.721817 544.115112,246.477859 590.704956,285.444122 C635.379639,322.808655 638.261658,382.546051 618.338745,418.410095 C616.854187,418.492645 616.366394,417.300507 615.859192,416.307098 C611.268799,407.316498 603.882874,401.705200 594.392517,398.821960 C590.888611,397.757385 590.128479,396.392303 591.394226,392.723419 C606.954346,347.621429 575.207275,299.471710 527.504639,295.046631 C506.985657,293.143188 489.039612,298.583160 473.064606,311.288971 C471.893860,312.220123 470.618286,313.019470 469.108582,314.094421z"}),o.jsx("path",{className:"fill-black dark:fill-white",d:"M593.982666,457.325623 C583.754761,460.901459 574.313049,460.242737 566.486389,453.005005 C559.045959,446.124390 556.946228,437.069031 559.390625,427.326324 C562.109497,416.489594 571.553589,409.327942 582.816895,408.892883 C593.566772,408.477661 603.659607,415.546509 607.333923,426.064240 C610.974915,436.486603 607.240601,448.385864 598.225220,454.921265 C597.019531,455.795288 595.650269,456.443542 593.982666,457.325623z"}),o.jsx("path",{className:"fill-black dark:fill-white",d:"M533.232910,400.182800 C530.269165,386.997559 541.695129,380.218018 550.155518,382.393341 C556.898743,384.127197 561.092590,389.064728 561.182373,395.883392 C561.275269,402.941345 557.406433,408.373291 551.013428,410.160553 C544.327759,412.029602 537.778931,409.345886 534.479309,403.338959 C534.004517,402.474640 533.726135,401.502411 533.232910,400.182800z"}),o.jsx("path",{className:"fill-black dark:fill-white",d:"M524.728027,358.949982 C531.395996,362.535034 533.603821,367.287964 531.735352,373.342438 C530.086304,378.685913 525.263184,381.813538 519.457153,381.304413 C514.137268,380.837952 509.808044,376.555115 508.974762,370.934296 C507.736542,362.582214 514.438599,357.313141 524.728027,358.949982z"})]}));Nl.displayName="NquiLogo";function Km({className:e,...t}){return o.jsx(kd,{"data-slot":"accordion",className:h.cn("overflow-hidden rounded-md border flex w-full flex-col",e),...t})}function qm({className:e,...t}){return o.jsx(Rd,{"data-slot":"accordion-item",className:h.cn("data-open:bg-muted/50 not-last:border-b",e),...t})}function Um({className:e,children:t,...r}){return o.jsx(Ed,{className:"flex",children:o.jsxs(jd,{"data-slot":"accordion-trigger",className:h.cn("**:data-[slot=accordion-trigger-icon]:text-muted-foreground gap-6 p-2 text-left text-xs font-medium hover:underline **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 group/accordion-trigger relative flex flex-1 items-start justify-between border border-transparent transition-all outline-none disabled:pointer-events-none disabled:opacity-50",e),...r,children:[t,o.jsx(U.HugeiconsIcon,{icon:Y.ArrowDown01Icon,strokeWidth:2,"data-slot":"accordion-trigger-icon",className:"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"}),o.jsx(U.HugeiconsIcon,{icon:Y.ArrowUp01Icon,strokeWidth:2,"data-slot":"accordion-trigger-icon",className:"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"})]})})}function Ym({className:e,children:t,...r}){return o.jsx(Id,{"data-slot":"accordion-content",className:"data-open:animate-accordion-down data-closed:animate-accordion-up px-2 text-xs overflow-hidden",...r,children:o.jsx("div",{className:h.cn("pt-0 pb-4 [&_a]:hover:text-foreground h-(--radix-accordion-content-height) [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4",e),children:t})})}const Xm=oe.cva("grid gap-0.5 rounded-lg border px-2 py-1.5 text-left text-xs has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-1.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-3.5 w-full relative group/alert",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function Zm({className:e,variant:t,...r}){return o.jsx("div",{"data-slot":"alert",role:"alert",className:h.cn(Xm({variant:t}),e),...r})}function Qm({className:e,...t}){return o.jsx("div",{"data-slot":"alert-title",className:h.cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",e),...t})}function Jm({className:e,...t}){return o.jsx("div",{"data-slot":"alert-description",className:h.cn("text-muted-foreground text-xs text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",e),...t})}function eg({className:e,...t}){return o.jsx("div",{"data-slot":"alert-action",className:h.cn("absolute top-1.5 right-2",e),...t})}function tg({...e}){return o.jsx(Fd,{"data-slot":"alert-dialog",...e})}function rg({...e}){return o.jsx(Hd,{"data-slot":"alert-dialog-trigger",...e})}function og({...e}){return o.jsx(Gd,{"data-slot":"alert-dialog-portal",...e})}function ng({className:e,...t}){return o.jsx(Bd,{"data-slot":"alert-dialog-overlay",className:h.cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-[var(--z-modal-backdrop)]",e),...t})}function ag({className:e,size:t="default",...r}){return o.jsxs(og,{children:[o.jsx(ng,{}),o.jsx(Vd,{"data-slot":"alert-dialog-content","data-size":t,className:h.cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 gap-3 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 left-1/2 z-[var(--z-modal)] grid w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...r})]})}function sg({className:e,...t}){return o.jsx("div",{"data-slot":"alert-dialog-header",className:h.cn("grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t})}function ig({className:e,...t}){return o.jsx("div",{"data-slot":"alert-dialog-footer",className:h.cn("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t})}function lg({className:e,...t}){return o.jsx(qd,{"data-slot":"alert-dialog-title",className:h.cn("text-sm font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t})}function cg({className:e,...t}){return o.jsx(Ud,{"data-slot":"alert-dialog-description",className:h.cn("text-muted-foreground *:[a]:hover:text-foreground text-xs text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3",e),...t})}function dg({className:e,variant:t="default",size:r="default",...n}){return o.jsx(re.Button,{variant:t,size:r,asChild:!0,children:o.jsx(Wd,{"data-slot":"alert-dialog-action",className:h.cn(e),...n})})}function ug({className:e,variant:t="outline",size:r="default",...n}){return o.jsx(re.Button,{variant:t,size:r,asChild:!0,children:o.jsx(Kd,{"data-slot":"alert-dialog-cancel",className:h.cn(e),...n})})}function pg({...e}){return o.jsx(Xd,{"data-slot":"aspect-ratio",...e})}function fg(e,t=[]){let r=[];function n(s,l){const c=i.createContext(l);c.displayName=s+"Context";const d=r.length;r=[...r,l];const p=f=>{const{scope:m,children:b,...v}=f,x=m?.[e]?.[d]||c,w=i.useMemo(()=>v,Object.values(v));return o.jsx(x.Provider,{value:w,children:b})};p.displayName=s+"Provider";function u(f,m){const b=m?.[e]?.[d]||c,v=i.useContext(b);if(v)return v;if(l!==void 0)return l;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[p,u]}const a=()=>{const s=r.map(l=>i.createContext(l));return function(c){const d=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return a.scopeName=e,[n,mg(a,...t)]}function mg(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const l=n.reduce((c,{useScope:d,scopeName:p})=>{const f=d(s)[`__scope${p}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}var yo="Avatar",[gg]=fg(yo),[hg,Ml]=gg(yo),kl=i.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[a,s]=i.useState("idle");return o.jsx(hg,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:s,children:o.jsx(S.Primitive.span,{...n,ref:t})})});kl.displayName=yo;var Rl="AvatarImage",El=i.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:a=()=>{},...s}=e,l=Ml(Rl,r),c=vg(n,s),d=g.useCallbackRef(p=>{a(p),l.onImageLoadingStatusChange(p)});return g.useLayoutEffect2(()=>{c!=="idle"&&d(c)},[c,d]),c==="loaded"?o.jsx(S.Primitive.img,{...s,ref:t,src:n}):null});El.displayName=Rl;var jl="AvatarFallback",Il=i.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...a}=e,s=Ml(jl,r),[l,c]=i.useState(n===void 0);return i.useEffect(()=>{if(n!==void 0){const d=window.setTimeout(()=>c(!0),n);return()=>window.clearTimeout(d)}},[n]),l&&s.imageLoadingStatus!=="loaded"?o.jsx(S.Primitive.span,{...a,ref:t}):null});Il.displayName=jl;function Yo(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function vg(e,{referrerPolicy:t,crossOrigin:r}){const n=tu(),a=i.useRef(null),s=n?(a.current||(a.current=new window.Image),a.current):null,[l,c]=i.useState(()=>Yo(s,e));return g.useLayoutEffect2(()=>{c(Yo(s,e))},[s,e]),g.useLayoutEffect2(()=>{const d=f=>()=>{c(f)};if(!s)return;const p=d("loaded"),u=d("error");return s.addEventListener("load",p),s.addEventListener("error",u),t&&(s.referrerPolicy=t),typeof r=="string"&&(s.crossOrigin=r),()=>{s.removeEventListener("load",p),s.removeEventListener("error",u)}},[s,r,t]),l}var Tl=kl,_l=El,Pl=Il;const Al=i.forwardRef(({className:e,...t},r)=>o.jsx(Tl,{ref:r,className:h.cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Al.displayName=Tl.displayName;const Dl=i.forwardRef(({className:e,...t},r)=>o.jsx(_l,{ref:r,className:h.cn("aspect-square h-full w-full",e),...t}));Dl.displayName=_l.displayName;const Ol=i.forwardRef(({className:e,...t},r)=>o.jsx(Pl,{ref:r,className:h.cn("flex h-full w-full items-center justify-center rounded-full bg-muted border border-border",e),...t}));Ol.displayName=Pl.displayName;const Ll=i.forwardRef(({...e},t)=>o.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Ll.displayName="Breadcrumb";const $l=i.forwardRef(({className:e,...t},r)=>o.jsx("ol",{ref:r,className:h.cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));$l.displayName="BreadcrumbList";const zl=i.forwardRef(({className:e,...t},r)=>o.jsx("li",{ref:r,className:h.cn("inline-flex items-center gap-1.5",e),...t}));zl.displayName="BreadcrumbItem";const Fl=i.forwardRef(({asChild:e,className:t,...r},n)=>{const a=e?be.Slot:"a";return o.jsx(a,{ref:n,className:h.cn("transition-colors hover:text-foreground",t),...r})});Fl.displayName="BreadcrumbLink";const Hl=i.forwardRef(({className:e,...t},r)=>o.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:h.cn("font-normal text-foreground",e),...t}));Hl.displayName="BreadcrumbPage";const Gl=({children:e,className:t,...r})=>o.jsx("li",{role:"presentation","aria-hidden":"true",className:h.cn("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...r,children:e??o.jsx(U.HugeiconsIcon,{icon:Y.ArrowRight01Icon,size:14})});Gl.displayName="BreadcrumbSeparator";const Bl=({className:e,...t})=>o.jsxs("span",{role:"presentation","aria-hidden":"true",className:h.cn("flex h-9 w-9 items-center justify-center",e),...t,children:[o.jsx(U.HugeiconsIcon,{icon:Y.MoreHorizontalIcon,size:16,className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"More"})]});Bl.displayName="BreadcrumbElipssis";var bg="Separator",Xo="horizontal",xg=["horizontal","vertical"],Vl=i.forwardRef((e,t)=>{const{decorative:r,orientation:n=Xo,...a}=e,s=wg(n)?n:Xo,c=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return o.jsx(S.Primitive.div,{"data-orientation":s,...c,...a,ref:t})});Vl.displayName=bg;function wg(e){return xg.includes(e)}var Wl=Vl;const De=i.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,variant:n="default",textContent:a,...s},l)=>{const c=n==="arrow-down"||n==="tab-down"||n==="stopper"||n==="dot"||n==="text-decoration"||n==="shiny-corner"||n==="shiny-edge",d=h.cn("shrink-0 relative",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]"),p=i.useMemo(()=>{if(c)return n==="text-decoration"?"separator-text-decoration":n==="shiny-corner"?h.cn("separator-shiny-corner",t==="vertical"&&"w-[2px] h-full"):n==="shiny-edge"?h.cn("separator-shiny-edge",t==="vertical"&&"w-[1px] h-full"):h.cn("bg-transparent","separator-transparent",n==="arrow-down"&&"separator-arrow-down",n==="tab-down"&&"separator-tab-down",n==="stopper"&&"separator-stopper",n==="dot"&&"separator-dot");switch(n){case"default":return h.cn("bg-border",t==="horizontal"?"bg-gradient-to-r from-transparent via-border to-transparent":"bg-gradient-to-b from-transparent via-border to-transparent");case"solid":return"bg-border";case"shadow-outset":return h.cn("bg-border","shadow-[0_1px_3px_color-mix(in_oklch,var(--foreground)_8%,transparent)]");case"shadow-inset":return h.cn("bg-border",t==="horizontal"?"shadow-[inset_0_1px_2px_color-mix(in_oklch,var(--foreground)_10%,transparent)]":"shadow-[inset_1px_0_2px_color-mix(in_oklch,var(--foreground)_10%,transparent)]");case"dotted":return h.cn("bg-transparent border-0",t==="horizontal"?"border-t border-dotted border-border":"border-l border-dotted border-border");case"dashed":return h.cn("bg-transparent border-0",t==="horizontal"?"border-t border-dashed border-border":"border-l border-dashed border-border");case"glow":return h.cn("bg-border","shadow-[0_0_8px_color-mix(in_oklch,var(--primary)_20%,transparent)]");case"thick":return h.cn("bg-border",t==="horizontal"?"h-[2px]":"w-[2px]");case"gradient":return h.cn(t==="horizontal"?"bg-gradient-to-r from-primary via-accent to-primary":"bg-gradient-to-b from-primary via-accent to-primary");case"double":return h.cn("bg-transparent border-0",t==="horizontal"?"border-t-2 border-border relative after:content-[''] after:absolute after:top-1 after:left-0 after:w-full after:h-[1px] after:bg-border":"border-l-2 border-border relative after:content-[''] after:absolute after:left-1 after:top-0 after:h-full after:w-[1px] after:bg-border");case"fade-strong":return h.cn("bg-border",t==="horizontal"?"bg-gradient-to-r from-transparent via-border via-border to-transparent":"bg-gradient-to-b from-transparent via-border via-border to-transparent","opacity-60");default:return"bg-border"}},[n,t,c]),u=i.useMemo(()=>{if(n==="text-decoration"&&a)return{"--separator-text-content":`"${a}"`}},[n,a]);return o.jsx(Wl,{ref:l,decorative:r,orientation:t,className:h.cn(d,p,e),style:u,...s})});De.displayName=Wl.displayName;const Kl=oe.cva("inline-flex w-fit items-stretch overflow-hidden rounded-full border border-input bg-background [--toggle-inner-radius:9999px] [&>*]:border-0 [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-full [&>button]:!font-normal [&>a]:!font-normal [&>button[aria-current='true']]:!font-bold [&>button[aria-pressed='true']]:!font-bold [&>button[data-active]]:!font-bold [&>a[aria-current='true']]:!font-bold [&>a[aria-pressed='true']]:!font-bold [&>a[data-active]]:!font-bold [&>[data-slot=select-trigger]]:!font-normal [&>button[data-variant=outline]]:!bg-transparent [&>button[data-variant=outline]]:hover:!bg-accent [&>button[data-variant=outline]]:hover:!text-accent-foreground [&>a[data-variant=outline]]:!bg-transparent [&>a[data-variant=outline]]:hover:!bg-accent [&>a[data-variant=outline]]:hover:!text-accent-foreground [&>button[data-variant=ghost]]:!bg-transparent [&>button[data-variant=ghost]]:hover:!bg-accent [&>button[data-variant=ghost]]:hover:!text-accent-foreground [&>a[data-variant=ghost]]:!bg-transparent [&>a[data-variant=ghost]]:hover:!bg-accent [&>a[data-variant=ghost]]:hover:!text-accent-foreground [&>button[aria-pressed='true']]:!bg-secondary [&>button[aria-pressed='true']]:!text-secondary-foreground [&>button[aria-pressed='true']]:hover:!bg-secondary/90 [&>button[aria-current='true']]:!bg-secondary [&>button[aria-current='true']]:!text-secondary-foreground [&>button[aria-current='true']]:hover:!bg-secondary/90 [&>button[data-active]]:!bg-secondary [&>button[data-active]]:!text-secondary-foreground [&>button[data-active]]:hover:!bg-secondary/90 [&>a[aria-pressed='true']]:!bg-secondary [&>a[aria-pressed='true']]:!text-secondary-foreground [&>a[aria-current='true']]:!bg-secondary [&>a[aria-current='true']]:!text-secondary-foreground [&>a[aria-current='true']]:hover:!bg-secondary/90 [&>a[data-active]]:!bg-secondary [&>a[data-active]]:!text-secondary-foreground [&>a[data-active]]:hover:!bg-secondary/90",{variants:{orientation:{horizontal:"flex-row [&>*:first-child]:!rounded-l-full [&>*:first-child]:!rounded-r-none [&>*:last-child]:!rounded-r-full [&>*:last-child]:!rounded-l-none [&>*:not(:first-child):not(:last-child)]:!rounded-none",vertical:"flex-col [&>*:first-child]:!rounded-t-full [&>*:first-child]:!rounded-b-none [&>*:last-child]:!rounded-b-full [&>*:last-child]:!rounded-t-none [&>*:not(:first-child):not(:last-child)]:!rounded-none"}},defaultVariants:{orientation:"horizontal"}});function Cg({className:e,orientation:t,...r}){return o.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:h.cn(Kl({orientation:t}),e),...r})}function yg({className:e,asChild:t=!1,...r}){const n=t?ir.Root:"div";return o.jsx(n,{className:h.cn("shrink-0 border-0 bg-transparent px-2.5 text-xs font-medium text-muted-foreground flex items-center gap-2 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",e),...r})}function Sg({className:e,orientation:t="vertical",...r}){return o.jsx(De,{"data-slot":"button-group-separator",variant:"solid",orientation:t,className:h.cn("relative min-h-px min-w-px shrink-0 self-stretch bg-border",e),...r})}function ql({blur:e=16,borderRadius:t=0,className:r}){const a=`frostyGlassMask-${i.useId().replace(/:/g,"-")}`,s=t>0;return o.jsxs(o.Fragment,{children:[s&&o.jsx("svg",{className:"absolute inset-0 pointer-events-none",width:"100%",height:"100%",preserveAspectRatio:"none","aria-hidden":"true",children:o.jsx("mask",{id:a,children:o.jsx("rect",{width:"100%",height:"100%",fill:"white",rx:t,ry:t})})}),o.jsx("div",{className:h.cn("absolute inset-0 pointer-events-none","h-[200%]","bg-background/3",r),style:{"--blur":`${e}px`,backdropFilter:`blur(${e}px)`,WebkitBackdropFilter:`blur(${e}px)`,maskImage:s?`url(#${a})`:"linear-gradient(to bottom, black 0% 50%, transparent 50% 100%)",WebkitMaskImage:s?`url(#${a})`:"linear-gradient(to bottom, black 0% 50%, transparent 50% 100%)"}})]})}const So=i.createContext({stickyHeader:!1}),Ul=i.forwardRef(({className:e,stickyHeader:t=!1,...r},n)=>o.jsx(So.Provider,{value:{stickyHeader:t},children:o.jsx("div",{ref:n,className:h.cn("nqui-card relative min-w-0 overflow-visible rounded-lg bg-card text-card-foreground",t&&"flex flex-col",e),...r})}));Ul.displayName="Card";const Yl=i.forwardRef(({className:e,children:t,...r},n)=>{const{stickyHeader:a}=i.useContext(So);return o.jsx("div",{ref:n,className:h.cn("flex min-w-0 flex-col space-y-1.5 p-6",a&&"relative sticky top-0 z-[var(--z-sticky-content)] flex-shrink-0 rounded-t-lg",e),...r,children:a?o.jsxs(o.Fragment,{children:[o.jsx(ql,{blur:16,borderRadius:8,className:"z-[var(--z-background)]"}),o.jsx("div",{className:"relative z-[var(--z-content)]",children:t})]}):t})});Yl.displayName="CardHeader";const Xl=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:h.cn("text-2xl font-semibold leading-none tracking-tight",e),...t}));Xl.displayName="CardTitle";const Zl=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:h.cn("text-sm text-muted-foreground",e),...t}));Zl.displayName="CardDescription";const Ql=i.forwardRef(({className:e,children:t,...r},n)=>{const{stickyHeader:a}=i.useContext(So);return a?o.jsx(At,{className:h.cn("min-h-0 w-full min-w-0 flex-1",e),children:o.jsx("div",{ref:n,className:"min-w-0 p-6 pt-0",...r,children:t})}):o.jsx("div",{ref:n,className:h.cn("min-w-0 p-6 pt-0",e),...r,children:t})});Ql.displayName="CardContent";const Jl=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:h.cn("flex min-w-0 items-center p-6 pt-0",e),...t}));Jl.displayName="CardFooter";function Ng({...e}){return o.jsx(Yu,{"data-slot":"context-menu",...e})}function Mg({className:e,...t}){return o.jsx(Xu,{"data-slot":"context-menu-trigger",className:h.cn("select-none",e),...t})}function kg({...e}){return o.jsx(Qu,{"data-slot":"context-menu-group",...e})}function Rg({...e}){return o.jsx(Na,{"data-slot":"context-menu-portal",...e})}function Eg({...e}){return o.jsx(ap,{"data-slot":"context-menu-sub",...e})}function jg({...e}){return o.jsx(rp,{"data-slot":"context-menu-radio-group",...e})}function Ig({className:e,...t}){return o.jsx(Na,{children:o.jsx(Zu,{"data-slot":"context-menu-content",className:h.cn(g.floatingSurface,"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-32 p-1 duration-100 z-[var(--z-popover)] max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto",e),...t})})}function Tg({className:e,inset:t,variant:r="default",...n}){return o.jsx(ep,{"data-slot":"context-menu-item","data-inset":t,"data-variant":r,className:h.cn(g.floatingListItemInteractive,"data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 px-2 py-1 text-xs [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex cursor-default select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n})}function _g({className:e,inset:t,children:r,...n}){return o.jsxs(sp,{"data-slot":"context-menu-sub-trigger","data-inset":t,className:h.cn(g.floatingListItemInteractive,"data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 px-2 py-1 text-xs [&_svg:not([class*='size-'])]:size-3.5 flex cursor-default select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n,children:[r,o.jsx(U.HugeiconsIcon,{icon:Y.ArrowRight01Icon,strokeWidth:2,className:"ml-auto"})]})}function Pg({className:e,...t}){return o.jsx(ip,{"data-slot":"context-menu-sub-content",className:h.cn(g.floatingSurface,"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-32 p-1 duration-100 z-[var(--z-popover)] origin-(--radix-context-menu-content-transform-origin) overflow-hidden",e),...t})}function Ag({className:e,children:t,checked:r,...n}){return o.jsxs(tp,{"data-slot":"context-menu-checkbox-item",className:h.cn(g.floatingListItemInteractive,"focus:**:text-accent-foreground min-h-7 gap-2 py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-default select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),checked:r,...n,children:[o.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none",children:o.jsx(Ma,{children:o.jsx(U.HugeiconsIcon,{icon:Y.Tick02Icon,strokeWidth:2})})}),t]})}function Dg({className:e,children:t,...r}){return o.jsxs(op,{"data-slot":"context-menu-radio-item",className:h.cn(g.floatingListItemInteractive,"focus:**:text-accent-foreground min-h-7 gap-2 py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-default select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[o.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none",children:o.jsx(Ma,{children:o.jsx(U.HugeiconsIcon,{icon:Y.Tick02Icon,strokeWidth:2})})}),t]})}function Og({className:e,inset:t,...r}){return o.jsx(Ju,{"data-slot":"context-menu-label","data-inset":t,className:h.cn("text-muted-foreground px-2 py-1.5 text-xs data-[inset]:pl-8",e),...r})}function Lg({className:e,...t}){return o.jsx(np,{"data-slot":"context-menu-separator",className:h.cn("bg-border/50 -mx-1 my-1 h-px",e),...t})}function $g({className:e,...t}){return o.jsx("span",{"data-slot":"context-menu-shortcut",className:h.cn("text-muted-foreground group-focus/context-menu-item:text-accent-foreground ml-auto text-[0.625rem] tracking-widest",e),...t})}function zg({className:e,...t}){return o.jsx("div",{"data-slot":"empty",className:h.cn("gap-4 rounded-xl border-dashed p-6 flex w-full min-w-0 flex-1 flex-col items-center justify-center text-center text-balance",e),...t})}function Fg({className:e,...t}){return o.jsx("div",{"data-slot":"empty-header",className:h.cn("gap-1 flex max-w-sm flex-col items-center",e),...t})}const Hg=oe.cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"bg-muted text-foreground flex size-8 shrink-0 items-center justify-center rounded-md [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});function Gg({className:e,variant:t="default",...r}){return o.jsx("div",{"data-slot":"empty-icon","data-variant":t,className:h.cn(Hg({variant:t,className:e})),...r})}function Bg({className:e,...t}){return o.jsx("div",{"data-slot":"empty-title",className:h.cn("text-sm font-medium tracking-tight",e),...t})}function Vg({className:e,...t}){return o.jsx("div",{"data-slot":"empty-description",className:h.cn("text-xs text-muted-foreground [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",e),...t})}function Wg({className:e,...t}){return o.jsx("div",{"data-slot":"empty-content",className:h.cn("gap-2 text-xs flex w-full max-w-sm min-w-0 flex-col items-center text-balance",e),...t})}function Kg({className:e,...t}){return o.jsx("fieldset",{"data-slot":"field-set",className:h.cn("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",e),...t})}function qg({className:e,variant:t="legend",...r}){return o.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:h.cn("mb-2 font-medium data-[variant=label]:text-xs data-[variant=legend]:text-sm",e),...r})}function Ug({className:e,...t}){return o.jsx("div",{"data-slot":"field-group",className:h.cn("gap-4 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4 group/field-group @container/field-group flex w-full flex-col",e),...t})}const Yg=oe.cva("data-[invalid=true]:text-destructive gap-2 group/field flex w-full",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function Xg({className:e,orientation:t="vertical",...r}){return o.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:h.cn(Yg({orientation:t}),e),...r})}function Zg({className:e,...t}){return o.jsx("div",{"data-slot":"field-content",className:h.cn("gap-0.5 group/field-content flex flex-1 flex-col leading-snug",e),...t})}function Qg({className:e,...t}){return o.jsx(S.Label,{"data-slot":"field-label",className:h.cn("has-data-checked:bg-primary/5 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...t})}function Jg({className:e,...t}){return o.jsx("div",{"data-slot":"field-label",className:h.cn("gap-2 text-xs font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug",e),...t})}function eh({className:e,...t}){return o.jsx("p",{"data-slot":"field-description",className:h.cn("text-muted-foreground text-left text-xs [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",e),...t})}function th({children:e,className:t,...r}){return o.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:h.cn("-my-2 h-5 text-xs group-data-[variant=outline]/field-group:-mb-2 relative",t),...r,children:[o.jsx(De,{className:"absolute inset-0 top-1/2"}),e&&o.jsx("span",{className:"text-muted-foreground px-2 bg-background relative mx-auto block w-fit","data-slot":"field-separator-content",children:e})]})}function rh({className:e,children:t,errors:r,...n}){const a=E.useMemo(()=>{if(t)return t;if(!r?.length)return null;const s=[...new Map(r.map(l=>[l?.message,l])).values()];return s?.length==1?s[0]?.message:o.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:s.map((l,c)=>l?.message&&o.jsx("li",{children:l.message},c))})},[t,r]);return a?o.jsx("div",{role:"alert","data-slot":"field-error",className:h.cn("text-destructive text-xs font-normal",e),...n,children:a}):null}function oh({...e}){return o.jsx(Dp,{"data-slot":"hover-card",...e})}function nh({...e}){return o.jsx(Op,{"data-slot":"hover-card-trigger",...e})}function ah({className:e,align:t="center",sideOffset:r=4,...n}){return o.jsx(Lp,{"data-slot":"hover-card-portal",children:o.jsx($p,{"data-slot":"hover-card-content",align:t,sideOffset:r,className:h.cn(g.floatingSurface,"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 w-72 p-2.5 text-xs duration-100 z-[var(--z-popover)] origin-(--radix-hover-card-content-transform-origin) outline-hidden",e),...n})})}var sh=Object.defineProperty,ih=Object.defineProperties,lh=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,ec=Object.prototype.hasOwnProperty,tc=Object.prototype.propertyIsEnumerable,Zo=(e,t,r)=>t in e?sh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ch=(e,t)=>{for(var r in t||(t={}))ec.call(t,r)&&Zo(e,r,t[r]);if(wt)for(var r of wt(t))tc.call(t,r)&&Zo(e,r,t[r]);return e},dh=(e,t)=>ih(e,lh(t)),uh=(e,t)=>{var r={};for(var n in e)ec.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wt)for(var n of wt(e))t.indexOf(n)<0&&tc.call(e,n)&&(r[n]=e[n]);return r};function ph(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function fh(e){let t=i.useRef();return i.useEffect(()=>{t.current=e}),t.current}var mh=18,rc=40,gh=`${rc}px`,hh=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function vh({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[a,s]=i.useState(!1),[l,c]=i.useState(!1),[d,p]=i.useState(!1),u=i.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&a&&l,[a,l,r]),f=i.useCallback(()=>{let m=e.current,b=t.current;if(!m||!b||d||r==="none")return;let v=m,x=v.getBoundingClientRect().left+v.offsetWidth,w=v.getBoundingClientRect().top+v.offsetHeight/2,C=x-mh,N=w;document.querySelectorAll(hh).length===0&&document.elementFromPoint(C,N)===m||(s(!0),p(!0))},[e,t,d,r]);return i.useEffect(()=>{let m=e.current;if(!m||r==="none")return;function b(){let x=window.innerWidth-m.getBoundingClientRect().right;c(x>=rc)}b();let v=setInterval(b,1e3);return()=>{clearInterval(v)}},[e,r]),i.useEffect(()=>{let m=n||document.activeElement===t.current;if(r==="none"||!m)return;let b=setTimeout(f,0),v=setTimeout(f,2e3),x=setTimeout(f,5e3),w=setTimeout(()=>{p(!0)},6e3);return()=>{clearTimeout(b),clearTimeout(v),clearTimeout(x),clearTimeout(w)}},[t,n,r,f]),{hasPWMBadge:a,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:gh}}var oc=i.createContext({}),nc=i.forwardRef((e,t)=>{var r=e,{value:n,onChange:a,maxLength:s,textAlign:l="left",pattern:c,placeholder:d,inputMode:p="numeric",onComplete:u,pushPasswordManagerStrategy:f="increase-width",pasteTransformer:m,containerClassName:b,noScriptCSSFallback:v=bh,render:x,children:w}=r,C=uh(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),N,y,k,M,I;let[_,j]=i.useState(typeof C.defaultValue=="string"?C.defaultValue:""),R=n??_,F=fh(R),A=i.useCallback(G=>{a?.(G),j(G)},[a]),T=i.useMemo(()=>c?typeof c=="string"?new RegExp(c):c:null,[c]),D=i.useRef(null),$=i.useRef(null),z=i.useRef({value:R,onChange:A,isIOS:typeof window<"u"&&((y=(N=window?.CSS)==null?void 0:N.supports)==null?void 0:y.call(N,"-webkit-touch-callout","none"))}),V=i.useRef({prev:[(k=D.current)==null?void 0:k.selectionStart,(M=D.current)==null?void 0:M.selectionEnd,(I=D.current)==null?void 0:I.selectionDirection]});i.useImperativeHandle(t,()=>D.current,[]),i.useEffect(()=>{let G=D.current,B=$.current;if(!G||!B)return;z.current.value!==G.value&&z.current.onChange(G.value),V.current.prev=[G.selectionStart,G.selectionEnd,G.selectionDirection];function ie(){if(document.activeElement!==G){X(null),Q(null);return}let ee=G.selectionStart,le=G.selectionEnd,tt=G.selectionDirection,me=G.maxLength,je=G.value,Ce=V.current.prev,Se=-1,Ne=-1,Ie;if(je.length!==0&&ee!==null&&le!==null){let td=ee===le,rd=ee===je.length&&je.length<me;if(td&&!rd){let Te=ee;if(Te===0)Se=0,Ne=1,Ie="forward";else if(Te===me)Se=Te-1,Ne=Te,Ie="backward";else if(me>1&&je.length>1){let Ht=0;if(Ce[0]!==null&&Ce[1]!==null){Ie=Te<Ce[1]?"backward":"forward";let od=Ce[0]===Ce[1]&&Ce[0]<me;Ie==="backward"&&!od&&(Ht=-1)}Se=Ht+Te,Ne=Ht+Te+1}}Se!==-1&&Ne!==-1&&Se!==Ne&&D.current.setSelectionRange(Se,Ne,Ie)}let jo=Se!==-1?Se:ee,Io=Ne!==-1?Ne:le,ed=Ie??tt;X(jo),Q(Io),V.current.prev=[jo,Io,ed]}if(document.addEventListener("selectionchange",ie,{capture:!0}),ie(),document.activeElement===G&&K(!0),!document.getElementById("input-otp-style")){let ee=document.createElement("style");if(ee.id="input-otp-style",document.head.appendChild(ee),ee.sheet){let le="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Ge(ee.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Ge(ee.sheet,`[data-input-otp]:autofill { ${le} }`),Ge(ee.sheet,`[data-input-otp]:-webkit-autofill { ${le} }`),Ge(ee.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Ge(ee.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ce=()=>{B&&B.style.setProperty("--root-height",`${G.clientHeight}px`)};ce();let de=new ResizeObserver(ce);return de.observe(G),()=>{document.removeEventListener("selectionchange",ie,{capture:!0}),de.disconnect()}},[]);let[P,W]=i.useState(!1),[L,K]=i.useState(!1),[q,X]=i.useState(null),[H,Q]=i.useState(null);i.useEffect(()=>{ph(()=>{var G,B,ie,ce;(G=D.current)==null||G.dispatchEvent(new Event("input"));let de=(B=D.current)==null?void 0:B.selectionStart,ee=(ie=D.current)==null?void 0:ie.selectionEnd,le=(ce=D.current)==null?void 0:ce.selectionDirection;de!==null&&ee!==null&&(X(de),Q(ee),V.current.prev=[de,ee,le])})},[R,L]),i.useEffect(()=>{F!==void 0&&R!==F&&F.length<s&&R.length===s&&u?.(R)},[s,u,F,R]);let Z=vh({containerRef:$,inputRef:D,pushPasswordManagerStrategy:f,isFocused:L}),te=i.useCallback(G=>{let B=G.currentTarget.value.slice(0,s);if(B.length>0&&T&&!T.test(B)){G.preventDefault();return}typeof F=="string"&&B.length<F.length&&document.dispatchEvent(new Event("selectionchange")),A(B)},[s,A,F,T]),J=i.useCallback(()=>{var G;if(D.current){let B=Math.min(D.current.value.length,s-1),ie=D.current.value.length;(G=D.current)==null||G.setSelectionRange(B,ie),X(B),Q(ie)}K(!0)},[s]),ve=i.useCallback(G=>{var B,ie;let ce=D.current;if(!m&&(!z.current.isIOS||!G.clipboardData||!ce))return;let de=G.clipboardData.getData("text/plain"),ee=m?m(de):de;G.preventDefault();let le=(B=D.current)==null?void 0:B.selectionStart,tt=(ie=D.current)==null?void 0:ie.selectionEnd,me=(le!==tt?R.slice(0,le)+ee+R.slice(tt):R.slice(0,le)+ee+R.slice(le)).slice(0,s);if(me.length>0&&T&&!T.test(me))return;ce.value=me,A(me);let je=Math.min(me.length,s-1),Ce=me.length;ce.setSelectionRange(je,Ce),X(je),Q(Ce)},[s,A,T,R]),Zc=i.useMemo(()=>({position:"relative",cursor:C.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[C.disabled]),Eo=i.useMemo(()=>({position:"absolute",inset:0,width:Z.willPushPWMBadge?`calc(100% + ${Z.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:Z.willPushPWMBadge?`inset(0 ${Z.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:l,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[Z.PWM_BADGE_SPACE_WIDTH,Z.willPushPWMBadge,l]),Qc=i.useMemo(()=>i.createElement("input",dh(ch({autoComplete:C.autoComplete||"one-time-code"},C),{"data-input-otp":!0,"data-input-otp-placeholder-shown":R.length===0||void 0,"data-input-otp-mss":q,"data-input-otp-mse":H,inputMode:p,pattern:T?.source,"aria-placeholder":d,style:Eo,maxLength:s,value:R,ref:D,onPaste:G=>{var B;ve(G),(B=C.onPaste)==null||B.call(C,G)},onChange:te,onMouseOver:G=>{var B;W(!0),(B=C.onMouseOver)==null||B.call(C,G)},onMouseLeave:G=>{var B;W(!1),(B=C.onMouseLeave)==null||B.call(C,G)},onFocus:G=>{var B;J(),(B=C.onFocus)==null||B.call(C,G)},onBlur:G=>{var B;K(!1),(B=C.onBlur)==null||B.call(C,G)}})),[te,J,ve,p,Eo,s,H,q,C,T?.source,R]),Ft=i.useMemo(()=>({slots:Array.from({length:s}).map((G,B)=>{var ie;let ce=L&&q!==null&&H!==null&&(q===H&&B===q||B>=q&&B<H),de=R[B]!==void 0?R[B]:null,ee=R[0]!==void 0?null:(ie=d?.[B])!=null?ie:null;return{char:de,placeholderChar:ee,isActive:ce,hasFakeCaret:ce&&de===null}}),isFocused:L,isHovering:!C.disabled&&P}),[L,P,s,H,q,C.disabled,R]),Jc=i.useMemo(()=>x?x(Ft):i.createElement(oc.Provider,{value:Ft},w),[w,Ft,x]);return i.createElement(i.Fragment,null,v!==null&&i.createElement("noscript",null,i.createElement("style",null,v)),i.createElement("div",{ref:$,"data-input-otp-container":!0,style:Zc,className:b},Jc,i.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Qc)))});nc.displayName="Input";function Ge(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var bh=`
485
+ `,ul=({color:e,tooltip:t,defaultBackgroundColor:r,hoverEffect:n,isFirst:a,isLast:s})=>{const l=o.jsx("div",{className:v.cn("size-full overflow-hidden px-[0.5px] transition sm:px-px cursor-pointer",a&&"rounded-l-[4px] pl-0",s&&"rounded-r-[4px] pr-0"),style:{minWidth:"4px"},children:o.jsx("div",{className:v.cn("tracker-block size-full",e||r||"bg-muted",n&&"tracker-block-hover")})});return t?o.jsxs(S.Tooltip,{delayDuration:300,children:[o.jsx(S.TooltipTrigger,{asChild:!0,children:l}),o.jsx(S.TooltipContent,{side:"top",sideOffset:10,align:"center",children:t})]}):l};ul.displayName="TrackerBlock";const pl=i.forwardRef(({data:e=[],defaultBackgroundColor:t="bg-muted",className:r,hoverEffect:n=!1,...a},s)=>{const l=e.map((c,d)=>o.jsx(ul,{defaultBackgroundColor:t,hoverEffect:n,isFirst:d===0,isLast:d===e.length-1,...c},c.key??d));return o.jsxs(o.Fragment,{children:[o.jsx("style",{children:zm}),o.jsx("div",{ref:s,className:v.cn("group flex h-8 w-full items-center",r),...a,children:l})]})});pl.displayName="Tracker";const $t=E.createContext(void 0);function Fm(e,t,r){const[n,a]=E.useState([]);return E.useEffect(()=>{if(!e){a([]);return}let s=document;if(r)if(typeof r=="string"){const f=document.querySelector(r);f instanceof HTMLElement&&(s=f)}else"current"in r?r.current instanceof HTMLElement&&(s=r.current):r instanceof HTMLElement&&(s=r);const l=Array.from(s.querySelectorAll(t));if(l.length===0){a([]);return}const c=[],d=[];l.forEach(f=>{const u=parseInt(f.tagName.charAt(1)),p=f.textContent?.trim()||"";let m=f.id;m||(m=p.toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-"),f.id=m);const b={id:m,label:p,level:u};for(;d.length>0&&d[d.length-1].level>=u;)d.pop();if(d.length===0)c.push(b);else{const h=d[d.length-1];h.children||(h.children=[]),h.children.push(b)}d.push(b)}),a(c)},[e,t,r]),n}const fl=i.forwardRef(({className:e,items:t,autoDetect:r=!1,headingSelector:n="h1, h2, h3, h4, h5, h6",container:a,scrollContainer:s,activeId:l,onActiveChange:c,scrollOffset:d=0,smoothScroll:f=!0,enableScrollSpy:u=!0,title:p="On this page",variant:m="normal",...b},h)=>{const x=l!==void 0,w=Fm(r,n,a),C=E.useMemo(()=>t&&t.length>0?t:r&&w.length>0?w:[],[t,w,r]),N=i.useMemo(()=>{if(!a)return null;if(typeof a=="string"){const A=document.querySelector(a);return A instanceof HTMLElement?A:null}return"current"in a?a.current:a instanceof HTMLElement?a:null},[a]),y=i.useMemo(()=>{const A=s||a;if(!A)return null;if(typeof A=="string"){const T=document.querySelector(A);return T instanceof HTMLElement?T:null}return"current"in A?A.current:A instanceof HTMLElement?A:null},[s,a]),k=en({selector:n,rootMargin:"-100px 0px -66%",threshold:0,offset:d,enabled:u&&!x&&C.length>0,container:y||N}),M=x?l:k.activeId,I=x?l?[l]:[]:k.visibleIds,_=i.useRef(null);i.useEffect(()=>{if(I.length>0&&C.length>0){let A=-1;const T=[],D=$=>{$.forEach(z=>{T.push(z),z.children&&D(z.children)})};D(C);for(let $=0;$<T.length;$++)I.includes(T[$].id)&&(A=$);A>=0&&(_.current=T[A].id)}},[I,C]);const j=A=>{const T=document.getElementById(A);if(T){const D=y||N;if(D){const $=T.getBoundingClientRect().top,z=D.getBoundingClientRect().top,V=$-z+D.scrollTop-d;D.scrollTo({top:V,behavior:f?"smooth":"auto"})}else{const z=T.getBoundingClientRect().top+window.pageYOffset-d;window.scrollTo({top:z,behavior:f?"smooth":"auto"})}x||k.setActiveId(A),c?.(A)}};E.useEffect(()=>{!x&&M!==null&&c?.(M)},[M,x,c]);const{flatItems:R,activePathIds:F}=E.useMemo(()=>{if(m!=="circuit"&&m!=="clerk")return{flatItems:[],activePathIds:new Set};const A=[],T=new Map,D=(z,V)=>{z.forEach(P=>{A.push({...P,parentId:V}),V&&T.set(P.id,V),P.children&&D(P.children,P.id)})};D(C);const $=new Set;if(M){let z=M;for(;z;)$.add(z),z=T.get(z)}return{flatItems:A,activePathIds:$}},[C,m,M]);return C.length===0?null:o.jsx($t.Provider,{value:{activeId:M,visibleIds:I,onItemClick:j,scrollOffset:d,smoothScroll:f,variant:m},children:o.jsxs("div",{ref:h,className:v.cn("relative min-h-0 text-sm","overflow-auto","[scrollbar-width:none]","[mask-image:linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent)]",e),...b,children:[p&&o.jsx("div",{className:"px-4 py-2 font-semibold text-foreground sticky top-0 bg-background/80 backdrop-blur-sm z-10 border-b border-border",children:p}),o.jsx("nav",{className:"py-3",children:m==="circuit"?o.jsx(bl,{items:R,activePathIds:F,visibleIds:I,lastActiveIdRef:_}):m==="clerk"?o.jsx(yl,{items:R,activePathIds:F,visibleIds:I,lastActiveIdRef:_}):o.jsx(ml,{items:C,visibleIds:I,lastActiveIdRef:_})})]})})});fl.displayName="TableOfContents";const ml=i.memo(({items:e,visibleIds:t=[],lastActiveIdRef:r})=>{const n=E.useRef(null),a=E.useMemo(()=>{const l=c=>{const d=[];return c.forEach(f=>{d.push(f),f.children&&d.push(...l(f.children))}),d};return l(e)},[e]),s=i.useMemo(()=>{const l=r?.current;return t.length>0?new Set(t):l?new Set([l]):new Set},[t,r]);return o.jsxs(o.Fragment,{children:[o.jsx(gl,{containerRef:n,activeIds:t,lastActiveIdRef:r,items:a}),o.jsx("div",{ref:n,className:v.cn("flex flex-col border-s border-foreground/10"),children:a.map(l=>o.jsx(hl,{item:l,isVisible:s.has(l.id)},l.id))})]})});ml.displayName="NormalTableOfContentsList";const gl=i.memo(({containerRef:e,activeIds:t,lastActiveIdRef:r,items:n})=>{const a=E.useRef(null),s=i.useCallback((c,d)=>{const f=a.current;f&&(f.style.setProperty("--normal-top",`${c}px`),f.style.setProperty("--normal-height",`${d}px`))},[]),l=i.useCallback(()=>{if(!e.current){s(0,0);return}const c=e.current;if(c.clientHeight===0){s(0,0);return}let d=t;if(t.length===0&&r?.current&&(d=[r.current]),d.length===0){s(0,0);return}let f=Number.MAX_VALUE,u=0;for(const p of d){const m=c.querySelector(`a[href="#${p}"]`);if(!m)continue;const b=getComputedStyle(m);f=Math.min(f,m.offsetTop+parseFloat(b.paddingTop)),u=Math.max(u,m.offsetTop+m.clientHeight-parseFloat(b.paddingBottom))}f===Number.MAX_VALUE?s(0,0):s(f,u-f)},[e,t,s,r]);return E.useEffect(()=>{if(!e.current)return;const c=e.current,d=new ResizeObserver(l);return d.observe(c),l(),()=>{d.disconnect()}},[l]),E.useEffect(()=>{l()},[t,l]),o.jsx("div",{ref:a,role:"none",className:"absolute top-0 w-px bg-primary transition-[translate,height] ease-linear",style:{transform:"translateY(var(--normal-top, 0px))",height:"var(--normal-height, 0px)"}})});gl.displayName="NormalThumb";const hl=i.memo(({item:e,isVisible:t=!1})=>{const r=E.useContext($t),{onItemClick:n}=r,a=t,s=e.level<=2?12:e.level===3?24:32;return o.jsx("a",{href:`#${e.id}`,onClick:l=>{l.preventDefault(),n(e.id)},style:{paddingInlineStart:`${s}px`},className:v.cn("prose relative py-1.5 text-sm transition-colors wrap-anywhere first:pt-0 last:pb-0","text-muted-foreground hover:text-foreground dark:hover:text-foreground","data-[active=true]:text-primary","no-underline hover:no-underline"),"data-active":a,children:e.label})});hl.displayName="NormalTableOfContentsItem";function Hm(e){return e<=2?14:e===3?26:36}function lt(e){return e>=3?10:0}const vl=i.memo(({containerRef:e,activeIds:t,className:r,lastActiveIdRef:n,items:a})=>{const s=E.useRef(null),[l,c]=i.useState({top:0,height:0}),d=i.useCallback((u,p)=>{c({top:u,height:p})},[]),f=i.useCallback(()=>{if(!e.current){d(0,0);return}const u=e.current;if(u.clientHeight===0){d(0,0);return}let p=t;if(t.length===0&&n?.current&&(p=[n.current]),p.length===0){d(0,0);return}let m=Number.MAX_VALUE,b=0;for(const h of p){const x=u.querySelector(`a[href="#${h}"]`);if(!x)continue;const w=getComputedStyle(x),C=parseFloat(w.paddingTop),N=parseFloat(w.paddingBottom),y=x.offsetTop+C,k=x.offsetTop+x.clientHeight-N;m=Math.min(m,y),b=Math.max(b,k)}m===Number.MAX_VALUE?d(0,0):d(m,b-m)},[e,t,d,n]);return E.useEffect(()=>{if(!e.current)return;const u=e.current,p=new ResizeObserver(()=>{requestAnimationFrame(()=>{f()})});return p.observe(u),requestAnimationFrame(()=>{f()}),()=>{p.disconnect()}},[f]),E.useEffect(()=>{requestAnimationFrame(()=>{f()})},[t,f]),o.jsx("div",{ref:s,role:"none",className:v.cn("absolute w-full bg-primary transition-[top,height] ease-linear",r),style:{top:`${l.top}px`,height:`${l.height}px`}})});vl.displayName="CircuitThumb";const bl=i.memo(({items:e,activePathIds:t,visibleIds:r=[],lastActiveIdRef:n})=>{const a=E.useRef(null),[s,l]=E.useState();return E.useEffect(()=>{if(!a.current)return;const c=a.current;function d(){c.clientHeight===0||c.clientWidth===0||requestAnimationFrame(()=>{if(c.clientHeight===0||c.clientWidth===0)return;let p=0,m=0;const b=[];for(let h=0;h<e.length;h++){const x=c.querySelector(`a[href="#${e[h].id}"]`);if(!x)continue;const w=getComputedStyle(x),C=lt(e[h].level)+1,N=x.offsetTop+parseFloat(w.paddingTop),y=x.offsetTop+x.clientHeight-parseFloat(w.paddingBottom);p=Math.max(C,p),m=Math.max(m,y),b.push(`${h===0?"M":"L"}${C} ${N}`),b.push(`L${C} ${y}`)}l({path:b.join(" "),width:p+1,height:m})})}const f=new ResizeObserver(d),u=setTimeout(()=>{d()},50);return f.observe(c),()=>{clearTimeout(u),f.disconnect()}},[e]),o.jsxs(o.Fragment,{children:[s&&o.jsxs(o.Fragment,{children:[o.jsx("svg",{className:"absolute start-0 top-0 rtl:-scale-x-100 pointer-events-none",width:s.width,height:s.height,style:{zIndex:0,color:"color-mix(in oklch, var(--foreground) 15%, transparent)"},"aria-hidden":"true",children:o.jsx("path",{d:s.path,stroke:"currentColor",strokeWidth:"1",fill:"none",vectorEffect:"non-scaling-stroke"})}),o.jsx("div",{className:"absolute start-0 top-0 rtl:-scale-x-100",style:{width:s.width,height:s.height,maskImage:`url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s.width} ${s.height}"><path d="${s.path}" stroke="black" stroke-width="1" fill="none" /></svg>`)}")`,zIndex:1},children:o.jsx(vl,{containerRef:a,activeIds:r,lastActiveIdRef:n,items:e})})]}),o.jsx("div",{ref:a,className:"flex flex-col",children:e.map((c,d)=>{const f=n?.current,u=r.length>0?r.includes(c.id):f===c.id;return o.jsx(xl,{item:c,upper:e[d-1]?.level,lower:e[d+1]?.level,isVisible:u},c.id)})})]})});bl.displayName="CircuitTableOfContentsList";const xl=i.memo(({item:e,upper:t=e.level,lower:r=e.level,isVisible:n=!1})=>{const a=E.useContext($t),{onItemClick:s}=a,l=n,c=lt(e.level),d=lt(t),f=lt(r);return o.jsxs("a",{href:`#${e.id}`,onClick:u=>{u.preventDefault(),s(e.id)},style:{paddingInlineStart:Hm(e.level)},className:v.cn("prose relative py-1.5 text-sm transition-colors wrap-anywhere first:pt-0 last:pb-0","text-muted-foreground","hover:text-foreground dark:hover:text-foreground","data-[active=true]:text-primary","no-underline hover:no-underline"),"data-active":l,children:[c!==d&&o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",className:"absolute -top-1.5 start-0 size-4 rtl:-scale-x-100",children:o.jsx("line",{x1:d,y1:"0",x2:c,y2:"12",className:"stroke-foreground/10",strokeWidth:"1"})}),o.jsx("div",{className:v.cn("absolute inset-y-0 w-px",c!==d&&"top-1.5",c!==f&&"bottom-1.5"),style:{insetInlineStart:`${c}px`,backgroundColor:"color-mix(in oklch, var(--foreground) 15%, transparent)"}}),e.label]})});xl.displayName="CircuitTableOfContentsItem";const nt=4,Gm=4;function Bm(e){return e<=2?0:13}function Vm(e){return e<=2?15:e===3?27:39}function Wm(e,t){for(let r=0;r<e.length;r++){const n=e[r],a=e[r+1];if(t>=n.top&&t<=n.bottom)return n.offset;if(a&&t>n.bottom&&t<a.top){const s=(t-n.bottom)/(a.top-n.bottom);return n.offset+s*(a.offset-n.offset)}}return e[e.length-1]?.offset??1}const wl=i.memo(({containerRef:e,activeIds:t,items:r,className:n,onCircleYChange:a,lastActiveIdRef:s})=>{const l=E.useRef(null),[c,d]=i.useState({top:0,height:0,circleY:0}),f=i.useCallback((p,m,b)=>{d({top:p,height:m,circleY:b}),a?.(b)},[a]),u=i.useCallback(()=>{if(!e.current){f(0,0,0);return}const p=e.current;if(p.clientHeight===0){f(0,0,0);return}let m=t;if(t.length===0&&s?.current&&(m=[s.current]),m.length===0){f(0,0,0);return}let b=-1;for(let j=0;j<r.length;j++)m.includes(r[j].id)&&(b=j);if(b===-1){f(0,0,0);return}const h=p.querySelector(`a[href="#${r[b].id}"]`);if(!h){f(0,0,0);return}const x=getComputedStyle(h),w=parseFloat(x.paddingTop),C=parseFloat(x.paddingBottom),N=h.clientHeight-w-C,y=h.offsetTop+w+N/2,k=p.querySelector(`a[href="#${r[0]?.id}"]`);if(!k){f(0,y,y);return}const M=getComputedStyle(k),I=k.offsetTop+parseFloat(M.paddingTop),_=y-I;f(I,Math.max(0,_),y)},[e,t,r,f,s]);return E.useEffect(()=>{if(!e.current)return;const p=e.current,m=new ResizeObserver(()=>{requestAnimationFrame(()=>{u()})});return m.observe(p),requestAnimationFrame(()=>{u()}),()=>{m.disconnect()}},[u]),E.useEffect(()=>{requestAnimationFrame(()=>{u()})},[t,u]),o.jsx("div",{ref:l,role:"none",className:v.cn("absolute w-full bg-primary transition-[top,height] duration-150 ease-out",n),style:{top:`${c.top}px`,height:`${c.height}px`}})});wl.displayName="ClerkThumb";const Cl=i.memo(({circleX:e,circleY:t,opacity:r})=>o.jsx("div",{role:"none","aria-hidden":"true",className:"bg-primary pointer-events-none absolute size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full transition-[left,top,opacity] duration-150 ease-out",style:{left:`${e}px`,top:`${t}px`,opacity:r}}));Cl.displayName="ClerkThumbCircle";const yl=i.memo(({items:e,activePathIds:t,visibleIds:r=[],lastActiveIdRef:n})=>{const a=E.useRef(null),[s,l]=E.useState(),[c,d]=i.useState(0),[f,u]=i.useState(0),p=i.useMemo(()=>{const m=n?.current;let b=null;if(r.length>0){let w=-1;for(let C=0;C<e.length;C++)r.includes(e[C].id)&&(w=C);w>=0&&(b=e[w].id)}else m&&(b=m);if(!b)return new Set;const h=e.findIndex(w=>w.id===b);if(h===-1)return new Set;const x=new Set;for(let w=0;w<=h;w++)x.add(e[w].id);return x},[e,r,n]);return E.useEffect(()=>{if(!a.current)return;const m=a.current;function b(){m.clientHeight===0||m.clientWidth===0||requestAnimationFrame(()=>{if(m.clientHeight===0||m.clientWidth===0)return;let w=0,C=0;const N=[],y=[];for(let k=0;k<e.length;k++){const M=m.querySelector(`a[href="#${e[k].id}"]`);if(!M)continue;const I=getComputedStyle(M),_=Math.max(Gm,Bm(e[k].level)+1),j=M.offsetTop+parseFloat(I.paddingTop),R=parseFloat(I.paddingBottom),F=M.offsetTop+M.clientHeight-R;w=Math.max(_,w),C=Math.max(C,F),y.push({offset:_,top:j,bottom:F})}for(let k=0;k<y.length;k++){const M=y[k],I=y[k-1],_=y[k+1];if(k===0?N.push(`M${M.offset} ${M.top}`):I&&M.offset!==I.offset?N.push(`Q${M.offset} ${M.top},${M.offset} ${M.top+nt}`):N.push(`L${M.offset} ${M.top}`),_&&M.offset!==_.offset){const j=M.bottom;N.push(`L${M.offset} ${j-nt}`);const R=_.top,F=_.offset-M.offset,A=R-j,T=Math.sqrt(F*F+A*A),D=Math.min(nt/T,.5),$=M.offset+F*D,z=j+A*D;N.push(`Q${M.offset} ${j},${$} ${z}`);const V=1-Math.min(nt/T,.5),P=M.offset+F*V,W=j+A*V;N.push(`L${P} ${W}`)}else N.push(`L${M.offset} ${M.bottom}`)}l({path:N.join(" "),width:w+1,height:C,segments:y})})}const h=new ResizeObserver(b),x=setTimeout(()=>{b()},50);return h.observe(m),()=>{clearTimeout(x),h.disconnect()}},[e]),o.jsxs(o.Fragment,{children:[s&&o.jsxs(o.Fragment,{children:[o.jsx("svg",{className:"absolute start-0 top-0 rtl:-scale-x-100 pointer-events-none",width:s.width+3,height:s.height+3,style:{zIndex:0,color:"color-mix(in oklch, var(--foreground) 15%, transparent)"},"aria-hidden":"true",children:o.jsx("path",{d:s.path,stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round",fill:"none",vectorEffect:"non-scaling-stroke"})}),o.jsx("div",{className:"absolute start-0 top-0 rtl:-scale-x-100",style:{width:s.width,height:s.height,maskImage:`url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s.width} ${s.height}"><path d="${s.path}" stroke="black" stroke-width="2" stroke-linejoin="round" stroke-linecap="round" fill="none" /></svg>`)}")`,zIndex:1},children:o.jsx(wl,{containerRef:a,activeIds:r,items:e,lastActiveIdRef:n,onCircleYChange:m=>{d(m),u(m>0?1:0)}})})]}),s&&s.segments&&c>0&&o.jsx(Cl,{circleX:Wm(s.segments,c),circleY:c,opacity:f}),o.jsx("div",{ref:a,className:"flex flex-col",children:e.map((m,b)=>o.jsx(Sl,{item:m,upper:e[b-1]?.level,lower:e[b+1]?.level,isVisible:p.has(m.id)},m.id))})]})});yl.displayName="ClerkTableOfContentsList";const Sl=i.memo(({item:e,upper:t=e.level,lower:r=e.level,isVisible:n=!1})=>{const a=E.useContext($t),{onItemClick:s}=a,l=n;return o.jsx("a",{href:`#${e.id}`,onClick:c=>{c.preventDefault(),s(e.id)},style:{paddingInlineStart:Vm(e.level)},className:v.cn("prose relative py-1.5 text-sm transition-colors duration-150 ease-out wrap-anywhere first:pt-0 last:pb-0","text-muted-foreground","hover:text-foreground dark:hover:text-foreground","data-[active=true]:text-primary","no-underline hover:no-underline"),"data-active":l,children:e.label})});Sl.displayName="ClerkTableOfContentsItem";const Nl=i.forwardRef(({className:e,...t},r)=>o.jsxs("svg",{ref:r,viewBox:"395 246 250 235",xmlns:"http://www.w3.org/2000/svg",className:v.cn("size-6 shrink-0",e),style:{overflow:"visible"},...t,children:[o.jsx("path",{className:"fill-black dark:fill-white",d:"M469.108582,314.094421 C431.519775,349.843567 439.122101,411.045959 484.146210,435.450684 C502.171906,445.221313 521.469482,447.166870 541.256226,441.475830 C545.471863,440.263367 547.134644,441.030762 548.303101,445.304016 C550.528503,453.442261 555.354675,459.913788 562.493469,464.605347 C564.263489,465.768524 566.397522,466.517853 568.055725,469.091949 C556.050537,475.584198 543.065369,478.190948 529.968201,479.123474 C497.323944,481.447784 467.867676,472.398834 444.312469,449.414490 C403.608948,409.697510 395.680359,346.476105 436.406464,297.996155 C475.279724,251.721817 544.115112,246.477859 590.704956,285.444122 C635.379639,322.808655 638.261658,382.546051 618.338745,418.410095 C616.854187,418.492645 616.366394,417.300507 615.859192,416.307098 C611.268799,407.316498 603.882874,401.705200 594.392517,398.821960 C590.888611,397.757385 590.128479,396.392303 591.394226,392.723419 C606.954346,347.621429 575.207275,299.471710 527.504639,295.046631 C506.985657,293.143188 489.039612,298.583160 473.064606,311.288971 C471.893860,312.220123 470.618286,313.019470 469.108582,314.094421z"}),o.jsx("path",{className:"fill-black dark:fill-white",d:"M593.982666,457.325623 C583.754761,460.901459 574.313049,460.242737 566.486389,453.005005 C559.045959,446.124390 556.946228,437.069031 559.390625,427.326324 C562.109497,416.489594 571.553589,409.327942 582.816895,408.892883 C593.566772,408.477661 603.659607,415.546509 607.333923,426.064240 C610.974915,436.486603 607.240601,448.385864 598.225220,454.921265 C597.019531,455.795288 595.650269,456.443542 593.982666,457.325623z"}),o.jsx("path",{className:"fill-black dark:fill-white",d:"M533.232910,400.182800 C530.269165,386.997559 541.695129,380.218018 550.155518,382.393341 C556.898743,384.127197 561.092590,389.064728 561.182373,395.883392 C561.275269,402.941345 557.406433,408.373291 551.013428,410.160553 C544.327759,412.029602 537.778931,409.345886 534.479309,403.338959 C534.004517,402.474640 533.726135,401.502411 533.232910,400.182800z"}),o.jsx("path",{className:"fill-black dark:fill-white",d:"M524.728027,358.949982 C531.395996,362.535034 533.603821,367.287964 531.735352,373.342438 C530.086304,378.685913 525.263184,381.813538 519.457153,381.304413 C514.137268,380.837952 509.808044,376.555115 508.974762,370.934296 C507.736542,362.582214 514.438599,357.313141 524.728027,358.949982z"})]}));Nl.displayName="NquiLogo";function Km({className:e,...t}){return o.jsx(kd,{"data-slot":"accordion",className:v.cn("overflow-hidden rounded-md border flex w-full flex-col",e),...t})}function qm({className:e,...t}){return o.jsx(Rd,{"data-slot":"accordion-item",className:v.cn("data-open:bg-muted/50 not-last:border-b",e),...t})}function Um({className:e,children:t,...r}){return o.jsx(Ed,{className:"flex",children:o.jsxs(jd,{"data-slot":"accordion-trigger",className:v.cn("**:data-[slot=accordion-trigger-icon]:text-muted-foreground gap-6 p-2 text-left text-xs font-medium hover:underline **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 group/accordion-trigger relative flex flex-1 items-start justify-between border border-transparent transition-all outline-none disabled:pointer-events-none disabled:opacity-50",e),...r,children:[t,o.jsx(U.HugeiconsIcon,{icon:Y.ArrowDown01Icon,strokeWidth:2,"data-slot":"accordion-trigger-icon",className:"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"}),o.jsx(U.HugeiconsIcon,{icon:Y.ArrowUp01Icon,strokeWidth:2,"data-slot":"accordion-trigger-icon",className:"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"})]})})}function Ym({className:e,children:t,...r}){return o.jsx(Id,{"data-slot":"accordion-content",className:"data-open:animate-accordion-down data-closed:animate-accordion-up px-2 text-xs overflow-hidden",...r,children:o.jsx("div",{className:v.cn("pt-0 pb-4 [&_a]:hover:text-foreground h-(--radix-accordion-content-height) [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4",e),children:t})})}const Xm=oe.cva("grid gap-0.5 rounded-lg border px-2 py-1.5 text-left text-xs has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-1.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-3.5 w-full relative group/alert",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function Zm({className:e,variant:t,...r}){return o.jsx("div",{"data-slot":"alert",role:"alert",className:v.cn(Xm({variant:t}),e),...r})}function Qm({className:e,...t}){return o.jsx("div",{"data-slot":"alert-title",className:v.cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",e),...t})}function Jm({className:e,...t}){return o.jsx("div",{"data-slot":"alert-description",className:v.cn("text-muted-foreground text-xs text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",e),...t})}function eg({className:e,...t}){return o.jsx("div",{"data-slot":"alert-action",className:v.cn("absolute top-1.5 right-2",e),...t})}function tg({...e}){return o.jsx(Fd,{"data-slot":"alert-dialog",...e})}function rg({...e}){return o.jsx(Hd,{"data-slot":"alert-dialog-trigger",...e})}function og({...e}){return o.jsx(Gd,{"data-slot":"alert-dialog-portal",...e})}function ng({className:e,...t}){return o.jsx(Bd,{"data-slot":"alert-dialog-overlay",className:v.cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-[var(--z-modal-backdrop)]",e),...t})}function ag({className:e,size:t="default",...r}){return o.jsxs(og,{children:[o.jsx(ng,{}),o.jsx(Vd,{"data-slot":"alert-dialog-content","data-size":t,className:v.cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 gap-3 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 left-1/2 z-[var(--z-modal)] grid w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...r})]})}function sg({className:e,...t}){return o.jsx("div",{"data-slot":"alert-dialog-header",className:v.cn("grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t})}function ig({className:e,...t}){return o.jsx("div",{"data-slot":"alert-dialog-footer",className:v.cn("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t})}function lg({className:e,...t}){return o.jsx(qd,{"data-slot":"alert-dialog-title",className:v.cn("text-sm font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t})}function cg({className:e,...t}){return o.jsx(Ud,{"data-slot":"alert-dialog-description",className:v.cn("text-muted-foreground *:[a]:hover:text-foreground text-xs text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3",e),...t})}function dg({className:e,variant:t="default",size:r="default",...n}){return o.jsx(re.Button,{variant:t,size:r,asChild:!0,children:o.jsx(Wd,{"data-slot":"alert-dialog-action",className:v.cn(e),...n})})}function ug({className:e,variant:t="outline",size:r="default",...n}){return o.jsx(re.Button,{variant:t,size:r,asChild:!0,children:o.jsx(Kd,{"data-slot":"alert-dialog-cancel",className:v.cn(e),...n})})}function pg({...e}){return o.jsx(Xd,{"data-slot":"aspect-ratio",...e})}function fg(e,t=[]){let r=[];function n(s,l){const c=i.createContext(l);c.displayName=s+"Context";const d=r.length;r=[...r,l];const f=p=>{const{scope:m,children:b,...h}=p,x=m?.[e]?.[d]||c,w=i.useMemo(()=>h,Object.values(h));return o.jsx(x.Provider,{value:w,children:b})};f.displayName=s+"Provider";function u(p,m){const b=m?.[e]?.[d]||c,h=i.useContext(b);if(h)return h;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[f,u]}const a=()=>{const s=r.map(l=>i.createContext(l));return function(c){const d=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return a.scopeName=e,[n,mg(a,...t)]}function mg(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const l=n.reduce((c,{useScope:d,scopeName:f})=>{const p=d(s)[`__scope${f}`];return{...c,...p}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}var yo="Avatar",[gg]=fg(yo),[hg,Ml]=gg(yo),kl=i.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[a,s]=i.useState("idle");return o.jsx(hg,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:s,children:o.jsx(S.Primitive.span,{...n,ref:t})})});kl.displayName=yo;var Rl="AvatarImage",El=i.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:a=()=>{},...s}=e,l=Ml(Rl,r),c=vg(n,s),d=g.useCallbackRef(f=>{a(f),l.onImageLoadingStatusChange(f)});return g.useLayoutEffect2(()=>{c!=="idle"&&d(c)},[c,d]),c==="loaded"?o.jsx(S.Primitive.img,{...s,ref:t,src:n}):null});El.displayName=Rl;var jl="AvatarFallback",Il=i.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...a}=e,s=Ml(jl,r),[l,c]=i.useState(n===void 0);return i.useEffect(()=>{if(n!==void 0){const d=window.setTimeout(()=>c(!0),n);return()=>window.clearTimeout(d)}},[n]),l&&s.imageLoadingStatus!=="loaded"?o.jsx(S.Primitive.span,{...a,ref:t}):null});Il.displayName=jl;function Yo(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function vg(e,{referrerPolicy:t,crossOrigin:r}){const n=tu(),a=i.useRef(null),s=n?(a.current||(a.current=new window.Image),a.current):null,[l,c]=i.useState(()=>Yo(s,e));return g.useLayoutEffect2(()=>{c(Yo(s,e))},[s,e]),g.useLayoutEffect2(()=>{const d=p=>()=>{c(p)};if(!s)return;const f=d("loaded"),u=d("error");return s.addEventListener("load",f),s.addEventListener("error",u),t&&(s.referrerPolicy=t),typeof r=="string"&&(s.crossOrigin=r),()=>{s.removeEventListener("load",f),s.removeEventListener("error",u)}},[s,r,t]),l}var Tl=kl,_l=El,Pl=Il;const Al=i.forwardRef(({className:e,...t},r)=>o.jsx(Tl,{ref:r,className:v.cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Al.displayName=Tl.displayName;const Dl=i.forwardRef(({className:e,...t},r)=>o.jsx(_l,{ref:r,className:v.cn("aspect-square h-full w-full",e),...t}));Dl.displayName=_l.displayName;const Ol=i.forwardRef(({className:e,...t},r)=>o.jsx(Pl,{ref:r,className:v.cn("flex h-full w-full items-center justify-center rounded-full bg-muted border border-border",e),...t}));Ol.displayName=Pl.displayName;const Ll=i.forwardRef(({...e},t)=>o.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Ll.displayName="Breadcrumb";const $l=i.forwardRef(({className:e,...t},r)=>o.jsx("ol",{ref:r,className:v.cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));$l.displayName="BreadcrumbList";const zl=i.forwardRef(({className:e,...t},r)=>o.jsx("li",{ref:r,className:v.cn("inline-flex items-center gap-1.5",e),...t}));zl.displayName="BreadcrumbItem";const Fl=i.forwardRef(({asChild:e,className:t,...r},n)=>{const a=e?be.Slot:"a";return o.jsx(a,{ref:n,className:v.cn("transition-colors hover:text-foreground",t),...r})});Fl.displayName="BreadcrumbLink";const Hl=i.forwardRef(({className:e,...t},r)=>o.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:v.cn("font-normal text-foreground",e),...t}));Hl.displayName="BreadcrumbPage";const Gl=({children:e,className:t,...r})=>o.jsx("li",{role:"presentation","aria-hidden":"true",className:v.cn("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...r,children:e??o.jsx(U.HugeiconsIcon,{icon:Y.ArrowRight01Icon,size:14})});Gl.displayName="BreadcrumbSeparator";const Bl=({className:e,...t})=>o.jsxs("span",{role:"presentation","aria-hidden":"true",className:v.cn("flex h-9 w-9 items-center justify-center",e),...t,children:[o.jsx(U.HugeiconsIcon,{icon:Y.MoreHorizontalIcon,size:16,className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"More"})]});Bl.displayName="BreadcrumbElipssis";var bg="Separator",Xo="horizontal",xg=["horizontal","vertical"],Vl=i.forwardRef((e,t)=>{const{decorative:r,orientation:n=Xo,...a}=e,s=wg(n)?n:Xo,c=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return o.jsx(S.Primitive.div,{"data-orientation":s,...c,...a,ref:t})});Vl.displayName=bg;function wg(e){return xg.includes(e)}var Wl=Vl;const De=i.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,variant:n="default",textContent:a,...s},l)=>{const c=n==="arrow-down"||n==="tab-down"||n==="stopper"||n==="dot"||n==="text-decoration"||n==="shiny-corner"||n==="shiny-edge",d=v.cn("shrink-0 relative",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]"),f=i.useMemo(()=>{if(c)return n==="text-decoration"?"separator-text-decoration":n==="shiny-corner"?v.cn("separator-shiny-corner",t==="vertical"&&"w-[2px] h-full"):n==="shiny-edge"?v.cn("separator-shiny-edge",t==="vertical"&&"w-[1px] h-full"):v.cn("bg-transparent","separator-transparent",n==="arrow-down"&&"separator-arrow-down",n==="tab-down"&&"separator-tab-down",n==="stopper"&&"separator-stopper",n==="dot"&&"separator-dot");switch(n){case"default":return v.cn("bg-border",t==="horizontal"?"bg-gradient-to-r from-transparent via-border to-transparent":"bg-gradient-to-b from-transparent via-border to-transparent");case"solid":return"bg-border";case"shadow-outset":return v.cn("bg-border","shadow-[0_1px_3px_color-mix(in_oklch,var(--foreground)_8%,transparent)]");case"shadow-inset":return v.cn("bg-border",t==="horizontal"?"shadow-[inset_0_1px_2px_color-mix(in_oklch,var(--foreground)_10%,transparent)]":"shadow-[inset_1px_0_2px_color-mix(in_oklch,var(--foreground)_10%,transparent)]");case"dotted":return v.cn("bg-transparent border-0",t==="horizontal"?"border-t border-dotted border-border":"border-l border-dotted border-border");case"dashed":return v.cn("bg-transparent border-0",t==="horizontal"?"border-t border-dashed border-border":"border-l border-dashed border-border");case"glow":return v.cn("bg-border","shadow-[0_0_8px_color-mix(in_oklch,var(--primary)_20%,transparent)]");case"thick":return v.cn("bg-border",t==="horizontal"?"h-[2px]":"w-[2px]");case"gradient":return v.cn(t==="horizontal"?"bg-gradient-to-r from-primary via-accent to-primary":"bg-gradient-to-b from-primary via-accent to-primary");case"double":return v.cn("bg-transparent border-0",t==="horizontal"?"border-t-2 border-border relative after:content-[''] after:absolute after:top-1 after:left-0 after:w-full after:h-[1px] after:bg-border":"border-l-2 border-border relative after:content-[''] after:absolute after:left-1 after:top-0 after:h-full after:w-[1px] after:bg-border");case"fade-strong":return v.cn("bg-border",t==="horizontal"?"bg-gradient-to-r from-transparent via-border via-border to-transparent":"bg-gradient-to-b from-transparent via-border via-border to-transparent","opacity-60");default:return"bg-border"}},[n,t,c]),u=i.useMemo(()=>{if(n==="text-decoration"&&a)return{"--separator-text-content":`"${a}"`}},[n,a]);return o.jsx(Wl,{ref:l,decorative:r,orientation:t,className:v.cn(d,f,e),style:u,...s})});De.displayName=Wl.displayName;const Kl=oe.cva("inline-flex w-fit items-stretch overflow-hidden rounded-full border border-input bg-background [--toggle-inner-radius:9999px] [&>*]:border-0 [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-full [&>button]:!font-normal [&>a]:!font-normal [&>button[aria-current='true']]:!font-bold [&>button[aria-pressed='true']]:!font-bold [&>button[data-active]]:!font-bold [&>a[aria-current='true']]:!font-bold [&>a[aria-pressed='true']]:!font-bold [&>a[data-active]]:!font-bold [&>[data-slot=select-trigger]]:!font-normal [&>button[data-variant=outline]]:!bg-transparent [&>button[data-variant=outline]]:hover:!bg-accent [&>button[data-variant=outline]]:hover:!text-accent-foreground [&>a[data-variant=outline]]:!bg-transparent [&>a[data-variant=outline]]:hover:!bg-accent [&>a[data-variant=outline]]:hover:!text-accent-foreground [&>button[data-variant=ghost]]:!bg-transparent [&>button[data-variant=ghost]]:hover:!bg-accent [&>button[data-variant=ghost]]:hover:!text-accent-foreground [&>a[data-variant=ghost]]:!bg-transparent [&>a[data-variant=ghost]]:hover:!bg-accent [&>a[data-variant=ghost]]:hover:!text-accent-foreground [&>button[aria-pressed='true']]:!bg-secondary [&>button[aria-pressed='true']]:!text-secondary-foreground [&>button[aria-pressed='true']]:hover:!bg-secondary/90 [&>button[aria-current='true']]:!bg-secondary [&>button[aria-current='true']]:!text-secondary-foreground [&>button[aria-current='true']]:hover:!bg-secondary/90 [&>button[data-active]]:!bg-secondary [&>button[data-active]]:!text-secondary-foreground [&>button[data-active]]:hover:!bg-secondary/90 [&>a[aria-pressed='true']]:!bg-secondary [&>a[aria-pressed='true']]:!text-secondary-foreground [&>a[aria-current='true']]:!bg-secondary [&>a[aria-current='true']]:!text-secondary-foreground [&>a[aria-current='true']]:hover:!bg-secondary/90 [&>a[data-active]]:!bg-secondary [&>a[data-active]]:!text-secondary-foreground [&>a[data-active]]:hover:!bg-secondary/90",{variants:{orientation:{horizontal:"flex-row [&>*:first-child]:!rounded-l-full [&>*:first-child]:!rounded-r-none [&>*:last-child]:!rounded-r-full [&>*:last-child]:!rounded-l-none [&>*:not(:first-child):not(:last-child)]:!rounded-none",vertical:"flex-col [&>*:first-child]:!rounded-t-full [&>*:first-child]:!rounded-b-none [&>*:last-child]:!rounded-b-full [&>*:last-child]:!rounded-t-none [&>*:not(:first-child):not(:last-child)]:!rounded-none"}},defaultVariants:{orientation:"horizontal"}});function Cg({className:e,orientation:t,...r}){return o.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:v.cn(Kl({orientation:t}),e),...r})}function yg({className:e,asChild:t=!1,...r}){const n=t?ir.Root:"div";return o.jsx(n,{className:v.cn("shrink-0 border-0 bg-transparent px-2.5 text-xs font-medium text-muted-foreground flex items-center gap-2 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",e),...r})}function Sg({className:e,orientation:t="vertical",...r}){return o.jsx(De,{"data-slot":"button-group-separator",variant:"solid",orientation:t,className:v.cn("relative min-h-px min-w-px shrink-0 self-stretch bg-border",e),...r})}function ql({blur:e=16,borderRadius:t=0,className:r}){const a=`frostyGlassMask-${i.useId().replace(/:/g,"-")}`,s=t>0;return o.jsxs(o.Fragment,{children:[s&&o.jsx("svg",{className:"absolute inset-0 pointer-events-none",width:"100%",height:"100%",preserveAspectRatio:"none","aria-hidden":"true",children:o.jsx("mask",{id:a,children:o.jsx("rect",{width:"100%",height:"100%",fill:"white",rx:t,ry:t})})}),o.jsx("div",{className:v.cn("absolute inset-0 pointer-events-none","h-[200%]","bg-background/3",r),style:{"--blur":`${e}px`,backdropFilter:`blur(${e}px)`,WebkitBackdropFilter:`blur(${e}px)`,maskImage:s?`url(#${a})`:"linear-gradient(to bottom, black 0% 50%, transparent 50% 100%)",WebkitMaskImage:s?`url(#${a})`:"linear-gradient(to bottom, black 0% 50%, transparent 50% 100%)"}})]})}const So=i.createContext({stickyHeader:!1}),Ul=i.forwardRef(({className:e,stickyHeader:t=!1,...r},n)=>o.jsx(So.Provider,{value:{stickyHeader:t},children:o.jsx("div",{ref:n,className:v.cn("nqui-card relative min-w-0 overflow-visible rounded-lg bg-card text-card-foreground",t&&"flex flex-col",e),...r})}));Ul.displayName="Card";const Yl=i.forwardRef(({className:e,children:t,...r},n)=>{const{stickyHeader:a}=i.useContext(So);return o.jsx("div",{ref:n,className:v.cn("flex min-w-0 flex-col space-y-1.5 p-6",a&&"relative sticky top-0 z-[var(--z-sticky-content)] flex-shrink-0 rounded-t-lg",e),...r,children:a?o.jsxs(o.Fragment,{children:[o.jsx(ql,{blur:16,borderRadius:8,className:"z-[var(--z-background)]"}),o.jsx("div",{className:"relative z-[var(--z-content)]",children:t})]}):t})});Yl.displayName="CardHeader";const Xl=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:v.cn("text-2xl font-semibold leading-none tracking-tight",e),...t}));Xl.displayName="CardTitle";const Zl=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:v.cn("text-sm text-muted-foreground",e),...t}));Zl.displayName="CardDescription";const Ql=i.forwardRef(({className:e,children:t,...r},n)=>{const{stickyHeader:a}=i.useContext(So);return a?o.jsx(At,{className:v.cn("min-h-0 w-full min-w-0 flex-1",e),children:o.jsx("div",{ref:n,className:"min-w-0 p-6 pt-0",...r,children:t})}):o.jsx("div",{ref:n,className:v.cn("min-w-0 p-6 pt-0",e),...r,children:t})});Ql.displayName="CardContent";const Jl=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:v.cn("flex min-w-0 items-center p-6 pt-0",e),...t}));Jl.displayName="CardFooter";function Ng({...e}){return o.jsx(Yu,{"data-slot":"context-menu",...e})}function Mg({className:e,...t}){return o.jsx(Xu,{"data-slot":"context-menu-trigger",className:v.cn("select-none",e),...t})}function kg({...e}){return o.jsx(Qu,{"data-slot":"context-menu-group",...e})}function Rg({...e}){return o.jsx(Na,{"data-slot":"context-menu-portal",...e})}function Eg({...e}){return o.jsx(ap,{"data-slot":"context-menu-sub",...e})}function jg({...e}){return o.jsx(rp,{"data-slot":"context-menu-radio-group",...e})}function Ig({className:e,...t}){return o.jsx(Na,{children:o.jsx(Zu,{"data-slot":"context-menu-content",className:v.cn(g.floatingSurface,"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-32 p-1 duration-100 z-[var(--z-popover)] max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto",e),...t})})}function Tg({className:e,inset:t,variant:r="default",...n}){return o.jsx(ep,{"data-slot":"context-menu-item","data-inset":t,"data-variant":r,className:v.cn(g.floatingListItemInteractive,"data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 px-2 py-1 text-xs [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex cursor-default select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n})}function _g({className:e,inset:t,children:r,...n}){return o.jsxs(sp,{"data-slot":"context-menu-sub-trigger","data-inset":t,className:v.cn(g.floatingListItemInteractive,"data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 px-2 py-1 text-xs [&_svg:not([class*='size-'])]:size-3.5 flex cursor-default select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n,children:[r,o.jsx(U.HugeiconsIcon,{icon:Y.ArrowRight01Icon,strokeWidth:2,className:"ml-auto"})]})}function Pg({className:e,...t}){return o.jsx(ip,{"data-slot":"context-menu-sub-content",className:v.cn(g.floatingSurface,"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-32 p-1 duration-100 z-[var(--z-popover)] origin-(--radix-context-menu-content-transform-origin) overflow-hidden",e),...t})}function Ag({className:e,children:t,checked:r,...n}){return o.jsxs(tp,{"data-slot":"context-menu-checkbox-item",className:v.cn(g.floatingListItemInteractive,"focus:**:text-accent-foreground min-h-7 gap-2 py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-default select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),checked:r,...n,children:[o.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none",children:o.jsx(Ma,{children:o.jsx(U.HugeiconsIcon,{icon:Y.Tick02Icon,strokeWidth:2})})}),t]})}function Dg({className:e,children:t,...r}){return o.jsxs(op,{"data-slot":"context-menu-radio-item",className:v.cn(g.floatingListItemInteractive,"focus:**:text-accent-foreground min-h-7 gap-2 py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-default select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[o.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none",children:o.jsx(Ma,{children:o.jsx(U.HugeiconsIcon,{icon:Y.Tick02Icon,strokeWidth:2})})}),t]})}function Og({className:e,inset:t,...r}){return o.jsx(Ju,{"data-slot":"context-menu-label","data-inset":t,className:v.cn("text-muted-foreground px-2 py-1.5 text-xs data-[inset]:pl-8",e),...r})}function Lg({className:e,...t}){return o.jsx(np,{"data-slot":"context-menu-separator",className:v.cn("bg-border/50 -mx-1 my-1 h-px",e),...t})}function $g({className:e,...t}){return o.jsx("span",{"data-slot":"context-menu-shortcut",className:v.cn("text-muted-foreground group-focus/context-menu-item:text-accent-foreground ml-auto text-[0.625rem] tracking-widest",e),...t})}function zg({className:e,...t}){return o.jsx("div",{"data-slot":"empty",className:v.cn("gap-4 rounded-xl border-dashed p-6 flex w-full min-w-0 flex-1 flex-col items-center justify-center text-center text-balance",e),...t})}function Fg({className:e,...t}){return o.jsx("div",{"data-slot":"empty-header",className:v.cn("gap-1 flex max-w-sm flex-col items-center",e),...t})}const Hg=oe.cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"bg-muted text-foreground flex size-8 shrink-0 items-center justify-center rounded-md [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});function Gg({className:e,variant:t="default",...r}){return o.jsx("div",{"data-slot":"empty-icon","data-variant":t,className:v.cn(Hg({variant:t,className:e})),...r})}function Bg({className:e,...t}){return o.jsx("div",{"data-slot":"empty-title",className:v.cn("text-sm font-medium tracking-tight",e),...t})}function Vg({className:e,...t}){return o.jsx("div",{"data-slot":"empty-description",className:v.cn("text-xs text-muted-foreground [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",e),...t})}function Wg({className:e,...t}){return o.jsx("div",{"data-slot":"empty-content",className:v.cn("gap-2 text-xs flex w-full max-w-sm min-w-0 flex-col items-center text-balance",e),...t})}function Kg({className:e,...t}){return o.jsx("fieldset",{"data-slot":"field-set",className:v.cn("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",e),...t})}function qg({className:e,variant:t="legend",...r}){return o.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:v.cn("mb-2 font-medium data-[variant=label]:text-xs data-[variant=legend]:text-sm",e),...r})}function Ug({className:e,...t}){return o.jsx("div",{"data-slot":"field-group",className:v.cn("gap-4 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4 group/field-group @container/field-group flex w-full flex-col",e),...t})}const Yg=oe.cva("data-[invalid=true]:text-destructive gap-2 group/field flex w-full",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function Xg({className:e,orientation:t="vertical",...r}){return o.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:v.cn(Yg({orientation:t}),e),...r})}function Zg({className:e,...t}){return o.jsx("div",{"data-slot":"field-content",className:v.cn("gap-0.5 group/field-content flex flex-1 flex-col leading-snug",e),...t})}function Qg({className:e,...t}){return o.jsx(S.Label,{"data-slot":"field-label",className:v.cn("has-data-checked:bg-primary/5 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...t})}function Jg({className:e,...t}){return o.jsx("div",{"data-slot":"field-label",className:v.cn("gap-2 text-xs font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug",e),...t})}function eh({className:e,...t}){return o.jsx("p",{"data-slot":"field-description",className:v.cn("text-muted-foreground text-left text-xs [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",e),...t})}function th({children:e,className:t,...r}){return o.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:v.cn("-my-2 h-5 text-xs group-data-[variant=outline]/field-group:-mb-2 relative",t),...r,children:[o.jsx(De,{className:"absolute inset-0 top-1/2"}),e&&o.jsx("span",{className:"text-muted-foreground px-2 bg-background relative mx-auto block w-fit","data-slot":"field-separator-content",children:e})]})}function rh({className:e,children:t,errors:r,...n}){const a=E.useMemo(()=>{if(t)return t;if(!r?.length)return null;const s=[...new Map(r.map(l=>[l?.message,l])).values()];return s?.length==1?s[0]?.message:o.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:s.map((l,c)=>l?.message&&o.jsx("li",{children:l.message},c))})},[t,r]);return a?o.jsx("div",{role:"alert","data-slot":"field-error",className:v.cn("text-destructive text-xs font-normal",e),...n,children:a}):null}function oh({...e}){return o.jsx(Dp,{"data-slot":"hover-card",...e})}function nh({...e}){return o.jsx(Op,{"data-slot":"hover-card-trigger",...e})}function ah({className:e,align:t="center",sideOffset:r=4,...n}){return o.jsx(Lp,{"data-slot":"hover-card-portal",children:o.jsx($p,{"data-slot":"hover-card-content",align:t,sideOffset:r,className:v.cn(g.floatingSurface,"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 w-72 p-2.5 text-xs duration-100 z-[var(--z-popover)] origin-(--radix-hover-card-content-transform-origin) outline-hidden",e),...n})})}var sh=Object.defineProperty,ih=Object.defineProperties,lh=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,ec=Object.prototype.hasOwnProperty,tc=Object.prototype.propertyIsEnumerable,Zo=(e,t,r)=>t in e?sh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ch=(e,t)=>{for(var r in t||(t={}))ec.call(t,r)&&Zo(e,r,t[r]);if(wt)for(var r of wt(t))tc.call(t,r)&&Zo(e,r,t[r]);return e},dh=(e,t)=>ih(e,lh(t)),uh=(e,t)=>{var r={};for(var n in e)ec.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wt)for(var n of wt(e))t.indexOf(n)<0&&tc.call(e,n)&&(r[n]=e[n]);return r};function ph(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function fh(e){let t=i.useRef();return i.useEffect(()=>{t.current=e}),t.current}var mh=18,rc=40,gh=`${rc}px`,hh=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function vh({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[a,s]=i.useState(!1),[l,c]=i.useState(!1),[d,f]=i.useState(!1),u=i.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&a&&l,[a,l,r]),p=i.useCallback(()=>{let m=e.current,b=t.current;if(!m||!b||d||r==="none")return;let h=m,x=h.getBoundingClientRect().left+h.offsetWidth,w=h.getBoundingClientRect().top+h.offsetHeight/2,C=x-mh,N=w;document.querySelectorAll(hh).length===0&&document.elementFromPoint(C,N)===m||(s(!0),f(!0))},[e,t,d,r]);return i.useEffect(()=>{let m=e.current;if(!m||r==="none")return;function b(){let x=window.innerWidth-m.getBoundingClientRect().right;c(x>=rc)}b();let h=setInterval(b,1e3);return()=>{clearInterval(h)}},[e,r]),i.useEffect(()=>{let m=n||document.activeElement===t.current;if(r==="none"||!m)return;let b=setTimeout(p,0),h=setTimeout(p,2e3),x=setTimeout(p,5e3),w=setTimeout(()=>{f(!0)},6e3);return()=>{clearTimeout(b),clearTimeout(h),clearTimeout(x),clearTimeout(w)}},[t,n,r,p]),{hasPWMBadge:a,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:gh}}var oc=i.createContext({}),nc=i.forwardRef((e,t)=>{var r=e,{value:n,onChange:a,maxLength:s,textAlign:l="left",pattern:c,placeholder:d,inputMode:f="numeric",onComplete:u,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:m,containerClassName:b,noScriptCSSFallback:h=bh,render:x,children:w}=r,C=uh(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),N,y,k,M,I;let[_,j]=i.useState(typeof C.defaultValue=="string"?C.defaultValue:""),R=n??_,F=fh(R),A=i.useCallback(G=>{a?.(G),j(G)},[a]),T=i.useMemo(()=>c?typeof c=="string"?new RegExp(c):c:null,[c]),D=i.useRef(null),$=i.useRef(null),z=i.useRef({value:R,onChange:A,isIOS:typeof window<"u"&&((y=(N=window?.CSS)==null?void 0:N.supports)==null?void 0:y.call(N,"-webkit-touch-callout","none"))}),V=i.useRef({prev:[(k=D.current)==null?void 0:k.selectionStart,(M=D.current)==null?void 0:M.selectionEnd,(I=D.current)==null?void 0:I.selectionDirection]});i.useImperativeHandle(t,()=>D.current,[]),i.useEffect(()=>{let G=D.current,B=$.current;if(!G||!B)return;z.current.value!==G.value&&z.current.onChange(G.value),V.current.prev=[G.selectionStart,G.selectionEnd,G.selectionDirection];function ie(){if(document.activeElement!==G){X(null),Q(null);return}let ee=G.selectionStart,le=G.selectionEnd,tt=G.selectionDirection,me=G.maxLength,je=G.value,Ce=V.current.prev,Se=-1,Ne=-1,Ie;if(je.length!==0&&ee!==null&&le!==null){let td=ee===le,rd=ee===je.length&&je.length<me;if(td&&!rd){let Te=ee;if(Te===0)Se=0,Ne=1,Ie="forward";else if(Te===me)Se=Te-1,Ne=Te,Ie="backward";else if(me>1&&je.length>1){let Ht=0;if(Ce[0]!==null&&Ce[1]!==null){Ie=Te<Ce[1]?"backward":"forward";let od=Ce[0]===Ce[1]&&Ce[0]<me;Ie==="backward"&&!od&&(Ht=-1)}Se=Ht+Te,Ne=Ht+Te+1}}Se!==-1&&Ne!==-1&&Se!==Ne&&D.current.setSelectionRange(Se,Ne,Ie)}let jo=Se!==-1?Se:ee,Io=Ne!==-1?Ne:le,ed=Ie??tt;X(jo),Q(Io),V.current.prev=[jo,Io,ed]}if(document.addEventListener("selectionchange",ie,{capture:!0}),ie(),document.activeElement===G&&K(!0),!document.getElementById("input-otp-style")){let ee=document.createElement("style");if(ee.id="input-otp-style",document.head.appendChild(ee),ee.sheet){let le="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Ge(ee.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Ge(ee.sheet,`[data-input-otp]:autofill { ${le} }`),Ge(ee.sheet,`[data-input-otp]:-webkit-autofill { ${le} }`),Ge(ee.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Ge(ee.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ce=()=>{B&&B.style.setProperty("--root-height",`${G.clientHeight}px`)};ce();let de=new ResizeObserver(ce);return de.observe(G),()=>{document.removeEventListener("selectionchange",ie,{capture:!0}),de.disconnect()}},[]);let[P,W]=i.useState(!1),[L,K]=i.useState(!1),[q,X]=i.useState(null),[H,Q]=i.useState(null);i.useEffect(()=>{ph(()=>{var G,B,ie,ce;(G=D.current)==null||G.dispatchEvent(new Event("input"));let de=(B=D.current)==null?void 0:B.selectionStart,ee=(ie=D.current)==null?void 0:ie.selectionEnd,le=(ce=D.current)==null?void 0:ce.selectionDirection;de!==null&&ee!==null&&(X(de),Q(ee),V.current.prev=[de,ee,le])})},[R,L]),i.useEffect(()=>{F!==void 0&&R!==F&&F.length<s&&R.length===s&&u?.(R)},[s,u,F,R]);let Z=vh({containerRef:$,inputRef:D,pushPasswordManagerStrategy:p,isFocused:L}),te=i.useCallback(G=>{let B=G.currentTarget.value.slice(0,s);if(B.length>0&&T&&!T.test(B)){G.preventDefault();return}typeof F=="string"&&B.length<F.length&&document.dispatchEvent(new Event("selectionchange")),A(B)},[s,A,F,T]),J=i.useCallback(()=>{var G;if(D.current){let B=Math.min(D.current.value.length,s-1),ie=D.current.value.length;(G=D.current)==null||G.setSelectionRange(B,ie),X(B),Q(ie)}K(!0)},[s]),ve=i.useCallback(G=>{var B,ie;let ce=D.current;if(!m&&(!z.current.isIOS||!G.clipboardData||!ce))return;let de=G.clipboardData.getData("text/plain"),ee=m?m(de):de;G.preventDefault();let le=(B=D.current)==null?void 0:B.selectionStart,tt=(ie=D.current)==null?void 0:ie.selectionEnd,me=(le!==tt?R.slice(0,le)+ee+R.slice(tt):R.slice(0,le)+ee+R.slice(le)).slice(0,s);if(me.length>0&&T&&!T.test(me))return;ce.value=me,A(me);let je=Math.min(me.length,s-1),Ce=me.length;ce.setSelectionRange(je,Ce),X(je),Q(Ce)},[s,A,T,R]),Zc=i.useMemo(()=>({position:"relative",cursor:C.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[C.disabled]),Eo=i.useMemo(()=>({position:"absolute",inset:0,width:Z.willPushPWMBadge?`calc(100% + ${Z.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:Z.willPushPWMBadge?`inset(0 ${Z.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:l,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[Z.PWM_BADGE_SPACE_WIDTH,Z.willPushPWMBadge,l]),Qc=i.useMemo(()=>i.createElement("input",dh(ch({autoComplete:C.autoComplete||"one-time-code"},C),{"data-input-otp":!0,"data-input-otp-placeholder-shown":R.length===0||void 0,"data-input-otp-mss":q,"data-input-otp-mse":H,inputMode:f,pattern:T?.source,"aria-placeholder":d,style:Eo,maxLength:s,value:R,ref:D,onPaste:G=>{var B;ve(G),(B=C.onPaste)==null||B.call(C,G)},onChange:te,onMouseOver:G=>{var B;W(!0),(B=C.onMouseOver)==null||B.call(C,G)},onMouseLeave:G=>{var B;W(!1),(B=C.onMouseLeave)==null||B.call(C,G)},onFocus:G=>{var B;J(),(B=C.onFocus)==null||B.call(C,G)},onBlur:G=>{var B;K(!1),(B=C.onBlur)==null||B.call(C,G)}})),[te,J,ve,f,Eo,s,H,q,C,T?.source,R]),Ft=i.useMemo(()=>({slots:Array.from({length:s}).map((G,B)=>{var ie;let ce=L&&q!==null&&H!==null&&(q===H&&B===q||B>=q&&B<H),de=R[B]!==void 0?R[B]:null,ee=R[0]!==void 0?null:(ie=d?.[B])!=null?ie:null;return{char:de,placeholderChar:ee,isActive:ce,hasFakeCaret:ce&&de===null}}),isFocused:L,isHovering:!C.disabled&&P}),[L,P,s,H,q,C.disabled,R]),Jc=i.useMemo(()=>x?x(Ft):i.createElement(oc.Provider,{value:Ft},w),[w,Ft,x]);return i.createElement(i.Fragment,null,h!==null&&i.createElement("noscript",null,i.createElement("style",null,h)),i.createElement("div",{ref:$,"data-input-otp-container":!0,style:Zc,className:b},Jc,i.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Qc)))});nc.displayName="Input";function Ge(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var bh=`
486
486
  [data-input-otp] {
487
487
  --nojs-bg: white !important;
488
488
  --nojs-fg: black !important;
@@ -501,4 +501,4 @@ Defaulting to \`null\`.`}var Uf=Ls,Yf=zs,oo="Radio",[Xf,Hs]=g.createContextScope
501
501
  --nojs-bg: black !important;
502
502
  --nojs-fg: white !important;
503
503
  }
504
- }`;function xh({className:e,containerClassName:t,...r}){return o.jsx(nc,{"data-slot":"input-otp",containerClassName:h.cn("cn-input-otp flex items-center has-disabled:opacity-50",t),spellCheck:!1,className:h.cn("disabled:cursor-not-allowed",e),...r})}function wh({className:e,...t}){return o.jsx("div",{"data-slot":"input-otp-group",className:h.cn("has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive rounded-md has-aria-invalid:ring-[2px] flex items-center",e),...t})}function Ch({index:e,className:t,...r}){const n=i.useContext(oc),{char:a,hasFakeCaret:s,isActive:l}=n?.slots[e]??{};return o.jsxs("div",{"data-slot":"input-otp-slot","data-active":l,className:h.cn("bg-input/20 dark:bg-input/30 border-input data-[active=true]:border-ring data-[active=true]:ring-ring/30 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive size-7 border-y border-r text-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:ring-[2px] relative flex items-center justify-center data-[active=true]:z-10",t),...r,children:[a,s&&o.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:o.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000 bg-foreground h-4 w-px"})})]})}function yh({...e}){return o.jsx("div",{"data-slot":"input-otp-separator",className:"[&_svg:not([class*='size-'])]:size-4 flex items-center",role:"separator",...e,children:o.jsx(U.HugeiconsIcon,{icon:Y.MinusSignIcon,strokeWidth:2})})}function Sh({className:e,...t}){return o.jsx("div",{role:"list","data-slot":"item-group",className:h.cn("gap-4 has-[[data-size=sm]]:gap-2.5 has-[[data-size=xs]]:gap-2 group/item-group flex w-full flex-col",e),...t})}function Nh({className:e,...t}){return o.jsx(De,{"data-slot":"item-separator",orientation:"horizontal",className:h.cn("my-2",e),...t})}const Mh=oe.cva("[a]:hover:bg-accent [a]:hover:text-accent-foreground rounded-md border text-xs w-full group/item ring-offset-background flex items-center flex-wrap outline-none transition-colors duration-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 [a]:transition-colors",{variants:{variant:{default:"border-transparent",outline:"border-border",muted:"bg-muted/50 border-transparent"},size:{default:"gap-2.5 px-3 py-2.5",sm:"gap-2.5 px-3 py-2.5",xs:"gap-2.5 px-2.5 py-2 [[data-slot=dropdown-menu-content]_&]:p-0"}},defaultVariants:{variant:"default",size:"default"}});function kh({className:e,variant:t="default",size:r="default",asChild:n=!1,...a}){const s=n?ir.Root:"div";return o.jsx(s,{"data-slot":"item","data-variant":t,"data-size":r,className:h.cn(Mh({variant:t,size:r,className:e})),...a})}const Rh=oe.cva("gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none",{variants:{variant:{default:"bg-transparent",icon:"[&_svg:not([class*='size-'])]:size-4",image:"size-8 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"}},defaultVariants:{variant:"default"}});function Eh({className:e,variant:t="default",...r}){return o.jsx("div",{"data-slot":"item-media","data-variant":t,className:h.cn(Rh({variant:t,className:e})),...r})}function jh({className:e,...t}){return o.jsx("div",{"data-slot":"item-content",className:h.cn("gap-1 group-data-[size=xs]/item:gap-0.5 flex flex-1 flex-col [&+[data-slot=item-content]]:flex-none",e),...t})}function Ih({className:e,...t}){return o.jsx("div",{"data-slot":"item-title",className:h.cn("gap-2 text-xs leading-snug font-medium underline-offset-4 line-clamp-1 flex w-fit items-center",e),...t})}function Th({className:e,...t}){return o.jsx("p",{"data-slot":"item-description",className:h.cn("text-muted-foreground text-left text-xs [&>a:hover]:text-primary line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4",e),...t})}function _h({className:e,...t}){return o.jsx("div",{"data-slot":"item-actions",className:h.cn("gap-2 flex items-center",e),...t})}function Ph({className:e,...t}){return o.jsx("div",{"data-slot":"item-header",className:h.cn("gap-2 flex basis-full items-center justify-between",e),...t})}function Ah({className:e,...t}){return o.jsx("div",{"data-slot":"item-footer",className:h.cn("gap-2 flex basis-full items-center justify-between",e),...t})}function Dh({className:e,...t}){return o.jsx("kbd",{"data-slot":"kbd",className:h.cn("bg-muted text-muted-foreground [[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-xs px-1 font-sans text-[0.625rem] font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none",e),...t})}function Oh({className:e,...t}){return o.jsx("kbd",{"data-slot":"kbd-group",className:h.cn("gap-1 inline-flex items-center",e),...t})}function Lh({className:e,...t}){return o.jsx(of,{"data-slot":"menubar",className:h.cn("bg-background h-9 rounded-md border p-1 flex items-center",e),...t})}function $h({...e}){return o.jsx(nf,{"data-slot":"menubar-menu",...e})}function zh({...e}){return o.jsx(cf,{"data-slot":"menubar-group",...e})}function ac({...e}){return o.jsx(sf,{"data-slot":"menubar-portal",...e})}function Fh({...e}){return o.jsx(ff,{"data-slot":"menubar-radio-group",...e})}function Hh({className:e,...t}){return o.jsx(af,{"data-slot":"menubar-trigger",className:h.cn("hover:bg-accent hover:text-accent-foreground aria-expanded:bg-accent aria-expanded:text-accent-foreground rounded-md px-2 py-[calc(--spacing(0.875))] text-xs font-medium flex items-center outline-hidden select-none transition-colors",e),...t})}function Gh({className:e,align:t="start",alignOffset:r=-4,sideOffset:n=8,...a}){return o.jsx(ac,{children:o.jsx(lf,{"data-slot":"menubar-content",align:t,alignOffset:r,sideOffset:n,className:h.cn(g.floatingSurface,"data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-32 p-1 duration-100 z-[var(--z-popover)] origin-(--radix-menubar-content-transform-origin) overflow-hidden",e),...a})})}function Bh({className:e,inset:t,variant:r="default",...n}){return o.jsx(uf,{"data-slot":"menubar-item","data-inset":t,"data-variant":r,className:h.cn(g.floatingListItemInteractive,"data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 px-2 py-1 text-xs data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg:not([class*='size-'])]:size-3.5 group/menubar-item relative flex cursor-default select-none data-[disabled]:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n})}function Vh({className:e,children:t,checked:r,...n}){return o.jsxs(pf,{"data-slot":"menubar-checkbox-item",className:h.cn(g.floatingListItemInteractive,"focus:**:text-accent-foreground min-h-7 gap-2 py-1.5 pr-2 pl-8 text-xs data-disabled:opacity-50 relative flex cursor-default select-none data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",e),checked:r,...n,children:[o.jsx("span",{className:"left-2 size-4 [&_svg:not([class*='size-'])]:size-4 pointer-events-none absolute flex items-center justify-center",children:o.jsx(bs,{children:o.jsx(U.HugeiconsIcon,{icon:Y.Tick02Icon,strokeWidth:2})})}),t]})}function Wh({className:e,children:t,...r}){return o.jsxs(mf,{"data-slot":"menubar-radio-item",className:h.cn(g.floatingListItemInteractive,"focus:**:text-accent-foreground min-h-7 gap-2 py-1.5 pr-2 pl-8 text-xs data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-default select-none data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[o.jsx("span",{className:"left-2 size-4 [&_svg:not([class*='size-'])]:size-4 pointer-events-none absolute flex items-center justify-center",children:o.jsx(bs,{children:o.jsx(U.HugeiconsIcon,{icon:Y.Tick02Icon,strokeWidth:2})})}),t]})}function Kh({className:e,inset:t,...r}){return o.jsx(df,{"data-slot":"menubar-label","data-inset":t,className:h.cn("text-muted-foreground px-2 py-1.5 text-xs data-[inset]:pl-8",e),...r})}function qh({className:e,...t}){return o.jsx(gf,{"data-slot":"menubar-separator",className:h.cn("bg-border/50 -mx-1 my-1 h-px",e),...t})}function Uh({className:e,...t}){return o.jsx("span",{"data-slot":"menubar-shortcut",className:h.cn("text-muted-foreground group-focus/menubar-item:text-accent-foreground text-[0.625rem] tracking-widest ml-auto",e),...t})}function Yh({...e}){return o.jsx(hf,{"data-slot":"menubar-sub",...e})}function Xh({className:e,inset:t,children:r,...n}){return o.jsxs(vf,{"data-slot":"menubar-sub-trigger","data-inset":t,className:h.cn(g.floatingListItemInteractive,"data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 px-2 py-1 text-xs data-[inset]:pl-8 [&_svg:not([class*='size-'])]:size-3.5 flex cursor-default select-none",e),...n,children:[r,o.jsx(U.HugeiconsIcon,{icon:Y.ArrowRight01Icon,strokeWidth:2,className:"ml-auto size-4"})]})}function Zh({className:e,...t}){return o.jsx(bf,{"data-slot":"menubar-sub-content",className:h.cn(g.floatingSurface,"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-32 p-1 duration-100 z-[var(--z-popover)] origin-(--radix-menubar-content-transform-origin) overflow-hidden",e),...t})}function Qh({className:e,size:t="default",...r}){return o.jsxs("div",{className:h.cn("group/native-select relative w-fit has-[select:disabled]:opacity-50",e),"data-slot":"native-select-wrapper","data-size":t,children:[o.jsx("select",{"data-slot":"native-select","data-size":t,className:"border-input bg-input/20 placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-7 w-full min-w-0 appearance-none rounded-md border py-0.5 pr-6 pl-2 text-xs transition-colors select-none focus-visible:ring-[2px] aria-invalid:ring-[2px] data-[size=sm]:h-6 data-[size=sm]:text-[0.625rem] outline-none disabled:pointer-events-none disabled:cursor-not-allowed",...r}),o.jsx(U.HugeiconsIcon,{icon:Y.UnfoldMoreIcon,strokeWidth:2,className:"text-muted-foreground top-1/2 right-1.5 size-3.5 -translate-y-1/2 group-data-[size=sm]/native-select:size-3 group-data-[size=sm]/native-select:-translate-y-[calc(--spacing(1.25))] pointer-events-none absolute select-none","aria-hidden":"true","data-slot":"native-select-icon"})]})}function Jh({...e}){return o.jsx("option",{"data-slot":"native-select-option",...e})}function ev({className:e,...t}){return o.jsx("optgroup",{"data-slot":"native-select-optgroup",className:h.cn(e),...t})}function tv({className:e,children:t,viewport:r=!0,...n}){return o.jsxs(Af,{"data-slot":"navigation-menu","data-viewport":r,className:h.cn("max-w-max group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,r&&o.jsx(sc,{})]})}function rv({className:e,...t}){return o.jsx(Df,{"data-slot":"navigation-menu-list",className:h.cn("gap-0 group flex flex-1 list-none items-center justify-center",e),...t})}function ov({className:e,...t}){return o.jsx(Of,{"data-slot":"navigation-menu-item",className:h.cn("relative",e),...t})}const nv=oe.cva("bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-open:hover:bg-accent data-open:focus:bg-accent data-open:bg-accent data-open:text-accent-foreground focus-visible:ring-ring/30 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-popup-open:hover:bg-accent rounded-md px-2.5 py-1.5 text-xs font-medium transition-all focus-visible:ring-[2px] focus-visible:outline-1 disabled:opacity-50 group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center disabled:pointer-events-none outline-none");function av({className:e,children:t,...r}){return o.jsxs(Lf,{"data-slot":"navigation-menu-trigger",className:h.cn(nv(),"group",e),...r,children:[t," ",o.jsx(U.HugeiconsIcon,{icon:Y.ArrowDown01Icon,strokeWidth:2,className:"relative top-[1px] ml-1 size-3 transition duration-200 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180","aria-hidden":"true"})]})}function sv({className:e,...t}){return o.jsx(Ff,{"data-slot":"navigation-menu-content",className:h.cn("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:border-border group-data-[viewport=false]/navigation-menu:shadow-sm p-1.5 ease-[var(--ease-out)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:duration-200 top-0 left-0 w-full min-w-[200px] group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none md:absolute md:w-auto group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0",e),...t})}function sc({className:e,...t}){return o.jsx("div",{className:h.cn("absolute top-full left-0 isolate z-[var(--z-popover)] flex justify-center"),children:o.jsx(Hf,{"data-slot":"navigation-menu-viewport",className:h.cn(g.floatingSurface,"data-open:animate-in data-closed:animate-out data-closed:zoom-out-95 data-open:zoom-in-90 origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full min-w-[200px] overflow-hidden md:w-[var(--radix-navigation-menu-viewport-width)]",e),...t})})}function iv({className:e,...t}){return o.jsx($f,{"data-slot":"navigation-menu-link",className:h.cn("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent data-[active=true]:text-accent-foreground focus-visible:ring-ring/30 hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex items-center gap-1.5 rounded-lg p-2 text-xs whitespace-nowrap transition-all outline-none focus-visible:ring-[2px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",e),...t})}function lv({className:e,...t}){return o.jsx(zf,{"data-slot":"navigation-menu-indicator",className:h.cn("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",e),...t,children:o.jsx("div",{className:"bg-border rounded-tl-sm shadow-md relative top-[60%] h-2 w-2 rotate-45"})})}const zt=i.createContext({canGoPrev:!1,canGoNext:!0});function cv(e,t,r){if(t<=r)return Array.from({length:t},(p,u)=>u+1);const n=Math.floor((r-1)/2),a=Math.max(2,e-n);let s=Math.max(2,Math.min(a,t-1-(r-3))),l=Math.min(t-1,s+r-3);const c=Math.max(1,l-s+1);if(e>1&&e<t){let p=e-Math.floor((c-1)/2);p=Math.max(2,Math.min(p,t-1-(c-1))),s=p,l=p+c-1}const d=[1];s>2&&d.push("ellipsis");for(let p=s;p<=l;p++)d.push(p);return l<t-1&&d.push("ellipsis"),d.push(t),d}function No({className:e,...t}){return o.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:h.cn("relative flex w-full min-w-0 items-center gap-1",e),...t})}const Mo=i.forwardRef(function({className:t,children:r,viewportStyle:n,style:a,viewportRef:s,fadeMask:l=!0,...c},d){const p=Qo.useComposedRefs(d,s);return o.jsx(At,{...c,orientation:"horizontal",hideScrollbar:!0,fadeMask:l,viewportRef:p,viewportStyle:{scrollPaddingInline:"0.25rem",...typeof a=="object"&&a?a:{},...n??{}},className:h.cn("min-w-0 flex-1",t),children:o.jsx("ul",{"data-slot":"pagination-content",className:"flex w-max min-w-full items-center justify-center gap-0 px-0.5",children:r})})});Mo.displayName="PaginationContent";function nr({...e}){return o.jsx("li",{"data-slot":"pagination-item",...e})}function ic({className:e,...t}){return o.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:h.cn("size-7 shrink-0 items-center justify-center [&_svg:not([class*='size-'])]:size-3.5 flex",e),...t,children:[o.jsx(U.HugeiconsIcon,{icon:Y.MoreHorizontalCircle01Icon,strokeWidth:2}),o.jsx("span",{className:"sr-only",children:"More pages"})]})}const ko=i.forwardRef(({className:e,isActive:t,size:r="icon",onClick:n,...a},s)=>o.jsx("a",{ref:s,className:h.cn(re.buttonVariants({variant:t?"outline":"ghost",size:r}),"shrink-0",e),"aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,onClick:n,...a}));ko.displayName="PaginationLink";function lc({className:e,...t}){const{canGoPrev:r}=i.useContext(zt);return o.jsxs("a",{"data-slot":"pagination-previous","aria-label":"Go to previous page",className:h.cn("z-10 inline-flex size-7 shrink-0 items-center justify-center rounded-full","opacity-0 pointer-events-none group-hover/pagination:pointer-events-auto group-hover/pagination:opacity-70","transition-all duration-150",r?"text-foreground hover:opacity-100":"text-muted-foreground/30 cursor-not-allowed",e),"aria-disabled":!r,...t,children:[o.jsx(U.HugeiconsIcon,{icon:Y.ArrowLeft01Icon,strokeWidth:2}),o.jsx("span",{className:"sr-only",children:"Previous"})]})}function cc({className:e,...t}){const{canGoNext:r}=i.useContext(zt);return o.jsxs("a",{"data-slot":"pagination-next","aria-label":"Go to next page",className:h.cn("z-10 inline-flex size-7 shrink-0 items-center justify-center rounded-full","opacity-0 pointer-events-none group-hover/pagination:pointer-events-auto group-hover/pagination:opacity-70","transition-all duration-150",r?"text-foreground hover:opacity-100":"text-muted-foreground/30 cursor-not-allowed",e),"aria-disabled":!r,...t,children:[o.jsx(U.HugeiconsIcon,{icon:Y.ArrowRight01Icon,strokeWidth:2}),o.jsx("span",{className:"sr-only",children:"Next"})]})}function dv({page:e,totalPages:t,onPageChange:r,maxVisible:n=5,className:a,...s}){const l=i.useRef(null),[c,d]=i.useState(n),p=i.useMemo(()=>cv(e,t,c),[e,t,c]);return i.useEffect(()=>{const u=l.current?.querySelector("[data-active='true']"),f=e<=1?"start":e>=t?"end":"center";u?.scrollIntoView({behavior:"smooth",block:"nearest",inline:f})},[p,e,t]),i.useEffect(()=>{const u=l.current;if(!u)return;const f=new ResizeObserver(m=>{for(const b of m){const v=b.contentRect.width,x=Math.max(3,Math.floor(v/32));d(x)}});return f.observe(u),()=>f.disconnect()},[]),o.jsx(zt.Provider,{value:{canGoPrev:e>1,canGoNext:e<t},children:o.jsxs(No,{className:h.cn("group/pagination",a),...s,children:[o.jsx(lc,{href:"#",onClick:u=>{u.preventDefault(),e>1&&r(e-1)}}),o.jsx(Mo,{ref:l,children:p.map((u,f)=>u==="ellipsis"?o.jsx(nr,{children:o.jsx(ic,{})},`ellipsis-${f}`):o.jsx(nr,{children:o.jsx(ko,{href:"#",isActive:u===e,onClick:m=>{m.preventDefault(),u!==e&&r(u)},children:u})},u))}),o.jsx(cc,{href:"#",onClick:u=>{u.preventDefault(),e<t&&r(e+1)}})]})})}function uv({canGoPrev:e,canGoNext:t,children:r}){return o.jsx(zt.Provider,{value:{canGoPrev:e,canGoNext:t},children:o.jsx(No,{className:"group/pagination",children:r})})}function pv({className:e,...t}){return o.jsx(sr.Group,{"data-slot":"resizable-panel-group",className:h.cn("flex h-full w-full data-[orientation=vertical]:flex-col",e),...t})}function fv({...e}){return o.jsx(sr.Panel,{"data-slot":"resizable-panel",...e})}function mv({withHandle:e,className:t,...r}){return o.jsx(sr.Separator,{"data-slot":"resizable-handle",className:h.cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:translate-x-0 data-[orientation=vertical]:after:-translate-y-1/2 [&[data-orientation=vertical]>div]:rotate-90",t),...r,children:e&&o.jsx("div",{className:"bg-border h-6 w-1 rounded-lg z-10 flex shrink-0"})})}function dc({...e}){return o.jsx(O.Root,{"data-slot":"sheet",...e})}function gv({...e}){return o.jsx(O.Trigger,{"data-slot":"sheet-trigger",...e})}function hv({...e}){return o.jsx(O.Close,{"data-slot":"sheet-close",...e})}function uc({...e}){return o.jsx(O.Portal,{"data-slot":"sheet-portal",...e})}function pc({className:e,...t}){return o.jsx(O.Overlay,{"data-slot":"sheet-overlay",className:h.cn("fixed inset-0 z-[var(--z-modal-backdrop)] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}const vv=oe.cva("group/sheet-content fixed z-[var(--z-modal)] gap-4 bg-transparent p-6 text-card-foreground shadow-lg transition ease-in-out before:absolute before:inset-2 before:-z-10 before:rounded-xl before:bg-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-250",{variants:{side:{top:"inset-x-0 top-0 data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}});function fc({side:e="right",className:t,children:r,showCloseButton:n=!0,...a}){return o.jsxs(uc,{children:[o.jsx(pc,{}),o.jsxs(O.Content,{"data-slot":"sheet-content","data-side":e,className:h.cn(vv({side:e}),t),...a,children:[r,n&&o.jsxs(O.Close,{"data-slot":"sheet-close-button",className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[o.jsx(U.HugeiconsIcon,{icon:Y.Cancel01Icon,size:16,className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function mc({className:e,...t}){return o.jsx("div",{"data-slot":"sheet-header",className:h.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t})}function bv({className:e,...t}){return o.jsx("div",{"data-slot":"sheet-footer",className:h.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t})}function gc({className:e,...t}){return o.jsx(O.Title,{"data-slot":"sheet-title",className:h.cn("text-lg font-semibold text-foreground",e),...t})}function hc({className:e,...t}){return o.jsx(O.Description,{"data-slot":"sheet-description",className:h.cn("text-sm text-muted-foreground",e),...t})}function ar({className:e,...t}){return o.jsx("div",{className:h.cn("animate-pulse rounded-md bg-muted",e),...t})}const xv="sidebar_state",wv=3600*24*7,Cv="22rem",yv="18rem",Sv="3rem",vc=i.createContext(null);function et(){const e=i.useContext(vc);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const bc=i.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:a,children:s,...l},c)=>{const d=tn(),[p,u]=i.useState(!1),[f,m]=i.useState(e),b=t??f,v=i.useCallback(N=>{const y=typeof N=="function"?N(b):N;r?r(y):m(y),document.cookie=`${xv}=${y}; path=/; max-age=${wv}`},[r,b]),x=i.useCallback(()=>d?u(N=>!N):v(N=>!N),[d,v,u]);i.useEffect(()=>{const N=y=>{y.key===_e.SHORTCUT_KEYS.sidebarToggle&&_e.isMod(y)&&(y.preventDefault(),x())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[x]);const w=b?"expanded":"collapsed",C=i.useMemo(()=>({state:w,open:b,setOpen:v,isMobile:d,openMobile:p,setOpenMobile:u,toggleSidebar:x}),[w,b,v,d,p,u,x]);return o.jsx(vc.Provider,{value:C,children:o.jsx(S.TooltipProvider,{delayDuration:0,children:o.jsx("div",{style:{"--sidebar-width":Cv,"--sidebar-width-icon":Sv,...a},className:h.cn("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",n),ref:c,...l,children:s})})})});bc.displayName="SidebarProvider";const xc=i.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:a,...s},l)=>{const{isMobile:c,state:d,openMobile:p,setOpenMobile:u}=et();return r==="none"?o.jsx("div",{className:h.cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:l,...s,children:a}):c?o.jsx(dc,{open:p,onOpenChange:u,...s,children:o.jsxs(fc,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":yv},side:e,children:[o.jsxs(mc,{className:"sr-only",children:[o.jsx(gc,{children:"Sidebar"}),o.jsx(hc,{children:"Displays the mobile sidebar."})]}),o.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):o.jsxs("div",{ref:l,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?r:"","data-variant":t,"data-side":e,children:[o.jsx("div",{className:h.cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),o.jsx("div",{className:h.cn("fixed inset-y-0 z-[var(--z-floating)] hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...s,children:o.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:a})})]})});xc.displayName="Sidebar";const wc=i.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:a}=et();return o.jsx(re.Button,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:h.cn("h-7 w-7",e),onClick:s=>{t?.(s),a()},...r,children:o.jsx(U.HugeiconsIcon,{icon:Y.PanelLeftIcon,size:16})})});wc.displayName="SidebarTrigger";const Cc=i.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=et();return o.jsx("button",{ref:r,"data-sidebar":"rail",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:h.cn("absolute inset-y-0 z-[var(--z-sticky-page)] hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:-left-4 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Cc.displayName="SidebarRail";const yc=i.forwardRef(({className:e,...t},r)=>o.jsx("main",{ref:r,className:h.cn("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));yc.displayName="SidebarInset";const Sc=i.forwardRef(({className:e,...t},r)=>o.jsx(S.Input,{ref:r,"data-sidebar":"input",className:h.cn("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Sc.displayName="SidebarInput";const Nc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"header",className:h.cn("flex flex-col gap-2 p-2",e),...t}));Nc.displayName="SidebarHeader";const Mc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"footer",className:h.cn("flex flex-col gap-2 p-2",e),...t}));Mc.displayName="SidebarFooter";const kc=i.forwardRef(({className:e,...t},r)=>o.jsx(De,{ref:r,"data-sidebar":"separator",className:h.cn("mx-2 w-auto bg-sidebar-border",e),...t}));kc.displayName="SidebarSeparator";const Rc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"content",className:h.cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden group-data-[collapsible=icon]:overflow-hidden",e),...t}));Rc.displayName="SidebarContent";const Ec=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group",className:h.cn("relative flex w-full min-w-0 flex-col p-2",e),...t}));Ec.displayName="SidebarGroup";const jc=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?be.Slot:"div";return o.jsx(a,{ref:n,"data-sidebar":"group-label",className:h.cn("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});jc.displayName="SidebarGroupLabel";const Ic=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?be.Slot:"button";return o.jsx(a,{ref:n,"data-sidebar":"group-action",className:h.cn("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});Ic.displayName="SidebarGroupAction";const Tc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group-content",className:h.cn("w-full text-sm",e),...t}));Tc.displayName="SidebarGroupContent";const _c=i.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu",className:h.cn("flex w-full min-w-0 flex-col gap-1",e),...t}));_c.displayName="SidebarMenu";const Pc=i.forwardRef(({className:e,...t},r)=>o.jsx("li",{ref:r,"data-sidebar":"menu-item",className:h.cn("group/menu-item relative",e),...t}));Pc.displayName="SidebarMenuItem";const Nv=oe.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:[&>span:last-child]:hidden [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-transparent shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ac=i.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:a,className:s,...l},c)=>{const d=e?be.Slot:"button",{isMobile:p,state:u}=et(),f=o.jsx(d,{ref:c,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:h.cn(Nv({variant:r,size:n}),s),...l});return a?(typeof a=="string"&&(a={children:a}),o.jsxs(S.Tooltip,{children:[o.jsx(S.TooltipTrigger,{asChild:!0,children:f}),o.jsx(S.TooltipContent,{side:"right",align:"center",hidden:u!=="collapsed"||p,...a})]})):f});Ac.displayName="SidebarMenuButton";const Dc=i.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},a)=>{const s=t?be.Slot:"button";return o.jsx(s,{ref:a,"data-sidebar":"menu-action",className:h.cn("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...n})});Dc.displayName="SidebarMenuAction";const Oc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:h.cn("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Oc.displayName="SidebarMenuBadge";const Lc=i.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const a=i.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return o.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:h.cn("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[t&&o.jsx(ar,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),o.jsx(ar,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});Lc.displayName="SidebarMenuSkeleton";const $c=i.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:h.cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));$c.displayName="SidebarMenuSub";const zc=i.forwardRef(({...e},t)=>o.jsx("li",{ref:t,...e}));zc.displayName="SidebarMenuSubItem";const Fc=i.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...a},s)=>{const l=e?be.Slot:"a";return o.jsx(l,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:h.cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...a})});Fc.displayName="SidebarMenuSubButton";const at=2*Math.PI*100;function Mv({className:e,...t}){const r=i.useId().replace(/:/g,"");return o.jsx("div",{role:"status","aria-label":"Loading",className:h.cn("relative inline-flex size-4 shrink-0 items-center justify-center",e),...t,children:o.jsx("div",{className:"nqui-spinner-rotate absolute inset-0 flex items-center justify-center",children:o.jsxs("svg",{className:"size-full overflow-visible",viewBox:"0 0 220 220",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[o.jsxs("defs",{children:[o.jsxs("linearGradient",{id:`nqui-spinner-g1-${r}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[o.jsx("stop",{offset:"0%",stopColor:"var(--primary)"}),o.jsx("stop",{offset:"100%",stopColor:"color-mix(in oklch, var(--primary) 35%, white)"})]}),o.jsxs("linearGradient",{id:`nqui-spinner-g2-${r}`,x1:"100%",y1:"0%",x2:"0%",y2:"100%",children:[o.jsx("stop",{offset:"0%",stopColor:"color-mix(in oklch, var(--primary) 65%, white)"}),o.jsx("stop",{offset:"100%",stopColor:"var(--primary)"})]})]}),o.jsx("g",{className:"nqui-spinner-arc-first",children:o.jsx("circle",{cx:"110",cy:"110",r:"100",stroke:`url(#nqui-spinner-g1-${r})`,strokeWidth:"14",strokeLinecap:"round",strokeDasharray:`${at} ${at}`,strokeDashoffset:0})}),o.jsx("g",{className:"nqui-spinner-arc-second",transform:"rotate(-14 110 110)",children:o.jsx("circle",{cx:"110",cy:"110",r:"100",stroke:`url(#nqui-spinner-g2-${r})`,strokeWidth:"14",strokeLinecap:"round",strokeDasharray:`${at} ${at}`,strokeDashoffset:0})})]})})})}function Hc({className:e,...t}){return o.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:o.jsx("table",{"data-slot":"table",className:h.cn("w-full caption-bottom text-xs",e),...t})})}function Gc({className:e,...t}){return o.jsx("thead",{"data-slot":"table-header",className:h.cn("[&_tr]:border-b",e),...t})}function Bc({className:e,...t}){return o.jsx("tbody",{"data-slot":"table-body",className:h.cn("[&_tr:last-child]:border-0",e),...t})}function Vc({className:e,...t}){return o.jsx("tfoot",{"data-slot":"table-footer",className:h.cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function Wc({className:e,...t}){return o.jsx("tr",{"data-slot":"table-row",className:h.cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function Kc({className:e,...t}){return o.jsx("th",{"data-slot":"table-head",className:h.cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...t})}function qc({className:e,...t}){return o.jsx("td",{"data-slot":"table-cell",className:h.cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...t})}function Uc({className:e,...t}){return o.jsx("caption",{"data-slot":"table-caption",className:h.cn("text-muted-foreground mt-4 text-xs",e),...t})}const Ro=oe.cva("hover:text-foreground gap-1 rounded-md text-xs font-medium data-[state=on]:font-bold transition-[color,background-color,border-color,box-shadow] [&_svg:not([class*='size-'])]:size-3.5 group/toggle inline-flex min-w-0 max-w-full items-center justify-center whitespace-nowrap ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive dark:aria-invalid:border-destructive/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 active:data-[state=on]:bg-none active:data-[state=on]:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)]",{variants:{variant:{default:["border border-input bg-background","hover:bg-accent hover:text-accent-foreground","data-[state=on]:bg-secondary data-[state=on]:text-secondary-foreground data-[state=on]:border-border"],outline:["border border-input bg-transparent","hover:bg-accent hover:text-accent-foreground","data-[state=on]:bg-secondary data-[state=on]:text-secondary-foreground data-[state=on]:border-border"],segmented:["border-0 bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground","data-[state=on]:bg-secondary data-[state=on]:text-secondary-foreground data-[state=on]:shadow-none data-[state=on]:hover:bg-secondary/90"]},size:{default:"h-7 min-w-7 px-2",sm:"h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-1.5 text-[0.625rem] [&_svg:not([class*='size-'])]:size-3",lg:"h-8 min-w-8 px-2"}},defaultVariants:{variant:"default",size:"default"}});function kv({className:e,variant:t="default",size:r="default",children:n,...a}){return o.jsx(hm,{"data-slot":"toggle",className:h.cn(Ro({variant:t,size:r,className:e})),...a,children:re.wrapInlineLabelTextNodes(n)})}const Yc=i.createContext({size:"default",variant:"default",spacing:0,orientation:"horizontal",showDividers:!1}),Xc=i.forwardRef(function({className:t,variant:r,size:n,spacing:a=0,orientation:s="horizontal",children:l,separator:c,type:d="single",...p},u){const f=s??"horizontal",m=a===0,b=r??(d==="single"?"segmented":"outline"),v=c??(d==="single"||a===0);return o.jsx(Cm,{ref:u,type:d,orientation:f,"data-slot":"toggle-group","data-variant":b,"data-size":n,"data-spacing":a,"data-orientation":f,style:{"--gap":a},className:h.cn("group/toggle-group flex w-fit max-w-full flex-row items-stretch gap-[--spacing(var(--gap))] data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:max-w-none data-[orientation=vertical]:max-h-full","data-[orientation=horizontal]:overflow-x-auto data-[orientation=vertical]:overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",m&&"rounded-full border border-input bg-background [--toggle-inner-radius:9999px]",!m&&"rounded-full",t),...p,children:o.jsx(Yc.Provider,{value:{variant:b,size:n,spacing:a,orientation:f,showDividers:v&&a===0},children:l})})});Xc.displayName="ToggleGroup";function Rv({className:e,children:t,variant:r="default",size:n="default",...a}){const s=i.useContext(Yc);return o.jsx(ym,{"data-slot":"toggle-group-item","data-variant":s.variant||r,"data-size":s.size||n,"data-spacing":s.spacing,className:h.cn("shrink-0 focus:z-10 focus-visible:z-10","group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2","group-data-horizontal/toggle-group:data-[spacing=0]:first:!rounded-l-[var(--toggle-inner-radius)] group-data-horizontal/toggle-group:data-[spacing=0]:first:!rounded-r-none group-data-horizontal/toggle-group:data-[spacing=0]:last:!rounded-r-[var(--toggle-inner-radius)] group-data-horizontal/toggle-group:data-[spacing=0]:last:!rounded-l-none","group-data-vertical/toggle-group:data-[spacing=0]:first:!rounded-t-[var(--toggle-inner-radius)] group-data-vertical/toggle-group:data-[spacing=0]:first:!rounded-b-none group-data-vertical/toggle-group:data-[spacing=0]:last:!rounded-b-[var(--toggle-inner-radius)] group-data-vertical/toggle-group:data-[spacing=0]:last:!rounded-t-none","group-data-[spacing=0]/toggle-group:data-[variant=outline]:!border-0 group-data-[spacing=0]/toggle-group:data-[variant=segmented]:!border-0",Ro({variant:s.variant||r,size:s.size||n}),e),...a,children:t})}function Ev({className:e,orientation:t="vertical",variant:r="solid",...n}){return o.jsx(De,{"data-slot":"toggle-group-separator",variant:r,orientation:t,className:h.cn("relative self-stretch shrink-0 min-w-px min-h-px","bg-border",e),...n})}function jv(){const{setTheme:e,theme:t}=He.z(),[r,n]=i.useState(!1);i.useEffect(()=>{n(!0)},[]);const a=()=>{e(t==="dark"?"light":"dark")};if(!r)return o.jsxs(re.EnhancedButton,{variant:"outline",size:"icon",children:[o.jsx(U.HugeiconsIcon,{icon:Y.PaintBoardIcon,size:16,className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Toggle theme"})]});const s=t||"light";return o.jsxs(re.EnhancedButton,{variant:"outline",size:"icon",className:"relative",onClick:a,children:[o.jsx(U.HugeiconsIcon,{icon:Y.PaintBoardIcon,size:16,className:`absolute h-4 w-4 transition-all duration-200 ${s==="light"?"rotate-0 scale-100 opacity-100":"rotate-90 scale-0 opacity-0"}`}),o.jsx(U.HugeiconsIcon,{icon:Y.Moon01Icon,size:16,className:`absolute h-4 w-4 transition-all duration-200 ${s==="dark"?"rotate-0 scale-100 opacity-100":"rotate-90 scale-0 opacity-0"}`}),o.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function Iv({align:e="end"}){const{theme:t,setTheme:r}=He.z(),[n,a]=i.useState(!1);i.useEffect(()=>{a(!0)},[]);const s=n?t==="dark"?"Dark":t==="light"?"Light":"System":"Theme";return o.jsxs(uo,{children:[o.jsx(po,{asChild:!0,children:o.jsxs(re.EnhancedButton,{type:"button",variant:"outline",size:"sm",className:"gap-1.5 px-2","aria-label":"Choose color theme",children:[o.jsx(U.HugeiconsIcon,{icon:Y.PaintBoardIcon,strokeWidth:2,size:16,className:"opacity-80"}),o.jsx("span",{className:"hidden sm:inline",children:s}),o.jsx(U.HugeiconsIcon,{icon:Y.ArrowDown01Icon,strokeWidth:2,size:14,className:"opacity-70"})]})}),o.jsxs(Dt,{align:e,className:"w-44",children:[o.jsx(Ot,{children:"Appearance"}),o.jsx(Lt,{}),o.jsxs(fo,{value:n?t??"system":"system",onValueChange:r,children:[o.jsx($e,{value:"light",children:"Light"}),o.jsx($e,{value:"dark",children:"Dark"}),o.jsx($e,{value:"system",children:"System"})]})]})]})}class Tv extends i.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){this.props.onError?.(t,r)}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&(t.resetKeys?.some((n,a)=>n!==this.props.resetKeys?.[a])??!1)&&this.reset()}reset=()=>{this.setState({hasError:!1,error:null})};render(){return this.state.hasError?this.props.fallback?this.props.fallback:o.jsx("div",{className:"flex min-h-[200px] w-full items-center justify-center rounded-lg border border-destructive bg-destructive/10 p-4 text-destructive",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("p",{className:"font-semibold",children:"Something went wrong"}),this.state.error&&o.jsx("p",{className:"text-sm opacity-80",children:this.state.error.message}),this.props.resetKeys&&o.jsx("button",{onClick:this.reset,className:"mt-2 rounded-md bg-destructive px-4 py-2 text-sm font-medium text-white hover:bg-destructive/90",children:"Try again"})]})}):this.props.children}}exports.cn=h.cn;exports.useComposedRefs=Qo.useComposedRefs;exports.Keys=_e.Keys;exports.REMOVE_SHORTCUT_KEYS=_e.REMOVE_SHORTCUT_KEYS;exports.SHORTCUT_KEYS=_e.SHORTCUT_KEYS;exports.isMod=_e.isMod;exports.shouldIgnoreKeyboardShortcut=_e.shouldIgnoreKeyboardShortcut;exports.Calendar=Ct.EnhancedCalendar;exports.CalendarDayButton=Ct.CalendarDayButton;exports.CoreCalendar=Ct.Calendar;exports.useDetectTouch=Ct.useDetectTouch;exports.CoreToaster=He.Toaster;exports.EnhancedSonner=He.EnhancedSonner;exports.Toaster=He.Toaster;exports.Collapsible=S.Collapsible;exports.CollapsibleContent=S.CollapsibleContent;exports.CollapsibleTrigger=S.CollapsibleTrigger;exports.ColorPicker=S.ColorPicker;exports.ColorSlider=S.ColorSlider;exports.CoreSelect=S.Select;exports.CoreSelectContent=S.SelectContent;exports.CoreSelectGroup=S.SelectGroup;exports.CoreSelectItem=S.SelectItem;exports.CoreSelectLabel=S.SelectLabel;exports.CoreSelectScrollDownButton=S.SelectScrollDownButton;exports.CoreSelectScrollUpButton=S.SelectScrollUpButton;exports.CoreSelectSeparator=S.SelectSeparator;exports.CoreSelectTrigger=S.SelectTrigger;exports.CoreSelectValue=S.SelectValue;exports.CoreTabs=S.Tabs;exports.CoreTabsContent=S.TabsContent;exports.CoreTabsList=S.TabsList;exports.CoreTabsTrigger=S.TabsTrigger;exports.Crosshair=S.Crosshair;exports.DebugPanel=S.DebugPanel;exports.Input=S.Input;exports.Label=S.Label;exports.Magnifier=S.Magnifier;exports.Popover=S.Popover;exports.PopoverAnchor=S.PopoverAnchor;exports.PopoverContent=S.PopoverContent;exports.PopoverTrigger=S.PopoverTrigger;exports.Select=S.Select;exports.SelectContent=S.SelectContent;exports.SelectGroup=S.SelectGroup;exports.SelectItem=S.SelectItem;exports.SelectLabel=S.SelectLabel;exports.SelectScrollDownButton=S.SelectScrollDownButton;exports.SelectScrollUpButton=S.SelectScrollUpButton;exports.SelectSeparator=S.SelectSeparator;exports.SelectTrigger=S.SelectTrigger;exports.SelectValue=S.SelectValue;exports.Slider=S.Slider;exports.Switch=S.Switch;exports.Tabs=S.EnhancedTabs;exports.TabsContent=S.EnhancedTabsContent;exports.TabsList=S.EnhancedTabsList;exports.TabsTrigger=S.EnhancedTabsTrigger;exports.Textarea=S.Textarea;exports.Tooltip=S.Tooltip;exports.TooltipContent=S.TooltipContent;exports.TooltipProvider=S.TooltipProvider;exports.TooltipTrigger=S.TooltipTrigger;exports.UITester=S.UITester;exports.sliderThumbVariants=S.sliderThumbVariants;exports.sliderTrackVariants=S.sliderTrackVariants;exports.switchThumbVariants=S.switchThumbVariants;exports.switchVariants=S.switchVariants;exports.Button=re.EnhancedButton;exports.CoreButton=re.Button;exports.buttonVariants=re.enhancedButtonVariants;exports.Command=O.Command;exports.CommandDialog=O.CommandDialog;exports.CommandEmpty=O.CommandEmpty;exports.CommandGroup=O.CommandGroup;exports.CommandInput=O.CommandInput;exports.CommandItem=O.CommandItem;exports.CommandList=O.CommandList;exports.CommandPalette=O.CommandPalette;exports.CommandSeparator=O.CommandSeparator;exports.CommandShortcut=O.CommandShortcut;exports.Dialog=O.Dialog;exports.DialogClose=O.DialogClose;exports.DialogContent=O.DialogContent;exports.DialogDescription=O.DialogDescription;exports.DialogFooter=O.DialogFooter;exports.DialogHeader=O.DialogHeader;exports.DialogOverlay=O.DialogOverlay;exports.DialogPortal=O.DialogPortal;exports.DialogTitle=O.DialogTitle;exports.DialogTrigger=O.DialogTrigger;exports.InputGroup=O.InputGroup;exports.InputGroupAddon=O.InputGroupAddon;exports.InputGroupButton=O.InputGroupButton;exports.InputGroupInput=O.InputGroupInput;exports.InputGroupText=O.InputGroupText;exports.InputGroupTextarea=O.InputGroupTextarea;exports.Carousel=qe.Carousel;exports.CarouselContent=qe.CarouselContent;exports.CarouselItem=qe.CarouselItem;exports.CarouselNext=qe.CarouselNext;exports.CarouselPrevious=qe.CarouselPrevious;exports.Drawer=xe.Drawer;exports.DrawerClose=xe.DrawerClose;exports.DrawerContent=xe.DrawerContent;exports.DrawerDescription=xe.DrawerDescription;exports.DrawerFooter=xe.DrawerFooter;exports.DrawerHeader=xe.DrawerHeader;exports.DrawerOverlay=xe.DrawerOverlay;exports.DrawerPortal=xe.DrawerPortal;exports.DrawerTitle=xe.DrawerTitle;exports.DrawerTrigger=xe.DrawerTrigger;exports.Sortable=Ue.SortableRoot;exports.SortableContent=Ue.SortableContent;exports.SortableItem=Ue.SortableItem;exports.SortableItemHandle=Ue.SortableItemHandle;exports.SortableOverlay=Ue.SortableOverlay;exports.Accordion=Km;exports.AccordionContent=Ym;exports.AccordionItem=qm;exports.AccordionTrigger=Um;exports.Alert=Zm;exports.AlertAction=eg;exports.AlertDescription=Jm;exports.AlertDialog=tg;exports.AlertDialogAction=dg;exports.AlertDialogCancel=ug;exports.AlertDialogContent=ag;exports.AlertDialogDescription=cg;exports.AlertDialogFooter=ig;exports.AlertDialogHeader=sg;exports.AlertDialogTitle=lg;exports.AlertDialogTrigger=rg;exports.AlertTitle=Qm;exports.AspectRatio=pg;exports.Avatar=Al;exports.AvatarFallback=Ol;exports.AvatarImage=Dl;exports.Badge=xt;exports.Breadcrumb=Ll;exports.BreadcrumbEllipsis=Bl;exports.BreadcrumbItem=zl;exports.BreadcrumbLink=Fl;exports.BreadcrumbList=$l;exports.BreadcrumbPage=Hl;exports.BreadcrumbSeparator=Gl;exports.ButtonGroup=Cg;exports.ButtonGroupSeparator=Sg;exports.ButtonGroupText=yg;exports.Card=Ul;exports.CardContent=Ql;exports.CardDescription=Zl;exports.CardFooter=Jl;exports.CardHeader=Yl;exports.CardTitle=Xl;exports.Checkbox=Mi;exports.Combobox=Hi;exports.ComboboxAnchor=xo;exports.ComboboxBadgeTrigger=Wi;exports.ComboboxChip=el;exports.ComboboxChips=Ji;exports.ComboboxChipsInput=tl;exports.ComboboxClear=Co;exports.ComboboxCollection=Xi;exports.ComboboxContent=Vi;exports.ComboboxEmpty=Zi;exports.ComboboxGroup=Ui;exports.ComboboxInput=Bi;exports.ComboboxItem=qi;exports.ComboboxLabel=Yi;exports.ComboboxList=Ki;exports.ComboboxSeparator=Qi;exports.ComboboxTrigger=wo;exports.ComboboxValue=Gi;exports.ContextMenu=Ng;exports.ContextMenuCheckboxItem=Ag;exports.ContextMenuContent=Ig;exports.ContextMenuGroup=kg;exports.ContextMenuItem=Tg;exports.ContextMenuLabel=Og;exports.ContextMenuPortal=Rg;exports.ContextMenuRadioGroup=jg;exports.ContextMenuRadioItem=Dg;exports.ContextMenuSeparator=Lg;exports.ContextMenuShortcut=$g;exports.ContextMenuSub=Eg;exports.ContextMenuSubContent=Pg;exports.ContextMenuSubTrigger=_g;exports.ContextMenuTrigger=Mg;exports.CoreBadge=co;exports.CoreCheckbox=Ni;exports.CoreCombobox=Hi;exports.CoreComboboxAnchor=xo;exports.CoreComboboxBadgeTrigger=Wi;exports.CoreComboboxChip=el;exports.CoreComboboxChips=Ji;exports.CoreComboboxChipsInput=tl;exports.CoreComboboxClear=Co;exports.CoreComboboxCollection=Xi;exports.CoreComboboxContent=Vi;exports.CoreComboboxEmpty=Zi;exports.CoreComboboxGroup=Ui;exports.CoreComboboxInput=Bi;exports.CoreComboboxItem=qi;exports.CoreComboboxLabel=Yi;exports.CoreComboboxList=Ki;exports.CoreComboboxSeparator=Qi;exports.CoreComboboxTrigger=wo;exports.CoreComboboxValue=Gi;exports.CoreDropdownMenu=uo;exports.CoreDropdownMenuCheckboxItem=vo;exports.CoreDropdownMenuContent=Dt;exports.CoreDropdownMenuGroup=ki;exports.CoreDropdownMenuItem=ho;exports.CoreDropdownMenuLabel=Ot;exports.CoreDropdownMenuPortal=Ri;exports.CoreDropdownMenuRadioGroup=fo;exports.CoreDropdownMenuRadioItem=$e;exports.CoreDropdownMenuSeparator=Lt;exports.CoreDropdownMenuShortcut=bo;exports.CoreDropdownMenuSub=Ei;exports.CoreDropdownMenuSubContent=go;exports.CoreDropdownMenuSubTrigger=mo;exports.CoreDropdownMenuTrigger=po;exports.CoreProgress=Om;exports.CoreRadioGroup=Lm;exports.CoreRadioGroupItem=$m;exports.CoreScrollArea=Sm;exports.CoreScrollBar=Ke;exports.CoreTable=Hc;exports.CoreTableBody=Bc;exports.CoreTableCaption=Uc;exports.CoreTableCell=qc;exports.CoreTableFooter=Vc;exports.CoreTableHead=Kc;exports.CoreTableHeader=Gc;exports.CoreTableRow=Wc;exports.CoreUseComboboxAnchor=rl;exports.DropdownMenu=Rm;exports.DropdownMenuCheckboxItem=_i;exports.DropdownMenuContent=Ii;exports.DropdownMenuGroup=Em;exports.DropdownMenuItem=Ti;exports.DropdownMenuLabel=Ai;exports.DropdownMenuPortal=jm;exports.DropdownMenuRadioGroup=Tm;exports.DropdownMenuRadioItem=Pi;exports.DropdownMenuSeparator=Di;exports.DropdownMenuShortcut=Oi;exports.DropdownMenuSub=Im;exports.DropdownMenuSubContent=Li;exports.DropdownMenuSubTrigger=$i;exports.DropdownMenuTrigger=ji;exports.Empty=zg;exports.EmptyContent=Wg;exports.EmptyDescription=Vg;exports.EmptyHeader=Fg;exports.EmptyMedia=Gg;exports.EmptyTitle=Bg;exports.ErrorBoundary=Tv;exports.Field=Xg;exports.FieldContent=Zg;exports.FieldDescription=eh;exports.FieldError=rh;exports.FieldGroup=Ug;exports.FieldLabel=Qg;exports.FieldLegend=qg;exports.FieldSeparator=th;exports.FieldSet=Kg;exports.FieldTitle=Jg;exports.FrostedGlass=ql;exports.HoverCard=oh;exports.HoverCardContent=ah;exports.HoverCardTrigger=nh;exports.InputOTP=xh;exports.InputOTPGroup=wh;exports.InputOTPSeparator=yh;exports.InputOTPSlot=Ch;exports.Item=kh;exports.ItemActions=_h;exports.ItemContent=jh;exports.ItemDescription=Th;exports.ItemFooter=Ah;exports.ItemGroup=Sh;exports.ItemHeader=Ph;exports.ItemMedia=Eh;exports.ItemSeparator=Nh;exports.ItemTitle=Ih;exports.Kbd=Dh;exports.KbdGroup=Oh;exports.Menubar=Lh;exports.MenubarCheckboxItem=Vh;exports.MenubarContent=Gh;exports.MenubarGroup=zh;exports.MenubarItem=Bh;exports.MenubarLabel=Kh;exports.MenubarMenu=$h;exports.MenubarPortal=ac;exports.MenubarRadioGroup=Fh;exports.MenubarRadioItem=Wh;exports.MenubarSeparator=qh;exports.MenubarShortcut=Uh;exports.MenubarSub=Yh;exports.MenubarSubContent=Zh;exports.MenubarSubTrigger=Xh;exports.MenubarTrigger=Hh;exports.NativeSelect=Qh;exports.NativeSelectOptGroup=ev;exports.NativeSelectOption=Jh;exports.NavigationMenu=tv;exports.NavigationMenuContent=sv;exports.NavigationMenuIndicator=lv;exports.NavigationMenuItem=ov;exports.NavigationMenuLink=iv;exports.NavigationMenuList=rv;exports.NavigationMenuTrigger=av;exports.NavigationMenuViewport=sc;exports.NquiLogo=Nl;exports.Pagination=No;exports.PaginationAdaptive=dv;exports.PaginationContent=Mo;exports.PaginationEllipsis=ic;exports.PaginationItem=nr;exports.PaginationLink=ko;exports.PaginationNext=cc;exports.PaginationPrevious=lc;exports.PaginationScroller=uv;exports.Progress=sl;exports.RadioGroup=ll;exports.RadioGroupItem=cl;exports.Rating=dl;exports.ResizableHandle=mv;exports.ResizablePanel=fv;exports.ResizablePanelGroup=pv;exports.ScrollArea=At;exports.ScrollBar=Ke;exports.Separator=De;exports.Sheet=dc;exports.SheetClose=hv;exports.SheetContent=fc;exports.SheetDescription=hc;exports.SheetFooter=bv;exports.SheetHeader=mc;exports.SheetOverlay=pc;exports.SheetPortal=uc;exports.SheetTitle=gc;exports.SheetTrigger=gv;exports.Sidebar=xc;exports.SidebarContent=Rc;exports.SidebarFooter=Mc;exports.SidebarGroup=Ec;exports.SidebarGroupAction=Ic;exports.SidebarGroupContent=Tc;exports.SidebarGroupLabel=jc;exports.SidebarHeader=Nc;exports.SidebarInput=Sc;exports.SidebarInset=yc;exports.SidebarMenu=_c;exports.SidebarMenuAction=Dc;exports.SidebarMenuBadge=Oc;exports.SidebarMenuButton=Ac;exports.SidebarMenuItem=Pc;exports.SidebarMenuSkeleton=Lc;exports.SidebarMenuSub=$c;exports.SidebarMenuSubButton=Fc;exports.SidebarMenuSubItem=zc;exports.SidebarProvider=bc;exports.SidebarRail=Cc;exports.SidebarSeparator=kc;exports.SidebarTrigger=wc;exports.Skeleton=ar;exports.Spinner=Mv;exports.Table=Hc;exports.TableBody=Bc;exports.TableCaption=Uc;exports.TableCell=qc;exports.TableFooter=Vc;exports.TableHead=Kc;exports.TableHeader=Gc;exports.TableOfContents=fl;exports.TableRow=Wc;exports.ThemeAppearanceMenu=Iv;exports.ThemeToggle=jv;exports.Toggle=kv;exports.ToggleGroup=Xc;exports.ToggleGroupItem=Rv;exports.ToggleGroupSeparator=Ev;exports.Tracker=pl;exports.badgeVariants=Si;exports.buttonGroupVariants=Kl;exports.checkboxVariants=km;exports.formatDate=ad;exports.toggleVariants=Ro;exports.useAsRef=ld;exports.useBadgeOverflow=hd;exports.useComboboxAnchor=rl;exports.useDebouncedCallback=ud;exports.useInView=id;exports.useIsMobile=tn;exports.useIsomorphicLayoutEffect=rn;exports.useLazyRef=cd;exports.useResolvedTheme=sd;exports.useScrollSpy=en;exports.useSidebar=et;
504
+ }`;function xh({className:e,containerClassName:t,...r}){return o.jsx(nc,{"data-slot":"input-otp",containerClassName:v.cn("cn-input-otp flex items-center has-disabled:opacity-50",t),spellCheck:!1,className:v.cn("disabled:cursor-not-allowed",e),...r})}function wh({className:e,...t}){return o.jsx("div",{"data-slot":"input-otp-group",className:v.cn("has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive rounded-md has-aria-invalid:ring-[2px] flex items-center",e),...t})}function Ch({index:e,className:t,...r}){const n=i.useContext(oc),{char:a,hasFakeCaret:s,isActive:l}=n?.slots[e]??{};return o.jsxs("div",{"data-slot":"input-otp-slot","data-active":l,className:v.cn("bg-input/20 dark:bg-input/30 border-input data-[active=true]:border-ring data-[active=true]:ring-ring/30 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive size-7 border-y border-r text-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:ring-[2px] relative flex items-center justify-center data-[active=true]:z-10",t),...r,children:[a,s&&o.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:o.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000 bg-foreground h-4 w-px"})})]})}function yh({...e}){return o.jsx("div",{"data-slot":"input-otp-separator",className:"[&_svg:not([class*='size-'])]:size-4 flex items-center",role:"separator",...e,children:o.jsx(U.HugeiconsIcon,{icon:Y.MinusSignIcon,strokeWidth:2})})}function Sh({className:e,...t}){return o.jsx("div",{role:"list","data-slot":"item-group",className:v.cn("gap-4 has-[[data-size=sm]]:gap-2.5 has-[[data-size=xs]]:gap-2 group/item-group flex w-full flex-col",e),...t})}function Nh({className:e,...t}){return o.jsx(De,{"data-slot":"item-separator",orientation:"horizontal",className:v.cn("my-2",e),...t})}const Mh=oe.cva("[a]:hover:bg-accent [a]:hover:text-accent-foreground rounded-md border text-xs w-full group/item ring-offset-background flex items-center flex-wrap outline-none transition-colors duration-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 [a]:transition-colors",{variants:{variant:{default:"border-transparent",outline:"border-border",muted:"bg-muted/50 border-transparent"},size:{default:"gap-2.5 px-3 py-2.5",sm:"gap-2.5 px-3 py-2.5",xs:"gap-2.5 px-2.5 py-2 [[data-slot=dropdown-menu-content]_&]:p-0"}},defaultVariants:{variant:"default",size:"default"}});function kh({className:e,variant:t="default",size:r="default",asChild:n=!1,...a}){const s=n?ir.Root:"div";return o.jsx(s,{"data-slot":"item","data-variant":t,"data-size":r,className:v.cn(Mh({variant:t,size:r,className:e})),...a})}const Rh=oe.cva("gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none",{variants:{variant:{default:"bg-transparent",icon:"[&_svg:not([class*='size-'])]:size-4",image:"size-8 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"}},defaultVariants:{variant:"default"}});function Eh({className:e,variant:t="default",...r}){return o.jsx("div",{"data-slot":"item-media","data-variant":t,className:v.cn(Rh({variant:t,className:e})),...r})}function jh({className:e,...t}){return o.jsx("div",{"data-slot":"item-content",className:v.cn("gap-1 group-data-[size=xs]/item:gap-0.5 flex flex-1 flex-col [&+[data-slot=item-content]]:flex-none",e),...t})}function Ih({className:e,...t}){return o.jsx("div",{"data-slot":"item-title",className:v.cn("gap-2 text-xs leading-snug font-medium underline-offset-4 line-clamp-1 flex w-fit items-center",e),...t})}function Th({className:e,...t}){return o.jsx("p",{"data-slot":"item-description",className:v.cn("text-muted-foreground text-left text-xs [&>a:hover]:text-primary line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4",e),...t})}function _h({className:e,...t}){return o.jsx("div",{"data-slot":"item-actions",className:v.cn("gap-2 flex items-center",e),...t})}function Ph({className:e,...t}){return o.jsx("div",{"data-slot":"item-header",className:v.cn("gap-2 flex basis-full items-center justify-between",e),...t})}function Ah({className:e,...t}){return o.jsx("div",{"data-slot":"item-footer",className:v.cn("gap-2 flex basis-full items-center justify-between",e),...t})}function Dh({className:e,...t}){return o.jsx("kbd",{"data-slot":"kbd",className:v.cn("bg-muted text-muted-foreground [[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-xs px-1 font-sans text-[0.625rem] font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none",e),...t})}function Oh({className:e,...t}){return o.jsx("kbd",{"data-slot":"kbd-group",className:v.cn("gap-1 inline-flex items-center",e),...t})}function Lh({className:e,...t}){return o.jsx(of,{"data-slot":"menubar",className:v.cn("bg-background h-9 rounded-md border p-1 flex items-center",e),...t})}function $h({...e}){return o.jsx(nf,{"data-slot":"menubar-menu",...e})}function zh({...e}){return o.jsx(cf,{"data-slot":"menubar-group",...e})}function ac({...e}){return o.jsx(sf,{"data-slot":"menubar-portal",...e})}function Fh({...e}){return o.jsx(ff,{"data-slot":"menubar-radio-group",...e})}function Hh({className:e,...t}){return o.jsx(af,{"data-slot":"menubar-trigger",className:v.cn("hover:bg-accent hover:text-accent-foreground aria-expanded:bg-accent aria-expanded:text-accent-foreground rounded-md px-2 py-[calc(--spacing(0.875))] text-xs font-medium flex items-center outline-hidden select-none transition-colors",e),...t})}function Gh({className:e,align:t="start",alignOffset:r=-4,sideOffset:n=8,...a}){return o.jsx(ac,{children:o.jsx(lf,{"data-slot":"menubar-content",align:t,alignOffset:r,sideOffset:n,className:v.cn(g.floatingSurface,"data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-32 p-1 duration-100 z-[var(--z-popover)] origin-(--radix-menubar-content-transform-origin) overflow-hidden",e),...a})})}function Bh({className:e,inset:t,variant:r="default",...n}){return o.jsx(uf,{"data-slot":"menubar-item","data-inset":t,"data-variant":r,className:v.cn(g.floatingListItemInteractive,"data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 px-2 py-1 text-xs data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg:not([class*='size-'])]:size-3.5 group/menubar-item relative flex cursor-default select-none data-[disabled]:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n})}function Vh({className:e,children:t,checked:r,...n}){return o.jsxs(pf,{"data-slot":"menubar-checkbox-item",className:v.cn(g.floatingListItemInteractive,"focus:**:text-accent-foreground min-h-7 gap-2 py-1.5 pr-2 pl-8 text-xs data-disabled:opacity-50 relative flex cursor-default select-none data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",e),checked:r,...n,children:[o.jsx("span",{className:"left-2 size-4 [&_svg:not([class*='size-'])]:size-4 pointer-events-none absolute flex items-center justify-center",children:o.jsx(bs,{children:o.jsx(U.HugeiconsIcon,{icon:Y.Tick02Icon,strokeWidth:2})})}),t]})}function Wh({className:e,children:t,...r}){return o.jsxs(mf,{"data-slot":"menubar-radio-item",className:v.cn(g.floatingListItemInteractive,"focus:**:text-accent-foreground min-h-7 gap-2 py-1.5 pr-2 pl-8 text-xs data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-default select-none data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[o.jsx("span",{className:"left-2 size-4 [&_svg:not([class*='size-'])]:size-4 pointer-events-none absolute flex items-center justify-center",children:o.jsx(bs,{children:o.jsx(U.HugeiconsIcon,{icon:Y.Tick02Icon,strokeWidth:2})})}),t]})}function Kh({className:e,inset:t,...r}){return o.jsx(df,{"data-slot":"menubar-label","data-inset":t,className:v.cn("text-muted-foreground px-2 py-1.5 text-xs data-[inset]:pl-8",e),...r})}function qh({className:e,...t}){return o.jsx(gf,{"data-slot":"menubar-separator",className:v.cn("bg-border/50 -mx-1 my-1 h-px",e),...t})}function Uh({className:e,...t}){return o.jsx("span",{"data-slot":"menubar-shortcut",className:v.cn("text-muted-foreground group-focus/menubar-item:text-accent-foreground text-[0.625rem] tracking-widest ml-auto",e),...t})}function Yh({...e}){return o.jsx(hf,{"data-slot":"menubar-sub",...e})}function Xh({className:e,inset:t,children:r,...n}){return o.jsxs(vf,{"data-slot":"menubar-sub-trigger","data-inset":t,className:v.cn(g.floatingListItemInteractive,"data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 px-2 py-1 text-xs data-[inset]:pl-8 [&_svg:not([class*='size-'])]:size-3.5 flex cursor-default select-none",e),...n,children:[r,o.jsx(U.HugeiconsIcon,{icon:Y.ArrowRight01Icon,strokeWidth:2,className:"ml-auto size-4"})]})}function Zh({className:e,...t}){return o.jsx(bf,{"data-slot":"menubar-sub-content",className:v.cn(g.floatingSurface,"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-32 p-1 duration-100 z-[var(--z-popover)] origin-(--radix-menubar-content-transform-origin) overflow-hidden",e),...t})}function Qh({className:e,size:t="default",...r}){return o.jsxs("div",{className:v.cn("group/native-select relative w-fit has-[select:disabled]:opacity-50",e),"data-slot":"native-select-wrapper","data-size":t,children:[o.jsx("select",{"data-slot":"native-select","data-size":t,className:"border-input bg-input/20 placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-7 w-full min-w-0 appearance-none rounded-md border py-0.5 pr-6 pl-2 text-xs transition-colors select-none focus-visible:ring-[2px] aria-invalid:ring-[2px] data-[size=sm]:h-6 data-[size=sm]:text-[0.625rem] outline-none disabled:pointer-events-none disabled:cursor-not-allowed",...r}),o.jsx(U.HugeiconsIcon,{icon:Y.UnfoldMoreIcon,strokeWidth:2,className:"text-muted-foreground top-1/2 right-1.5 size-3.5 -translate-y-1/2 group-data-[size=sm]/native-select:size-3 group-data-[size=sm]/native-select:-translate-y-[calc(--spacing(1.25))] pointer-events-none absolute select-none","aria-hidden":"true","data-slot":"native-select-icon"})]})}function Jh({...e}){return o.jsx("option",{"data-slot":"native-select-option",...e})}function ev({className:e,...t}){return o.jsx("optgroup",{"data-slot":"native-select-optgroup",className:v.cn(e),...t})}function tv({className:e,children:t,viewport:r=!0,...n}){return o.jsxs(Af,{"data-slot":"navigation-menu","data-viewport":r,className:v.cn("max-w-max group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,r&&o.jsx(sc,{})]})}function rv({className:e,...t}){return o.jsx(Df,{"data-slot":"navigation-menu-list",className:v.cn("gap-0 group flex flex-1 list-none items-center justify-center",e),...t})}function ov({className:e,...t}){return o.jsx(Of,{"data-slot":"navigation-menu-item",className:v.cn("relative",e),...t})}const nv=oe.cva("bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-open:hover:bg-accent data-open:focus:bg-accent data-open:bg-accent data-open:text-accent-foreground focus-visible:ring-ring/30 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-popup-open:hover:bg-accent rounded-md px-2.5 py-1.5 text-xs font-medium transition-all focus-visible:ring-[2px] focus-visible:outline-1 disabled:opacity-50 group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center disabled:pointer-events-none outline-none");function av({className:e,children:t,...r}){return o.jsxs(Lf,{"data-slot":"navigation-menu-trigger",className:v.cn(nv(),"group",e),...r,children:[t," ",o.jsx(U.HugeiconsIcon,{icon:Y.ArrowDown01Icon,strokeWidth:2,className:"relative top-[1px] ml-1 size-3 transition duration-200 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180","aria-hidden":"true"})]})}function sv({className:e,...t}){return o.jsx(Ff,{"data-slot":"navigation-menu-content",className:v.cn("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:border-border group-data-[viewport=false]/navigation-menu:shadow-sm p-1.5 ease-[var(--ease-out)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:duration-200 top-0 left-0 w-full min-w-[200px] group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none md:absolute md:w-auto group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0",e),...t})}function sc({className:e,...t}){return o.jsx("div",{className:v.cn("absolute top-full left-0 isolate z-[var(--z-popover)] flex justify-center"),children:o.jsx(Hf,{"data-slot":"navigation-menu-viewport",className:v.cn(g.floatingSurface,"data-open:animate-in data-closed:animate-out data-closed:zoom-out-95 data-open:zoom-in-90 origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full min-w-[200px] overflow-hidden md:w-[var(--radix-navigation-menu-viewport-width)]",e),...t})})}function iv({className:e,...t}){return o.jsx($f,{"data-slot":"navigation-menu-link",className:v.cn("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent data-[active=true]:text-accent-foreground focus-visible:ring-ring/30 hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex items-center gap-1.5 rounded-lg p-2 text-xs whitespace-nowrap transition-all outline-none focus-visible:ring-[2px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",e),...t})}function lv({className:e,...t}){return o.jsx(zf,{"data-slot":"navigation-menu-indicator",className:v.cn("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",e),...t,children:o.jsx("div",{className:"bg-border rounded-tl-sm shadow-md relative top-[60%] h-2 w-2 rotate-45"})})}const zt=i.createContext({canGoPrev:!1,canGoNext:!0});function cv(e,t,r){if(t<=r)return Array.from({length:t},(f,u)=>u+1);const n=Math.floor((r-1)/2),a=Math.max(2,e-n);let s=Math.max(2,Math.min(a,t-1-(r-3))),l=Math.min(t-1,s+r-3);const c=Math.max(1,l-s+1);if(e>1&&e<t){let f=e-Math.floor((c-1)/2);f=Math.max(2,Math.min(f,t-1-(c-1))),s=f,l=f+c-1}const d=[1];s>2&&d.push("ellipsis");for(let f=s;f<=l;f++)d.push(f);return l<t-1&&d.push("ellipsis"),d.push(t),d}function No({className:e,...t}){return o.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:v.cn("relative flex w-full min-w-0 items-center gap-1",e),...t})}const Mo=i.forwardRef(function({className:t,children:r,viewportStyle:n,style:a,viewportRef:s,fadeMask:l=!0,...c},d){const f=Qo.useComposedRefs(d,s);return o.jsx(At,{...c,orientation:"horizontal",hideScrollbar:!0,fadeMask:l,viewportRef:f,viewportStyle:{scrollPaddingInline:"0.25rem",...typeof a=="object"&&a?a:{},...n??{}},className:v.cn("min-w-0 flex-1",t),children:o.jsx("ul",{"data-slot":"pagination-content",className:"flex w-max min-w-full items-center justify-center gap-0 px-0.5",children:r})})});Mo.displayName="PaginationContent";function nr({...e}){return o.jsx("li",{"data-slot":"pagination-item",...e})}function ic({className:e,...t}){return o.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:v.cn("size-7 shrink-0 items-center justify-center [&_svg:not([class*='size-'])]:size-3.5 flex",e),...t,children:[o.jsx(U.HugeiconsIcon,{icon:Y.MoreHorizontalCircle01Icon,strokeWidth:2}),o.jsx("span",{className:"sr-only",children:"More pages"})]})}const ko=i.forwardRef(({className:e,isActive:t,size:r="icon",onClick:n,...a},s)=>o.jsx("a",{ref:s,className:v.cn(re.buttonVariants({variant:t?"outline":"ghost",size:r}),"shrink-0",e),"aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,onClick:n,...a}));ko.displayName="PaginationLink";function lc({className:e,...t}){const{canGoPrev:r}=i.useContext(zt);return o.jsxs("a",{"data-slot":"pagination-previous","aria-label":"Go to previous page",className:v.cn("z-10 inline-flex size-7 shrink-0 items-center justify-center rounded-full","opacity-0 pointer-events-none group-hover/pagination:pointer-events-auto group-hover/pagination:opacity-70","transition-all duration-150",r?"text-foreground hover:opacity-100":"text-muted-foreground/30 cursor-not-allowed",e),"aria-disabled":!r,...t,children:[o.jsx(U.HugeiconsIcon,{icon:Y.ArrowLeft01Icon,strokeWidth:2}),o.jsx("span",{className:"sr-only",children:"Previous"})]})}function cc({className:e,...t}){const{canGoNext:r}=i.useContext(zt);return o.jsxs("a",{"data-slot":"pagination-next","aria-label":"Go to next page",className:v.cn("z-10 inline-flex size-7 shrink-0 items-center justify-center rounded-full","opacity-0 pointer-events-none group-hover/pagination:pointer-events-auto group-hover/pagination:opacity-70","transition-all duration-150",r?"text-foreground hover:opacity-100":"text-muted-foreground/30 cursor-not-allowed",e),"aria-disabled":!r,...t,children:[o.jsx(U.HugeiconsIcon,{icon:Y.ArrowRight01Icon,strokeWidth:2}),o.jsx("span",{className:"sr-only",children:"Next"})]})}function dv({page:e,totalPages:t,onPageChange:r,maxVisible:n=5,className:a,...s}){const l=i.useRef(null),[c,d]=i.useState(n),f=i.useMemo(()=>cv(e,t,c),[e,t,c]);return i.useEffect(()=>{const u=l.current?.querySelector("[data-active='true']"),p=e<=1?"start":e>=t?"end":"center";u?.scrollIntoView({behavior:"smooth",block:"nearest",inline:p})},[f,e,t]),i.useEffect(()=>{const u=l.current;if(!u)return;const p=new ResizeObserver(m=>{for(const b of m){const h=b.contentRect.width,x=Math.max(3,Math.floor(h/32));d(x)}});return p.observe(u),()=>p.disconnect()},[]),o.jsx(zt.Provider,{value:{canGoPrev:e>1,canGoNext:e<t},children:o.jsxs(No,{className:v.cn("group/pagination",a),...s,children:[o.jsx(lc,{href:"#",onClick:u=>{u.preventDefault(),e>1&&r(e-1)}}),o.jsx(Mo,{ref:l,children:f.map((u,p)=>u==="ellipsis"?o.jsx(nr,{children:o.jsx(ic,{})},`ellipsis-${p}`):o.jsx(nr,{children:o.jsx(ko,{href:"#",isActive:u===e,onClick:m=>{m.preventDefault(),u!==e&&r(u)},children:u})},u))}),o.jsx(cc,{href:"#",onClick:u=>{u.preventDefault(),e<t&&r(e+1)}})]})})}function uv({canGoPrev:e,canGoNext:t,children:r}){return o.jsx(zt.Provider,{value:{canGoPrev:e,canGoNext:t},children:o.jsx(No,{className:"group/pagination",children:r})})}function pv({className:e,...t}){return o.jsx(sr.Group,{"data-slot":"resizable-panel-group",className:v.cn("flex h-full w-full data-[orientation=vertical]:flex-col",e),...t})}function fv({...e}){return o.jsx(sr.Panel,{"data-slot":"resizable-panel",...e})}function mv({withHandle:e,className:t,...r}){return o.jsx(sr.Separator,{"data-slot":"resizable-handle",className:v.cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:translate-x-0 data-[orientation=vertical]:after:-translate-y-1/2 [&[data-orientation=vertical]>div]:rotate-90",t),...r,children:e&&o.jsx("div",{className:"bg-border h-6 w-1 rounded-lg z-10 flex shrink-0"})})}function dc({...e}){return o.jsx(O.Root,{"data-slot":"sheet",...e})}function gv({...e}){return o.jsx(O.Trigger,{"data-slot":"sheet-trigger",...e})}function hv({...e}){return o.jsx(O.Close,{"data-slot":"sheet-close",...e})}function uc({...e}){return o.jsx(O.Portal,{"data-slot":"sheet-portal",...e})}function pc({className:e,...t}){return o.jsx(O.Overlay,{"data-slot":"sheet-overlay",className:v.cn("fixed inset-0 z-[var(--z-modal-backdrop)] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}const vv=oe.cva("group/sheet-content fixed z-[var(--z-modal)] gap-4 bg-transparent p-6 text-card-foreground shadow-lg transition ease-in-out before:absolute before:inset-2 before:-z-10 before:rounded-xl before:bg-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-250",{variants:{side:{top:"inset-x-0 top-0 data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}});function fc({side:e="right",className:t,children:r,showCloseButton:n=!0,...a}){return o.jsxs(uc,{children:[o.jsx(pc,{}),o.jsxs(O.Content,{"data-slot":"sheet-content","data-side":e,className:v.cn(vv({side:e}),t),...a,children:[r,n&&o.jsxs(O.Close,{"data-slot":"sheet-close-button",className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[o.jsx(U.HugeiconsIcon,{icon:Y.Cancel01Icon,size:16,className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function mc({className:e,...t}){return o.jsx("div",{"data-slot":"sheet-header",className:v.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t})}function bv({className:e,...t}){return o.jsx("div",{"data-slot":"sheet-footer",className:v.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t})}function gc({className:e,...t}){return o.jsx(O.Title,{"data-slot":"sheet-title",className:v.cn("text-lg font-semibold text-foreground",e),...t})}function hc({className:e,...t}){return o.jsx(O.Description,{"data-slot":"sheet-description",className:v.cn("text-sm text-muted-foreground",e),...t})}function ar({className:e,...t}){return o.jsx("div",{className:v.cn("animate-pulse rounded-md bg-muted",e),...t})}const xv="sidebar_state",wv=3600*24*7,Cv="22rem",yv="18rem",Sv="3rem",vc=i.createContext(null);function et(){const e=i.useContext(vc);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const bc=i.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:a,children:s,...l},c)=>{const d=tn(),[f,u]=i.useState(!1),[p,m]=i.useState(e),b=t??p,h=i.useCallback(N=>{const y=typeof N=="function"?N(b):N;r?r(y):m(y),document.cookie=`${xv}=${y}; path=/; max-age=${wv}`},[r,b]),x=i.useCallback(()=>d?u(N=>!N):h(N=>!N),[d,h,u]);i.useEffect(()=>{const N=y=>{y.key===_e.SHORTCUT_KEYS.sidebarToggle&&_e.isMod(y)&&(y.preventDefault(),x())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[x]);const w=b?"expanded":"collapsed",C=i.useMemo(()=>({state:w,open:b,setOpen:h,isMobile:d,openMobile:f,setOpenMobile:u,toggleSidebar:x}),[w,b,h,d,f,u,x]);return o.jsx(vc.Provider,{value:C,children:o.jsx(S.TooltipProvider,{delayDuration:0,children:o.jsx("div",{style:{"--sidebar-width":Cv,"--sidebar-width-icon":Sv,...a},className:v.cn("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",n),ref:c,...l,children:s})})})});bc.displayName="SidebarProvider";const xc=i.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:a,...s},l)=>{const{isMobile:c,state:d,openMobile:f,setOpenMobile:u}=et();return r==="none"?o.jsx("div",{className:v.cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:l,...s,children:a}):c?o.jsx(dc,{open:f,onOpenChange:u,...s,children:o.jsxs(fc,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":yv},side:e,children:[o.jsxs(mc,{className:"sr-only",children:[o.jsx(gc,{children:"Sidebar"}),o.jsx(hc,{children:"Displays the mobile sidebar."})]}),o.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):o.jsxs("div",{ref:l,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?r:"","data-variant":t,"data-side":e,children:[o.jsx("div",{className:v.cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),o.jsx("div",{className:v.cn("fixed inset-y-0 z-[var(--z-floating)] hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...s,children:o.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:a})})]})});xc.displayName="Sidebar";const wc=i.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:a}=et();return o.jsx(re.Button,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:v.cn("h-7 w-7",e),onClick:s=>{t?.(s),a()},...r,children:o.jsx(U.HugeiconsIcon,{icon:Y.PanelLeftIcon,size:16})})});wc.displayName="SidebarTrigger";const Cc=i.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=et();return o.jsx("button",{ref:r,"data-sidebar":"rail",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:v.cn("absolute inset-y-0 z-[var(--z-sticky-page)] hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:-left-4 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Cc.displayName="SidebarRail";const yc=i.forwardRef(({className:e,...t},r)=>o.jsx("main",{ref:r,className:v.cn("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));yc.displayName="SidebarInset";const Sc=i.forwardRef(({className:e,...t},r)=>o.jsx(S.Input,{ref:r,"data-sidebar":"input",className:v.cn("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Sc.displayName="SidebarInput";const Nc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"header",className:v.cn("flex flex-col gap-2 p-2",e),...t}));Nc.displayName="SidebarHeader";const Mc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"footer",className:v.cn("flex flex-col gap-2 p-2",e),...t}));Mc.displayName="SidebarFooter";const kc=i.forwardRef(({className:e,...t},r)=>o.jsx(De,{ref:r,"data-sidebar":"separator",className:v.cn("mx-2 w-auto bg-sidebar-border",e),...t}));kc.displayName="SidebarSeparator";const Rc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"content",className:v.cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden group-data-[collapsible=icon]:overflow-hidden",e),...t}));Rc.displayName="SidebarContent";const Ec=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group",className:v.cn("relative flex w-full min-w-0 flex-col p-2",e),...t}));Ec.displayName="SidebarGroup";const jc=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?be.Slot:"div";return o.jsx(a,{ref:n,"data-sidebar":"group-label",className:v.cn("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});jc.displayName="SidebarGroupLabel";const Ic=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?be.Slot:"button";return o.jsx(a,{ref:n,"data-sidebar":"group-action",className:v.cn("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});Ic.displayName="SidebarGroupAction";const Tc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group-content",className:v.cn("w-full text-sm",e),...t}));Tc.displayName="SidebarGroupContent";const _c=i.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu",className:v.cn("flex w-full min-w-0 flex-col gap-1",e),...t}));_c.displayName="SidebarMenu";const Pc=i.forwardRef(({className:e,...t},r)=>o.jsx("li",{ref:r,"data-sidebar":"menu-item",className:v.cn("group/menu-item relative",e),...t}));Pc.displayName="SidebarMenuItem";const Nv=oe.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:[&>span:last-child]:hidden [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-transparent shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ac=i.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:a,className:s,...l},c)=>{const d=e?be.Slot:"button",{isMobile:f,state:u}=et(),p=o.jsx(d,{ref:c,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:v.cn(Nv({variant:r,size:n}),s),...l});return a?(typeof a=="string"&&(a={children:a}),o.jsxs(S.Tooltip,{children:[o.jsx(S.TooltipTrigger,{asChild:!0,children:p}),o.jsx(S.TooltipContent,{side:"right",align:"center",hidden:u!=="collapsed"||f,...a})]})):p});Ac.displayName="SidebarMenuButton";const Dc=i.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},a)=>{const s=t?be.Slot:"button";return o.jsx(s,{ref:a,"data-sidebar":"menu-action",className:v.cn("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...n})});Dc.displayName="SidebarMenuAction";const Oc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:v.cn("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Oc.displayName="SidebarMenuBadge";const Lc=i.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const a=i.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return o.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:v.cn("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[t&&o.jsx(ar,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),o.jsx(ar,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});Lc.displayName="SidebarMenuSkeleton";const $c=i.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:v.cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));$c.displayName="SidebarMenuSub";const zc=i.forwardRef(({...e},t)=>o.jsx("li",{ref:t,...e}));zc.displayName="SidebarMenuSubItem";const Fc=i.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...a},s)=>{const l=e?be.Slot:"a";return o.jsx(l,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:v.cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...a})});Fc.displayName="SidebarMenuSubButton";const at=2*Math.PI*100;function Mv({className:e,...t}){const r=i.useId().replace(/:/g,"");return o.jsx("div",{role:"status","aria-label":"Loading",className:v.cn("relative inline-flex size-4 shrink-0 items-center justify-center",e),...t,children:o.jsx("div",{className:"nqui-spinner-rotate absolute inset-0 flex items-center justify-center",children:o.jsxs("svg",{className:"size-full overflow-visible",viewBox:"0 0 220 220",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[o.jsxs("defs",{children:[o.jsxs("linearGradient",{id:`nqui-spinner-g1-${r}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[o.jsx("stop",{offset:"0%",stopColor:"var(--primary)"}),o.jsx("stop",{offset:"100%",stopColor:"color-mix(in oklch, var(--primary) 35%, white)"})]}),o.jsxs("linearGradient",{id:`nqui-spinner-g2-${r}`,x1:"100%",y1:"0%",x2:"0%",y2:"100%",children:[o.jsx("stop",{offset:"0%",stopColor:"color-mix(in oklch, var(--primary) 65%, white)"}),o.jsx("stop",{offset:"100%",stopColor:"var(--primary)"})]})]}),o.jsx("g",{className:"nqui-spinner-arc-first",children:o.jsx("circle",{cx:"110",cy:"110",r:"100",stroke:`url(#nqui-spinner-g1-${r})`,strokeWidth:"14",strokeLinecap:"round",strokeDasharray:`${at} ${at}`,strokeDashoffset:0})}),o.jsx("g",{className:"nqui-spinner-arc-second",transform:"rotate(-14 110 110)",children:o.jsx("circle",{cx:"110",cy:"110",r:"100",stroke:`url(#nqui-spinner-g2-${r})`,strokeWidth:"14",strokeLinecap:"round",strokeDasharray:`${at} ${at}`,strokeDashoffset:0})})]})})})}function Hc({className:e,...t}){return o.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:o.jsx("table",{"data-slot":"table",className:v.cn("w-full caption-bottom text-xs",e),...t})})}function Gc({className:e,...t}){return o.jsx("thead",{"data-slot":"table-header",className:v.cn("[&_tr]:border-b",e),...t})}function Bc({className:e,...t}){return o.jsx("tbody",{"data-slot":"table-body",className:v.cn("[&_tr:last-child]:border-0",e),...t})}function Vc({className:e,...t}){return o.jsx("tfoot",{"data-slot":"table-footer",className:v.cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function Wc({className:e,...t}){return o.jsx("tr",{"data-slot":"table-row",className:v.cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function Kc({className:e,...t}){return o.jsx("th",{"data-slot":"table-head",className:v.cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...t})}function qc({className:e,...t}){return o.jsx("td",{"data-slot":"table-cell",className:v.cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...t})}function Uc({className:e,...t}){return o.jsx("caption",{"data-slot":"table-caption",className:v.cn("text-muted-foreground mt-4 text-xs",e),...t})}const Ro=oe.cva("hover:text-foreground gap-1 rounded-md text-xs font-medium data-[state=on]:font-bold transition-[color,background-color,border-color,box-shadow] [&_svg:not([class*='size-'])]:size-3.5 group/toggle inline-flex min-w-0 max-w-full items-center justify-center whitespace-nowrap ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive dark:aria-invalid:border-destructive/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 active:data-[state=on]:bg-none active:data-[state=on]:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)]",{variants:{variant:{default:["border border-input bg-background","hover:bg-accent hover:text-accent-foreground","data-[state=on]:bg-secondary data-[state=on]:text-secondary-foreground data-[state=on]:border-border"],outline:["border border-input bg-transparent","hover:bg-accent hover:text-accent-foreground","data-[state=on]:bg-secondary data-[state=on]:text-secondary-foreground data-[state=on]:border-border"],segmented:["border-0 bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground","data-[state=on]:bg-secondary data-[state=on]:text-secondary-foreground data-[state=on]:shadow-none data-[state=on]:hover:bg-secondary/90"]},size:{default:"h-7 min-w-7 px-2",sm:"h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-1.5 text-[0.625rem] [&_svg:not([class*='size-'])]:size-3",lg:"h-8 min-w-8 px-2"}},defaultVariants:{variant:"default",size:"default"}});function kv({className:e,variant:t="default",size:r="default",children:n,...a}){return o.jsx(hm,{"data-slot":"toggle",className:v.cn(Ro({variant:t,size:r,className:e})),...a,children:re.wrapInlineLabelTextNodes(n)})}const Yc=i.createContext({size:"default",variant:"default",spacing:0,orientation:"horizontal",showDividers:!1}),Xc=i.forwardRef(function({className:t,variant:r,size:n,spacing:a=0,orientation:s="horizontal",children:l,separator:c,type:d="single",...f},u){const p=s??"horizontal",m=a===0,b=r??(d==="single"?"segmented":"outline"),h=c??(d==="single"||a===0);return o.jsx(Cm,{ref:u,type:d,orientation:p,"data-slot":"toggle-group","data-variant":b,"data-size":n,"data-spacing":a,"data-orientation":p,style:{"--gap":a},className:v.cn("group/toggle-group flex w-fit max-w-full flex-row items-stretch gap-[--spacing(var(--gap))] data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:max-w-none data-[orientation=vertical]:max-h-full","data-[orientation=horizontal]:overflow-x-auto data-[orientation=vertical]:overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",m&&"rounded-full border border-input bg-background [--toggle-inner-radius:9999px]",!m&&"rounded-full",t),...f,children:o.jsx(Yc.Provider,{value:{variant:b,size:n,spacing:a,orientation:p,showDividers:h&&a===0},children:l})})});Xc.displayName="ToggleGroup";function Rv({className:e,children:t,variant:r="default",size:n="default",...a}){const s=i.useContext(Yc);return o.jsx(ym,{"data-slot":"toggle-group-item","data-variant":s.variant||r,"data-size":s.size||n,"data-spacing":s.spacing,className:v.cn("shrink-0 focus:z-10 focus-visible:z-10","group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2","group-data-horizontal/toggle-group:data-[spacing=0]:first:!rounded-l-[var(--toggle-inner-radius)] group-data-horizontal/toggle-group:data-[spacing=0]:first:!rounded-r-none group-data-horizontal/toggle-group:data-[spacing=0]:last:!rounded-r-[var(--toggle-inner-radius)] group-data-horizontal/toggle-group:data-[spacing=0]:last:!rounded-l-none","group-data-vertical/toggle-group:data-[spacing=0]:first:!rounded-t-[var(--toggle-inner-radius)] group-data-vertical/toggle-group:data-[spacing=0]:first:!rounded-b-none group-data-vertical/toggle-group:data-[spacing=0]:last:!rounded-b-[var(--toggle-inner-radius)] group-data-vertical/toggle-group:data-[spacing=0]:last:!rounded-t-none","group-data-[spacing=0]/toggle-group:data-[variant=outline]:!border-0 group-data-[spacing=0]/toggle-group:data-[variant=segmented]:!border-0",Ro({variant:s.variant||r,size:s.size||n}),e),...a,children:t})}function Ev({className:e,orientation:t="vertical",variant:r="solid",...n}){return o.jsx(De,{"data-slot":"toggle-group-separator",variant:r,orientation:t,className:v.cn("relative self-stretch shrink-0 min-w-px min-h-px","bg-border",e),...n})}function jv(){const{setTheme:e,theme:t}=He.z(),[r,n]=i.useState(!1);i.useEffect(()=>{n(!0)},[]);const a=()=>{e(t==="dark"?"light":"dark")};if(!r)return o.jsxs(re.EnhancedButton,{variant:"outline",size:"icon",children:[o.jsx(U.HugeiconsIcon,{icon:Y.PaintBoardIcon,size:16,className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Toggle theme"})]});const s=t||"light";return o.jsxs(re.EnhancedButton,{variant:"outline",size:"icon",className:"relative",onClick:a,children:[o.jsx(U.HugeiconsIcon,{icon:Y.PaintBoardIcon,size:16,className:`absolute h-4 w-4 transition-all duration-200 ${s==="light"?"rotate-0 scale-100 opacity-100":"rotate-90 scale-0 opacity-0"}`}),o.jsx(U.HugeiconsIcon,{icon:Y.Moon01Icon,size:16,className:`absolute h-4 w-4 transition-all duration-200 ${s==="dark"?"rotate-0 scale-100 opacity-100":"rotate-90 scale-0 opacity-0"}`}),o.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function Iv({align:e="end"}){const{theme:t,setTheme:r}=He.z(),[n,a]=i.useState(!1);i.useEffect(()=>{a(!0)},[]);const s=n?t==="dark"?"Dark":t==="light"?"Light":"System":"Theme";return o.jsxs(uo,{children:[o.jsx(po,{asChild:!0,children:o.jsxs(re.EnhancedButton,{type:"button",variant:"outline",size:"sm",className:"gap-1.5 px-2","aria-label":"Choose color theme",children:[o.jsx(U.HugeiconsIcon,{icon:Y.PaintBoardIcon,strokeWidth:2,size:16,className:"opacity-80"}),o.jsx("span",{className:"hidden sm:inline",children:s}),o.jsx(U.HugeiconsIcon,{icon:Y.ArrowDown01Icon,strokeWidth:2,size:14,className:"opacity-70"})]})}),o.jsxs(Dt,{align:e,className:"w-44",children:[o.jsx(Ot,{children:"Appearance"}),o.jsx(Lt,{}),o.jsxs(fo,{value:n?t??"system":"system",onValueChange:r,children:[o.jsx($e,{value:"light",children:"Light"}),o.jsx($e,{value:"dark",children:"Dark"}),o.jsx($e,{value:"system",children:"System"})]})]})]})}class Tv extends i.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){this.props.onError?.(t,r)}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&(t.resetKeys?.some((n,a)=>n!==this.props.resetKeys?.[a])??!1)&&this.reset()}reset=()=>{this.setState({hasError:!1,error:null})};render(){return this.state.hasError?this.props.fallback?this.props.fallback:o.jsx("div",{className:"flex min-h-[200px] w-full items-center justify-center rounded-lg border border-destructive bg-destructive/10 p-4 text-destructive",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("p",{className:"font-semibold",children:"Something went wrong"}),this.state.error&&o.jsx("p",{className:"text-sm opacity-80",children:this.state.error.message}),this.props.resetKeys&&o.jsx("button",{onClick:this.reset,className:"mt-2 rounded-md bg-destructive px-4 py-2 text-sm font-medium text-white hover:bg-destructive/90",children:"Try again"})]})}):this.props.children}}exports.cn=v.cn;exports.useComposedRefs=Qo.useComposedRefs;exports.Keys=_e.Keys;exports.REMOVE_SHORTCUT_KEYS=_e.REMOVE_SHORTCUT_KEYS;exports.SHORTCUT_KEYS=_e.SHORTCUT_KEYS;exports.isMod=_e.isMod;exports.shouldIgnoreKeyboardShortcut=_e.shouldIgnoreKeyboardShortcut;exports.Calendar=Ct.EnhancedCalendar;exports.CalendarDayButton=Ct.CalendarDayButton;exports.CoreCalendar=Ct.Calendar;exports.useDetectTouch=Ct.useDetectTouch;exports.CoreToaster=He.Toaster;exports.EnhancedSonner=He.EnhancedSonner;exports.Toaster=He.Toaster;exports.Collapsible=S.Collapsible;exports.CollapsibleContent=S.CollapsibleContent;exports.CollapsibleTrigger=S.CollapsibleTrigger;exports.ColorPicker=S.ColorPicker;exports.ColorSlider=S.ColorSlider;exports.CoreSelect=S.Select;exports.CoreSelectContent=S.SelectContent;exports.CoreSelectGroup=S.SelectGroup;exports.CoreSelectItem=S.SelectItem;exports.CoreSelectLabel=S.SelectLabel;exports.CoreSelectScrollDownButton=S.SelectScrollDownButton;exports.CoreSelectScrollUpButton=S.SelectScrollUpButton;exports.CoreSelectSeparator=S.SelectSeparator;exports.CoreSelectTrigger=S.SelectTrigger;exports.CoreSelectValue=S.SelectValue;exports.CoreTabs=S.Tabs;exports.CoreTabsContent=S.TabsContent;exports.CoreTabsList=S.TabsList;exports.CoreTabsTrigger=S.TabsTrigger;exports.Crosshair=S.Crosshair;exports.DebugPanel=S.DebugPanel;exports.Input=S.Input;exports.Label=S.Label;exports.Magnifier=S.Magnifier;exports.Popover=S.Popover;exports.PopoverAnchor=S.PopoverAnchor;exports.PopoverContent=S.PopoverContent;exports.PopoverTrigger=S.PopoverTrigger;exports.Select=S.Select;exports.SelectContent=S.SelectContent;exports.SelectGroup=S.SelectGroup;exports.SelectItem=S.SelectItem;exports.SelectLabel=S.SelectLabel;exports.SelectScrollDownButton=S.SelectScrollDownButton;exports.SelectScrollUpButton=S.SelectScrollUpButton;exports.SelectSeparator=S.SelectSeparator;exports.SelectTrigger=S.SelectTrigger;exports.SelectValue=S.SelectValue;exports.Slider=S.Slider;exports.Switch=S.Switch;exports.Tabs=S.EnhancedTabs;exports.TabsContent=S.EnhancedTabsContent;exports.TabsList=S.EnhancedTabsList;exports.TabsTrigger=S.EnhancedTabsTrigger;exports.Textarea=S.Textarea;exports.Tooltip=S.Tooltip;exports.TooltipContent=S.TooltipContent;exports.TooltipProvider=S.TooltipProvider;exports.TooltipTrigger=S.TooltipTrigger;exports.UITester=S.UITester;exports.sliderThumbVariants=S.sliderThumbVariants;exports.sliderTrackVariants=S.sliderTrackVariants;exports.switchThumbVariants=S.switchThumbVariants;exports.switchVariants=S.switchVariants;exports.Button=re.EnhancedButton;exports.CoreButton=re.Button;exports.buttonVariants=re.enhancedButtonVariants;exports.Command=O.Command;exports.CommandDialog=O.CommandDialog;exports.CommandEmpty=O.CommandEmpty;exports.CommandGroup=O.CommandGroup;exports.CommandInput=O.CommandInput;exports.CommandItem=O.CommandItem;exports.CommandList=O.CommandList;exports.CommandPalette=O.CommandPalette;exports.CommandSeparator=O.CommandSeparator;exports.CommandShortcut=O.CommandShortcut;exports.Dialog=O.Dialog;exports.DialogClose=O.DialogClose;exports.DialogContent=O.DialogContent;exports.DialogDescription=O.DialogDescription;exports.DialogFooter=O.DialogFooter;exports.DialogHeader=O.DialogHeader;exports.DialogOverlay=O.DialogOverlay;exports.DialogPortal=O.DialogPortal;exports.DialogTitle=O.DialogTitle;exports.DialogTrigger=O.DialogTrigger;exports.InputGroup=O.InputGroup;exports.InputGroupAddon=O.InputGroupAddon;exports.InputGroupButton=O.InputGroupButton;exports.InputGroupInput=O.InputGroupInput;exports.InputGroupText=O.InputGroupText;exports.InputGroupTextarea=O.InputGroupTextarea;exports.Carousel=qe.Carousel;exports.CarouselContent=qe.CarouselContent;exports.CarouselItem=qe.CarouselItem;exports.CarouselNext=qe.CarouselNext;exports.CarouselPrevious=qe.CarouselPrevious;exports.Drawer=xe.Drawer;exports.DrawerClose=xe.DrawerClose;exports.DrawerContent=xe.DrawerContent;exports.DrawerDescription=xe.DrawerDescription;exports.DrawerFooter=xe.DrawerFooter;exports.DrawerHeader=xe.DrawerHeader;exports.DrawerOverlay=xe.DrawerOverlay;exports.DrawerPortal=xe.DrawerPortal;exports.DrawerTitle=xe.DrawerTitle;exports.DrawerTrigger=xe.DrawerTrigger;exports.Sortable=Ue.SortableRoot;exports.SortableContent=Ue.SortableContent;exports.SortableItem=Ue.SortableItem;exports.SortableItemHandle=Ue.SortableItemHandle;exports.SortableOverlay=Ue.SortableOverlay;exports.Accordion=Km;exports.AccordionContent=Ym;exports.AccordionItem=qm;exports.AccordionTrigger=Um;exports.Alert=Zm;exports.AlertAction=eg;exports.AlertDescription=Jm;exports.AlertDialog=tg;exports.AlertDialogAction=dg;exports.AlertDialogCancel=ug;exports.AlertDialogContent=ag;exports.AlertDialogDescription=cg;exports.AlertDialogFooter=ig;exports.AlertDialogHeader=sg;exports.AlertDialogTitle=lg;exports.AlertDialogTrigger=rg;exports.AlertTitle=Qm;exports.AspectRatio=pg;exports.Avatar=Al;exports.AvatarFallback=Ol;exports.AvatarImage=Dl;exports.Badge=xt;exports.Breadcrumb=Ll;exports.BreadcrumbEllipsis=Bl;exports.BreadcrumbItem=zl;exports.BreadcrumbLink=Fl;exports.BreadcrumbList=$l;exports.BreadcrumbPage=Hl;exports.BreadcrumbSeparator=Gl;exports.ButtonGroup=Cg;exports.ButtonGroupSeparator=Sg;exports.ButtonGroupText=yg;exports.Card=Ul;exports.CardContent=Ql;exports.CardDescription=Zl;exports.CardFooter=Jl;exports.CardHeader=Yl;exports.CardTitle=Xl;exports.Checkbox=Mi;exports.Combobox=Hi;exports.ComboboxAnchor=xo;exports.ComboboxBadgeTrigger=Wi;exports.ComboboxChip=el;exports.ComboboxChips=Ji;exports.ComboboxChipsInput=tl;exports.ComboboxClear=Co;exports.ComboboxCollection=Xi;exports.ComboboxContent=Vi;exports.ComboboxEmpty=Zi;exports.ComboboxGroup=Ui;exports.ComboboxInput=Bi;exports.ComboboxItem=qi;exports.ComboboxLabel=Yi;exports.ComboboxList=Ki;exports.ComboboxSeparator=Qi;exports.ComboboxTrigger=wo;exports.ComboboxValue=Gi;exports.ContextMenu=Ng;exports.ContextMenuCheckboxItem=Ag;exports.ContextMenuContent=Ig;exports.ContextMenuGroup=kg;exports.ContextMenuItem=Tg;exports.ContextMenuLabel=Og;exports.ContextMenuPortal=Rg;exports.ContextMenuRadioGroup=jg;exports.ContextMenuRadioItem=Dg;exports.ContextMenuSeparator=Lg;exports.ContextMenuShortcut=$g;exports.ContextMenuSub=Eg;exports.ContextMenuSubContent=Pg;exports.ContextMenuSubTrigger=_g;exports.ContextMenuTrigger=Mg;exports.CoreBadge=co;exports.CoreCheckbox=Ni;exports.CoreCombobox=Hi;exports.CoreComboboxAnchor=xo;exports.CoreComboboxBadgeTrigger=Wi;exports.CoreComboboxChip=el;exports.CoreComboboxChips=Ji;exports.CoreComboboxChipsInput=tl;exports.CoreComboboxClear=Co;exports.CoreComboboxCollection=Xi;exports.CoreComboboxContent=Vi;exports.CoreComboboxEmpty=Zi;exports.CoreComboboxGroup=Ui;exports.CoreComboboxInput=Bi;exports.CoreComboboxItem=qi;exports.CoreComboboxLabel=Yi;exports.CoreComboboxList=Ki;exports.CoreComboboxSeparator=Qi;exports.CoreComboboxTrigger=wo;exports.CoreComboboxValue=Gi;exports.CoreDropdownMenu=uo;exports.CoreDropdownMenuCheckboxItem=vo;exports.CoreDropdownMenuContent=Dt;exports.CoreDropdownMenuGroup=ki;exports.CoreDropdownMenuItem=ho;exports.CoreDropdownMenuLabel=Ot;exports.CoreDropdownMenuPortal=Ri;exports.CoreDropdownMenuRadioGroup=fo;exports.CoreDropdownMenuRadioItem=$e;exports.CoreDropdownMenuSeparator=Lt;exports.CoreDropdownMenuShortcut=bo;exports.CoreDropdownMenuSub=Ei;exports.CoreDropdownMenuSubContent=go;exports.CoreDropdownMenuSubTrigger=mo;exports.CoreDropdownMenuTrigger=po;exports.CoreProgress=Om;exports.CoreRadioGroup=Lm;exports.CoreRadioGroupItem=$m;exports.CoreScrollArea=Sm;exports.CoreScrollBar=Ke;exports.CoreTable=Hc;exports.CoreTableBody=Bc;exports.CoreTableCaption=Uc;exports.CoreTableCell=qc;exports.CoreTableFooter=Vc;exports.CoreTableHead=Kc;exports.CoreTableHeader=Gc;exports.CoreTableRow=Wc;exports.CoreUseComboboxAnchor=rl;exports.DropdownMenu=Rm;exports.DropdownMenuCheckboxItem=_i;exports.DropdownMenuContent=Ii;exports.DropdownMenuGroup=Em;exports.DropdownMenuItem=Ti;exports.DropdownMenuLabel=Ai;exports.DropdownMenuPortal=jm;exports.DropdownMenuRadioGroup=Tm;exports.DropdownMenuRadioItem=Pi;exports.DropdownMenuSeparator=Di;exports.DropdownMenuShortcut=Oi;exports.DropdownMenuSub=Im;exports.DropdownMenuSubContent=Li;exports.DropdownMenuSubTrigger=$i;exports.DropdownMenuTrigger=ji;exports.Empty=zg;exports.EmptyContent=Wg;exports.EmptyDescription=Vg;exports.EmptyHeader=Fg;exports.EmptyMedia=Gg;exports.EmptyTitle=Bg;exports.ErrorBoundary=Tv;exports.Field=Xg;exports.FieldContent=Zg;exports.FieldDescription=eh;exports.FieldError=rh;exports.FieldGroup=Ug;exports.FieldLabel=Qg;exports.FieldLegend=qg;exports.FieldSeparator=th;exports.FieldSet=Kg;exports.FieldTitle=Jg;exports.FrostedGlass=ql;exports.HoverCard=oh;exports.HoverCardContent=ah;exports.HoverCardTrigger=nh;exports.InputOTP=xh;exports.InputOTPGroup=wh;exports.InputOTPSeparator=yh;exports.InputOTPSlot=Ch;exports.Item=kh;exports.ItemActions=_h;exports.ItemContent=jh;exports.ItemDescription=Th;exports.ItemFooter=Ah;exports.ItemGroup=Sh;exports.ItemHeader=Ph;exports.ItemMedia=Eh;exports.ItemSeparator=Nh;exports.ItemTitle=Ih;exports.Kbd=Dh;exports.KbdGroup=Oh;exports.Menubar=Lh;exports.MenubarCheckboxItem=Vh;exports.MenubarContent=Gh;exports.MenubarGroup=zh;exports.MenubarItem=Bh;exports.MenubarLabel=Kh;exports.MenubarMenu=$h;exports.MenubarPortal=ac;exports.MenubarRadioGroup=Fh;exports.MenubarRadioItem=Wh;exports.MenubarSeparator=qh;exports.MenubarShortcut=Uh;exports.MenubarSub=Yh;exports.MenubarSubContent=Zh;exports.MenubarSubTrigger=Xh;exports.MenubarTrigger=Hh;exports.NativeSelect=Qh;exports.NativeSelectOptGroup=ev;exports.NativeSelectOption=Jh;exports.NavigationMenu=tv;exports.NavigationMenuContent=sv;exports.NavigationMenuIndicator=lv;exports.NavigationMenuItem=ov;exports.NavigationMenuLink=iv;exports.NavigationMenuList=rv;exports.NavigationMenuTrigger=av;exports.NavigationMenuViewport=sc;exports.NquiLogo=Nl;exports.Pagination=No;exports.PaginationAdaptive=dv;exports.PaginationContent=Mo;exports.PaginationEllipsis=ic;exports.PaginationItem=nr;exports.PaginationLink=ko;exports.PaginationNext=cc;exports.PaginationPrevious=lc;exports.PaginationScroller=uv;exports.Progress=sl;exports.RadioGroup=ll;exports.RadioGroupItem=cl;exports.Rating=dl;exports.ResizableHandle=mv;exports.ResizablePanel=fv;exports.ResizablePanelGroup=pv;exports.ScrollArea=At;exports.ScrollBar=Ke;exports.Separator=De;exports.Sheet=dc;exports.SheetClose=hv;exports.SheetContent=fc;exports.SheetDescription=hc;exports.SheetFooter=bv;exports.SheetHeader=mc;exports.SheetOverlay=pc;exports.SheetPortal=uc;exports.SheetTitle=gc;exports.SheetTrigger=gv;exports.Sidebar=xc;exports.SidebarContent=Rc;exports.SidebarFooter=Mc;exports.SidebarGroup=Ec;exports.SidebarGroupAction=Ic;exports.SidebarGroupContent=Tc;exports.SidebarGroupLabel=jc;exports.SidebarHeader=Nc;exports.SidebarInput=Sc;exports.SidebarInset=yc;exports.SidebarMenu=_c;exports.SidebarMenuAction=Dc;exports.SidebarMenuBadge=Oc;exports.SidebarMenuButton=Ac;exports.SidebarMenuItem=Pc;exports.SidebarMenuSkeleton=Lc;exports.SidebarMenuSub=$c;exports.SidebarMenuSubButton=Fc;exports.SidebarMenuSubItem=zc;exports.SidebarProvider=bc;exports.SidebarRail=Cc;exports.SidebarSeparator=kc;exports.SidebarTrigger=wc;exports.Skeleton=ar;exports.Spinner=Mv;exports.Table=Hc;exports.TableBody=Bc;exports.TableCaption=Uc;exports.TableCell=qc;exports.TableFooter=Vc;exports.TableHead=Kc;exports.TableHeader=Gc;exports.TableOfContents=fl;exports.TableRow=Wc;exports.ThemeAppearanceMenu=Iv;exports.ThemeToggle=jv;exports.Toggle=kv;exports.ToggleGroup=Xc;exports.ToggleGroupItem=Rv;exports.ToggleGroupSeparator=Ev;exports.Tracker=pl;exports.badgeVariants=Si;exports.buttonGroupVariants=Kl;exports.checkboxVariants=km;exports.formatDate=ad;exports.toggleVariants=Ro;exports.useAsRef=ld;exports.useBadgeOverflow=hd;exports.useComboboxAnchor=rl;exports.useDebouncedCallback=ud;exports.useInView=id;exports.useIsMobile=tn;exports.useIsomorphicLayoutEffect=rn;exports.useLazyRef=cd;exports.useResolvedTheme=sd;exports.useScrollSpy=en;exports.useSidebar=et;