adminizer 4.6.0-build.216 → 4.6.0-build.217
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.
- package/assets/{add-D4xeWCZw.js → add-C6B3ZwYc.js} +1 -1
- package/assets/{add-group-BpWRqFus.js → add-group-HP1jb7VA.js} +1 -1
- package/assets/{add-user-GVaBm2Mv.js → add-user-CwpoBhnE.js} +1 -1
- package/assets/{app-layout-C8wmVuF8.js → app-layout-HwzoFLMz.js} +1 -1
- package/assets/{app-sidebar-hVOY5HV7.js → app-sidebar-Cqj5L2kB.js} +1 -1
- package/assets/app.js +3 -3
- package/assets/{catalog-BO7zfOpo.js → catalog-BiqXcqJM.js} +1 -1
- package/assets/{dashboard-Bw-DdCUd.js → dashboard-CJeHMGdM.js} +1 -1
- package/assets/{form-D0JmJdV_.js → form-BMWREamR.js} +1 -1
- package/assets/{history-7NIKnjNd.js → history-Yi7SOnuz.js} +1 -1
- package/assets/{home-J1oiYf7u.js → home-LTHyVJhs.js} +2 -2
- package/assets/{list-BOQL0Z1i.js → list-BjO-TbRf.js} +1 -1
- package/assets/manifest.json +26 -26
- package/assets/{module-aSIhXeVL.js → module-AhIlQK_S.js} +1 -1
- package/assets/{notification-D8j64-iM.js → notification-yiRh6g8N.js} +1 -1
- package/assets/{welcome-BBz6oL-7.js → welcome-B9W9z-dG.js} +1 -1
- package/controllers/login.d.ts +1 -1
- package/controllers/login.js +9 -7
- package/package.json +1 -1
- package/ui/components/VanillaJSONEditor.js +2 -6
package/assets/app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./add-group-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./add-group-HP1jb7VA.js","./app-layout-HwzoFLMz.js","./app-shell-DbPu3ZPM.js","./handsontable-PxYdjN8c.js","./jsoneditor-De1FvcYu.js","./monaco-BhBYtg3d.js","./app-sidebar-Cqj5L2kB.js","./nav-main-8YJwixyP.js","./material-icon-BXxpxGAd.js","./app-sidebar-header-B__FqkNk.js","./breadcrumbs-CkRn0IkH.js","./nav-user-Booo1xYl.js","./user-info-Cb4KumEO.js","./user-menu-content-BoS7_3sB.js","./theme-switcher-Bx74FM9Q.js","./icon-BTIjB9Wk.js","./RelationDialogStack-BKadPz2U.js","./dynamic-controls-k61T9W2P.js","./input-error-CSrUHo1P.js","./RelationDialogStack-DV8OITPR.css","./add-group-form-B7c4coU-.js","./add-user-CwpoBhnE.js","./add-user-form-BXSGx38D.js","./add-C6B3ZwYc.js","./catalog-BiqXcqJM.js","./del-modal-CF3OUMvW.js","./catalog-D4n6dpGl.css","./dashboard-CJeHMGdM.js","./dashboard-BOltB2Hq.css","./form-BMWREamR.js","./form-DBPr4-Pu.js","./history-Yi7SOnuz.js","./home-LTHyVJhs.js","./init-user-CsEDYKZe.js","./list-BjO-TbRf.js","./list-table-DYfRlgPh.js","./pagination-render-CPeJhHnz.js","./login-puJIq5NA.js","./module-AhIlQK_S.js","./notification-yiRh6g8N.js","./tabs-DTgMEGE8.js","./register-C2TFSMX0.js","./welcome-B9W9z-dG.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{a as dee,c as WH,b as xa,s as Ma,d as ga,i as Mi,h as NF,m as Pj,e as uee,f as hee,z as ZH,v as pee,_ as vn}from"./jsoneditor-De1FvcYu.js";import{r as p,e as ke,a as Kd,b as LF,c as fee,R as wP,d as ur,F as Ca,f as Na,g as La,h as Ea,i as Ia,j as Aa,k as Ta,l as Ra,m as $a,n as ja,o as Pa,p as Oa,q as Da,s as za,t as qa,u as Ha,v as Va,w as Ba,x as Fa,y as Ua,z as Ga,A as Wa,B as Za,C as Xa,D as Ka,E as Ya,G as Qa,H as Ja,I as eo,J as to,K as no,L as ao,M as oo,N as ro,O as io,P as co,Q as so,S as lo,T as uo,U as ho,V as po,W as fo,X as yo,Y as mo,Z as vo,_ as ko,$ as go,a0 as Mo,a1 as xo,a2 as bo,a3 as wo,a4 as _o,a5 as So,a6 as Co,a7 as No,a8 as Lo,a9 as Eo,aa as Io,ab as Ao,ac as To,ad as Ro,ae as $o,af as jo,ag as Po,ah as Oo,ai as Do,aj as zo,ak as qo,al as Ho,am as Vo,an as Bo,ao as Fo,ap as Yd,aq as Qd,ar as Jd,as as yee,at as mee,au as vee,av as kee,aw as gee,ax as Mee,ay as xee,az as bee}from"./handsontable-PxYdjN8c.js";import{F as wee}from"./monaco-BhBYtg3d.js";var r$={exports:{}},e2={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
@@ -8004,7 +8004,7 @@ Error generating stack: `+u.message+`
|
|
|
8004
8004
|
|
|
8005
8005
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
8006
8006
|
|
|
8007
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(a))},[a,e]),null},gIe="DialogDescriptionWarning",MIe=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wW(gIe).contentName}}.`;return p.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},rO=lW,_W=uW,iO=pW,cO=fW,sO=yW,SW=vW,CW=gW,TA=xW,l2='[cmdk-group=""]',Ej='[cmdk-group-items=""]',xIe='[cmdk-group-heading=""]',NW='[cmdk-item=""]',cF=`${NW}:not([aria-disabled="true"])`,tP="cmdk-item-select",zd="data-value",bIe=(e,t,a)=>zLe(e,t,a),LW=p.createContext(void 0),q2=()=>p.useContext(LW),EW=p.createContext(void 0),lO=()=>p.useContext(EW),IW=p.createContext(void 0),AW=p.forwardRef((e,t)=>{let a=qd(()=>{var X,ne;return{search:"",value:(ne=(X=e.value)!=null?X:e.defaultValue)!=null?ne:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=qd(()=>new Set),i=qd(()=>new Map),s=qd(()=>new Map),l=qd(()=>new Set),h=TW(e),{label:f,children:y,value:k,onValueChange:m,filter:x,shouldFilter:S,loop:b,disablePointerSelection:w=!1,vimBindings:_=!0,...N}=e,L=It(),I=It(),O=It(),D=p.useRef(null),P=RIe();V1(()=>{if(k!==void 0){let X=k.trim();a.current.value=X,A.emit()}},[k]),V1(()=>{P(6,F)},[]);let A=p.useMemo(()=>({subscribe:X=>(l.current.add(X),()=>l.current.delete(X)),snapshot:()=>a.current,setState:(X,ne,le)=>{var ie,ye,he,ve;if(!Object.is(a.current[X],ne)){if(a.current[X]=ne,X==="search")B(),K(),P(1,q);else if(X==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let me=document.getElementById(O);me?me.focus():(ie=document.getElementById(L))==null||ie.focus()}if(P(7,()=>{var me;a.current.selectedItemId=(me=J())==null?void 0:me.id,A.emit()}),le||P(5,F),((ye=h.current)==null?void 0:ye.value)!==void 0){let me=ne??"";(ve=(he=h.current).onValueChange)==null||ve.call(he,me);return}}A.emit()}},emit:()=>{l.current.forEach(X=>X())}}),[]),j=p.useMemo(()=>({value:(X,ne,le)=>{var ie;ne!==((ie=s.current.get(X))==null?void 0:ie.value)&&(s.current.set(X,{value:ne,keywords:le}),a.current.filtered.items.set(X,V(ne,le)),P(2,()=>{K(),A.emit()}))},item:(X,ne)=>(o.current.add(X),ne&&(i.current.has(ne)?i.current.get(ne).add(X):i.current.set(ne,new Set([X]))),P(3,()=>{B(),K(),a.current.value||q(),A.emit()}),()=>{s.current.delete(X),o.current.delete(X),a.current.filtered.items.delete(X);let le=J();P(4,()=>{B(),(le==null?void 0:le.getAttribute("id"))===X&&q(),A.emit()})}),group:X=>(i.current.has(X)||i.current.set(X,new Set),()=>{s.current.delete(X),i.current.delete(X)}),filter:()=>h.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:L,inputId:O,labelId:I,listInnerRef:D}),[]);function V(X,ne){var le,ie;let ye=(ie=(le=h.current)==null?void 0:le.filter)!=null?ie:bIe;return X?ye(X,a.current.search,ne):0}function K(){if(!a.current.search||h.current.shouldFilter===!1)return;let X=a.current.filtered.items,ne=[];a.current.filtered.groups.forEach(ie=>{let ye=i.current.get(ie),he=0;ye.forEach(ve=>{let me=X.get(ve);he=Math.max(me,he)}),ne.push([ie,he])});let le=D.current;pe().sort((ie,ye)=>{var he,ve;let me=ie.getAttribute("id"),ge=ye.getAttribute("id");return((he=X.get(ge))!=null?he:0)-((ve=X.get(me))!=null?ve:0)}).forEach(ie=>{let ye=ie.closest(Ej);ye?ye.appendChild(ie.parentElement===ye?ie:ie.closest(`${Ej} > *`)):le.appendChild(ie.parentElement===le?ie:ie.closest(`${Ej} > *`))}),ne.sort((ie,ye)=>ye[1]-ie[1]).forEach(ie=>{var ye;let he=(ye=D.current)==null?void 0:ye.querySelector(`${l2}[${zd}="${encodeURIComponent(ie[0])}"]`);he==null||he.parentElement.appendChild(he)})}function q(){let X=pe().find(le=>le.getAttribute("aria-disabled")!=="true"),ne=X==null?void 0:X.getAttribute(zd);A.setState("value",ne||void 0)}function B(){var X,ne,le,ie;if(!a.current.search||h.current.shouldFilter===!1){a.current.filtered.count=o.current.size;return}a.current.filtered.groups=new Set;let ye=0;for(let he of o.current){let ve=(ne=(X=s.current.get(he))==null?void 0:X.value)!=null?ne:"",me=(ie=(le=s.current.get(he))==null?void 0:le.keywords)!=null?ie:[],ge=V(ve,me);a.current.filtered.items.set(he,ge),ge>0&&ye++}for(let[he,ve]of i.current)for(let me of ve)if(a.current.filtered.items.get(me)>0){a.current.filtered.groups.add(he);break}a.current.filtered.count=ye}function F(){var X,ne,le;let ie=J();ie&&(((X=ie.parentElement)==null?void 0:X.firstChild)===ie&&((le=(ne=ie.closest(l2))==null?void 0:ne.querySelector(xIe))==null||le.scrollIntoView({block:"nearest"})),ie.scrollIntoView({block:"nearest"}))}function J(){var X;return(X=D.current)==null?void 0:X.querySelector(`${NW}[aria-selected="true"]`)}function pe(){var X;return Array.from(((X=D.current)==null?void 0:X.querySelectorAll(cF))||[])}function R(X){let ne=pe()[X];ne&&A.setState("value",ne.getAttribute(zd))}function $(X){var ne;let le=J(),ie=pe(),ye=ie.findIndex(ve=>ve===le),he=ie[ye+X];(ne=h.current)!=null&&ne.loop&&(he=ye+X<0?ie[ie.length-1]:ye+X===ie.length?ie[0]:ie[ye+X]),he&&A.setState("value",he.getAttribute(zd))}function T(X){let ne=J(),le=ne==null?void 0:ne.closest(l2),ie;for(;le&&!ie;)le=X>0?AIe(le,l2):TIe(le,l2),ie=le==null?void 0:le.querySelector(cF);ie?A.setState("value",ie.getAttribute(zd)):$(X)}let G=()=>R(pe().length-1),W=X=>{X.preventDefault(),X.metaKey?G():X.altKey?T(1):$(1)},Me=X=>{X.preventDefault(),X.metaKey?R(0):X.altKey?T(-1):$(-1)};return p.createElement(jn.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:X=>{var ne;(ne=N.onKeyDown)==null||ne.call(N,X);let le=X.nativeEvent.isComposing||X.keyCode===229;if(!(X.defaultPrevented||le))switch(X.key){case"n":case"j":{_&&X.ctrlKey&&W(X);break}case"ArrowDown":{W(X);break}case"p":case"k":{_&&X.ctrlKey&&Me(X);break}case"ArrowUp":{Me(X);break}case"Home":{X.preventDefault(),R(0);break}case"End":{X.preventDefault(),G();break}case"Enter":{X.preventDefault();let ie=J();if(ie){let ye=new Event(tP);ie.dispatchEvent(ye)}}}}},p.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:jIe},f),RA(e,X=>p.createElement(EW.Provider,{value:A},p.createElement(LW.Provider,{value:j},X))))}),wIe=p.forwardRef((e,t)=>{var a,o;let i=It(),s=p.useRef(null),l=p.useContext(IW),h=q2(),f=TW(e),y=(o=(a=f.current)==null?void 0:a.forceMount)!=null?o:l==null?void 0:l.forceMount;V1(()=>{if(!y)return h.item(i,l==null?void 0:l.id)},[y]);let k=RW(i,s,[e.value,e.children,s],e.keywords),m=lO(),x=Ci(P=>P.value&&P.value===k.current),S=Ci(P=>y||h.filter()===!1?!0:P.search?P.filtered.items.get(i)>0:!0);p.useEffect(()=>{let P=s.current;if(!(!P||e.disabled))return P.addEventListener(tP,b),()=>P.removeEventListener(tP,b)},[S,e.onSelect,e.disabled]);function b(){var P,A;w(),(A=(P=f.current).onSelect)==null||A.call(P,k.current)}function w(){m.setState("value",k.current,!0)}if(!S)return null;let{disabled:_,value:N,onSelect:L,forceMount:I,keywords:O,...D}=e;return p.createElement(jn.div,{ref:kt(s,t),...D,id:i,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!x,"data-disabled":!!_,"data-selected":!!x,onPointerMove:_||h.getDisablePointerSelection()?void 0:w,onClick:_?void 0:b},e.children)}),_Ie=p.forwardRef((e,t)=>{let{heading:a,children:o,forceMount:i,...s}=e,l=It(),h=p.useRef(null),f=p.useRef(null),y=It(),k=q2(),m=Ci(S=>i||k.filter()===!1?!0:S.search?S.filtered.groups.has(l):!0);V1(()=>k.group(l),[]),RW(l,h,[e.value,e.heading,f]);let x=p.useMemo(()=>({id:l,forceMount:i}),[i]);return p.createElement(jn.div,{ref:kt(h,t),...s,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},a&&p.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:y},a),RA(e,S=>p.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?y:void 0},p.createElement(IW.Provider,{value:x},S))))}),SIe=p.forwardRef((e,t)=>{let{alwaysRender:a,...o}=e,i=p.useRef(null),s=Ci(l=>!l.search);return!a&&!s?null:p.createElement(jn.div,{ref:kt(i,t),...o,"cmdk-separator":"",role:"separator"})}),CIe=p.forwardRef((e,t)=>{let{onValueChange:a,...o}=e,i=e.value!=null,s=lO(),l=Ci(y=>y.search),h=Ci(y=>y.selectedItemId),f=q2();return p.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),p.createElement(jn.input,{ref:t,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":h,id:f.inputId,type:"text",value:i?e.value:l,onChange:y=>{i||s.setState("search",y.target.value),a==null||a(y.target.value)}})}),NIe=p.forwardRef((e,t)=>{let{children:a,label:o="Suggestions",...i}=e,s=p.useRef(null),l=p.useRef(null),h=Ci(y=>y.selectedItemId),f=q2();return p.useEffect(()=>{if(l.current&&s.current){let y=l.current,k=s.current,m,x=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let S=y.offsetHeight;k.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return x.observe(y),()=>{cancelAnimationFrame(m),x.unobserve(y)}}},[]),p.createElement(jn.div,{ref:kt(s,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":o,id:f.listId},RA(e,y=>p.createElement("div",{ref:kt(l,f.listInnerRef),"cmdk-list-sizer":""},y)))}),LIe=p.forwardRef((e,t)=>{let{open:a,onOpenChange:o,overlayClassName:i,contentClassName:s,container:l,...h}=e;return p.createElement(rO,{open:a,onOpenChange:o},p.createElement(iO,{container:l},p.createElement(cO,{"cmdk-overlay":"",className:i}),p.createElement(sO,{"aria-label":e.label,"cmdk-dialog":"",className:s},p.createElement(AW,{ref:t,...h}))))}),EIe=p.forwardRef((e,t)=>Ci(a=>a.filtered.count===0)?p.createElement(jn.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),IIe=p.forwardRef((e,t)=>{let{progress:a,children:o,label:i="Loading...",...s}=e;return p.createElement(jn.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},RA(e,l=>p.createElement("div",{"aria-hidden":!0},l)))}),Z1=Object.assign(AW,{List:NIe,Item:wIe,Input:CIe,Group:_Ie,Separator:SIe,Dialog:LIe,Empty:EIe,Loading:IIe});function AIe(e,t){let a=e.nextElementSibling;for(;a;){if(a.matches(t))return a;a=a.nextElementSibling}}function TIe(e,t){let a=e.previousElementSibling;for(;a;){if(a.matches(t))return a;a=a.previousElementSibling}}function TW(e){let t=p.useRef(e);return V1(()=>{t.current=e}),t}var V1=typeof window>"u"?p.useEffect:p.useLayoutEffect;function qd(e){let t=p.useRef();return t.current===void 0&&(t.current=e()),t}function Ci(e){let t=lO(),a=()=>e(t.snapshot());return p.useSyncExternalStore(t.subscribe,a,a)}function RW(e,t,a,o=[]){let i=p.useRef(),s=q2();return V1(()=>{var l;let h=(()=>{var y;for(let k of a){if(typeof k=="string")return k.trim();if(typeof k=="object"&&"current"in k)return k.current?(y=k.current.textContent)==null?void 0:y.trim():i.current}})(),f=o.map(y=>y.trim());s.value(e,h,f),(l=t.current)==null||l.setAttribute(zd,h),i.current=h}),i}var RIe=()=>{let[e,t]=p.useState(),a=qd(()=>new Map);return V1(()=>{a.current.forEach(o=>o()),a.current=new Map},[e]),(o,i)=>{a.current.set(o,i),t({})}};function $Ie(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function RA({asChild:e,children:t},a){return e&&p.isValidElement(t)?p.cloneElement($Ie(t),{ref:t.ref},a(t.props.children)):a(t)}var jIe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function $W({...e}){return M.jsx(rO,{"data-slot":"dialog",...e})}function PIe({...e}){return M.jsx(_W,{"data-slot":"dialog-trigger",...e})}function jW({...e}){return M.jsx(iO,{"data-slot":"dialog-portal",...e})}function OIe({...e}){return M.jsx(TA,{"data-slot":"dialog-close",...e})}function PW({className:e,...t}){return M.jsx(cO,{"data-slot":"dialog-overlay",className:ee("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1010] bg-black/50",e),...t})}function OW({className:e,children:t,...a}){return M.jsxs(jW,{"data-slot":"dialog-portal",children:[M.jsx(PW,{}),M.jsxs(sO,{"data-slot":"dialog-content",className:ee("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...a,children:[t,M.jsxs(TA,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[M.jsx(bi,{}),M.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function DW({className:e,...t}){return M.jsx("div",{"data-slot":"dialog-header",className:ee("flex flex-col gap-2 text-center sm:text-left",e),...t})}function DIe({className:e,...t}){return M.jsx("div",{"data-slot":"dialog-footer",className:ee("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function zW({className:e,...t}){return M.jsx(SW,{"data-slot":"dialog-title",className:ee("text-lg leading-none font-semibold",e),...t})}function qW({className:e,...t}){return M.jsx(CW,{"data-slot":"dialog-description",className:ee("text-muted-foreground text-sm",e),...t})}function dO({className:e,...t}){return M.jsx(Z1,{"data-slot":"command",className:ee("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function zIe({title:e="Command Palette",description:t="Search for a command to run...",children:a,...o}){return M.jsxs($W,{...o,children:[M.jsxs(DW,{className:"sr-only",children:[M.jsx(zW,{children:e}),M.jsx(qW,{children:t})]}),M.jsx(OW,{className:"overflow-hidden p-0",children:M.jsx(dO,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:a})})]})}function HW({className:e,...t}){return M.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[M.jsx(g2,{className:"size-4 shrink-0 opacity-50"}),M.jsx(Z1.Input,{"data-slot":"command-input",className:ee("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function VW({className:e,...t}){return M.jsx(Z1.List,{"data-slot":"command-list",className:ee("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function BW({...e}){return M.jsx(Z1.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function FW({className:e,...t}){return M.jsx(Z1.Group,{"data-slot":"command-group",className:ee("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function UW({className:e,...t}){return M.jsx(Z1.Separator,{"data-slot":"command-separator",className:ee("bg-border -mx-1 h-px",e),...t})}function GW({className:e,...t}){return M.jsx(Z1.Item,{"data-slot":"command-item",className:ee("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function qIe({className:e,...t}){return M.jsx("span",{"data-slot":"command-shortcut",className:ee("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function HIe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,VIe(i,...t)]}function VIe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function BIe(e){const t=FIe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(GIe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function FIe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=ZIe(i),h=WIe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var UIe=Symbol("radix.slottable");function GIe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===UIe}function WIe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function ZIe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var XIe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],KIe=XIe.reduce((e,t)=>{const a=BIe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function YIe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,QIe(i,...t)]}function QIe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function sF(e){const t=JIe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(tAe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function JIe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=aAe(i),h=nAe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var eAe=Symbol("radix.slottable");function tAe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===eAe}function nAe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function aAe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}function H2(e){const t=e+"CollectionProvider",[a,o]=YIe(t),[i,s]=a(t,{collectionRef:{current:null},itemMap:new Map}),l=w=>{const{scope:_,children:N}=w,L=ke.useRef(null),I=ke.useRef(new Map).current;return M.jsx(i,{scope:_,itemMap:I,collectionRef:L,children:N})};l.displayName=t;const h=e+"CollectionSlot",f=sF(h),y=ke.forwardRef((w,_)=>{const{scope:N,children:L}=w,I=s(h,N),O=ze(_,I.collectionRef);return M.jsx(f,{ref:O,children:L})});y.displayName=h;const k=e+"CollectionItemSlot",m="data-radix-collection-item",x=sF(k),S=ke.forwardRef((w,_)=>{const{scope:N,children:L,...I}=w,O=ke.useRef(null),D=ze(_,O),P=s(k,N);return ke.useEffect(()=>(P.itemMap.set(O,{ref:O,...I}),()=>void P.itemMap.delete(O))),M.jsx(x,{[m]:"",ref:D,children:L})});S.displayName=k;function b(w){const _=s(e+"CollectionConsumer",w);return ke.useCallback(()=>{const L=_.collectionRef.current;if(!L)return[];const I=Array.from(L.querySelectorAll(`[${m}]`));return Array.from(_.itemMap.values()).sort((P,A)=>I.indexOf(P.ref.current)-I.indexOf(A.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:l,Slot:y,ItemSlot:S},b,o]}function oAe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,rAe(i,...t)]}function rAe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}var iAe=p.createContext(void 0);function V2(e){const t=p.useContext(iAe);return e||t||"ltr"}const cAe=["top","right","bottom","left"],Ni=Math.min,Gn=Math.max,aA=Math.round,Sh=Math.floor,dr=e=>({x:e,y:e}),sAe={left:"right",right:"left",bottom:"top",top:"bottom"};function nP(e,t,a){return Gn(e,Ni(t,a))}function qr(e,t){return typeof e=="function"?e(t):e}function Hr(e){return e.split("-")[0]}function ou(e){return e.split("-")[1]}function uO(e){return e==="x"?"y":"x"}function hO(e){return e==="y"?"height":"width"}function cr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function pO(e){return uO(cr(e))}function lAe(e,t,a){a===void 0&&(a=!1);const o=ou(e),i=pO(e),s=hO(i);let l=i==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=oA(l)),[l,oA(l)]}function dAe(e){const t=oA(e);return[aP(e),t,aP(t)]}function aP(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const lF=["left","right"],dF=["right","left"],uAe=["top","bottom"],hAe=["bottom","top"];function pAe(e,t,a){switch(e){case"top":case"bottom":return a?t?dF:lF:t?lF:dF;case"left":case"right":return t?uAe:hAe;default:return[]}}function fAe(e,t,a,o){const i=ou(e);let s=pAe(Hr(e),a==="start",o);return i&&(s=s.map(l=>l+"-"+i),t&&(s=s.concat(s.map(aP)))),s}function oA(e){const t=Hr(e);return sAe[t]+e.slice(t.length)}function yAe(e){return{top:0,right:0,bottom:0,left:0,...e}}function WW(e){return typeof e!="number"?yAe(e):{top:e,right:e,bottom:e,left:e}}function rA(e){const{x:t,y:a,width:o,height:i}=e;return{width:o,height:i,top:a,left:t,right:t+o,bottom:a+i,x:t,y:a}}function uF(e,t,a){let{reference:o,floating:i}=e;const s=cr(t),l=pO(t),h=hO(l),f=Hr(t),y=s==="y",k=o.x+o.width/2-i.width/2,m=o.y+o.height/2-i.height/2,x=o[h]/2-i[h]/2;let S;switch(f){case"top":S={x:k,y:o.y-i.height};break;case"bottom":S={x:k,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y:m};break;case"left":S={x:o.x-i.width,y:m};break;default:S={x:o.x,y:o.y}}switch(ou(t)){case"start":S[l]-=x*(a&&y?-1:1);break;case"end":S[l]+=x*(a&&y?-1:1);break}return S}async function mAe(e,t){var a;t===void 0&&(t={});const{x:o,y:i,platform:s,rects:l,elements:h,strategy:f}=e,{boundary:y="clippingAncestors",rootBoundary:k="viewport",elementContext:m="floating",altBoundary:x=!1,padding:S=0}=qr(t,e),b=WW(S),_=h[x?m==="floating"?"reference":"floating":m],N=rA(await s.getClippingRect({element:(a=await(s.isElement==null?void 0:s.isElement(_)))==null||a?_:_.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(h.floating)),boundary:y,rootBoundary:k,strategy:f})),L=m==="floating"?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h.floating)),O=await(s.isElement==null?void 0:s.isElement(I))?await(s.getScale==null?void 0:s.getScale(I))||{x:1,y:1}:{x:1,y:1},D=rA(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:L,offsetParent:I,strategy:f}):L);return{top:(N.top-D.top+b.top)/O.y,bottom:(D.bottom-N.bottom+b.bottom)/O.y,left:(N.left-D.left+b.left)/O.x,right:(D.right-N.right+b.right)/O.x}}const vAe=50,kAe=async(e,t,a)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:l}=a,h=l.detectOverflow?l:{...l,detectOverflow:mAe},f=await(l.isRTL==null?void 0:l.isRTL(t));let y=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:k,y:m}=uF(y,o,f),x=o,S=0;const b={};for(let w=0;w<s.length;w++){const _=s[w];if(!_)continue;const{name:N,fn:L}=_,{x:I,y:O,data:D,reset:P}=await L({x:k,y:m,initialPlacement:o,placement:x,strategy:i,middlewareData:b,rects:y,platform:h,elements:{reference:e,floating:t}});k=I??k,m=O??m,b[N]={...b[N],...D},P&&S<vAe&&(S++,typeof P=="object"&&(P.placement&&(x=P.placement),P.rects&&(y=P.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):P.rects),{x:k,y:m}=uF(y,x,f)),w=-1)}return{x:k,y:m,placement:x,strategy:i,middlewareData:b}},gAe=e=>({name:"arrow",options:e,async fn(t){const{x:a,y:o,placement:i,rects:s,platform:l,elements:h,middlewareData:f}=t,{element:y,padding:k=0}=qr(e,t)||{};if(y==null)return{};const m=WW(k),x={x:a,y:o},S=pO(i),b=hO(S),w=await l.getDimensions(y),_=S==="y",N=_?"top":"left",L=_?"bottom":"right",I=_?"clientHeight":"clientWidth",O=s.reference[b]+s.reference[S]-x[S]-s.floating[b],D=x[S]-s.reference[S],P=await(l.getOffsetParent==null?void 0:l.getOffsetParent(y));let A=P?P[I]:0;(!A||!await(l.isElement==null?void 0:l.isElement(P)))&&(A=h.floating[I]||s.floating[b]);const j=O/2-D/2,V=A/2-w[b]/2-1,K=Ni(m[N],V),q=Ni(m[L],V),B=K,F=A-w[b]-q,J=A/2-w[b]/2+j,pe=nP(B,J,F),R=!f.arrow&&ou(i)!=null&&J!==pe&&s.reference[b]/2-(J<B?K:q)-w[b]/2<0,$=R?J<B?J-B:J-F:0;return{[S]:x[S]+$,data:{[S]:pe,centerOffset:J-pe-$,...R&&{alignmentOffset:$}},reset:R}}}),MAe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var a,o;const{placement:i,middlewareData:s,rects:l,initialPlacement:h,platform:f,elements:y}=t,{mainAxis:k=!0,crossAxis:m=!0,fallbackPlacements:x,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,..._}=qr(e,t);if((a=s.arrow)!=null&&a.alignmentOffset)return{};const N=Hr(i),L=cr(h),I=Hr(h)===h,O=await(f.isRTL==null?void 0:f.isRTL(y.floating)),D=x||(I||!w?[oA(h)]:dAe(h)),P=b!=="none";!x&&P&&D.push(...fAe(h,w,b,O));const A=[h,...D],j=await f.detectOverflow(t,_),V=[];let K=((o=s.flip)==null?void 0:o.overflows)||[];if(k&&V.push(j[N]),m){const J=lAe(i,l,O);V.push(j[J[0]],j[J[1]])}if(K=[...K,{placement:i,overflows:V}],!V.every(J=>J<=0)){var q,B;const J=(((q=s.flip)==null?void 0:q.index)||0)+1,pe=A[J];if(pe&&(!(m==="alignment"?L!==cr(pe):!1)||K.every(T=>cr(T.placement)===L?T.overflows[0]>0:!0)))return{data:{index:J,overflows:K},reset:{placement:pe}};let R=(B=K.filter($=>$.overflows[0]<=0).sort(($,T)=>$.overflows[1]-T.overflows[1])[0])==null?void 0:B.placement;if(!R)switch(S){case"bestFit":{var F;const $=(F=K.filter(T=>{if(P){const G=cr(T.placement);return G===L||G==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(G=>G>0).reduce((G,W)=>G+W,0)]).sort((T,G)=>T[1]-G[1])[0])==null?void 0:F[0];$&&(R=$);break}case"initialPlacement":R=h;break}if(i!==R)return{reset:{placement:R}}}return{}}}};function hF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pF(e){return cAe.some(t=>e[t]>=0)}const xAe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:a,platform:o}=t,{strategy:i="referenceHidden",...s}=qr(e,t);switch(i){case"referenceHidden":{const l=await o.detectOverflow(t,{...s,elementContext:"reference"}),h=hF(l,a.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:pF(h)}}}case"escaped":{const l=await o.detectOverflow(t,{...s,altBoundary:!0}),h=hF(l,a.floating);return{data:{escapedOffsets:h,escaped:pF(h)}}}default:return{}}}}},ZW=new Set(["left","top"]);async function bAe(e,t){const{placement:a,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=Hr(a),h=ou(a),f=cr(a)==="y",y=ZW.has(l)?-1:1,k=s&&f?-1:1,m=qr(t,e);let{mainAxis:x,crossAxis:S,alignmentAxis:b}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return h&&typeof b=="number"&&(S=h==="end"?b*-1:b),f?{x:S*k,y:x*y}:{x:x*y,y:S*k}}const wAe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var a,o;const{x:i,y:s,placement:l,middlewareData:h}=t,f=await bAe(t,e);return l===((a=h.offset)==null?void 0:a.placement)&&(o=h.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:s+f.y,data:{...f,placement:l}}}}},_Ae=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:o,placement:i,platform:s}=t,{mainAxis:l=!0,crossAxis:h=!1,limiter:f={fn:N=>{let{x:L,y:I}=N;return{x:L,y:I}}},...y}=qr(e,t),k={x:a,y:o},m=await s.detectOverflow(t,y),x=cr(Hr(i)),S=uO(x);let b=k[S],w=k[x];if(l){const N=S==="y"?"top":"left",L=S==="y"?"bottom":"right",I=b+m[N],O=b-m[L];b=nP(I,b,O)}if(h){const N=x==="y"?"top":"left",L=x==="y"?"bottom":"right",I=w+m[N],O=w-m[L];w=nP(I,w,O)}const _=f.fn({...t,[S]:b,[x]:w});return{..._,data:{x:_.x-a,y:_.y-o,enabled:{[S]:l,[x]:h}}}}}},SAe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:a,y:o,placement:i,rects:s,middlewareData:l}=t,{offset:h=0,mainAxis:f=!0,crossAxis:y=!0}=qr(e,t),k={x:a,y:o},m=cr(i),x=uO(m);let S=k[x],b=k[m];const w=qr(h,t),_=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(f){const I=x==="y"?"height":"width",O=s.reference[x]-s.floating[I]+_.mainAxis,D=s.reference[x]+s.reference[I]-_.mainAxis;S<O?S=O:S>D&&(S=D)}if(y){var N,L;const I=x==="y"?"width":"height",O=ZW.has(Hr(i)),D=s.reference[m]-s.floating[I]+(O&&((N=l.offset)==null?void 0:N[m])||0)+(O?0:_.crossAxis),P=s.reference[m]+s.reference[I]+(O?0:((L=l.offset)==null?void 0:L[m])||0)-(O?_.crossAxis:0);b<D?b=D:b>P&&(b=P)}return{[x]:S,[m]:b}}}},CAe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var a,o;const{placement:i,rects:s,platform:l,elements:h}=t,{apply:f=()=>{},...y}=qr(e,t),k=await l.detectOverflow(t,y),m=Hr(i),x=ou(i),S=cr(i)==="y",{width:b,height:w}=s.floating;let _,N;m==="top"||m==="bottom"?(_=m,N=x===(await(l.isRTL==null?void 0:l.isRTL(h.floating))?"start":"end")?"left":"right"):(N=m,_=x==="end"?"top":"bottom");const L=w-k.top-k.bottom,I=b-k.left-k.right,O=Ni(w-k[_],L),D=Ni(b-k[N],I),P=!t.middlewareData.shift;let A=O,j=D;if((a=t.middlewareData.shift)!=null&&a.enabled.x&&(j=I),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(A=L),P&&!x){const K=Gn(k.left,0),q=Gn(k.right,0),B=Gn(k.top,0),F=Gn(k.bottom,0);S?j=b-2*(K!==0||q!==0?K+q:Gn(k.left,k.right)):A=w-2*(B!==0||F!==0?B+F:Gn(k.top,k.bottom))}await f({...t,availableWidth:j,availableHeight:A});const V=await l.getDimensions(h.floating);return b!==V.width||w!==V.height?{reset:{rects:!0}}:{}}}};function $A(){return typeof window<"u"}function ru(e){return XW(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pr(e){var t;return(t=(XW(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function XW(e){return $A()?e instanceof Node||e instanceof Wn(e).Node:!1}function _a(e){return $A()?e instanceof Element||e instanceof Wn(e).Element:!1}function Vr(e){return $A()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function fF(e){return!$A()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}function B2(e){const{overflow:t,overflowX:a,overflowY:o,display:i}=Sa(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+a)&&i!=="inline"&&i!=="contents"}function NAe(e){return/^(table|td|th)$/.test(ru(e))}function jA(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const LAe=/transform|translate|scale|rotate|perspective|filter/,EAe=/paint|layout|strict|content/,nc=e=>!!e&&e!=="none";let Ij;function fO(e){const t=_a(e)?Sa(e):e;return nc(t.transform)||nc(t.translate)||nc(t.scale)||nc(t.rotate)||nc(t.perspective)||!yO()&&(nc(t.backdropFilter)||nc(t.filter))||LAe.test(t.willChange||"")||EAe.test(t.contain||"")}function IAe(e){let t=Li(e);for(;Vr(t)&&!Wd(t);){if(fO(t))return t;if(jA(t))return null;t=Li(t)}return null}function yO(){return Ij==null&&(Ij=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ij}function Wd(e){return/^(html|body|#document)$/.test(ru(e))}function Sa(e){return Wn(e).getComputedStyle(e)}function PA(e){return _a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Li(e){if(ru(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fF(e)&&e.host||pr(e);return fF(t)?t.host:t}function KW(e){const t=Li(e);return Wd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(t)&&B2(t)?t:KW(t)}function S2(e,t,a){var o;t===void 0&&(t=[]),a===void 0&&(a=!0);const i=KW(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),l=Wn(i);if(s){const h=oP(l);return t.concat(l,l.visualViewport||[],B2(i)?i:[],h&&a?S2(h):[])}else return t.concat(i,S2(i,[],a))}function oP(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function YW(e){const t=Sa(e);let a=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Vr(e),s=i?e.offsetWidth:a,l=i?e.offsetHeight:o,h=aA(a)!==s||aA(o)!==l;return h&&(a=s,o=l),{width:a,height:o,$:h}}function mO(e){return _a(e)?e:e.contextElement}function Bd(e){const t=mO(e);if(!Vr(t))return dr(1);const a=t.getBoundingClientRect(),{width:o,height:i,$:s}=YW(t);let l=(s?aA(a.width):a.width)/o,h=(s?aA(a.height):a.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!h||!Number.isFinite(h))&&(h=1),{x:l,y:h}}const AAe=dr(0);function QW(e){const t=Wn(e);return!yO()||!t.visualViewport?AAe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function TAe(e,t,a){return t===void 0&&(t=!1),!a||t&&a!==Wn(e)?!1:t}function B1(e,t,a,o){t===void 0&&(t=!1),a===void 0&&(a=!1);const i=e.getBoundingClientRect(),s=mO(e);let l=dr(1);t&&(o?_a(o)&&(l=Bd(o)):l=Bd(e));const h=TAe(s,a,o)?QW(s):dr(0);let f=(i.left+h.x)/l.x,y=(i.top+h.y)/l.y,k=i.width/l.x,m=i.height/l.y;if(s){const x=Wn(s),S=o&&_a(o)?Wn(o):o;let b=x,w=oP(b);for(;w&&o&&S!==b;){const _=Bd(w),N=w.getBoundingClientRect(),L=Sa(w),I=N.left+(w.clientLeft+parseFloat(L.paddingLeft))*_.x,O=N.top+(w.clientTop+parseFloat(L.paddingTop))*_.y;f*=_.x,y*=_.y,k*=_.x,m*=_.y,f+=I,y+=O,b=Wn(w),w=oP(b)}}return rA({width:k,height:m,x:f,y})}function OA(e,t){const a=PA(e).scrollLeft;return t?t.left+a:B1(pr(e)).left+a}function JW(e,t){const a=e.getBoundingClientRect(),o=a.left+t.scrollLeft-OA(e,a),i=a.top+t.scrollTop;return{x:o,y:i}}function RAe(e){let{elements:t,rect:a,offsetParent:o,strategy:i}=e;const s=i==="fixed",l=pr(o),h=t?jA(t.floating):!1;if(o===l||h&&s)return a;let f={scrollLeft:0,scrollTop:0},y=dr(1);const k=dr(0),m=Vr(o);if((m||!m&&!s)&&((ru(o)!=="body"||B2(l))&&(f=PA(o)),m)){const S=B1(o);y=Bd(o),k.x=S.x+o.clientLeft,k.y=S.y+o.clientTop}const x=l&&!m&&!s?JW(l,f):dr(0);return{width:a.width*y.x,height:a.height*y.y,x:a.x*y.x-f.scrollLeft*y.x+k.x+x.x,y:a.y*y.y-f.scrollTop*y.y+k.y+x.y}}function $Ae(e){return Array.from(e.getClientRects())}function jAe(e){const t=pr(e),a=PA(e),o=e.ownerDocument.body,i=Gn(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=Gn(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-a.scrollLeft+OA(e);const h=-a.scrollTop;return Sa(o).direction==="rtl"&&(l+=Gn(t.clientWidth,o.clientWidth)-i),{width:i,height:s,x:l,y:h}}const yF=25;function PAe(e,t){const a=Wn(e),o=pr(e),i=a.visualViewport;let s=o.clientWidth,l=o.clientHeight,h=0,f=0;if(i){s=i.width,l=i.height;const k=yO();(!k||k&&t==="fixed")&&(h=i.offsetLeft,f=i.offsetTop)}const y=OA(o);if(y<=0){const k=o.ownerDocument,m=k.body,x=getComputedStyle(m),S=k.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,b=Math.abs(o.clientWidth-m.clientWidth-S);b<=yF&&(s-=b)}else y<=yF&&(s+=y);return{width:s,height:l,x:h,y:f}}function OAe(e,t){const a=B1(e,!0,t==="fixed"),o=a.top+e.clientTop,i=a.left+e.clientLeft,s=Vr(e)?Bd(e):dr(1),l=e.clientWidth*s.x,h=e.clientHeight*s.y,f=i*s.x,y=o*s.y;return{width:l,height:h,x:f,y}}function mF(e,t,a){let o;if(t==="viewport")o=PAe(e,a);else if(t==="document")o=jAe(pr(e));else if(_a(t))o=OAe(t,a);else{const i=QW(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return rA(o)}function eZ(e,t){const a=Li(e);return a===t||!_a(a)||Wd(a)?!1:Sa(a).position==="fixed"||eZ(a,t)}function DAe(e,t){const a=t.get(e);if(a)return a;let o=S2(e,[],!1).filter(h=>_a(h)&&ru(h)!=="body"),i=null;const s=Sa(e).position==="fixed";let l=s?Li(e):e;for(;_a(l)&&!Wd(l);){const h=Sa(l),f=fO(l);!f&&h.position==="fixed"&&(i=null),(s?!f&&!i:!f&&h.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||B2(l)&&!f&&eZ(e,l))?o=o.filter(k=>k!==l):i=h,l=Li(l)}return t.set(e,o),o}function zAe(e){let{element:t,boundary:a,rootBoundary:o,strategy:i}=e;const l=[...a==="clippingAncestors"?jA(t)?[]:DAe(t,this._c):[].concat(a),o],h=mF(t,l[0],i);let f=h.top,y=h.right,k=h.bottom,m=h.left;for(let x=1;x<l.length;x++){const S=mF(t,l[x],i);f=Gn(S.top,f),y=Ni(S.right,y),k=Ni(S.bottom,k),m=Gn(S.left,m)}return{width:y-m,height:k-f,x:m,y:f}}function qAe(e){const{width:t,height:a}=YW(e);return{width:t,height:a}}function HAe(e,t,a){const o=Vr(t),i=pr(t),s=a==="fixed",l=B1(e,!0,s,t);let h={scrollLeft:0,scrollTop:0};const f=dr(0);function y(){f.x=OA(i)}if(o||!o&&!s)if((ru(t)!=="body"||B2(i))&&(h=PA(t)),o){const S=B1(t,!0,s,t);f.x=S.x+t.clientLeft,f.y=S.y+t.clientTop}else i&&y();s&&!o&&i&&y();const k=i&&!o&&!s?JW(i,h):dr(0),m=l.left+h.scrollLeft-f.x-k.x,x=l.top+h.scrollTop-f.y-k.y;return{x:m,y:x,width:l.width,height:l.height}}function Aj(e){return Sa(e).position==="static"}function vF(e,t){if(!Vr(e)||Sa(e).position==="fixed")return null;if(t)return t(e);let a=e.offsetParent;return pr(e)===a&&(a=a.ownerDocument.body),a}function tZ(e,t){const a=Wn(e);if(jA(e))return a;if(!Vr(e)){let i=Li(e);for(;i&&!Wd(i);){if(_a(i)&&!Aj(i))return i;i=Li(i)}return a}let o=vF(e,t);for(;o&&NAe(o)&&Aj(o);)o=vF(o,t);return o&&Wd(o)&&Aj(o)&&!fO(o)?a:o||IAe(e)||a}const VAe=async function(e){const t=this.getOffsetParent||tZ,a=this.getDimensions,o=await a(e.floating);return{reference:HAe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function BAe(e){return Sa(e).direction==="rtl"}const FAe={convertOffsetParentRelativeRectToViewportRelativeRect:RAe,getDocumentElement:pr,getClippingRect:zAe,getOffsetParent:tZ,getElementRects:VAe,getClientRects:$Ae,getDimensions:qAe,getScale:Bd,isElement:_a,isRTL:BAe};function nZ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function UAe(e,t){let a=null,o;const i=pr(e);function s(){var h;clearTimeout(o),(h=a)==null||h.disconnect(),a=null}function l(h,f){h===void 0&&(h=!1),f===void 0&&(f=1),s();const y=e.getBoundingClientRect(),{left:k,top:m,width:x,height:S}=y;if(h||t(),!x||!S)return;const b=Sh(m),w=Sh(i.clientWidth-(k+x)),_=Sh(i.clientHeight-(m+S)),N=Sh(k),I={rootMargin:-b+"px "+-w+"px "+-_+"px "+-N+"px",threshold:Gn(0,Ni(1,f))||1};let O=!0;function D(P){const A=P[0].intersectionRatio;if(A!==f){if(!O)return l();A?l(!1,A):o=setTimeout(()=>{l(!1,1e-7)},1e3)}A===1&&!nZ(y,e.getBoundingClientRect())&&l(),O=!1}try{a=new IntersectionObserver(D,{...I,root:i.ownerDocument})}catch{a=new IntersectionObserver(D,I)}a.observe(e)}return l(!0),s}function GAe(e,t,a,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,y=mO(e),k=i||s?[...y?S2(y):[],...t?S2(t):[]]:[];k.forEach(N=>{i&&N.addEventListener("scroll",a,{passive:!0}),s&&N.addEventListener("resize",a)});const m=y&&h?UAe(y,a):null;let x=-1,S=null;l&&(S=new ResizeObserver(N=>{let[L]=N;L&&L.target===y&&S&&t&&(S.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var I;(I=S)==null||I.observe(t)})),a()}),y&&!f&&S.observe(y),t&&S.observe(t));let b,w=f?B1(e):null;f&&_();function _(){const N=B1(e);w&&!nZ(w,N)&&a(),w=N,b=requestAnimationFrame(_)}return a(),()=>{var N;k.forEach(L=>{i&&L.removeEventListener("scroll",a),s&&L.removeEventListener("resize",a)}),m==null||m(),(N=S)==null||N.disconnect(),S=null,f&&cancelAnimationFrame(b)}}const WAe=wAe,ZAe=_Ae,XAe=MAe,KAe=CAe,YAe=xAe,kF=gAe,QAe=SAe,JAe=(e,t,a)=>{const o=new Map,i={platform:FAe,...a},s={...i.platform,_c:o};return kAe(e,t,{...i,platform:s})};var eTe=typeof document<"u",tTe=function(){},BI=eTe?p.useLayoutEffect:tTe;function iA(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let a,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==t.length)return!1;for(o=a;o--!==0;)if(!iA(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),a=i.length,a!==Object.keys(t).length)return!1;for(o=a;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=a;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!iA(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function aZ(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gF(e,t){const a=aZ(e);return Math.round(t*a)/a}function Tj(e){const t=p.useRef(e);return BI(()=>{t.current=e}),t}function nTe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:a="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:l}={},transform:h=!0,whileElementsMounted:f,open:y}=e,[k,m]=p.useState({x:0,y:0,strategy:a,placement:t,middlewareData:{},isPositioned:!1}),[x,S]=p.useState(o);iA(x,o)||S(o);const[b,w]=p.useState(null),[_,N]=p.useState(null),L=p.useCallback(T=>{T!==P.current&&(P.current=T,w(T))},[]),I=p.useCallback(T=>{T!==A.current&&(A.current=T,N(T))},[]),O=s||b,D=l||_,P=p.useRef(null),A=p.useRef(null),j=p.useRef(k),V=f!=null,K=Tj(f),q=Tj(i),B=Tj(y),F=p.useCallback(()=>{if(!P.current||!A.current)return;const T={placement:t,strategy:a,middleware:x};q.current&&(T.platform=q.current),JAe(P.current,A.current,T).then(G=>{const W={...G,isPositioned:B.current!==!1};J.current&&!iA(j.current,W)&&(j.current=W,Kd.flushSync(()=>{m(W)}))})},[x,t,a,q,B]);BI(()=>{y===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,m(T=>({...T,isPositioned:!1})))},[y]);const J=p.useRef(!1);BI(()=>(J.current=!0,()=>{J.current=!1}),[]),BI(()=>{if(O&&(P.current=O),D&&(A.current=D),O&&D){if(K.current)return K.current(O,D,F);F()}},[O,D,F,K,V]);const pe=p.useMemo(()=>({reference:P,floating:A,setReference:L,setFloating:I}),[L,I]),R=p.useMemo(()=>({reference:O,floating:D}),[O,D]),$=p.useMemo(()=>{const T={position:a,left:0,top:0};if(!R.floating)return T;const G=gF(R.floating,k.x),W=gF(R.floating,k.y);return h?{...T,transform:"translate("+G+"px, "+W+"px)",...aZ(R.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:G,top:W}},[a,h,R.floating,k.x,k.y]);return p.useMemo(()=>({...k,update:F,refs:pe,elements:R,floatingStyles:$}),[k,F,pe,R,$])}const aTe=e=>{function t(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){const{element:o,padding:i}=typeof e=="function"?e(a):e;return o&&t(o)?o.current!=null?kF({element:o.current,padding:i}).fn(a):{}:o?kF({element:o,padding:i}).fn(a):{}}}},oTe=(e,t)=>{const a=WAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},rTe=(e,t)=>{const a=ZAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},iTe=(e,t)=>({fn:QAe(e).fn,options:[e,t]}),cTe=(e,t)=>{const a=XAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},sTe=(e,t)=>{const a=KAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},lTe=(e,t)=>{const a=YAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},dTe=(e,t)=>{const a=aTe(e);return{name:a.name,fn:a.fn,options:[e,t]}};function uTe(e){const t=hTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(fTe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function hTe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=mTe(i),h=yTe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pTe=Symbol("radix.slottable");function fTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pTe}function yTe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function mTe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var vTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],kTe=vTe.reduce((e,t)=>{const a=uTe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),gTe="Arrow",oZ=p.forwardRef((e,t)=>{const{children:a,width:o=10,height:i=5,...s}=e;return M.jsx(kTe.svg,{...s,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?a:M.jsx("polygon",{points:"0,0 30,0 15,10"})})});oZ.displayName=gTe;var MTe=oZ;function xTe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,bTe(i,...t)]}function bTe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function wTe(e){const t=_Te(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(CTe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function _Te(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=LTe(i),h=NTe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var STe=Symbol("radix.slottable");function CTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===STe}function NTe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function LTe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var ETe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rZ=ETe.reduce((e,t)=>{const a=wTe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),vO="Popper",[iZ,Ti]=xTe(vO),[ITe,cZ]=iZ(vO),sZ=e=>{const{__scopePopper:t,children:a}=e,[o,i]=p.useState(null);return M.jsx(ITe,{scope:t,anchor:o,onAnchorChange:i,children:a})};sZ.displayName=vO;var lZ="PopperAnchor",dZ=p.forwardRef((e,t)=>{const{__scopePopper:a,virtualRef:o,...i}=e,s=cZ(lZ,a),l=p.useRef(null),h=ze(t,l),f=p.useRef(null);return p.useEffect(()=>{const y=f.current;f.current=(o==null?void 0:o.current)||l.current,y!==f.current&&s.onAnchorChange(f.current)}),o?null:M.jsx(rZ.div,{...i,ref:h})});dZ.displayName=lZ;var kO="PopperContent",[ATe,TTe]=iZ(kO),uZ=p.forwardRef((e,t)=>{var he,ve,me,ge,fe,ce;const{__scopePopper:a,side:o="bottom",sideOffset:i=0,align:s="center",alignOffset:l=0,arrowPadding:h=0,avoidCollisions:f=!0,collisionBoundary:y=[],collisionPadding:k=0,sticky:m="partial",hideWhenDetached:x=!1,updatePositionStrategy:S="optimized",onPlaced:b,...w}=e,_=cZ(kO,a),[N,L]=p.useState(null),I=ze(t,Ee=>L(Ee)),[O,D]=p.useState(null),P=SA(O),A=(P==null?void 0:P.width)??0,j=(P==null?void 0:P.height)??0,V=o+(s!=="center"?"-"+s:""),K=typeof k=="number"?k:{top:0,right:0,bottom:0,left:0,...k},q=Array.isArray(y)?y:[y],B=q.length>0,F={padding:K,boundary:q.filter($Te),altBoundary:B},{refs:J,floatingStyles:pe,placement:R,isPositioned:$,middlewareData:T}=nTe({strategy:"fixed",placement:V,whileElementsMounted:(...Ee)=>GAe(...Ee,{animationFrame:S==="always"}),elements:{reference:_.anchor},middleware:[oTe({mainAxis:i+j,alignmentAxis:l}),f&&rTe({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?iTe():void 0,...F}),f&&cTe({...F}),sTe({...F,apply:({elements:Ee,rects:$e,availableWidth:st,availableHeight:Ve})=>{const{width:tt,height:ot}=$e.reference,Ye=Ee.floating.style;Ye.setProperty("--radix-popper-available-width",`${st}px`),Ye.setProperty("--radix-popper-available-height",`${Ve}px`),Ye.setProperty("--radix-popper-anchor-width",`${tt}px`),Ye.setProperty("--radix-popper-anchor-height",`${ot}px`)}}),O&&dTe({element:O,padding:h}),jTe({arrowWidth:A,arrowHeight:j}),x&&lTe({strategy:"referenceHidden",...F})]}),[G,W]=fZ(R),Me=Zn(b);St(()=>{$&&(Me==null||Me())},[$,Me]);const X=(he=T.arrow)==null?void 0:he.x,ne=(ve=T.arrow)==null?void 0:ve.y,le=((me=T.arrow)==null?void 0:me.centerOffset)!==0,[ie,ye]=p.useState();return St(()=>{N&&ye(window.getComputedStyle(N).zIndex)},[N]),M.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...pe,transform:$?pe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(ge=T.transformOrigin)==null?void 0:ge.x,(fe=T.transformOrigin)==null?void 0:fe.y].join(" "),...((ce=T.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:M.jsx(ATe,{scope:a,placedSide:G,onArrowChange:D,arrowX:X,arrowY:ne,shouldHideArrow:le,children:M.jsx(rZ.div,{"data-side":G,"data-align":W,...w,ref:I,style:{...w.style,animation:$?void 0:"none"}})})})});uZ.displayName=kO;var hZ="PopperArrow",RTe={top:"bottom",right:"left",bottom:"top",left:"right"},pZ=p.forwardRef(function(t,a){const{__scopePopper:o,...i}=t,s=TTe(hZ,o),l=RTe[s.placedSide];return M.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:M.jsx(MTe,{...i,ref:a,style:{...i.style,display:"block"}})})});pZ.displayName=hZ;function $Te(e){return e!==null}var jTe=e=>({name:"transformOrigin",options:e,fn(t){var _,N,L;const{placement:a,rects:o,middlewareData:i}=t,l=((_=i.arrow)==null?void 0:_.centerOffset)!==0,h=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[y,k]=fZ(a),m={start:"0%",center:"50%",end:"100%"}[k],x=(((N=i.arrow)==null?void 0:N.x)??0)+h/2,S=(((L=i.arrow)==null?void 0:L.y)??0)+f/2;let b="",w="";return y==="bottom"?(b=l?m:`${x}px`,w=`${-f}px`):y==="top"?(b=l?m:`${x}px`,w=`${o.floating.height+f}px`):y==="right"?(b=`${-f}px`,w=l?m:`${S}px`):y==="left"&&(b=`${o.floating.width+f}px`,w=l?m:`${S}px`),{data:{x:b,y:w}}}});function fZ(e){const[t,a="center"]=e.split("-");return[t,a]}var F2=sZ,U2=dZ,DA=uZ,zA=pZ;function yZ(e){const t=PTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(DTe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function PTe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=qTe(i),h=zTe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var OTe=Symbol("radix.slottable");function DTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===OTe}function zTe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function qTe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var HTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],iu=HTe.reduce((e,t)=>{const a=yZ(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function VTe(e,t){e&&Kd.flushSync(()=>e.dispatchEvent(t))}var BTe="Portal",mZ=p.forwardRef((e,t)=>{var h;const{container:a,...o}=e,[i,s]=p.useState(!1);St(()=>s(!0),[]);const l=a||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return l?ur.createPortal(M.jsx(iu.div,{...o,ref:t}),l):null});mZ.displayName=BTe;function FTe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,UTe(i,...t)]}function UTe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function GTe(e){const t=WTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(XTe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function WTe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=YTe(i),h=KTe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ZTe=Symbol("radix.slottable");function XTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ZTe}function KTe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function YTe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var QTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vZ=QTe.reduce((e,t)=>{const a=GTe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Rj="rovingFocusGroup.onEntryFocus",JTe={bubbles:!1,cancelable:!0},G2="RovingFocusGroup",[rP,kZ,eRe]=H2(G2),[tRe,qA]=FTe(G2,[eRe]),[nRe,aRe]=tRe(G2),gZ=p.forwardRef((e,t)=>M.jsx(rP.Provider,{scope:e.__scopeRovingFocusGroup,children:M.jsx(rP.Slot,{scope:e.__scopeRovingFocusGroup,children:M.jsx(oRe,{...e,ref:t})})}));gZ.displayName=G2;var oRe=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:a,orientation:o,loop:i=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:f,onEntryFocus:y,preventScrollOnEntryFocus:k=!1,...m}=e,x=p.useRef(null),S=ze(t,x),b=V2(s),[w,_]=bn({prop:l,defaultProp:h??null,onChange:f,caller:G2}),[N,L]=p.useState(!1),I=Zn(y),O=kZ(a),D=p.useRef(!1),[P,A]=p.useState(0);return p.useEffect(()=>{const j=x.current;if(j)return j.addEventListener(Rj,I),()=>j.removeEventListener(Rj,I)},[I]),M.jsx(nRe,{scope:a,orientation:o,dir:b,loop:i,currentTabStopId:w,onItemFocus:p.useCallback(j=>_(j),[_]),onItemShiftTab:p.useCallback(()=>L(!0),[]),onFocusableItemAdd:p.useCallback(()=>A(j=>j+1),[]),onFocusableItemRemove:p.useCallback(()=>A(j=>j-1),[]),children:M.jsx(vZ.div,{tabIndex:N||P===0?-1:0,"data-orientation":o,...m,ref:S,style:{outline:"none",...e.style},onMouseDown:xe(e.onMouseDown,()=>{D.current=!0}),onFocus:xe(e.onFocus,j=>{const V=!D.current;if(j.target===j.currentTarget&&V&&!N){const K=new CustomEvent(Rj,JTe);if(j.currentTarget.dispatchEvent(K),!K.defaultPrevented){const q=O().filter(R=>R.focusable),B=q.find(R=>R.active),F=q.find(R=>R.id===w),pe=[B,F,...q].filter(Boolean).map(R=>R.ref.current);bZ(pe,k)}}D.current=!1}),onBlur:xe(e.onBlur,()=>L(!1))})})}),MZ="RovingFocusGroupItem",xZ=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:a,focusable:o=!0,active:i=!1,tabStopId:s,children:l,...h}=e,f=It(),y=s||f,k=aRe(MZ,a),m=k.currentTabStopId===y,x=kZ(a),{onFocusableItemAdd:S,onFocusableItemRemove:b,currentTabStopId:w}=k;return p.useEffect(()=>{if(o)return S(),()=>b()},[o,S,b]),M.jsx(rP.ItemSlot,{scope:a,id:y,focusable:o,active:i,children:M.jsx(vZ.span,{tabIndex:m?0:-1,"data-orientation":k.orientation,...h,ref:t,onMouseDown:xe(e.onMouseDown,_=>{o?k.onItemFocus(y):_.preventDefault()}),onFocus:xe(e.onFocus,()=>k.onItemFocus(y)),onKeyDown:xe(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){k.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const N=cRe(_,k.orientation,k.dir);if(N!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let I=x().filter(O=>O.focusable).map(O=>O.ref.current);if(N==="last")I.reverse();else if(N==="prev"||N==="next"){N==="prev"&&I.reverse();const O=I.indexOf(_.currentTarget);I=k.loop?sRe(I,O+1):I.slice(O+1)}setTimeout(()=>bZ(I))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:w!=null}):l})})});xZ.displayName=MZ;var rRe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iRe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cRe(e,t,a){const o=iRe(e.key,a);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return rRe[o]}function bZ(e,t=!1){const a=document.activeElement;for(const o of e)if(o===a||(o.focus({preventScroll:t}),document.activeElement!==a))return}function sRe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var wZ=gZ,_Z=xZ,iP=["Enter"," "],lRe=["ArrowDown","PageUp","Home"],SZ=["ArrowUp","PageDown","End"],dRe=[...lRe,...SZ],uRe={ltr:[...iP,"ArrowRight"],rtl:[...iP,"ArrowLeft"]},hRe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},W2="Menu",[C2,pRe,fRe]=H2(W2),[X1,Z2]=oAe(W2,[fRe,Ti,qA]),X2=Ti(),CZ=qA(),[NZ,Ri]=X1(W2),[yRe,K2]=X1(W2),LZ=e=>{const{__scopeMenu:t,open:a=!1,children:o,dir:i,onOpenChange:s,modal:l=!0}=e,h=X2(t),[f,y]=p.useState(null),k=p.useRef(!1),m=Zn(s),x=V2(i);return p.useEffect(()=>{const S=()=>{k.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>k.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),M.jsx(F2,{...h,children:M.jsx(NZ,{scope:t,open:a,onOpenChange:m,content:f,onContentChange:y,children:M.jsx(yRe,{scope:t,onClose:p.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:k,dir:x,modal:l,children:o})})})};LZ.displayName=W2;var mRe="MenuAnchor",gO=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e,i=X2(a);return M.jsx(U2,{...i,...o,ref:t})});gO.displayName=mRe;var MO="MenuPortal",[vRe,EZ]=X1(MO,{forceMount:void 0}),IZ=e=>{const{__scopeMenu:t,forceMount:a,children:o,container:i}=e,s=Ri(MO,t);return M.jsx(vRe,{scope:t,forceMount:a,children:M.jsx(Pn,{present:a||s.open,children:M.jsx(mZ,{asChild:!0,container:i,children:o})})})};IZ.displayName=MO;var da="MenuContent",[kRe,xO]=X1(da),AZ=p.forwardRef((e,t)=>{const a=EZ(da,e.__scopeMenu),{forceMount:o=a.forceMount,...i}=e,s=Ri(da,e.__scopeMenu),l=K2(da,e.__scopeMenu);return M.jsx(C2.Provider,{scope:e.__scopeMenu,children:M.jsx(Pn,{present:o||s.open,children:M.jsx(C2.Slot,{scope:e.__scopeMenu,children:l.modal?M.jsx(gRe,{...i,ref:t}):M.jsx(MRe,{...i,ref:t})})})})}),gRe=p.forwardRef((e,t)=>{const a=Ri(da,e.__scopeMenu),o=p.useRef(null),i=ze(t,o);return p.useEffect(()=>{const s=o.current;if(s)return IA(s)},[]),M.jsx(bO,{...e,ref:i,trapFocus:a.open,disableOutsidePointerEvents:a.open,disableOutsideScroll:!0,onFocusOutside:xe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>a.onOpenChange(!1)})}),MRe=p.forwardRef((e,t)=>{const a=Ri(da,e.__scopeMenu);return M.jsx(bO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>a.onOpenChange(!1)})}),xRe=yZ("MenuContent.ScrollLock"),bO=p.forwardRef((e,t)=>{const{__scopeMenu:a,loop:o=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:h,onEntryFocus:f,onEscapeKeyDown:y,onPointerDownOutside:k,onFocusOutside:m,onInteractOutside:x,onDismiss:S,disableOutsideScroll:b,...w}=e,_=Ri(da,a),N=K2(da,a),L=X2(a),I=CZ(a),O=pRe(a),[D,P]=p.useState(null),A=p.useRef(null),j=ze(t,A,_.onContentChange),V=p.useRef(0),K=p.useRef(""),q=p.useRef(0),B=p.useRef(null),F=p.useRef("right"),J=p.useRef(0),pe=b?z2:p.Fragment,R=b?{as:xRe,allowPinchZoom:!0}:void 0,$=G=>{var he,ve;const W=K.current+G,Me=O().filter(me=>!me.disabled),X=document.activeElement,ne=(he=Me.find(me=>me.ref.current===X))==null?void 0:he.textValue,le=Me.map(me=>me.textValue),ie=RRe(le,W,ne),ye=(ve=Me.find(me=>me.textValue===ie))==null?void 0:ve.ref.current;(function me(ge){K.current=ge,window.clearTimeout(V.current),ge!==""&&(V.current=window.setTimeout(()=>me(""),1e3))})(W),ye&&setTimeout(()=>ye.focus())};p.useEffect(()=>()=>window.clearTimeout(V.current),[]),LA();const T=p.useCallback(G=>{var Me,X;return F.current===((Me=B.current)==null?void 0:Me.side)&&jRe(G,(X=B.current)==null?void 0:X.area)},[]);return M.jsx(kRe,{scope:a,searchRef:K,onItemEnter:p.useCallback(G=>{T(G)&&G.preventDefault()},[T]),onItemLeave:p.useCallback(G=>{var W;T(G)||((W=A.current)==null||W.focus(),P(null))},[T]),onTriggerLeave:p.useCallback(G=>{T(G)&&G.preventDefault()},[T]),pointerGraceTimerRef:q,onPointerGraceIntentChange:p.useCallback(G=>{B.current=G},[]),children:M.jsx(pe,{...R,children:M.jsx(D2,{asChild:!0,trapped:i,onMountAutoFocus:xe(s,G=>{var W;G.preventDefault(),(W=A.current)==null||W.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:M.jsx(nu,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:y,onPointerDownOutside:k,onFocusOutside:m,onInteractOutside:x,onDismiss:S,children:M.jsx(wZ,{asChild:!0,...I,dir:N.dir,orientation:"vertical",loop:o,currentTabStopId:D,onCurrentTabStopIdChange:P,onEntryFocus:xe(f,G=>{N.isUsingKeyboardRef.current||G.preventDefault()}),preventScrollOnEntryFocus:!0,children:M.jsx(DA,{role:"menu","aria-orientation":"vertical","data-state":ZZ(_.open),"data-radix-menu-content":"",dir:N.dir,...L,...w,ref:j,style:{outline:"none",...w.style},onKeyDown:xe(w.onKeyDown,G=>{const Me=G.target.closest("[data-radix-menu-content]")===G.currentTarget,X=G.ctrlKey||G.altKey||G.metaKey,ne=G.key.length===1;Me&&(G.key==="Tab"&&G.preventDefault(),!X&&ne&&$(G.key));const le=A.current;if(G.target!==le||!dRe.includes(G.key))return;G.preventDefault();const ye=O().filter(he=>!he.disabled).map(he=>he.ref.current);SZ.includes(G.key)&&ye.reverse(),ARe(ye)}),onBlur:xe(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(V.current),K.current="")}),onPointerMove:xe(e.onPointerMove,N2(G=>{const W=G.target,Me=J.current!==G.clientX;if(G.currentTarget.contains(W)&&Me){const X=G.clientX>J.current?"right":"left";F.current=X,J.current=G.clientX}}))})})})})})})});AZ.displayName=da;var bRe="MenuGroup",wO=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e;return M.jsx(iu.div,{role:"group",...o,ref:t})});wO.displayName=bRe;var wRe="MenuLabel",TZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e;return M.jsx(iu.div,{...o,ref:t})});TZ.displayName=wRe;var cA="MenuItem",MF="menu.itemSelect",HA=p.forwardRef((e,t)=>{const{disabled:a=!1,onSelect:o,...i}=e,s=p.useRef(null),l=K2(cA,e.__scopeMenu),h=xO(cA,e.__scopeMenu),f=ze(t,s),y=p.useRef(!1),k=()=>{const m=s.current;if(!a&&m){const x=new CustomEvent(MF,{bubbles:!0,cancelable:!0});m.addEventListener(MF,S=>o==null?void 0:o(S),{once:!0}),VTe(m,x),x.defaultPrevented?y.current=!1:l.onClose()}};return M.jsx(RZ,{...i,ref:f,disabled:a,onClick:xe(e.onClick,k),onPointerDown:m=>{var x;(x=e.onPointerDown)==null||x.call(e,m),y.current=!0},onPointerUp:xe(e.onPointerUp,m=>{var x;y.current||(x=m.currentTarget)==null||x.click()}),onKeyDown:xe(e.onKeyDown,m=>{const x=h.searchRef.current!=="";a||x&&m.key===" "||iP.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});HA.displayName=cA;var RZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,disabled:o=!1,textValue:i,...s}=e,l=xO(cA,a),h=CZ(a),f=p.useRef(null),y=ze(t,f),[k,m]=p.useState(!1),[x,S]=p.useState("");return p.useEffect(()=>{const b=f.current;b&&S((b.textContent??"").trim())},[s.children]),M.jsx(C2.ItemSlot,{scope:a,disabled:o,textValue:i??x,children:M.jsx(_Z,{asChild:!0,...h,focusable:!o,children:M.jsx(iu.div,{role:"menuitem","data-highlighted":k?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:y,onPointerMove:xe(e.onPointerMove,N2(b=>{o?l.onItemLeave(b):(l.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:xe(e.onPointerLeave,N2(b=>l.onItemLeave(b))),onFocus:xe(e.onFocus,()=>m(!0)),onBlur:xe(e.onBlur,()=>m(!1))})})})}),_Re="MenuCheckboxItem",$Z=p.forwardRef((e,t)=>{const{checked:a=!1,onCheckedChange:o,...i}=e;return M.jsx(zZ,{scope:e.__scopeMenu,checked:a,children:M.jsx(HA,{role:"menuitemcheckbox","aria-checked":sA(a)?"mixed":a,...i,ref:t,"data-state":CO(a),onSelect:xe(i.onSelect,()=>o==null?void 0:o(sA(a)?!0:!a),{checkForDefaultPrevented:!1})})})});$Z.displayName=_Re;var jZ="MenuRadioGroup",[SRe,CRe]=X1(jZ,{value:void 0,onValueChange:()=>{}}),PZ=p.forwardRef((e,t)=>{const{value:a,onValueChange:o,...i}=e,s=Zn(o);return M.jsx(SRe,{scope:e.__scopeMenu,value:a,onValueChange:s,children:M.jsx(wO,{...i,ref:t})})});PZ.displayName=jZ;var OZ="MenuRadioItem",DZ=p.forwardRef((e,t)=>{const{value:a,...o}=e,i=CRe(OZ,e.__scopeMenu),s=a===i.value;return M.jsx(zZ,{scope:e.__scopeMenu,checked:s,children:M.jsx(HA,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":CO(s),onSelect:xe(o.onSelect,()=>{var l;return(l=i.onValueChange)==null?void 0:l.call(i,a)},{checkForDefaultPrevented:!1})})})});DZ.displayName=OZ;var _O="MenuItemIndicator",[zZ,NRe]=X1(_O,{checked:!1}),qZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,forceMount:o,...i}=e,s=NRe(_O,a);return M.jsx(Pn,{present:o||sA(s.checked)||s.checked===!0,children:M.jsx(iu.span,{...i,ref:t,"data-state":CO(s.checked)})})});qZ.displayName=_O;var LRe="MenuSeparator",HZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e;return M.jsx(iu.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});HZ.displayName=LRe;var ERe="MenuArrow",VZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e,i=X2(a);return M.jsx(zA,{...i,...o,ref:t})});VZ.displayName=ERe;var SO="MenuSub",[IRe,BZ]=X1(SO),FZ=e=>{const{__scopeMenu:t,children:a,open:o=!1,onOpenChange:i}=e,s=Ri(SO,t),l=X2(t),[h,f]=p.useState(null),[y,k]=p.useState(null),m=Zn(i);return p.useEffect(()=>(s.open===!1&&m(!1),()=>m(!1)),[s.open,m]),M.jsx(F2,{...l,children:M.jsx(NZ,{scope:t,open:o,onOpenChange:m,content:y,onContentChange:k,children:M.jsx(IRe,{scope:t,contentId:It(),triggerId:It(),trigger:h,onTriggerChange:f,children:a})})})};FZ.displayName=SO;var u2="MenuSubTrigger",UZ=p.forwardRef((e,t)=>{const a=Ri(u2,e.__scopeMenu),o=K2(u2,e.__scopeMenu),i=BZ(u2,e.__scopeMenu),s=xO(u2,e.__scopeMenu),l=p.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:f}=s,y={__scopeMenu:e.__scopeMenu},k=p.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return p.useEffect(()=>k,[k]),p.useEffect(()=>{const m=h.current;return()=>{window.clearTimeout(m),f(null)}},[h,f]),M.jsx(gO,{asChild:!0,...y,children:M.jsx(RZ,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":i.contentId,"data-state":ZZ(a.open),...e,ref:kt(t,i.onTriggerChange),onClick:m=>{var x;(x=e.onClick)==null||x.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),a.open||a.onOpenChange(!0))},onPointerMove:xe(e.onPointerMove,N2(m=>{s.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!a.open&&!l.current&&(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{a.onOpenChange(!0),k()},100))})),onPointerLeave:xe(e.onPointerLeave,N2(m=>{var S,b;k();const x=(S=a.content)==null?void 0:S.getBoundingClientRect();if(x){const w=(b=a.content)==null?void 0:b.dataset.side,_=w==="right",N=_?-5:5,L=x[_?"left":"right"],I=x[_?"right":"left"];s.onPointerGraceIntentChange({area:[{x:m.clientX+N,y:m.clientY},{x:L,y:x.top},{x:I,y:x.top},{x:I,y:x.bottom},{x:L,y:x.bottom}],side:w}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(m),m.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:xe(e.onKeyDown,m=>{var S;const x=s.searchRef.current!=="";e.disabled||x&&m.key===" "||uRe[o.dir].includes(m.key)&&(a.onOpenChange(!0),(S=a.content)==null||S.focus(),m.preventDefault())})})})});UZ.displayName=u2;var GZ="MenuSubContent",WZ=p.forwardRef((e,t)=>{const a=EZ(da,e.__scopeMenu),{forceMount:o=a.forceMount,...i}=e,s=Ri(da,e.__scopeMenu),l=K2(da,e.__scopeMenu),h=BZ(GZ,e.__scopeMenu),f=p.useRef(null),y=ze(t,f);return M.jsx(C2.Provider,{scope:e.__scopeMenu,children:M.jsx(Pn,{present:o||s.open,children:M.jsx(C2.Slot,{scope:e.__scopeMenu,children:M.jsx(bO,{id:h.contentId,"aria-labelledby":h.triggerId,...i,ref:y,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:k=>{var m;l.isUsingKeyboardRef.current&&((m=f.current)==null||m.focus()),k.preventDefault()},onCloseAutoFocus:k=>k.preventDefault(),onFocusOutside:xe(e.onFocusOutside,k=>{k.target!==h.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:xe(e.onEscapeKeyDown,k=>{l.onClose(),k.preventDefault()}),onKeyDown:xe(e.onKeyDown,k=>{var S;const m=k.currentTarget.contains(k.target),x=hRe[l.dir].includes(k.key);m&&x&&(s.onOpenChange(!1),(S=h.trigger)==null||S.focus(),k.preventDefault())})})})})})});WZ.displayName=GZ;function ZZ(e){return e?"open":"closed"}function sA(e){return e==="indeterminate"}function CO(e){return sA(e)?"indeterminate":e?"checked":"unchecked"}function ARe(e){const t=document.activeElement;for(const a of e)if(a===t||(a.focus(),document.activeElement!==t))return}function TRe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}function RRe(e,t,a){const i=t.length>1&&Array.from(t).every(y=>y===t[0])?t[0]:t,s=a?e.indexOf(a):-1;let l=TRe(e,Math.max(s,0));i.length===1&&(l=l.filter(y=>y!==a));const f=l.find(y=>y.toLowerCase().startsWith(i.toLowerCase()));return f!==a?f:void 0}function $Re(e,t){const{x:a,y:o}=e;let i=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const h=t[s],f=t[l],y=h.x,k=h.y,m=f.x,x=f.y;k>o!=x>o&&a<(m-y)*(o-k)/(x-k)+y&&(i=!i)}return i}function jRe(e,t){if(!t)return!1;const a={x:e.clientX,y:e.clientY};return $Re(a,t)}function N2(e){return t=>t.pointerType==="mouse"?e(t):void 0}var NO=LZ,LO=gO,EO=IZ,IO=AZ,AO=wO,TO=TZ,RO=HA,$O=$Z,jO=PZ,PO=DZ,OO=qZ,DO=HZ,zO=VZ,qO=FZ,HO=UZ,VO=WZ,BO="ContextMenu",[PRe]=HIe(BO,[Z2]),hn=Z2(),[ORe,XZ]=PRe(BO),KZ=e=>{const{__scopeContextMenu:t,children:a,onOpenChange:o,dir:i,modal:s=!0}=e,[l,h]=p.useState(!1),f=hn(t),y=Zn(o),k=p.useCallback(m=>{h(m),y(m)},[y]);return M.jsx(ORe,{scope:t,open:l,onOpenChange:k,modal:s,children:M.jsx(NO,{...f,dir:i,open:l,onOpenChange:k,modal:s,children:a})})};KZ.displayName=BO;var YZ="ContextMenuTrigger",QZ=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,disabled:o=!1,...i}=e,s=XZ(YZ,a),l=hn(a),h=p.useRef({x:0,y:0}),f=p.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...h.current})}),y=p.useRef(0),k=p.useCallback(()=>window.clearTimeout(y.current),[]),m=x=>{h.current={x:x.clientX,y:x.clientY},s.onOpenChange(!0)};return p.useEffect(()=>k,[k]),p.useEffect(()=>void(o&&k()),[o,k]),M.jsxs(M.Fragment,{children:[M.jsx(LO,{...l,virtualRef:f}),M.jsx(KIe.span,{"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,...i,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:o?e.onContextMenu:xe(e.onContextMenu,x=>{k(),m(x),x.preventDefault()}),onPointerDown:o?e.onPointerDown:xe(e.onPointerDown,Ch(x=>{k(),y.current=window.setTimeout(()=>m(x),700)})),onPointerMove:o?e.onPointerMove:xe(e.onPointerMove,Ch(k)),onPointerCancel:o?e.onPointerCancel:xe(e.onPointerCancel,Ch(k)),onPointerUp:o?e.onPointerUp:xe(e.onPointerUp,Ch(k))})]})});QZ.displayName=YZ;var DRe="ContextMenuPortal",JZ=e=>{const{__scopeContextMenu:t,...a}=e,o=hn(t);return M.jsx(EO,{...o,...a})};JZ.displayName=DRe;var eX="ContextMenuContent",tX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=XZ(eX,a),s=hn(a),l=p.useRef(!1);return M.jsx(IO,{...s,...o,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:h=>{var f;(f=e.onCloseAutoFocus)==null||f.call(e,h),!h.defaultPrevented&&l.current&&h.preventDefault(),l.current=!1},onInteractOutside:h=>{var f;(f=e.onInteractOutside)==null||f.call(e,h),!h.defaultPrevented&&!i.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)"}})});tX.displayName=eX;var zRe="ContextMenuGroup",nX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(AO,{...i,...o,ref:t})});nX.displayName=zRe;var qRe="ContextMenuLabel",aX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(TO,{...i,...o,ref:t})});aX.displayName=qRe;var HRe="ContextMenuItem",oX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(RO,{...i,...o,ref:t})});oX.displayName=HRe;var VRe="ContextMenuCheckboxItem",rX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx($O,{...i,...o,ref:t})});rX.displayName=VRe;var BRe="ContextMenuRadioGroup",iX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(jO,{...i,...o,ref:t})});iX.displayName=BRe;var FRe="ContextMenuRadioItem",cX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(PO,{...i,...o,ref:t})});cX.displayName=FRe;var URe="ContextMenuItemIndicator",sX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(OO,{...i,...o,ref:t})});sX.displayName=URe;var GRe="ContextMenuSeparator",lX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(DO,{...i,...o,ref:t})});lX.displayName=GRe;var WRe="ContextMenuArrow",ZRe=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(zO,{...i,...o,ref:t})});ZRe.displayName=WRe;var dX="ContextMenuSub",uX=e=>{const{__scopeContextMenu:t,children:a,onOpenChange:o,open:i,defaultOpen:s}=e,l=hn(t),[h,f]=bn({prop:i,defaultProp:s??!1,onChange:o,caller:dX});return M.jsx(qO,{...l,open:h,onOpenChange:f,children:a})};uX.displayName=dX;var XRe="ContextMenuSubTrigger",hX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(HO,{...i,...o,ref:t})});hX.displayName=XRe;var KRe="ContextMenuSubContent",pX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(VO,{...i,...o,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)"}})});pX.displayName=KRe;function Ch(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var YRe=KZ,QRe=QZ,fX=JZ,JRe=tX,e$e=nX,t$e=aX,n$e=oX,a$e=rX,o$e=iX,r$e=cX,yX=sX,i$e=lX,c$e=uX,s$e=hX,l$e=pX;function d$e({...e}){return M.jsx(YRe,{"data-slot":"context-menu",...e})}function u$e({...e}){return M.jsx(QRe,{"data-slot":"context-menu-trigger",...e})}function h$e({...e}){return M.jsx(e$e,{"data-slot":"context-menu-group",...e})}function p$e({...e}){return M.jsx(fX,{"data-slot":"context-menu-portal",...e})}function f$e({...e}){return M.jsx(c$e,{"data-slot":"context-menu-sub",...e})}function y$e({...e}){return M.jsx(o$e,{"data-slot":"context-menu-radio-group",...e})}function m$e({className:e,inset:t,children:a,...o}){return M.jsxs(s$e,{"data-slot":"context-menu-sub-trigger","data-inset":t,className:ee("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[a,M.jsx(lr,{className:"ml-auto"})]})}function v$e({className:e,...t}){return M.jsx(l$e,{"data-slot":"context-menu-sub-content",className:ee("bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}function k$e({className:e,...t}){return M.jsx(fX,{children:M.jsx(JRe,{"data-slot":"context-menu-content",className:ee("bg-popover text-popover-foreground 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 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...t})})}function g$e({className:e,inset:t,variant:a="default",...o}){return M.jsx(n$e,{"data-slot":"context-menu-item","data-inset":t,"data-variant":a,className:ee("focus:bg-accent focus:text-accent-foreground 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 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function M$e({className:e,children:t,checked:a,...o}){return M.jsxs(a$e,{"data-slot":"context-menu-checkbox-item",className:ee("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:a,...o,children:[M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(yX,{children:M.jsx(sr,{className:"size-4"})})}),t]})}function x$e({className:e,children:t,...a}){return M.jsxs(r$e,{"data-slot":"context-menu-radio-item",className:ee("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a,children:[M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(yX,{children:M.jsx(O1,{className:"size-2 fill-current"})})}),t]})}function b$e({className:e,inset:t,...a}){return M.jsx(t$e,{"data-slot":"context-menu-label","data-inset":t,className:ee("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...a})}function w$e({className:e,...t}){return M.jsx(i$e,{"data-slot":"context-menu-separator",className:ee("bg-border -mx-1 my-1 h-px",e),...t})}function _$e({className:e,...t}){return M.jsx("span",{"data-slot":"context-menu-shortcut",className:ee("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}var S$e="Portal",mX=p.forwardRef((e,t)=>{var h;const{container:a,...o}=e,[i,s]=p.useState(!1);St(()=>s(!0),[]);const l=a||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return l?ur.createPortal(M.jsx(jn.div,{...o,ref:t}),l):null});mX.displayName=S$e;var vX=mX;const Ei=p.createContext({activeIndex:0,setActiveIndex:()=>{},totalDialogs:0,setTotalDialogs:()=>{},isOpen:!1,setIsOpen:()=>{},clickable:!1,shouldAnimate:!1,setShouldAnimate:()=>{},closeDialog:()=>{}}),kX=p.forwardRef(({children:e,className:t,open:a=!1,onOpenChange:o,clickable:i=!1,...s},l)=>{const[h,f]=p.useState(0),[y,k]=p.useState(a),[m,x]=p.useState(!1),[S,b]=p.useState(0),w=_=>{_===h&&(h>0?f(N=>N-1):k(!1))};return p.useImperativeHandle(l,()=>({open:()=>{k(!0)},close:()=>{k(!1),f(0)},closeAll:()=>{k(!1),f(0)},next:()=>{f(_=>_+1)},prev:()=>{f(_=>_>0?_-1:0)},goTo:_=>{_>=0&&_<S&&f(_)},closeCurrent:()=>w(h),isOpen:y,activeIndex:h,totalDialogs:S}),[h,S,y]),p.useEffect(()=>{const _=document.documentElement;return y?(_.style.overflow="hidden",x(!0)):_.style.overflow="",o==null||o(y),()=>{_.style.overflow=""}},[y,o]),M.jsx(Ei.Provider,{value:{activeIndex:h,setActiveIndex:f,totalDialogs:S,setTotalDialogs:b,isOpen:y,setIsOpen:k,clickable:i,shouldAnimate:m,setShouldAnimate:x,closeDialog:w},children:M.jsx("div",{className:t,...s,children:e})})});kX.displayName="DialogStack";const C$e=({children:e,className:t,onClick:a,asChild:o,...i})=>{const s=p.useContext(Ei);if(!s)throw new Error("DialogStackTrigger must be used within a DialogStack");const l=h=>{s.setIsOpen(!0),a==null||a(h)};return o&&p.isValidElement(e)?p.cloneElement(e,{onClick:l,className:ee(t,e.props.className),...i}):M.jsx("button",{onClick:l,className:ee("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm","ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","bg-primary text-primary-foreground hover:bg-primary/90","h-10 px-4 py-2",t),...i,children:e})},N$e=({className:e,...t})=>{const a=p.useContext(Ei);if(!a)throw new Error("DialogStackOverlay must be used within a DialogStack");return a.isOpen?M.jsx("div",{className:ee("fixed inset-0 z-[1001] bg-black/80 backdrop-blur-sm","data-[state=closed]:animate-out data-[state=open]:animate-in","data-[state=closed]:fade-out-0 slide-in-from-right-1/2 data-[state=open]:fade-in-0",e),onClick:()=>{a.activeIndex===0?a.setIsOpen(!1):a.setActiveIndex(a.activeIndex-1)},...t}):null},L$e=({children:e,className:t,...a})=>{const o=p.useContext(Ei),i=p.Children.count(e),[s,l]=p.useState(i);if(p.useEffect(()=>{l(i)},[i]),!o)throw new Error("DialogStackBody must be used within a DialogStack");return o.isOpen?M.jsx(Ei.Provider,{value:{...o,totalDialogs:s,setTotalDialogs:l},children:M.jsx(vX,{children:M.jsx("div",{className:ee("pointer-events-none fixed z-[1002] w-full max-w-full md:max-w-[67%] right-0 top-0 md:top-[1vh]",t),...a,children:p.Children.map(e,(h,f)=>p.isValidElement(h)?p.cloneElement(h,{index:f}):h)})})}):null},E$e=({children:e,className:t,index:a=0,offset:o=20,...i})=>{const s=p.useContext(Ei),[l,h]=p.useState(!1),f=p.useRef(null),y=p.useRef(!1);if(!s)throw new Error("DialogStackContent must be used within a DialogStack");if(!s.isOpen)return null;const k=()=>{s.setIsOpen(!1),s.setActiveIndex(0)},m=()=>{if(y.current){y.current=!1;return}s.closeDialog(a)},x=()=>{y.current=!1,h(!0),f.current=setTimeout(()=>{y.current=!0,h(!1),k()},600)},S=()=>{f.current&&(clearTimeout(f.current),f.current=null),h(!1)},b=L=>{L.stopPropagation(),s.clickable&&s.activeIndex>a&&s.setActiveIndex(a??0)},w=a-s.activeIndex,_=w<0?`-${Math.abs(w)*o}px`:"0",N=a===0&&s.activeIndex===0&&s.shouldAnimate;return p.useEffect(()=>{if(N){const L=setTimeout(()=>{s.setShouldAnimate(!1)},200);return()=>clearTimeout(L)}},[N]),M.jsxs("div",{onClick:b,className:ee("h-[100vh] md:h-[98vh] w-full md:rounded-l-md border bg-background shadow-lg md:transition-all duration-200",N&&"animate-in slide-in-from-right-1/2",w<0&&"brightness-75 blur-[2px]",t),style:{top:0,marginLeft:`${_}`,marginTop:`${window.innerWidth>768?Math.abs(w)*10:0}px`,width:w<0?`calc(100% + ${Math.abs(w)*o}px)`:"100%",zIndex:w<0?50-Math.abs(s.activeIndex-(a??0)):1002,position:w?"absolute":"relative",opacity:w>0?0:1,pointerEvents:w>0?"none":"auto",cursor:s.clickable&&s.activeIndex>a?"pointer":"default"},...i,children:[M.jsx("div",{className:ee("h-full w-full overflow-y-auto p-6 transition-all duration-200",s.activeIndex!==a&&"pointer-events-none select-none"),children:e}),s.activeIndex===a&&M.jsx(vX,{children:M.jsx(bA,{variant:"ghost",className:ee("fixed z-[1100] top-4 right-4 p-1 size-8 transition-all",l&&"bg-destructive/20 scale-110"),onClick:m,onPointerDown:x,onPointerUp:S,onPointerLeave:S,onPointerCancel:S,"aria-label":"Close",title:s.totalDialogs>1?"Click to close, hold to close all":"Close",children:M.jsx(bi,{})})})]})},I$e=({children:e,className:t,...a})=>M.jsx("h2",{className:ee("font-semibold text-lg leading-none tracking-tight",t),...a,children:e}),A$e=({children:e,className:t,...a})=>M.jsx("p",{className:ee("text-muted-foreground text-sm",t),...a,children:e}),T$e=({className:e,...t})=>M.jsx("div",{className:ee("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),R$e=({children:e,className:t,...a})=>M.jsx("div",{className:ee("flex items-center justify-end space-x-2 pt-4",t),...a,children:e}),$$e=({children:e,className:t,asChild:a,...o})=>{const i=p.useContext(Ei);if(!i)throw new Error("DialogStackNext must be used within a DialogStack");const s=()=>{i.activeIndex<i.totalDialogs-1&&i.setActiveIndex(i.activeIndex+1)};return a&&p.isValidElement(e)?p.cloneElement(e,{onClick:s,className:ee(t,e.props.className),...o}):M.jsx("button",{type:"button",onClick:s,className:ee("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",t),disabled:i.activeIndex>=i.totalDialogs-1,...o,children:e||"Next"})},j$e=({children:e,className:t,asChild:a,...o})=>{const i=p.useContext(Ei);if(!i)throw new Error("DialogStackPrevious must be used within a DialogStack");const s=()=>{i.activeIndex>0&&i.setActiveIndex(i.activeIndex-1)};return a&&p.isValidElement(e)?p.cloneElement(e,{onClick:s,className:ee(t,e.props.className),...o}):M.jsx("button",{type:"button",onClick:s,className:ee("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",t),disabled:i.activeIndex<=0,...o,children:e||"Previous"})};function P$e(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,O$e(i,...t)]}function O$e(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function D$e(e){const t=z$e(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(H$e);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function z$e(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=B$e(i),h=V$e(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var q$e=Symbol("radix.slottable");function H$e(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===q$e}function V$e(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function B$e(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var F$e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],U$e=F$e.reduce((e,t)=>{const a=D$e(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),VA="DropdownMenu",[G$e]=P$e(VA,[Z2]),pn=Z2(),[W$e,gX]=G$e(VA),MX=e=>{const{__scopeDropdownMenu:t,children:a,dir:o,open:i,defaultOpen:s,onOpenChange:l,modal:h=!0}=e,f=pn(t),y=p.useRef(null),[k,m]=bn({prop:i,defaultProp:s??!1,onChange:l,caller:VA});return M.jsx(W$e,{scope:t,triggerId:It(),triggerRef:y,contentId:It(),open:k,onOpenChange:m,onOpenToggle:p.useCallback(()=>m(x=>!x),[m]),modal:h,children:M.jsx(NO,{...f,open:k,onOpenChange:m,dir:o,modal:h,children:a})})};MX.displayName=VA;var xX="DropdownMenuTrigger",bX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,disabled:o=!1,...i}=e,s=gX(xX,a),l=pn(a);return M.jsx(LO,{asChild:!0,...l,children:M.jsx(U$e.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":o?"":void 0,disabled:o,...i,ref:kt(t,s.triggerRef),onPointerDown:xe(e.onPointerDown,h=>{!o&&h.button===0&&h.ctrlKey===!1&&(s.onOpenToggle(),s.open||h.preventDefault())}),onKeyDown:xe(e.onKeyDown,h=>{o||(["Enter"," "].includes(h.key)&&s.onOpenToggle(),h.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});bX.displayName=xX;var Z$e="DropdownMenuPortal",wX=e=>{const{__scopeDropdownMenu:t,...a}=e,o=pn(t);return M.jsx(EO,{...o,...a})};wX.displayName=Z$e;var _X="DropdownMenuContent",SX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=gX(_X,a),s=pn(a),l=p.useRef(!1);return M.jsx(IO,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...o,ref:t,onCloseAutoFocus:xe(e.onCloseAutoFocus,h=>{var f;l.current||(f=i.triggerRef.current)==null||f.focus(),l.current=!1,h.preventDefault()}),onInteractOutside:xe(e.onInteractOutside,h=>{const f=h.detail.originalEvent,y=f.button===0&&f.ctrlKey===!0,k=f.button===2||y;(!i.modal||k)&&(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)"}})});SX.displayName=_X;var X$e="DropdownMenuGroup",CX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(AO,{...i,...o,ref:t})});CX.displayName=X$e;var K$e="DropdownMenuLabel",NX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(TO,{...i,...o,ref:t})});NX.displayName=K$e;var Y$e="DropdownMenuItem",LX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(RO,{...i,...o,ref:t})});LX.displayName=Y$e;var Q$e="DropdownMenuCheckboxItem",EX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx($O,{...i,...o,ref:t})});EX.displayName=Q$e;var J$e="DropdownMenuRadioGroup",IX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(jO,{...i,...o,ref:t})});IX.displayName=J$e;var eje="DropdownMenuRadioItem",AX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(PO,{...i,...o,ref:t})});AX.displayName=eje;var tje="DropdownMenuItemIndicator",TX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(OO,{...i,...o,ref:t})});TX.displayName=tje;var nje="DropdownMenuSeparator",RX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(DO,{...i,...o,ref:t})});RX.displayName=nje;var aje="DropdownMenuArrow",oje=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(zO,{...i,...o,ref:t})});oje.displayName=aje;var rje=e=>{const{__scopeDropdownMenu:t,children:a,open:o,onOpenChange:i,defaultOpen:s}=e,l=pn(t),[h,f]=bn({prop:o,defaultProp:s??!1,onChange:i,caller:"DropdownMenuSub"});return M.jsx(qO,{...l,open:h,onOpenChange:f,children:a})},ije="DropdownMenuSubTrigger",$X=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(HO,{...i,...o,ref:t})});$X.displayName=ije;var cje="DropdownMenuSubContent",jX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(VO,{...i,...o,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)"}})});jX.displayName=cje;var sje=MX,lje=bX,PX=wX,dje=SX,uje=CX,hje=NX,pje=LX,fje=EX,yje=IX,mje=AX,OX=TX,vje=RX,kje=rje,gje=$X,Mje=jX;function xje({...e}){return M.jsx(sje,{"data-slot":"dropdown-menu",...e})}function bje({...e}){return M.jsx(PX,{"data-slot":"dropdown-menu-portal",...e})}function wje({...e}){return M.jsx(lje,{"data-slot":"dropdown-menu-trigger",...e})}function _je({className:e,sideOffset:t=4,...a}){return M.jsx(PX,{children:M.jsx(dje,{"data-slot":"dropdown-menu-content",sideOffset:t,className:ee("bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...a})})}function Sje({...e}){return M.jsx(uje,{"data-slot":"dropdown-menu-group",...e})}function Cje({className:e,inset:t,variant:a="default",...o}){return M.jsx(pje,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":a,className:ee("focus:bg-accent focus:text-accent-foreground 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 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function Nje({className:e,children:t,checked:a,...o}){return M.jsxs(fje,{"data-slot":"dropdown-menu-checkbox-item",className:ee("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:a,...o,children:[M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(OX,{children:M.jsx(sr,{className:"size-4"})})}),t]})}function Lje({...e}){return M.jsx(yje,{"data-slot":"dropdown-menu-radio-group",...e})}function Eje({className:e,children:t,...a}){return M.jsxs(mje,{"data-slot":"dropdown-menu-radio-item",className:ee("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a,children:[M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(OX,{children:M.jsx(O1,{className:"size-2 fill-current"})})}),t]})}function Ije({className:e,inset:t,...a}){return M.jsx(hje,{"data-slot":"dropdown-menu-label","data-inset":t,className:ee("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...a})}function Aje({className:e,...t}){return M.jsx(vje,{"data-slot":"dropdown-menu-separator",className:ee("bg-border -mx-1 my-1 h-px",e),...t})}function Tje({className:e,...t}){return M.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:ee("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function Rje({...e}){return M.jsx(kje,{"data-slot":"dropdown-menu-sub",...e})}function $je({className:e,inset:t,children:a,...o}){return M.jsxs(gje,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:ee("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...o,children:[a,M.jsx(lr,{className:"ml-auto size-4"})]})}function jje({className:e,...t}){return M.jsx(Mje,{"data-slot":"dropdown-menu-sub-content",className:ee("bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}function DX({className:e,type:t,...a}){return M.jsx("input",{type:t,"data-slot":"input",className:ee("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:[&::-webkit-calendar-picker-indicator]:invert",e),...a})}var Pje="Label",zX=p.forwardRef((e,t)=>M.jsx(jn.label,{...e,ref:t,onMouseDown:a=>{var i;a.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));zX.displayName=Pje;var Oje=zX;function Dje({className:e,...t}){return M.jsx(Oje,{"data-slot":"label",className:ee("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function zje(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,qje(i,...t)]}function qje(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function Hje(e){const t=Vje(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(Fje);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function Vje(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=Gje(i),h=Uje(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Bje=Symbol("radix.slottable");function Fje(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Bje}function Uje(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function Gje(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var Wje=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qX=Wje.reduce((e,t)=>{const a=Hje(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Y2="Menubar",[cP,Zje,Xje]=H2(Y2),[HX]=zje(Y2,[Xje,qA]),fn=Z2(),VX=qA(),[Kje,FO]=HX(Y2),BX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,value:o,onValueChange:i,defaultValue:s,loop:l=!0,dir:h,...f}=e,y=V2(h),k=VX(a),[m,x]=bn({prop:o,onChange:i,defaultProp:s??"",caller:Y2}),[S,b]=p.useState(null);return M.jsx(Kje,{scope:a,value:m,onMenuOpen:p.useCallback(w=>{x(w),b(w)},[x]),onMenuClose:p.useCallback(()=>x(""),[x]),onMenuToggle:p.useCallback(w=>{x(_=>_?"":w),b(w)},[x]),dir:y,loop:l,children:M.jsx(cP.Provider,{scope:a,children:M.jsx(cP.Slot,{scope:a,children:M.jsx(wZ,{asChild:!0,...k,orientation:"horizontal",loop:l,dir:y,currentTabStopId:S,onCurrentTabStopIdChange:b,children:M.jsx(qX.div,{role:"menubar",...f,ref:t})})})})})});BX.displayName=Y2;var UO="MenubarMenu",[Yje,FX]=HX(UO),UX=e=>{const{__scopeMenubar:t,value:a,...o}=e,i=It(),s=a||i||"LEGACY_REACT_AUTO_VALUE",l=FO(UO,t),h=fn(t),f=p.useRef(null),y=p.useRef(!1),k=l.value===s;return p.useEffect(()=>{k||(y.current=!1)},[k]),M.jsx(Yje,{scope:t,value:s,triggerId:It(),triggerRef:f,contentId:It(),wasKeyboardTriggerOpenRef:y,children:M.jsx(NO,{...h,open:k,onOpenChange:m=>{m||l.onMenuClose()},modal:!1,dir:l.dir,...o})})};UX.displayName=UO;var sP="MenubarTrigger",GX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,disabled:o=!1,...i}=e,s=VX(a),l=fn(a),h=FO(sP,a),f=FX(sP,a),y=p.useRef(null),k=ze(t,y,f.triggerRef),[m,x]=p.useState(!1),S=h.value===f.value;return M.jsx(cP.ItemSlot,{scope:a,value:f.value,disabled:o,children:M.jsx(_Z,{asChild:!0,...s,focusable:!o,tabStopId:f.value,children:M.jsx(LO,{asChild:!0,...l,children:M.jsx(qX.button,{type:"button",role:"menuitem",id:f.triggerId,"aria-haspopup":"menu","aria-expanded":S,"aria-controls":S?f.contentId:void 0,"data-highlighted":m?"":void 0,"data-state":S?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:k,onPointerDown:xe(e.onPointerDown,b=>{!o&&b.button===0&&b.ctrlKey===!1&&(h.onMenuOpen(f.value),S||b.preventDefault())}),onPointerEnter:xe(e.onPointerEnter,()=>{var w;!!h.value&&!S&&(h.onMenuOpen(f.value),(w=y.current)==null||w.focus())}),onKeyDown:xe(e.onKeyDown,b=>{o||(["Enter"," "].includes(b.key)&&h.onMenuToggle(f.value),b.key==="ArrowDown"&&h.onMenuOpen(f.value),["Enter"," ","ArrowDown"].includes(b.key)&&(f.wasKeyboardTriggerOpenRef.current=!0,b.preventDefault()))}),onFocus:xe(e.onFocus,()=>x(!0)),onBlur:xe(e.onBlur,()=>x(!1))})})})})});GX.displayName=sP;var Qje="MenubarPortal",WX=e=>{const{__scopeMenubar:t,...a}=e,o=fn(t);return M.jsx(EO,{...o,...a})};WX.displayName=Qje;var lP="MenubarContent",ZX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,align:o="start",...i}=e,s=fn(a),l=FO(lP,a),h=FX(lP,a),f=Zje(a),y=p.useRef(!1);return M.jsx(IO,{id:h.contentId,"aria-labelledby":h.triggerId,"data-radix-menubar-content":"",...s,...i,ref:t,align:o,onCloseAutoFocus:xe(e.onCloseAutoFocus,k=>{var x;!!!l.value&&!y.current&&((x=h.triggerRef.current)==null||x.focus()),y.current=!1,k.preventDefault()}),onFocusOutside:xe(e.onFocusOutside,k=>{const m=k.target;f().some(S=>{var b;return(b=S.ref.current)==null?void 0:b.contains(m)})&&k.preventDefault()}),onInteractOutside:xe(e.onInteractOutside,()=>{y.current=!0}),onEntryFocus:k=>{h.wasKeyboardTriggerOpenRef.current||k.preventDefault()},onKeyDown:xe(e.onKeyDown,k=>{if(["ArrowRight","ArrowLeft"].includes(k.key)){const m=k.target,x=m.hasAttribute("data-radix-menubar-subtrigger"),S=m.closest("[data-radix-menubar-content]")!==k.currentTarget,w=(l.dir==="rtl"?"ArrowRight":"ArrowLeft")===k.key;if(!w&&x||S&&w)return;let L=f().filter(D=>!D.disabled).map(D=>D.value);w&&L.reverse();const I=L.indexOf(h.value);L=l.loop?uPe(L,I+1):L.slice(I+1);const[O]=L;O&&l.onMenuOpen(O)}},{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)"}})});ZX.displayName=lP;var Jje="MenubarGroup",XX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(AO,{...i,...o,ref:t})});XX.displayName=Jje;var ePe="MenubarLabel",KX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(TO,{...i,...o,ref:t})});KX.displayName=ePe;var tPe="MenubarItem",YX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(RO,{...i,...o,ref:t})});YX.displayName=tPe;var nPe="MenubarCheckboxItem",QX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx($O,{...i,...o,ref:t})});QX.displayName=nPe;var aPe="MenubarRadioGroup",JX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(jO,{...i,...o,ref:t})});JX.displayName=aPe;var oPe="MenubarRadioItem",eK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(PO,{...i,...o,ref:t})});eK.displayName=oPe;var rPe="MenubarItemIndicator",tK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(OO,{...i,...o,ref:t})});tK.displayName=rPe;var iPe="MenubarSeparator",nK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(DO,{...i,...o,ref:t})});nK.displayName=iPe;var cPe="MenubarArrow",sPe=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(zO,{...i,...o,ref:t})});sPe.displayName=cPe;var aK="MenubarSub",oK=e=>{const{__scopeMenubar:t,children:a,open:o,onOpenChange:i,defaultOpen:s}=e,l=fn(t),[h,f]=bn({prop:o,defaultProp:s??!1,onChange:i,caller:aK});return M.jsx(qO,{...l,open:h,onOpenChange:f,children:a})};oK.displayName=aK;var lPe="MenubarSubTrigger",rK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(HO,{"data-radix-menubar-subtrigger":"",...i,...o,ref:t})});rK.displayName=lPe;var dPe="MenubarSubContent",iK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(VO,{...i,"data-radix-menubar-content":"",...o,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)"}})});iK.displayName=dPe;function uPe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var hPe=BX,pPe=UX,fPe=GX,yPe=WX,mPe=ZX,vPe=XX,kPe=KX,gPe=YX,MPe=QX,xPe=JX,bPe=eK,cK=tK,wPe=nK,_Pe=oK,SPe=rK,CPe=iK;function NPe({className:e,...t}){return M.jsx(hPe,{"data-slot":"menubar",className:ee("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",e),...t})}function LPe({...e}){return M.jsx(pPe,{"data-slot":"menubar-menu",...e})}function EPe({...e}){return M.jsx(vPe,{"data-slot":"menubar-group",...e})}function sK({...e}){return M.jsx(yPe,{"data-slot":"menubar-portal",...e})}function IPe({...e}){return M.jsx(xPe,{"data-slot":"menubar-radio-group",...e})}function APe({className:e,...t}){return M.jsx(fPe,{"data-slot":"menubar-trigger",className:ee("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",e),...t})}function TPe({className:e,align:t="start",alignOffset:a=-4,sideOffset:o=8,...i}){return M.jsx(sK,{children:M.jsx(mPe,{"data-slot":"menubar-content",align:t,alignOffset:a,sideOffset:o,className:ee("bg-popover text-popover-foreground data-[state=open]:animate-in 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 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",e),...i})})}function RPe({className:e,inset:t,variant:a="default",...o}){return M.jsx(gPe,{"data-slot":"menubar-item","data-inset":t,"data-variant":a,className:ee("focus:bg-accent focus:text-accent-foreground 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 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function $Pe({className:e,children:t,checked:a,...o}){return M.jsxs(MPe,{"data-slot":"menubar-checkbox-item",className:ee("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:a,...o,children:[M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(cK,{children:M.jsx(sr,{className:"size-4"})})}),t]})}function jPe({className:e,children:t,...a}){return M.jsxs(bPe,{"data-slot":"menubar-radio-item",className:ee("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a,children:[M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(cK,{children:M.jsx(O1,{className:"size-2 fill-current"})})}),t]})}function PPe({className:e,inset:t,...a}){return M.jsx(kPe,{"data-slot":"menubar-label","data-inset":t,className:ee("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...a})}function OPe({className:e,...t}){return M.jsx(wPe,{"data-slot":"menubar-separator",className:ee("bg-border -mx-1 my-1 h-px",e),...t})}function DPe({className:e,...t}){return M.jsx("span",{"data-slot":"menubar-shortcut",className:ee("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function zPe({...e}){return M.jsx(_Pe,{"data-slot":"menubar-sub",...e})}function qPe({className:e,inset:t,children:a,...o}){return M.jsxs(SPe,{"data-slot":"menubar-sub-trigger","data-inset":t,className:ee("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",e),...o,children:[a,M.jsx(lr,{className:"ml-auto h-4 w-4"})]})}function HPe({className:e,...t}){return M.jsx(CPe,{"data-slot":"menubar-sub-content",className:ee("bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}function VPe({className:e,...t}){return M.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:ee("mx-auto flex w-full justify-center",e),...t})}function BPe({className:e,...t}){return M.jsx("ul",{"data-slot":"pagination-content",className:ee("flex flex-row items-center gap-1",e),...t})}function FPe({...e}){return M.jsx("li",{"data-slot":"pagination-item",...e})}function GO({className:e,isActive:t,size:a="icon",...o}){return M.jsx("a",{"aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,className:ee(JI({variant:t?"outline":"ghost",size:a}),e),...o})}function UPe({className:e,label:t="Previous",...a}){return M.jsxs(GO,{"aria-label":t,size:"default",className:ee("gap-1 px-2.5 sm:pl-2.5",e),...a,children:[M.jsx(Hd,{}),M.jsx("span",{className:"hidden sm:block",children:t})]})}function GPe({className:e,label:t="Next",...a}){return M.jsxs(GO,{"aria-label":t,size:"default",className:ee("gap-1 px-2.5 sm:pr-2.5",e),...a,children:[M.jsx("span",{className:"hidden sm:block",children:t}),M.jsx(lr,{})]})}function WPe({className:e,...t}){return M.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:ee("flex size-9 items-center justify-center",e),...t,children:[M.jsx(Dr,{className:"size-4"}),M.jsx("span",{className:"sr-only",children:"More pages"})]})}function ZPe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,XPe(i,...t)]}function XPe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function lK(e){const t=KPe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(QPe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function KPe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=eOe(i),h=JPe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var YPe=Symbol("radix.slottable");function QPe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===YPe}function JPe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function eOe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var tOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],WO=tOe.reduce((e,t)=>{const a=lK(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),nOe="Portal",dK=p.forwardRef((e,t)=>{var h;const{container:a,...o}=e,[i,s]=p.useState(!1);St(()=>s(!0),[]);const l=a||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return l?ur.createPortal(M.jsx(WO.div,{...o,ref:t}),l):null});dK.displayName=nOe;var BA="Popover",[uK]=ZPe(BA,[Ti]),Q2=Ti(),[aOe,$i]=uK(BA),hK=e=>{const{__scopePopover:t,children:a,open:o,defaultOpen:i,onOpenChange:s,modal:l=!1}=e,h=Q2(t),f=p.useRef(null),[y,k]=p.useState(!1),[m,x]=bn({prop:o,defaultProp:i??!1,onChange:s,caller:BA});return M.jsx(F2,{...h,children:M.jsx(aOe,{scope:t,contentId:It(),triggerRef:f,open:m,onOpenChange:x,onOpenToggle:p.useCallback(()=>x(S=>!S),[x]),hasCustomAnchor:y,onCustomAnchorAdd:p.useCallback(()=>k(!0),[]),onCustomAnchorRemove:p.useCallback(()=>k(!1),[]),modal:l,children:a})})};hK.displayName=BA;var pK="PopoverAnchor",fK=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=$i(pK,a),s=Q2(a),{onCustomAnchorAdd:l,onCustomAnchorRemove:h}=i;return p.useEffect(()=>(l(),()=>h()),[l,h]),M.jsx(U2,{...s,...o,ref:t})});fK.displayName=pK;var yK="PopoverTrigger",mK=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=$i(yK,a),s=Q2(a),l=ze(t,i.triggerRef),h=M.jsx(WO.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":xK(i.open),...o,ref:l,onClick:xe(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?h:M.jsx(U2,{asChild:!0,...s,children:h})});mK.displayName=yK;var ZO="PopoverPortal",[oOe,rOe]=uK(ZO,{forceMount:void 0}),vK=e=>{const{__scopePopover:t,forceMount:a,children:o,container:i}=e,s=$i(ZO,t);return M.jsx(oOe,{scope:t,forceMount:a,children:M.jsx(Pn,{present:a||s.open,children:M.jsx(dK,{asChild:!0,container:i,children:o})})})};vK.displayName=ZO;var Zd="PopoverContent",kK=p.forwardRef((e,t)=>{const a=rOe(Zd,e.__scopePopover),{forceMount:o=a.forceMount,...i}=e,s=$i(Zd,e.__scopePopover);return M.jsx(Pn,{present:o||s.open,children:s.modal?M.jsx(cOe,{...i,ref:t}):M.jsx(sOe,{...i,ref:t})})});kK.displayName=Zd;var iOe=lK("PopoverContent.RemoveScroll"),cOe=p.forwardRef((e,t)=>{const a=$i(Zd,e.__scopePopover),o=p.useRef(null),i=ze(t,o),s=p.useRef(!1);return p.useEffect(()=>{const l=o.current;if(l)return IA(l)},[]),M.jsx(z2,{as:iOe,allowPinchZoom:!0,children:M.jsx(gK,{...e,ref:i,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xe(e.onCloseAutoFocus,l=>{var h;l.preventDefault(),s.current||(h=a.triggerRef.current)==null||h.focus()}),onPointerDownOutside:xe(e.onPointerDownOutside,l=>{const h=l.detail.originalEvent,f=h.button===0&&h.ctrlKey===!0,y=h.button===2||f;s.current=y},{checkForDefaultPrevented:!1}),onFocusOutside:xe(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),sOe=p.forwardRef((e,t)=>{const a=$i(Zd,e.__scopePopover),o=p.useRef(!1),i=p.useRef(!1);return M.jsx(gK,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,h;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(o.current||(h=a.triggerRef.current)==null||h.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{var f,y;(f=e.onInteractOutside)==null||f.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;((y=a.triggerRef.current)==null?void 0:y.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),gK=p.forwardRef((e,t)=>{const{__scopePopover:a,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:y,onInteractOutside:k,...m}=e,x=$i(Zd,a),S=Q2(a);return LA(),M.jsx(D2,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:M.jsx(nu,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:k,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:y,onDismiss:()=>x.onOpenChange(!1),children:M.jsx(DA,{"data-state":xK(x.open),role:"dialog",id:x.contentId,...S,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),MK="PopoverClose",lOe=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=$i(MK,a);return M.jsx(WO.button,{type:"button",...o,ref:t,onClick:xe(e.onClick,()=>i.onOpenChange(!1))})});lOe.displayName=MK;var dOe="PopoverArrow",uOe=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=Q2(a);return M.jsx(zA,{...i,...o,ref:t})});uOe.displayName=dOe;function xK(e){return e?"open":"closed"}var hOe=hK,pOe=fK,fOe=mK,yOe=vK,mOe=kK;function bK({...e}){return M.jsx(hOe,{"data-slot":"popover",...e})}function wK({...e}){return M.jsx(fOe,{"data-slot":"popover-trigger",...e})}function _K({className:e,align:t="center",sideOffset:a=4,...o}){return M.jsx(yOe,{children:M.jsx(mOe,{"data-slot":"popover-content",align:t,sideOffset:a,className:ee("bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}function vOe({...e}){return M.jsx(pOe,{"data-slot":"popover-anchor",...e})}function lA(e,[t,a]){return Math.min(a,Math.max(t,e))}function kOe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,gOe(i,...t)]}function gOe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function SK(e){const t=MOe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(bOe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function MOe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=_Oe(i),h=wOe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xOe=Symbol("radix.slottable");function bOe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xOe}function wOe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function _Oe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var SOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],On=SOe.reduce((e,t)=>{const a=SK(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),COe="Portal",CK=p.forwardRef((e,t)=>{var h;const{container:a,...o}=e,[i,s]=p.useState(!1);St(()=>s(!0),[]);const l=a||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return l?ur.createPortal(M.jsx(On.div,{...o,ref:t}),l):null});CK.displayName=COe;function NOe(e){const t=LOe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(IOe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function LOe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=TOe(i),h=AOe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var EOe=Symbol("radix.slottable");function IOe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===EOe}function AOe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function TOe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var ROe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$Oe=ROe.reduce((e,t)=>{const a=NOe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),NK=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),jOe="VisuallyHidden",LK=p.forwardRef((e,t)=>M.jsx($Oe.span,{...e,ref:t,style:{...NK,...e.style}}));LK.displayName=jOe;var POe=LK,OOe=[" ","Enter","ArrowUp","ArrowDown"],DOe=[" ","Enter"],F1="Select",[FA,UA,zOe]=H2(F1),[cu]=kOe(F1,[zOe,Ti]),GA=Ti(),[qOe,ji]=cu(F1),[HOe,VOe]=cu(F1),EK=e=>{const{__scopeSelect:t,children:a,open:o,defaultOpen:i,onOpenChange:s,value:l,defaultValue:h,onValueChange:f,dir:y,name:k,autoComplete:m,disabled:x,required:S,form:b}=e,w=GA(t),[_,N]=p.useState(null),[L,I]=p.useState(null),[O,D]=p.useState(!1),P=V2(y),[A,j]=bn({prop:o,defaultProp:i??!1,onChange:s,caller:F1}),[V,K]=bn({prop:l,defaultProp:h,onChange:f,caller:F1}),q=p.useRef(null),B=_?b||!!_.closest("form"):!0,[F,J]=p.useState(new Set),pe=Array.from(F).map(R=>R.props.value).join(";");return M.jsx(F2,{...w,children:M.jsxs(qOe,{required:S,scope:t,trigger:_,onTriggerChange:N,valueNode:L,onValueNodeChange:I,valueNodeHasChildren:O,onValueNodeHasChildrenChange:D,contentId:It(),value:V,onValueChange:K,open:A,onOpenChange:j,dir:P,triggerPointerDownPosRef:q,disabled:x,children:[M.jsx(FA.Provider,{scope:t,children:M.jsx(HOe,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(R=>{J($=>new Set($).add(R))},[]),onNativeOptionRemove:p.useCallback(R=>{J($=>{const T=new Set($);return T.delete(R),T})},[]),children:a})}),B?M.jsxs(eY,{"aria-hidden":!0,required:S,tabIndex:-1,name:k,autoComplete:m,value:V,onChange:R=>K(R.target.value),disabled:x,form:b,children:[V===void 0?M.jsx("option",{value:""}):null,Array.from(F)]},pe):null]})})};EK.displayName=F1;var IK="SelectTrigger",AK=p.forwardRef((e,t)=>{const{__scopeSelect:a,disabled:o=!1,...i}=e,s=GA(a),l=ji(IK,a),h=l.disabled||o,f=ze(t,l.onTriggerChange),y=UA(a),k=p.useRef("touch"),[m,x,S]=nY(w=>{const _=y().filter(I=>!I.disabled),N=_.find(I=>I.value===l.value),L=aY(_,w,N);L!==void 0&&l.onValueChange(L.value)}),b=w=>{h||(l.onOpenChange(!0),S()),w&&(l.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return M.jsx(U2,{asChild:!0,...s,children:M.jsx(On.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":tY(l.value)?"":void 0,...i,ref:f,onClick:xe(i.onClick,w=>{w.currentTarget.focus(),k.current!=="mouse"&&b(w)}),onPointerDown:xe(i.onPointerDown,w=>{k.current=w.pointerType;const _=w.target;_.hasPointerCapture(w.pointerId)&&_.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(b(w),w.preventDefault())}),onKeyDown:xe(i.onKeyDown,w=>{const _=m.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&x(w.key),!(_&&w.key===" ")&&OOe.includes(w.key)&&(b(),w.preventDefault())})})})});AK.displayName=IK;var TK="SelectValue",RK=p.forwardRef((e,t)=>{const{__scopeSelect:a,className:o,style:i,children:s,placeholder:l="",...h}=e,f=ji(TK,a),{onValueNodeHasChildrenChange:y}=f,k=s!==void 0,m=ze(t,f.onValueNodeChange);return St(()=>{y(k)},[y,k]),M.jsx(On.span,{...h,ref:m,style:{pointerEvents:"none"},children:tY(f.value)?M.jsx(M.Fragment,{children:l}):s})});RK.displayName=TK;var BOe="SelectIcon",$K=p.forwardRef((e,t)=>{const{__scopeSelect:a,children:o,...i}=e;return M.jsx(On.span,{"aria-hidden":!0,...i,ref:t,children:o||"▼"})});$K.displayName=BOe;var FOe="SelectPortal",jK=e=>M.jsx(CK,{asChild:!0,...e});jK.displayName=FOe;var U1="SelectContent",PK=p.forwardRef((e,t)=>{const a=ji(U1,e.__scopeSelect),[o,i]=p.useState();if(St(()=>{i(new DocumentFragment)},[]),!a.open){const s=o;return s?Kd.createPortal(M.jsx(OK,{scope:e.__scopeSelect,children:M.jsx(FA.Slot,{scope:e.__scopeSelect,children:M.jsx("div",{children:e.children})})}),s):null}return M.jsx(DK,{...e,ref:t})});PK.displayName=U1;var ka=10,[OK,Pi]=cu(U1),UOe="SelectContentImpl",GOe=SK("SelectContent.RemoveScroll"),DK=p.forwardRef((e,t)=>{const{__scopeSelect:a,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:l,side:h,sideOffset:f,align:y,alignOffset:k,arrowPadding:m,collisionBoundary:x,collisionPadding:S,sticky:b,hideWhenDetached:w,avoidCollisions:_,...N}=e,L=ji(U1,a),[I,O]=p.useState(null),[D,P]=p.useState(null),A=ze(t,he=>O(he)),[j,V]=p.useState(null),[K,q]=p.useState(null),B=UA(a),[F,J]=p.useState(!1),pe=p.useRef(!1);p.useEffect(()=>{if(I)return IA(I)},[I]),LA();const R=p.useCallback(he=>{const[ve,...me]=B().map(ce=>ce.ref.current),[ge]=me.slice(-1),fe=document.activeElement;for(const ce of he)if(ce===fe||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===ve&&D&&(D.scrollTop=0),ce===ge&&D&&(D.scrollTop=D.scrollHeight),ce==null||ce.focus(),document.activeElement!==fe))return},[B,D]),$=p.useCallback(()=>R([j,I]),[R,j,I]);p.useEffect(()=>{F&&$()},[F,$]);const{onOpenChange:T,triggerPointerDownPosRef:G}=L;p.useEffect(()=>{if(I){let he={x:0,y:0};const ve=ge=>{var fe,ce;he={x:Math.abs(Math.round(ge.pageX)-(((fe=G.current)==null?void 0:fe.x)??0)),y:Math.abs(Math.round(ge.pageY)-(((ce=G.current)==null?void 0:ce.y)??0))}},me=ge=>{he.x<=10&&he.y<=10?ge.preventDefault():I.contains(ge.target)||T(!1),document.removeEventListener("pointermove",ve),G.current=null};return G.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",me,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",me,{capture:!0})}}},[I,T,G]),p.useEffect(()=>{const he=()=>T(!1);return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[T]);const[W,Me]=nY(he=>{const ve=B().filter(fe=>!fe.disabled),me=ve.find(fe=>fe.ref.current===document.activeElement),ge=aY(ve,he,me);ge&&setTimeout(()=>ge.ref.current.focus())}),X=p.useCallback((he,ve,me)=>{const ge=!pe.current&&!me;(L.value!==void 0&&L.value===ve||ge)&&(V(he),ge&&(pe.current=!0))},[L.value]),ne=p.useCallback(()=>I==null?void 0:I.focus(),[I]),le=p.useCallback((he,ve,me)=>{const ge=!pe.current&&!me;(L.value!==void 0&&L.value===ve||ge)&&q(he)},[L.value]),ie=o==="popper"?dP:zK,ye=ie===dP?{side:h,sideOffset:f,align:y,alignOffset:k,arrowPadding:m,collisionBoundary:x,collisionPadding:S,sticky:b,hideWhenDetached:w,avoidCollisions:_}:{};return M.jsx(OK,{scope:a,content:I,viewport:D,onViewportChange:P,itemRefCallback:X,selectedItem:j,onItemLeave:ne,itemTextRefCallback:le,focusSelectedItem:$,selectedItemText:K,position:o,isPositioned:F,searchRef:W,children:M.jsx(z2,{as:GOe,allowPinchZoom:!0,children:M.jsx(D2,{asChild:!0,trapped:L.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:xe(i,he=>{var ve;(ve=L.trigger)==null||ve.focus({preventScroll:!0}),he.preventDefault()}),children:M.jsx(nu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>L.onOpenChange(!1),children:M.jsx(ie,{role:"listbox",id:L.contentId,"data-state":L.open?"open":"closed",dir:L.dir,onContextMenu:he=>he.preventDefault(),...N,...ye,onPlaced:()=>J(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:xe(N.onKeyDown,he=>{const ve=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!ve&&he.key.length===1&&Me(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let ge=B().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);if(["ArrowUp","End"].includes(he.key)&&(ge=ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const fe=he.target,ce=ge.indexOf(fe);ge=ge.slice(ce+1)}setTimeout(()=>R(ge)),he.preventDefault()}})})})})})})});DK.displayName=UOe;var WOe="SelectItemAlignedPosition",zK=p.forwardRef((e,t)=>{const{__scopeSelect:a,onPlaced:o,...i}=e,s=ji(U1,a),l=Pi(U1,a),[h,f]=p.useState(null),[y,k]=p.useState(null),m=ze(t,A=>k(A)),x=UA(a),S=p.useRef(!1),b=p.useRef(!0),{viewport:w,selectedItem:_,selectedItemText:N,focusSelectedItem:L}=l,I=p.useCallback(()=>{if(s.trigger&&s.valueNode&&h&&y&&w&&_&&N){const A=s.trigger.getBoundingClientRect(),j=y.getBoundingClientRect(),V=s.valueNode.getBoundingClientRect(),K=N.getBoundingClientRect();if(s.dir!=="rtl"){const fe=K.left-j.left,ce=V.left-fe,Ee=A.left-ce,$e=A.width+Ee,st=Math.max($e,j.width),Ve=window.innerWidth-ka,tt=lA(ce,[ka,Math.max(ka,Ve-st)]);h.style.minWidth=$e+"px",h.style.left=tt+"px"}else{const fe=j.right-K.right,ce=window.innerWidth-V.right-fe,Ee=window.innerWidth-A.right-ce,$e=A.width+Ee,st=Math.max($e,j.width),Ve=window.innerWidth-ka,tt=lA(ce,[ka,Math.max(ka,Ve-st)]);h.style.minWidth=$e+"px",h.style.right=tt+"px"}const q=x(),B=window.innerHeight-ka*2,F=w.scrollHeight,J=window.getComputedStyle(y),pe=parseInt(J.borderTopWidth,10),R=parseInt(J.paddingTop,10),$=parseInt(J.borderBottomWidth,10),T=parseInt(J.paddingBottom,10),G=pe+R+F+T+$,W=Math.min(_.offsetHeight*5,G),Me=window.getComputedStyle(w),X=parseInt(Me.paddingTop,10),ne=parseInt(Me.paddingBottom,10),le=A.top+A.height/2-ka,ie=B-le,ye=_.offsetHeight/2,he=_.offsetTop+ye,ve=pe+R+he,me=G-ve;if(ve<=le){const fe=q.length>0&&_===q[q.length-1].ref.current;h.style.bottom="0px";const ce=y.clientHeight-w.offsetTop-w.offsetHeight,Ee=Math.max(ie,ye+(fe?ne:0)+ce+$),$e=ve+Ee;h.style.height=$e+"px"}else{const fe=q.length>0&&_===q[0].ref.current;h.style.top="0px";const Ee=Math.max(le,pe+w.offsetTop+(fe?X:0)+ye)+me;h.style.height=Ee+"px",w.scrollTop=ve-le+w.offsetTop}h.style.margin=`${ka}px 0`,h.style.minHeight=W+"px",h.style.maxHeight=B+"px",o==null||o(),requestAnimationFrame(()=>S.current=!0)}},[x,s.trigger,s.valueNode,h,y,w,_,N,s.dir,o]);St(()=>I(),[I]);const[O,D]=p.useState();St(()=>{y&&D(window.getComputedStyle(y).zIndex)},[y]);const P=p.useCallback(A=>{A&&b.current===!0&&(I(),L==null||L(),b.current=!1)},[I,L]);return M.jsx(XOe,{scope:a,contentWrapper:h,shouldExpandOnScrollRef:S,onScrollButtonChange:P,children:M.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:M.jsx(On.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});zK.displayName=WOe;var ZOe="SelectPopperPosition",dP=p.forwardRef((e,t)=>{const{__scopeSelect:a,align:o="start",collisionPadding:i=ka,...s}=e,l=GA(a);return M.jsx(DA,{...l,...s,ref:t,align:o,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});dP.displayName=ZOe;var[XOe,XO]=cu(U1,{}),uP="SelectViewport",qK=p.forwardRef((e,t)=>{const{__scopeSelect:a,nonce:o,...i}=e,s=Pi(uP,a),l=XO(uP,a),h=ze(t,s.onViewportChange),f=p.useRef(0);return M.jsxs(M.Fragment,{children:[M.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),M.jsx(FA.Slot,{scope:a,children:M.jsx(On.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:xe(i.onScroll,y=>{const k=y.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:x}=l;if(x!=null&&x.current&&m){const S=Math.abs(f.current-k.scrollTop);if(S>0){const b=window.innerHeight-ka*2,w=parseFloat(m.style.minHeight),_=parseFloat(m.style.height),N=Math.max(w,_);if(N<b){const L=N+S,I=Math.min(b,L),O=L-I;m.style.height=I+"px",m.style.bottom==="0px"&&(k.scrollTop=O>0?O:0,m.style.justifyContent="flex-end")}}}f.current=k.scrollTop})})})]})});qK.displayName=uP;var HK="SelectGroup",[KOe,YOe]=cu(HK),VK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e,i=It();return M.jsx(KOe,{scope:a,id:i,children:M.jsx(On.div,{role:"group","aria-labelledby":i,...o,ref:t})})});VK.displayName=HK;var BK="SelectLabel",FK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e,i=YOe(BK,a);return M.jsx(On.div,{id:i.id,...o,ref:t})});FK.displayName=BK;var dA="SelectItem",[QOe,UK]=cu(dA),GK=p.forwardRef((e,t)=>{const{__scopeSelect:a,value:o,disabled:i=!1,textValue:s,...l}=e,h=ji(dA,a),f=Pi(dA,a),y=h.value===o,[k,m]=p.useState(s??""),[x,S]=p.useState(!1),b=ze(t,L=>{var I;return(I=f.itemRefCallback)==null?void 0:I.call(f,L,o,i)}),w=It(),_=p.useRef("touch"),N=()=>{i||(h.onValueChange(o),h.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return M.jsx(QOe,{scope:a,value:o,disabled:i,textId:w,isSelected:y,onItemTextChange:p.useCallback(L=>{m(I=>I||((L==null?void 0:L.textContent)??"").trim())},[]),children:M.jsx(FA.ItemSlot,{scope:a,value:o,disabled:i,textValue:k,children:M.jsx(On.div,{role:"option","aria-labelledby":w,"data-highlighted":x?"":void 0,"aria-selected":y&&x,"data-state":y?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:b,onFocus:xe(l.onFocus,()=>S(!0)),onBlur:xe(l.onBlur,()=>S(!1)),onClick:xe(l.onClick,()=>{_.current!=="mouse"&&N()}),onPointerUp:xe(l.onPointerUp,()=>{_.current==="mouse"&&N()}),onPointerDown:xe(l.onPointerDown,L=>{_.current=L.pointerType}),onPointerMove:xe(l.onPointerMove,L=>{var I;_.current=L.pointerType,i?(I=f.onItemLeave)==null||I.call(f):_.current==="mouse"&&L.currentTarget.focus({preventScroll:!0})}),onPointerLeave:xe(l.onPointerLeave,L=>{var I;L.currentTarget===document.activeElement&&((I=f.onItemLeave)==null||I.call(f))}),onKeyDown:xe(l.onKeyDown,L=>{var O;((O=f.searchRef)==null?void 0:O.current)!==""&&L.key===" "||(DOe.includes(L.key)&&N(),L.key===" "&&L.preventDefault())})})})})});GK.displayName=dA;var h2="SelectItemText",WK=p.forwardRef((e,t)=>{const{__scopeSelect:a,className:o,style:i,...s}=e,l=ji(h2,a),h=Pi(h2,a),f=UK(h2,a),y=VOe(h2,a),[k,m]=p.useState(null),x=ze(t,N=>m(N),f.onItemTextChange,N=>{var L;return(L=h.itemTextRefCallback)==null?void 0:L.call(h,N,f.value,f.disabled)}),S=k==null?void 0:k.textContent,b=p.useMemo(()=>M.jsx("option",{value:f.value,disabled:f.disabled,children:S},f.value),[f.disabled,f.value,S]),{onNativeOptionAdd:w,onNativeOptionRemove:_}=y;return St(()=>(w(b),()=>_(b)),[w,_,b]),M.jsxs(M.Fragment,{children:[M.jsx(On.span,{id:f.textId,...s,ref:x}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Kd.createPortal(s.children,l.valueNode):null]})});WK.displayName=h2;var ZK="SelectItemIndicator",XK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e;return UK(ZK,a).isSelected?M.jsx(On.span,{"aria-hidden":!0,...o,ref:t}):null});XK.displayName=ZK;var hP="SelectScrollUpButton",KK=p.forwardRef((e,t)=>{const a=Pi(hP,e.__scopeSelect),o=XO(hP,e.__scopeSelect),[i,s]=p.useState(!1),l=ze(t,o.onScrollButtonChange);return St(()=>{if(a.viewport&&a.isPositioned){let h=function(){const y=f.scrollTop>0;s(y)};const f=a.viewport;return h(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[a.viewport,a.isPositioned]),i?M.jsx(QK,{...e,ref:l,onAutoScroll:()=>{const{viewport:h,selectedItem:f}=a;h&&f&&(h.scrollTop=h.scrollTop-f.offsetHeight)}}):null});KK.displayName=hP;var pP="SelectScrollDownButton",YK=p.forwardRef((e,t)=>{const a=Pi(pP,e.__scopeSelect),o=XO(pP,e.__scopeSelect),[i,s]=p.useState(!1),l=ze(t,o.onScrollButtonChange);return St(()=>{if(a.viewport&&a.isPositioned){let h=function(){const y=f.scrollHeight-f.clientHeight,k=Math.ceil(f.scrollTop)<y;s(k)};const f=a.viewport;return h(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[a.viewport,a.isPositioned]),i?M.jsx(QK,{...e,ref:l,onAutoScroll:()=>{const{viewport:h,selectedItem:f}=a;h&&f&&(h.scrollTop=h.scrollTop+f.offsetHeight)}}):null});YK.displayName=pP;var QK=p.forwardRef((e,t)=>{const{__scopeSelect:a,onAutoScroll:o,...i}=e,s=Pi("SelectScrollButton",a),l=p.useRef(null),h=UA(a),f=p.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return p.useEffect(()=>()=>f(),[f]),St(()=>{var k;const y=h().find(m=>m.ref.current===document.activeElement);(k=y==null?void 0:y.ref.current)==null||k.scrollIntoView({block:"nearest"})},[h]),M.jsx(On.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:xe(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(o,50))}),onPointerMove:xe(i.onPointerMove,()=>{var y;(y=s.onItemLeave)==null||y.call(s),l.current===null&&(l.current=window.setInterval(o,50))}),onPointerLeave:xe(i.onPointerLeave,()=>{f()})})}),JOe="SelectSeparator",JK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e;return M.jsx(On.div,{"aria-hidden":!0,...o,ref:t})});JK.displayName=JOe;var fP="SelectArrow",eDe=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e,i=GA(a),s=ji(fP,a),l=Pi(fP,a);return s.open&&l.position==="popper"?M.jsx(zA,{...i,...o,ref:t}):null});eDe.displayName=fP;var tDe="SelectBubbleInput",eY=p.forwardRef(({__scopeSelect:e,value:t,...a},o)=>{const i=p.useRef(null),s=ze(o,i),l=_A(t);return p.useEffect(()=>{const h=i.current;if(!h)return;const f=window.HTMLSelectElement.prototype,k=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==t&&k){const m=new Event("change",{bubbles:!0});k.call(h,t),h.dispatchEvent(m)}},[l,t]),M.jsx(On.select,{...a,style:{...NK,...a.style},ref:s,defaultValue:t})});eY.displayName=tDe;function tY(e){return e===""||e===void 0}function nY(e){const t=Zn(e),a=p.useRef(""),o=p.useRef(0),i=p.useCallback(l=>{const h=a.current+l;t(h),(function f(y){a.current=y,window.clearTimeout(o.current),y!==""&&(o.current=window.setTimeout(()=>f(""),1e3))})(h)},[t]),s=p.useCallback(()=>{a.current="",window.clearTimeout(o.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(o.current),[]),[a,i,s]}function aY(e,t,a){const i=t.length>1&&Array.from(t).every(y=>y===t[0])?t[0]:t,s=a?e.indexOf(a):-1;let l=nDe(e,Math.max(s,0));i.length===1&&(l=l.filter(y=>y!==a));const f=l.find(y=>y.textValue.toLowerCase().startsWith(i.toLowerCase()));return f!==a?f:void 0}function nDe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var aDe=EK,oDe=AK,rDe=RK,iDe=$K,cDe=jK,sDe=PK,lDe=qK,dDe=VK,uDe=FK,hDe=GK,pDe=WK,fDe=XK,yDe=KK,mDe=YK,vDe=JK;function kDe({...e}){return M.jsx(aDe,{"data-slot":"select",...e})}function gDe({...e}){return M.jsx(dDe,{"data-slot":"select-group",...e})}function MDe({...e}){return M.jsx(rDe,{"data-slot":"select-value",...e})}function xDe({className:e,size:t="default",children:a,...o}){return M.jsxs(oDe,{"data-slot":"select-trigger","data-size":t,className:ee("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[a,M.jsx(iDe,{asChild:!0,children:M.jsx(xi,{className:"size-4 opacity-50"})})]})}function bDe({className:e,children:t,position:a="popper",...o}){return M.jsx(cDe,{children:M.jsxs(sDe,{"data-slot":"select-content",className:ee("bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...o,children:[M.jsx(oY,{}),M.jsx(lDe,{className:ee("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),M.jsx(rY,{})]})})}function wDe({className:e,...t}){return M.jsx(uDe,{"data-slot":"select-label",className:ee("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function _De({className:e,children:t,...a}){return M.jsxs(hDe,{"data-slot":"select-item",className:ee("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...a,children:[M.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:M.jsx(fDe,{children:M.jsx(sr,{className:"size-4"})})}),M.jsx(pDe,{children:t})]})}function SDe({className:e,...t}){return M.jsx(vDe,{"data-slot":"select-separator",className:ee("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function oY({className:e,...t}){return M.jsx(yDe,{"data-slot":"select-scroll-up-button",className:ee("flex cursor-default items-center justify-center py-1",e),...t,children:M.jsx(m2,{className:"size-4"})})}function rY({className:e,...t}){return M.jsx(mDe,{"data-slot":"select-scroll-down-button",className:ee("flex cursor-default items-center justify-center py-1",e),...t,children:M.jsx(xi,{className:"size-4"})})}var CDe="Separator",xF="horizontal",NDe=["horizontal","vertical"],iY=p.forwardRef((e,t)=>{const{decorative:a,orientation:o=xF,...i}=e,s=LDe(o)?o:xF,h=a?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return M.jsx(jn.div,{"data-orientation":s,...h,...i,ref:t})});iY.displayName=CDe;function LDe(e){return NDe.includes(e)}var EDe=iY;function KO({className:e,orientation:t="horizontal",decorative:a=!0,...o}){return M.jsx(EDe,{"data-slot":"separator-root",decorative:a,orientation:t,className:ee("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...o})}function cY({...e}){return M.jsx(rO,{"data-slot":"sheet",...e})}function IDe({...e}){return M.jsx(_W,{"data-slot":"sheet-trigger",...e})}function ADe({...e}){return M.jsx(TA,{"data-slot":"sheet-close",...e})}function TDe({...e}){return M.jsx(iO,{"data-slot":"sheet-portal",...e})}function RDe({className:e,...t}){return M.jsx(cO,{"data-slot":"sheet-overlay",className:ee("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1002] bg-black/50",e),...t})}function sY({className:e,children:t,side:a="right",...o}){return M.jsxs(TDe,{children:[M.jsx(RDe,{}),M.jsxs(sO,{"data-slot":"sheet-content",className:ee("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",a==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",a==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",a==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",a==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...o,children:[t,M.jsxs(TA,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[M.jsx(bi,{className:"size-4"}),M.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function lY({className:e,...t}){return M.jsx("div",{"data-slot":"sheet-header",className:ee("flex flex-col gap-1.5 p-4",e),...t})}function $De({className:e,...t}){return M.jsx("div",{"data-slot":"sheet-footer",className:ee("mt-auto flex flex-col gap-2 p-4",e),...t})}function dY({className:e,...t}){return M.jsx(SW,{"data-slot":"sheet-title",className:ee("text-foreground font-semibold",e),...t})}function uY({className:e,...t}){return M.jsx(CW,{"data-slot":"sheet-description",className:ee("text-muted-foreground text-sm",e),...t})}const $j=768;function jDe(){const[e,t]=p.useState(void 0);return p.useEffect(()=>{const a=window.matchMedia(`(max-width: ${$j-1}px)`),o=()=>{t(window.innerWidth<$j)};return a.addEventListener("change",o),t(window.innerWidth<$j),()=>a.removeEventListener("change",o)},[]),!!e}function yP({className:e,...t}){return M.jsx("div",{"data-slot":"skeleton",className:ee("bg-accent animate-pulse rounded-md",e),...t})}function PDe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,ODe(i,...t)]}function ODe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function DDe(e){const t=zDe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(HDe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function zDe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=BDe(i),h=VDe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hY=Symbol("radix.slottable");function qDe(e){const t=({children:a})=>M.jsx(M.Fragment,{children:a});return t.displayName=`${e}.Slottable`,t.__radixId=hY,t}function HDe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hY}function VDe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function BDe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var FDe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pY=FDe.reduce((e,t)=>{const a=DDe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),UDe="Portal",fY=p.forwardRef((e,t)=>{var h;const{container:a,...o}=e,[i,s]=p.useState(!1);St(()=>s(!0),[]);const l=a||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return l?ur.createPortal(M.jsx(pY.div,{...o,ref:t}),l):null});fY.displayName=UDe;var[WA]=PDe("Tooltip",[Ti]),ZA=Ti(),yY="TooltipProvider",GDe=700,mP="tooltip.open",[WDe,YO]=WA(yY),mY=e=>{const{__scopeTooltip:t,delayDuration:a=GDe,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:s}=e,l=p.useRef(!0),h=p.useRef(!1),f=p.useRef(0);return p.useEffect(()=>{const y=f.current;return()=>window.clearTimeout(y)},[]),M.jsx(WDe,{scope:t,isOpenDelayedRef:l,delayDuration:a,onOpen:p.useCallback(()=>{window.clearTimeout(f.current),l.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>l.current=!0,o)},[o]),isPointerInTransitRef:h,onPointerInTransitChange:p.useCallback(y=>{h.current=y},[]),disableHoverableContent:i,children:s})};mY.displayName=yY;var L2="Tooltip",[ZDe,J2]=WA(L2),vY=e=>{const{__scopeTooltip:t,children:a,open:o,defaultOpen:i,onOpenChange:s,disableHoverableContent:l,delayDuration:h}=e,f=YO(L2,e.__scopeTooltip),y=ZA(t),[k,m]=p.useState(null),x=It(),S=p.useRef(0),b=l??f.disableHoverableContent,w=h??f.delayDuration,_=p.useRef(!1),[N,L]=bn({prop:o,defaultProp:i??!1,onChange:A=>{A?(f.onOpen(),document.dispatchEvent(new CustomEvent(mP))):f.onClose(),s==null||s(A)},caller:L2}),I=p.useMemo(()=>N?_.current?"delayed-open":"instant-open":"closed",[N]),O=p.useCallback(()=>{window.clearTimeout(S.current),S.current=0,_.current=!1,L(!0)},[L]),D=p.useCallback(()=>{window.clearTimeout(S.current),S.current=0,L(!1)},[L]),P=p.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{_.current=!0,L(!0),S.current=0},w)},[w,L]);return p.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),M.jsx(F2,{...y,children:M.jsx(ZDe,{scope:t,contentId:x,open:N,stateAttribute:I,trigger:k,onTriggerChange:m,onTriggerEnter:p.useCallback(()=>{f.isOpenDelayedRef.current?P():O()},[f.isOpenDelayedRef,P,O]),onTriggerLeave:p.useCallback(()=>{b?D():(window.clearTimeout(S.current),S.current=0)},[D,b]),onOpen:O,onClose:D,disableHoverableContent:b,children:a})})};vY.displayName=L2;var vP="TooltipTrigger",kY=p.forwardRef((e,t)=>{const{__scopeTooltip:a,...o}=e,i=J2(vP,a),s=YO(vP,a),l=ZA(a),h=p.useRef(null),f=ze(t,h,i.onTriggerChange),y=p.useRef(!1),k=p.useRef(!1),m=p.useCallback(()=>y.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),M.jsx(U2,{asChild:!0,...l,children:M.jsx(pY.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:f,onPointerMove:xe(e.onPointerMove,x=>{x.pointerType!=="touch"&&!k.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),k.current=!0)}),onPointerLeave:xe(e.onPointerLeave,()=>{i.onTriggerLeave(),k.current=!1}),onPointerDown:xe(e.onPointerDown,()=>{i.open&&i.onClose(),y.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:xe(e.onFocus,()=>{y.current||i.onOpen()}),onBlur:xe(e.onBlur,i.onClose),onClick:xe(e.onClick,i.onClose)})})});kY.displayName=vP;var QO="TooltipPortal",[XDe,KDe]=WA(QO,{forceMount:void 0}),gY=e=>{const{__scopeTooltip:t,forceMount:a,children:o,container:i}=e,s=J2(QO,t);return M.jsx(XDe,{scope:t,forceMount:a,children:M.jsx(Pn,{present:a||s.open,children:M.jsx(fY,{asChild:!0,container:i,children:o})})})};gY.displayName=QO;var Xd="TooltipContent",MY=p.forwardRef((e,t)=>{const a=KDe(Xd,e.__scopeTooltip),{forceMount:o=a.forceMount,side:i="top",...s}=e,l=J2(Xd,e.__scopeTooltip);return M.jsx(Pn,{present:o||l.open,children:l.disableHoverableContent?M.jsx(xY,{side:i,...s,ref:t}):M.jsx(YDe,{side:i,...s,ref:t})})}),YDe=p.forwardRef((e,t)=>{const a=J2(Xd,e.__scopeTooltip),o=YO(Xd,e.__scopeTooltip),i=p.useRef(null),s=ze(t,i),[l,h]=p.useState(null),{trigger:f,onClose:y}=a,k=i.current,{onPointerInTransitChange:m}=o,x=p.useCallback(()=>{h(null),m(!1)},[m]),S=p.useCallback((b,w)=>{const _=b.currentTarget,N={x:b.clientX,y:b.clientY},L=tze(N,_.getBoundingClientRect()),I=nze(N,L),O=aze(w.getBoundingClientRect()),D=rze([...I,...O]);h(D),m(!0)},[m]);return p.useEffect(()=>()=>x(),[x]),p.useEffect(()=>{if(f&&k){const b=_=>S(_,k),w=_=>S(_,f);return f.addEventListener("pointerleave",b),k.addEventListener("pointerleave",w),()=>{f.removeEventListener("pointerleave",b),k.removeEventListener("pointerleave",w)}}},[f,k,S,x]),p.useEffect(()=>{if(l){const b=w=>{const _=w.target,N={x:w.clientX,y:w.clientY},L=(f==null?void 0:f.contains(_))||(k==null?void 0:k.contains(_)),I=!oze(N,l);L?x():I&&(x(),y())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[f,k,l,y,x]),M.jsx(xY,{...e,ref:s})}),[QDe,JDe]=WA(L2,{isInside:!1}),eze=qDe("TooltipContent"),xY=p.forwardRef((e,t)=>{const{__scopeTooltip:a,children:o,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:l,...h}=e,f=J2(Xd,a),y=ZA(a),{onClose:k}=f;return p.useEffect(()=>(document.addEventListener(mP,k),()=>document.removeEventListener(mP,k)),[k]),p.useEffect(()=>{if(f.trigger){const m=x=>{const S=x.target;S!=null&&S.contains(f.trigger)&&k()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[f.trigger,k]),M.jsx(nu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:k,children:M.jsxs(DA,{"data-state":f.stateAttribute,...y,...h,ref:t,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[M.jsx(eze,{children:o}),M.jsx(QDe,{scope:a,isInside:!0,children:M.jsx(POe,{id:f.contentId,role:"tooltip",children:i||o})})]})})});MY.displayName=Xd;var bY="TooltipArrow",wY=p.forwardRef((e,t)=>{const{__scopeTooltip:a,...o}=e,i=ZA(a);return JDe(bY,a).isInside?null:M.jsx(zA,{...i,...o,ref:t})});wY.displayName=bY;function tze(e,t){const a=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(a,o,i,s)){case s:return"left";case i:return"right";case a:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function nze(e,t,a=5){const o=[];switch(t){case"top":o.push({x:e.x-a,y:e.y+a},{x:e.x+a,y:e.y+a});break;case"bottom":o.push({x:e.x-a,y:e.y-a},{x:e.x+a,y:e.y-a});break;case"left":o.push({x:e.x+a,y:e.y-a},{x:e.x+a,y:e.y+a});break;case"right":o.push({x:e.x-a,y:e.y-a},{x:e.x-a,y:e.y+a});break}return o}function aze(e){const{top:t,right:a,bottom:o,left:i}=e;return[{x:i,y:t},{x:a,y:t},{x:a,y:o},{x:i,y:o}]}function oze(e,t){const{x:a,y:o}=e;let i=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const h=t[s],f=t[l],y=h.x,k=h.y,m=f.x,x=f.y;k>o!=x>o&&a<(m-y)*(o-k)/(x-k)+y&&(i=!i)}return i}function rze(e){const t=e.slice();return t.sort((a,o)=>a.x<o.x?-1:a.x>o.x?1:a.y<o.y?-1:a.y>o.y?1:0),ize(t)}function ize(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(i.y-l.y)>=(s.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const a=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;a.length>=2;){const s=a[a.length-1],l=a[a.length-2];if((s.x-l.x)*(i.y-l.y)>=(s.y-l.y)*(i.x-l.x))a.pop();else break}a.push(i)}return a.pop(),t.length===1&&a.length===1&&t[0].x===a[0].x&&t[0].y===a[0].y?t:t.concat(a)}var cze=mY,sze=vY,lze=kY,dze=gY,uze=MY,hze=wY;function JO({delayDuration:e=0,...t}){return M.jsx(cze,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function _Y({...e}){return M.jsx(JO,{children:M.jsx(sze,{"data-slot":"tooltip",...e})})}function SY({...e}){return M.jsx(lze,{"data-slot":"tooltip-trigger",...e})}function CY({className:e,sideOffset:t=0,children:a,...o}){return M.jsx(dze,{children:M.jsxs(uze,{"data-slot":"tooltip-content",sideOffset:t,className:ee("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...o,children:[a,M.jsx(hze,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const pze="sidebar_state",fze=3600*24*7,yze="16rem",mze="18rem",vze="3rem",kze="b",NY=p.createContext(null);function e0(){const e=p.useContext(NY);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function gze({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:i,children:s,...l}){const h=jDe(),[f,y]=p.useState(!1),[k,m]=p.useState(e),x=t??k,S=p.useCallback(N=>{const L=typeof N=="function"?N(x):N;a?a(L):m(L),document.cookie=`${pze}=${L}; path=/; max-age=${fze}`},[a,x]),b=p.useCallback(()=>h?y(N=>!N):S(N=>!N),[h,S,y]);p.useEffect(()=>{const N=L=>{L.key===kze&&(L.metaKey||L.ctrlKey)&&(L.preventDefault(),b())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[b]);const w=x?"expanded":"collapsed",_=p.useMemo(()=>({state:w,open:x,setOpen:S,isMobile:h,openMobile:f,setOpenMobile:y,toggleSidebar:b}),[w,x,S,h,f,y,b]);return M.jsx(NY.Provider,{value:_,children:M.jsx(JO,{delayDuration:0,children:M.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":yze,"--sidebar-width-icon":vze,...i},className:ee("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...l,children:s})})})}function Mze({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:i,...s}){const{isMobile:l,state:h,openMobile:f,setOpenMobile:y}=e0();return a==="none"?M.jsx("div",{"data-slot":"sidebar",className:ee("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",o),...s,children:i}):l?M.jsx(cY,{open:f,onOpenChange:y,...s,children:M.jsxs(sY,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden z-[1002]",style:{"--sidebar-width":mze},side:e,children:[M.jsxs(lY,{className:"sr-only",children:[M.jsx(dY,{children:"Sidebar"}),M.jsx(uY,{children:"Displays the mobile sidebar."})]}),M.jsx("div",{className:"flex h-full w-full flex-col",children:i})]})}):M.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":h,"data-collapsible":h==="collapsed"?a:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[M.jsx("div",{"data-slot":"sidebar-gap",className:ee("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),M.jsx("div",{"data-slot":"sidebar-container",className:ee("fixed inset-y-0 z-10 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)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...s,children:M.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:i})})]})}function xze({className:e,onClick:t,...a}){const{toggleSidebar:o}=e0();return M.jsxs(bA,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:ee("size-7",e),onClick:i=>{t==null||t(i),o()},...a,children:[M.jsx(vi,{}),M.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function bze({className:e,...t}){const{toggleSidebar:a}=e0();return M.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:ee("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function wze({className:e,...t}){return M.jsx("main",{"data-slot":"sidebar-inset",className:ee("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function _ze({className:e,...t}){return M.jsx(DX,{"data-slot":"sidebar-input","data-sidebar":"input",className:ee("bg-background h-8 w-full shadow-none",e),...t})}function Sze({className:e,...t}){return M.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:ee("flex flex-col gap-2 p-2",e),...t})}function Cze({className:e,...t}){return M.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:ee("flex flex-col gap-2 p-2",e),...t})}function Nze({className:e,...t}){return M.jsx(KO,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:ee("bg-sidebar-border mx-2 w-auto",e),...t})}function Lze({className:e,...t}){return M.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:ee("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Eze({className:e,...t}){return M.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:ee("relative flex w-full min-w-0 flex-col p-2",e),...t})}function Ize({className:e,asChild:t=!1,...a}){const o=t?Ii:"div";return M.jsx(o,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:ee("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden 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),...a})}function Aze({className:e,asChild:t=!1,...a}){const o=t?Ii:"button";return M.jsx(o,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:ee("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...a})}function Tze({className:e,...t}){return M.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:ee("w-full text-sm",e),...t})}function Rze({className:e,...t}){return M.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:ee("flex w-full min-w-0 flex-col gap-1",e),...t})}function $ze({className:e,...t}){return M.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:ee("group/menu-item relative",e),...t})}const jze=xA("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden 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! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(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"}});function Pze({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:i,className:s,...l}){const h=e?Ii:"button",{isMobile:f,state:y}=e0(),k=M.jsx(h,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":o,"data-active":t,className:ee(jze({variant:a,size:o}),s),...l});return i?(typeof i=="string"&&(i={children:i}),M.jsxs(_Y,{children:[M.jsx(SY,{asChild:!0,children:k}),M.jsx(CY,{side:"right",align:"center",hidden:y!=="collapsed"||f,...i})]})):k}function Oze({className:e,asChild:t=!1,showOnHover:a=!1,...o}){const i=t?Ii:"button";return M.jsx(i,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:ee("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after: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",a&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",e),...o})}function Dze({className:e,...t}){return M.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:ee("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","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})}function zze({className:e,showIcon:t=!1,...a}){const o=p.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return M.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:ee("flex h-8 items-center gap-2 rounded-md px-2",e),...a,children:[t&&M.jsx(yP,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),M.jsx(yP,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}function qze({className:e,...t}){return M.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:ee("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})}function Hze({className:e,...t}){return M.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:ee("group/menu-sub-item relative",e),...t})}function Vze({asChild:e=!1,size:t="md",isActive:a=!1,className:o,...i}){const s=e?Ii:"a";return M.jsx(s,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:ee("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 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","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",o),...i})}function Bze(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,Fze(i,...t)]}function Fze(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function Uze(e){const t=Gze(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(Zze);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function Gze(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=Kze(i),h=Xze(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wze=Symbol("radix.slottable");function Zze(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wze}function Xze(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function Kze(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var Yze=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],t0=Yze.reduce((e,t)=>{const a=Uze(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),LY=["PageUp","PageDown"],EY=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],IY={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},su="Slider",[kP,Qze,Jze]=H2(su),[AY]=Bze(su,[Jze]),[eqe,XA]=AY(su),TY=p.forwardRef((e,t)=>{const{name:a,min:o=0,max:i=100,step:s=1,orientation:l="horizontal",disabled:h=!1,minStepsBetweenThumbs:f=0,defaultValue:y=[o],value:k,onValueChange:m=()=>{},onValueCommit:x=()=>{},inverted:S=!1,form:b,...w}=e,_=p.useRef(new Set),N=p.useRef(0),I=l==="horizontal"?tqe:nqe,[O=[],D]=bn({prop:k,defaultProp:y,onChange:q=>{var F;(F=[..._.current][N.current])==null||F.focus(),m(q)}}),P=p.useRef(O);function A(q){const B=cqe(O,q);K(q,B)}function j(q){K(q,N.current)}function V(){const q=P.current[N.current];O[N.current]!==q&&x(O)}function K(q,B,{commit:F}={commit:!1}){const J=uqe(s),pe=hqe(Math.round((q-o)/s)*s+o,J),R=lA(pe,[o,i]);D(($=[])=>{const T=rqe($,R,B);if(dqe(T,f*s)){N.current=T.indexOf(R);const G=String(T)!==String($);return G&&F&&x(T),G?T:$}else return $})}return M.jsx(eqe,{scope:e.__scopeSlider,name:a,disabled:h,min:o,max:i,valueIndexToChangeRef:N,thumbs:_.current,values:O,orientation:l,form:b,children:M.jsx(kP.Provider,{scope:e.__scopeSlider,children:M.jsx(kP.Slot,{scope:e.__scopeSlider,children:M.jsx(I,{"aria-disabled":h,"data-disabled":h?"":void 0,...w,ref:t,onPointerDown:xe(w.onPointerDown,()=>{h||(P.current=O)}),min:o,max:i,inverted:S,onSlideStart:h?void 0:A,onSlideMove:h?void 0:j,onSlideEnd:h?void 0:V,onHomeKeyDown:()=>!h&&K(o,0,{commit:!0}),onEndKeyDown:()=>!h&&K(i,O.length-1,{commit:!0}),onStepKeyDown:({event:q,direction:B})=>{if(!h){const pe=LY.includes(q.key)||q.shiftKey&&EY.includes(q.key)?10:1,R=N.current,$=O[R],T=s*pe*B;K($+T,R,{commit:!0})}}})})})})});TY.displayName=su;var[RY,$Y]=AY(su,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tqe=p.forwardRef((e,t)=>{const{min:a,max:o,dir:i,inverted:s,onSlideStart:l,onSlideMove:h,onSlideEnd:f,onStepKeyDown:y,...k}=e,[m,x]=p.useState(null),S=ze(t,I=>x(I)),b=p.useRef(void 0),w=V2(i),_=w==="ltr",N=_&&!s||!_&&s;function L(I){const O=b.current||m.getBoundingClientRect(),D=[0,O.width],A=eD(D,N?[a,o]:[o,a]);return b.current=O,A(I-O.left)}return M.jsx(RY,{scope:e.__scopeSlider,startEdge:N?"left":"right",endEdge:N?"right":"left",direction:N?1:-1,size:"width",children:M.jsx(jY,{dir:w,"data-orientation":"horizontal",...k,ref:S,style:{...k.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:I=>{const O=L(I.clientX);l==null||l(O)},onSlideMove:I=>{const O=L(I.clientX);h==null||h(O)},onSlideEnd:()=>{b.current=void 0,f==null||f()},onStepKeyDown:I=>{const D=IY[N?"from-left":"from-right"].includes(I.key);y==null||y({event:I,direction:D?-1:1})}})})}),nqe=p.forwardRef((e,t)=>{const{min:a,max:o,inverted:i,onSlideStart:s,onSlideMove:l,onSlideEnd:h,onStepKeyDown:f,...y}=e,k=p.useRef(null),m=ze(t,k),x=p.useRef(void 0),S=!i;function b(w){const _=x.current||k.current.getBoundingClientRect(),N=[0,_.height],I=eD(N,S?[o,a]:[a,o]);return x.current=_,I(w-_.top)}return M.jsx(RY,{scope:e.__scopeSlider,startEdge:S?"bottom":"top",endEdge:S?"top":"bottom",size:"height",direction:S?1:-1,children:M.jsx(jY,{"data-orientation":"vertical",...y,ref:m,style:{...y.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:w=>{const _=b(w.clientY);s==null||s(_)},onSlideMove:w=>{const _=b(w.clientY);l==null||l(_)},onSlideEnd:()=>{x.current=void 0,h==null||h()},onStepKeyDown:w=>{const N=IY[S?"from-bottom":"from-top"].includes(w.key);f==null||f({event:w,direction:N?-1:1})}})})}),jY=p.forwardRef((e,t)=>{const{__scopeSlider:a,onSlideStart:o,onSlideMove:i,onSlideEnd:s,onHomeKeyDown:l,onEndKeyDown:h,onStepKeyDown:f,...y}=e,k=XA(su,a);return M.jsx(t0.span,{...y,ref:t,onKeyDown:xe(e.onKeyDown,m=>{m.key==="Home"?(l(m),m.preventDefault()):m.key==="End"?(h(m),m.preventDefault()):LY.concat(EY).includes(m.key)&&(f(m),m.preventDefault())}),onPointerDown:xe(e.onPointerDown,m=>{const x=m.target;x.setPointerCapture(m.pointerId),m.preventDefault(),k.thumbs.has(x)?x.focus():o(m)}),onPointerMove:xe(e.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&i(m)}),onPointerUp:xe(e.onPointerUp,m=>{const x=m.target;x.hasPointerCapture(m.pointerId)&&(x.releasePointerCapture(m.pointerId),s(m))})})}),PY="SliderTrack",OY=p.forwardRef((e,t)=>{const{__scopeSlider:a,...o}=e,i=XA(PY,a);return M.jsx(t0.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...o,ref:t})});OY.displayName=PY;var gP="SliderRange",DY=p.forwardRef((e,t)=>{const{__scopeSlider:a,...o}=e,i=XA(gP,a),s=$Y(gP,a),l=p.useRef(null),h=ze(t,l),f=i.values.length,y=i.values.map(x=>HY(x,i.min,i.max)),k=f>1?Math.min(...y):0,m=100-Math.max(...y);return M.jsx(t0.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...o,ref:h,style:{...e.style,[s.startEdge]:k+"%",[s.endEdge]:m+"%"}})});DY.displayName=gP;var MP="SliderThumb",zY=p.forwardRef((e,t)=>{const a=Qze(e.__scopeSlider),[o,i]=p.useState(null),s=ze(t,h=>i(h)),l=p.useMemo(()=>o?a().findIndex(h=>h.ref.current===o):-1,[a,o]);return M.jsx(aqe,{...e,ref:s,index:l})}),aqe=p.forwardRef((e,t)=>{const{__scopeSlider:a,index:o,name:i,...s}=e,l=XA(MP,a),h=$Y(MP,a),[f,y]=p.useState(null),k=ze(t,L=>y(L)),m=f?l.form||!!f.closest("form"):!0,x=SA(f),S=l.values[o],b=S===void 0?0:HY(S,l.min,l.max),w=iqe(o,l.values.length),_=x==null?void 0:x[h.size],N=_?sqe(_,b,h.direction):0;return p.useEffect(()=>{if(f)return l.thumbs.add(f),()=>{l.thumbs.delete(f)}},[f,l.thumbs]),M.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[h.startEdge]:`calc(${b}% + ${N}px)`},children:[M.jsx(kP.ItemSlot,{scope:e.__scopeSlider,children:M.jsx(t0.span,{role:"slider","aria-label":e["aria-label"]||w,"aria-valuemin":l.min,"aria-valuenow":S,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...s,ref:k,style:S===void 0?{display:"none"}:e.style,onFocus:xe(e.onFocus,()=>{l.valueIndexToChangeRef.current=o})})}),m&&M.jsx(qY,{name:i??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:S},o)]})});zY.displayName=MP;var oqe="RadioBubbleInput",qY=p.forwardRef(({__scopeSlider:e,value:t,...a},o)=>{const i=p.useRef(null),s=ze(i,o),l=_A(t);return p.useEffect(()=>{const h=i.current;if(!h)return;const f=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==t&&k){const m=new Event("input",{bubbles:!0});k.call(h,t),h.dispatchEvent(m)}},[l,t]),M.jsx(t0.input,{style:{display:"none"},...a,ref:s,defaultValue:t})});qY.displayName=oqe;function rqe(e=[],t,a){const o=[...e];return o[a]=t,o.sort((i,s)=>i-s)}function HY(e,t,a){const s=100/(a-t)*(e-t);return lA(s,[0,100])}function iqe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function cqe(e,t){if(e.length===1)return 0;const a=e.map(i=>Math.abs(i-t)),o=Math.min(...a);return a.indexOf(o)}function sqe(e,t,a){const o=e/2,s=eD([0,50],[0,o]);return(o-s(t)*a)*a}function lqe(e){return e.slice(0,-1).map((t,a)=>e[a+1]-t)}function dqe(e,t){if(t>0){const a=lqe(e);return Math.min(...a)>=t}return!0}function eD(e,t){return a=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(a-e[0])}}function uqe(e){return(String(e).split(".")[1]||"").length}function hqe(e,t){const a=Math.pow(10,t);return Math.round(e*a)/a}var pqe=TY,fqe=OY,yqe=DY,mqe=zY;function vqe({className:e,defaultValue:t,value:a,min:o=0,max:i=100,id:s,...l}){const h=p.useMemo(()=>Array.isArray(a)?a:Array.isArray(t)?t:[o,i],[a,t,o,i]);return M.jsxs(pqe,{"data-slot":"slider",defaultValue:t,value:a,min:o,max:i,id:s,className:ee("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...l,children:[M.jsx(fqe,{"data-slot":"slider-track",className:ee("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:M.jsx(yqe,{"data-slot":"slider-range",className:ee("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:h.length},(f,y)=>M.jsx(mqe,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},y))]})}var kqe=(e,t,a,o,i,s,l,h)=>{let f=document.documentElement,y=["light","dark"];function k(S){(Array.isArray(e)?e:[e]).forEach(b=>{let w=b==="class",_=w&&s?i.map(N=>s[N]||N):i;w?(f.classList.remove(..._),f.classList.add(s&&s[S]?s[S]:S)):f.setAttribute(b,S)}),m(S)}function m(S){h&&y.includes(S)&&(f.style.colorScheme=S)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)k(o);else try{let S=localStorage.getItem(t)||a,b=l&&S==="system"?x():S;k(b)}catch{}},gqe=p.createContext(void 0),Mqe={setTheme:e=>{},themes:[]},xqe=()=>{var e;return(e=p.useContext(gqe))!=null?e:Mqe};p.memo(({forcedTheme:e,storageKey:t,attribute:a,enableSystem:o,enableColorScheme:i,defaultTheme:s,value:l,themes:h,nonce:f,scriptProps:y})=>{let k=JSON.stringify([a,t,s,e,h,l,o,i]).slice(1,-1);return p.createElement("script",{...y,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${kqe.toString()})(${k})`}})});function bqe(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",t.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}const wqe=e=>{switch(e){case"success":return Cqe;case"info":return Lqe;case"warning":return Nqe;case"error":return Eqe;default:return null}},_qe=Array(12).fill(0),Sqe=({visible:e,className:t})=>ke.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ke.createElement("div",{className:"sonner-spinner"},_qe.map((a,o)=>ke.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),Cqe=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Nqe=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Lqe=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Eqe=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Iqe=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ke.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ke.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Aqe=()=>{const[e,t]=ke.useState(document.hidden);return ke.useEffect(()=>{const a=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",a),()=>window.removeEventListener("visibilitychange",a)},[]),e};let xP=1;class Tqe{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const a=this.subscribers.indexOf(t);this.subscribers.splice(a,1)}),this.publish=t=>{this.subscribers.forEach(a=>a(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var a;const{message:o,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((a=t.id)==null?void 0:a.length)>0?t.id:xP++,l=this.toasts.find(f=>f.id===s),h=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(f=>f.id===s?(this.publish({...f,...t,id:s,title:o}),{...f,...t,id:s,dismissible:h,title:o}):f):this.addToast({title:o,...i,dismissible:h,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(a=>a({id:t,dismiss:!0})))):this.toasts.forEach(a=>{this.subscribers.forEach(o=>o({id:a.id,dismiss:!0}))}),t),this.message=(t,a)=>this.create({...a,message:t}),this.error=(t,a)=>this.create({...a,message:t,type:"error"}),this.success=(t,a)=>this.create({...a,type:"success",message:t}),this.info=(t,a)=>this.create({...a,type:"info",message:t}),this.warning=(t,a)=>this.create({...a,type:"warning",message:t}),this.loading=(t,a)=>this.create({...a,type:"loading",message:t}),this.promise=(t,a)=>{if(!a)return;let o;a.loading!==void 0&&(o=this.create({...a,promise:t,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=o!==void 0,l;const h=i.then(async y=>{if(l=["resolve",y],ke.isValidElement(y))s=!1,this.create({id:o,type:"default",message:y});else if($qe(y)&&!y.ok){s=!1;const m=typeof a.error=="function"?await a.error(`HTTP error! status: ${y.status}`):a.error,x=typeof a.description=="function"?await a.description(`HTTP error! status: ${y.status}`):a.description,b=typeof m=="object"&&!ke.isValidElement(m)?m:{message:m};this.create({id:o,type:"error",description:x,...b})}else if(y instanceof Error){s=!1;const m=typeof a.error=="function"?await a.error(y):a.error,x=typeof a.description=="function"?await a.description(y):a.description,b=typeof m=="object"&&!ke.isValidElement(m)?m:{message:m};this.create({id:o,type:"error",description:x,...b})}else if(a.success!==void 0){s=!1;const m=typeof a.success=="function"?await a.success(y):a.success,x=typeof a.description=="function"?await a.description(y):a.description,b=typeof m=="object"&&!ke.isValidElement(m)?m:{message:m};this.create({id:o,type:"success",description:x,...b})}}).catch(async y=>{if(l=["reject",y],a.error!==void 0){s=!1;const k=typeof a.error=="function"?await a.error(y):a.error,m=typeof a.description=="function"?await a.description(y):a.description,S=typeof k=="object"&&!ke.isValidElement(k)?k:{message:k};this.create({id:o,type:"error",description:m,...S})}}).finally(()=>{s&&(this.dismiss(o),o=void 0),a.finally==null||a.finally.call(a)}),f=()=>new Promise((y,k)=>h.then(()=>l[0]==="reject"?k(l[1]):y(l[1])).catch(k));return typeof o!="string"&&typeof o!="number"?{unwrap:f}:Object.assign(o,{unwrap:f})},this.custom=(t,a)=>{const o=(a==null?void 0:a.id)||xP++;return this.create({jsx:t(o),id:o,...a}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const kn=new Tqe,Rqe=(e,t)=>{const a=(t==null?void 0:t.id)||xP++;return kn.addToast({title:e,...t,id:a}),a},$qe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",jqe=Rqe,Pqe=()=>kn.toasts,Oqe=()=>kn.getActiveToasts(),Dqe=Object.assign(jqe,{success:kn.success,info:kn.info,warning:kn.warning,error:kn.error,custom:kn.custom,message:kn.message,promise:kn.promise,dismiss:kn.dismiss,loading:kn.loading},{getHistory:Pqe,getToasts:Oqe});bqe("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Nh(e){return e.label!==void 0}const zqe=3,qqe="24px",Hqe="16px",bF=4e3,Vqe=356,Bqe=14,Fqe=45,Uqe=200;function er(...e){return e.filter(Boolean).join(" ")}function Gqe(e){const[t,a]=e.split("-"),o=[];return t&&o.push(t),a&&o.push(a),o}const Wqe=e=>{var t,a,o,i,s,l,h,f,y;const{invert:k,toast:m,unstyled:x,interacting:S,setHeights:b,visibleToasts:w,heights:_,index:N,toasts:L,expanded:I,removeToast:O,defaultRichColors:D,closeButton:P,style:A,cancelButtonStyle:j,actionButtonStyle:V,className:K="",descriptionClassName:q="",duration:B,position:F,gap:J,expandByDefault:pe,classNames:R,icons:$,closeButtonAriaLabel:T="Close toast"}=e,[G,W]=ke.useState(null),[Me,X]=ke.useState(null),[ne,le]=ke.useState(!1),[ie,ye]=ke.useState(!1),[he,ve]=ke.useState(!1),[me,ge]=ke.useState(!1),[fe,ce]=ke.useState(!1),[Ee,$e]=ke.useState(0),[st,Ve]=ke.useState(0),tt=ke.useRef(m.duration||B||bF),ot=ke.useRef(null),Ye=ke.useRef(null),Ut=N===0,At=N+1<=w,Mt=m.type,Lt=m.dismissible!==!1,qe=m.className||"",we=m.descriptionClassName||"",De=ke.useMemo(()=>_.findIndex(Ie=>Ie.toastId===m.id)||0,[_,m.id]),Ne=ke.useMemo(()=>{var Ie;return(Ie=m.closeButton)!=null?Ie:P},[m.closeButton,P]),Te=ke.useMemo(()=>m.duration||B||bF,[m.duration,B]),Je=ke.useRef(0),jt=ke.useRef(0),lt=ke.useRef(0),tn=ke.useRef(null),[Yn,Gt]=F.split("-"),ln=ke.useMemo(()=>_.reduce((Ie,nt,Tt)=>Tt>=De?Ie:Ie+nt.height,0),[_,De]),Z=Aqe(),ae=m.invert||k,Ue=Mt==="loading";jt.current=ke.useMemo(()=>De*J+ln,[De,ln]),ke.useEffect(()=>{tt.current=Te},[Te]),ke.useEffect(()=>{le(!0)},[]),ke.useEffect(()=>{const Ie=Ye.current;if(Ie){const nt=Ie.getBoundingClientRect().height;return Ve(nt),b(Tt=>[{toastId:m.id,height:nt,position:m.position},...Tt]),()=>b(Tt=>Tt.filter(Et=>Et.toastId!==m.id))}},[b,m.id]),ke.useLayoutEffect(()=>{if(!ne)return;const Ie=Ye.current,nt=Ie.style.height;Ie.style.height="auto";const Tt=Ie.getBoundingClientRect().height;Ie.style.height=nt,Ve(Tt),b(Et=>Et.find(xt=>xt.toastId===m.id)?Et.map(xt=>xt.toastId===m.id?{...xt,height:Tt}:xt):[{toastId:m.id,height:Tt,position:m.position},...Et])},[ne,m.title,m.description,b,m.id,m.jsx,m.action,m.cancel]);const Ge=ke.useCallback(()=>{ye(!0),$e(jt.current),b(Ie=>Ie.filter(nt=>nt.toastId!==m.id)),setTimeout(()=>{O(m)},Uqe)},[m,O,b,jt]);ke.useEffect(()=>{if(m.promise&&Mt==="loading"||m.duration===1/0||m.type==="loading")return;let Ie;return I||S||Z?(()=>{if(lt.current<Je.current){const Et=new Date().getTime()-Je.current;tt.current=tt.current-Et}lt.current=new Date().getTime()})():(()=>{tt.current!==1/0&&(Je.current=new Date().getTime(),Ie=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Ge()},tt.current))})(),()=>clearTimeout(Ie)},[I,S,m,Mt,Z,Ge]),ke.useEffect(()=>{m.delete&&(Ge(),m.onDismiss==null||m.onDismiss.call(m,m))},[Ge,m.delete]);function rt(){var Ie;if($!=null&&$.loading){var nt;return ke.createElement("div",{className:er(R==null?void 0:R.loader,m==null||(nt=m.classNames)==null?void 0:nt.loader,"sonner-loader"),"data-visible":Mt==="loading"},$.loading)}return ke.createElement(Sqe,{className:er(R==null?void 0:R.loader,m==null||(Ie=m.classNames)==null?void 0:Ie.loader),visible:Mt==="loading"})}const Oe=m.icon||($==null?void 0:$[Mt])||wqe(Mt);var dn,Kt;return ke.createElement("li",{tabIndex:0,ref:Ye,className:er(K,qe,R==null?void 0:R.toast,m==null||(t=m.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[Mt],m==null||(a=m.classNames)==null?void 0:a[Mt]),"data-sonner-toast":"","data-rich-colors":(dn=m.richColors)!=null?dn:D,"data-styled":!(m.jsx||m.unstyled||x),"data-mounted":ne,"data-promise":!!m.promise,"data-swiped":fe,"data-removed":ie,"data-visible":At,"data-y-position":Yn,"data-x-position":Gt,"data-index":N,"data-front":Ut,"data-swiping":he,"data-dismissible":Lt,"data-type":Mt,"data-invert":ae,"data-swipe-out":me,"data-swipe-direction":Me,"data-expanded":!!(I||pe&&ne),"data-testid":m.testId,style:{"--index":N,"--toasts-before":N,"--z-index":L.length-N,"--offset":`${ie?Ee:jt.current}px`,"--initial-height":pe?"auto":`${st}px`,...A,...m.style},onDragEnd:()=>{ve(!1),W(null),tn.current=null},onPointerDown:Ie=>{Ie.button!==2&&(Ue||!Lt||(ot.current=new Date,$e(jt.current),Ie.target.setPointerCapture(Ie.pointerId),Ie.target.tagName!=="BUTTON"&&(ve(!0),tn.current={x:Ie.clientX,y:Ie.clientY})))},onPointerUp:()=>{var Ie,nt,Tt;if(me||!Lt)return;tn.current=null;const Et=Number(((Ie=Ye.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),zt=Number(((nt=Ye.current)==null?void 0:nt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xt=new Date().getTime()-((Tt=ot.current)==null?void 0:Tt.getTime()),nn=G==="x"?Et:zt,Wo=Math.abs(nn)/xt;if(Math.abs(nn)>=Fqe||Wo>.11){$e(jt.current),m.onDismiss==null||m.onDismiss.call(m,m),X(G==="x"?Et>0?"right":"left":zt>0?"down":"up"),Ge(),ge(!0);return}else{var qt,Yt;(qt=Ye.current)==null||qt.style.setProperty("--swipe-amount-x","0px"),(Yt=Ye.current)==null||Yt.style.setProperty("--swipe-amount-y","0px")}ce(!1),ve(!1),W(null)},onPointerMove:Ie=>{var nt,Tt,Et;if(!tn.current||!Lt||((nt=window.getSelection())==null?void 0:nt.toString().length)>0)return;const xt=Ie.clientY-tn.current.y,nn=Ie.clientX-tn.current.x;var Wo;const qt=(Wo=e.swipeDirections)!=null?Wo:Gqe(F);!G&&(Math.abs(nn)>1||Math.abs(xt)>1)&&W(Math.abs(nn)>Math.abs(xt)?"x":"y");let Yt={x:0,y:0};const ua=yn=>1/(1.5+Math.abs(yn)/20);if(G==="y"){if(qt.includes("top")||qt.includes("bottom"))if(qt.includes("top")&&xt<0||qt.includes("bottom")&&xt>0)Yt.y=xt;else{const yn=xt*ua(xt);Yt.y=Math.abs(yn)<Math.abs(xt)?yn:xt}}else if(G==="x"&&(qt.includes("left")||qt.includes("right")))if(qt.includes("left")&&nn<0||qt.includes("right")&&nn>0)Yt.x=nn;else{const yn=nn*ua(nn);Yt.x=Math.abs(yn)<Math.abs(nn)?yn:nn}(Math.abs(Yt.x)>0||Math.abs(Yt.y)>0)&&ce(!0),(Tt=Ye.current)==null||Tt.style.setProperty("--swipe-amount-x",`${Yt.x}px`),(Et=Ye.current)==null||Et.style.setProperty("--swipe-amount-y",`${Yt.y}px`)}},Ne&&!m.jsx&&Mt!=="loading"?ke.createElement("button",{"aria-label":T,"data-disabled":Ue,"data-close-button":!0,onClick:Ue||!Lt?()=>{}:()=>{Ge(),m.onDismiss==null||m.onDismiss.call(m,m)},className:er(R==null?void 0:R.closeButton,m==null||(o=m.classNames)==null?void 0:o.closeButton)},(Kt=$==null?void 0:$.close)!=null?Kt:Iqe):null,(Mt||m.icon||m.promise)&&m.icon!==null&&(($==null?void 0:$[Mt])!==null||m.icon)?ke.createElement("div",{"data-icon":"",className:er(R==null?void 0:R.icon,m==null||(i=m.classNames)==null?void 0:i.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||rt():null,m.type!=="loading"?Oe:null):null,ke.createElement("div",{"data-content":"",className:er(R==null?void 0:R.content,m==null||(s=m.classNames)==null?void 0:s.content)},ke.createElement("div",{"data-title":"",className:er(R==null?void 0:R.title,m==null||(l=m.classNames)==null?void 0:l.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?ke.createElement("div",{"data-description":"",className:er(q,we,R==null?void 0:R.description,m==null||(h=m.classNames)==null?void 0:h.description)},typeof m.description=="function"?m.description():m.description):null),ke.isValidElement(m.cancel)?m.cancel:m.cancel&&Nh(m.cancel)?ke.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||j,onClick:Ie=>{Nh(m.cancel)&&Lt&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Ie),Ge())},className:er(R==null?void 0:R.cancelButton,m==null||(f=m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,ke.isValidElement(m.action)?m.action:m.action&&Nh(m.action)?ke.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||V,onClick:Ie=>{Nh(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Ie),!Ie.defaultPrevented&&Ge())},className:er(R==null?void 0:R.actionButton,m==null||(y=m.classNames)==null?void 0:y.actionButton)},m.action.label):null)};function wF(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Zqe(e,t){const a={};return[e,t].forEach((o,i)=>{const s=i===1,l=s?"--mobile-offset":"--offset",h=s?Hqe:qqe;function f(y){["top","right","bottom","left"].forEach(k=>{a[`${l}-${k}`]=typeof y=="number"?`${y}px`:y})}typeof o=="number"||typeof o=="string"?f(o):typeof o=="object"?["top","right","bottom","left"].forEach(y=>{o[y]===void 0?a[`${l}-${y}`]=h:a[`${l}-${y}`]=typeof o[y]=="number"?`${o[y]}px`:o[y]}):f(h)}),a}function Xqe(){const[e,t]=ke.useState([]);return ke.useEffect(()=>kn.subscribe(a=>{if(a.dismiss){setTimeout(()=>{ur.flushSync(()=>{t(o=>o.filter(i=>i.id!==a.id))})});return}setTimeout(()=>{ur.flushSync(()=>{t(o=>{const i=o.findIndex(s=>s.id===a.id);return i!==-1?[...o.slice(0,i),{...o[i],...a},...o.slice(i+1)]:[a,...o]})})})}),[]),{toasts:e}}const VY=ke.forwardRef(function(t,a){const{id:o,invert:i,position:s="bottom-right",hotkey:l=["altKey","KeyT"],expand:h,closeButton:f,className:y,offset:k,mobileOffset:m,theme:x="light",richColors:S,duration:b,style:w,visibleToasts:_=zqe,toastOptions:N,dir:L=wF(),gap:I=Bqe,icons:O,containerAriaLabel:D="Notifications"}=t,[P,A]=ke.useState([]),j=ke.useMemo(()=>o?P.filter(ne=>ne.toasterId===o):P.filter(ne=>!ne.toasterId),[P,o]),V=ke.useMemo(()=>Array.from(new Set([s].concat(j.filter(ne=>ne.position).map(ne=>ne.position)))),[j,s]),[K,q]=ke.useState([]),[B,F]=ke.useState(!1),[J,pe]=ke.useState(!1),[R,$]=ke.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),T=ke.useRef(null),G=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),W=ke.useRef(null),Me=ke.useRef(!1),X=ke.useCallback(ne=>{A(le=>{var ie;return(ie=le.find(ye=>ye.id===ne.id))!=null&&ie.delete||kn.dismiss(ne.id),le.filter(({id:ye})=>ye!==ne.id)})},[]);return ke.useEffect(()=>kn.subscribe(ne=>{if(ne.dismiss){requestAnimationFrame(()=>{A(le=>le.map(ie=>ie.id===ne.id?{...ie,delete:!0}:ie))});return}setTimeout(()=>{ur.flushSync(()=>{A(le=>{const ie=le.findIndex(ye=>ye.id===ne.id);return ie!==-1?[...le.slice(0,ie),{...le[ie],...ne},...le.slice(ie+1)]:[ne,...le]})})})}),[P]),ke.useEffect(()=>{if(x!=="system"){$(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:le})=>{$(le?"dark":"light")})}catch{ne.addListener(({matches:ie})=>{try{$(ie?"dark":"light")}catch(ye){console.error(ye)}})}},[x]),ke.useEffect(()=>{P.length<=1&&F(!1)},[P]),ke.useEffect(()=>{const ne=le=>{var ie;if(l.every(ve=>le[ve]||le.code===ve)){var he;F(!0),(he=T.current)==null||he.focus()}le.code==="Escape"&&(document.activeElement===T.current||(ie=T.current)!=null&&ie.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[l]),ke.useEffect(()=>{if(T.current)return()=>{W.current&&(W.current.focus({preventScroll:!0}),W.current=null,Me.current=!1)}},[T.current]),ke.createElement("section",{ref:a,"aria-label":`${D} ${G}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},V.map((ne,le)=>{var ie;const[ye,he]=ne.split("-");return j.length?ke.createElement("ol",{key:ne,dir:L==="auto"?wF():L,tabIndex:-1,ref:T,className:y,"data-sonner-toaster":!0,"data-sonner-theme":R,"data-y-position":ye,"data-x-position":he,style:{"--front-toast-height":`${((ie=K[0])==null?void 0:ie.height)||0}px`,"--width":`${Vqe}px`,"--gap":`${I}px`,...w,...Zqe(k,m)},onBlur:ve=>{Me.current&&!ve.currentTarget.contains(ve.relatedTarget)&&(Me.current=!1,W.current&&(W.current.focus({preventScroll:!0}),W.current=null))},onFocus:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||Me.current||(Me.current=!0,W.current=ve.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{J||F(!1)},onDragEnd:()=>F(!1),onPointerDown:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||pe(!0)},onPointerUp:()=>pe(!1)},j.filter(ve=>!ve.position&&le===0||ve.position===ne).map((ve,me)=>{var ge,fe;return ke.createElement(Wqe,{key:ve.id,icons:O,index:me,toast:ve,defaultRichColors:S,duration:(ge=N==null?void 0:N.duration)!=null?ge:b,className:N==null?void 0:N.className,descriptionClassName:N==null?void 0:N.descriptionClassName,invert:i,visibleToasts:_,closeButton:(fe=N==null?void 0:N.closeButton)!=null?fe:f,interacting:J,position:ne,style:N==null?void 0:N.style,unstyled:N==null?void 0:N.unstyled,classNames:N==null?void 0:N.classNames,cancelButtonStyle:N==null?void 0:N.cancelButtonStyle,actionButtonStyle:N==null?void 0:N.actionButtonStyle,closeButtonAriaLabel:N==null?void 0:N.closeButtonAriaLabel,removeToast:X,toasts:j.filter(ce=>ce.position==ve.position),heights:K.filter(ce=>ce.position==ve.position),setHeights:q,expandByDefault:h,gap:I,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),Kqe=Object.freeze(Object.defineProperty({__proto__:null,Toaster:VY,toast:Dqe,useSonner:Xqe},Symbol.toStringTag,{value:"Module"})),Yqe=({...e})=>{const{theme:t="system"}=xqe();return M.jsx(VY,{theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};function Qqe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,Jqe(i,...t)]}function Jqe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function eHe(e){const t=tHe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(aHe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function tHe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=rHe(i),h=oHe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nHe=Symbol("radix.slottable");function aHe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nHe}function oHe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function rHe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var iHe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],BY=iHe.reduce((e,t)=>{const a=eHe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),KA="Switch",[cHe]=Qqe(KA),[sHe,lHe]=cHe(KA),FY=p.forwardRef((e,t)=>{const{__scopeSwitch:a,name:o,checked:i,defaultChecked:s,required:l,disabled:h,value:f="on",onCheckedChange:y,form:k,...m}=e,[x,S]=p.useState(null),b=ze(t,I=>S(I)),w=p.useRef(!1),_=x?k||!!x.closest("form"):!0,[N,L]=bn({prop:i,defaultProp:s??!1,onChange:y,caller:KA});return M.jsxs(sHe,{scope:a,checked:N,disabled:h,children:[M.jsx(BY.button,{type:"button",role:"switch","aria-checked":N,"aria-required":l,"data-state":ZY(N),"data-disabled":h?"":void 0,disabled:h,value:f,...m,ref:b,onClick:xe(e.onClick,I=>{L(O=>!O),_&&(w.current=I.isPropagationStopped(),w.current||I.stopPropagation())})}),_&&M.jsx(WY,{control:x,bubbles:!w.current,name:o,value:f,checked:N,required:l,disabled:h,form:k,style:{transform:"translateX(-100%)"}})]})});FY.displayName=KA;var UY="SwitchThumb",GY=p.forwardRef((e,t)=>{const{__scopeSwitch:a,...o}=e,i=lHe(UY,a);return M.jsx(BY.span,{"data-state":ZY(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})});GY.displayName=UY;var dHe="SwitchBubbleInput",WY=p.forwardRef(({__scopeSwitch:e,control:t,checked:a,bubbles:o=!0,...i},s)=>{const l=p.useRef(null),h=ze(l,s),f=_A(a),y=SA(t);return p.useEffect(()=>{const k=l.current;if(!k)return;const m=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(m,"checked").set;if(f!==a&&S){const b=new Event("click",{bubbles:o});S.call(k,a),k.dispatchEvent(b)}},[f,a,o]),M.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a,...i,tabIndex:-1,ref:h,style:{...i.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});WY.displayName=dHe;function ZY(e){return e?"checked":"unchecked"}var uHe=FY,hHe=GY;function pHe({className:e,...t}){return M.jsx(uHe,{"data-slot":"switch",className:ee("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:M.jsx(hHe,{"data-slot":"switch-thumb",className:ee("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function fHe({className:e,wrapperHeight:t,ref:a,...o}){return M.jsx("div",{"data-slot":"table-container",ref:a,className:ee("relative w-full overflow-x-auto",t),children:M.jsx("table",{"data-slot":"table",className:ee("w-full caption-bottom text-sm",e),...o})})}function yHe({className:e,...t}){return M.jsx("thead",{"data-slot":"table-header",className:ee("[&_tr]:border-b",e),...t})}function mHe({className:e,...t}){return M.jsx("tbody",{"data-slot":"table-body",className:ee("[&_tr:last-child]:border-0",e),...t})}function vHe({className:e,...t}){return M.jsx("tfoot",{"data-slot":"table-footer",className:ee("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function kHe({className:e,...t}){return M.jsx("tr",{"data-slot":"table-row",className:ee("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function gHe({className:e,...t}){return M.jsx("th",{"data-slot":"table-head",className:ee("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function MHe({className:e,...t}){return M.jsx("td",{"data-slot":"table-cell",className:ee("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function xHe({className:e,...t}){return M.jsx("caption",{"data-slot":"table-caption",className:ee("text-muted-foreground mt-4 text-sm",e),...t})}function bHe({className:e,...t}){return M.jsx("textarea",{"data-slot":"textarea",className:ee("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const wHe=()=>typeof window>"u"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,_He=(e,t,a=365)=>{if(typeof document>"u")return;const o=a*24*60*60;document.cookie=`${e}=${t};path=/;max-age=${o};SameSite=Lax`},M2=e=>{const t=e==="dark"||e==="system"&&wHe();document.documentElement.classList.toggle("dark",t)},XY=()=>typeof window>"u"?null:window.matchMedia("(prefers-color-scheme: dark)"),KY=()=>{const e=localStorage.getItem("appearance");M2(e||"light")};function pVe(){var t;const e=localStorage.getItem("appearance")||"system";M2(e),(t=XY())==null||t.addEventListener("change",KY)}function tD(){const[e,t]=p.useState("system"),[a,o]=p.useState(!1),i=p.useCallback(s=>{o(!0),t(s),localStorage.setItem("appearance",s),_He("appearance",s),M2(s),setTimeout(()=>{o(!1),window.dispatchEvent(new Event("appearanceChanged"))},0)},[]);return p.useEffect(()=>{const s=localStorage.getItem("appearance");i(s||"system");const l=f=>{if(f.key==="appearance"){const y=f.newValue;t(y),M2(y)}},h=()=>{const f=localStorage.getItem("appearance");t(f),M2(f)};return window.addEventListener("storage",l),window.addEventListener("appearanceChanged",h),()=>{var f;window.removeEventListener("storage",l),window.removeEventListener("appearanceChanged",h),(f=XY())==null||f.removeEventListener("change",KY)}},[i]),{appearance:e,updateAppearance:i,isThemeChanging:a}}const SHe={errors:{}},j1=new Proxy(SHe,{set(e,t,a){return t==="errors"&&(Object.keys(a).length===0?e.errors={}:e.errors={...e.errors,...a}),!0}}),_F=(e,t,a)=>{if(t)j1.errors={...j1.errors,[e]:{hasError:!0,message:a}};else{const{[e]:o,...i}=j1.errors;j1.errors=i}},fVe=e=>{var t;return(t=j1.errors[e])==null?void 0:t.message},yVe=()=>Object.values(j1.errors).some(e=>e.hasError),mVe=()=>{j1.errors={}};function x2(e,t){return e!==void 0?e&&typeof e=="object"&&("json"in e||"text"in e)?e:{json:e}:t!==void 0?{json:t}:void 0}function bP(e){const t=p.useRef(null),a=p.useRef(null),o=p.useRef(e),{appearance:i}=tD(),[s,l]=p.useState("");return p.useEffect(()=>{l(i==="dark"?"jse-theme-dark":"")},[i]),p.useEffect(()=>{a.current&&a.current.updateProps({content:x2(e.content,e.json)})},[e.content,e.json]),p.useEffect(()=>{var y;const h=e.schema?ZH({schema:e.schema}):void 0,f=x2(e.content,e.json);if(a.current=pee({target:t.current,props:{...e,validator:h,content:f,onChange:(k,m,x)=>{var S;if(h){const w=k.json===void 0?["error"]:(S=x.contentErrors)==null?void 0:S.validationErrors;_F(e.name,!!(w!=null&&w.length),"Error validation JSON schema")}e.onChange&&e.onChange(k,m,x)}}}),a.current){const k=a.current.get(),m=a.current.validate(),x=!!((y=m==null?void 0:m.validationErrors)!=null&&y.length);e.onChange&&e.onChange(k,void 0,{contentErrors:m,patchResult:void 0,isUndo:!1,isRedo:!1,isValid:!x}),_F(e.name,x,"Error validation JSON schema")}return()=>{a.current&&(a.current.destroy(),a.current=null)}},[e.schema]),p.useEffect(()=>{if(a.current){const h=CHe(e,o.current);("content"in h||"json"in h)&&(h.content=x2(e.content,e.json),delete h.json),"schema"in h&&(h.validator=e.schema?ZH({schema:e.schema}):void 0,delete h.schema),a.current.updateProps(h),o.current=e}},[e]),M.jsx("div",{className:`vanilla-jsoneditor-react ${s} ${e.disabled?"pointer-events-none opacity-50 cursor-not-allowed":""}`,ref:t})}function CHe(e,t){const a={};for(const[o,i]of Object.entries(e))if(o==="content"){const s=JSON.stringify(x2(i,void 0)),l=JSON.stringify(x2(t[o],void 0));s!==l&&(a[o]=i)}else i!==t[o]&&(a[o]=i);return a}const vVe=Object.freeze(Object.defineProperty({__proto__:null,default:bP},Symbol.toStringTag,{value:"Module"}));/**
|
|
8007
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(a))},[a,e]),null},gIe="DialogDescriptionWarning",MIe=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wW(gIe).contentName}}.`;return p.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},rO=lW,_W=uW,iO=pW,cO=fW,sO=yW,SW=vW,CW=gW,TA=xW,l2='[cmdk-group=""]',Ej='[cmdk-group-items=""]',xIe='[cmdk-group-heading=""]',NW='[cmdk-item=""]',cF=`${NW}:not([aria-disabled="true"])`,tP="cmdk-item-select",zd="data-value",bIe=(e,t,a)=>zLe(e,t,a),LW=p.createContext(void 0),q2=()=>p.useContext(LW),EW=p.createContext(void 0),lO=()=>p.useContext(EW),IW=p.createContext(void 0),AW=p.forwardRef((e,t)=>{let a=qd(()=>{var X,ne;return{search:"",value:(ne=(X=e.value)!=null?X:e.defaultValue)!=null?ne:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=qd(()=>new Set),i=qd(()=>new Map),s=qd(()=>new Map),l=qd(()=>new Set),h=TW(e),{label:f,children:y,value:k,onValueChange:m,filter:x,shouldFilter:S,loop:b,disablePointerSelection:w=!1,vimBindings:_=!0,...N}=e,L=It(),I=It(),O=It(),D=p.useRef(null),P=RIe();V1(()=>{if(k!==void 0){let X=k.trim();a.current.value=X,A.emit()}},[k]),V1(()=>{P(6,F)},[]);let A=p.useMemo(()=>({subscribe:X=>(l.current.add(X),()=>l.current.delete(X)),snapshot:()=>a.current,setState:(X,ne,le)=>{var ie,ye,he,ve;if(!Object.is(a.current[X],ne)){if(a.current[X]=ne,X==="search")B(),K(),P(1,q);else if(X==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let me=document.getElementById(O);me?me.focus():(ie=document.getElementById(L))==null||ie.focus()}if(P(7,()=>{var me;a.current.selectedItemId=(me=J())==null?void 0:me.id,A.emit()}),le||P(5,F),((ye=h.current)==null?void 0:ye.value)!==void 0){let me=ne??"";(ve=(he=h.current).onValueChange)==null||ve.call(he,me);return}}A.emit()}},emit:()=>{l.current.forEach(X=>X())}}),[]),j=p.useMemo(()=>({value:(X,ne,le)=>{var ie;ne!==((ie=s.current.get(X))==null?void 0:ie.value)&&(s.current.set(X,{value:ne,keywords:le}),a.current.filtered.items.set(X,V(ne,le)),P(2,()=>{K(),A.emit()}))},item:(X,ne)=>(o.current.add(X),ne&&(i.current.has(ne)?i.current.get(ne).add(X):i.current.set(ne,new Set([X]))),P(3,()=>{B(),K(),a.current.value||q(),A.emit()}),()=>{s.current.delete(X),o.current.delete(X),a.current.filtered.items.delete(X);let le=J();P(4,()=>{B(),(le==null?void 0:le.getAttribute("id"))===X&&q(),A.emit()})}),group:X=>(i.current.has(X)||i.current.set(X,new Set),()=>{s.current.delete(X),i.current.delete(X)}),filter:()=>h.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:L,inputId:O,labelId:I,listInnerRef:D}),[]);function V(X,ne){var le,ie;let ye=(ie=(le=h.current)==null?void 0:le.filter)!=null?ie:bIe;return X?ye(X,a.current.search,ne):0}function K(){if(!a.current.search||h.current.shouldFilter===!1)return;let X=a.current.filtered.items,ne=[];a.current.filtered.groups.forEach(ie=>{let ye=i.current.get(ie),he=0;ye.forEach(ve=>{let me=X.get(ve);he=Math.max(me,he)}),ne.push([ie,he])});let le=D.current;pe().sort((ie,ye)=>{var he,ve;let me=ie.getAttribute("id"),ge=ye.getAttribute("id");return((he=X.get(ge))!=null?he:0)-((ve=X.get(me))!=null?ve:0)}).forEach(ie=>{let ye=ie.closest(Ej);ye?ye.appendChild(ie.parentElement===ye?ie:ie.closest(`${Ej} > *`)):le.appendChild(ie.parentElement===le?ie:ie.closest(`${Ej} > *`))}),ne.sort((ie,ye)=>ye[1]-ie[1]).forEach(ie=>{var ye;let he=(ye=D.current)==null?void 0:ye.querySelector(`${l2}[${zd}="${encodeURIComponent(ie[0])}"]`);he==null||he.parentElement.appendChild(he)})}function q(){let X=pe().find(le=>le.getAttribute("aria-disabled")!=="true"),ne=X==null?void 0:X.getAttribute(zd);A.setState("value",ne||void 0)}function B(){var X,ne,le,ie;if(!a.current.search||h.current.shouldFilter===!1){a.current.filtered.count=o.current.size;return}a.current.filtered.groups=new Set;let ye=0;for(let he of o.current){let ve=(ne=(X=s.current.get(he))==null?void 0:X.value)!=null?ne:"",me=(ie=(le=s.current.get(he))==null?void 0:le.keywords)!=null?ie:[],ge=V(ve,me);a.current.filtered.items.set(he,ge),ge>0&&ye++}for(let[he,ve]of i.current)for(let me of ve)if(a.current.filtered.items.get(me)>0){a.current.filtered.groups.add(he);break}a.current.filtered.count=ye}function F(){var X,ne,le;let ie=J();ie&&(((X=ie.parentElement)==null?void 0:X.firstChild)===ie&&((le=(ne=ie.closest(l2))==null?void 0:ne.querySelector(xIe))==null||le.scrollIntoView({block:"nearest"})),ie.scrollIntoView({block:"nearest"}))}function J(){var X;return(X=D.current)==null?void 0:X.querySelector(`${NW}[aria-selected="true"]`)}function pe(){var X;return Array.from(((X=D.current)==null?void 0:X.querySelectorAll(cF))||[])}function R(X){let ne=pe()[X];ne&&A.setState("value",ne.getAttribute(zd))}function $(X){var ne;let le=J(),ie=pe(),ye=ie.findIndex(ve=>ve===le),he=ie[ye+X];(ne=h.current)!=null&&ne.loop&&(he=ye+X<0?ie[ie.length-1]:ye+X===ie.length?ie[0]:ie[ye+X]),he&&A.setState("value",he.getAttribute(zd))}function T(X){let ne=J(),le=ne==null?void 0:ne.closest(l2),ie;for(;le&&!ie;)le=X>0?AIe(le,l2):TIe(le,l2),ie=le==null?void 0:le.querySelector(cF);ie?A.setState("value",ie.getAttribute(zd)):$(X)}let G=()=>R(pe().length-1),W=X=>{X.preventDefault(),X.metaKey?G():X.altKey?T(1):$(1)},Me=X=>{X.preventDefault(),X.metaKey?R(0):X.altKey?T(-1):$(-1)};return p.createElement(jn.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:X=>{var ne;(ne=N.onKeyDown)==null||ne.call(N,X);let le=X.nativeEvent.isComposing||X.keyCode===229;if(!(X.defaultPrevented||le))switch(X.key){case"n":case"j":{_&&X.ctrlKey&&W(X);break}case"ArrowDown":{W(X);break}case"p":case"k":{_&&X.ctrlKey&&Me(X);break}case"ArrowUp":{Me(X);break}case"Home":{X.preventDefault(),R(0);break}case"End":{X.preventDefault(),G();break}case"Enter":{X.preventDefault();let ie=J();if(ie){let ye=new Event(tP);ie.dispatchEvent(ye)}}}}},p.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:jIe},f),RA(e,X=>p.createElement(EW.Provider,{value:A},p.createElement(LW.Provider,{value:j},X))))}),wIe=p.forwardRef((e,t)=>{var a,o;let i=It(),s=p.useRef(null),l=p.useContext(IW),h=q2(),f=TW(e),y=(o=(a=f.current)==null?void 0:a.forceMount)!=null?o:l==null?void 0:l.forceMount;V1(()=>{if(!y)return h.item(i,l==null?void 0:l.id)},[y]);let k=RW(i,s,[e.value,e.children,s],e.keywords),m=lO(),x=Ci(P=>P.value&&P.value===k.current),S=Ci(P=>y||h.filter()===!1?!0:P.search?P.filtered.items.get(i)>0:!0);p.useEffect(()=>{let P=s.current;if(!(!P||e.disabled))return P.addEventListener(tP,b),()=>P.removeEventListener(tP,b)},[S,e.onSelect,e.disabled]);function b(){var P,A;w(),(A=(P=f.current).onSelect)==null||A.call(P,k.current)}function w(){m.setState("value",k.current,!0)}if(!S)return null;let{disabled:_,value:N,onSelect:L,forceMount:I,keywords:O,...D}=e;return p.createElement(jn.div,{ref:kt(s,t),...D,id:i,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!x,"data-disabled":!!_,"data-selected":!!x,onPointerMove:_||h.getDisablePointerSelection()?void 0:w,onClick:_?void 0:b},e.children)}),_Ie=p.forwardRef((e,t)=>{let{heading:a,children:o,forceMount:i,...s}=e,l=It(),h=p.useRef(null),f=p.useRef(null),y=It(),k=q2(),m=Ci(S=>i||k.filter()===!1?!0:S.search?S.filtered.groups.has(l):!0);V1(()=>k.group(l),[]),RW(l,h,[e.value,e.heading,f]);let x=p.useMemo(()=>({id:l,forceMount:i}),[i]);return p.createElement(jn.div,{ref:kt(h,t),...s,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},a&&p.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:y},a),RA(e,S=>p.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?y:void 0},p.createElement(IW.Provider,{value:x},S))))}),SIe=p.forwardRef((e,t)=>{let{alwaysRender:a,...o}=e,i=p.useRef(null),s=Ci(l=>!l.search);return!a&&!s?null:p.createElement(jn.div,{ref:kt(i,t),...o,"cmdk-separator":"",role:"separator"})}),CIe=p.forwardRef((e,t)=>{let{onValueChange:a,...o}=e,i=e.value!=null,s=lO(),l=Ci(y=>y.search),h=Ci(y=>y.selectedItemId),f=q2();return p.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),p.createElement(jn.input,{ref:t,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":h,id:f.inputId,type:"text",value:i?e.value:l,onChange:y=>{i||s.setState("search",y.target.value),a==null||a(y.target.value)}})}),NIe=p.forwardRef((e,t)=>{let{children:a,label:o="Suggestions",...i}=e,s=p.useRef(null),l=p.useRef(null),h=Ci(y=>y.selectedItemId),f=q2();return p.useEffect(()=>{if(l.current&&s.current){let y=l.current,k=s.current,m,x=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let S=y.offsetHeight;k.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return x.observe(y),()=>{cancelAnimationFrame(m),x.unobserve(y)}}},[]),p.createElement(jn.div,{ref:kt(s,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":o,id:f.listId},RA(e,y=>p.createElement("div",{ref:kt(l,f.listInnerRef),"cmdk-list-sizer":""},y)))}),LIe=p.forwardRef((e,t)=>{let{open:a,onOpenChange:o,overlayClassName:i,contentClassName:s,container:l,...h}=e;return p.createElement(rO,{open:a,onOpenChange:o},p.createElement(iO,{container:l},p.createElement(cO,{"cmdk-overlay":"",className:i}),p.createElement(sO,{"aria-label":e.label,"cmdk-dialog":"",className:s},p.createElement(AW,{ref:t,...h}))))}),EIe=p.forwardRef((e,t)=>Ci(a=>a.filtered.count===0)?p.createElement(jn.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),IIe=p.forwardRef((e,t)=>{let{progress:a,children:o,label:i="Loading...",...s}=e;return p.createElement(jn.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},RA(e,l=>p.createElement("div",{"aria-hidden":!0},l)))}),Z1=Object.assign(AW,{List:NIe,Item:wIe,Input:CIe,Group:_Ie,Separator:SIe,Dialog:LIe,Empty:EIe,Loading:IIe});function AIe(e,t){let a=e.nextElementSibling;for(;a;){if(a.matches(t))return a;a=a.nextElementSibling}}function TIe(e,t){let a=e.previousElementSibling;for(;a;){if(a.matches(t))return a;a=a.previousElementSibling}}function TW(e){let t=p.useRef(e);return V1(()=>{t.current=e}),t}var V1=typeof window>"u"?p.useEffect:p.useLayoutEffect;function qd(e){let t=p.useRef();return t.current===void 0&&(t.current=e()),t}function Ci(e){let t=lO(),a=()=>e(t.snapshot());return p.useSyncExternalStore(t.subscribe,a,a)}function RW(e,t,a,o=[]){let i=p.useRef(),s=q2();return V1(()=>{var l;let h=(()=>{var y;for(let k of a){if(typeof k=="string")return k.trim();if(typeof k=="object"&&"current"in k)return k.current?(y=k.current.textContent)==null?void 0:y.trim():i.current}})(),f=o.map(y=>y.trim());s.value(e,h,f),(l=t.current)==null||l.setAttribute(zd,h),i.current=h}),i}var RIe=()=>{let[e,t]=p.useState(),a=qd(()=>new Map);return V1(()=>{a.current.forEach(o=>o()),a.current=new Map},[e]),(o,i)=>{a.current.set(o,i),t({})}};function $Ie(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function RA({asChild:e,children:t},a){return e&&p.isValidElement(t)?p.cloneElement($Ie(t),{ref:t.ref},a(t.props.children)):a(t)}var jIe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function $W({...e}){return M.jsx(rO,{"data-slot":"dialog",...e})}function PIe({...e}){return M.jsx(_W,{"data-slot":"dialog-trigger",...e})}function jW({...e}){return M.jsx(iO,{"data-slot":"dialog-portal",...e})}function OIe({...e}){return M.jsx(TA,{"data-slot":"dialog-close",...e})}function PW({className:e,...t}){return M.jsx(cO,{"data-slot":"dialog-overlay",className:ee("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1010] bg-black/50",e),...t})}function OW({className:e,children:t,...a}){return M.jsxs(jW,{"data-slot":"dialog-portal",children:[M.jsx(PW,{}),M.jsxs(sO,{"data-slot":"dialog-content",className:ee("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...a,children:[t,M.jsxs(TA,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[M.jsx(bi,{}),M.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function DW({className:e,...t}){return M.jsx("div",{"data-slot":"dialog-header",className:ee("flex flex-col gap-2 text-center sm:text-left",e),...t})}function DIe({className:e,...t}){return M.jsx("div",{"data-slot":"dialog-footer",className:ee("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function zW({className:e,...t}){return M.jsx(SW,{"data-slot":"dialog-title",className:ee("text-lg leading-none font-semibold",e),...t})}function qW({className:e,...t}){return M.jsx(CW,{"data-slot":"dialog-description",className:ee("text-muted-foreground text-sm",e),...t})}function dO({className:e,...t}){return M.jsx(Z1,{"data-slot":"command",className:ee("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function zIe({title:e="Command Palette",description:t="Search for a command to run...",children:a,...o}){return M.jsxs($W,{...o,children:[M.jsxs(DW,{className:"sr-only",children:[M.jsx(zW,{children:e}),M.jsx(qW,{children:t})]}),M.jsx(OW,{className:"overflow-hidden p-0",children:M.jsx(dO,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:a})})]})}function HW({className:e,...t}){return M.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[M.jsx(g2,{className:"size-4 shrink-0 opacity-50"}),M.jsx(Z1.Input,{"data-slot":"command-input",className:ee("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function VW({className:e,...t}){return M.jsx(Z1.List,{"data-slot":"command-list",className:ee("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function BW({...e}){return M.jsx(Z1.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function FW({className:e,...t}){return M.jsx(Z1.Group,{"data-slot":"command-group",className:ee("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function UW({className:e,...t}){return M.jsx(Z1.Separator,{"data-slot":"command-separator",className:ee("bg-border -mx-1 h-px",e),...t})}function GW({className:e,...t}){return M.jsx(Z1.Item,{"data-slot":"command-item",className:ee("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function qIe({className:e,...t}){return M.jsx("span",{"data-slot":"command-shortcut",className:ee("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function HIe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,VIe(i,...t)]}function VIe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function BIe(e){const t=FIe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(GIe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function FIe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=ZIe(i),h=WIe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var UIe=Symbol("radix.slottable");function GIe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===UIe}function WIe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function ZIe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var XIe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],KIe=XIe.reduce((e,t)=>{const a=BIe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function YIe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,QIe(i,...t)]}function QIe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function sF(e){const t=JIe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(tAe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function JIe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=aAe(i),h=nAe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var eAe=Symbol("radix.slottable");function tAe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===eAe}function nAe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function aAe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}function H2(e){const t=e+"CollectionProvider",[a,o]=YIe(t),[i,s]=a(t,{collectionRef:{current:null},itemMap:new Map}),l=w=>{const{scope:_,children:N}=w,L=ke.useRef(null),I=ke.useRef(new Map).current;return M.jsx(i,{scope:_,itemMap:I,collectionRef:L,children:N})};l.displayName=t;const h=e+"CollectionSlot",f=sF(h),y=ke.forwardRef((w,_)=>{const{scope:N,children:L}=w,I=s(h,N),O=ze(_,I.collectionRef);return M.jsx(f,{ref:O,children:L})});y.displayName=h;const k=e+"CollectionItemSlot",m="data-radix-collection-item",x=sF(k),S=ke.forwardRef((w,_)=>{const{scope:N,children:L,...I}=w,O=ke.useRef(null),D=ze(_,O),P=s(k,N);return ke.useEffect(()=>(P.itemMap.set(O,{ref:O,...I}),()=>void P.itemMap.delete(O))),M.jsx(x,{[m]:"",ref:D,children:L})});S.displayName=k;function b(w){const _=s(e+"CollectionConsumer",w);return ke.useCallback(()=>{const L=_.collectionRef.current;if(!L)return[];const I=Array.from(L.querySelectorAll(`[${m}]`));return Array.from(_.itemMap.values()).sort((P,A)=>I.indexOf(P.ref.current)-I.indexOf(A.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:l,Slot:y,ItemSlot:S},b,o]}function oAe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,rAe(i,...t)]}function rAe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}var iAe=p.createContext(void 0);function V2(e){const t=p.useContext(iAe);return e||t||"ltr"}const cAe=["top","right","bottom","left"],Ni=Math.min,Gn=Math.max,aA=Math.round,Sh=Math.floor,dr=e=>({x:e,y:e}),sAe={left:"right",right:"left",bottom:"top",top:"bottom"};function nP(e,t,a){return Gn(e,Ni(t,a))}function qr(e,t){return typeof e=="function"?e(t):e}function Hr(e){return e.split("-")[0]}function ou(e){return e.split("-")[1]}function uO(e){return e==="x"?"y":"x"}function hO(e){return e==="y"?"height":"width"}function cr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function pO(e){return uO(cr(e))}function lAe(e,t,a){a===void 0&&(a=!1);const o=ou(e),i=pO(e),s=hO(i);let l=i==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=oA(l)),[l,oA(l)]}function dAe(e){const t=oA(e);return[aP(e),t,aP(t)]}function aP(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const lF=["left","right"],dF=["right","left"],uAe=["top","bottom"],hAe=["bottom","top"];function pAe(e,t,a){switch(e){case"top":case"bottom":return a?t?dF:lF:t?lF:dF;case"left":case"right":return t?uAe:hAe;default:return[]}}function fAe(e,t,a,o){const i=ou(e);let s=pAe(Hr(e),a==="start",o);return i&&(s=s.map(l=>l+"-"+i),t&&(s=s.concat(s.map(aP)))),s}function oA(e){const t=Hr(e);return sAe[t]+e.slice(t.length)}function yAe(e){return{top:0,right:0,bottom:0,left:0,...e}}function WW(e){return typeof e!="number"?yAe(e):{top:e,right:e,bottom:e,left:e}}function rA(e){const{x:t,y:a,width:o,height:i}=e;return{width:o,height:i,top:a,left:t,right:t+o,bottom:a+i,x:t,y:a}}function uF(e,t,a){let{reference:o,floating:i}=e;const s=cr(t),l=pO(t),h=hO(l),f=Hr(t),y=s==="y",k=o.x+o.width/2-i.width/2,m=o.y+o.height/2-i.height/2,x=o[h]/2-i[h]/2;let S;switch(f){case"top":S={x:k,y:o.y-i.height};break;case"bottom":S={x:k,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y:m};break;case"left":S={x:o.x-i.width,y:m};break;default:S={x:o.x,y:o.y}}switch(ou(t)){case"start":S[l]-=x*(a&&y?-1:1);break;case"end":S[l]+=x*(a&&y?-1:1);break}return S}async function mAe(e,t){var a;t===void 0&&(t={});const{x:o,y:i,platform:s,rects:l,elements:h,strategy:f}=e,{boundary:y="clippingAncestors",rootBoundary:k="viewport",elementContext:m="floating",altBoundary:x=!1,padding:S=0}=qr(t,e),b=WW(S),_=h[x?m==="floating"?"reference":"floating":m],N=rA(await s.getClippingRect({element:(a=await(s.isElement==null?void 0:s.isElement(_)))==null||a?_:_.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(h.floating)),boundary:y,rootBoundary:k,strategy:f})),L=m==="floating"?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h.floating)),O=await(s.isElement==null?void 0:s.isElement(I))?await(s.getScale==null?void 0:s.getScale(I))||{x:1,y:1}:{x:1,y:1},D=rA(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:L,offsetParent:I,strategy:f}):L);return{top:(N.top-D.top+b.top)/O.y,bottom:(D.bottom-N.bottom+b.bottom)/O.y,left:(N.left-D.left+b.left)/O.x,right:(D.right-N.right+b.right)/O.x}}const vAe=50,kAe=async(e,t,a)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:l}=a,h=l.detectOverflow?l:{...l,detectOverflow:mAe},f=await(l.isRTL==null?void 0:l.isRTL(t));let y=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:k,y:m}=uF(y,o,f),x=o,S=0;const b={};for(let w=0;w<s.length;w++){const _=s[w];if(!_)continue;const{name:N,fn:L}=_,{x:I,y:O,data:D,reset:P}=await L({x:k,y:m,initialPlacement:o,placement:x,strategy:i,middlewareData:b,rects:y,platform:h,elements:{reference:e,floating:t}});k=I??k,m=O??m,b[N]={...b[N],...D},P&&S<vAe&&(S++,typeof P=="object"&&(P.placement&&(x=P.placement),P.rects&&(y=P.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):P.rects),{x:k,y:m}=uF(y,x,f)),w=-1)}return{x:k,y:m,placement:x,strategy:i,middlewareData:b}},gAe=e=>({name:"arrow",options:e,async fn(t){const{x:a,y:o,placement:i,rects:s,platform:l,elements:h,middlewareData:f}=t,{element:y,padding:k=0}=qr(e,t)||{};if(y==null)return{};const m=WW(k),x={x:a,y:o},S=pO(i),b=hO(S),w=await l.getDimensions(y),_=S==="y",N=_?"top":"left",L=_?"bottom":"right",I=_?"clientHeight":"clientWidth",O=s.reference[b]+s.reference[S]-x[S]-s.floating[b],D=x[S]-s.reference[S],P=await(l.getOffsetParent==null?void 0:l.getOffsetParent(y));let A=P?P[I]:0;(!A||!await(l.isElement==null?void 0:l.isElement(P)))&&(A=h.floating[I]||s.floating[b]);const j=O/2-D/2,V=A/2-w[b]/2-1,K=Ni(m[N],V),q=Ni(m[L],V),B=K,F=A-w[b]-q,J=A/2-w[b]/2+j,pe=nP(B,J,F),R=!f.arrow&&ou(i)!=null&&J!==pe&&s.reference[b]/2-(J<B?K:q)-w[b]/2<0,$=R?J<B?J-B:J-F:0;return{[S]:x[S]+$,data:{[S]:pe,centerOffset:J-pe-$,...R&&{alignmentOffset:$}},reset:R}}}),MAe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var a,o;const{placement:i,middlewareData:s,rects:l,initialPlacement:h,platform:f,elements:y}=t,{mainAxis:k=!0,crossAxis:m=!0,fallbackPlacements:x,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,..._}=qr(e,t);if((a=s.arrow)!=null&&a.alignmentOffset)return{};const N=Hr(i),L=cr(h),I=Hr(h)===h,O=await(f.isRTL==null?void 0:f.isRTL(y.floating)),D=x||(I||!w?[oA(h)]:dAe(h)),P=b!=="none";!x&&P&&D.push(...fAe(h,w,b,O));const A=[h,...D],j=await f.detectOverflow(t,_),V=[];let K=((o=s.flip)==null?void 0:o.overflows)||[];if(k&&V.push(j[N]),m){const J=lAe(i,l,O);V.push(j[J[0]],j[J[1]])}if(K=[...K,{placement:i,overflows:V}],!V.every(J=>J<=0)){var q,B;const J=(((q=s.flip)==null?void 0:q.index)||0)+1,pe=A[J];if(pe&&(!(m==="alignment"?L!==cr(pe):!1)||K.every(T=>cr(T.placement)===L?T.overflows[0]>0:!0)))return{data:{index:J,overflows:K},reset:{placement:pe}};let R=(B=K.filter($=>$.overflows[0]<=0).sort(($,T)=>$.overflows[1]-T.overflows[1])[0])==null?void 0:B.placement;if(!R)switch(S){case"bestFit":{var F;const $=(F=K.filter(T=>{if(P){const G=cr(T.placement);return G===L||G==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(G=>G>0).reduce((G,W)=>G+W,0)]).sort((T,G)=>T[1]-G[1])[0])==null?void 0:F[0];$&&(R=$);break}case"initialPlacement":R=h;break}if(i!==R)return{reset:{placement:R}}}return{}}}};function hF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pF(e){return cAe.some(t=>e[t]>=0)}const xAe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:a,platform:o}=t,{strategy:i="referenceHidden",...s}=qr(e,t);switch(i){case"referenceHidden":{const l=await o.detectOverflow(t,{...s,elementContext:"reference"}),h=hF(l,a.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:pF(h)}}}case"escaped":{const l=await o.detectOverflow(t,{...s,altBoundary:!0}),h=hF(l,a.floating);return{data:{escapedOffsets:h,escaped:pF(h)}}}default:return{}}}}},ZW=new Set(["left","top"]);async function bAe(e,t){const{placement:a,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=Hr(a),h=ou(a),f=cr(a)==="y",y=ZW.has(l)?-1:1,k=s&&f?-1:1,m=qr(t,e);let{mainAxis:x,crossAxis:S,alignmentAxis:b}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return h&&typeof b=="number"&&(S=h==="end"?b*-1:b),f?{x:S*k,y:x*y}:{x:x*y,y:S*k}}const wAe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var a,o;const{x:i,y:s,placement:l,middlewareData:h}=t,f=await bAe(t,e);return l===((a=h.offset)==null?void 0:a.placement)&&(o=h.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:s+f.y,data:{...f,placement:l}}}}},_Ae=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:o,placement:i,platform:s}=t,{mainAxis:l=!0,crossAxis:h=!1,limiter:f={fn:N=>{let{x:L,y:I}=N;return{x:L,y:I}}},...y}=qr(e,t),k={x:a,y:o},m=await s.detectOverflow(t,y),x=cr(Hr(i)),S=uO(x);let b=k[S],w=k[x];if(l){const N=S==="y"?"top":"left",L=S==="y"?"bottom":"right",I=b+m[N],O=b-m[L];b=nP(I,b,O)}if(h){const N=x==="y"?"top":"left",L=x==="y"?"bottom":"right",I=w+m[N],O=w-m[L];w=nP(I,w,O)}const _=f.fn({...t,[S]:b,[x]:w});return{..._,data:{x:_.x-a,y:_.y-o,enabled:{[S]:l,[x]:h}}}}}},SAe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:a,y:o,placement:i,rects:s,middlewareData:l}=t,{offset:h=0,mainAxis:f=!0,crossAxis:y=!0}=qr(e,t),k={x:a,y:o},m=cr(i),x=uO(m);let S=k[x],b=k[m];const w=qr(h,t),_=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(f){const I=x==="y"?"height":"width",O=s.reference[x]-s.floating[I]+_.mainAxis,D=s.reference[x]+s.reference[I]-_.mainAxis;S<O?S=O:S>D&&(S=D)}if(y){var N,L;const I=x==="y"?"width":"height",O=ZW.has(Hr(i)),D=s.reference[m]-s.floating[I]+(O&&((N=l.offset)==null?void 0:N[m])||0)+(O?0:_.crossAxis),P=s.reference[m]+s.reference[I]+(O?0:((L=l.offset)==null?void 0:L[m])||0)-(O?_.crossAxis:0);b<D?b=D:b>P&&(b=P)}return{[x]:S,[m]:b}}}},CAe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var a,o;const{placement:i,rects:s,platform:l,elements:h}=t,{apply:f=()=>{},...y}=qr(e,t),k=await l.detectOverflow(t,y),m=Hr(i),x=ou(i),S=cr(i)==="y",{width:b,height:w}=s.floating;let _,N;m==="top"||m==="bottom"?(_=m,N=x===(await(l.isRTL==null?void 0:l.isRTL(h.floating))?"start":"end")?"left":"right"):(N=m,_=x==="end"?"top":"bottom");const L=w-k.top-k.bottom,I=b-k.left-k.right,O=Ni(w-k[_],L),D=Ni(b-k[N],I),P=!t.middlewareData.shift;let A=O,j=D;if((a=t.middlewareData.shift)!=null&&a.enabled.x&&(j=I),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(A=L),P&&!x){const K=Gn(k.left,0),q=Gn(k.right,0),B=Gn(k.top,0),F=Gn(k.bottom,0);S?j=b-2*(K!==0||q!==0?K+q:Gn(k.left,k.right)):A=w-2*(B!==0||F!==0?B+F:Gn(k.top,k.bottom))}await f({...t,availableWidth:j,availableHeight:A});const V=await l.getDimensions(h.floating);return b!==V.width||w!==V.height?{reset:{rects:!0}}:{}}}};function $A(){return typeof window<"u"}function ru(e){return XW(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pr(e){var t;return(t=(XW(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function XW(e){return $A()?e instanceof Node||e instanceof Wn(e).Node:!1}function _a(e){return $A()?e instanceof Element||e instanceof Wn(e).Element:!1}function Vr(e){return $A()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function fF(e){return!$A()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}function B2(e){const{overflow:t,overflowX:a,overflowY:o,display:i}=Sa(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+a)&&i!=="inline"&&i!=="contents"}function NAe(e){return/^(table|td|th)$/.test(ru(e))}function jA(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const LAe=/transform|translate|scale|rotate|perspective|filter/,EAe=/paint|layout|strict|content/,nc=e=>!!e&&e!=="none";let Ij;function fO(e){const t=_a(e)?Sa(e):e;return nc(t.transform)||nc(t.translate)||nc(t.scale)||nc(t.rotate)||nc(t.perspective)||!yO()&&(nc(t.backdropFilter)||nc(t.filter))||LAe.test(t.willChange||"")||EAe.test(t.contain||"")}function IAe(e){let t=Li(e);for(;Vr(t)&&!Wd(t);){if(fO(t))return t;if(jA(t))return null;t=Li(t)}return null}function yO(){return Ij==null&&(Ij=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ij}function Wd(e){return/^(html|body|#document)$/.test(ru(e))}function Sa(e){return Wn(e).getComputedStyle(e)}function PA(e){return _a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Li(e){if(ru(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fF(e)&&e.host||pr(e);return fF(t)?t.host:t}function KW(e){const t=Li(e);return Wd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(t)&&B2(t)?t:KW(t)}function S2(e,t,a){var o;t===void 0&&(t=[]),a===void 0&&(a=!0);const i=KW(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),l=Wn(i);if(s){const h=oP(l);return t.concat(l,l.visualViewport||[],B2(i)?i:[],h&&a?S2(h):[])}else return t.concat(i,S2(i,[],a))}function oP(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function YW(e){const t=Sa(e);let a=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Vr(e),s=i?e.offsetWidth:a,l=i?e.offsetHeight:o,h=aA(a)!==s||aA(o)!==l;return h&&(a=s,o=l),{width:a,height:o,$:h}}function mO(e){return _a(e)?e:e.contextElement}function Bd(e){const t=mO(e);if(!Vr(t))return dr(1);const a=t.getBoundingClientRect(),{width:o,height:i,$:s}=YW(t);let l=(s?aA(a.width):a.width)/o,h=(s?aA(a.height):a.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!h||!Number.isFinite(h))&&(h=1),{x:l,y:h}}const AAe=dr(0);function QW(e){const t=Wn(e);return!yO()||!t.visualViewport?AAe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function TAe(e,t,a){return t===void 0&&(t=!1),!a||t&&a!==Wn(e)?!1:t}function B1(e,t,a,o){t===void 0&&(t=!1),a===void 0&&(a=!1);const i=e.getBoundingClientRect(),s=mO(e);let l=dr(1);t&&(o?_a(o)&&(l=Bd(o)):l=Bd(e));const h=TAe(s,a,o)?QW(s):dr(0);let f=(i.left+h.x)/l.x,y=(i.top+h.y)/l.y,k=i.width/l.x,m=i.height/l.y;if(s){const x=Wn(s),S=o&&_a(o)?Wn(o):o;let b=x,w=oP(b);for(;w&&o&&S!==b;){const _=Bd(w),N=w.getBoundingClientRect(),L=Sa(w),I=N.left+(w.clientLeft+parseFloat(L.paddingLeft))*_.x,O=N.top+(w.clientTop+parseFloat(L.paddingTop))*_.y;f*=_.x,y*=_.y,k*=_.x,m*=_.y,f+=I,y+=O,b=Wn(w),w=oP(b)}}return rA({width:k,height:m,x:f,y})}function OA(e,t){const a=PA(e).scrollLeft;return t?t.left+a:B1(pr(e)).left+a}function JW(e,t){const a=e.getBoundingClientRect(),o=a.left+t.scrollLeft-OA(e,a),i=a.top+t.scrollTop;return{x:o,y:i}}function RAe(e){let{elements:t,rect:a,offsetParent:o,strategy:i}=e;const s=i==="fixed",l=pr(o),h=t?jA(t.floating):!1;if(o===l||h&&s)return a;let f={scrollLeft:0,scrollTop:0},y=dr(1);const k=dr(0),m=Vr(o);if((m||!m&&!s)&&((ru(o)!=="body"||B2(l))&&(f=PA(o)),m)){const S=B1(o);y=Bd(o),k.x=S.x+o.clientLeft,k.y=S.y+o.clientTop}const x=l&&!m&&!s?JW(l,f):dr(0);return{width:a.width*y.x,height:a.height*y.y,x:a.x*y.x-f.scrollLeft*y.x+k.x+x.x,y:a.y*y.y-f.scrollTop*y.y+k.y+x.y}}function $Ae(e){return Array.from(e.getClientRects())}function jAe(e){const t=pr(e),a=PA(e),o=e.ownerDocument.body,i=Gn(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=Gn(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-a.scrollLeft+OA(e);const h=-a.scrollTop;return Sa(o).direction==="rtl"&&(l+=Gn(t.clientWidth,o.clientWidth)-i),{width:i,height:s,x:l,y:h}}const yF=25;function PAe(e,t){const a=Wn(e),o=pr(e),i=a.visualViewport;let s=o.clientWidth,l=o.clientHeight,h=0,f=0;if(i){s=i.width,l=i.height;const k=yO();(!k||k&&t==="fixed")&&(h=i.offsetLeft,f=i.offsetTop)}const y=OA(o);if(y<=0){const k=o.ownerDocument,m=k.body,x=getComputedStyle(m),S=k.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,b=Math.abs(o.clientWidth-m.clientWidth-S);b<=yF&&(s-=b)}else y<=yF&&(s+=y);return{width:s,height:l,x:h,y:f}}function OAe(e,t){const a=B1(e,!0,t==="fixed"),o=a.top+e.clientTop,i=a.left+e.clientLeft,s=Vr(e)?Bd(e):dr(1),l=e.clientWidth*s.x,h=e.clientHeight*s.y,f=i*s.x,y=o*s.y;return{width:l,height:h,x:f,y}}function mF(e,t,a){let o;if(t==="viewport")o=PAe(e,a);else if(t==="document")o=jAe(pr(e));else if(_a(t))o=OAe(t,a);else{const i=QW(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return rA(o)}function eZ(e,t){const a=Li(e);return a===t||!_a(a)||Wd(a)?!1:Sa(a).position==="fixed"||eZ(a,t)}function DAe(e,t){const a=t.get(e);if(a)return a;let o=S2(e,[],!1).filter(h=>_a(h)&&ru(h)!=="body"),i=null;const s=Sa(e).position==="fixed";let l=s?Li(e):e;for(;_a(l)&&!Wd(l);){const h=Sa(l),f=fO(l);!f&&h.position==="fixed"&&(i=null),(s?!f&&!i:!f&&h.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||B2(l)&&!f&&eZ(e,l))?o=o.filter(k=>k!==l):i=h,l=Li(l)}return t.set(e,o),o}function zAe(e){let{element:t,boundary:a,rootBoundary:o,strategy:i}=e;const l=[...a==="clippingAncestors"?jA(t)?[]:DAe(t,this._c):[].concat(a),o],h=mF(t,l[0],i);let f=h.top,y=h.right,k=h.bottom,m=h.left;for(let x=1;x<l.length;x++){const S=mF(t,l[x],i);f=Gn(S.top,f),y=Ni(S.right,y),k=Ni(S.bottom,k),m=Gn(S.left,m)}return{width:y-m,height:k-f,x:m,y:f}}function qAe(e){const{width:t,height:a}=YW(e);return{width:t,height:a}}function HAe(e,t,a){const o=Vr(t),i=pr(t),s=a==="fixed",l=B1(e,!0,s,t);let h={scrollLeft:0,scrollTop:0};const f=dr(0);function y(){f.x=OA(i)}if(o||!o&&!s)if((ru(t)!=="body"||B2(i))&&(h=PA(t)),o){const S=B1(t,!0,s,t);f.x=S.x+t.clientLeft,f.y=S.y+t.clientTop}else i&&y();s&&!o&&i&&y();const k=i&&!o&&!s?JW(i,h):dr(0),m=l.left+h.scrollLeft-f.x-k.x,x=l.top+h.scrollTop-f.y-k.y;return{x:m,y:x,width:l.width,height:l.height}}function Aj(e){return Sa(e).position==="static"}function vF(e,t){if(!Vr(e)||Sa(e).position==="fixed")return null;if(t)return t(e);let a=e.offsetParent;return pr(e)===a&&(a=a.ownerDocument.body),a}function tZ(e,t){const a=Wn(e);if(jA(e))return a;if(!Vr(e)){let i=Li(e);for(;i&&!Wd(i);){if(_a(i)&&!Aj(i))return i;i=Li(i)}return a}let o=vF(e,t);for(;o&&NAe(o)&&Aj(o);)o=vF(o,t);return o&&Wd(o)&&Aj(o)&&!fO(o)?a:o||IAe(e)||a}const VAe=async function(e){const t=this.getOffsetParent||tZ,a=this.getDimensions,o=await a(e.floating);return{reference:HAe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function BAe(e){return Sa(e).direction==="rtl"}const FAe={convertOffsetParentRelativeRectToViewportRelativeRect:RAe,getDocumentElement:pr,getClippingRect:zAe,getOffsetParent:tZ,getElementRects:VAe,getClientRects:$Ae,getDimensions:qAe,getScale:Bd,isElement:_a,isRTL:BAe};function nZ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function UAe(e,t){let a=null,o;const i=pr(e);function s(){var h;clearTimeout(o),(h=a)==null||h.disconnect(),a=null}function l(h,f){h===void 0&&(h=!1),f===void 0&&(f=1),s();const y=e.getBoundingClientRect(),{left:k,top:m,width:x,height:S}=y;if(h||t(),!x||!S)return;const b=Sh(m),w=Sh(i.clientWidth-(k+x)),_=Sh(i.clientHeight-(m+S)),N=Sh(k),I={rootMargin:-b+"px "+-w+"px "+-_+"px "+-N+"px",threshold:Gn(0,Ni(1,f))||1};let O=!0;function D(P){const A=P[0].intersectionRatio;if(A!==f){if(!O)return l();A?l(!1,A):o=setTimeout(()=>{l(!1,1e-7)},1e3)}A===1&&!nZ(y,e.getBoundingClientRect())&&l(),O=!1}try{a=new IntersectionObserver(D,{...I,root:i.ownerDocument})}catch{a=new IntersectionObserver(D,I)}a.observe(e)}return l(!0),s}function GAe(e,t,a,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,y=mO(e),k=i||s?[...y?S2(y):[],...t?S2(t):[]]:[];k.forEach(N=>{i&&N.addEventListener("scroll",a,{passive:!0}),s&&N.addEventListener("resize",a)});const m=y&&h?UAe(y,a):null;let x=-1,S=null;l&&(S=new ResizeObserver(N=>{let[L]=N;L&&L.target===y&&S&&t&&(S.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var I;(I=S)==null||I.observe(t)})),a()}),y&&!f&&S.observe(y),t&&S.observe(t));let b,w=f?B1(e):null;f&&_();function _(){const N=B1(e);w&&!nZ(w,N)&&a(),w=N,b=requestAnimationFrame(_)}return a(),()=>{var N;k.forEach(L=>{i&&L.removeEventListener("scroll",a),s&&L.removeEventListener("resize",a)}),m==null||m(),(N=S)==null||N.disconnect(),S=null,f&&cancelAnimationFrame(b)}}const WAe=wAe,ZAe=_Ae,XAe=MAe,KAe=CAe,YAe=xAe,kF=gAe,QAe=SAe,JAe=(e,t,a)=>{const o=new Map,i={platform:FAe,...a},s={...i.platform,_c:o};return kAe(e,t,{...i,platform:s})};var eTe=typeof document<"u",tTe=function(){},BI=eTe?p.useLayoutEffect:tTe;function iA(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let a,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==t.length)return!1;for(o=a;o--!==0;)if(!iA(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),a=i.length,a!==Object.keys(t).length)return!1;for(o=a;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=a;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!iA(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function aZ(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gF(e,t){const a=aZ(e);return Math.round(t*a)/a}function Tj(e){const t=p.useRef(e);return BI(()=>{t.current=e}),t}function nTe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:a="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:l}={},transform:h=!0,whileElementsMounted:f,open:y}=e,[k,m]=p.useState({x:0,y:0,strategy:a,placement:t,middlewareData:{},isPositioned:!1}),[x,S]=p.useState(o);iA(x,o)||S(o);const[b,w]=p.useState(null),[_,N]=p.useState(null),L=p.useCallback(T=>{T!==P.current&&(P.current=T,w(T))},[]),I=p.useCallback(T=>{T!==A.current&&(A.current=T,N(T))},[]),O=s||b,D=l||_,P=p.useRef(null),A=p.useRef(null),j=p.useRef(k),V=f!=null,K=Tj(f),q=Tj(i),B=Tj(y),F=p.useCallback(()=>{if(!P.current||!A.current)return;const T={placement:t,strategy:a,middleware:x};q.current&&(T.platform=q.current),JAe(P.current,A.current,T).then(G=>{const W={...G,isPositioned:B.current!==!1};J.current&&!iA(j.current,W)&&(j.current=W,Kd.flushSync(()=>{m(W)}))})},[x,t,a,q,B]);BI(()=>{y===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,m(T=>({...T,isPositioned:!1})))},[y]);const J=p.useRef(!1);BI(()=>(J.current=!0,()=>{J.current=!1}),[]),BI(()=>{if(O&&(P.current=O),D&&(A.current=D),O&&D){if(K.current)return K.current(O,D,F);F()}},[O,D,F,K,V]);const pe=p.useMemo(()=>({reference:P,floating:A,setReference:L,setFloating:I}),[L,I]),R=p.useMemo(()=>({reference:O,floating:D}),[O,D]),$=p.useMemo(()=>{const T={position:a,left:0,top:0};if(!R.floating)return T;const G=gF(R.floating,k.x),W=gF(R.floating,k.y);return h?{...T,transform:"translate("+G+"px, "+W+"px)",...aZ(R.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:G,top:W}},[a,h,R.floating,k.x,k.y]);return p.useMemo(()=>({...k,update:F,refs:pe,elements:R,floatingStyles:$}),[k,F,pe,R,$])}const aTe=e=>{function t(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){const{element:o,padding:i}=typeof e=="function"?e(a):e;return o&&t(o)?o.current!=null?kF({element:o.current,padding:i}).fn(a):{}:o?kF({element:o,padding:i}).fn(a):{}}}},oTe=(e,t)=>{const a=WAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},rTe=(e,t)=>{const a=ZAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},iTe=(e,t)=>({fn:QAe(e).fn,options:[e,t]}),cTe=(e,t)=>{const a=XAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},sTe=(e,t)=>{const a=KAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},lTe=(e,t)=>{const a=YAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},dTe=(e,t)=>{const a=aTe(e);return{name:a.name,fn:a.fn,options:[e,t]}};function uTe(e){const t=hTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(fTe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function hTe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=mTe(i),h=yTe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pTe=Symbol("radix.slottable");function fTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pTe}function yTe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function mTe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var vTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],kTe=vTe.reduce((e,t)=>{const a=uTe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),gTe="Arrow",oZ=p.forwardRef((e,t)=>{const{children:a,width:o=10,height:i=5,...s}=e;return M.jsx(kTe.svg,{...s,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?a:M.jsx("polygon",{points:"0,0 30,0 15,10"})})});oZ.displayName=gTe;var MTe=oZ;function xTe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,bTe(i,...t)]}function bTe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function wTe(e){const t=_Te(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(CTe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function _Te(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=LTe(i),h=NTe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var STe=Symbol("radix.slottable");function CTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===STe}function NTe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function LTe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var ETe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rZ=ETe.reduce((e,t)=>{const a=wTe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),vO="Popper",[iZ,Ti]=xTe(vO),[ITe,cZ]=iZ(vO),sZ=e=>{const{__scopePopper:t,children:a}=e,[o,i]=p.useState(null);return M.jsx(ITe,{scope:t,anchor:o,onAnchorChange:i,children:a})};sZ.displayName=vO;var lZ="PopperAnchor",dZ=p.forwardRef((e,t)=>{const{__scopePopper:a,virtualRef:o,...i}=e,s=cZ(lZ,a),l=p.useRef(null),h=ze(t,l),f=p.useRef(null);return p.useEffect(()=>{const y=f.current;f.current=(o==null?void 0:o.current)||l.current,y!==f.current&&s.onAnchorChange(f.current)}),o?null:M.jsx(rZ.div,{...i,ref:h})});dZ.displayName=lZ;var kO="PopperContent",[ATe,TTe]=iZ(kO),uZ=p.forwardRef((e,t)=>{var he,ve,me,ge,fe,ce;const{__scopePopper:a,side:o="bottom",sideOffset:i=0,align:s="center",alignOffset:l=0,arrowPadding:h=0,avoidCollisions:f=!0,collisionBoundary:y=[],collisionPadding:k=0,sticky:m="partial",hideWhenDetached:x=!1,updatePositionStrategy:S="optimized",onPlaced:b,...w}=e,_=cZ(kO,a),[N,L]=p.useState(null),I=ze(t,Ee=>L(Ee)),[O,D]=p.useState(null),P=SA(O),A=(P==null?void 0:P.width)??0,j=(P==null?void 0:P.height)??0,V=o+(s!=="center"?"-"+s:""),K=typeof k=="number"?k:{top:0,right:0,bottom:0,left:0,...k},q=Array.isArray(y)?y:[y],B=q.length>0,F={padding:K,boundary:q.filter($Te),altBoundary:B},{refs:J,floatingStyles:pe,placement:R,isPositioned:$,middlewareData:T}=nTe({strategy:"fixed",placement:V,whileElementsMounted:(...Ee)=>GAe(...Ee,{animationFrame:S==="always"}),elements:{reference:_.anchor},middleware:[oTe({mainAxis:i+j,alignmentAxis:l}),f&&rTe({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?iTe():void 0,...F}),f&&cTe({...F}),sTe({...F,apply:({elements:Ee,rects:$e,availableWidth:st,availableHeight:Ve})=>{const{width:tt,height:ot}=$e.reference,Ye=Ee.floating.style;Ye.setProperty("--radix-popper-available-width",`${st}px`),Ye.setProperty("--radix-popper-available-height",`${Ve}px`),Ye.setProperty("--radix-popper-anchor-width",`${tt}px`),Ye.setProperty("--radix-popper-anchor-height",`${ot}px`)}}),O&&dTe({element:O,padding:h}),jTe({arrowWidth:A,arrowHeight:j}),x&&lTe({strategy:"referenceHidden",...F})]}),[G,W]=fZ(R),Me=Zn(b);St(()=>{$&&(Me==null||Me())},[$,Me]);const X=(he=T.arrow)==null?void 0:he.x,ne=(ve=T.arrow)==null?void 0:ve.y,le=((me=T.arrow)==null?void 0:me.centerOffset)!==0,[ie,ye]=p.useState();return St(()=>{N&&ye(window.getComputedStyle(N).zIndex)},[N]),M.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...pe,transform:$?pe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(ge=T.transformOrigin)==null?void 0:ge.x,(fe=T.transformOrigin)==null?void 0:fe.y].join(" "),...((ce=T.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:M.jsx(ATe,{scope:a,placedSide:G,onArrowChange:D,arrowX:X,arrowY:ne,shouldHideArrow:le,children:M.jsx(rZ.div,{"data-side":G,"data-align":W,...w,ref:I,style:{...w.style,animation:$?void 0:"none"}})})})});uZ.displayName=kO;var hZ="PopperArrow",RTe={top:"bottom",right:"left",bottom:"top",left:"right"},pZ=p.forwardRef(function(t,a){const{__scopePopper:o,...i}=t,s=TTe(hZ,o),l=RTe[s.placedSide];return M.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:M.jsx(MTe,{...i,ref:a,style:{...i.style,display:"block"}})})});pZ.displayName=hZ;function $Te(e){return e!==null}var jTe=e=>({name:"transformOrigin",options:e,fn(t){var _,N,L;const{placement:a,rects:o,middlewareData:i}=t,l=((_=i.arrow)==null?void 0:_.centerOffset)!==0,h=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[y,k]=fZ(a),m={start:"0%",center:"50%",end:"100%"}[k],x=(((N=i.arrow)==null?void 0:N.x)??0)+h/2,S=(((L=i.arrow)==null?void 0:L.y)??0)+f/2;let b="",w="";return y==="bottom"?(b=l?m:`${x}px`,w=`${-f}px`):y==="top"?(b=l?m:`${x}px`,w=`${o.floating.height+f}px`):y==="right"?(b=`${-f}px`,w=l?m:`${S}px`):y==="left"&&(b=`${o.floating.width+f}px`,w=l?m:`${S}px`),{data:{x:b,y:w}}}});function fZ(e){const[t,a="center"]=e.split("-");return[t,a]}var F2=sZ,U2=dZ,DA=uZ,zA=pZ;function yZ(e){const t=PTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(DTe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function PTe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=qTe(i),h=zTe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var OTe=Symbol("radix.slottable");function DTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===OTe}function zTe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function qTe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var HTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],iu=HTe.reduce((e,t)=>{const a=yZ(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function VTe(e,t){e&&Kd.flushSync(()=>e.dispatchEvent(t))}var BTe="Portal",mZ=p.forwardRef((e,t)=>{var h;const{container:a,...o}=e,[i,s]=p.useState(!1);St(()=>s(!0),[]);const l=a||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return l?ur.createPortal(M.jsx(iu.div,{...o,ref:t}),l):null});mZ.displayName=BTe;function FTe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,UTe(i,...t)]}function UTe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function GTe(e){const t=WTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(XTe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function WTe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=YTe(i),h=KTe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ZTe=Symbol("radix.slottable");function XTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ZTe}function KTe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function YTe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var QTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vZ=QTe.reduce((e,t)=>{const a=GTe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Rj="rovingFocusGroup.onEntryFocus",JTe={bubbles:!1,cancelable:!0},G2="RovingFocusGroup",[rP,kZ,eRe]=H2(G2),[tRe,qA]=FTe(G2,[eRe]),[nRe,aRe]=tRe(G2),gZ=p.forwardRef((e,t)=>M.jsx(rP.Provider,{scope:e.__scopeRovingFocusGroup,children:M.jsx(rP.Slot,{scope:e.__scopeRovingFocusGroup,children:M.jsx(oRe,{...e,ref:t})})}));gZ.displayName=G2;var oRe=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:a,orientation:o,loop:i=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:f,onEntryFocus:y,preventScrollOnEntryFocus:k=!1,...m}=e,x=p.useRef(null),S=ze(t,x),b=V2(s),[w,_]=bn({prop:l,defaultProp:h??null,onChange:f,caller:G2}),[N,L]=p.useState(!1),I=Zn(y),O=kZ(a),D=p.useRef(!1),[P,A]=p.useState(0);return p.useEffect(()=>{const j=x.current;if(j)return j.addEventListener(Rj,I),()=>j.removeEventListener(Rj,I)},[I]),M.jsx(nRe,{scope:a,orientation:o,dir:b,loop:i,currentTabStopId:w,onItemFocus:p.useCallback(j=>_(j),[_]),onItemShiftTab:p.useCallback(()=>L(!0),[]),onFocusableItemAdd:p.useCallback(()=>A(j=>j+1),[]),onFocusableItemRemove:p.useCallback(()=>A(j=>j-1),[]),children:M.jsx(vZ.div,{tabIndex:N||P===0?-1:0,"data-orientation":o,...m,ref:S,style:{outline:"none",...e.style},onMouseDown:xe(e.onMouseDown,()=>{D.current=!0}),onFocus:xe(e.onFocus,j=>{const V=!D.current;if(j.target===j.currentTarget&&V&&!N){const K=new CustomEvent(Rj,JTe);if(j.currentTarget.dispatchEvent(K),!K.defaultPrevented){const q=O().filter(R=>R.focusable),B=q.find(R=>R.active),F=q.find(R=>R.id===w),pe=[B,F,...q].filter(Boolean).map(R=>R.ref.current);bZ(pe,k)}}D.current=!1}),onBlur:xe(e.onBlur,()=>L(!1))})})}),MZ="RovingFocusGroupItem",xZ=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:a,focusable:o=!0,active:i=!1,tabStopId:s,children:l,...h}=e,f=It(),y=s||f,k=aRe(MZ,a),m=k.currentTabStopId===y,x=kZ(a),{onFocusableItemAdd:S,onFocusableItemRemove:b,currentTabStopId:w}=k;return p.useEffect(()=>{if(o)return S(),()=>b()},[o,S,b]),M.jsx(rP.ItemSlot,{scope:a,id:y,focusable:o,active:i,children:M.jsx(vZ.span,{tabIndex:m?0:-1,"data-orientation":k.orientation,...h,ref:t,onMouseDown:xe(e.onMouseDown,_=>{o?k.onItemFocus(y):_.preventDefault()}),onFocus:xe(e.onFocus,()=>k.onItemFocus(y)),onKeyDown:xe(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){k.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const N=cRe(_,k.orientation,k.dir);if(N!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let I=x().filter(O=>O.focusable).map(O=>O.ref.current);if(N==="last")I.reverse();else if(N==="prev"||N==="next"){N==="prev"&&I.reverse();const O=I.indexOf(_.currentTarget);I=k.loop?sRe(I,O+1):I.slice(O+1)}setTimeout(()=>bZ(I))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:w!=null}):l})})});xZ.displayName=MZ;var rRe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iRe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cRe(e,t,a){const o=iRe(e.key,a);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return rRe[o]}function bZ(e,t=!1){const a=document.activeElement;for(const o of e)if(o===a||(o.focus({preventScroll:t}),document.activeElement!==a))return}function sRe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var wZ=gZ,_Z=xZ,iP=["Enter"," "],lRe=["ArrowDown","PageUp","Home"],SZ=["ArrowUp","PageDown","End"],dRe=[...lRe,...SZ],uRe={ltr:[...iP,"ArrowRight"],rtl:[...iP,"ArrowLeft"]},hRe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},W2="Menu",[C2,pRe,fRe]=H2(W2),[X1,Z2]=oAe(W2,[fRe,Ti,qA]),X2=Ti(),CZ=qA(),[NZ,Ri]=X1(W2),[yRe,K2]=X1(W2),LZ=e=>{const{__scopeMenu:t,open:a=!1,children:o,dir:i,onOpenChange:s,modal:l=!0}=e,h=X2(t),[f,y]=p.useState(null),k=p.useRef(!1),m=Zn(s),x=V2(i);return p.useEffect(()=>{const S=()=>{k.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>k.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),M.jsx(F2,{...h,children:M.jsx(NZ,{scope:t,open:a,onOpenChange:m,content:f,onContentChange:y,children:M.jsx(yRe,{scope:t,onClose:p.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:k,dir:x,modal:l,children:o})})})};LZ.displayName=W2;var mRe="MenuAnchor",gO=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e,i=X2(a);return M.jsx(U2,{...i,...o,ref:t})});gO.displayName=mRe;var MO="MenuPortal",[vRe,EZ]=X1(MO,{forceMount:void 0}),IZ=e=>{const{__scopeMenu:t,forceMount:a,children:o,container:i}=e,s=Ri(MO,t);return M.jsx(vRe,{scope:t,forceMount:a,children:M.jsx(Pn,{present:a||s.open,children:M.jsx(mZ,{asChild:!0,container:i,children:o})})})};IZ.displayName=MO;var da="MenuContent",[kRe,xO]=X1(da),AZ=p.forwardRef((e,t)=>{const a=EZ(da,e.__scopeMenu),{forceMount:o=a.forceMount,...i}=e,s=Ri(da,e.__scopeMenu),l=K2(da,e.__scopeMenu);return M.jsx(C2.Provider,{scope:e.__scopeMenu,children:M.jsx(Pn,{present:o||s.open,children:M.jsx(C2.Slot,{scope:e.__scopeMenu,children:l.modal?M.jsx(gRe,{...i,ref:t}):M.jsx(MRe,{...i,ref:t})})})})}),gRe=p.forwardRef((e,t)=>{const a=Ri(da,e.__scopeMenu),o=p.useRef(null),i=ze(t,o);return p.useEffect(()=>{const s=o.current;if(s)return IA(s)},[]),M.jsx(bO,{...e,ref:i,trapFocus:a.open,disableOutsidePointerEvents:a.open,disableOutsideScroll:!0,onFocusOutside:xe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>a.onOpenChange(!1)})}),MRe=p.forwardRef((e,t)=>{const a=Ri(da,e.__scopeMenu);return M.jsx(bO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>a.onOpenChange(!1)})}),xRe=yZ("MenuContent.ScrollLock"),bO=p.forwardRef((e,t)=>{const{__scopeMenu:a,loop:o=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:h,onEntryFocus:f,onEscapeKeyDown:y,onPointerDownOutside:k,onFocusOutside:m,onInteractOutside:x,onDismiss:S,disableOutsideScroll:b,...w}=e,_=Ri(da,a),N=K2(da,a),L=X2(a),I=CZ(a),O=pRe(a),[D,P]=p.useState(null),A=p.useRef(null),j=ze(t,A,_.onContentChange),V=p.useRef(0),K=p.useRef(""),q=p.useRef(0),B=p.useRef(null),F=p.useRef("right"),J=p.useRef(0),pe=b?z2:p.Fragment,R=b?{as:xRe,allowPinchZoom:!0}:void 0,$=G=>{var he,ve;const W=K.current+G,Me=O().filter(me=>!me.disabled),X=document.activeElement,ne=(he=Me.find(me=>me.ref.current===X))==null?void 0:he.textValue,le=Me.map(me=>me.textValue),ie=RRe(le,W,ne),ye=(ve=Me.find(me=>me.textValue===ie))==null?void 0:ve.ref.current;(function me(ge){K.current=ge,window.clearTimeout(V.current),ge!==""&&(V.current=window.setTimeout(()=>me(""),1e3))})(W),ye&&setTimeout(()=>ye.focus())};p.useEffect(()=>()=>window.clearTimeout(V.current),[]),LA();const T=p.useCallback(G=>{var Me,X;return F.current===((Me=B.current)==null?void 0:Me.side)&&jRe(G,(X=B.current)==null?void 0:X.area)},[]);return M.jsx(kRe,{scope:a,searchRef:K,onItemEnter:p.useCallback(G=>{T(G)&&G.preventDefault()},[T]),onItemLeave:p.useCallback(G=>{var W;T(G)||((W=A.current)==null||W.focus(),P(null))},[T]),onTriggerLeave:p.useCallback(G=>{T(G)&&G.preventDefault()},[T]),pointerGraceTimerRef:q,onPointerGraceIntentChange:p.useCallback(G=>{B.current=G},[]),children:M.jsx(pe,{...R,children:M.jsx(D2,{asChild:!0,trapped:i,onMountAutoFocus:xe(s,G=>{var W;G.preventDefault(),(W=A.current)==null||W.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:M.jsx(nu,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:y,onPointerDownOutside:k,onFocusOutside:m,onInteractOutside:x,onDismiss:S,children:M.jsx(wZ,{asChild:!0,...I,dir:N.dir,orientation:"vertical",loop:o,currentTabStopId:D,onCurrentTabStopIdChange:P,onEntryFocus:xe(f,G=>{N.isUsingKeyboardRef.current||G.preventDefault()}),preventScrollOnEntryFocus:!0,children:M.jsx(DA,{role:"menu","aria-orientation":"vertical","data-state":ZZ(_.open),"data-radix-menu-content":"",dir:N.dir,...L,...w,ref:j,style:{outline:"none",...w.style},onKeyDown:xe(w.onKeyDown,G=>{const Me=G.target.closest("[data-radix-menu-content]")===G.currentTarget,X=G.ctrlKey||G.altKey||G.metaKey,ne=G.key.length===1;Me&&(G.key==="Tab"&&G.preventDefault(),!X&&ne&&$(G.key));const le=A.current;if(G.target!==le||!dRe.includes(G.key))return;G.preventDefault();const ye=O().filter(he=>!he.disabled).map(he=>he.ref.current);SZ.includes(G.key)&&ye.reverse(),ARe(ye)}),onBlur:xe(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(V.current),K.current="")}),onPointerMove:xe(e.onPointerMove,N2(G=>{const W=G.target,Me=J.current!==G.clientX;if(G.currentTarget.contains(W)&&Me){const X=G.clientX>J.current?"right":"left";F.current=X,J.current=G.clientX}}))})})})})})})});AZ.displayName=da;var bRe="MenuGroup",wO=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e;return M.jsx(iu.div,{role:"group",...o,ref:t})});wO.displayName=bRe;var wRe="MenuLabel",TZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e;return M.jsx(iu.div,{...o,ref:t})});TZ.displayName=wRe;var cA="MenuItem",MF="menu.itemSelect",HA=p.forwardRef((e,t)=>{const{disabled:a=!1,onSelect:o,...i}=e,s=p.useRef(null),l=K2(cA,e.__scopeMenu),h=xO(cA,e.__scopeMenu),f=ze(t,s),y=p.useRef(!1),k=()=>{const m=s.current;if(!a&&m){const x=new CustomEvent(MF,{bubbles:!0,cancelable:!0});m.addEventListener(MF,S=>o==null?void 0:o(S),{once:!0}),VTe(m,x),x.defaultPrevented?y.current=!1:l.onClose()}};return M.jsx(RZ,{...i,ref:f,disabled:a,onClick:xe(e.onClick,k),onPointerDown:m=>{var x;(x=e.onPointerDown)==null||x.call(e,m),y.current=!0},onPointerUp:xe(e.onPointerUp,m=>{var x;y.current||(x=m.currentTarget)==null||x.click()}),onKeyDown:xe(e.onKeyDown,m=>{const x=h.searchRef.current!=="";a||x&&m.key===" "||iP.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});HA.displayName=cA;var RZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,disabled:o=!1,textValue:i,...s}=e,l=xO(cA,a),h=CZ(a),f=p.useRef(null),y=ze(t,f),[k,m]=p.useState(!1),[x,S]=p.useState("");return p.useEffect(()=>{const b=f.current;b&&S((b.textContent??"").trim())},[s.children]),M.jsx(C2.ItemSlot,{scope:a,disabled:o,textValue:i??x,children:M.jsx(_Z,{asChild:!0,...h,focusable:!o,children:M.jsx(iu.div,{role:"menuitem","data-highlighted":k?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:y,onPointerMove:xe(e.onPointerMove,N2(b=>{o?l.onItemLeave(b):(l.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:xe(e.onPointerLeave,N2(b=>l.onItemLeave(b))),onFocus:xe(e.onFocus,()=>m(!0)),onBlur:xe(e.onBlur,()=>m(!1))})})})}),_Re="MenuCheckboxItem",$Z=p.forwardRef((e,t)=>{const{checked:a=!1,onCheckedChange:o,...i}=e;return M.jsx(zZ,{scope:e.__scopeMenu,checked:a,children:M.jsx(HA,{role:"menuitemcheckbox","aria-checked":sA(a)?"mixed":a,...i,ref:t,"data-state":CO(a),onSelect:xe(i.onSelect,()=>o==null?void 0:o(sA(a)?!0:!a),{checkForDefaultPrevented:!1})})})});$Z.displayName=_Re;var jZ="MenuRadioGroup",[SRe,CRe]=X1(jZ,{value:void 0,onValueChange:()=>{}}),PZ=p.forwardRef((e,t)=>{const{value:a,onValueChange:o,...i}=e,s=Zn(o);return M.jsx(SRe,{scope:e.__scopeMenu,value:a,onValueChange:s,children:M.jsx(wO,{...i,ref:t})})});PZ.displayName=jZ;var OZ="MenuRadioItem",DZ=p.forwardRef((e,t)=>{const{value:a,...o}=e,i=CRe(OZ,e.__scopeMenu),s=a===i.value;return M.jsx(zZ,{scope:e.__scopeMenu,checked:s,children:M.jsx(HA,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":CO(s),onSelect:xe(o.onSelect,()=>{var l;return(l=i.onValueChange)==null?void 0:l.call(i,a)},{checkForDefaultPrevented:!1})})})});DZ.displayName=OZ;var _O="MenuItemIndicator",[zZ,NRe]=X1(_O,{checked:!1}),qZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,forceMount:o,...i}=e,s=NRe(_O,a);return M.jsx(Pn,{present:o||sA(s.checked)||s.checked===!0,children:M.jsx(iu.span,{...i,ref:t,"data-state":CO(s.checked)})})});qZ.displayName=_O;var LRe="MenuSeparator",HZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e;return M.jsx(iu.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});HZ.displayName=LRe;var ERe="MenuArrow",VZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e,i=X2(a);return M.jsx(zA,{...i,...o,ref:t})});VZ.displayName=ERe;var SO="MenuSub",[IRe,BZ]=X1(SO),FZ=e=>{const{__scopeMenu:t,children:a,open:o=!1,onOpenChange:i}=e,s=Ri(SO,t),l=X2(t),[h,f]=p.useState(null),[y,k]=p.useState(null),m=Zn(i);return p.useEffect(()=>(s.open===!1&&m(!1),()=>m(!1)),[s.open,m]),M.jsx(F2,{...l,children:M.jsx(NZ,{scope:t,open:o,onOpenChange:m,content:y,onContentChange:k,children:M.jsx(IRe,{scope:t,contentId:It(),triggerId:It(),trigger:h,onTriggerChange:f,children:a})})})};FZ.displayName=SO;var u2="MenuSubTrigger",UZ=p.forwardRef((e,t)=>{const a=Ri(u2,e.__scopeMenu),o=K2(u2,e.__scopeMenu),i=BZ(u2,e.__scopeMenu),s=xO(u2,e.__scopeMenu),l=p.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:f}=s,y={__scopeMenu:e.__scopeMenu},k=p.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return p.useEffect(()=>k,[k]),p.useEffect(()=>{const m=h.current;return()=>{window.clearTimeout(m),f(null)}},[h,f]),M.jsx(gO,{asChild:!0,...y,children:M.jsx(RZ,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":i.contentId,"data-state":ZZ(a.open),...e,ref:kt(t,i.onTriggerChange),onClick:m=>{var x;(x=e.onClick)==null||x.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),a.open||a.onOpenChange(!0))},onPointerMove:xe(e.onPointerMove,N2(m=>{s.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!a.open&&!l.current&&(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{a.onOpenChange(!0),k()},100))})),onPointerLeave:xe(e.onPointerLeave,N2(m=>{var S,b;k();const x=(S=a.content)==null?void 0:S.getBoundingClientRect();if(x){const w=(b=a.content)==null?void 0:b.dataset.side,_=w==="right",N=_?-5:5,L=x[_?"left":"right"],I=x[_?"right":"left"];s.onPointerGraceIntentChange({area:[{x:m.clientX+N,y:m.clientY},{x:L,y:x.top},{x:I,y:x.top},{x:I,y:x.bottom},{x:L,y:x.bottom}],side:w}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(m),m.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:xe(e.onKeyDown,m=>{var S;const x=s.searchRef.current!=="";e.disabled||x&&m.key===" "||uRe[o.dir].includes(m.key)&&(a.onOpenChange(!0),(S=a.content)==null||S.focus(),m.preventDefault())})})})});UZ.displayName=u2;var GZ="MenuSubContent",WZ=p.forwardRef((e,t)=>{const a=EZ(da,e.__scopeMenu),{forceMount:o=a.forceMount,...i}=e,s=Ri(da,e.__scopeMenu),l=K2(da,e.__scopeMenu),h=BZ(GZ,e.__scopeMenu),f=p.useRef(null),y=ze(t,f);return M.jsx(C2.Provider,{scope:e.__scopeMenu,children:M.jsx(Pn,{present:o||s.open,children:M.jsx(C2.Slot,{scope:e.__scopeMenu,children:M.jsx(bO,{id:h.contentId,"aria-labelledby":h.triggerId,...i,ref:y,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:k=>{var m;l.isUsingKeyboardRef.current&&((m=f.current)==null||m.focus()),k.preventDefault()},onCloseAutoFocus:k=>k.preventDefault(),onFocusOutside:xe(e.onFocusOutside,k=>{k.target!==h.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:xe(e.onEscapeKeyDown,k=>{l.onClose(),k.preventDefault()}),onKeyDown:xe(e.onKeyDown,k=>{var S;const m=k.currentTarget.contains(k.target),x=hRe[l.dir].includes(k.key);m&&x&&(s.onOpenChange(!1),(S=h.trigger)==null||S.focus(),k.preventDefault())})})})})})});WZ.displayName=GZ;function ZZ(e){return e?"open":"closed"}function sA(e){return e==="indeterminate"}function CO(e){return sA(e)?"indeterminate":e?"checked":"unchecked"}function ARe(e){const t=document.activeElement;for(const a of e)if(a===t||(a.focus(),document.activeElement!==t))return}function TRe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}function RRe(e,t,a){const i=t.length>1&&Array.from(t).every(y=>y===t[0])?t[0]:t,s=a?e.indexOf(a):-1;let l=TRe(e,Math.max(s,0));i.length===1&&(l=l.filter(y=>y!==a));const f=l.find(y=>y.toLowerCase().startsWith(i.toLowerCase()));return f!==a?f:void 0}function $Re(e,t){const{x:a,y:o}=e;let i=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const h=t[s],f=t[l],y=h.x,k=h.y,m=f.x,x=f.y;k>o!=x>o&&a<(m-y)*(o-k)/(x-k)+y&&(i=!i)}return i}function jRe(e,t){if(!t)return!1;const a={x:e.clientX,y:e.clientY};return $Re(a,t)}function N2(e){return t=>t.pointerType==="mouse"?e(t):void 0}var NO=LZ,LO=gO,EO=IZ,IO=AZ,AO=wO,TO=TZ,RO=HA,$O=$Z,jO=PZ,PO=DZ,OO=qZ,DO=HZ,zO=VZ,qO=FZ,HO=UZ,VO=WZ,BO="ContextMenu",[PRe]=HIe(BO,[Z2]),hn=Z2(),[ORe,XZ]=PRe(BO),KZ=e=>{const{__scopeContextMenu:t,children:a,onOpenChange:o,dir:i,modal:s=!0}=e,[l,h]=p.useState(!1),f=hn(t),y=Zn(o),k=p.useCallback(m=>{h(m),y(m)},[y]);return M.jsx(ORe,{scope:t,open:l,onOpenChange:k,modal:s,children:M.jsx(NO,{...f,dir:i,open:l,onOpenChange:k,modal:s,children:a})})};KZ.displayName=BO;var YZ="ContextMenuTrigger",QZ=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,disabled:o=!1,...i}=e,s=XZ(YZ,a),l=hn(a),h=p.useRef({x:0,y:0}),f=p.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...h.current})}),y=p.useRef(0),k=p.useCallback(()=>window.clearTimeout(y.current),[]),m=x=>{h.current={x:x.clientX,y:x.clientY},s.onOpenChange(!0)};return p.useEffect(()=>k,[k]),p.useEffect(()=>void(o&&k()),[o,k]),M.jsxs(M.Fragment,{children:[M.jsx(LO,{...l,virtualRef:f}),M.jsx(KIe.span,{"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,...i,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:o?e.onContextMenu:xe(e.onContextMenu,x=>{k(),m(x),x.preventDefault()}),onPointerDown:o?e.onPointerDown:xe(e.onPointerDown,Ch(x=>{k(),y.current=window.setTimeout(()=>m(x),700)})),onPointerMove:o?e.onPointerMove:xe(e.onPointerMove,Ch(k)),onPointerCancel:o?e.onPointerCancel:xe(e.onPointerCancel,Ch(k)),onPointerUp:o?e.onPointerUp:xe(e.onPointerUp,Ch(k))})]})});QZ.displayName=YZ;var DRe="ContextMenuPortal",JZ=e=>{const{__scopeContextMenu:t,...a}=e,o=hn(t);return M.jsx(EO,{...o,...a})};JZ.displayName=DRe;var eX="ContextMenuContent",tX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=XZ(eX,a),s=hn(a),l=p.useRef(!1);return M.jsx(IO,{...s,...o,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:h=>{var f;(f=e.onCloseAutoFocus)==null||f.call(e,h),!h.defaultPrevented&&l.current&&h.preventDefault(),l.current=!1},onInteractOutside:h=>{var f;(f=e.onInteractOutside)==null||f.call(e,h),!h.defaultPrevented&&!i.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)"}})});tX.displayName=eX;var zRe="ContextMenuGroup",nX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(AO,{...i,...o,ref:t})});nX.displayName=zRe;var qRe="ContextMenuLabel",aX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(TO,{...i,...o,ref:t})});aX.displayName=qRe;var HRe="ContextMenuItem",oX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(RO,{...i,...o,ref:t})});oX.displayName=HRe;var VRe="ContextMenuCheckboxItem",rX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx($O,{...i,...o,ref:t})});rX.displayName=VRe;var BRe="ContextMenuRadioGroup",iX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(jO,{...i,...o,ref:t})});iX.displayName=BRe;var FRe="ContextMenuRadioItem",cX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(PO,{...i,...o,ref:t})});cX.displayName=FRe;var URe="ContextMenuItemIndicator",sX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(OO,{...i,...o,ref:t})});sX.displayName=URe;var GRe="ContextMenuSeparator",lX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(DO,{...i,...o,ref:t})});lX.displayName=GRe;var WRe="ContextMenuArrow",ZRe=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(zO,{...i,...o,ref:t})});ZRe.displayName=WRe;var dX="ContextMenuSub",uX=e=>{const{__scopeContextMenu:t,children:a,onOpenChange:o,open:i,defaultOpen:s}=e,l=hn(t),[h,f]=bn({prop:i,defaultProp:s??!1,onChange:o,caller:dX});return M.jsx(qO,{...l,open:h,onOpenChange:f,children:a})};uX.displayName=dX;var XRe="ContextMenuSubTrigger",hX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(HO,{...i,...o,ref:t})});hX.displayName=XRe;var KRe="ContextMenuSubContent",pX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(VO,{...i,...o,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)"}})});pX.displayName=KRe;function Ch(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var YRe=KZ,QRe=QZ,fX=JZ,JRe=tX,e$e=nX,t$e=aX,n$e=oX,a$e=rX,o$e=iX,r$e=cX,yX=sX,i$e=lX,c$e=uX,s$e=hX,l$e=pX;function d$e({...e}){return M.jsx(YRe,{"data-slot":"context-menu",...e})}function u$e({...e}){return M.jsx(QRe,{"data-slot":"context-menu-trigger",...e})}function h$e({...e}){return M.jsx(e$e,{"data-slot":"context-menu-group",...e})}function p$e({...e}){return M.jsx(fX,{"data-slot":"context-menu-portal",...e})}function f$e({...e}){return M.jsx(c$e,{"data-slot":"context-menu-sub",...e})}function y$e({...e}){return M.jsx(o$e,{"data-slot":"context-menu-radio-group",...e})}function m$e({className:e,inset:t,children:a,...o}){return M.jsxs(s$e,{"data-slot":"context-menu-sub-trigger","data-inset":t,className:ee("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[a,M.jsx(lr,{className:"ml-auto"})]})}function v$e({className:e,...t}){return M.jsx(l$e,{"data-slot":"context-menu-sub-content",className:ee("bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}function k$e({className:e,...t}){return M.jsx(fX,{children:M.jsx(JRe,{"data-slot":"context-menu-content",className:ee("bg-popover text-popover-foreground 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 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...t})})}function g$e({className:e,inset:t,variant:a="default",...o}){return M.jsx(n$e,{"data-slot":"context-menu-item","data-inset":t,"data-variant":a,className:ee("focus:bg-accent focus:text-accent-foreground 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 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function M$e({className:e,children:t,checked:a,...o}){return M.jsxs(a$e,{"data-slot":"context-menu-checkbox-item",className:ee("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:a,...o,children:[M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(yX,{children:M.jsx(sr,{className:"size-4"})})}),t]})}function x$e({className:e,children:t,...a}){return M.jsxs(r$e,{"data-slot":"context-menu-radio-item",className:ee("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a,children:[M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(yX,{children:M.jsx(O1,{className:"size-2 fill-current"})})}),t]})}function b$e({className:e,inset:t,...a}){return M.jsx(t$e,{"data-slot":"context-menu-label","data-inset":t,className:ee("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...a})}function w$e({className:e,...t}){return M.jsx(i$e,{"data-slot":"context-menu-separator",className:ee("bg-border -mx-1 my-1 h-px",e),...t})}function _$e({className:e,...t}){return M.jsx("span",{"data-slot":"context-menu-shortcut",className:ee("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}var S$e="Portal",mX=p.forwardRef((e,t)=>{var h;const{container:a,...o}=e,[i,s]=p.useState(!1);St(()=>s(!0),[]);const l=a||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return l?ur.createPortal(M.jsx(jn.div,{...o,ref:t}),l):null});mX.displayName=S$e;var vX=mX;const Ei=p.createContext({activeIndex:0,setActiveIndex:()=>{},totalDialogs:0,setTotalDialogs:()=>{},isOpen:!1,setIsOpen:()=>{},clickable:!1,shouldAnimate:!1,setShouldAnimate:()=>{},closeDialog:()=>{}}),kX=p.forwardRef(({children:e,className:t,open:a=!1,onOpenChange:o,clickable:i=!1,...s},l)=>{const[h,f]=p.useState(0),[y,k]=p.useState(a),[m,x]=p.useState(!1),[S,b]=p.useState(0),w=_=>{_===h&&(h>0?f(N=>N-1):k(!1))};return p.useImperativeHandle(l,()=>({open:()=>{k(!0)},close:()=>{k(!1),f(0)},closeAll:()=>{k(!1),f(0)},next:()=>{f(_=>_+1)},prev:()=>{f(_=>_>0?_-1:0)},goTo:_=>{_>=0&&_<S&&f(_)},closeCurrent:()=>w(h),isOpen:y,activeIndex:h,totalDialogs:S}),[h,S,y]),p.useEffect(()=>{const _=document.documentElement;return y?(_.style.overflow="hidden",x(!0)):_.style.overflow="",o==null||o(y),()=>{_.style.overflow=""}},[y,o]),M.jsx(Ei.Provider,{value:{activeIndex:h,setActiveIndex:f,totalDialogs:S,setTotalDialogs:b,isOpen:y,setIsOpen:k,clickable:i,shouldAnimate:m,setShouldAnimate:x,closeDialog:w},children:M.jsx("div",{className:t,...s,children:e})})});kX.displayName="DialogStack";const C$e=({children:e,className:t,onClick:a,asChild:o,...i})=>{const s=p.useContext(Ei);if(!s)throw new Error("DialogStackTrigger must be used within a DialogStack");const l=h=>{s.setIsOpen(!0),a==null||a(h)};return o&&p.isValidElement(e)?p.cloneElement(e,{onClick:l,className:ee(t,e.props.className),...i}):M.jsx("button",{onClick:l,className:ee("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm","ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","bg-primary text-primary-foreground hover:bg-primary/90","h-10 px-4 py-2",t),...i,children:e})},N$e=({className:e,...t})=>{const a=p.useContext(Ei);if(!a)throw new Error("DialogStackOverlay must be used within a DialogStack");return a.isOpen?M.jsx("div",{className:ee("fixed inset-0 z-[1001] bg-black/80 backdrop-blur-sm","data-[state=closed]:animate-out data-[state=open]:animate-in","data-[state=closed]:fade-out-0 slide-in-from-right-1/2 data-[state=open]:fade-in-0",e),onClick:()=>{a.activeIndex===0?a.setIsOpen(!1):a.setActiveIndex(a.activeIndex-1)},...t}):null},L$e=({children:e,className:t,...a})=>{const o=p.useContext(Ei),i=p.Children.count(e),[s,l]=p.useState(i);if(p.useEffect(()=>{l(i)},[i]),!o)throw new Error("DialogStackBody must be used within a DialogStack");return o.isOpen?M.jsx(Ei.Provider,{value:{...o,totalDialogs:s,setTotalDialogs:l},children:M.jsx(vX,{children:M.jsx("div",{className:ee("pointer-events-none fixed z-[1002] w-full max-w-full md:max-w-[67%] right-0 top-0 md:top-[1vh]",t),...a,children:p.Children.map(e,(h,f)=>p.isValidElement(h)?p.cloneElement(h,{index:f}):h)})})}):null},E$e=({children:e,className:t,index:a=0,offset:o=20,...i})=>{const s=p.useContext(Ei),[l,h]=p.useState(!1),f=p.useRef(null),y=p.useRef(!1);if(!s)throw new Error("DialogStackContent must be used within a DialogStack");if(!s.isOpen)return null;const k=()=>{s.setIsOpen(!1),s.setActiveIndex(0)},m=()=>{if(y.current){y.current=!1;return}s.closeDialog(a)},x=()=>{y.current=!1,h(!0),f.current=setTimeout(()=>{y.current=!0,h(!1),k()},600)},S=()=>{f.current&&(clearTimeout(f.current),f.current=null),h(!1)},b=L=>{L.stopPropagation(),s.clickable&&s.activeIndex>a&&s.setActiveIndex(a??0)},w=a-s.activeIndex,_=w<0?`-${Math.abs(w)*o}px`:"0",N=a===0&&s.activeIndex===0&&s.shouldAnimate;return p.useEffect(()=>{if(N){const L=setTimeout(()=>{s.setShouldAnimate(!1)},200);return()=>clearTimeout(L)}},[N]),M.jsxs("div",{onClick:b,className:ee("h-[100vh] md:h-[98vh] w-full md:rounded-l-md border bg-background shadow-lg md:transition-all duration-200",N&&"animate-in slide-in-from-right-1/2",w<0&&"brightness-75 blur-[2px]",t),style:{top:0,marginLeft:`${_}`,marginTop:`${window.innerWidth>768?Math.abs(w)*10:0}px`,width:w<0?`calc(100% + ${Math.abs(w)*o}px)`:"100%",zIndex:w<0?50-Math.abs(s.activeIndex-(a??0)):1002,position:w?"absolute":"relative",opacity:w>0?0:1,pointerEvents:w>0?"none":"auto",cursor:s.clickable&&s.activeIndex>a?"pointer":"default"},...i,children:[M.jsx("div",{className:ee("h-full w-full overflow-y-auto p-6 transition-all duration-200",s.activeIndex!==a&&"pointer-events-none select-none"),children:e}),s.activeIndex===a&&M.jsx(vX,{children:M.jsx(bA,{variant:"ghost",className:ee("fixed z-[1100] top-4 right-4 p-1 size-8 transition-all",l&&"bg-destructive/20 scale-110"),onClick:m,onPointerDown:x,onPointerUp:S,onPointerLeave:S,onPointerCancel:S,"aria-label":"Close",title:s.totalDialogs>1?"Click to close, hold to close all":"Close",children:M.jsx(bi,{})})})]})},I$e=({children:e,className:t,...a})=>M.jsx("h2",{className:ee("font-semibold text-lg leading-none tracking-tight",t),...a,children:e}),A$e=({children:e,className:t,...a})=>M.jsx("p",{className:ee("text-muted-foreground text-sm",t),...a,children:e}),T$e=({className:e,...t})=>M.jsx("div",{className:ee("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),R$e=({children:e,className:t,...a})=>M.jsx("div",{className:ee("flex items-center justify-end space-x-2 pt-4",t),...a,children:e}),$$e=({children:e,className:t,asChild:a,...o})=>{const i=p.useContext(Ei);if(!i)throw new Error("DialogStackNext must be used within a DialogStack");const s=()=>{i.activeIndex<i.totalDialogs-1&&i.setActiveIndex(i.activeIndex+1)};return a&&p.isValidElement(e)?p.cloneElement(e,{onClick:s,className:ee(t,e.props.className),...o}):M.jsx("button",{type:"button",onClick:s,className:ee("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",t),disabled:i.activeIndex>=i.totalDialogs-1,...o,children:e||"Next"})},j$e=({children:e,className:t,asChild:a,...o})=>{const i=p.useContext(Ei);if(!i)throw new Error("DialogStackPrevious must be used within a DialogStack");const s=()=>{i.activeIndex>0&&i.setActiveIndex(i.activeIndex-1)};return a&&p.isValidElement(e)?p.cloneElement(e,{onClick:s,className:ee(t,e.props.className),...o}):M.jsx("button",{type:"button",onClick:s,className:ee("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",t),disabled:i.activeIndex<=0,...o,children:e||"Previous"})};function P$e(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,O$e(i,...t)]}function O$e(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function D$e(e){const t=z$e(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(H$e);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function z$e(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=B$e(i),h=V$e(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var q$e=Symbol("radix.slottable");function H$e(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===q$e}function V$e(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function B$e(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var F$e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],U$e=F$e.reduce((e,t)=>{const a=D$e(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),VA="DropdownMenu",[G$e]=P$e(VA,[Z2]),pn=Z2(),[W$e,gX]=G$e(VA),MX=e=>{const{__scopeDropdownMenu:t,children:a,dir:o,open:i,defaultOpen:s,onOpenChange:l,modal:h=!0}=e,f=pn(t),y=p.useRef(null),[k,m]=bn({prop:i,defaultProp:s??!1,onChange:l,caller:VA});return M.jsx(W$e,{scope:t,triggerId:It(),triggerRef:y,contentId:It(),open:k,onOpenChange:m,onOpenToggle:p.useCallback(()=>m(x=>!x),[m]),modal:h,children:M.jsx(NO,{...f,open:k,onOpenChange:m,dir:o,modal:h,children:a})})};MX.displayName=VA;var xX="DropdownMenuTrigger",bX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,disabled:o=!1,...i}=e,s=gX(xX,a),l=pn(a);return M.jsx(LO,{asChild:!0,...l,children:M.jsx(U$e.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":o?"":void 0,disabled:o,...i,ref:kt(t,s.triggerRef),onPointerDown:xe(e.onPointerDown,h=>{!o&&h.button===0&&h.ctrlKey===!1&&(s.onOpenToggle(),s.open||h.preventDefault())}),onKeyDown:xe(e.onKeyDown,h=>{o||(["Enter"," "].includes(h.key)&&s.onOpenToggle(),h.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});bX.displayName=xX;var Z$e="DropdownMenuPortal",wX=e=>{const{__scopeDropdownMenu:t,...a}=e,o=pn(t);return M.jsx(EO,{...o,...a})};wX.displayName=Z$e;var _X="DropdownMenuContent",SX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=gX(_X,a),s=pn(a),l=p.useRef(!1);return M.jsx(IO,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...o,ref:t,onCloseAutoFocus:xe(e.onCloseAutoFocus,h=>{var f;l.current||(f=i.triggerRef.current)==null||f.focus(),l.current=!1,h.preventDefault()}),onInteractOutside:xe(e.onInteractOutside,h=>{const f=h.detail.originalEvent,y=f.button===0&&f.ctrlKey===!0,k=f.button===2||y;(!i.modal||k)&&(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)"}})});SX.displayName=_X;var X$e="DropdownMenuGroup",CX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(AO,{...i,...o,ref:t})});CX.displayName=X$e;var K$e="DropdownMenuLabel",NX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(TO,{...i,...o,ref:t})});NX.displayName=K$e;var Y$e="DropdownMenuItem",LX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(RO,{...i,...o,ref:t})});LX.displayName=Y$e;var Q$e="DropdownMenuCheckboxItem",EX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx($O,{...i,...o,ref:t})});EX.displayName=Q$e;var J$e="DropdownMenuRadioGroup",IX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(jO,{...i,...o,ref:t})});IX.displayName=J$e;var eje="DropdownMenuRadioItem",AX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(PO,{...i,...o,ref:t})});AX.displayName=eje;var tje="DropdownMenuItemIndicator",TX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(OO,{...i,...o,ref:t})});TX.displayName=tje;var nje="DropdownMenuSeparator",RX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(DO,{...i,...o,ref:t})});RX.displayName=nje;var aje="DropdownMenuArrow",oje=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(zO,{...i,...o,ref:t})});oje.displayName=aje;var rje=e=>{const{__scopeDropdownMenu:t,children:a,open:o,onOpenChange:i,defaultOpen:s}=e,l=pn(t),[h,f]=bn({prop:o,defaultProp:s??!1,onChange:i,caller:"DropdownMenuSub"});return M.jsx(qO,{...l,open:h,onOpenChange:f,children:a})},ije="DropdownMenuSubTrigger",$X=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(HO,{...i,...o,ref:t})});$X.displayName=ije;var cje="DropdownMenuSubContent",jX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(VO,{...i,...o,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)"}})});jX.displayName=cje;var sje=MX,lje=bX,PX=wX,dje=SX,uje=CX,hje=NX,pje=LX,fje=EX,yje=IX,mje=AX,OX=TX,vje=RX,kje=rje,gje=$X,Mje=jX;function xje({...e}){return M.jsx(sje,{"data-slot":"dropdown-menu",...e})}function bje({...e}){return M.jsx(PX,{"data-slot":"dropdown-menu-portal",...e})}function wje({...e}){return M.jsx(lje,{"data-slot":"dropdown-menu-trigger",...e})}function _je({className:e,sideOffset:t=4,...a}){return M.jsx(PX,{children:M.jsx(dje,{"data-slot":"dropdown-menu-content",sideOffset:t,className:ee("bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...a})})}function Sje({...e}){return M.jsx(uje,{"data-slot":"dropdown-menu-group",...e})}function Cje({className:e,inset:t,variant:a="default",...o}){return M.jsx(pje,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":a,className:ee("focus:bg-accent focus:text-accent-foreground 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 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function Nje({className:e,children:t,checked:a,...o}){return M.jsxs(fje,{"data-slot":"dropdown-menu-checkbox-item",className:ee("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:a,...o,children:[M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(OX,{children:M.jsx(sr,{className:"size-4"})})}),t]})}function Lje({...e}){return M.jsx(yje,{"data-slot":"dropdown-menu-radio-group",...e})}function Eje({className:e,children:t,...a}){return M.jsxs(mje,{"data-slot":"dropdown-menu-radio-item",className:ee("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a,children:[M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(OX,{children:M.jsx(O1,{className:"size-2 fill-current"})})}),t]})}function Ije({className:e,inset:t,...a}){return M.jsx(hje,{"data-slot":"dropdown-menu-label","data-inset":t,className:ee("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...a})}function Aje({className:e,...t}){return M.jsx(vje,{"data-slot":"dropdown-menu-separator",className:ee("bg-border -mx-1 my-1 h-px",e),...t})}function Tje({className:e,...t}){return M.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:ee("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function Rje({...e}){return M.jsx(kje,{"data-slot":"dropdown-menu-sub",...e})}function $je({className:e,inset:t,children:a,...o}){return M.jsxs(gje,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:ee("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...o,children:[a,M.jsx(lr,{className:"ml-auto size-4"})]})}function jje({className:e,...t}){return M.jsx(Mje,{"data-slot":"dropdown-menu-sub-content",className:ee("bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}function DX({className:e,type:t,...a}){return M.jsx("input",{type:t,"data-slot":"input",className:ee("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:[&::-webkit-calendar-picker-indicator]:invert",e),...a})}var Pje="Label",zX=p.forwardRef((e,t)=>M.jsx(jn.label,{...e,ref:t,onMouseDown:a=>{var i;a.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));zX.displayName=Pje;var Oje=zX;function Dje({className:e,...t}){return M.jsx(Oje,{"data-slot":"label",className:ee("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function zje(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,qje(i,...t)]}function qje(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function Hje(e){const t=Vje(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(Fje);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function Vje(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=Gje(i),h=Uje(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Bje=Symbol("radix.slottable");function Fje(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Bje}function Uje(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function Gje(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var Wje=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qX=Wje.reduce((e,t)=>{const a=Hje(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Y2="Menubar",[cP,Zje,Xje]=H2(Y2),[HX]=zje(Y2,[Xje,qA]),fn=Z2(),VX=qA(),[Kje,FO]=HX(Y2),BX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,value:o,onValueChange:i,defaultValue:s,loop:l=!0,dir:h,...f}=e,y=V2(h),k=VX(a),[m,x]=bn({prop:o,onChange:i,defaultProp:s??"",caller:Y2}),[S,b]=p.useState(null);return M.jsx(Kje,{scope:a,value:m,onMenuOpen:p.useCallback(w=>{x(w),b(w)},[x]),onMenuClose:p.useCallback(()=>x(""),[x]),onMenuToggle:p.useCallback(w=>{x(_=>_?"":w),b(w)},[x]),dir:y,loop:l,children:M.jsx(cP.Provider,{scope:a,children:M.jsx(cP.Slot,{scope:a,children:M.jsx(wZ,{asChild:!0,...k,orientation:"horizontal",loop:l,dir:y,currentTabStopId:S,onCurrentTabStopIdChange:b,children:M.jsx(qX.div,{role:"menubar",...f,ref:t})})})})})});BX.displayName=Y2;var UO="MenubarMenu",[Yje,FX]=HX(UO),UX=e=>{const{__scopeMenubar:t,value:a,...o}=e,i=It(),s=a||i||"LEGACY_REACT_AUTO_VALUE",l=FO(UO,t),h=fn(t),f=p.useRef(null),y=p.useRef(!1),k=l.value===s;return p.useEffect(()=>{k||(y.current=!1)},[k]),M.jsx(Yje,{scope:t,value:s,triggerId:It(),triggerRef:f,contentId:It(),wasKeyboardTriggerOpenRef:y,children:M.jsx(NO,{...h,open:k,onOpenChange:m=>{m||l.onMenuClose()},modal:!1,dir:l.dir,...o})})};UX.displayName=UO;var sP="MenubarTrigger",GX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,disabled:o=!1,...i}=e,s=VX(a),l=fn(a),h=FO(sP,a),f=FX(sP,a),y=p.useRef(null),k=ze(t,y,f.triggerRef),[m,x]=p.useState(!1),S=h.value===f.value;return M.jsx(cP.ItemSlot,{scope:a,value:f.value,disabled:o,children:M.jsx(_Z,{asChild:!0,...s,focusable:!o,tabStopId:f.value,children:M.jsx(LO,{asChild:!0,...l,children:M.jsx(qX.button,{type:"button",role:"menuitem",id:f.triggerId,"aria-haspopup":"menu","aria-expanded":S,"aria-controls":S?f.contentId:void 0,"data-highlighted":m?"":void 0,"data-state":S?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:k,onPointerDown:xe(e.onPointerDown,b=>{!o&&b.button===0&&b.ctrlKey===!1&&(h.onMenuOpen(f.value),S||b.preventDefault())}),onPointerEnter:xe(e.onPointerEnter,()=>{var w;!!h.value&&!S&&(h.onMenuOpen(f.value),(w=y.current)==null||w.focus())}),onKeyDown:xe(e.onKeyDown,b=>{o||(["Enter"," "].includes(b.key)&&h.onMenuToggle(f.value),b.key==="ArrowDown"&&h.onMenuOpen(f.value),["Enter"," ","ArrowDown"].includes(b.key)&&(f.wasKeyboardTriggerOpenRef.current=!0,b.preventDefault()))}),onFocus:xe(e.onFocus,()=>x(!0)),onBlur:xe(e.onBlur,()=>x(!1))})})})})});GX.displayName=sP;var Qje="MenubarPortal",WX=e=>{const{__scopeMenubar:t,...a}=e,o=fn(t);return M.jsx(EO,{...o,...a})};WX.displayName=Qje;var lP="MenubarContent",ZX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,align:o="start",...i}=e,s=fn(a),l=FO(lP,a),h=FX(lP,a),f=Zje(a),y=p.useRef(!1);return M.jsx(IO,{id:h.contentId,"aria-labelledby":h.triggerId,"data-radix-menubar-content":"",...s,...i,ref:t,align:o,onCloseAutoFocus:xe(e.onCloseAutoFocus,k=>{var x;!!!l.value&&!y.current&&((x=h.triggerRef.current)==null||x.focus()),y.current=!1,k.preventDefault()}),onFocusOutside:xe(e.onFocusOutside,k=>{const m=k.target;f().some(S=>{var b;return(b=S.ref.current)==null?void 0:b.contains(m)})&&k.preventDefault()}),onInteractOutside:xe(e.onInteractOutside,()=>{y.current=!0}),onEntryFocus:k=>{h.wasKeyboardTriggerOpenRef.current||k.preventDefault()},onKeyDown:xe(e.onKeyDown,k=>{if(["ArrowRight","ArrowLeft"].includes(k.key)){const m=k.target,x=m.hasAttribute("data-radix-menubar-subtrigger"),S=m.closest("[data-radix-menubar-content]")!==k.currentTarget,w=(l.dir==="rtl"?"ArrowRight":"ArrowLeft")===k.key;if(!w&&x||S&&w)return;let L=f().filter(D=>!D.disabled).map(D=>D.value);w&&L.reverse();const I=L.indexOf(h.value);L=l.loop?uPe(L,I+1):L.slice(I+1);const[O]=L;O&&l.onMenuOpen(O)}},{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)"}})});ZX.displayName=lP;var Jje="MenubarGroup",XX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(AO,{...i,...o,ref:t})});XX.displayName=Jje;var ePe="MenubarLabel",KX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(TO,{...i,...o,ref:t})});KX.displayName=ePe;var tPe="MenubarItem",YX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(RO,{...i,...o,ref:t})});YX.displayName=tPe;var nPe="MenubarCheckboxItem",QX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx($O,{...i,...o,ref:t})});QX.displayName=nPe;var aPe="MenubarRadioGroup",JX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(jO,{...i,...o,ref:t})});JX.displayName=aPe;var oPe="MenubarRadioItem",eK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(PO,{...i,...o,ref:t})});eK.displayName=oPe;var rPe="MenubarItemIndicator",tK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(OO,{...i,...o,ref:t})});tK.displayName=rPe;var iPe="MenubarSeparator",nK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(DO,{...i,...o,ref:t})});nK.displayName=iPe;var cPe="MenubarArrow",sPe=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(zO,{...i,...o,ref:t})});sPe.displayName=cPe;var aK="MenubarSub",oK=e=>{const{__scopeMenubar:t,children:a,open:o,onOpenChange:i,defaultOpen:s}=e,l=fn(t),[h,f]=bn({prop:o,defaultProp:s??!1,onChange:i,caller:aK});return M.jsx(qO,{...l,open:h,onOpenChange:f,children:a})};oK.displayName=aK;var lPe="MenubarSubTrigger",rK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(HO,{"data-radix-menubar-subtrigger":"",...i,...o,ref:t})});rK.displayName=lPe;var dPe="MenubarSubContent",iK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(VO,{...i,"data-radix-menubar-content":"",...o,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)"}})});iK.displayName=dPe;function uPe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var hPe=BX,pPe=UX,fPe=GX,yPe=WX,mPe=ZX,vPe=XX,kPe=KX,gPe=YX,MPe=QX,xPe=JX,bPe=eK,cK=tK,wPe=nK,_Pe=oK,SPe=rK,CPe=iK;function NPe({className:e,...t}){return M.jsx(hPe,{"data-slot":"menubar",className:ee("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",e),...t})}function LPe({...e}){return M.jsx(pPe,{"data-slot":"menubar-menu",...e})}function EPe({...e}){return M.jsx(vPe,{"data-slot":"menubar-group",...e})}function sK({...e}){return M.jsx(yPe,{"data-slot":"menubar-portal",...e})}function IPe({...e}){return M.jsx(xPe,{"data-slot":"menubar-radio-group",...e})}function APe({className:e,...t}){return M.jsx(fPe,{"data-slot":"menubar-trigger",className:ee("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",e),...t})}function TPe({className:e,align:t="start",alignOffset:a=-4,sideOffset:o=8,...i}){return M.jsx(sK,{children:M.jsx(mPe,{"data-slot":"menubar-content",align:t,alignOffset:a,sideOffset:o,className:ee("bg-popover text-popover-foreground data-[state=open]:animate-in 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 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",e),...i})})}function RPe({className:e,inset:t,variant:a="default",...o}){return M.jsx(gPe,{"data-slot":"menubar-item","data-inset":t,"data-variant":a,className:ee("focus:bg-accent focus:text-accent-foreground 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 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function $Pe({className:e,children:t,checked:a,...o}){return M.jsxs(MPe,{"data-slot":"menubar-checkbox-item",className:ee("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:a,...o,children:[M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(cK,{children:M.jsx(sr,{className:"size-4"})})}),t]})}function jPe({className:e,children:t,...a}){return M.jsxs(bPe,{"data-slot":"menubar-radio-item",className:ee("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a,children:[M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(cK,{children:M.jsx(O1,{className:"size-2 fill-current"})})}),t]})}function PPe({className:e,inset:t,...a}){return M.jsx(kPe,{"data-slot":"menubar-label","data-inset":t,className:ee("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...a})}function OPe({className:e,...t}){return M.jsx(wPe,{"data-slot":"menubar-separator",className:ee("bg-border -mx-1 my-1 h-px",e),...t})}function DPe({className:e,...t}){return M.jsx("span",{"data-slot":"menubar-shortcut",className:ee("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function zPe({...e}){return M.jsx(_Pe,{"data-slot":"menubar-sub",...e})}function qPe({className:e,inset:t,children:a,...o}){return M.jsxs(SPe,{"data-slot":"menubar-sub-trigger","data-inset":t,className:ee("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",e),...o,children:[a,M.jsx(lr,{className:"ml-auto h-4 w-4"})]})}function HPe({className:e,...t}){return M.jsx(CPe,{"data-slot":"menubar-sub-content",className:ee("bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}function VPe({className:e,...t}){return M.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:ee("mx-auto flex w-full justify-center",e),...t})}function BPe({className:e,...t}){return M.jsx("ul",{"data-slot":"pagination-content",className:ee("flex flex-row items-center gap-1",e),...t})}function FPe({...e}){return M.jsx("li",{"data-slot":"pagination-item",...e})}function GO({className:e,isActive:t,size:a="icon",...o}){return M.jsx("a",{"aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,className:ee(JI({variant:t?"outline":"ghost",size:a}),e),...o})}function UPe({className:e,label:t="Previous",...a}){return M.jsxs(GO,{"aria-label":t,size:"default",className:ee("gap-1 px-2.5 sm:pl-2.5",e),...a,children:[M.jsx(Hd,{}),M.jsx("span",{className:"hidden sm:block",children:t})]})}function GPe({className:e,label:t="Next",...a}){return M.jsxs(GO,{"aria-label":t,size:"default",className:ee("gap-1 px-2.5 sm:pr-2.5",e),...a,children:[M.jsx("span",{className:"hidden sm:block",children:t}),M.jsx(lr,{})]})}function WPe({className:e,...t}){return M.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:ee("flex size-9 items-center justify-center",e),...t,children:[M.jsx(Dr,{className:"size-4"}),M.jsx("span",{className:"sr-only",children:"More pages"})]})}function ZPe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,XPe(i,...t)]}function XPe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function lK(e){const t=KPe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(QPe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function KPe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=eOe(i),h=JPe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var YPe=Symbol("radix.slottable");function QPe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===YPe}function JPe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function eOe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var tOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],WO=tOe.reduce((e,t)=>{const a=lK(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),nOe="Portal",dK=p.forwardRef((e,t)=>{var h;const{container:a,...o}=e,[i,s]=p.useState(!1);St(()=>s(!0),[]);const l=a||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return l?ur.createPortal(M.jsx(WO.div,{...o,ref:t}),l):null});dK.displayName=nOe;var BA="Popover",[uK]=ZPe(BA,[Ti]),Q2=Ti(),[aOe,$i]=uK(BA),hK=e=>{const{__scopePopover:t,children:a,open:o,defaultOpen:i,onOpenChange:s,modal:l=!1}=e,h=Q2(t),f=p.useRef(null),[y,k]=p.useState(!1),[m,x]=bn({prop:o,defaultProp:i??!1,onChange:s,caller:BA});return M.jsx(F2,{...h,children:M.jsx(aOe,{scope:t,contentId:It(),triggerRef:f,open:m,onOpenChange:x,onOpenToggle:p.useCallback(()=>x(S=>!S),[x]),hasCustomAnchor:y,onCustomAnchorAdd:p.useCallback(()=>k(!0),[]),onCustomAnchorRemove:p.useCallback(()=>k(!1),[]),modal:l,children:a})})};hK.displayName=BA;var pK="PopoverAnchor",fK=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=$i(pK,a),s=Q2(a),{onCustomAnchorAdd:l,onCustomAnchorRemove:h}=i;return p.useEffect(()=>(l(),()=>h()),[l,h]),M.jsx(U2,{...s,...o,ref:t})});fK.displayName=pK;var yK="PopoverTrigger",mK=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=$i(yK,a),s=Q2(a),l=ze(t,i.triggerRef),h=M.jsx(WO.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":xK(i.open),...o,ref:l,onClick:xe(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?h:M.jsx(U2,{asChild:!0,...s,children:h})});mK.displayName=yK;var ZO="PopoverPortal",[oOe,rOe]=uK(ZO,{forceMount:void 0}),vK=e=>{const{__scopePopover:t,forceMount:a,children:o,container:i}=e,s=$i(ZO,t);return M.jsx(oOe,{scope:t,forceMount:a,children:M.jsx(Pn,{present:a||s.open,children:M.jsx(dK,{asChild:!0,container:i,children:o})})})};vK.displayName=ZO;var Zd="PopoverContent",kK=p.forwardRef((e,t)=>{const a=rOe(Zd,e.__scopePopover),{forceMount:o=a.forceMount,...i}=e,s=$i(Zd,e.__scopePopover);return M.jsx(Pn,{present:o||s.open,children:s.modal?M.jsx(cOe,{...i,ref:t}):M.jsx(sOe,{...i,ref:t})})});kK.displayName=Zd;var iOe=lK("PopoverContent.RemoveScroll"),cOe=p.forwardRef((e,t)=>{const a=$i(Zd,e.__scopePopover),o=p.useRef(null),i=ze(t,o),s=p.useRef(!1);return p.useEffect(()=>{const l=o.current;if(l)return IA(l)},[]),M.jsx(z2,{as:iOe,allowPinchZoom:!0,children:M.jsx(gK,{...e,ref:i,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xe(e.onCloseAutoFocus,l=>{var h;l.preventDefault(),s.current||(h=a.triggerRef.current)==null||h.focus()}),onPointerDownOutside:xe(e.onPointerDownOutside,l=>{const h=l.detail.originalEvent,f=h.button===0&&h.ctrlKey===!0,y=h.button===2||f;s.current=y},{checkForDefaultPrevented:!1}),onFocusOutside:xe(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),sOe=p.forwardRef((e,t)=>{const a=$i(Zd,e.__scopePopover),o=p.useRef(!1),i=p.useRef(!1);return M.jsx(gK,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,h;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(o.current||(h=a.triggerRef.current)==null||h.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{var f,y;(f=e.onInteractOutside)==null||f.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;((y=a.triggerRef.current)==null?void 0:y.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),gK=p.forwardRef((e,t)=>{const{__scopePopover:a,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:y,onInteractOutside:k,...m}=e,x=$i(Zd,a),S=Q2(a);return LA(),M.jsx(D2,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:M.jsx(nu,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:k,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:y,onDismiss:()=>x.onOpenChange(!1),children:M.jsx(DA,{"data-state":xK(x.open),role:"dialog",id:x.contentId,...S,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),MK="PopoverClose",lOe=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=$i(MK,a);return M.jsx(WO.button,{type:"button",...o,ref:t,onClick:xe(e.onClick,()=>i.onOpenChange(!1))})});lOe.displayName=MK;var dOe="PopoverArrow",uOe=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=Q2(a);return M.jsx(zA,{...i,...o,ref:t})});uOe.displayName=dOe;function xK(e){return e?"open":"closed"}var hOe=hK,pOe=fK,fOe=mK,yOe=vK,mOe=kK;function bK({...e}){return M.jsx(hOe,{"data-slot":"popover",...e})}function wK({...e}){return M.jsx(fOe,{"data-slot":"popover-trigger",...e})}function _K({className:e,align:t="center",sideOffset:a=4,...o}){return M.jsx(yOe,{children:M.jsx(mOe,{"data-slot":"popover-content",align:t,sideOffset:a,className:ee("bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}function vOe({...e}){return M.jsx(pOe,{"data-slot":"popover-anchor",...e})}function lA(e,[t,a]){return Math.min(a,Math.max(t,e))}function kOe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,gOe(i,...t)]}function gOe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function SK(e){const t=MOe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(bOe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function MOe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=_Oe(i),h=wOe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xOe=Symbol("radix.slottable");function bOe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xOe}function wOe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function _Oe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var SOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],On=SOe.reduce((e,t)=>{const a=SK(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),COe="Portal",CK=p.forwardRef((e,t)=>{var h;const{container:a,...o}=e,[i,s]=p.useState(!1);St(()=>s(!0),[]);const l=a||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return l?ur.createPortal(M.jsx(On.div,{...o,ref:t}),l):null});CK.displayName=COe;function NOe(e){const t=LOe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(IOe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function LOe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=TOe(i),h=AOe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var EOe=Symbol("radix.slottable");function IOe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===EOe}function AOe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function TOe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var ROe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$Oe=ROe.reduce((e,t)=>{const a=NOe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),NK=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),jOe="VisuallyHidden",LK=p.forwardRef((e,t)=>M.jsx($Oe.span,{...e,ref:t,style:{...NK,...e.style}}));LK.displayName=jOe;var POe=LK,OOe=[" ","Enter","ArrowUp","ArrowDown"],DOe=[" ","Enter"],F1="Select",[FA,UA,zOe]=H2(F1),[cu]=kOe(F1,[zOe,Ti]),GA=Ti(),[qOe,ji]=cu(F1),[HOe,VOe]=cu(F1),EK=e=>{const{__scopeSelect:t,children:a,open:o,defaultOpen:i,onOpenChange:s,value:l,defaultValue:h,onValueChange:f,dir:y,name:k,autoComplete:m,disabled:x,required:S,form:b}=e,w=GA(t),[_,N]=p.useState(null),[L,I]=p.useState(null),[O,D]=p.useState(!1),P=V2(y),[A,j]=bn({prop:o,defaultProp:i??!1,onChange:s,caller:F1}),[V,K]=bn({prop:l,defaultProp:h,onChange:f,caller:F1}),q=p.useRef(null),B=_?b||!!_.closest("form"):!0,[F,J]=p.useState(new Set),pe=Array.from(F).map(R=>R.props.value).join(";");return M.jsx(F2,{...w,children:M.jsxs(qOe,{required:S,scope:t,trigger:_,onTriggerChange:N,valueNode:L,onValueNodeChange:I,valueNodeHasChildren:O,onValueNodeHasChildrenChange:D,contentId:It(),value:V,onValueChange:K,open:A,onOpenChange:j,dir:P,triggerPointerDownPosRef:q,disabled:x,children:[M.jsx(FA.Provider,{scope:t,children:M.jsx(HOe,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(R=>{J($=>new Set($).add(R))},[]),onNativeOptionRemove:p.useCallback(R=>{J($=>{const T=new Set($);return T.delete(R),T})},[]),children:a})}),B?M.jsxs(eY,{"aria-hidden":!0,required:S,tabIndex:-1,name:k,autoComplete:m,value:V,onChange:R=>K(R.target.value),disabled:x,form:b,children:[V===void 0?M.jsx("option",{value:""}):null,Array.from(F)]},pe):null]})})};EK.displayName=F1;var IK="SelectTrigger",AK=p.forwardRef((e,t)=>{const{__scopeSelect:a,disabled:o=!1,...i}=e,s=GA(a),l=ji(IK,a),h=l.disabled||o,f=ze(t,l.onTriggerChange),y=UA(a),k=p.useRef("touch"),[m,x,S]=nY(w=>{const _=y().filter(I=>!I.disabled),N=_.find(I=>I.value===l.value),L=aY(_,w,N);L!==void 0&&l.onValueChange(L.value)}),b=w=>{h||(l.onOpenChange(!0),S()),w&&(l.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return M.jsx(U2,{asChild:!0,...s,children:M.jsx(On.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":tY(l.value)?"":void 0,...i,ref:f,onClick:xe(i.onClick,w=>{w.currentTarget.focus(),k.current!=="mouse"&&b(w)}),onPointerDown:xe(i.onPointerDown,w=>{k.current=w.pointerType;const _=w.target;_.hasPointerCapture(w.pointerId)&&_.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(b(w),w.preventDefault())}),onKeyDown:xe(i.onKeyDown,w=>{const _=m.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&x(w.key),!(_&&w.key===" ")&&OOe.includes(w.key)&&(b(),w.preventDefault())})})})});AK.displayName=IK;var TK="SelectValue",RK=p.forwardRef((e,t)=>{const{__scopeSelect:a,className:o,style:i,children:s,placeholder:l="",...h}=e,f=ji(TK,a),{onValueNodeHasChildrenChange:y}=f,k=s!==void 0,m=ze(t,f.onValueNodeChange);return St(()=>{y(k)},[y,k]),M.jsx(On.span,{...h,ref:m,style:{pointerEvents:"none"},children:tY(f.value)?M.jsx(M.Fragment,{children:l}):s})});RK.displayName=TK;var BOe="SelectIcon",$K=p.forwardRef((e,t)=>{const{__scopeSelect:a,children:o,...i}=e;return M.jsx(On.span,{"aria-hidden":!0,...i,ref:t,children:o||"▼"})});$K.displayName=BOe;var FOe="SelectPortal",jK=e=>M.jsx(CK,{asChild:!0,...e});jK.displayName=FOe;var U1="SelectContent",PK=p.forwardRef((e,t)=>{const a=ji(U1,e.__scopeSelect),[o,i]=p.useState();if(St(()=>{i(new DocumentFragment)},[]),!a.open){const s=o;return s?Kd.createPortal(M.jsx(OK,{scope:e.__scopeSelect,children:M.jsx(FA.Slot,{scope:e.__scopeSelect,children:M.jsx("div",{children:e.children})})}),s):null}return M.jsx(DK,{...e,ref:t})});PK.displayName=U1;var ka=10,[OK,Pi]=cu(U1),UOe="SelectContentImpl",GOe=SK("SelectContent.RemoveScroll"),DK=p.forwardRef((e,t)=>{const{__scopeSelect:a,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:l,side:h,sideOffset:f,align:y,alignOffset:k,arrowPadding:m,collisionBoundary:x,collisionPadding:S,sticky:b,hideWhenDetached:w,avoidCollisions:_,...N}=e,L=ji(U1,a),[I,O]=p.useState(null),[D,P]=p.useState(null),A=ze(t,he=>O(he)),[j,V]=p.useState(null),[K,q]=p.useState(null),B=UA(a),[F,J]=p.useState(!1),pe=p.useRef(!1);p.useEffect(()=>{if(I)return IA(I)},[I]),LA();const R=p.useCallback(he=>{const[ve,...me]=B().map(ce=>ce.ref.current),[ge]=me.slice(-1),fe=document.activeElement;for(const ce of he)if(ce===fe||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===ve&&D&&(D.scrollTop=0),ce===ge&&D&&(D.scrollTop=D.scrollHeight),ce==null||ce.focus(),document.activeElement!==fe))return},[B,D]),$=p.useCallback(()=>R([j,I]),[R,j,I]);p.useEffect(()=>{F&&$()},[F,$]);const{onOpenChange:T,triggerPointerDownPosRef:G}=L;p.useEffect(()=>{if(I){let he={x:0,y:0};const ve=ge=>{var fe,ce;he={x:Math.abs(Math.round(ge.pageX)-(((fe=G.current)==null?void 0:fe.x)??0)),y:Math.abs(Math.round(ge.pageY)-(((ce=G.current)==null?void 0:ce.y)??0))}},me=ge=>{he.x<=10&&he.y<=10?ge.preventDefault():I.contains(ge.target)||T(!1),document.removeEventListener("pointermove",ve),G.current=null};return G.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",me,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",me,{capture:!0})}}},[I,T,G]),p.useEffect(()=>{const he=()=>T(!1);return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[T]);const[W,Me]=nY(he=>{const ve=B().filter(fe=>!fe.disabled),me=ve.find(fe=>fe.ref.current===document.activeElement),ge=aY(ve,he,me);ge&&setTimeout(()=>ge.ref.current.focus())}),X=p.useCallback((he,ve,me)=>{const ge=!pe.current&&!me;(L.value!==void 0&&L.value===ve||ge)&&(V(he),ge&&(pe.current=!0))},[L.value]),ne=p.useCallback(()=>I==null?void 0:I.focus(),[I]),le=p.useCallback((he,ve,me)=>{const ge=!pe.current&&!me;(L.value!==void 0&&L.value===ve||ge)&&q(he)},[L.value]),ie=o==="popper"?dP:zK,ye=ie===dP?{side:h,sideOffset:f,align:y,alignOffset:k,arrowPadding:m,collisionBoundary:x,collisionPadding:S,sticky:b,hideWhenDetached:w,avoidCollisions:_}:{};return M.jsx(OK,{scope:a,content:I,viewport:D,onViewportChange:P,itemRefCallback:X,selectedItem:j,onItemLeave:ne,itemTextRefCallback:le,focusSelectedItem:$,selectedItemText:K,position:o,isPositioned:F,searchRef:W,children:M.jsx(z2,{as:GOe,allowPinchZoom:!0,children:M.jsx(D2,{asChild:!0,trapped:L.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:xe(i,he=>{var ve;(ve=L.trigger)==null||ve.focus({preventScroll:!0}),he.preventDefault()}),children:M.jsx(nu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>L.onOpenChange(!1),children:M.jsx(ie,{role:"listbox",id:L.contentId,"data-state":L.open?"open":"closed",dir:L.dir,onContextMenu:he=>he.preventDefault(),...N,...ye,onPlaced:()=>J(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:xe(N.onKeyDown,he=>{const ve=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!ve&&he.key.length===1&&Me(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let ge=B().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);if(["ArrowUp","End"].includes(he.key)&&(ge=ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const fe=he.target,ce=ge.indexOf(fe);ge=ge.slice(ce+1)}setTimeout(()=>R(ge)),he.preventDefault()}})})})})})})});DK.displayName=UOe;var WOe="SelectItemAlignedPosition",zK=p.forwardRef((e,t)=>{const{__scopeSelect:a,onPlaced:o,...i}=e,s=ji(U1,a),l=Pi(U1,a),[h,f]=p.useState(null),[y,k]=p.useState(null),m=ze(t,A=>k(A)),x=UA(a),S=p.useRef(!1),b=p.useRef(!0),{viewport:w,selectedItem:_,selectedItemText:N,focusSelectedItem:L}=l,I=p.useCallback(()=>{if(s.trigger&&s.valueNode&&h&&y&&w&&_&&N){const A=s.trigger.getBoundingClientRect(),j=y.getBoundingClientRect(),V=s.valueNode.getBoundingClientRect(),K=N.getBoundingClientRect();if(s.dir!=="rtl"){const fe=K.left-j.left,ce=V.left-fe,Ee=A.left-ce,$e=A.width+Ee,st=Math.max($e,j.width),Ve=window.innerWidth-ka,tt=lA(ce,[ka,Math.max(ka,Ve-st)]);h.style.minWidth=$e+"px",h.style.left=tt+"px"}else{const fe=j.right-K.right,ce=window.innerWidth-V.right-fe,Ee=window.innerWidth-A.right-ce,$e=A.width+Ee,st=Math.max($e,j.width),Ve=window.innerWidth-ka,tt=lA(ce,[ka,Math.max(ka,Ve-st)]);h.style.minWidth=$e+"px",h.style.right=tt+"px"}const q=x(),B=window.innerHeight-ka*2,F=w.scrollHeight,J=window.getComputedStyle(y),pe=parseInt(J.borderTopWidth,10),R=parseInt(J.paddingTop,10),$=parseInt(J.borderBottomWidth,10),T=parseInt(J.paddingBottom,10),G=pe+R+F+T+$,W=Math.min(_.offsetHeight*5,G),Me=window.getComputedStyle(w),X=parseInt(Me.paddingTop,10),ne=parseInt(Me.paddingBottom,10),le=A.top+A.height/2-ka,ie=B-le,ye=_.offsetHeight/2,he=_.offsetTop+ye,ve=pe+R+he,me=G-ve;if(ve<=le){const fe=q.length>0&&_===q[q.length-1].ref.current;h.style.bottom="0px";const ce=y.clientHeight-w.offsetTop-w.offsetHeight,Ee=Math.max(ie,ye+(fe?ne:0)+ce+$),$e=ve+Ee;h.style.height=$e+"px"}else{const fe=q.length>0&&_===q[0].ref.current;h.style.top="0px";const Ee=Math.max(le,pe+w.offsetTop+(fe?X:0)+ye)+me;h.style.height=Ee+"px",w.scrollTop=ve-le+w.offsetTop}h.style.margin=`${ka}px 0`,h.style.minHeight=W+"px",h.style.maxHeight=B+"px",o==null||o(),requestAnimationFrame(()=>S.current=!0)}},[x,s.trigger,s.valueNode,h,y,w,_,N,s.dir,o]);St(()=>I(),[I]);const[O,D]=p.useState();St(()=>{y&&D(window.getComputedStyle(y).zIndex)},[y]);const P=p.useCallback(A=>{A&&b.current===!0&&(I(),L==null||L(),b.current=!1)},[I,L]);return M.jsx(XOe,{scope:a,contentWrapper:h,shouldExpandOnScrollRef:S,onScrollButtonChange:P,children:M.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:M.jsx(On.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});zK.displayName=WOe;var ZOe="SelectPopperPosition",dP=p.forwardRef((e,t)=>{const{__scopeSelect:a,align:o="start",collisionPadding:i=ka,...s}=e,l=GA(a);return M.jsx(DA,{...l,...s,ref:t,align:o,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});dP.displayName=ZOe;var[XOe,XO]=cu(U1,{}),uP="SelectViewport",qK=p.forwardRef((e,t)=>{const{__scopeSelect:a,nonce:o,...i}=e,s=Pi(uP,a),l=XO(uP,a),h=ze(t,s.onViewportChange),f=p.useRef(0);return M.jsxs(M.Fragment,{children:[M.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),M.jsx(FA.Slot,{scope:a,children:M.jsx(On.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:xe(i.onScroll,y=>{const k=y.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:x}=l;if(x!=null&&x.current&&m){const S=Math.abs(f.current-k.scrollTop);if(S>0){const b=window.innerHeight-ka*2,w=parseFloat(m.style.minHeight),_=parseFloat(m.style.height),N=Math.max(w,_);if(N<b){const L=N+S,I=Math.min(b,L),O=L-I;m.style.height=I+"px",m.style.bottom==="0px"&&(k.scrollTop=O>0?O:0,m.style.justifyContent="flex-end")}}}f.current=k.scrollTop})})})]})});qK.displayName=uP;var HK="SelectGroup",[KOe,YOe]=cu(HK),VK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e,i=It();return M.jsx(KOe,{scope:a,id:i,children:M.jsx(On.div,{role:"group","aria-labelledby":i,...o,ref:t})})});VK.displayName=HK;var BK="SelectLabel",FK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e,i=YOe(BK,a);return M.jsx(On.div,{id:i.id,...o,ref:t})});FK.displayName=BK;var dA="SelectItem",[QOe,UK]=cu(dA),GK=p.forwardRef((e,t)=>{const{__scopeSelect:a,value:o,disabled:i=!1,textValue:s,...l}=e,h=ji(dA,a),f=Pi(dA,a),y=h.value===o,[k,m]=p.useState(s??""),[x,S]=p.useState(!1),b=ze(t,L=>{var I;return(I=f.itemRefCallback)==null?void 0:I.call(f,L,o,i)}),w=It(),_=p.useRef("touch"),N=()=>{i||(h.onValueChange(o),h.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return M.jsx(QOe,{scope:a,value:o,disabled:i,textId:w,isSelected:y,onItemTextChange:p.useCallback(L=>{m(I=>I||((L==null?void 0:L.textContent)??"").trim())},[]),children:M.jsx(FA.ItemSlot,{scope:a,value:o,disabled:i,textValue:k,children:M.jsx(On.div,{role:"option","aria-labelledby":w,"data-highlighted":x?"":void 0,"aria-selected":y&&x,"data-state":y?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:b,onFocus:xe(l.onFocus,()=>S(!0)),onBlur:xe(l.onBlur,()=>S(!1)),onClick:xe(l.onClick,()=>{_.current!=="mouse"&&N()}),onPointerUp:xe(l.onPointerUp,()=>{_.current==="mouse"&&N()}),onPointerDown:xe(l.onPointerDown,L=>{_.current=L.pointerType}),onPointerMove:xe(l.onPointerMove,L=>{var I;_.current=L.pointerType,i?(I=f.onItemLeave)==null||I.call(f):_.current==="mouse"&&L.currentTarget.focus({preventScroll:!0})}),onPointerLeave:xe(l.onPointerLeave,L=>{var I;L.currentTarget===document.activeElement&&((I=f.onItemLeave)==null||I.call(f))}),onKeyDown:xe(l.onKeyDown,L=>{var O;((O=f.searchRef)==null?void 0:O.current)!==""&&L.key===" "||(DOe.includes(L.key)&&N(),L.key===" "&&L.preventDefault())})})})})});GK.displayName=dA;var h2="SelectItemText",WK=p.forwardRef((e,t)=>{const{__scopeSelect:a,className:o,style:i,...s}=e,l=ji(h2,a),h=Pi(h2,a),f=UK(h2,a),y=VOe(h2,a),[k,m]=p.useState(null),x=ze(t,N=>m(N),f.onItemTextChange,N=>{var L;return(L=h.itemTextRefCallback)==null?void 0:L.call(h,N,f.value,f.disabled)}),S=k==null?void 0:k.textContent,b=p.useMemo(()=>M.jsx("option",{value:f.value,disabled:f.disabled,children:S},f.value),[f.disabled,f.value,S]),{onNativeOptionAdd:w,onNativeOptionRemove:_}=y;return St(()=>(w(b),()=>_(b)),[w,_,b]),M.jsxs(M.Fragment,{children:[M.jsx(On.span,{id:f.textId,...s,ref:x}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Kd.createPortal(s.children,l.valueNode):null]})});WK.displayName=h2;var ZK="SelectItemIndicator",XK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e;return UK(ZK,a).isSelected?M.jsx(On.span,{"aria-hidden":!0,...o,ref:t}):null});XK.displayName=ZK;var hP="SelectScrollUpButton",KK=p.forwardRef((e,t)=>{const a=Pi(hP,e.__scopeSelect),o=XO(hP,e.__scopeSelect),[i,s]=p.useState(!1),l=ze(t,o.onScrollButtonChange);return St(()=>{if(a.viewport&&a.isPositioned){let h=function(){const y=f.scrollTop>0;s(y)};const f=a.viewport;return h(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[a.viewport,a.isPositioned]),i?M.jsx(QK,{...e,ref:l,onAutoScroll:()=>{const{viewport:h,selectedItem:f}=a;h&&f&&(h.scrollTop=h.scrollTop-f.offsetHeight)}}):null});KK.displayName=hP;var pP="SelectScrollDownButton",YK=p.forwardRef((e,t)=>{const a=Pi(pP,e.__scopeSelect),o=XO(pP,e.__scopeSelect),[i,s]=p.useState(!1),l=ze(t,o.onScrollButtonChange);return St(()=>{if(a.viewport&&a.isPositioned){let h=function(){const y=f.scrollHeight-f.clientHeight,k=Math.ceil(f.scrollTop)<y;s(k)};const f=a.viewport;return h(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[a.viewport,a.isPositioned]),i?M.jsx(QK,{...e,ref:l,onAutoScroll:()=>{const{viewport:h,selectedItem:f}=a;h&&f&&(h.scrollTop=h.scrollTop+f.offsetHeight)}}):null});YK.displayName=pP;var QK=p.forwardRef((e,t)=>{const{__scopeSelect:a,onAutoScroll:o,...i}=e,s=Pi("SelectScrollButton",a),l=p.useRef(null),h=UA(a),f=p.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return p.useEffect(()=>()=>f(),[f]),St(()=>{var k;const y=h().find(m=>m.ref.current===document.activeElement);(k=y==null?void 0:y.ref.current)==null||k.scrollIntoView({block:"nearest"})},[h]),M.jsx(On.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:xe(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(o,50))}),onPointerMove:xe(i.onPointerMove,()=>{var y;(y=s.onItemLeave)==null||y.call(s),l.current===null&&(l.current=window.setInterval(o,50))}),onPointerLeave:xe(i.onPointerLeave,()=>{f()})})}),JOe="SelectSeparator",JK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e;return M.jsx(On.div,{"aria-hidden":!0,...o,ref:t})});JK.displayName=JOe;var fP="SelectArrow",eDe=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e,i=GA(a),s=ji(fP,a),l=Pi(fP,a);return s.open&&l.position==="popper"?M.jsx(zA,{...i,...o,ref:t}):null});eDe.displayName=fP;var tDe="SelectBubbleInput",eY=p.forwardRef(({__scopeSelect:e,value:t,...a},o)=>{const i=p.useRef(null),s=ze(o,i),l=_A(t);return p.useEffect(()=>{const h=i.current;if(!h)return;const f=window.HTMLSelectElement.prototype,k=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==t&&k){const m=new Event("change",{bubbles:!0});k.call(h,t),h.dispatchEvent(m)}},[l,t]),M.jsx(On.select,{...a,style:{...NK,...a.style},ref:s,defaultValue:t})});eY.displayName=tDe;function tY(e){return e===""||e===void 0}function nY(e){const t=Zn(e),a=p.useRef(""),o=p.useRef(0),i=p.useCallback(l=>{const h=a.current+l;t(h),(function f(y){a.current=y,window.clearTimeout(o.current),y!==""&&(o.current=window.setTimeout(()=>f(""),1e3))})(h)},[t]),s=p.useCallback(()=>{a.current="",window.clearTimeout(o.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(o.current),[]),[a,i,s]}function aY(e,t,a){const i=t.length>1&&Array.from(t).every(y=>y===t[0])?t[0]:t,s=a?e.indexOf(a):-1;let l=nDe(e,Math.max(s,0));i.length===1&&(l=l.filter(y=>y!==a));const f=l.find(y=>y.textValue.toLowerCase().startsWith(i.toLowerCase()));return f!==a?f:void 0}function nDe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var aDe=EK,oDe=AK,rDe=RK,iDe=$K,cDe=jK,sDe=PK,lDe=qK,dDe=VK,uDe=FK,hDe=GK,pDe=WK,fDe=XK,yDe=KK,mDe=YK,vDe=JK;function kDe({...e}){return M.jsx(aDe,{"data-slot":"select",...e})}function gDe({...e}){return M.jsx(dDe,{"data-slot":"select-group",...e})}function MDe({...e}){return M.jsx(rDe,{"data-slot":"select-value",...e})}function xDe({className:e,size:t="default",children:a,...o}){return M.jsxs(oDe,{"data-slot":"select-trigger","data-size":t,className:ee("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[a,M.jsx(iDe,{asChild:!0,children:M.jsx(xi,{className:"size-4 opacity-50"})})]})}function bDe({className:e,children:t,position:a="popper",...o}){return M.jsx(cDe,{children:M.jsxs(sDe,{"data-slot":"select-content",className:ee("bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...o,children:[M.jsx(oY,{}),M.jsx(lDe,{className:ee("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),M.jsx(rY,{})]})})}function wDe({className:e,...t}){return M.jsx(uDe,{"data-slot":"select-label",className:ee("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function _De({className:e,children:t,...a}){return M.jsxs(hDe,{"data-slot":"select-item",className:ee("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...a,children:[M.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:M.jsx(fDe,{children:M.jsx(sr,{className:"size-4"})})}),M.jsx(pDe,{children:t})]})}function SDe({className:e,...t}){return M.jsx(vDe,{"data-slot":"select-separator",className:ee("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function oY({className:e,...t}){return M.jsx(yDe,{"data-slot":"select-scroll-up-button",className:ee("flex cursor-default items-center justify-center py-1",e),...t,children:M.jsx(m2,{className:"size-4"})})}function rY({className:e,...t}){return M.jsx(mDe,{"data-slot":"select-scroll-down-button",className:ee("flex cursor-default items-center justify-center py-1",e),...t,children:M.jsx(xi,{className:"size-4"})})}var CDe="Separator",xF="horizontal",NDe=["horizontal","vertical"],iY=p.forwardRef((e,t)=>{const{decorative:a,orientation:o=xF,...i}=e,s=LDe(o)?o:xF,h=a?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return M.jsx(jn.div,{"data-orientation":s,...h,...i,ref:t})});iY.displayName=CDe;function LDe(e){return NDe.includes(e)}var EDe=iY;function KO({className:e,orientation:t="horizontal",decorative:a=!0,...o}){return M.jsx(EDe,{"data-slot":"separator-root",decorative:a,orientation:t,className:ee("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...o})}function cY({...e}){return M.jsx(rO,{"data-slot":"sheet",...e})}function IDe({...e}){return M.jsx(_W,{"data-slot":"sheet-trigger",...e})}function ADe({...e}){return M.jsx(TA,{"data-slot":"sheet-close",...e})}function TDe({...e}){return M.jsx(iO,{"data-slot":"sheet-portal",...e})}function RDe({className:e,...t}){return M.jsx(cO,{"data-slot":"sheet-overlay",className:ee("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1002] bg-black/50",e),...t})}function sY({className:e,children:t,side:a="right",...o}){return M.jsxs(TDe,{children:[M.jsx(RDe,{}),M.jsxs(sO,{"data-slot":"sheet-content",className:ee("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",a==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",a==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",a==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",a==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...o,children:[t,M.jsxs(TA,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[M.jsx(bi,{className:"size-4"}),M.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function lY({className:e,...t}){return M.jsx("div",{"data-slot":"sheet-header",className:ee("flex flex-col gap-1.5 p-4",e),...t})}function $De({className:e,...t}){return M.jsx("div",{"data-slot":"sheet-footer",className:ee("mt-auto flex flex-col gap-2 p-4",e),...t})}function dY({className:e,...t}){return M.jsx(SW,{"data-slot":"sheet-title",className:ee("text-foreground font-semibold",e),...t})}function uY({className:e,...t}){return M.jsx(CW,{"data-slot":"sheet-description",className:ee("text-muted-foreground text-sm",e),...t})}const $j=768;function jDe(){const[e,t]=p.useState(void 0);return p.useEffect(()=>{const a=window.matchMedia(`(max-width: ${$j-1}px)`),o=()=>{t(window.innerWidth<$j)};return a.addEventListener("change",o),t(window.innerWidth<$j),()=>a.removeEventListener("change",o)},[]),!!e}function yP({className:e,...t}){return M.jsx("div",{"data-slot":"skeleton",className:ee("bg-accent animate-pulse rounded-md",e),...t})}function PDe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,ODe(i,...t)]}function ODe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function DDe(e){const t=zDe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(HDe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function zDe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=BDe(i),h=VDe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hY=Symbol("radix.slottable");function qDe(e){const t=({children:a})=>M.jsx(M.Fragment,{children:a});return t.displayName=`${e}.Slottable`,t.__radixId=hY,t}function HDe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hY}function VDe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function BDe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var FDe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pY=FDe.reduce((e,t)=>{const a=DDe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),UDe="Portal",fY=p.forwardRef((e,t)=>{var h;const{container:a,...o}=e,[i,s]=p.useState(!1);St(()=>s(!0),[]);const l=a||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return l?ur.createPortal(M.jsx(pY.div,{...o,ref:t}),l):null});fY.displayName=UDe;var[WA]=PDe("Tooltip",[Ti]),ZA=Ti(),yY="TooltipProvider",GDe=700,mP="tooltip.open",[WDe,YO]=WA(yY),mY=e=>{const{__scopeTooltip:t,delayDuration:a=GDe,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:s}=e,l=p.useRef(!0),h=p.useRef(!1),f=p.useRef(0);return p.useEffect(()=>{const y=f.current;return()=>window.clearTimeout(y)},[]),M.jsx(WDe,{scope:t,isOpenDelayedRef:l,delayDuration:a,onOpen:p.useCallback(()=>{window.clearTimeout(f.current),l.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>l.current=!0,o)},[o]),isPointerInTransitRef:h,onPointerInTransitChange:p.useCallback(y=>{h.current=y},[]),disableHoverableContent:i,children:s})};mY.displayName=yY;var L2="Tooltip",[ZDe,J2]=WA(L2),vY=e=>{const{__scopeTooltip:t,children:a,open:o,defaultOpen:i,onOpenChange:s,disableHoverableContent:l,delayDuration:h}=e,f=YO(L2,e.__scopeTooltip),y=ZA(t),[k,m]=p.useState(null),x=It(),S=p.useRef(0),b=l??f.disableHoverableContent,w=h??f.delayDuration,_=p.useRef(!1),[N,L]=bn({prop:o,defaultProp:i??!1,onChange:A=>{A?(f.onOpen(),document.dispatchEvent(new CustomEvent(mP))):f.onClose(),s==null||s(A)},caller:L2}),I=p.useMemo(()=>N?_.current?"delayed-open":"instant-open":"closed",[N]),O=p.useCallback(()=>{window.clearTimeout(S.current),S.current=0,_.current=!1,L(!0)},[L]),D=p.useCallback(()=>{window.clearTimeout(S.current),S.current=0,L(!1)},[L]),P=p.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{_.current=!0,L(!0),S.current=0},w)},[w,L]);return p.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),M.jsx(F2,{...y,children:M.jsx(ZDe,{scope:t,contentId:x,open:N,stateAttribute:I,trigger:k,onTriggerChange:m,onTriggerEnter:p.useCallback(()=>{f.isOpenDelayedRef.current?P():O()},[f.isOpenDelayedRef,P,O]),onTriggerLeave:p.useCallback(()=>{b?D():(window.clearTimeout(S.current),S.current=0)},[D,b]),onOpen:O,onClose:D,disableHoverableContent:b,children:a})})};vY.displayName=L2;var vP="TooltipTrigger",kY=p.forwardRef((e,t)=>{const{__scopeTooltip:a,...o}=e,i=J2(vP,a),s=YO(vP,a),l=ZA(a),h=p.useRef(null),f=ze(t,h,i.onTriggerChange),y=p.useRef(!1),k=p.useRef(!1),m=p.useCallback(()=>y.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),M.jsx(U2,{asChild:!0,...l,children:M.jsx(pY.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:f,onPointerMove:xe(e.onPointerMove,x=>{x.pointerType!=="touch"&&!k.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),k.current=!0)}),onPointerLeave:xe(e.onPointerLeave,()=>{i.onTriggerLeave(),k.current=!1}),onPointerDown:xe(e.onPointerDown,()=>{i.open&&i.onClose(),y.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:xe(e.onFocus,()=>{y.current||i.onOpen()}),onBlur:xe(e.onBlur,i.onClose),onClick:xe(e.onClick,i.onClose)})})});kY.displayName=vP;var QO="TooltipPortal",[XDe,KDe]=WA(QO,{forceMount:void 0}),gY=e=>{const{__scopeTooltip:t,forceMount:a,children:o,container:i}=e,s=J2(QO,t);return M.jsx(XDe,{scope:t,forceMount:a,children:M.jsx(Pn,{present:a||s.open,children:M.jsx(fY,{asChild:!0,container:i,children:o})})})};gY.displayName=QO;var Xd="TooltipContent",MY=p.forwardRef((e,t)=>{const a=KDe(Xd,e.__scopeTooltip),{forceMount:o=a.forceMount,side:i="top",...s}=e,l=J2(Xd,e.__scopeTooltip);return M.jsx(Pn,{present:o||l.open,children:l.disableHoverableContent?M.jsx(xY,{side:i,...s,ref:t}):M.jsx(YDe,{side:i,...s,ref:t})})}),YDe=p.forwardRef((e,t)=>{const a=J2(Xd,e.__scopeTooltip),o=YO(Xd,e.__scopeTooltip),i=p.useRef(null),s=ze(t,i),[l,h]=p.useState(null),{trigger:f,onClose:y}=a,k=i.current,{onPointerInTransitChange:m}=o,x=p.useCallback(()=>{h(null),m(!1)},[m]),S=p.useCallback((b,w)=>{const _=b.currentTarget,N={x:b.clientX,y:b.clientY},L=tze(N,_.getBoundingClientRect()),I=nze(N,L),O=aze(w.getBoundingClientRect()),D=rze([...I,...O]);h(D),m(!0)},[m]);return p.useEffect(()=>()=>x(),[x]),p.useEffect(()=>{if(f&&k){const b=_=>S(_,k),w=_=>S(_,f);return f.addEventListener("pointerleave",b),k.addEventListener("pointerleave",w),()=>{f.removeEventListener("pointerleave",b),k.removeEventListener("pointerleave",w)}}},[f,k,S,x]),p.useEffect(()=>{if(l){const b=w=>{const _=w.target,N={x:w.clientX,y:w.clientY},L=(f==null?void 0:f.contains(_))||(k==null?void 0:k.contains(_)),I=!oze(N,l);L?x():I&&(x(),y())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[f,k,l,y,x]),M.jsx(xY,{...e,ref:s})}),[QDe,JDe]=WA(L2,{isInside:!1}),eze=qDe("TooltipContent"),xY=p.forwardRef((e,t)=>{const{__scopeTooltip:a,children:o,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:l,...h}=e,f=J2(Xd,a),y=ZA(a),{onClose:k}=f;return p.useEffect(()=>(document.addEventListener(mP,k),()=>document.removeEventListener(mP,k)),[k]),p.useEffect(()=>{if(f.trigger){const m=x=>{const S=x.target;S!=null&&S.contains(f.trigger)&&k()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[f.trigger,k]),M.jsx(nu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:k,children:M.jsxs(DA,{"data-state":f.stateAttribute,...y,...h,ref:t,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[M.jsx(eze,{children:o}),M.jsx(QDe,{scope:a,isInside:!0,children:M.jsx(POe,{id:f.contentId,role:"tooltip",children:i||o})})]})})});MY.displayName=Xd;var bY="TooltipArrow",wY=p.forwardRef((e,t)=>{const{__scopeTooltip:a,...o}=e,i=ZA(a);return JDe(bY,a).isInside?null:M.jsx(zA,{...i,...o,ref:t})});wY.displayName=bY;function tze(e,t){const a=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(a,o,i,s)){case s:return"left";case i:return"right";case a:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function nze(e,t,a=5){const o=[];switch(t){case"top":o.push({x:e.x-a,y:e.y+a},{x:e.x+a,y:e.y+a});break;case"bottom":o.push({x:e.x-a,y:e.y-a},{x:e.x+a,y:e.y-a});break;case"left":o.push({x:e.x+a,y:e.y-a},{x:e.x+a,y:e.y+a});break;case"right":o.push({x:e.x-a,y:e.y-a},{x:e.x-a,y:e.y+a});break}return o}function aze(e){const{top:t,right:a,bottom:o,left:i}=e;return[{x:i,y:t},{x:a,y:t},{x:a,y:o},{x:i,y:o}]}function oze(e,t){const{x:a,y:o}=e;let i=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const h=t[s],f=t[l],y=h.x,k=h.y,m=f.x,x=f.y;k>o!=x>o&&a<(m-y)*(o-k)/(x-k)+y&&(i=!i)}return i}function rze(e){const t=e.slice();return t.sort((a,o)=>a.x<o.x?-1:a.x>o.x?1:a.y<o.y?-1:a.y>o.y?1:0),ize(t)}function ize(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(i.y-l.y)>=(s.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const a=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;a.length>=2;){const s=a[a.length-1],l=a[a.length-2];if((s.x-l.x)*(i.y-l.y)>=(s.y-l.y)*(i.x-l.x))a.pop();else break}a.push(i)}return a.pop(),t.length===1&&a.length===1&&t[0].x===a[0].x&&t[0].y===a[0].y?t:t.concat(a)}var cze=mY,sze=vY,lze=kY,dze=gY,uze=MY,hze=wY;function JO({delayDuration:e=0,...t}){return M.jsx(cze,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function _Y({...e}){return M.jsx(JO,{children:M.jsx(sze,{"data-slot":"tooltip",...e})})}function SY({...e}){return M.jsx(lze,{"data-slot":"tooltip-trigger",...e})}function CY({className:e,sideOffset:t=0,children:a,...o}){return M.jsx(dze,{children:M.jsxs(uze,{"data-slot":"tooltip-content",sideOffset:t,className:ee("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...o,children:[a,M.jsx(hze,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const pze="sidebar_state",fze=3600*24*7,yze="16rem",mze="18rem",vze="3rem",kze="b",NY=p.createContext(null);function e0(){const e=p.useContext(NY);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function gze({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:i,children:s,...l}){const h=jDe(),[f,y]=p.useState(!1),[k,m]=p.useState(e),x=t??k,S=p.useCallback(N=>{const L=typeof N=="function"?N(x):N;a?a(L):m(L),document.cookie=`${pze}=${L}; path=/; max-age=${fze}`},[a,x]),b=p.useCallback(()=>h?y(N=>!N):S(N=>!N),[h,S,y]);p.useEffect(()=>{const N=L=>{L.key===kze&&(L.metaKey||L.ctrlKey)&&(L.preventDefault(),b())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[b]);const w=x?"expanded":"collapsed",_=p.useMemo(()=>({state:w,open:x,setOpen:S,isMobile:h,openMobile:f,setOpenMobile:y,toggleSidebar:b}),[w,x,S,h,f,y,b]);return M.jsx(NY.Provider,{value:_,children:M.jsx(JO,{delayDuration:0,children:M.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":yze,"--sidebar-width-icon":vze,...i},className:ee("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...l,children:s})})})}function Mze({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:i,...s}){const{isMobile:l,state:h,openMobile:f,setOpenMobile:y}=e0();return a==="none"?M.jsx("div",{"data-slot":"sidebar",className:ee("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",o),...s,children:i}):l?M.jsx(cY,{open:f,onOpenChange:y,...s,children:M.jsxs(sY,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden z-[1002]",style:{"--sidebar-width":mze},side:e,children:[M.jsxs(lY,{className:"sr-only",children:[M.jsx(dY,{children:"Sidebar"}),M.jsx(uY,{children:"Displays the mobile sidebar."})]}),M.jsx("div",{className:"flex h-full w-full flex-col",children:i})]})}):M.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":h,"data-collapsible":h==="collapsed"?a:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[M.jsx("div",{"data-slot":"sidebar-gap",className:ee("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),M.jsx("div",{"data-slot":"sidebar-container",className:ee("fixed inset-y-0 z-10 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)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...s,children:M.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:i})})]})}function xze({className:e,onClick:t,...a}){const{toggleSidebar:o}=e0();return M.jsxs(bA,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:ee("size-7",e),onClick:i=>{t==null||t(i),o()},...a,children:[M.jsx(vi,{}),M.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function bze({className:e,...t}){const{toggleSidebar:a}=e0();return M.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:ee("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function wze({className:e,...t}){return M.jsx("main",{"data-slot":"sidebar-inset",className:ee("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function _ze({className:e,...t}){return M.jsx(DX,{"data-slot":"sidebar-input","data-sidebar":"input",className:ee("bg-background h-8 w-full shadow-none",e),...t})}function Sze({className:e,...t}){return M.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:ee("flex flex-col gap-2 p-2",e),...t})}function Cze({className:e,...t}){return M.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:ee("flex flex-col gap-2 p-2",e),...t})}function Nze({className:e,...t}){return M.jsx(KO,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:ee("bg-sidebar-border mx-2 w-auto",e),...t})}function Lze({className:e,...t}){return M.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:ee("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Eze({className:e,...t}){return M.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:ee("relative flex w-full min-w-0 flex-col p-2",e),...t})}function Ize({className:e,asChild:t=!1,...a}){const o=t?Ii:"div";return M.jsx(o,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:ee("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden 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),...a})}function Aze({className:e,asChild:t=!1,...a}){const o=t?Ii:"button";return M.jsx(o,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:ee("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...a})}function Tze({className:e,...t}){return M.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:ee("w-full text-sm",e),...t})}function Rze({className:e,...t}){return M.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:ee("flex w-full min-w-0 flex-col gap-1",e),...t})}function $ze({className:e,...t}){return M.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:ee("group/menu-item relative",e),...t})}const jze=xA("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden 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! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(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"}});function Pze({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:i,className:s,...l}){const h=e?Ii:"button",{isMobile:f,state:y}=e0(),k=M.jsx(h,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":o,"data-active":t,className:ee(jze({variant:a,size:o}),s),...l});return i?(typeof i=="string"&&(i={children:i}),M.jsxs(_Y,{children:[M.jsx(SY,{asChild:!0,children:k}),M.jsx(CY,{side:"right",align:"center",hidden:y!=="collapsed"||f,...i})]})):k}function Oze({className:e,asChild:t=!1,showOnHover:a=!1,...o}){const i=t?Ii:"button";return M.jsx(i,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:ee("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after: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",a&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",e),...o})}function Dze({className:e,...t}){return M.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:ee("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","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})}function zze({className:e,showIcon:t=!1,...a}){const o=p.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return M.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:ee("flex h-8 items-center gap-2 rounded-md px-2",e),...a,children:[t&&M.jsx(yP,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),M.jsx(yP,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}function qze({className:e,...t}){return M.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:ee("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})}function Hze({className:e,...t}){return M.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:ee("group/menu-sub-item relative",e),...t})}function Vze({asChild:e=!1,size:t="md",isActive:a=!1,className:o,...i}){const s=e?Ii:"a";return M.jsx(s,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:ee("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 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","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",o),...i})}function Bze(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,Fze(i,...t)]}function Fze(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function Uze(e){const t=Gze(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(Zze);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function Gze(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=Kze(i),h=Xze(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wze=Symbol("radix.slottable");function Zze(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wze}function Xze(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function Kze(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var Yze=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],t0=Yze.reduce((e,t)=>{const a=Uze(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),LY=["PageUp","PageDown"],EY=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],IY={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},su="Slider",[kP,Qze,Jze]=H2(su),[AY]=Bze(su,[Jze]),[eqe,XA]=AY(su),TY=p.forwardRef((e,t)=>{const{name:a,min:o=0,max:i=100,step:s=1,orientation:l="horizontal",disabled:h=!1,minStepsBetweenThumbs:f=0,defaultValue:y=[o],value:k,onValueChange:m=()=>{},onValueCommit:x=()=>{},inverted:S=!1,form:b,...w}=e,_=p.useRef(new Set),N=p.useRef(0),I=l==="horizontal"?tqe:nqe,[O=[],D]=bn({prop:k,defaultProp:y,onChange:q=>{var F;(F=[..._.current][N.current])==null||F.focus(),m(q)}}),P=p.useRef(O);function A(q){const B=cqe(O,q);K(q,B)}function j(q){K(q,N.current)}function V(){const q=P.current[N.current];O[N.current]!==q&&x(O)}function K(q,B,{commit:F}={commit:!1}){const J=uqe(s),pe=hqe(Math.round((q-o)/s)*s+o,J),R=lA(pe,[o,i]);D(($=[])=>{const T=rqe($,R,B);if(dqe(T,f*s)){N.current=T.indexOf(R);const G=String(T)!==String($);return G&&F&&x(T),G?T:$}else return $})}return M.jsx(eqe,{scope:e.__scopeSlider,name:a,disabled:h,min:o,max:i,valueIndexToChangeRef:N,thumbs:_.current,values:O,orientation:l,form:b,children:M.jsx(kP.Provider,{scope:e.__scopeSlider,children:M.jsx(kP.Slot,{scope:e.__scopeSlider,children:M.jsx(I,{"aria-disabled":h,"data-disabled":h?"":void 0,...w,ref:t,onPointerDown:xe(w.onPointerDown,()=>{h||(P.current=O)}),min:o,max:i,inverted:S,onSlideStart:h?void 0:A,onSlideMove:h?void 0:j,onSlideEnd:h?void 0:V,onHomeKeyDown:()=>!h&&K(o,0,{commit:!0}),onEndKeyDown:()=>!h&&K(i,O.length-1,{commit:!0}),onStepKeyDown:({event:q,direction:B})=>{if(!h){const pe=LY.includes(q.key)||q.shiftKey&&EY.includes(q.key)?10:1,R=N.current,$=O[R],T=s*pe*B;K($+T,R,{commit:!0})}}})})})})});TY.displayName=su;var[RY,$Y]=AY(su,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tqe=p.forwardRef((e,t)=>{const{min:a,max:o,dir:i,inverted:s,onSlideStart:l,onSlideMove:h,onSlideEnd:f,onStepKeyDown:y,...k}=e,[m,x]=p.useState(null),S=ze(t,I=>x(I)),b=p.useRef(void 0),w=V2(i),_=w==="ltr",N=_&&!s||!_&&s;function L(I){const O=b.current||m.getBoundingClientRect(),D=[0,O.width],A=eD(D,N?[a,o]:[o,a]);return b.current=O,A(I-O.left)}return M.jsx(RY,{scope:e.__scopeSlider,startEdge:N?"left":"right",endEdge:N?"right":"left",direction:N?1:-1,size:"width",children:M.jsx(jY,{dir:w,"data-orientation":"horizontal",...k,ref:S,style:{...k.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:I=>{const O=L(I.clientX);l==null||l(O)},onSlideMove:I=>{const O=L(I.clientX);h==null||h(O)},onSlideEnd:()=>{b.current=void 0,f==null||f()},onStepKeyDown:I=>{const D=IY[N?"from-left":"from-right"].includes(I.key);y==null||y({event:I,direction:D?-1:1})}})})}),nqe=p.forwardRef((e,t)=>{const{min:a,max:o,inverted:i,onSlideStart:s,onSlideMove:l,onSlideEnd:h,onStepKeyDown:f,...y}=e,k=p.useRef(null),m=ze(t,k),x=p.useRef(void 0),S=!i;function b(w){const _=x.current||k.current.getBoundingClientRect(),N=[0,_.height],I=eD(N,S?[o,a]:[a,o]);return x.current=_,I(w-_.top)}return M.jsx(RY,{scope:e.__scopeSlider,startEdge:S?"bottom":"top",endEdge:S?"top":"bottom",size:"height",direction:S?1:-1,children:M.jsx(jY,{"data-orientation":"vertical",...y,ref:m,style:{...y.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:w=>{const _=b(w.clientY);s==null||s(_)},onSlideMove:w=>{const _=b(w.clientY);l==null||l(_)},onSlideEnd:()=>{x.current=void 0,h==null||h()},onStepKeyDown:w=>{const N=IY[S?"from-bottom":"from-top"].includes(w.key);f==null||f({event:w,direction:N?-1:1})}})})}),jY=p.forwardRef((e,t)=>{const{__scopeSlider:a,onSlideStart:o,onSlideMove:i,onSlideEnd:s,onHomeKeyDown:l,onEndKeyDown:h,onStepKeyDown:f,...y}=e,k=XA(su,a);return M.jsx(t0.span,{...y,ref:t,onKeyDown:xe(e.onKeyDown,m=>{m.key==="Home"?(l(m),m.preventDefault()):m.key==="End"?(h(m),m.preventDefault()):LY.concat(EY).includes(m.key)&&(f(m),m.preventDefault())}),onPointerDown:xe(e.onPointerDown,m=>{const x=m.target;x.setPointerCapture(m.pointerId),m.preventDefault(),k.thumbs.has(x)?x.focus():o(m)}),onPointerMove:xe(e.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&i(m)}),onPointerUp:xe(e.onPointerUp,m=>{const x=m.target;x.hasPointerCapture(m.pointerId)&&(x.releasePointerCapture(m.pointerId),s(m))})})}),PY="SliderTrack",OY=p.forwardRef((e,t)=>{const{__scopeSlider:a,...o}=e,i=XA(PY,a);return M.jsx(t0.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...o,ref:t})});OY.displayName=PY;var gP="SliderRange",DY=p.forwardRef((e,t)=>{const{__scopeSlider:a,...o}=e,i=XA(gP,a),s=$Y(gP,a),l=p.useRef(null),h=ze(t,l),f=i.values.length,y=i.values.map(x=>HY(x,i.min,i.max)),k=f>1?Math.min(...y):0,m=100-Math.max(...y);return M.jsx(t0.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...o,ref:h,style:{...e.style,[s.startEdge]:k+"%",[s.endEdge]:m+"%"}})});DY.displayName=gP;var MP="SliderThumb",zY=p.forwardRef((e,t)=>{const a=Qze(e.__scopeSlider),[o,i]=p.useState(null),s=ze(t,h=>i(h)),l=p.useMemo(()=>o?a().findIndex(h=>h.ref.current===o):-1,[a,o]);return M.jsx(aqe,{...e,ref:s,index:l})}),aqe=p.forwardRef((e,t)=>{const{__scopeSlider:a,index:o,name:i,...s}=e,l=XA(MP,a),h=$Y(MP,a),[f,y]=p.useState(null),k=ze(t,L=>y(L)),m=f?l.form||!!f.closest("form"):!0,x=SA(f),S=l.values[o],b=S===void 0?0:HY(S,l.min,l.max),w=iqe(o,l.values.length),_=x==null?void 0:x[h.size],N=_?sqe(_,b,h.direction):0;return p.useEffect(()=>{if(f)return l.thumbs.add(f),()=>{l.thumbs.delete(f)}},[f,l.thumbs]),M.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[h.startEdge]:`calc(${b}% + ${N}px)`},children:[M.jsx(kP.ItemSlot,{scope:e.__scopeSlider,children:M.jsx(t0.span,{role:"slider","aria-label":e["aria-label"]||w,"aria-valuemin":l.min,"aria-valuenow":S,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...s,ref:k,style:S===void 0?{display:"none"}:e.style,onFocus:xe(e.onFocus,()=>{l.valueIndexToChangeRef.current=o})})}),m&&M.jsx(qY,{name:i??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:S},o)]})});zY.displayName=MP;var oqe="RadioBubbleInput",qY=p.forwardRef(({__scopeSlider:e,value:t,...a},o)=>{const i=p.useRef(null),s=ze(i,o),l=_A(t);return p.useEffect(()=>{const h=i.current;if(!h)return;const f=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==t&&k){const m=new Event("input",{bubbles:!0});k.call(h,t),h.dispatchEvent(m)}},[l,t]),M.jsx(t0.input,{style:{display:"none"},...a,ref:s,defaultValue:t})});qY.displayName=oqe;function rqe(e=[],t,a){const o=[...e];return o[a]=t,o.sort((i,s)=>i-s)}function HY(e,t,a){const s=100/(a-t)*(e-t);return lA(s,[0,100])}function iqe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function cqe(e,t){if(e.length===1)return 0;const a=e.map(i=>Math.abs(i-t)),o=Math.min(...a);return a.indexOf(o)}function sqe(e,t,a){const o=e/2,s=eD([0,50],[0,o]);return(o-s(t)*a)*a}function lqe(e){return e.slice(0,-1).map((t,a)=>e[a+1]-t)}function dqe(e,t){if(t>0){const a=lqe(e);return Math.min(...a)>=t}return!0}function eD(e,t){return a=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(a-e[0])}}function uqe(e){return(String(e).split(".")[1]||"").length}function hqe(e,t){const a=Math.pow(10,t);return Math.round(e*a)/a}var pqe=TY,fqe=OY,yqe=DY,mqe=zY;function vqe({className:e,defaultValue:t,value:a,min:o=0,max:i=100,id:s,...l}){const h=p.useMemo(()=>Array.isArray(a)?a:Array.isArray(t)?t:[o,i],[a,t,o,i]);return M.jsxs(pqe,{"data-slot":"slider",defaultValue:t,value:a,min:o,max:i,id:s,className:ee("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...l,children:[M.jsx(fqe,{"data-slot":"slider-track",className:ee("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:M.jsx(yqe,{"data-slot":"slider-range",className:ee("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:h.length},(f,y)=>M.jsx(mqe,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},y))]})}var kqe=(e,t,a,o,i,s,l,h)=>{let f=document.documentElement,y=["light","dark"];function k(S){(Array.isArray(e)?e:[e]).forEach(b=>{let w=b==="class",_=w&&s?i.map(N=>s[N]||N):i;w?(f.classList.remove(..._),f.classList.add(s&&s[S]?s[S]:S)):f.setAttribute(b,S)}),m(S)}function m(S){h&&y.includes(S)&&(f.style.colorScheme=S)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)k(o);else try{let S=localStorage.getItem(t)||a,b=l&&S==="system"?x():S;k(b)}catch{}},gqe=p.createContext(void 0),Mqe={setTheme:e=>{},themes:[]},xqe=()=>{var e;return(e=p.useContext(gqe))!=null?e:Mqe};p.memo(({forcedTheme:e,storageKey:t,attribute:a,enableSystem:o,enableColorScheme:i,defaultTheme:s,value:l,themes:h,nonce:f,scriptProps:y})=>{let k=JSON.stringify([a,t,s,e,h,l,o,i]).slice(1,-1);return p.createElement("script",{...y,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${kqe.toString()})(${k})`}})});function bqe(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",t.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}const wqe=e=>{switch(e){case"success":return Cqe;case"info":return Lqe;case"warning":return Nqe;case"error":return Eqe;default:return null}},_qe=Array(12).fill(0),Sqe=({visible:e,className:t})=>ke.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ke.createElement("div",{className:"sonner-spinner"},_qe.map((a,o)=>ke.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),Cqe=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Nqe=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Lqe=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Eqe=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ke.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Iqe=ke.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ke.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ke.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Aqe=()=>{const[e,t]=ke.useState(document.hidden);return ke.useEffect(()=>{const a=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",a),()=>window.removeEventListener("visibilitychange",a)},[]),e};let xP=1;class Tqe{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const a=this.subscribers.indexOf(t);this.subscribers.splice(a,1)}),this.publish=t=>{this.subscribers.forEach(a=>a(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var a;const{message:o,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((a=t.id)==null?void 0:a.length)>0?t.id:xP++,l=this.toasts.find(f=>f.id===s),h=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(f=>f.id===s?(this.publish({...f,...t,id:s,title:o}),{...f,...t,id:s,dismissible:h,title:o}):f):this.addToast({title:o,...i,dismissible:h,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(a=>a({id:t,dismiss:!0})))):this.toasts.forEach(a=>{this.subscribers.forEach(o=>o({id:a.id,dismiss:!0}))}),t),this.message=(t,a)=>this.create({...a,message:t}),this.error=(t,a)=>this.create({...a,message:t,type:"error"}),this.success=(t,a)=>this.create({...a,type:"success",message:t}),this.info=(t,a)=>this.create({...a,type:"info",message:t}),this.warning=(t,a)=>this.create({...a,type:"warning",message:t}),this.loading=(t,a)=>this.create({...a,type:"loading",message:t}),this.promise=(t,a)=>{if(!a)return;let o;a.loading!==void 0&&(o=this.create({...a,promise:t,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=o!==void 0,l;const h=i.then(async y=>{if(l=["resolve",y],ke.isValidElement(y))s=!1,this.create({id:o,type:"default",message:y});else if($qe(y)&&!y.ok){s=!1;const m=typeof a.error=="function"?await a.error(`HTTP error! status: ${y.status}`):a.error,x=typeof a.description=="function"?await a.description(`HTTP error! status: ${y.status}`):a.description,b=typeof m=="object"&&!ke.isValidElement(m)?m:{message:m};this.create({id:o,type:"error",description:x,...b})}else if(y instanceof Error){s=!1;const m=typeof a.error=="function"?await a.error(y):a.error,x=typeof a.description=="function"?await a.description(y):a.description,b=typeof m=="object"&&!ke.isValidElement(m)?m:{message:m};this.create({id:o,type:"error",description:x,...b})}else if(a.success!==void 0){s=!1;const m=typeof a.success=="function"?await a.success(y):a.success,x=typeof a.description=="function"?await a.description(y):a.description,b=typeof m=="object"&&!ke.isValidElement(m)?m:{message:m};this.create({id:o,type:"success",description:x,...b})}}).catch(async y=>{if(l=["reject",y],a.error!==void 0){s=!1;const k=typeof a.error=="function"?await a.error(y):a.error,m=typeof a.description=="function"?await a.description(y):a.description,S=typeof k=="object"&&!ke.isValidElement(k)?k:{message:k};this.create({id:o,type:"error",description:m,...S})}}).finally(()=>{s&&(this.dismiss(o),o=void 0),a.finally==null||a.finally.call(a)}),f=()=>new Promise((y,k)=>h.then(()=>l[0]==="reject"?k(l[1]):y(l[1])).catch(k));return typeof o!="string"&&typeof o!="number"?{unwrap:f}:Object.assign(o,{unwrap:f})},this.custom=(t,a)=>{const o=(a==null?void 0:a.id)||xP++;return this.create({jsx:t(o),id:o,...a}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const kn=new Tqe,Rqe=(e,t)=>{const a=(t==null?void 0:t.id)||xP++;return kn.addToast({title:e,...t,id:a}),a},$qe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",jqe=Rqe,Pqe=()=>kn.toasts,Oqe=()=>kn.getActiveToasts(),Dqe=Object.assign(jqe,{success:kn.success,info:kn.info,warning:kn.warning,error:kn.error,custom:kn.custom,message:kn.message,promise:kn.promise,dismiss:kn.dismiss,loading:kn.loading},{getHistory:Pqe,getToasts:Oqe});bqe("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Nh(e){return e.label!==void 0}const zqe=3,qqe="24px",Hqe="16px",bF=4e3,Vqe=356,Bqe=14,Fqe=45,Uqe=200;function er(...e){return e.filter(Boolean).join(" ")}function Gqe(e){const[t,a]=e.split("-"),o=[];return t&&o.push(t),a&&o.push(a),o}const Wqe=e=>{var t,a,o,i,s,l,h,f,y;const{invert:k,toast:m,unstyled:x,interacting:S,setHeights:b,visibleToasts:w,heights:_,index:N,toasts:L,expanded:I,removeToast:O,defaultRichColors:D,closeButton:P,style:A,cancelButtonStyle:j,actionButtonStyle:V,className:K="",descriptionClassName:q="",duration:B,position:F,gap:J,expandByDefault:pe,classNames:R,icons:$,closeButtonAriaLabel:T="Close toast"}=e,[G,W]=ke.useState(null),[Me,X]=ke.useState(null),[ne,le]=ke.useState(!1),[ie,ye]=ke.useState(!1),[he,ve]=ke.useState(!1),[me,ge]=ke.useState(!1),[fe,ce]=ke.useState(!1),[Ee,$e]=ke.useState(0),[st,Ve]=ke.useState(0),tt=ke.useRef(m.duration||B||bF),ot=ke.useRef(null),Ye=ke.useRef(null),Ut=N===0,At=N+1<=w,Mt=m.type,Lt=m.dismissible!==!1,qe=m.className||"",we=m.descriptionClassName||"",De=ke.useMemo(()=>_.findIndex(Ie=>Ie.toastId===m.id)||0,[_,m.id]),Ne=ke.useMemo(()=>{var Ie;return(Ie=m.closeButton)!=null?Ie:P},[m.closeButton,P]),Te=ke.useMemo(()=>m.duration||B||bF,[m.duration,B]),Je=ke.useRef(0),jt=ke.useRef(0),lt=ke.useRef(0),tn=ke.useRef(null),[Yn,Gt]=F.split("-"),ln=ke.useMemo(()=>_.reduce((Ie,nt,Tt)=>Tt>=De?Ie:Ie+nt.height,0),[_,De]),Z=Aqe(),ae=m.invert||k,Ue=Mt==="loading";jt.current=ke.useMemo(()=>De*J+ln,[De,ln]),ke.useEffect(()=>{tt.current=Te},[Te]),ke.useEffect(()=>{le(!0)},[]),ke.useEffect(()=>{const Ie=Ye.current;if(Ie){const nt=Ie.getBoundingClientRect().height;return Ve(nt),b(Tt=>[{toastId:m.id,height:nt,position:m.position},...Tt]),()=>b(Tt=>Tt.filter(Et=>Et.toastId!==m.id))}},[b,m.id]),ke.useLayoutEffect(()=>{if(!ne)return;const Ie=Ye.current,nt=Ie.style.height;Ie.style.height="auto";const Tt=Ie.getBoundingClientRect().height;Ie.style.height=nt,Ve(Tt),b(Et=>Et.find(xt=>xt.toastId===m.id)?Et.map(xt=>xt.toastId===m.id?{...xt,height:Tt}:xt):[{toastId:m.id,height:Tt,position:m.position},...Et])},[ne,m.title,m.description,b,m.id,m.jsx,m.action,m.cancel]);const Ge=ke.useCallback(()=>{ye(!0),$e(jt.current),b(Ie=>Ie.filter(nt=>nt.toastId!==m.id)),setTimeout(()=>{O(m)},Uqe)},[m,O,b,jt]);ke.useEffect(()=>{if(m.promise&&Mt==="loading"||m.duration===1/0||m.type==="loading")return;let Ie;return I||S||Z?(()=>{if(lt.current<Je.current){const Et=new Date().getTime()-Je.current;tt.current=tt.current-Et}lt.current=new Date().getTime()})():(()=>{tt.current!==1/0&&(Je.current=new Date().getTime(),Ie=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Ge()},tt.current))})(),()=>clearTimeout(Ie)},[I,S,m,Mt,Z,Ge]),ke.useEffect(()=>{m.delete&&(Ge(),m.onDismiss==null||m.onDismiss.call(m,m))},[Ge,m.delete]);function rt(){var Ie;if($!=null&&$.loading){var nt;return ke.createElement("div",{className:er(R==null?void 0:R.loader,m==null||(nt=m.classNames)==null?void 0:nt.loader,"sonner-loader"),"data-visible":Mt==="loading"},$.loading)}return ke.createElement(Sqe,{className:er(R==null?void 0:R.loader,m==null||(Ie=m.classNames)==null?void 0:Ie.loader),visible:Mt==="loading"})}const Oe=m.icon||($==null?void 0:$[Mt])||wqe(Mt);var dn,Kt;return ke.createElement("li",{tabIndex:0,ref:Ye,className:er(K,qe,R==null?void 0:R.toast,m==null||(t=m.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[Mt],m==null||(a=m.classNames)==null?void 0:a[Mt]),"data-sonner-toast":"","data-rich-colors":(dn=m.richColors)!=null?dn:D,"data-styled":!(m.jsx||m.unstyled||x),"data-mounted":ne,"data-promise":!!m.promise,"data-swiped":fe,"data-removed":ie,"data-visible":At,"data-y-position":Yn,"data-x-position":Gt,"data-index":N,"data-front":Ut,"data-swiping":he,"data-dismissible":Lt,"data-type":Mt,"data-invert":ae,"data-swipe-out":me,"data-swipe-direction":Me,"data-expanded":!!(I||pe&&ne),"data-testid":m.testId,style:{"--index":N,"--toasts-before":N,"--z-index":L.length-N,"--offset":`${ie?Ee:jt.current}px`,"--initial-height":pe?"auto":`${st}px`,...A,...m.style},onDragEnd:()=>{ve(!1),W(null),tn.current=null},onPointerDown:Ie=>{Ie.button!==2&&(Ue||!Lt||(ot.current=new Date,$e(jt.current),Ie.target.setPointerCapture(Ie.pointerId),Ie.target.tagName!=="BUTTON"&&(ve(!0),tn.current={x:Ie.clientX,y:Ie.clientY})))},onPointerUp:()=>{var Ie,nt,Tt;if(me||!Lt)return;tn.current=null;const Et=Number(((Ie=Ye.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),zt=Number(((nt=Ye.current)==null?void 0:nt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xt=new Date().getTime()-((Tt=ot.current)==null?void 0:Tt.getTime()),nn=G==="x"?Et:zt,Wo=Math.abs(nn)/xt;if(Math.abs(nn)>=Fqe||Wo>.11){$e(jt.current),m.onDismiss==null||m.onDismiss.call(m,m),X(G==="x"?Et>0?"right":"left":zt>0?"down":"up"),Ge(),ge(!0);return}else{var qt,Yt;(qt=Ye.current)==null||qt.style.setProperty("--swipe-amount-x","0px"),(Yt=Ye.current)==null||Yt.style.setProperty("--swipe-amount-y","0px")}ce(!1),ve(!1),W(null)},onPointerMove:Ie=>{var nt,Tt,Et;if(!tn.current||!Lt||((nt=window.getSelection())==null?void 0:nt.toString().length)>0)return;const xt=Ie.clientY-tn.current.y,nn=Ie.clientX-tn.current.x;var Wo;const qt=(Wo=e.swipeDirections)!=null?Wo:Gqe(F);!G&&(Math.abs(nn)>1||Math.abs(xt)>1)&&W(Math.abs(nn)>Math.abs(xt)?"x":"y");let Yt={x:0,y:0};const ua=yn=>1/(1.5+Math.abs(yn)/20);if(G==="y"){if(qt.includes("top")||qt.includes("bottom"))if(qt.includes("top")&&xt<0||qt.includes("bottom")&&xt>0)Yt.y=xt;else{const yn=xt*ua(xt);Yt.y=Math.abs(yn)<Math.abs(xt)?yn:xt}}else if(G==="x"&&(qt.includes("left")||qt.includes("right")))if(qt.includes("left")&&nn<0||qt.includes("right")&&nn>0)Yt.x=nn;else{const yn=nn*ua(nn);Yt.x=Math.abs(yn)<Math.abs(nn)?yn:nn}(Math.abs(Yt.x)>0||Math.abs(Yt.y)>0)&&ce(!0),(Tt=Ye.current)==null||Tt.style.setProperty("--swipe-amount-x",`${Yt.x}px`),(Et=Ye.current)==null||Et.style.setProperty("--swipe-amount-y",`${Yt.y}px`)}},Ne&&!m.jsx&&Mt!=="loading"?ke.createElement("button",{"aria-label":T,"data-disabled":Ue,"data-close-button":!0,onClick:Ue||!Lt?()=>{}:()=>{Ge(),m.onDismiss==null||m.onDismiss.call(m,m)},className:er(R==null?void 0:R.closeButton,m==null||(o=m.classNames)==null?void 0:o.closeButton)},(Kt=$==null?void 0:$.close)!=null?Kt:Iqe):null,(Mt||m.icon||m.promise)&&m.icon!==null&&(($==null?void 0:$[Mt])!==null||m.icon)?ke.createElement("div",{"data-icon":"",className:er(R==null?void 0:R.icon,m==null||(i=m.classNames)==null?void 0:i.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||rt():null,m.type!=="loading"?Oe:null):null,ke.createElement("div",{"data-content":"",className:er(R==null?void 0:R.content,m==null||(s=m.classNames)==null?void 0:s.content)},ke.createElement("div",{"data-title":"",className:er(R==null?void 0:R.title,m==null||(l=m.classNames)==null?void 0:l.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?ke.createElement("div",{"data-description":"",className:er(q,we,R==null?void 0:R.description,m==null||(h=m.classNames)==null?void 0:h.description)},typeof m.description=="function"?m.description():m.description):null),ke.isValidElement(m.cancel)?m.cancel:m.cancel&&Nh(m.cancel)?ke.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||j,onClick:Ie=>{Nh(m.cancel)&&Lt&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Ie),Ge())},className:er(R==null?void 0:R.cancelButton,m==null||(f=m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,ke.isValidElement(m.action)?m.action:m.action&&Nh(m.action)?ke.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||V,onClick:Ie=>{Nh(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Ie),!Ie.defaultPrevented&&Ge())},className:er(R==null?void 0:R.actionButton,m==null||(y=m.classNames)==null?void 0:y.actionButton)},m.action.label):null)};function wF(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Zqe(e,t){const a={};return[e,t].forEach((o,i)=>{const s=i===1,l=s?"--mobile-offset":"--offset",h=s?Hqe:qqe;function f(y){["top","right","bottom","left"].forEach(k=>{a[`${l}-${k}`]=typeof y=="number"?`${y}px`:y})}typeof o=="number"||typeof o=="string"?f(o):typeof o=="object"?["top","right","bottom","left"].forEach(y=>{o[y]===void 0?a[`${l}-${y}`]=h:a[`${l}-${y}`]=typeof o[y]=="number"?`${o[y]}px`:o[y]}):f(h)}),a}function Xqe(){const[e,t]=ke.useState([]);return ke.useEffect(()=>kn.subscribe(a=>{if(a.dismiss){setTimeout(()=>{ur.flushSync(()=>{t(o=>o.filter(i=>i.id!==a.id))})});return}setTimeout(()=>{ur.flushSync(()=>{t(o=>{const i=o.findIndex(s=>s.id===a.id);return i!==-1?[...o.slice(0,i),{...o[i],...a},...o.slice(i+1)]:[a,...o]})})})}),[]),{toasts:e}}const VY=ke.forwardRef(function(t,a){const{id:o,invert:i,position:s="bottom-right",hotkey:l=["altKey","KeyT"],expand:h,closeButton:f,className:y,offset:k,mobileOffset:m,theme:x="light",richColors:S,duration:b,style:w,visibleToasts:_=zqe,toastOptions:N,dir:L=wF(),gap:I=Bqe,icons:O,containerAriaLabel:D="Notifications"}=t,[P,A]=ke.useState([]),j=ke.useMemo(()=>o?P.filter(ne=>ne.toasterId===o):P.filter(ne=>!ne.toasterId),[P,o]),V=ke.useMemo(()=>Array.from(new Set([s].concat(j.filter(ne=>ne.position).map(ne=>ne.position)))),[j,s]),[K,q]=ke.useState([]),[B,F]=ke.useState(!1),[J,pe]=ke.useState(!1),[R,$]=ke.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),T=ke.useRef(null),G=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),W=ke.useRef(null),Me=ke.useRef(!1),X=ke.useCallback(ne=>{A(le=>{var ie;return(ie=le.find(ye=>ye.id===ne.id))!=null&&ie.delete||kn.dismiss(ne.id),le.filter(({id:ye})=>ye!==ne.id)})},[]);return ke.useEffect(()=>kn.subscribe(ne=>{if(ne.dismiss){requestAnimationFrame(()=>{A(le=>le.map(ie=>ie.id===ne.id?{...ie,delete:!0}:ie))});return}setTimeout(()=>{ur.flushSync(()=>{A(le=>{const ie=le.findIndex(ye=>ye.id===ne.id);return ie!==-1?[...le.slice(0,ie),{...le[ie],...ne},...le.slice(ie+1)]:[ne,...le]})})})}),[P]),ke.useEffect(()=>{if(x!=="system"){$(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:le})=>{$(le?"dark":"light")})}catch{ne.addListener(({matches:ie})=>{try{$(ie?"dark":"light")}catch(ye){console.error(ye)}})}},[x]),ke.useEffect(()=>{P.length<=1&&F(!1)},[P]),ke.useEffect(()=>{const ne=le=>{var ie;if(l.every(ve=>le[ve]||le.code===ve)){var he;F(!0),(he=T.current)==null||he.focus()}le.code==="Escape"&&(document.activeElement===T.current||(ie=T.current)!=null&&ie.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[l]),ke.useEffect(()=>{if(T.current)return()=>{W.current&&(W.current.focus({preventScroll:!0}),W.current=null,Me.current=!1)}},[T.current]),ke.createElement("section",{ref:a,"aria-label":`${D} ${G}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},V.map((ne,le)=>{var ie;const[ye,he]=ne.split("-");return j.length?ke.createElement("ol",{key:ne,dir:L==="auto"?wF():L,tabIndex:-1,ref:T,className:y,"data-sonner-toaster":!0,"data-sonner-theme":R,"data-y-position":ye,"data-x-position":he,style:{"--front-toast-height":`${((ie=K[0])==null?void 0:ie.height)||0}px`,"--width":`${Vqe}px`,"--gap":`${I}px`,...w,...Zqe(k,m)},onBlur:ve=>{Me.current&&!ve.currentTarget.contains(ve.relatedTarget)&&(Me.current=!1,W.current&&(W.current.focus({preventScroll:!0}),W.current=null))},onFocus:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||Me.current||(Me.current=!0,W.current=ve.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{J||F(!1)},onDragEnd:()=>F(!1),onPointerDown:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||pe(!0)},onPointerUp:()=>pe(!1)},j.filter(ve=>!ve.position&&le===0||ve.position===ne).map((ve,me)=>{var ge,fe;return ke.createElement(Wqe,{key:ve.id,icons:O,index:me,toast:ve,defaultRichColors:S,duration:(ge=N==null?void 0:N.duration)!=null?ge:b,className:N==null?void 0:N.className,descriptionClassName:N==null?void 0:N.descriptionClassName,invert:i,visibleToasts:_,closeButton:(fe=N==null?void 0:N.closeButton)!=null?fe:f,interacting:J,position:ne,style:N==null?void 0:N.style,unstyled:N==null?void 0:N.unstyled,classNames:N==null?void 0:N.classNames,cancelButtonStyle:N==null?void 0:N.cancelButtonStyle,actionButtonStyle:N==null?void 0:N.actionButtonStyle,closeButtonAriaLabel:N==null?void 0:N.closeButtonAriaLabel,removeToast:X,toasts:j.filter(ce=>ce.position==ve.position),heights:K.filter(ce=>ce.position==ve.position),setHeights:q,expandByDefault:h,gap:I,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),Kqe=Object.freeze(Object.defineProperty({__proto__:null,Toaster:VY,toast:Dqe,useSonner:Xqe},Symbol.toStringTag,{value:"Module"})),Yqe=({...e})=>{const{theme:t="system"}=xqe();return M.jsx(VY,{theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};function Qqe(e,t=[]){let a=[];function o(s,l){const h=p.createContext(l),f=a.length;a=[...a,l];const y=m=>{var N;const{scope:x,children:S,...b}=m,w=((N=x==null?void 0:x[e])==null?void 0:N[f])||h,_=p.useMemo(()=>b,Object.values(b));return M.jsx(w.Provider,{value:_,children:S})};y.displayName=s+"Provider";function k(m,x){var w;const S=((w=x==null?void 0:x[e])==null?void 0:w[f])||h,b=p.useContext(S);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[y,k]}const i=()=>{const s=a.map(l=>p.createContext(l));return function(h){const f=(h==null?void 0:h[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...h,[e]:f}}),[h,f])}};return i.scopeName=e,[o,Jqe(i,...t)]}function Jqe(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=o.reduce((h,{useScope:f,scopeName:y})=>{const m=f(s)[`__scope${y}`];return{...h,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function eHe(e){const t=tHe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(aHe);if(f){const y=f.props.children,k=h.map(m=>m===f?p.Children.count(y)>1?p.Children.only(null):p.isValidElement(y)?y.props.children:null:m);return M.jsx(t,{...l,ref:i,children:p.isValidElement(y)?p.cloneElement(y,void 0,k):null})}return M.jsx(t,{...l,ref:i,children:s})});return a.displayName=`${e}.Slot`,a}function tHe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=rHe(i),h=oHe(s,i.props);return i.type!==p.Fragment&&(h.ref=o?kt(o,l):l),p.cloneElement(i,h)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nHe=Symbol("radix.slottable");function aHe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nHe}function oHe(e,t){const a={...t};for(const o in t){const i=e[o],s=t[o];/^on[A-Z]/.test(o)?i&&s?a[o]=(...h)=>{const f=s(...h);return i(...h),f}:i&&(a[o]=i):o==="style"?a[o]={...i,...s}:o==="className"&&(a[o]=[i,s].filter(Boolean).join(" "))}return{...e,...a}}function rHe(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var iHe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],BY=iHe.reduce((e,t)=>{const a=eHe(`Primitive.${t}`),o=p.forwardRef((i,s)=>{const{asChild:l,...h}=i,f=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...h,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),KA="Switch",[cHe]=Qqe(KA),[sHe,lHe]=cHe(KA),FY=p.forwardRef((e,t)=>{const{__scopeSwitch:a,name:o,checked:i,defaultChecked:s,required:l,disabled:h,value:f="on",onCheckedChange:y,form:k,...m}=e,[x,S]=p.useState(null),b=ze(t,I=>S(I)),w=p.useRef(!1),_=x?k||!!x.closest("form"):!0,[N,L]=bn({prop:i,defaultProp:s??!1,onChange:y,caller:KA});return M.jsxs(sHe,{scope:a,checked:N,disabled:h,children:[M.jsx(BY.button,{type:"button",role:"switch","aria-checked":N,"aria-required":l,"data-state":ZY(N),"data-disabled":h?"":void 0,disabled:h,value:f,...m,ref:b,onClick:xe(e.onClick,I=>{L(O=>!O),_&&(w.current=I.isPropagationStopped(),w.current||I.stopPropagation())})}),_&&M.jsx(WY,{control:x,bubbles:!w.current,name:o,value:f,checked:N,required:l,disabled:h,form:k,style:{transform:"translateX(-100%)"}})]})});FY.displayName=KA;var UY="SwitchThumb",GY=p.forwardRef((e,t)=>{const{__scopeSwitch:a,...o}=e,i=lHe(UY,a);return M.jsx(BY.span,{"data-state":ZY(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})});GY.displayName=UY;var dHe="SwitchBubbleInput",WY=p.forwardRef(({__scopeSwitch:e,control:t,checked:a,bubbles:o=!0,...i},s)=>{const l=p.useRef(null),h=ze(l,s),f=_A(a),y=SA(t);return p.useEffect(()=>{const k=l.current;if(!k)return;const m=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(m,"checked").set;if(f!==a&&S){const b=new Event("click",{bubbles:o});S.call(k,a),k.dispatchEvent(b)}},[f,a,o]),M.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a,...i,tabIndex:-1,ref:h,style:{...i.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});WY.displayName=dHe;function ZY(e){return e?"checked":"unchecked"}var uHe=FY,hHe=GY;function pHe({className:e,...t}){return M.jsx(uHe,{"data-slot":"switch",className:ee("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:M.jsx(hHe,{"data-slot":"switch-thumb",className:ee("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function fHe({className:e,wrapperHeight:t,ref:a,...o}){return M.jsx("div",{"data-slot":"table-container",ref:a,className:ee("relative w-full overflow-x-auto",t),children:M.jsx("table",{"data-slot":"table",className:ee("w-full caption-bottom text-sm",e),...o})})}function yHe({className:e,...t}){return M.jsx("thead",{"data-slot":"table-header",className:ee("[&_tr]:border-b",e),...t})}function mHe({className:e,...t}){return M.jsx("tbody",{"data-slot":"table-body",className:ee("[&_tr:last-child]:border-0",e),...t})}function vHe({className:e,...t}){return M.jsx("tfoot",{"data-slot":"table-footer",className:ee("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function kHe({className:e,...t}){return M.jsx("tr",{"data-slot":"table-row",className:ee("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function gHe({className:e,...t}){return M.jsx("th",{"data-slot":"table-head",className:ee("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function MHe({className:e,...t}){return M.jsx("td",{"data-slot":"table-cell",className:ee("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function xHe({className:e,...t}){return M.jsx("caption",{"data-slot":"table-caption",className:ee("text-muted-foreground mt-4 text-sm",e),...t})}function bHe({className:e,...t}){return M.jsx("textarea",{"data-slot":"textarea",className:ee("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const wHe=()=>typeof window>"u"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,_He=(e,t,a=365)=>{if(typeof document>"u")return;const o=a*24*60*60;document.cookie=`${e}=${t};path=/;max-age=${o};SameSite=Lax`},M2=e=>{const t=e==="dark"||e==="system"&&wHe();document.documentElement.classList.toggle("dark",t)},XY=()=>typeof window>"u"?null:window.matchMedia("(prefers-color-scheme: dark)"),KY=()=>{const e=localStorage.getItem("appearance");M2(e||"light")};function pVe(){var t;const e=localStorage.getItem("appearance")||"system";M2(e),(t=XY())==null||t.addEventListener("change",KY)}function tD(){const[e,t]=p.useState("system"),[a,o]=p.useState(!1),i=p.useCallback(s=>{o(!0),t(s),localStorage.setItem("appearance",s),_He("appearance",s),M2(s),setTimeout(()=>{o(!1),window.dispatchEvent(new Event("appearanceChanged"))},0)},[]);return p.useEffect(()=>{const s=localStorage.getItem("appearance");i(s||"system");const l=f=>{if(f.key==="appearance"){const y=f.newValue;t(y),M2(y)}},h=()=>{const f=localStorage.getItem("appearance");t(f),M2(f)};return window.addEventListener("storage",l),window.addEventListener("appearanceChanged",h),()=>{var f;window.removeEventListener("storage",l),window.removeEventListener("appearanceChanged",h),(f=XY())==null||f.removeEventListener("change",KY)}},[i]),{appearance:e,updateAppearance:i,isThemeChanging:a}}const SHe={errors:{}},j1=new Proxy(SHe,{set(e,t,a){return t==="errors"&&(Object.keys(a).length===0?e.errors={}:e.errors={...e.errors,...a}),!0}}),_F=(e,t,a)=>{if(t)j1.errors={...j1.errors,[e]:{hasError:!0,message:a}};else{const{[e]:o,...i}=j1.errors;j1.errors=i}},fVe=e=>{var t;return(t=j1.errors[e])==null?void 0:t.message},yVe=()=>Object.values(j1.errors).some(e=>e.hasError),mVe=()=>{j1.errors={}};function x2(e,t){return e!==void 0?e&&typeof e=="object"&&("json"in e||"text"in e)?e:{json:e}:t!==void 0?{json:t}:void 0}function bP(e){const t=p.useRef(null),a=p.useRef(null),o=p.useRef(e),{appearance:i}=tD(),[s,l]=p.useState("");return p.useEffect(()=>{const h=i==="dark"||i==="system"&&window.matchMedia("(prefers-color-scheme: dark)").matches;l(h?"jse-theme-dark":"")},[i]),p.useEffect(()=>{a.current&&a.current.updateProps({content:x2(e.content,e.json)})},[e.content,e.json]),p.useEffect(()=>{var y;const h=e.schema?ZH({schema:e.schema}):void 0,f=x2(e.content,e.json);if(a.current=pee({target:t.current,props:{...e,validator:h,content:f,onChange:(k,m,x)=>{var S;if(h){const w=k.json===void 0?["error"]:(S=x.contentErrors)==null?void 0:S.validationErrors;_F(e.name,!!(w!=null&&w.length),"Error validation JSON schema")}e.onChange&&e.onChange(k,m,x)}}}),a.current){const k=a.current.get(),m=a.current.validate(),x=!!((y=m==null?void 0:m.validationErrors)!=null&&y.length);e.onChange&&e.onChange(k,void 0,{contentErrors:m,patchResult:void 0,isUndo:!1,isRedo:!1,isValid:!x}),_F(e.name,x,"Error validation JSON schema")}return()=>{a.current&&(a.current.destroy(),a.current=null)}},[e.schema]),p.useEffect(()=>{if(a.current){const h=CHe(e,o.current);("content"in h||"json"in h)&&(h.content=x2(e.content,e.json),delete h.json),"schema"in h&&(h.validator=e.schema?ZH({schema:e.schema}):void 0,delete h.schema),a.current.updateProps(h),o.current=e}},[e]),M.jsx("div",{className:`vanilla-jsoneditor-react ${s} ${e.disabled?"pointer-events-none opacity-50 cursor-not-allowed":""}`,ref:t})}function CHe(e,t){const a={};for(const[o,i]of Object.entries(e))if(o==="content"){const s=JSON.stringify(x2(i,void 0)),l=JSON.stringify(x2(t[o],void 0));s!==l&&(a[o]=i)}else i!==t[o]&&(a[o]=i);return a}const vVe=Object.freeze(Object.defineProperty({__proto__:null,default:bP},Symbol.toStringTag,{value:"Module"}));/**
|
|
8008
8008
|
* @preserve
|
|
8009
8009
|
* Authors: Stefan Salzl
|
|
8010
8010
|
* Last updated: Jan 08, 2018
|
|
@@ -8070,4 +8070,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
8070
8070
|
* Last updated: Mar 09, 2023
|
|
8071
8071
|
*
|
|
8072
8072
|
* Description: Definition file for Chinese - China language-country.
|
|
8073
|
-
*/const OHe={languageCode:"zh-CN",[Fo]:"上方插入行",[Bo]:"下方插入行",[Vo]:"左方插入列",[Ho]:"右方插入列",[qo]:["移除该行","移除多行"],[zo]:["移除该列","移除多列"],[Do]:"撤销",[Oo]:"恢复",[Po]:"只读",[jo]:"清空该列",[$o]:"对齐",[Ro]:"左对齐",[To]:"水平居中",[Ao]:"右对齐",[Io]:"两端对齐",[Eo]:"顶端对齐",[Lo]:"垂直居中",[No]:"底端对齐",[Co]:"冻结该列",[So]:"取消冻结",[_o]:"边框",[wo]:"上",[bo]:"右",[xo]:"下",[Mo]:"左",[go]:"移除边框",[ko]:"插入批注",[vo]:"编辑批注",[mo]:"删除批注",[yo]:"只读批注",[fo]:"合并",[po]:"取消合并",[ho]:"复制",[Jd]:"带标题的复制",[Qd]:"带标题组的复制",[Yd]:"仅复制标题",[uo]:"剪切",[lo]:"插入子行",[so]:"与母行分离",[co]:["隐藏该列","隐藏多列"],[io]:["显示该列","显示多列"],[ro]:["隐藏该行","隐藏多行"],[oo]:["显示该行","显示多行"],[ao]:"无",[no]:"为空",[to]:"不为空",[eo]:"等于",[Ja]:"不等于",[Qa]:"开头是",[Ya]:"结尾是",[Ka]:"包含",[Xa]:"不包含",[Za]:"大于",[Wa]:"大于或等于",[Ga]:"小于",[Ua]:"小于或等于",[Fa]:"在此范围",[Ba]:"不在此范围",[Va]:"之后",[Ha]:"之前",[qa]:"今天",[za]:"明天",[Da]:"昨天",[Oa]:"空白单元格",[Pa]:"按条件过滤",[ja]:"按值过滤",[$a]:"且",[Ra]:"或",[Ta]:"全选",[Aa]:"清除",[Ia]:"确认",[Ea]:"取消",[La]:"搜索",[Na]:"值",[Ca]:"第二值"};kee();const SF={de:NHe,en:xee,es:LHe,fr:EHe,it:IHe,ja:AHe,ko:THe,nl:RHe,pl:$He,pt:jHe,ru:PHe,zh:OHe},DHe=document.documentElement.lang,YY=SF[DHe]??SF.en;gee(YY);const QY=({config:e,data:t=[],onChange:a,disabled:o})=>{const{appearance:i}=tD(),[s,l]=p.useState("ht-theme-main"),[h,f]=p.useState(!1),y=p.useCallback((m,x)=>{var b,w;if(x==="loadData")return;const S=(w=(b=k.current)==null?void 0:b.hotInstance)==null?void 0:w.getSourceData();a(S)},[]),k=p.useRef(null);return p.useEffect(()=>{const m=setTimeout(()=>{var x;(x=k.current)!=null&&x.hotInstance&&(k.current.hotInstance.loadData(t??[]),f(!0))},100);return()=>clearTimeout(m)},[t]),p.useEffect(()=>{l(i==="dark"?"ht-theme-main-dark":"ht-theme-main")},[i]),M.jsx("div",{style:{opacity:h?1:0},children:M.jsx(Mee,{className:o?"pointer-events-none opacity-50":"",themeName:s,language:YY.languageCode,ref:k,...e,afterChange:y,children:e.columns.map(m=>M.jsx(bee,{data:m.data,...m},m.data))})})},kVe=Object.freeze(Object.defineProperty({__proto__:null,default:QY},Symbol.toStringTag,{value:"Module"})),zHe=()=>{const[e,t]=p.useState({width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768});return p.useEffect(()=>{if(typeof window>"u")return;const a=()=>{t({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),e},JY=({onChange:e,value:t,options:a,disabled:o})=>{const{appearance:i}=tD(),[s,l]=p.useState("light"),h=p.useRef(null),f=p.useRef(null),{width:y}=zHe(),k=y<768,m=y>=768&&y<1024,x=_=>{e(_)},S=_=>{h.current=_,b()},b=()=>{var N;if(!h.current)return;const _={minimap:{enabled:!k},fontSize:k?12:m?13:14,lineNumbers:k?"off":"on",lineDecorationsWidth:k?5:10,scrollBeyondLastLine:!k,wordWrap:k?"on":"bounded",renderWhitespace:k?"none":"selection",padding:{top:k?8:16,bottom:k?8:16}};h.current.updateOptions(_),(N=f.current)==null||N.classList.add("overflow-hidden"),setTimeout(()=>{var L,I;(L=h.current)==null||L.layout(),(I=f.current)==null||I.classList.remove("overflow-hidden")},100)};p.useEffect(()=>{l(i==="dark"?"vs-dark":"light")},[i]),p.useEffect(()=>{b()},[y]);const w=k?"300px":m?"400px":"500px";return M.jsx("div",{className:`border rounded-lg ${k?"p-1":"p-2"}`,ref:f,children:M.jsx(wee,{height:w,language:a.language,value:t,theme:s,options:{automaticLayout:!0,...k&&{wordWrap:"on"},minimap:{enabled:!k}},onChange:x,onMount:S,className:`transition-all duration-200 ease-in-out ${o?"pointer-events-none opacity-50 cursor-not-allowed":""}`})})},gVe=Object.freeze(Object.defineProperty({__proto__:null,default:JY},Symbol.toStringTag,{value:"Module"})),jj=xA("m-1 flex items-center border rounded-sm px-1",{variants:{variant:{default:"border-foreground/10 text-foreground bg-card hover:bg-card/80",secondary:"border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",inverted:"inverted"}},defaultVariants:{variant:"default"}}),nD=p.forwardRef(({options:e,onValueChange:t,variant:a,processing:o,disabled:i,defaultValue:s=[],placeholder:l="",notFound:h="",search:f="",animation:y=0,maxCount:k=3,modalPopover:m=!1,asChild:x=!1,className:S,mode:b="multiple",onOpenItem:w,onAddNew:_,...N},L)=>{const O=MA().props.uiMessages||{},[D,P]=p.useState(s),[A,j]=p.useState(!1),[V,K]=p.useState(!1);p.useEffect(()=>{s&&P(s)},[s]);const q=$=>{if($.key==="Enter")j(!0);else if($.key==="Backspace"&&!$.currentTarget.value){const T=[...D];T.pop(),P(T),t(T)}},B=$=>{let T;b==="single"?T=D.includes($)?[]:[$]:T=D.includes($)?D.filter(G=>G!==$):[...D,$],P(T),t(T),b==="single"&&j(!1)},F=()=>{P([]),t([])},J=()=>{j($=>!$)},pe=()=>{const $=D.slice(0,k);P($),t($)},R=()=>_?M.jsxs("div",{role:"button",className:ee("m-1 cursor-pointer",V?"animate-bounce":"",jj({variant:a})),style:{animationDuration:`${y}s`},onClick:$=>{$.stopPropagation(),_()},children:[M.jsx(k2,{className:"mr-1 h-3.5 w-3.5"}),M.jsx("span",{children:O.Add||"Add"})]}):null;return M.jsxs(bK,{open:A,onOpenChange:j,modal:m,children:[M.jsx(wK,{asChild:!0,children:M.jsx(bA,{ref:L,...N,onClick:J,disabled:i,className:ee("flex w-full p-1 rounded-md border-input border-1 min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit [&_svg]:pointer-events-auto",S),children:D.length>0?M.jsxs("div",{className:"flex justify-between items-center w-full",children:[M.jsxs("div",{className:"flex flex-wrap items-center",children:[D.slice(0,k).map($=>{const T=e.find(W=>W.value===$),G=T==null?void 0:T.icon;return M.jsxs("div",{className:ee(V?"animate-bounce":"",jj({variant:a})),style:{animationDuration:`${y}s`},children:[G&&M.jsx(G,{className:"h-4 w-4 mr-2"}),T==null?void 0:T.label,w&&M.jsx(v2,{className:"ml-2 h-4 w-4 cursor-pointer text-muted-foreground hover:text-foreground",onClick:W=>{W.stopPropagation(),w($)}}),M.jsx(Or,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:W=>{W.stopPropagation(),o||B($)}})]},$)}),b==="multiple"&&D.length>k&&M.jsxs("div",{className:ee("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",V?"animate-bounce":"",jj({variant:a})),style:{animationDuration:`${y}s`},children:[`+ ${D.length-k} more`,M.jsx(Or,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:$=>{$.stopPropagation(),pe()}})]}),R()]}),M.jsxs("div",{className:"flex items-center justify-between",children:[D.length>0&&M.jsxs(M.Fragment,{children:[M.jsx(bi,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:$=>{$.stopPropagation(),F()}}),M.jsx(KO,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),M.jsx(xi,{className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):M.jsxs("div",{className:"flex items-center justify-between w-full mx-auto",children:[M.jsx("span",{className:"text-sm text-muted-foreground mx-3",children:l}),M.jsxs("div",{className:"flex items-center",children:[R(),M.jsx(xi,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})]})})}),M.jsx(_K,{className:"w-auto p-0 z-[1003]",align:"start",onEscapeKeyDown:()=>j(!1),children:M.jsxs(dO,{children:[M.jsx(HW,{placeholder:f,onKeyDown:q}),M.jsxs(VW,{children:[M.jsx(BW,{children:h}),M.jsx(FW,{children:e.map($=>{const T=D.includes($.value);return M.jsxs(GW,{onSelect:()=>B($.value),className:"cursor-pointer",children:[M.jsx("div",{className:ee("mr-2 flex h-5 w-5 items-center justify-center rounded border border-primary",T?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:M.jsx(sr,{className:"h-4 w-4 text-primary-foreground"})}),$.icon&&M.jsx($.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),M.jsx("span",{children:$.label})]},$.value)})}),M.jsx(UW,{})]})]})}),y>0&&D.length>0&&b==="multiple"&&M.jsx(ki,{className:ee("cursor-pointer my-2 text-foreground bg-background w-3 h-3",V?"":"text-muted-foreground"),onClick:()=>K(!V)})]})});nD.displayName="MultiSelect";const MVe=Object.freeze(Object.defineProperty({__proto__:null,default:nD},Symbol.toStringTag,{value:"Module"}));function qHe(){window.UIComponents??(window.UIComponents={}),window.JSComponents??(window.JSComponents={}),window.axios=Nt,window.sonner=Kqe,Object.assign(window.UIComponents,{Avatar:qre,AvatarImage:Hre,AvatarFallback:Vre,Badge:Fre,Breadcrumb:G_e,BreadcrumbList:W_e,BreadcrumbItem:Z_e,BreadcrumbLink:X_e,BreadcrumbPage:K_e,BreadcrumbSeparator:Y_e,BreadcrumbEllipsis:Q_e,Button:bA,Calendar:zNe,Card:qNe,CardHeader:HNe,CardFooter:GNe,CardTitle:VNe,CardAction:FNe,CardDescription:BNe,CardContent:UNe,Checkbox:hLe,Collapsible:LLe,CollapsibleTrigger:ELe,CollapsibleContent:ILe,Command:dO,CommandDialog:zIe,CommandInput:HW,CommandList:VW,CommandEmpty:BW,CommandGroup:FW,CommandItem:GW,CommandShortcut:qIe,CommandSeparator:UW,ContextMenu:d$e,ContextMenuTrigger:u$e,ContextMenuContent:k$e,ContextMenuItem:g$e,ContextMenuCheckboxItem:M$e,ContextMenuRadioItem:x$e,ContextMenuLabel:b$e,ContextMenuSeparator:w$e,ContextMenuShortcut:_$e,ContextMenuGroup:h$e,ContextMenuPortal:p$e,ContextMenuSub:f$e,ContextMenuSubContent:v$e,ContextMenuSubTrigger:m$e,ContextMenuRadioGroup:y$e,Dialog:$W,DialogClose:OIe,DialogContent:OW,DialogDescription:qW,DialogFooter:DIe,DialogHeader:DW,DialogOverlay:PW,DialogPortal:jW,DialogTitle:zW,DialogTrigger:PIe,DialogStack:kX,DialogStackTrigger:C$e,DialogStackOverlay:N$e,DialogStackBody:L$e,DialogStackContent:E$e,DialogStackTitle:I$e,DialogStackDescription:A$e,DialogStackHeader:T$e,DialogStackFooter:R$e,DialogStackNext:$$e,DialogStackPrevious:j$e,DropdownMenu:xje,DropdownMenuPortal:bje,DropdownMenuTrigger:wje,DropdownMenuContent:_je,DropdownMenuGroup:Sje,DropdownMenuLabel:Ije,DropdownMenuItem:Cje,DropdownMenuCheckboxItem:Nje,DropdownMenuRadioGroup:Lje,DropdownMenuRadioItem:Eje,DropdownMenuSeparator:Aje,DropdownMenuShortcut:Tje,DropdownMenuSub:Rje,DropdownMenuSubTrigger:$je,DropdownMenuSubContent:jje,Input:DX,Label:Dje,Menubar:NPe,MenubarPortal:sK,MenubarMenu:LPe,MenubarTrigger:APe,MenubarContent:TPe,MenubarGroup:EPe,MenubarSeparator:OPe,MenubarLabel:PPe,MenubarItem:RPe,MenubarShortcut:DPe,MenubarCheckboxItem:$Pe,MenubarRadioGroup:IPe,MenubarRadioItem:jPe,MenubarSub:zPe,MenubarSubTrigger:qPe,MenubarSubContent:HPe,Pagination:VPe,PaginationContent:BPe,PaginationLink:GO,PaginationItem:FPe,PaginationPrevious:UPe,PaginationNext:GPe,PaginationEllipsis:WPe,Popover:bK,PopoverTrigger:wK,PopoverContent:_K,PopoverAnchor:vOe,Select:kDe,SelectContent:bDe,SelectGroup:gDe,SelectItem:_De,SelectLabel:wDe,SelectScrollDownButton:rY,SelectScrollUpButton:oY,SelectSeparator:SDe,SelectTrigger:xDe,SelectValue:MDe,Separator:KO,Sheet:cY,SheetTrigger:IDe,SheetClose:ADe,SheetContent:sY,SheetHeader:lY,SheetFooter:$De,SheetTitle:dY,SheetDescription:uY,Sidebar:Mze,SidebarContent:Lze,SidebarFooter:Cze,SidebarGroup:Eze,SidebarGroupAction:Aze,SidebarGroupContent:Tze,SidebarGroupLabel:Ize,SidebarHeader:Sze,SidebarInput:_ze,SidebarInset:wze,SidebarMenu:Rze,SidebarMenuAction:Oze,SidebarMenuBadge:Dze,SidebarMenuButton:Pze,SidebarMenuItem:$ze,SidebarMenuSkeleton:zze,SidebarMenuSub:qze,SidebarMenuSubButton:Vze,SidebarMenuSubItem:Hze,SidebarProvider:gze,SidebarRail:bze,SidebarSeparator:Nze,SidebarTrigger:xze,useSidebar:e0,Skeleton:yP,Slider:vqe,Toaster:Yqe,Switch:pHe,Table:fHe,TableHeader:yHe,TableBody:mHe,TableFooter:vHe,TableHead:gHe,TableRow:kHe,TableCell:MHe,TableCaption:xHe,Textarea:bHe,Tooltip:_Y,TooltipTrigger:SY,TooltipContent:CY,TooltipProvider:JO,VanillaJSONEditor:bP}),Object.assign(window.JSComponents,{VanillaJSONEditor:bP,HandsonTable:QY,MonacoEditor:JY,MultiSelect:nD})}const{createInertiaApp:HHe,router:eQ}=BU;window.React=ke;window.ReactDOM=ur;window.InertiajsReact=BU;window.LucideReact=U_e;qHe();async function VHe(e,t){for(const a of Array.isArray(e)?e:[e]){const o=t[a];if(!(typeof o>"u"))return typeof o=="function"?o():o}throw new Error(`Page not found: ${e}`)}let aD=!1;eQ.on("navigate",e=>{aD=!0});eQ.on("finish",e=>{aD=!1});const CF=document.createElement.bind(document);document.createElement=function(e,t){const a=CF(e,t);return e.toLowerCase()==="iframe"&&aD?(console.warn("[Adminizer] Prevented iframe creation, forcing full page reload"),setTimeout(()=>{window.location.reload()},0),CF("div")):a};HHe({title:e=>`${e}`,resolve:e=>VHe(`./pages/${e}.tsx`,Object.assign({"./pages/add-group.tsx":()=>vn(()=>import("./add-group-BpWRqFus.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url),"./pages/add-user.tsx":()=>vn(()=>import("./add-user-GVaBm2Mv.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,22]),import.meta.url),"./pages/add.tsx":()=>vn(()=>import("./add-D4xeWCZw.js"),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url),"./pages/catalog.tsx":()=>vn(()=>import("./catalog-BO7zfOpo.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,25,26]),import.meta.url),"./pages/dashboard.tsx":()=>vn(()=>import("./dashboard-Bw-DdCUd.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,28]),import.meta.url),"./pages/form.tsx":()=>vn(()=>import("./form-D0JmJdV_.js"),__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,30]),import.meta.url),"./pages/history.tsx":()=>vn(()=>import("./history-7NIKnjNd.js"),__vite__mapDeps([31,3,4,16,15,5,17,18,19,1,2,6,7,8,9,10,11,12,13,14]),import.meta.url),"./pages/home.tsx":()=>vn(()=>import("./home-J1oiYf7u.js"),__vite__mapDeps([32,4,3,5]),import.meta.url),"./pages/init-user.tsx":()=>vn(()=>import("./init-user-CsEDYKZe.js"),__vite__mapDeps([33,3,4,18,5]),import.meta.url),"./pages/list.tsx":()=>vn(()=>import("./list-BOQL0Z1i.js"),__vite__mapDeps([34,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,35,25,36]),import.meta.url),"./pages/login.tsx":()=>vn(()=>import("./login-puJIq5NA.js"),__vite__mapDeps([37,15,4,3,5,18]),import.meta.url),"./pages/module.tsx":()=>vn(()=>import("./module-aSIhXeVL.js"),__vite__mapDeps([38,3,4,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url),"./pages/notification.tsx":()=>vn(()=>import("./notification-D8j64-iM.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,40]),import.meta.url),"./pages/register.tsx":()=>vn(()=>import("./register-C2TFSMX0.js"),__vite__mapDeps([41,3,4,18,5]),import.meta.url),"./pages/welcome.tsx":()=>vn(()=>import("./welcome-BBz6oL-7.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url)})),setup({el:e,App:t,props:a}){Eoe.createRoot(e).render(M.jsx(t,{...a}))},progress:{color:"#0f4898"}});export{bK as $,k$e as A,bA as B,lr as C,kX as D,d5 as E,g$e as F,qNe as G,HNe as H,DX as I,VNe as J,GNe as K,Fs as L,JO as M,_Y as N,SY as O,k2 as P,CY as Q,pHe as R,kDe as S,Yqe as T,C$e as U,I$e as V,hr as W,pj as X,c2 as Y,s2 as Z,SSe as _,l5 as a,W8 as a$,wK as a0,hv as a1,W1 as a2,_K as a3,zNe as a4,fHe as a5,yHe as a6,kHe as a7,gHe as a8,mHe as a9,ee as aA,DIe as aB,OIe as aC,kf as aD,Jp as aE,af as aF,sf as aG,PIe as aH,Rs as aI,kt as aJ,V2 as aK,bn as aL,It as aM,wZ as aN,_Z as aO,xe as aP,Pn as aQ,qA as aR,z7 as aS,mM as aT,gze as aU,KHe as aV,xje as aW,by as aX,Cje as aY,Aje as aZ,xze as a_,MHe as aa,vc as ab,$W as ac,OW as ad,DW as ae,zW as af,gG as ag,koe as ah,Moe as ai,PU as aj,pVe as ak,PE as al,jx as am,wze as an,vl as ao,bi as ap,JU as aq,bHe as ar,zHe as as,tD as at,lb as au,U8 as av,k_ as aw,sr as ax,GL as ay,M1 as az,Dje as b,GO as b$,Fb as b0,Vc as b1,T$e as b2,Hw as b3,R$e as b4,Mze as b5,Sze as b6,Rze as b7,$ze as b8,NPe as b9,Un as bA,l7 as bB,mVe as bC,yVe as bD,fVe as bE,Ize as bF,Tze as bG,LLe as bH,ILe as bI,e0 as bJ,jDe as bK,_N as bL,_7 as bM,CN as bN,qre as bO,Hre as bP,Vre as bQ,Ije as bR,Ox as bS,uVe as bT,hf as bU,g2 as bV,r1 as bW,S_ as bX,VPe as bY,BPe as bZ,FPe as b_,LPe as ba,APe as bb,Pze as bc,t4 as bd,TPe as be,zPe as bf,qPe as bg,HPe as bh,RPe as bi,Eze as bj,BG as bk,ELe as bl,GG as bm,qze as bn,Hze as bo,Vze as bp,Lze as bq,Cze as br,G_e as bs,W_e as bt,Z_e as bu,K_e as bv,X_e as bw,Y_e as bx,nD as by,vqe as bz,xDe as c,UPe as c0,GPe as c1,vVe as c2,kVe as c3,gVe as c4,MVe as c5,MDe as d,bDe as e,_De as f,hLe as g,Nt as h,N$e as i,M as j,L$e as k,E$e as l,yP as m,Fre as n,Jw as o,Gf as p,MX as q,VU as r,wje as s,Dqe as t,MA as u,fc as v,_je as w,Sje as x,d$e as y,u$e as z};
|
|
8073
|
+
*/const OHe={languageCode:"zh-CN",[Fo]:"上方插入行",[Bo]:"下方插入行",[Vo]:"左方插入列",[Ho]:"右方插入列",[qo]:["移除该行","移除多行"],[zo]:["移除该列","移除多列"],[Do]:"撤销",[Oo]:"恢复",[Po]:"只读",[jo]:"清空该列",[$o]:"对齐",[Ro]:"左对齐",[To]:"水平居中",[Ao]:"右对齐",[Io]:"两端对齐",[Eo]:"顶端对齐",[Lo]:"垂直居中",[No]:"底端对齐",[Co]:"冻结该列",[So]:"取消冻结",[_o]:"边框",[wo]:"上",[bo]:"右",[xo]:"下",[Mo]:"左",[go]:"移除边框",[ko]:"插入批注",[vo]:"编辑批注",[mo]:"删除批注",[yo]:"只读批注",[fo]:"合并",[po]:"取消合并",[ho]:"复制",[Jd]:"带标题的复制",[Qd]:"带标题组的复制",[Yd]:"仅复制标题",[uo]:"剪切",[lo]:"插入子行",[so]:"与母行分离",[co]:["隐藏该列","隐藏多列"],[io]:["显示该列","显示多列"],[ro]:["隐藏该行","隐藏多行"],[oo]:["显示该行","显示多行"],[ao]:"无",[no]:"为空",[to]:"不为空",[eo]:"等于",[Ja]:"不等于",[Qa]:"开头是",[Ya]:"结尾是",[Ka]:"包含",[Xa]:"不包含",[Za]:"大于",[Wa]:"大于或等于",[Ga]:"小于",[Ua]:"小于或等于",[Fa]:"在此范围",[Ba]:"不在此范围",[Va]:"之后",[Ha]:"之前",[qa]:"今天",[za]:"明天",[Da]:"昨天",[Oa]:"空白单元格",[Pa]:"按条件过滤",[ja]:"按值过滤",[$a]:"且",[Ra]:"或",[Ta]:"全选",[Aa]:"清除",[Ia]:"确认",[Ea]:"取消",[La]:"搜索",[Na]:"值",[Ca]:"第二值"};kee();const SF={de:NHe,en:xee,es:LHe,fr:EHe,it:IHe,ja:AHe,ko:THe,nl:RHe,pl:$He,pt:jHe,ru:PHe,zh:OHe},DHe=document.documentElement.lang,YY=SF[DHe]??SF.en;gee(YY);const QY=({config:e,data:t=[],onChange:a,disabled:o})=>{const{appearance:i}=tD(),[s,l]=p.useState("ht-theme-main"),[h,f]=p.useState(!1),y=p.useCallback((m,x)=>{var b,w;if(x==="loadData")return;const S=(w=(b=k.current)==null?void 0:b.hotInstance)==null?void 0:w.getSourceData();a(S)},[]),k=p.useRef(null);return p.useEffect(()=>{const m=setTimeout(()=>{var x;(x=k.current)!=null&&x.hotInstance&&(k.current.hotInstance.loadData(t??[]),f(!0))},100);return()=>clearTimeout(m)},[t]),p.useEffect(()=>{l(i==="dark"?"ht-theme-main-dark":"ht-theme-main")},[i]),M.jsx("div",{style:{opacity:h?1:0},children:M.jsx(Mee,{className:o?"pointer-events-none opacity-50":"",themeName:s,language:YY.languageCode,ref:k,...e,afterChange:y,children:e.columns.map(m=>M.jsx(bee,{data:m.data,...m},m.data))})})},kVe=Object.freeze(Object.defineProperty({__proto__:null,default:QY},Symbol.toStringTag,{value:"Module"})),zHe=()=>{const[e,t]=p.useState({width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768});return p.useEffect(()=>{if(typeof window>"u")return;const a=()=>{t({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),e},JY=({onChange:e,value:t,options:a,disabled:o})=>{const{appearance:i}=tD(),[s,l]=p.useState("light"),h=p.useRef(null),f=p.useRef(null),{width:y}=zHe(),k=y<768,m=y>=768&&y<1024,x=_=>{e(_)},S=_=>{h.current=_,b()},b=()=>{var N;if(!h.current)return;const _={minimap:{enabled:!k},fontSize:k?12:m?13:14,lineNumbers:k?"off":"on",lineDecorationsWidth:k?5:10,scrollBeyondLastLine:!k,wordWrap:k?"on":"bounded",renderWhitespace:k?"none":"selection",padding:{top:k?8:16,bottom:k?8:16}};h.current.updateOptions(_),(N=f.current)==null||N.classList.add("overflow-hidden"),setTimeout(()=>{var L,I;(L=h.current)==null||L.layout(),(I=f.current)==null||I.classList.remove("overflow-hidden")},100)};p.useEffect(()=>{l(i==="dark"?"vs-dark":"light")},[i]),p.useEffect(()=>{b()},[y]);const w=k?"300px":m?"400px":"500px";return M.jsx("div",{className:`border rounded-lg ${k?"p-1":"p-2"}`,ref:f,children:M.jsx(wee,{height:w,language:a.language,value:t,theme:s,options:{automaticLayout:!0,...k&&{wordWrap:"on"},minimap:{enabled:!k}},onChange:x,onMount:S,className:`transition-all duration-200 ease-in-out ${o?"pointer-events-none opacity-50 cursor-not-allowed":""}`})})},gVe=Object.freeze(Object.defineProperty({__proto__:null,default:JY},Symbol.toStringTag,{value:"Module"})),jj=xA("m-1 flex items-center border rounded-sm px-1",{variants:{variant:{default:"border-foreground/10 text-foreground bg-card hover:bg-card/80",secondary:"border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",inverted:"inverted"}},defaultVariants:{variant:"default"}}),nD=p.forwardRef(({options:e,onValueChange:t,variant:a,processing:o,disabled:i,defaultValue:s=[],placeholder:l="",notFound:h="",search:f="",animation:y=0,maxCount:k=3,modalPopover:m=!1,asChild:x=!1,className:S,mode:b="multiple",onOpenItem:w,onAddNew:_,...N},L)=>{const O=MA().props.uiMessages||{},[D,P]=p.useState(s),[A,j]=p.useState(!1),[V,K]=p.useState(!1);p.useEffect(()=>{s&&P(s)},[s]);const q=$=>{if($.key==="Enter")j(!0);else if($.key==="Backspace"&&!$.currentTarget.value){const T=[...D];T.pop(),P(T),t(T)}},B=$=>{let T;b==="single"?T=D.includes($)?[]:[$]:T=D.includes($)?D.filter(G=>G!==$):[...D,$],P(T),t(T),b==="single"&&j(!1)},F=()=>{P([]),t([])},J=()=>{j($=>!$)},pe=()=>{const $=D.slice(0,k);P($),t($)},R=()=>_?M.jsxs("div",{role:"button",className:ee("m-1 cursor-pointer",V?"animate-bounce":"",jj({variant:a})),style:{animationDuration:`${y}s`},onClick:$=>{$.stopPropagation(),_()},children:[M.jsx(k2,{className:"mr-1 h-3.5 w-3.5"}),M.jsx("span",{children:O.Add||"Add"})]}):null;return M.jsxs(bK,{open:A,onOpenChange:j,modal:m,children:[M.jsx(wK,{asChild:!0,children:M.jsx(bA,{ref:L,...N,onClick:J,disabled:i,className:ee("flex w-full p-1 rounded-md border-input border-1 min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit [&_svg]:pointer-events-auto",S),children:D.length>0?M.jsxs("div",{className:"flex justify-between items-center w-full",children:[M.jsxs("div",{className:"flex flex-wrap items-center",children:[D.slice(0,k).map($=>{const T=e.find(W=>W.value===$),G=T==null?void 0:T.icon;return M.jsxs("div",{className:ee(V?"animate-bounce":"",jj({variant:a})),style:{animationDuration:`${y}s`},children:[G&&M.jsx(G,{className:"h-4 w-4 mr-2"}),T==null?void 0:T.label,w&&M.jsx(v2,{className:"ml-2 h-4 w-4 cursor-pointer text-muted-foreground hover:text-foreground",onClick:W=>{W.stopPropagation(),w($)}}),M.jsx(Or,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:W=>{W.stopPropagation(),o||B($)}})]},$)}),b==="multiple"&&D.length>k&&M.jsxs("div",{className:ee("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",V?"animate-bounce":"",jj({variant:a})),style:{animationDuration:`${y}s`},children:[`+ ${D.length-k} more`,M.jsx(Or,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:$=>{$.stopPropagation(),pe()}})]}),R()]}),M.jsxs("div",{className:"flex items-center justify-between",children:[D.length>0&&M.jsxs(M.Fragment,{children:[M.jsx(bi,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:$=>{$.stopPropagation(),F()}}),M.jsx(KO,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),M.jsx(xi,{className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):M.jsxs("div",{className:"flex items-center justify-between w-full mx-auto",children:[M.jsx("span",{className:"text-sm text-muted-foreground mx-3",children:l}),M.jsxs("div",{className:"flex items-center",children:[R(),M.jsx(xi,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})]})})}),M.jsx(_K,{className:"w-auto p-0 z-[1003]",align:"start",onEscapeKeyDown:()=>j(!1),children:M.jsxs(dO,{children:[M.jsx(HW,{placeholder:f,onKeyDown:q}),M.jsxs(VW,{children:[M.jsx(BW,{children:h}),M.jsx(FW,{children:e.map($=>{const T=D.includes($.value);return M.jsxs(GW,{onSelect:()=>B($.value),className:"cursor-pointer",children:[M.jsx("div",{className:ee("mr-2 flex h-5 w-5 items-center justify-center rounded border border-primary",T?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:M.jsx(sr,{className:"h-4 w-4 text-primary-foreground"})}),$.icon&&M.jsx($.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),M.jsx("span",{children:$.label})]},$.value)})}),M.jsx(UW,{})]})]})}),y>0&&D.length>0&&b==="multiple"&&M.jsx(ki,{className:ee("cursor-pointer my-2 text-foreground bg-background w-3 h-3",V?"":"text-muted-foreground"),onClick:()=>K(!V)})]})});nD.displayName="MultiSelect";const MVe=Object.freeze(Object.defineProperty({__proto__:null,default:nD},Symbol.toStringTag,{value:"Module"}));function qHe(){window.UIComponents??(window.UIComponents={}),window.JSComponents??(window.JSComponents={}),window.axios=Nt,window.sonner=Kqe,Object.assign(window.UIComponents,{Avatar:qre,AvatarImage:Hre,AvatarFallback:Vre,Badge:Fre,Breadcrumb:G_e,BreadcrumbList:W_e,BreadcrumbItem:Z_e,BreadcrumbLink:X_e,BreadcrumbPage:K_e,BreadcrumbSeparator:Y_e,BreadcrumbEllipsis:Q_e,Button:bA,Calendar:zNe,Card:qNe,CardHeader:HNe,CardFooter:GNe,CardTitle:VNe,CardAction:FNe,CardDescription:BNe,CardContent:UNe,Checkbox:hLe,Collapsible:LLe,CollapsibleTrigger:ELe,CollapsibleContent:ILe,Command:dO,CommandDialog:zIe,CommandInput:HW,CommandList:VW,CommandEmpty:BW,CommandGroup:FW,CommandItem:GW,CommandShortcut:qIe,CommandSeparator:UW,ContextMenu:d$e,ContextMenuTrigger:u$e,ContextMenuContent:k$e,ContextMenuItem:g$e,ContextMenuCheckboxItem:M$e,ContextMenuRadioItem:x$e,ContextMenuLabel:b$e,ContextMenuSeparator:w$e,ContextMenuShortcut:_$e,ContextMenuGroup:h$e,ContextMenuPortal:p$e,ContextMenuSub:f$e,ContextMenuSubContent:v$e,ContextMenuSubTrigger:m$e,ContextMenuRadioGroup:y$e,Dialog:$W,DialogClose:OIe,DialogContent:OW,DialogDescription:qW,DialogFooter:DIe,DialogHeader:DW,DialogOverlay:PW,DialogPortal:jW,DialogTitle:zW,DialogTrigger:PIe,DialogStack:kX,DialogStackTrigger:C$e,DialogStackOverlay:N$e,DialogStackBody:L$e,DialogStackContent:E$e,DialogStackTitle:I$e,DialogStackDescription:A$e,DialogStackHeader:T$e,DialogStackFooter:R$e,DialogStackNext:$$e,DialogStackPrevious:j$e,DropdownMenu:xje,DropdownMenuPortal:bje,DropdownMenuTrigger:wje,DropdownMenuContent:_je,DropdownMenuGroup:Sje,DropdownMenuLabel:Ije,DropdownMenuItem:Cje,DropdownMenuCheckboxItem:Nje,DropdownMenuRadioGroup:Lje,DropdownMenuRadioItem:Eje,DropdownMenuSeparator:Aje,DropdownMenuShortcut:Tje,DropdownMenuSub:Rje,DropdownMenuSubTrigger:$je,DropdownMenuSubContent:jje,Input:DX,Label:Dje,Menubar:NPe,MenubarPortal:sK,MenubarMenu:LPe,MenubarTrigger:APe,MenubarContent:TPe,MenubarGroup:EPe,MenubarSeparator:OPe,MenubarLabel:PPe,MenubarItem:RPe,MenubarShortcut:DPe,MenubarCheckboxItem:$Pe,MenubarRadioGroup:IPe,MenubarRadioItem:jPe,MenubarSub:zPe,MenubarSubTrigger:qPe,MenubarSubContent:HPe,Pagination:VPe,PaginationContent:BPe,PaginationLink:GO,PaginationItem:FPe,PaginationPrevious:UPe,PaginationNext:GPe,PaginationEllipsis:WPe,Popover:bK,PopoverTrigger:wK,PopoverContent:_K,PopoverAnchor:vOe,Select:kDe,SelectContent:bDe,SelectGroup:gDe,SelectItem:_De,SelectLabel:wDe,SelectScrollDownButton:rY,SelectScrollUpButton:oY,SelectSeparator:SDe,SelectTrigger:xDe,SelectValue:MDe,Separator:KO,Sheet:cY,SheetTrigger:IDe,SheetClose:ADe,SheetContent:sY,SheetHeader:lY,SheetFooter:$De,SheetTitle:dY,SheetDescription:uY,Sidebar:Mze,SidebarContent:Lze,SidebarFooter:Cze,SidebarGroup:Eze,SidebarGroupAction:Aze,SidebarGroupContent:Tze,SidebarGroupLabel:Ize,SidebarHeader:Sze,SidebarInput:_ze,SidebarInset:wze,SidebarMenu:Rze,SidebarMenuAction:Oze,SidebarMenuBadge:Dze,SidebarMenuButton:Pze,SidebarMenuItem:$ze,SidebarMenuSkeleton:zze,SidebarMenuSub:qze,SidebarMenuSubButton:Vze,SidebarMenuSubItem:Hze,SidebarProvider:gze,SidebarRail:bze,SidebarSeparator:Nze,SidebarTrigger:xze,useSidebar:e0,Skeleton:yP,Slider:vqe,Toaster:Yqe,Switch:pHe,Table:fHe,TableHeader:yHe,TableBody:mHe,TableFooter:vHe,TableHead:gHe,TableRow:kHe,TableCell:MHe,TableCaption:xHe,Textarea:bHe,Tooltip:_Y,TooltipTrigger:SY,TooltipContent:CY,TooltipProvider:JO,VanillaJSONEditor:bP}),Object.assign(window.JSComponents,{VanillaJSONEditor:bP,HandsonTable:QY,MonacoEditor:JY,MultiSelect:nD})}const{createInertiaApp:HHe,router:eQ}=BU;window.React=ke;window.ReactDOM=ur;window.InertiajsReact=BU;window.LucideReact=U_e;qHe();async function VHe(e,t){for(const a of Array.isArray(e)?e:[e]){const o=t[a];if(!(typeof o>"u"))return typeof o=="function"?o():o}throw new Error(`Page not found: ${e}`)}let aD=!1;eQ.on("navigate",e=>{aD=!0});eQ.on("finish",e=>{aD=!1});const CF=document.createElement.bind(document);document.createElement=function(e,t){const a=CF(e,t);return e.toLowerCase()==="iframe"&&aD?(console.warn("[Adminizer] Prevented iframe creation, forcing full page reload"),setTimeout(()=>{window.location.reload()},0),CF("div")):a};HHe({title:e=>`${e}`,resolve:e=>VHe(`./pages/${e}.tsx`,Object.assign({"./pages/add-group.tsx":()=>vn(()=>import("./add-group-HP1jb7VA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url),"./pages/add-user.tsx":()=>vn(()=>import("./add-user-CwpoBhnE.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,22]),import.meta.url),"./pages/add.tsx":()=>vn(()=>import("./add-C6B3ZwYc.js"),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url),"./pages/catalog.tsx":()=>vn(()=>import("./catalog-BiqXcqJM.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,25,26]),import.meta.url),"./pages/dashboard.tsx":()=>vn(()=>import("./dashboard-CJeHMGdM.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,28]),import.meta.url),"./pages/form.tsx":()=>vn(()=>import("./form-BMWREamR.js"),__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,30]),import.meta.url),"./pages/history.tsx":()=>vn(()=>import("./history-Yi7SOnuz.js"),__vite__mapDeps([31,3,4,16,15,5,17,18,19,1,2,6,7,8,9,10,11,12,13,14]),import.meta.url),"./pages/home.tsx":()=>vn(()=>import("./home-LTHyVJhs.js"),__vite__mapDeps([32,4,3,5]),import.meta.url),"./pages/init-user.tsx":()=>vn(()=>import("./init-user-CsEDYKZe.js"),__vite__mapDeps([33,3,4,18,5]),import.meta.url),"./pages/list.tsx":()=>vn(()=>import("./list-BjO-TbRf.js"),__vite__mapDeps([34,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,35,25,36]),import.meta.url),"./pages/login.tsx":()=>vn(()=>import("./login-puJIq5NA.js"),__vite__mapDeps([37,15,4,3,5,18]),import.meta.url),"./pages/module.tsx":()=>vn(()=>import("./module-AhIlQK_S.js"),__vite__mapDeps([38,3,4,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url),"./pages/notification.tsx":()=>vn(()=>import("./notification-yiRh6g8N.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,40]),import.meta.url),"./pages/register.tsx":()=>vn(()=>import("./register-C2TFSMX0.js"),__vite__mapDeps([41,3,4,18,5]),import.meta.url),"./pages/welcome.tsx":()=>vn(()=>import("./welcome-B9W9z-dG.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url)})),setup({el:e,App:t,props:a}){Eoe.createRoot(e).render(M.jsx(t,{...a}))},progress:{color:"#0f4898"}});export{bK as $,k$e as A,bA as B,lr as C,kX as D,d5 as E,g$e as F,qNe as G,HNe as H,DX as I,VNe as J,GNe as K,Fs as L,JO as M,_Y as N,SY as O,k2 as P,CY as Q,pHe as R,kDe as S,Yqe as T,C$e as U,I$e as V,hr as W,pj as X,c2 as Y,s2 as Z,SSe as _,l5 as a,W8 as a$,wK as a0,hv as a1,W1 as a2,_K as a3,zNe as a4,fHe as a5,yHe as a6,kHe as a7,gHe as a8,mHe as a9,ee as aA,DIe as aB,OIe as aC,kf as aD,Jp as aE,af as aF,sf as aG,PIe as aH,Rs as aI,kt as aJ,V2 as aK,bn as aL,It as aM,wZ as aN,_Z as aO,xe as aP,Pn as aQ,qA as aR,z7 as aS,mM as aT,gze as aU,KHe as aV,xje as aW,by as aX,Cje as aY,Aje as aZ,xze as a_,MHe as aa,vc as ab,$W as ac,OW as ad,DW as ae,zW as af,gG as ag,koe as ah,Moe as ai,PU as aj,pVe as ak,PE as al,jx as am,wze as an,vl as ao,bi as ap,JU as aq,bHe as ar,zHe as as,tD as at,lb as au,U8 as av,k_ as aw,sr as ax,GL as ay,M1 as az,Dje as b,GO as b$,Fb as b0,Vc as b1,T$e as b2,Hw as b3,R$e as b4,Mze as b5,Sze as b6,Rze as b7,$ze as b8,NPe as b9,Un as bA,l7 as bB,mVe as bC,yVe as bD,fVe as bE,Ize as bF,Tze as bG,LLe as bH,ILe as bI,e0 as bJ,jDe as bK,_N as bL,_7 as bM,CN as bN,qre as bO,Hre as bP,Vre as bQ,Ije as bR,Ox as bS,uVe as bT,hf as bU,g2 as bV,r1 as bW,S_ as bX,VPe as bY,BPe as bZ,FPe as b_,LPe as ba,APe as bb,Pze as bc,t4 as bd,TPe as be,zPe as bf,qPe as bg,HPe as bh,RPe as bi,Eze as bj,BG as bk,ELe as bl,GG as bm,qze as bn,Hze as bo,Vze as bp,Lze as bq,Cze as br,G_e as bs,W_e as bt,Z_e as bu,K_e as bv,X_e as bw,Y_e as bx,nD as by,vqe as bz,xDe as c,UPe as c0,GPe as c1,vVe as c2,kVe as c3,gVe as c4,MVe as c5,MDe as d,bDe as e,_De as f,hLe as g,Nt as h,N$e as i,M as j,L$e as k,E$e as l,yP as m,Fre as n,Jw as o,Gf as p,MX as q,VU as r,wje as s,Dqe as t,MA as u,fc as v,_je as w,Sje as x,d$e as y,u$e as z};
|