adminizer 4.6.0-build.210 → 4.6.0-build.212
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/app.js +3 -3
- package/assets/{catalog-RUS5EBuy.js → catalog-BoonmK4z.js} +3 -3
- package/assets/{home-C_xUaJoJ.js → home-Bk_HC60_.js} +2 -2
- package/assets/{list-CDFtsuUr.js → list-CpkT1A5r.js} +1 -1
- package/assets/{list-table-PLHaED_1.js → list-table-DIi7YPGB.js} +1 -1
- package/assets/manifest.json +6 -6
- package/assets/module-BDXazYdM.js +1 -0
- package/assets/pagination-render-DxD78ahJ.js +1 -0
- package/lib/Adminizer.js +2 -4
- package/lib/I18n.js +3 -1
- package/package.json +1 -1
- package/policies/setLocale.js +3 -5
- package/system/bindInertia.js +18 -1
- package/system/bindReqFunctions.js +37 -5
- package/translations/ar.json +70 -2
- package/translations/cn.json +69 -1
- package/translations/de.json +72 -4
- package/translations/en.json +13 -1
- package/translations/es.json +69 -1
- package/translations/fr.json +70 -2
- package/translations/hi.json +69 -1
- package/translations/jp.json +69 -1
- package/translations/ko.json +69 -1
- package/translations/pt.json +72 -4
- package/translations/ru.json +57 -2
- package/translations/ua.json +72 -4
- package/translations/uz.json +69 -1
- package/translations/vi.json +71 -3
- package/ui/components/ui/pagination.d.ts +6 -2
- package/ui/components/ui/pagination.js +4 -4
- package/assets/module-CrRDdlUP.js +0 -1
- package/assets/pagination-render-40Bk8JSz.js +0 -1
package/assets/app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./add-group-Bjq2R0iV.js","./app-layout-mT3oXgd7.js","./app-shell-DbPu3ZPM.js","./handsontable-PxYdjN8c.js","./jsoneditor-De1FvcYu.js","./monaco-BhBYtg3d.js","./app-sidebar-DEpxtufv.js","./nav-main-CroFjRVi.js","./material-icon-BXxpxGAd.js","./app-sidebar-header-BeiWUuCC.js","./breadcrumbs-CZZirDj8.js","./nav-user-DIuv8mfu.js","./user-info-DtBK5Kh8.js","./user-menu-content-bdKtg5yV.js","./theme-switcher-2tPEnSJf.js","./icon-BTIjB9Wk.js","./RelationDialogStack-CJ8JvUDg.js","./dynamic-controls-k61T9W2P.js","./input-error-CSrUHo1P.js","./RelationDialogStack-DV8OITPR.css","./add-group-form-B7c4coU-.js","./add-user-ChZGses8.js","./add-user-form-BXSGx38D.js","./add-COpwiOsy.js","./catalog-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./add-group-Bjq2R0iV.js","./app-layout-mT3oXgd7.js","./app-shell-DbPu3ZPM.js","./handsontable-PxYdjN8c.js","./jsoneditor-De1FvcYu.js","./monaco-BhBYtg3d.js","./app-sidebar-DEpxtufv.js","./nav-main-CroFjRVi.js","./material-icon-BXxpxGAd.js","./app-sidebar-header-BeiWUuCC.js","./breadcrumbs-CZZirDj8.js","./nav-user-DIuv8mfu.js","./user-info-DtBK5Kh8.js","./user-menu-content-bdKtg5yV.js","./theme-switcher-2tPEnSJf.js","./icon-BTIjB9Wk.js","./RelationDialogStack-CJ8JvUDg.js","./dynamic-controls-k61T9W2P.js","./input-error-CSrUHo1P.js","./RelationDialogStack-DV8OITPR.css","./add-group-form-B7c4coU-.js","./add-user-ChZGses8.js","./add-user-form-BXSGx38D.js","./add-COpwiOsy.js","./catalog-BoonmK4z.js","./del-modal-CF3OUMvW.js","./catalog-D4n6dpGl.css","./dashboard-5NZ3QseL.js","./dashboard-BOltB2Hq.css","./form-Cb-Rvm4q.js","./form-WqY1RtmV.js","./history-B_8v8I3J.js","./home-Bk_HC60_.js","./init-user-CsEDYKZe.js","./list-CpkT1A5r.js","./list-table-DIi7YPGB.js","./pagination-render-DxD78ahJ.js","./login-puJIq5NA.js","./module-BDXazYdM.js","./notification-Deuf56Yd.js","./tabs-DTgMEGE8.js","./register-C2TFSMX0.js","./welcome-BerxxdCf.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{a as see,c as GH,b as xa,s as Ma,d as ga,i as Mi,h as SF,m as jj,e as lee,f as dee,z as uee,v as hee,_ as vn}from"./jsoneditor-De1FvcYu.js";import{r as p,e as ke,a as Kd,b as CF,c as pee,R as bP,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 fee,at as yee,au as mee,av as vee,aw as kee,ax as gee,ay as Mee,az as xee}from"./handsontable-PxYdjN8c.js";import{F as bee}from"./monaco-BhBYtg3d.js";var o$={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},kIe="DialogDescriptionWarning",gIe=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${xW(kIe).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},oO=cW,bW=lW,rO=uW,iO=hW,cO=pW,wW=yW,_W=vW,AA=gW,l2='[cmdk-group=""]',Lj='[cmdk-group-items=""]',MIe='[cmdk-group-heading=""]',SW='[cmdk-item=""]',rF=`${SW}:not([aria-disabled="true"])`,eP="cmdk-item-select",zd="data-value",xIe=(e,t,a)=>DLe(e,t,a),CW=p.createContext(void 0),z2=()=>p.useContext(CW),NW=p.createContext(void 0),sO=()=>p.useContext(NW),LW=p.createContext(void 0),EW=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=IW(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=TIe();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:xIe;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(Lj);ye?ye.appendChild(ie.parentElement===ye?ie:ie.closest(`${Lj} > *`)):le.appendChild(ie.parentElement===le?ie:ie.closest(`${Lj} > *`))}),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(MIe))==null||le.scrollIntoView({block:"nearest"})),ie.scrollIntoView({block:"nearest"}))}function J(){var X;return(X=D.current)==null?void 0:X.querySelector(`${SW}[aria-selected="true"]`)}function pe(){var X;return Array.from(((X=D.current)==null?void 0:X.querySelectorAll(rF))||[])}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?IIe(le,l2):AIe(le,l2),ie=le==null?void 0:le.querySelector(rF);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(eP);ie.dispatchEvent(ye)}}}}},p.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:$Ie},f),TA(e,X=>p.createElement(NW.Provider,{value:A},p.createElement(CW.Provider,{value:j},X))))}),bIe=p.forwardRef((e,t)=>{var a,o;let i=It(),s=p.useRef(null),l=p.useContext(LW),h=z2(),f=IW(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=AW(i,s,[e.value,e.children,s],e.keywords),m=sO(),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(eP,b),()=>P.removeEventListener(eP,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)}),wIe=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=z2(),m=Ci(S=>i||k.filter()===!1?!0:S.search?S.filtered.groups.has(l):!0);V1(()=>k.group(l),[]),AW(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),TA(e,S=>p.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?y:void 0},p.createElement(LW.Provider,{value:x},S))))}),_Ie=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"})}),SIe=p.forwardRef((e,t)=>{let{onValueChange:a,...o}=e,i=e.value!=null,s=sO(),l=Ci(y=>y.search),h=Ci(y=>y.selectedItemId),f=z2();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)}})}),CIe=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=z2();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},TA(e,y=>p.createElement("div",{ref:kt(l,f.listInnerRef),"cmdk-list-sizer":""},y)))}),NIe=p.forwardRef((e,t)=>{let{open:a,onOpenChange:o,overlayClassName:i,contentClassName:s,container:l,...h}=e;return p.createElement(oO,{open:a,onOpenChange:o},p.createElement(rO,{container:l},p.createElement(iO,{"cmdk-overlay":"",className:i}),p.createElement(cO,{"aria-label":e.label,"cmdk-dialog":"",className:s},p.createElement(EW,{ref:t,...h}))))}),LIe=p.forwardRef((e,t)=>Ci(a=>a.filtered.count===0)?p.createElement(jn.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),EIe=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},TA(e,l=>p.createElement("div",{"aria-hidden":!0},l)))}),Z1=Object.assign(EW,{List:CIe,Item:bIe,Input:SIe,Group:wIe,Separator:_Ie,Dialog:NIe,Empty:LIe,Loading:EIe});function IIe(e,t){let a=e.nextElementSibling;for(;a;){if(a.matches(t))return a;a=a.nextElementSibling}}function AIe(e,t){let a=e.previousElementSibling;for(;a;){if(a.matches(t))return a;a=a.previousElementSibling}}function IW(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=sO(),a=()=>e(t.snapshot());return p.useSyncExternalStore(t.subscribe,a,a)}function AW(e,t,a,o=[]){let i=p.useRef(),s=z2();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 TIe=()=>{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 RIe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function TA({asChild:e,children:t},a){return e&&p.isValidElement(t)?p.cloneElement(RIe(t),{ref:t.ref},a(t.props.children)):a(t)}var $Ie={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function TW({...e}){return M.jsx(oO,{"data-slot":"dialog",...e})}function jIe({...e}){return M.jsx(bW,{"data-slot":"dialog-trigger",...e})}function RW({...e}){return M.jsx(rO,{"data-slot":"dialog-portal",...e})}function PIe({...e}){return M.jsx(AA,{"data-slot":"dialog-close",...e})}function $W({className:e,...t}){return M.jsx(iO,{"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 jW({className:e,children:t,...a}){return M.jsxs(RW,{"data-slot":"dialog-portal",children:[M.jsx($W,{}),M.jsxs(cO,{"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(AA,{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 PW({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 OIe({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 OW({className:e,...t}){return M.jsx(wW,{"data-slot":"dialog-title",className:ee("text-lg leading-none font-semibold",e),...t})}function DW({className:e,...t}){return M.jsx(_W,{"data-slot":"dialog-description",className:ee("text-muted-foreground text-sm",e),...t})}function lO({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 DIe({title:e="Command Palette",description:t="Search for a command to run...",children:a,...o}){return M.jsxs(TW,{...o,children:[M.jsxs(PW,{className:"sr-only",children:[M.jsx(OW,{children:e}),M.jsx(DW,{children:t})]}),M.jsx(jW,{className:"overflow-hidden p-0",children:M.jsx(lO,{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 zW({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 qW({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 HW({...e}){return M.jsx(Z1.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function VW({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 BW({className:e,...t}){return M.jsx(Z1.Separator,{"data-slot":"command-separator",className:ee("bg-border -mx-1 h-px",e),...t})}function FW({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 zIe({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 qIe(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,HIe(i,...t)]}function HIe(...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 VIe(e){const t=BIe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(UIe);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 BIe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=WIe(i),h=GIe(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 FIe=Symbol("radix.slottable");function UIe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===FIe}function GIe(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 WIe(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 ZIe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],XIe=ZIe.reduce((e,t)=>{const a=VIe(`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 KIe(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,YIe(i,...t)]}function YIe(...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 iF(e){const t=QIe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(eAe);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 QIe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=nAe(i),h=tAe(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 JIe=Symbol("radix.slottable");function eAe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JIe}function tAe(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 nAe(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 q2(e){const t=e+"CollectionProvider",[a,o]=KIe(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=iF(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=iF(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 aAe(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,oAe(i,...t)]}function oAe(...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 rAe=p.createContext(void 0);function H2(e){const t=p.useContext(rAe);return e||t||"ltr"}const iAe=["top","right","bottom","left"],Ni=Math.min,Gn=Math.max,nA=Math.round,_h=Math.floor,dr=e=>({x:e,y:e}),cAe={left:"right",right:"left",bottom:"top",top:"bottom"};function tP(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 dO(e){return e==="x"?"y":"x"}function uO(e){return e==="y"?"height":"width"}function cr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function hO(e){return dO(cr(e))}function sAe(e,t,a){a===void 0&&(a=!1);const o=ou(e),i=hO(e),s=uO(i);let l=i==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=aA(l)),[l,aA(l)]}function lAe(e){const t=aA(e);return[nP(e),t,nP(t)]}function nP(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const cF=["left","right"],sF=["right","left"],dAe=["top","bottom"],uAe=["bottom","top"];function hAe(e,t,a){switch(e){case"top":case"bottom":return a?t?sF:cF:t?cF:sF;case"left":case"right":return t?dAe:uAe;default:return[]}}function pAe(e,t,a,o){const i=ou(e);let s=hAe(Hr(e),a==="start",o);return i&&(s=s.map(l=>l+"-"+i),t&&(s=s.concat(s.map(nP)))),s}function aA(e){const t=Hr(e);return cAe[t]+e.slice(t.length)}function fAe(e){return{top:0,right:0,bottom:0,left:0,...e}}function UW(e){return typeof e!="number"?fAe(e):{top:e,right:e,bottom:e,left:e}}function oA(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 lF(e,t,a){let{reference:o,floating:i}=e;const s=cr(t),l=hO(t),h=uO(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 yAe(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=UW(S),_=h[x?m==="floating"?"reference":"floating":m],N=oA(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=oA(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 mAe=50,vAe=async(e,t,a)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:l}=a,h=l.detectOverflow?l:{...l,detectOverflow:yAe},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}=lF(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<mAe&&(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}=lF(y,x,f)),w=-1)}return{x:k,y:m,placement:x,strategy:i,middlewareData:b}},kAe=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=UW(k),x={x:a,y:o},S=hO(i),b=uO(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=tP(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}}}),gAe=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?[aA(h)]:lAe(h)),P=b!=="none";!x&&P&&D.push(...pAe(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=sAe(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 dF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uF(e){return iAe.some(t=>e[t]>=0)}const MAe=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=dF(l,a.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:uF(h)}}}case"escaped":{const l=await o.detectOverflow(t,{...s,altBoundary:!0}),h=dF(l,a.floating);return{data:{escapedOffsets:h,escaped:uF(h)}}}default:return{}}}}},GW=new Set(["left","top"]);async function xAe(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=GW.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 bAe=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 xAe(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}}}}},wAe=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=dO(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=tP(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=tP(I,w,O)}const _=f.fn({...t,[S]:b,[x]:w});return{..._,data:{x:_.x-a,y:_.y-o,enabled:{[S]:l,[x]:h}}}}}},_Ae=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=dO(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=GW.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}}}},SAe=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 RA(){return typeof window<"u"}function ru(e){return WW(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=(WW(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function WW(e){return RA()?e instanceof Node||e instanceof Wn(e).Node:!1}function _a(e){return RA()?e instanceof Element||e instanceof Wn(e).Element:!1}function Vr(e){return RA()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function hF(e){return!RA()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}function V2(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 CAe(e){return/^(table|td|th)$/.test(ru(e))}function $A(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const NAe=/transform|translate|scale|rotate|perspective|filter/,LAe=/paint|layout|strict|content/,nc=e=>!!e&&e!=="none";let Ej;function pO(e){const t=_a(e)?Sa(e):e;return nc(t.transform)||nc(t.translate)||nc(t.scale)||nc(t.rotate)||nc(t.perspective)||!fO()&&(nc(t.backdropFilter)||nc(t.filter))||NAe.test(t.willChange||"")||LAe.test(t.contain||"")}function EAe(e){let t=Li(e);for(;Vr(t)&&!Wd(t);){if(pO(t))return t;if($A(t))return null;t=Li(t)}return null}function fO(){return Ej==null&&(Ej=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ej}function Wd(e){return/^(html|body|#document)$/.test(ru(e))}function Sa(e){return Wn(e).getComputedStyle(e)}function jA(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||hF(e)&&e.host||pr(e);return hF(t)?t.host:t}function ZW(e){const t=Li(e);return Wd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(t)&&V2(t)?t:ZW(t)}function _2(e,t,a){var o;t===void 0&&(t=[]),a===void 0&&(a=!0);const i=ZW(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),l=Wn(i);if(s){const h=aP(l);return t.concat(l,l.visualViewport||[],V2(i)?i:[],h&&a?_2(h):[])}else return t.concat(i,_2(i,[],a))}function aP(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function XW(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=nA(a)!==s||nA(o)!==l;return h&&(a=s,o=l),{width:a,height:o,$:h}}function yO(e){return _a(e)?e:e.contextElement}function Bd(e){const t=yO(e);if(!Vr(t))return dr(1);const a=t.getBoundingClientRect(),{width:o,height:i,$:s}=XW(t);let l=(s?nA(a.width):a.width)/o,h=(s?nA(a.height):a.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!h||!Number.isFinite(h))&&(h=1),{x:l,y:h}}const IAe=dr(0);function KW(e){const t=Wn(e);return!fO()||!t.visualViewport?IAe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AAe(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=yO(e);let l=dr(1);t&&(o?_a(o)&&(l=Bd(o)):l=Bd(e));const h=AAe(s,a,o)?KW(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=aP(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=aP(b)}}return oA({width:k,height:m,x:f,y})}function PA(e,t){const a=jA(e).scrollLeft;return t?t.left+a:B1(pr(e)).left+a}function YW(e,t){const a=e.getBoundingClientRect(),o=a.left+t.scrollLeft-PA(e,a),i=a.top+t.scrollTop;return{x:o,y:i}}function TAe(e){let{elements:t,rect:a,offsetParent:o,strategy:i}=e;const s=i==="fixed",l=pr(o),h=t?$A(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"||V2(l))&&(f=jA(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?YW(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 RAe(e){return Array.from(e.getClientRects())}function $Ae(e){const t=pr(e),a=jA(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+PA(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 pF=25;function jAe(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=fO();(!k||k&&t==="fixed")&&(h=i.offsetLeft,f=i.offsetTop)}const y=PA(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<=pF&&(s-=b)}else y<=pF&&(s+=y);return{width:s,height:l,x:h,y:f}}function PAe(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 fF(e,t,a){let o;if(t==="viewport")o=jAe(e,a);else if(t==="document")o=$Ae(pr(e));else if(_a(t))o=PAe(t,a);else{const i=KW(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return oA(o)}function QW(e,t){const a=Li(e);return a===t||!_a(a)||Wd(a)?!1:Sa(a).position==="fixed"||QW(a,t)}function OAe(e,t){const a=t.get(e);if(a)return a;let o=_2(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=pO(l);!f&&h.position==="fixed"&&(i=null),(s?!f&&!i:!f&&h.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||V2(l)&&!f&&QW(e,l))?o=o.filter(k=>k!==l):i=h,l=Li(l)}return t.set(e,o),o}function DAe(e){let{element:t,boundary:a,rootBoundary:o,strategy:i}=e;const l=[...a==="clippingAncestors"?$A(t)?[]:OAe(t,this._c):[].concat(a),o],h=fF(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=fF(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 zAe(e){const{width:t,height:a}=XW(e);return{width:t,height:a}}function qAe(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=PA(i)}if(o||!o&&!s)if((ru(t)!=="body"||V2(i))&&(h=jA(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?YW(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 Ij(e){return Sa(e).position==="static"}function yF(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 JW(e,t){const a=Wn(e);if($A(e))return a;if(!Vr(e)){let i=Li(e);for(;i&&!Wd(i);){if(_a(i)&&!Ij(i))return i;i=Li(i)}return a}let o=yF(e,t);for(;o&&CAe(o)&&Ij(o);)o=yF(o,t);return o&&Wd(o)&&Ij(o)&&!pO(o)?a:o||EAe(e)||a}const HAe=async function(e){const t=this.getOffsetParent||JW,a=this.getDimensions,o=await a(e.floating);return{reference:qAe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function VAe(e){return Sa(e).direction==="rtl"}const BAe={convertOffsetParentRelativeRectToViewportRelativeRect:TAe,getDocumentElement:pr,getClippingRect:DAe,getOffsetParent:JW,getElementRects:HAe,getClientRects:RAe,getDimensions:zAe,getScale:Bd,isElement:_a,isRTL:VAe};function eZ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function FAe(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=_h(m),w=_h(i.clientWidth-(k+x)),_=_h(i.clientHeight-(m+S)),N=_h(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&&!eZ(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 UAe(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=yO(e),k=i||s?[...y?_2(y):[],...t?_2(t):[]]:[];k.forEach(N=>{i&&N.addEventListener("scroll",a,{passive:!0}),s&&N.addEventListener("resize",a)});const m=y&&h?FAe(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&&!eZ(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 GAe=bAe,WAe=wAe,ZAe=gAe,XAe=SAe,KAe=MAe,mF=kAe,YAe=_Ae,QAe=(e,t,a)=>{const o=new Map,i={platform:BAe,...a},s={...i.platform,_c:o};return vAe(e,t,{...i,platform:s})};var JAe=typeof document<"u",eTe=function(){},VI=JAe?p.useLayoutEffect:eTe;function rA(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(!rA(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)&&!rA(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function tZ(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vF(e,t){const a=tZ(e);return Math.round(t*a)/a}function Aj(e){const t=p.useRef(e);return VI(()=>{t.current=e}),t}function tTe(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);rA(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=Aj(f),q=Aj(i),B=Aj(y),F=p.useCallback(()=>{if(!P.current||!A.current)return;const T={placement:t,strategy:a,middleware:x};q.current&&(T.platform=q.current),QAe(P.current,A.current,T).then(G=>{const W={...G,isPositioned:B.current!==!1};J.current&&!rA(j.current,W)&&(j.current=W,Kd.flushSync(()=>{m(W)}))})},[x,t,a,q,B]);VI(()=>{y===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,m(T=>({...T,isPositioned:!1})))},[y]);const J=p.useRef(!1);VI(()=>(J.current=!0,()=>{J.current=!1}),[]),VI(()=>{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=vF(R.floating,k.x),W=vF(R.floating,k.y);return h?{...T,transform:"translate("+G+"px, "+W+"px)",...tZ(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 nTe=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?mF({element:o.current,padding:i}).fn(a):{}:o?mF({element:o,padding:i}).fn(a):{}}}},aTe=(e,t)=>{const a=GAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},oTe=(e,t)=>{const a=WAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},rTe=(e,t)=>({fn:YAe(e).fn,options:[e,t]}),iTe=(e,t)=>{const a=ZAe(e);return{name:a.name,fn:a.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=nTe(e);return{name:a.name,fn:a.fn,options:[e,t]}};function dTe(e){const t=uTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(pTe);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 uTe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=yTe(i),h=fTe(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 hTe=Symbol("radix.slottable");function pTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hTe}function fTe(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 mTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vTe=mTe.reduce((e,t)=>{const a=dTe(`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}},{}),kTe="Arrow",nZ=p.forwardRef((e,t)=>{const{children:a,width:o=10,height:i=5,...s}=e;return M.jsx(vTe.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"})})});nZ.displayName=kTe;var gTe=nZ;function MTe(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,xTe(i,...t)]}function xTe(...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 bTe(e){const t=wTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(STe);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=NTe(i),h=CTe(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 _Te=Symbol("radix.slottable");function STe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_Te}function CTe(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 NTe(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 LTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],aZ=LTe.reduce((e,t)=>{const a=bTe(`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}},{}),mO="Popper",[oZ,Ti]=MTe(mO),[ETe,rZ]=oZ(mO),iZ=e=>{const{__scopePopper:t,children:a}=e,[o,i]=p.useState(null);return M.jsx(ETe,{scope:t,anchor:o,onAnchorChange:i,children:a})};iZ.displayName=mO;var cZ="PopperAnchor",sZ=p.forwardRef((e,t)=>{const{__scopePopper:a,virtualRef:o,...i}=e,s=rZ(cZ,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(aZ.div,{...i,ref:h})});sZ.displayName=cZ;var vO="PopperContent",[ITe,ATe]=oZ(vO),lZ=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,_=rZ(vO,a),[N,L]=p.useState(null),I=ze(t,Ee=>L(Ee)),[O,D]=p.useState(null),P=_A(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(RTe),altBoundary:B},{refs:J,floatingStyles:pe,placement:R,isPositioned:$,middlewareData:T}=tTe({strategy:"fixed",placement:V,whileElementsMounted:(...Ee)=>UAe(...Ee,{animationFrame:S==="always"}),elements:{reference:_.anchor},middleware:[aTe({mainAxis:i+j,alignmentAxis:l}),f&&oTe({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?rTe():void 0,...F}),f&&iTe({...F}),cTe({...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&&lTe({element:O,padding:h}),$Te({arrowWidth:A,arrowHeight:j}),x&&sTe({strategy:"referenceHidden",...F})]}),[G,W]=hZ(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(ITe,{scope:a,placedSide:G,onArrowChange:D,arrowX:X,arrowY:ne,shouldHideArrow:le,children:M.jsx(aZ.div,{"data-side":G,"data-align":W,...w,ref:I,style:{...w.style,animation:$?void 0:"none"}})})})});lZ.displayName=vO;var dZ="PopperArrow",TTe={top:"bottom",right:"left",bottom:"top",left:"right"},uZ=p.forwardRef(function(t,a){const{__scopePopper:o,...i}=t,s=ATe(dZ,o),l=TTe[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(gTe,{...i,ref:a,style:{...i.style,display:"block"}})})});uZ.displayName=dZ;function RTe(e){return e!==null}var $Te=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]=hZ(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 hZ(e){const[t,a="center"]=e.split("-");return[t,a]}var B2=iZ,F2=sZ,OA=lZ,DA=uZ;function pZ(e){const t=jTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(OTe);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 jTe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=zTe(i),h=DTe(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 OTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===PTe}function DTe(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 zTe(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"],iu=qTe.reduce((e,t)=>{const a=pZ(`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 HTe(e,t){e&&Kd.flushSync(()=>e.dispatchEvent(t))}var VTe="Portal",fZ=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});fZ.displayName=VTe;function BTe(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,FTe(i,...t)]}function FTe(...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 UTe(e){const t=GTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(ZTe);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 GTe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=KTe(i),h=XTe(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 WTe=Symbol("radix.slottable");function ZTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WTe}function XTe(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 KTe(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 YTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yZ=YTe.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}},{}),Tj="rovingFocusGroup.onEntryFocus",QTe={bubbles:!1,cancelable:!0},U2="RovingFocusGroup",[oP,mZ,JTe]=q2(U2),[eRe,zA]=BTe(U2,[JTe]),[tRe,nRe]=eRe(U2),vZ=p.forwardRef((e,t)=>M.jsx(oP.Provider,{scope:e.__scopeRovingFocusGroup,children:M.jsx(oP.Slot,{scope:e.__scopeRovingFocusGroup,children:M.jsx(aRe,{...e,ref:t})})}));vZ.displayName=U2;var aRe=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=H2(s),[w,_]=bn({prop:l,defaultProp:h??null,onChange:f,caller:U2}),[N,L]=p.useState(!1),I=Zn(y),O=mZ(a),D=p.useRef(!1),[P,A]=p.useState(0);return p.useEffect(()=>{const j=x.current;if(j)return j.addEventListener(Tj,I),()=>j.removeEventListener(Tj,I)},[I]),M.jsx(tRe,{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(yZ.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(Tj,QTe);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);MZ(pe,k)}}D.current=!1}),onBlur:xe(e.onBlur,()=>L(!1))})})}),kZ="RovingFocusGroupItem",gZ=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=nRe(kZ,a),m=k.currentTabStopId===y,x=mZ(a),{onFocusableItemAdd:S,onFocusableItemRemove:b,currentTabStopId:w}=k;return p.useEffect(()=>{if(o)return S(),()=>b()},[o,S,b]),M.jsx(oP.ItemSlot,{scope:a,id:y,focusable:o,active:i,children:M.jsx(yZ.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=iRe(_,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?cRe(I,O+1):I.slice(O+1)}setTimeout(()=>MZ(I))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:w!=null}):l})})});gZ.displayName=kZ;var oRe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rRe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function iRe(e,t,a){const o=rRe(e.key,a);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return oRe[o]}function MZ(e,t=!1){const a=document.activeElement;for(const o of e)if(o===a||(o.focus({preventScroll:t}),document.activeElement!==a))return}function cRe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var xZ=vZ,bZ=gZ,rP=["Enter"," "],sRe=["ArrowDown","PageUp","Home"],wZ=["ArrowUp","PageDown","End"],lRe=[...sRe,...wZ],dRe={ltr:[...rP,"ArrowRight"],rtl:[...rP,"ArrowLeft"]},uRe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},G2="Menu",[S2,hRe,pRe]=q2(G2),[X1,W2]=aAe(G2,[pRe,Ti,zA]),Z2=Ti(),_Z=zA(),[SZ,Ri]=X1(G2),[fRe,X2]=X1(G2),CZ=e=>{const{__scopeMenu:t,open:a=!1,children:o,dir:i,onOpenChange:s,modal:l=!0}=e,h=Z2(t),[f,y]=p.useState(null),k=p.useRef(!1),m=Zn(s),x=H2(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(B2,{...h,children:M.jsx(SZ,{scope:t,open:a,onOpenChange:m,content:f,onContentChange:y,children:M.jsx(fRe,{scope:t,onClose:p.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:k,dir:x,modal:l,children:o})})})};CZ.displayName=G2;var yRe="MenuAnchor",kO=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e,i=Z2(a);return M.jsx(F2,{...i,...o,ref:t})});kO.displayName=yRe;var gO="MenuPortal",[mRe,NZ]=X1(gO,{forceMount:void 0}),LZ=e=>{const{__scopeMenu:t,forceMount:a,children:o,container:i}=e,s=Ri(gO,t);return M.jsx(mRe,{scope:t,forceMount:a,children:M.jsx(Pn,{present:a||s.open,children:M.jsx(fZ,{asChild:!0,container:i,children:o})})})};LZ.displayName=gO;var da="MenuContent",[vRe,MO]=X1(da),EZ=p.forwardRef((e,t)=>{const a=NZ(da,e.__scopeMenu),{forceMount:o=a.forceMount,...i}=e,s=Ri(da,e.__scopeMenu),l=X2(da,e.__scopeMenu);return M.jsx(S2.Provider,{scope:e.__scopeMenu,children:M.jsx(Pn,{present:o||s.open,children:M.jsx(S2.Slot,{scope:e.__scopeMenu,children:l.modal?M.jsx(kRe,{...i,ref:t}):M.jsx(gRe,{...i,ref:t})})})})}),kRe=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 EA(s)},[]),M.jsx(xO,{...e,ref:i,trapFocus:a.open,disableOutsidePointerEvents:a.open,disableOutsideScroll:!0,onFocusOutside:xe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>a.onOpenChange(!1)})}),gRe=p.forwardRef((e,t)=>{const a=Ri(da,e.__scopeMenu);return M.jsx(xO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>a.onOpenChange(!1)})}),MRe=pZ("MenuContent.ScrollLock"),xO=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=X2(da,a),L=Z2(a),I=_Z(a),O=hRe(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?D2:p.Fragment,R=b?{as:MRe,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=TRe(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),[]),NA();const T=p.useCallback(G=>{var Me,X;return F.current===((Me=B.current)==null?void 0:Me.side)&&$Re(G,(X=B.current)==null?void 0:X.area)},[]);return M.jsx(vRe,{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(O2,{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(xZ,{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(OA,{role:"menu","aria-orientation":"vertical","data-state":GZ(_.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||!lRe.includes(G.key))return;G.preventDefault();const ye=O().filter(he=>!he.disabled).map(he=>he.ref.current);wZ.includes(G.key)&&ye.reverse(),IRe(ye)}),onBlur:xe(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(V.current),K.current="")}),onPointerMove:xe(e.onPointerMove,C2(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}}))})})})})})})});EZ.displayName=da;var xRe="MenuGroup",bO=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e;return M.jsx(iu.div,{role:"group",...o,ref:t})});bO.displayName=xRe;var bRe="MenuLabel",IZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e;return M.jsx(iu.div,{...o,ref:t})});IZ.displayName=bRe;var iA="MenuItem",kF="menu.itemSelect",qA=p.forwardRef((e,t)=>{const{disabled:a=!1,onSelect:o,...i}=e,s=p.useRef(null),l=X2(iA,e.__scopeMenu),h=MO(iA,e.__scopeMenu),f=ze(t,s),y=p.useRef(!1),k=()=>{const m=s.current;if(!a&&m){const x=new CustomEvent(kF,{bubbles:!0,cancelable:!0});m.addEventListener(kF,S=>o==null?void 0:o(S),{once:!0}),HTe(m,x),x.defaultPrevented?y.current=!1:l.onClose()}};return M.jsx(AZ,{...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===" "||rP.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});qA.displayName=iA;var AZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,disabled:o=!1,textValue:i,...s}=e,l=MO(iA,a),h=_Z(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(S2.ItemSlot,{scope:a,disabled:o,textValue:i??x,children:M.jsx(bZ,{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,C2(b=>{o?l.onItemLeave(b):(l.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:xe(e.onPointerLeave,C2(b=>l.onItemLeave(b))),onFocus:xe(e.onFocus,()=>m(!0)),onBlur:xe(e.onBlur,()=>m(!1))})})})}),wRe="MenuCheckboxItem",TZ=p.forwardRef((e,t)=>{const{checked:a=!1,onCheckedChange:o,...i}=e;return M.jsx(OZ,{scope:e.__scopeMenu,checked:a,children:M.jsx(qA,{role:"menuitemcheckbox","aria-checked":cA(a)?"mixed":a,...i,ref:t,"data-state":SO(a),onSelect:xe(i.onSelect,()=>o==null?void 0:o(cA(a)?!0:!a),{checkForDefaultPrevented:!1})})})});TZ.displayName=wRe;var RZ="MenuRadioGroup",[_Re,SRe]=X1(RZ,{value:void 0,onValueChange:()=>{}}),$Z=p.forwardRef((e,t)=>{const{value:a,onValueChange:o,...i}=e,s=Zn(o);return M.jsx(_Re,{scope:e.__scopeMenu,value:a,onValueChange:s,children:M.jsx(bO,{...i,ref:t})})});$Z.displayName=RZ;var jZ="MenuRadioItem",PZ=p.forwardRef((e,t)=>{const{value:a,...o}=e,i=SRe(jZ,e.__scopeMenu),s=a===i.value;return M.jsx(OZ,{scope:e.__scopeMenu,checked:s,children:M.jsx(qA,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":SO(s),onSelect:xe(o.onSelect,()=>{var l;return(l=i.onValueChange)==null?void 0:l.call(i,a)},{checkForDefaultPrevented:!1})})})});PZ.displayName=jZ;var wO="MenuItemIndicator",[OZ,CRe]=X1(wO,{checked:!1}),DZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,forceMount:o,...i}=e,s=CRe(wO,a);return M.jsx(Pn,{present:o||cA(s.checked)||s.checked===!0,children:M.jsx(iu.span,{...i,ref:t,"data-state":SO(s.checked)})})});DZ.displayName=wO;var NRe="MenuSeparator",zZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e;return M.jsx(iu.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});zZ.displayName=NRe;var LRe="MenuArrow",qZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e,i=Z2(a);return M.jsx(DA,{...i,...o,ref:t})});qZ.displayName=LRe;var _O="MenuSub",[ERe,HZ]=X1(_O),VZ=e=>{const{__scopeMenu:t,children:a,open:o=!1,onOpenChange:i}=e,s=Ri(_O,t),l=Z2(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(B2,{...l,children:M.jsx(SZ,{scope:t,open:o,onOpenChange:m,content:y,onContentChange:k,children:M.jsx(ERe,{scope:t,contentId:It(),triggerId:It(),trigger:h,onTriggerChange:f,children:a})})})};VZ.displayName=_O;var u2="MenuSubTrigger",BZ=p.forwardRef((e,t)=>{const a=Ri(u2,e.__scopeMenu),o=X2(u2,e.__scopeMenu),i=HZ(u2,e.__scopeMenu),s=MO(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(kO,{asChild:!0,...y,children:M.jsx(AZ,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":i.contentId,"data-state":GZ(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,C2(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,C2(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===" "||dRe[o.dir].includes(m.key)&&(a.onOpenChange(!0),(S=a.content)==null||S.focus(),m.preventDefault())})})})});BZ.displayName=u2;var FZ="MenuSubContent",UZ=p.forwardRef((e,t)=>{const a=NZ(da,e.__scopeMenu),{forceMount:o=a.forceMount,...i}=e,s=Ri(da,e.__scopeMenu),l=X2(da,e.__scopeMenu),h=HZ(FZ,e.__scopeMenu),f=p.useRef(null),y=ze(t,f);return M.jsx(S2.Provider,{scope:e.__scopeMenu,children:M.jsx(Pn,{present:o||s.open,children:M.jsx(S2.Slot,{scope:e.__scopeMenu,children:M.jsx(xO,{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=uRe[l.dir].includes(k.key);m&&x&&(s.onOpenChange(!1),(S=h.trigger)==null||S.focus(),k.preventDefault())})})})})})});UZ.displayName=FZ;function GZ(e){return e?"open":"closed"}function cA(e){return e==="indeterminate"}function SO(e){return cA(e)?"indeterminate":e?"checked":"unchecked"}function IRe(e){const t=document.activeElement;for(const a of e)if(a===t||(a.focus(),document.activeElement!==t))return}function ARe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}function TRe(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=ARe(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 RRe(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 $Re(e,t){if(!t)return!1;const a={x:e.clientX,y:e.clientY};return RRe(a,t)}function C2(e){return t=>t.pointerType==="mouse"?e(t):void 0}var CO=CZ,NO=kO,LO=LZ,EO=EZ,IO=bO,AO=IZ,TO=qA,RO=TZ,$O=$Z,jO=PZ,PO=DZ,OO=zZ,DO=qZ,zO=VZ,qO=BZ,HO=UZ,VO="ContextMenu",[jRe]=qIe(VO,[W2]),hn=W2(),[PRe,WZ]=jRe(VO),ZZ=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(PRe,{scope:t,open:l,onOpenChange:k,modal:s,children:M.jsx(CO,{...f,dir:i,open:l,onOpenChange:k,modal:s,children:a})})};ZZ.displayName=VO;var XZ="ContextMenuTrigger",KZ=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,disabled:o=!1,...i}=e,s=WZ(XZ,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(NO,{...l,virtualRef:f}),M.jsx(XIe.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,Sh(x=>{k(),y.current=window.setTimeout(()=>m(x),700)})),onPointerMove:o?e.onPointerMove:xe(e.onPointerMove,Sh(k)),onPointerCancel:o?e.onPointerCancel:xe(e.onPointerCancel,Sh(k)),onPointerUp:o?e.onPointerUp:xe(e.onPointerUp,Sh(k))})]})});KZ.displayName=XZ;var ORe="ContextMenuPortal",YZ=e=>{const{__scopeContextMenu:t,...a}=e,o=hn(t);return M.jsx(LO,{...o,...a})};YZ.displayName=ORe;var QZ="ContextMenuContent",JZ=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=WZ(QZ,a),s=hn(a),l=p.useRef(!1);return M.jsx(EO,{...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)"}})});JZ.displayName=QZ;var DRe="ContextMenuGroup",eX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(IO,{...i,...o,ref:t})});eX.displayName=DRe;var zRe="ContextMenuLabel",tX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(AO,{...i,...o,ref:t})});tX.displayName=zRe;var qRe="ContextMenuItem",nX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(TO,{...i,...o,ref:t})});nX.displayName=qRe;var HRe="ContextMenuCheckboxItem",aX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(RO,{...i,...o,ref:t})});aX.displayName=HRe;var VRe="ContextMenuRadioGroup",oX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx($O,{...i,...o,ref:t})});oX.displayName=VRe;var BRe="ContextMenuRadioItem",rX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(jO,{...i,...o,ref:t})});rX.displayName=BRe;var FRe="ContextMenuItemIndicator",iX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(PO,{...i,...o,ref:t})});iX.displayName=FRe;var URe="ContextMenuSeparator",cX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(OO,{...i,...o,ref:t})});cX.displayName=URe;var GRe="ContextMenuArrow",WRe=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(DO,{...i,...o,ref:t})});WRe.displayName=GRe;var sX="ContextMenuSub",lX=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:sX});return M.jsx(zO,{...l,open:h,onOpenChange:f,children:a})};lX.displayName=sX;var ZRe="ContextMenuSubTrigger",dX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(qO,{...i,...o,ref:t})});dX.displayName=ZRe;var XRe="ContextMenuSubContent",uX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(HO,{...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)"}})});uX.displayName=XRe;function Sh(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var KRe=ZZ,YRe=KZ,hX=YZ,QRe=JZ,JRe=eX,e$e=tX,t$e=nX,n$e=aX,a$e=oX,o$e=rX,pX=iX,r$e=cX,i$e=lX,c$e=dX,s$e=uX;function l$e({...e}){return M.jsx(KRe,{"data-slot":"context-menu",...e})}function d$e({...e}){return M.jsx(YRe,{"data-slot":"context-menu-trigger",...e})}function u$e({...e}){return M.jsx(JRe,{"data-slot":"context-menu-group",...e})}function h$e({...e}){return M.jsx(hX,{"data-slot":"context-menu-portal",...e})}function p$e({...e}){return M.jsx(i$e,{"data-slot":"context-menu-sub",...e})}function f$e({...e}){return M.jsx(a$e,{"data-slot":"context-menu-radio-group",...e})}function y$e({className:e,inset:t,children:a,...o}){return M.jsxs(c$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 m$e({className:e,...t}){return M.jsx(s$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 v$e({className:e,...t}){return M.jsx(hX,{children:M.jsx(QRe,{"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 k$e({className:e,inset:t,variant:a="default",...o}){return M.jsx(t$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 g$e({className:e,children:t,checked:a,...o}){return M.jsxs(n$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(pX,{children:M.jsx(sr,{className:"size-4"})})}),t]})}function M$e({className:e,children:t,...a}){return M.jsxs(o$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(pX,{children:M.jsx(O1,{className:"size-2 fill-current"})})}),t]})}function x$e({className:e,inset:t,...a}){return M.jsx(e$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 b$e({className:e,...t}){return M.jsx(r$e,{"data-slot":"context-menu-separator",className:ee("bg-border -mx-1 my-1 h-px",e),...t})}function w$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 _$e="Portal",fX=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});fX.displayName=_$e;var yX=fX;const Ei=p.createContext({activeIndex:0,setActiveIndex:()=>{},totalDialogs:0,setTotalDialogs:()=>{},isOpen:!1,setIsOpen:()=>{},clickable:!1,shouldAnimate:!1,setShouldAnimate:()=>{},closeDialog:()=>{}}),mX=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})})});mX.displayName="DialogStack";const S$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})},C$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},N$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(yX,{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},L$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(yX,{children:M.jsx(xA,{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,{})})})]})},E$e=({children:e,className:t,...a})=>M.jsx("h2",{className:ee("font-semibold text-lg leading-none tracking-tight",t),...a,children:e}),I$e=({children:e,className:t,...a})=>M.jsx("p",{className:ee("text-muted-foreground text-sm",t),...a,children:e}),A$e=({className:e,...t})=>M.jsx("div",{className:ee("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),T$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}),R$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"})},$$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 j$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,P$e(i,...t)]}function P$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 O$e(e){const t=D$e(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(q$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 D$e(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=V$e(i),h=H$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 z$e=Symbol("radix.slottable");function q$e(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z$e}function H$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 V$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 B$e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],F$e=B$e.reduce((e,t)=>{const a=O$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}},{}),HA="DropdownMenu",[U$e]=j$e(HA,[W2]),pn=W2(),[G$e,vX]=U$e(HA),kX=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:HA});return M.jsx(G$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(CO,{...f,open:k,onOpenChange:m,dir:o,modal:h,children:a})})};kX.displayName=HA;var gX="DropdownMenuTrigger",MX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,disabled:o=!1,...i}=e,s=vX(gX,a),l=pn(a);return M.jsx(NO,{asChild:!0,...l,children:M.jsx(F$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())})})})});MX.displayName=gX;var W$e="DropdownMenuPortal",xX=e=>{const{__scopeDropdownMenu:t,...a}=e,o=pn(t);return M.jsx(LO,{...o,...a})};xX.displayName=W$e;var bX="DropdownMenuContent",wX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=vX(bX,a),s=pn(a),l=p.useRef(!1);return M.jsx(EO,{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)"}})});wX.displayName=bX;var Z$e="DropdownMenuGroup",_X=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(IO,{...i,...o,ref:t})});_X.displayName=Z$e;var X$e="DropdownMenuLabel",SX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(AO,{...i,...o,ref:t})});SX.displayName=X$e;var K$e="DropdownMenuItem",CX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(TO,{...i,...o,ref:t})});CX.displayName=K$e;var Y$e="DropdownMenuCheckboxItem",NX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(RO,{...i,...o,ref:t})});NX.displayName=Y$e;var Q$e="DropdownMenuRadioGroup",LX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx($O,{...i,...o,ref:t})});LX.displayName=Q$e;var J$e="DropdownMenuRadioItem",EX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(jO,{...i,...o,ref:t})});EX.displayName=J$e;var eje="DropdownMenuItemIndicator",IX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(PO,{...i,...o,ref:t})});IX.displayName=eje;var tje="DropdownMenuSeparator",AX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(OO,{...i,...o,ref:t})});AX.displayName=tje;var nje="DropdownMenuArrow",aje=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(DO,{...i,...o,ref:t})});aje.displayName=nje;var oje=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(zO,{...l,open:h,onOpenChange:f,children:a})},rje="DropdownMenuSubTrigger",TX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(qO,{...i,...o,ref:t})});TX.displayName=rje;var ije="DropdownMenuSubContent",RX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(HO,{...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)"}})});RX.displayName=ije;var cje=kX,sje=MX,$X=xX,lje=wX,dje=_X,uje=SX,hje=CX,pje=NX,fje=LX,yje=EX,jX=IX,mje=AX,vje=oje,kje=TX,gje=RX;function Mje({...e}){return M.jsx(cje,{"data-slot":"dropdown-menu",...e})}function xje({...e}){return M.jsx($X,{"data-slot":"dropdown-menu-portal",...e})}function bje({...e}){return M.jsx(sje,{"data-slot":"dropdown-menu-trigger",...e})}function wje({className:e,sideOffset:t=4,...a}){return M.jsx($X,{children:M.jsx(lje,{"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 _je({...e}){return M.jsx(dje,{"data-slot":"dropdown-menu-group",...e})}function Sje({className:e,inset:t,variant:a="default",...o}){return M.jsx(hje,{"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 Cje({className:e,children:t,checked:a,...o}){return M.jsxs(pje,{"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(jX,{children:M.jsx(sr,{className:"size-4"})})}),t]})}function Nje({...e}){return M.jsx(fje,{"data-slot":"dropdown-menu-radio-group",...e})}function Lje({className:e,children:t,...a}){return M.jsxs(yje,{"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(jX,{children:M.jsx(O1,{className:"size-2 fill-current"})})}),t]})}function Eje({className:e,inset:t,...a}){return M.jsx(uje,{"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 Ije({className:e,...t}){return M.jsx(mje,{"data-slot":"dropdown-menu-separator",className:ee("bg-border -mx-1 my-1 h-px",e),...t})}function Aje({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 Tje({...e}){return M.jsx(vje,{"data-slot":"dropdown-menu-sub",...e})}function Rje({className:e,inset:t,children:a,...o}){return M.jsxs(kje,{"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 $je({className:e,...t}){return M.jsx(gje,{"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 PX({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 jje="Label",OX=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())}}));OX.displayName=jje;var Pje=OX;function Oje({className:e,...t}){return M.jsx(Pje,{"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 Dje(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,zje(i,...t)]}function zje(...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 qje(e){const t=Hje(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(Bje);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 Hje(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=Uje(i),h=Fje(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 Vje=Symbol("radix.slottable");function Bje(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vje}function Fje(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 Uje(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 Gje=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],DX=Gje.reduce((e,t)=>{const a=qje(`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}},{}),K2="Menubar",[iP,Wje,Zje]=q2(K2),[zX]=Dje(K2,[Zje,zA]),fn=W2(),qX=zA(),[Xje,BO]=zX(K2),HX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,value:o,onValueChange:i,defaultValue:s,loop:l=!0,dir:h,...f}=e,y=H2(h),k=qX(a),[m,x]=bn({prop:o,onChange:i,defaultProp:s??"",caller:K2}),[S,b]=p.useState(null);return M.jsx(Xje,{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(iP.Provider,{scope:a,children:M.jsx(iP.Slot,{scope:a,children:M.jsx(xZ,{asChild:!0,...k,orientation:"horizontal",loop:l,dir:y,currentTabStopId:S,onCurrentTabStopIdChange:b,children:M.jsx(DX.div,{role:"menubar",...f,ref:t})})})})})});HX.displayName=K2;var FO="MenubarMenu",[Kje,VX]=zX(FO),BX=e=>{const{__scopeMenubar:t,value:a,...o}=e,i=It(),s=a||i||"LEGACY_REACT_AUTO_VALUE",l=BO(FO,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(Kje,{scope:t,value:s,triggerId:It(),triggerRef:f,contentId:It(),wasKeyboardTriggerOpenRef:y,children:M.jsx(CO,{...h,open:k,onOpenChange:m=>{m||l.onMenuClose()},modal:!1,dir:l.dir,...o})})};BX.displayName=FO;var cP="MenubarTrigger",FX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,disabled:o=!1,...i}=e,s=qX(a),l=fn(a),h=BO(cP,a),f=VX(cP,a),y=p.useRef(null),k=ze(t,y,f.triggerRef),[m,x]=p.useState(!1),S=h.value===f.value;return M.jsx(iP.ItemSlot,{scope:a,value:f.value,disabled:o,children:M.jsx(bZ,{asChild:!0,...s,focusable:!o,tabStopId:f.value,children:M.jsx(NO,{asChild:!0,...l,children:M.jsx(DX.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))})})})})});FX.displayName=cP;var Yje="MenubarPortal",UX=e=>{const{__scopeMenubar:t,...a}=e,o=fn(t);return M.jsx(LO,{...o,...a})};UX.displayName=Yje;var sP="MenubarContent",GX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,align:o="start",...i}=e,s=fn(a),l=BO(sP,a),h=VX(sP,a),f=Wje(a),y=p.useRef(!1);return M.jsx(EO,{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?dPe(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)"}})});GX.displayName=sP;var Qje="MenubarGroup",WX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(IO,{...i,...o,ref:t})});WX.displayName=Qje;var Jje="MenubarLabel",ZX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(AO,{...i,...o,ref:t})});ZX.displayName=Jje;var ePe="MenubarItem",XX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(TO,{...i,...o,ref:t})});XX.displayName=ePe;var tPe="MenubarCheckboxItem",KX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(RO,{...i,...o,ref:t})});KX.displayName=tPe;var nPe="MenubarRadioGroup",YX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx($O,{...i,...o,ref:t})});YX.displayName=nPe;var aPe="MenubarRadioItem",QX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(jO,{...i,...o,ref:t})});QX.displayName=aPe;var oPe="MenubarItemIndicator",JX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(PO,{...i,...o,ref:t})});JX.displayName=oPe;var rPe="MenubarSeparator",eK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(OO,{...i,...o,ref:t})});eK.displayName=rPe;var iPe="MenubarArrow",cPe=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(DO,{...i,...o,ref:t})});cPe.displayName=iPe;var tK="MenubarSub",nK=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:tK});return M.jsx(zO,{...l,open:h,onOpenChange:f,children:a})};nK.displayName=tK;var sPe="MenubarSubTrigger",aK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(qO,{"data-radix-menubar-subtrigger":"",...i,...o,ref:t})});aK.displayName=sPe;var lPe="MenubarSubContent",oK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(HO,{...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)"}})});oK.displayName=lPe;function dPe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var uPe=HX,hPe=BX,pPe=FX,fPe=UX,yPe=GX,mPe=WX,vPe=ZX,kPe=XX,gPe=KX,MPe=YX,xPe=QX,rK=JX,bPe=eK,wPe=nK,_Pe=aK,SPe=oK;function CPe({className:e,...t}){return M.jsx(uPe,{"data-slot":"menubar",className:ee("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",e),...t})}function NPe({...e}){return M.jsx(hPe,{"data-slot":"menubar-menu",...e})}function LPe({...e}){return M.jsx(mPe,{"data-slot":"menubar-group",...e})}function iK({...e}){return M.jsx(fPe,{"data-slot":"menubar-portal",...e})}function EPe({...e}){return M.jsx(MPe,{"data-slot":"menubar-radio-group",...e})}function IPe({className:e,...t}){return M.jsx(pPe,{"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 APe({className:e,align:t="start",alignOffset:a=-4,sideOffset:o=8,...i}){return M.jsx(iK,{children:M.jsx(yPe,{"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 TPe({className:e,inset:t,variant:a="default",...o}){return M.jsx(kPe,{"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 RPe({className:e,children:t,checked:a,...o}){return M.jsxs(gPe,{"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(rK,{children:M.jsx(sr,{className:"size-4"})})}),t]})}function $Pe({className:e,children:t,...a}){return M.jsxs(xPe,{"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(rK,{children:M.jsx(O1,{className:"size-2 fill-current"})})}),t]})}function jPe({className:e,inset:t,...a}){return M.jsx(vPe,{"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 PPe({className:e,...t}){return M.jsx(bPe,{"data-slot":"menubar-separator",className:ee("bg-border -mx-1 my-1 h-px",e),...t})}function OPe({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 DPe({...e}){return M.jsx(wPe,{"data-slot":"menubar-sub",...e})}function zPe({className:e,inset:t,children:a,...o}){return M.jsxs(_Pe,{"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 qPe({className:e,...t}){return M.jsx(SPe,{"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 HPe({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 VPe({className:e,...t}){return M.jsx("ul",{"data-slot":"pagination-content",className:ee("flex flex-row items-center gap-1",e),...t})}function BPe({...e}){return M.jsx("li",{"data-slot":"pagination-item",...e})}function UO({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(QI({variant:t?"outline":"ghost",size:a}),e),...o})}function FPe({className:e,...t}){return M.jsxs(UO,{"aria-label":"Go to previous page",size:"default",className:ee("gap-1 px-2.5 sm:pl-2.5",e),...t,children:[M.jsx(Hd,{}),M.jsx("span",{className:"hidden sm:block",children:"Previous"})]})}function UPe({className:e,...t}){return M.jsxs(UO,{"aria-label":"Go to next page",size:"default",className:ee("gap-1 px-2.5 sm:pr-2.5",e),...t,children:[M.jsx("span",{className:"hidden sm:block",children:"Next"}),M.jsx(lr,{})]})}function GPe({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 WPe(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,ZPe(i,...t)]}function ZPe(...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 cK(e){const t=XPe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(YPe);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 XPe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=JPe(i),h=QPe(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 KPe=Symbol("radix.slottable");function YPe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===KPe}function QPe(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 JPe(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 eOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],GO=eOe.reduce((e,t)=>{const a=cK(`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}},{}),tOe="Portal",sK=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(GO.div,{...o,ref:t}),l):null});sK.displayName=tOe;var VA="Popover",[lK]=WPe(VA,[Ti]),Y2=Ti(),[nOe,$i]=lK(VA),dK=e=>{const{__scopePopover:t,children:a,open:o,defaultOpen:i,onOpenChange:s,modal:l=!1}=e,h=Y2(t),f=p.useRef(null),[y,k]=p.useState(!1),[m,x]=bn({prop:o,defaultProp:i??!1,onChange:s,caller:VA});return M.jsx(B2,{...h,children:M.jsx(nOe,{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})})};dK.displayName=VA;var uK="PopoverAnchor",hK=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=$i(uK,a),s=Y2(a),{onCustomAnchorAdd:l,onCustomAnchorRemove:h}=i;return p.useEffect(()=>(l(),()=>h()),[l,h]),M.jsx(F2,{...s,...o,ref:t})});hK.displayName=uK;var pK="PopoverTrigger",fK=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=$i(pK,a),s=Y2(a),l=ze(t,i.triggerRef),h=M.jsx(GO.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":gK(i.open),...o,ref:l,onClick:xe(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?h:M.jsx(F2,{asChild:!0,...s,children:h})});fK.displayName=pK;var WO="PopoverPortal",[aOe,oOe]=lK(WO,{forceMount:void 0}),yK=e=>{const{__scopePopover:t,forceMount:a,children:o,container:i}=e,s=$i(WO,t);return M.jsx(aOe,{scope:t,forceMount:a,children:M.jsx(Pn,{present:a||s.open,children:M.jsx(sK,{asChild:!0,container:i,children:o})})})};yK.displayName=WO;var Zd="PopoverContent",mK=p.forwardRef((e,t)=>{const a=oOe(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(iOe,{...i,ref:t}):M.jsx(cOe,{...i,ref:t})})});mK.displayName=Zd;var rOe=cK("PopoverContent.RemoveScroll"),iOe=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 EA(l)},[]),M.jsx(D2,{as:rOe,allowPinchZoom:!0,children:M.jsx(vK,{...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})})})}),cOe=p.forwardRef((e,t)=>{const a=$i(Zd,e.__scopePopover),o=p.useRef(!1),i=p.useRef(!1);return M.jsx(vK,{...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()}})}),vK=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=Y2(a);return NA(),M.jsx(O2,{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(OA,{"data-state":gK(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)"}})})})}),kK="PopoverClose",sOe=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=$i(kK,a);return M.jsx(GO.button,{type:"button",...o,ref:t,onClick:xe(e.onClick,()=>i.onOpenChange(!1))})});sOe.displayName=kK;var lOe="PopoverArrow",dOe=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=Y2(a);return M.jsx(DA,{...i,...o,ref:t})});dOe.displayName=lOe;function gK(e){return e?"open":"closed"}var uOe=dK,hOe=hK,pOe=fK,fOe=yK,yOe=mK;function MK({...e}){return M.jsx(uOe,{"data-slot":"popover",...e})}function xK({...e}){return M.jsx(pOe,{"data-slot":"popover-trigger",...e})}function bK({className:e,align:t="center",sideOffset:a=4,...o}){return M.jsx(fOe,{children:M.jsx(yOe,{"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 mOe({...e}){return M.jsx(hOe,{"data-slot":"popover-anchor",...e})}function sA(e,[t,a]){return Math.min(a,Math.max(t,e))}function vOe(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,kOe(i,...t)]}function kOe(...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 wK(e){const t=gOe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(xOe);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 gOe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=wOe(i),h=bOe(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 MOe=Symbol("radix.slottable");function xOe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MOe}function bOe(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 wOe(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 _Oe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],On=_Oe.reduce((e,t)=>{const a=wK(`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}},{}),SOe="Portal",_K=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});_K.displayName=SOe;function COe(e){const t=NOe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(EOe);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 NOe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=AOe(i),h=IOe(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 LOe=Symbol("radix.slottable");function EOe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===LOe}function IOe(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 AOe(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"],ROe=TOe.reduce((e,t)=>{const a=COe(`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}},{}),SK=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"}),$Oe="VisuallyHidden",CK=p.forwardRef((e,t)=>M.jsx(ROe.span,{...e,ref:t,style:{...SK,...e.style}}));CK.displayName=$Oe;var jOe=CK,POe=[" ","Enter","ArrowUp","ArrowDown"],OOe=[" ","Enter"],F1="Select",[BA,FA,DOe]=q2(F1),[cu]=vOe(F1,[DOe,Ti]),UA=Ti(),[zOe,ji]=cu(F1),[qOe,HOe]=cu(F1),NK=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=UA(t),[_,N]=p.useState(null),[L,I]=p.useState(null),[O,D]=p.useState(!1),P=H2(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(B2,{...w,children:M.jsxs(zOe,{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(BA.Provider,{scope:t,children:M.jsx(qOe,{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(QK,{"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]})})};NK.displayName=F1;var LK="SelectTrigger",EK=p.forwardRef((e,t)=>{const{__scopeSelect:a,disabled:o=!1,...i}=e,s=UA(a),l=ji(LK,a),h=l.disabled||o,f=ze(t,l.onTriggerChange),y=FA(a),k=p.useRef("touch"),[m,x,S]=eY(w=>{const _=y().filter(I=>!I.disabled),N=_.find(I=>I.value===l.value),L=tY(_,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(F2,{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":JK(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===" ")&&POe.includes(w.key)&&(b(),w.preventDefault())})})})});EK.displayName=LK;var IK="SelectValue",AK=p.forwardRef((e,t)=>{const{__scopeSelect:a,className:o,style:i,children:s,placeholder:l="",...h}=e,f=ji(IK,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:JK(f.value)?M.jsx(M.Fragment,{children:l}):s})});AK.displayName=IK;var VOe="SelectIcon",TK=p.forwardRef((e,t)=>{const{__scopeSelect:a,children:o,...i}=e;return M.jsx(On.span,{"aria-hidden":!0,...i,ref:t,children:o||"▼"})});TK.displayName=VOe;var BOe="SelectPortal",RK=e=>M.jsx(_K,{asChild:!0,...e});RK.displayName=BOe;var U1="SelectContent",$K=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(jK,{scope:e.__scopeSelect,children:M.jsx(BA.Slot,{scope:e.__scopeSelect,children:M.jsx("div",{children:e.children})})}),s):null}return M.jsx(PK,{...e,ref:t})});$K.displayName=U1;var ka=10,[jK,Pi]=cu(U1),FOe="SelectContentImpl",UOe=wK("SelectContent.RemoveScroll"),PK=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=FA(a),[F,J]=p.useState(!1),pe=p.useRef(!1);p.useEffect(()=>{if(I)return EA(I)},[I]),NA();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]=eY(he=>{const ve=B().filter(fe=>!fe.disabled),me=ve.find(fe=>fe.ref.current===document.activeElement),ge=tY(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"?lP:OK,ye=ie===lP?{side:h,sideOffset:f,align:y,alignOffset:k,arrowPadding:m,collisionBoundary:x,collisionPadding:S,sticky:b,hideWhenDetached:w,avoidCollisions:_}:{};return M.jsx(jK,{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(D2,{as:UOe,allowPinchZoom:!0,children:M.jsx(O2,{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()}})})})})})})});PK.displayName=FOe;var GOe="SelectItemAlignedPosition",OK=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=FA(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=sA(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=sA(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(ZOe,{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}})})})});OK.displayName=GOe;var WOe="SelectPopperPosition",lP=p.forwardRef((e,t)=>{const{__scopeSelect:a,align:o="start",collisionPadding:i=ka,...s}=e,l=UA(a);return M.jsx(OA,{...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)"}})});lP.displayName=WOe;var[ZOe,ZO]=cu(U1,{}),dP="SelectViewport",DK=p.forwardRef((e,t)=>{const{__scopeSelect:a,nonce:o,...i}=e,s=Pi(dP,a),l=ZO(dP,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(BA.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})})})]})});DK.displayName=dP;var zK="SelectGroup",[XOe,KOe]=cu(zK),qK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e,i=It();return M.jsx(XOe,{scope:a,id:i,children:M.jsx(On.div,{role:"group","aria-labelledby":i,...o,ref:t})})});qK.displayName=zK;var HK="SelectLabel",VK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e,i=KOe(HK,a);return M.jsx(On.div,{id:i.id,...o,ref:t})});VK.displayName=HK;var lA="SelectItem",[YOe,BK]=cu(lA),FK=p.forwardRef((e,t)=>{const{__scopeSelect:a,value:o,disabled:i=!1,textValue:s,...l}=e,h=ji(lA,a),f=Pi(lA,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(YOe,{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(BA.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===" "||(OOe.includes(L.key)&&N(),L.key===" "&&L.preventDefault())})})})})});FK.displayName=lA;var h2="SelectItemText",UK=p.forwardRef((e,t)=>{const{__scopeSelect:a,className:o,style:i,...s}=e,l=ji(h2,a),h=Pi(h2,a),f=BK(h2,a),y=HOe(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]})});UK.displayName=h2;var GK="SelectItemIndicator",WK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e;return BK(GK,a).isSelected?M.jsx(On.span,{"aria-hidden":!0,...o,ref:t}):null});WK.displayName=GK;var uP="SelectScrollUpButton",ZK=p.forwardRef((e,t)=>{const a=Pi(uP,e.__scopeSelect),o=ZO(uP,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(KK,{...e,ref:l,onAutoScroll:()=>{const{viewport:h,selectedItem:f}=a;h&&f&&(h.scrollTop=h.scrollTop-f.offsetHeight)}}):null});ZK.displayName=uP;var hP="SelectScrollDownButton",XK=p.forwardRef((e,t)=>{const a=Pi(hP,e.__scopeSelect),o=ZO(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.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(KK,{...e,ref:l,onAutoScroll:()=>{const{viewport:h,selectedItem:f}=a;h&&f&&(h.scrollTop=h.scrollTop+f.offsetHeight)}}):null});XK.displayName=hP;var KK=p.forwardRef((e,t)=>{const{__scopeSelect:a,onAutoScroll:o,...i}=e,s=Pi("SelectScrollButton",a),l=p.useRef(null),h=FA(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()})})}),QOe="SelectSeparator",YK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e;return M.jsx(On.div,{"aria-hidden":!0,...o,ref:t})});YK.displayName=QOe;var pP="SelectArrow",JOe=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e,i=UA(a),s=ji(pP,a),l=Pi(pP,a);return s.open&&l.position==="popper"?M.jsx(DA,{...i,...o,ref:t}):null});JOe.displayName=pP;var eDe="SelectBubbleInput",QK=p.forwardRef(({__scopeSelect:e,value:t,...a},o)=>{const i=p.useRef(null),s=ze(o,i),l=wA(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:{...SK,...a.style},ref:s,defaultValue:t})});QK.displayName=eDe;function JK(e){return e===""||e===void 0}function eY(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 tY(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=tDe(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 tDe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var nDe=NK,aDe=EK,oDe=AK,rDe=TK,iDe=RK,cDe=$K,sDe=DK,lDe=qK,dDe=VK,uDe=FK,hDe=UK,pDe=WK,fDe=ZK,yDe=XK,mDe=YK;function vDe({...e}){return M.jsx(nDe,{"data-slot":"select",...e})}function kDe({...e}){return M.jsx(lDe,{"data-slot":"select-group",...e})}function gDe({...e}){return M.jsx(oDe,{"data-slot":"select-value",...e})}function MDe({className:e,size:t="default",children:a,...o}){return M.jsxs(aDe,{"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(rDe,{asChild:!0,children:M.jsx(xi,{className:"size-4 opacity-50"})})]})}function xDe({className:e,children:t,position:a="popper",...o}){return M.jsx(iDe,{children:M.jsxs(cDe,{"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(nY,{}),M.jsx(sDe,{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(aY,{})]})})}function bDe({className:e,...t}){return M.jsx(dDe,{"data-slot":"select-label",className:ee("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function wDe({className:e,children:t,...a}){return M.jsxs(uDe,{"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(pDe,{children:M.jsx(sr,{className:"size-4"})})}),M.jsx(hDe,{children:t})]})}function _De({className:e,...t}){return M.jsx(mDe,{"data-slot":"select-separator",className:ee("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function nY({className:e,...t}){return M.jsx(fDe,{"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 aY({className:e,...t}){return M.jsx(yDe,{"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 SDe="Separator",gF="horizontal",CDe=["horizontal","vertical"],oY=p.forwardRef((e,t)=>{const{decorative:a,orientation:o=gF,...i}=e,s=NDe(o)?o:gF,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})});oY.displayName=SDe;function NDe(e){return CDe.includes(e)}var LDe=oY;function XO({className:e,orientation:t="horizontal",decorative:a=!0,...o}){return M.jsx(LDe,{"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 rY({...e}){return M.jsx(oO,{"data-slot":"sheet",...e})}function EDe({...e}){return M.jsx(bW,{"data-slot":"sheet-trigger",...e})}function IDe({...e}){return M.jsx(AA,{"data-slot":"sheet-close",...e})}function ADe({...e}){return M.jsx(rO,{"data-slot":"sheet-portal",...e})}function TDe({className:e,...t}){return M.jsx(iO,{"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 iY({className:e,children:t,side:a="right",...o}){return M.jsxs(ADe,{children:[M.jsx(TDe,{}),M.jsxs(cO,{"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(AA,{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 cY({className:e,...t}){return M.jsx("div",{"data-slot":"sheet-header",className:ee("flex flex-col gap-1.5 p-4",e),...t})}function RDe({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 sY({className:e,...t}){return M.jsx(wW,{"data-slot":"sheet-title",className:ee("text-foreground font-semibold",e),...t})}function lY({className:e,...t}){return M.jsx(_W,{"data-slot":"sheet-description",className:ee("text-muted-foreground text-sm",e),...t})}const Rj=768;function $De(){const[e,t]=p.useState(void 0);return p.useEffect(()=>{const a=window.matchMedia(`(max-width: ${Rj-1}px)`),o=()=>{t(window.innerWidth<Rj)};return a.addEventListener("change",o),t(window.innerWidth<Rj),()=>a.removeEventListener("change",o)},[]),!!e}function fP({className:e,...t}){return M.jsx("div",{"data-slot":"skeleton",className:ee("bg-accent animate-pulse rounded-md",e),...t})}function jDe(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,PDe(i,...t)]}function PDe(...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 ODe(e){const t=DDe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(qDe);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 DDe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=VDe(i),h=HDe(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 dY=Symbol("radix.slottable");function zDe(e){const t=({children:a})=>M.jsx(M.Fragment,{children:a});return t.displayName=`${e}.Slottable`,t.__radixId=dY,t}function qDe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dY}function HDe(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 VDe(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 BDe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],uY=BDe.reduce((e,t)=>{const a=ODe(`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}},{}),FDe="Portal",hY=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(uY.div,{...o,ref:t}),l):null});hY.displayName=FDe;var[GA]=jDe("Tooltip",[Ti]),WA=Ti(),pY="TooltipProvider",UDe=700,yP="tooltip.open",[GDe,KO]=GA(pY),fY=e=>{const{__scopeTooltip:t,delayDuration:a=UDe,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(GDe,{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})};fY.displayName=pY;var N2="Tooltip",[WDe,Q2]=GA(N2),yY=e=>{const{__scopeTooltip:t,children:a,open:o,defaultOpen:i,onOpenChange:s,disableHoverableContent:l,delayDuration:h}=e,f=KO(N2,e.__scopeTooltip),y=WA(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(yP))):f.onClose(),s==null||s(A)},caller:N2}),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(B2,{...y,children:M.jsx(WDe,{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})})};yY.displayName=N2;var mP="TooltipTrigger",mY=p.forwardRef((e,t)=>{const{__scopeTooltip:a,...o}=e,i=Q2(mP,a),s=KO(mP,a),l=WA(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(F2,{asChild:!0,...l,children:M.jsx(uY.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)})})});mY.displayName=mP;var YO="TooltipPortal",[ZDe,XDe]=GA(YO,{forceMount:void 0}),vY=e=>{const{__scopeTooltip:t,forceMount:a,children:o,container:i}=e,s=Q2(YO,t);return M.jsx(ZDe,{scope:t,forceMount:a,children:M.jsx(Pn,{present:a||s.open,children:M.jsx(hY,{asChild:!0,container:i,children:o})})})};vY.displayName=YO;var Xd="TooltipContent",kY=p.forwardRef((e,t)=>{const a=XDe(Xd,e.__scopeTooltip),{forceMount:o=a.forceMount,side:i="top",...s}=e,l=Q2(Xd,e.__scopeTooltip);return M.jsx(Pn,{present:o||l.open,children:l.disableHoverableContent?M.jsx(gY,{side:i,...s,ref:t}):M.jsx(KDe,{side:i,...s,ref:t})})}),KDe=p.forwardRef((e,t)=>{const a=Q2(Xd,e.__scopeTooltip),o=KO(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=eze(N,_.getBoundingClientRect()),I=tze(N,L),O=nze(w.getBoundingClientRect()),D=oze([...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=!aze(N,l);L?x():I&&(x(),y())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[f,k,l,y,x]),M.jsx(gY,{...e,ref:s})}),[YDe,QDe]=GA(N2,{isInside:!1}),JDe=zDe("TooltipContent"),gY=p.forwardRef((e,t)=>{const{__scopeTooltip:a,children:o,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:l,...h}=e,f=Q2(Xd,a),y=WA(a),{onClose:k}=f;return p.useEffect(()=>(document.addEventListener(yP,k),()=>document.removeEventListener(yP,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(OA,{"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(JDe,{children:o}),M.jsx(YDe,{scope:a,isInside:!0,children:M.jsx(jOe,{id:f.contentId,role:"tooltip",children:i||o})})]})})});kY.displayName=Xd;var MY="TooltipArrow",xY=p.forwardRef((e,t)=>{const{__scopeTooltip:a,...o}=e,i=WA(a);return QDe(MY,a).isInside?null:M.jsx(DA,{...i,...o,ref:t})});xY.displayName=MY;function eze(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 tze(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 nze(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 aze(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 oze(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),rze(t)}function rze(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 ize=fY,cze=yY,sze=mY,lze=vY,dze=kY,uze=xY;function QO({delayDuration:e=0,...t}){return M.jsx(ize,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function bY({...e}){return M.jsx(QO,{children:M.jsx(cze,{"data-slot":"tooltip",...e})})}function wY({...e}){return M.jsx(sze,{"data-slot":"tooltip-trigger",...e})}function _Y({className:e,sideOffset:t=0,children:a,...o}){return M.jsx(lze,{children:M.jsxs(dze,{"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(uze,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const hze="sidebar_state",pze=3600*24*7,fze="16rem",yze="18rem",mze="3rem",vze="b",SY=p.createContext(null);function J2(){const e=p.useContext(SY);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function kze({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:i,children:s,...l}){const h=$De(),[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=`${hze}=${L}; path=/; max-age=${pze}`},[a,x]),b=p.useCallback(()=>h?y(N=>!N):S(N=>!N),[h,S,y]);p.useEffect(()=>{const N=L=>{L.key===vze&&(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(SY.Provider,{value:_,children:M.jsx(QO,{delayDuration:0,children:M.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":fze,"--sidebar-width-icon":mze,...i},className:ee("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...l,children:s})})})}function gze({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:i,...s}){const{isMobile:l,state:h,openMobile:f,setOpenMobile:y}=J2();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(rY,{open:f,onOpenChange:y,...s,children:M.jsxs(iY,{"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":yze},side:e,children:[M.jsxs(cY,{className:"sr-only",children:[M.jsx(sY,{children:"Sidebar"}),M.jsx(lY,{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 Mze({className:e,onClick:t,...a}){const{toggleSidebar:o}=J2();return M.jsxs(xA,{"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 xze({className:e,...t}){const{toggleSidebar:a}=J2();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 bze({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 wze({className:e,...t}){return M.jsx(PX,{"data-slot":"sidebar-input","data-sidebar":"input",className:ee("bg-background h-8 w-full shadow-none",e),...t})}function _ze({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 Sze({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 Cze({className:e,...t}){return M.jsx(XO,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:ee("bg-sidebar-border mx-2 w-auto",e),...t})}function Nze({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 Lze({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 Eze({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 Ize({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 Aze({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 Tze({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 Rze({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 $ze=MA("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 jze({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}=J2(),k=M.jsx(h,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":o,"data-active":t,className:ee($ze({variant:a,size:o}),s),...l});return i?(typeof i=="string"&&(i={children:i}),M.jsxs(bY,{children:[M.jsx(wY,{asChild:!0,children:k}),M.jsx(_Y,{side:"right",align:"center",hidden:y!=="collapsed"||f,...i})]})):k}function Pze({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 Oze({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 Dze({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(fP,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),M.jsx(fP,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}function zze({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 qze({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 Hze({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 Vze(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,Bze(i,...t)]}function Bze(...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 Fze(e){const t=Uze(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(Wze);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 Uze(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=Xze(i),h=Zze(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 Gze=Symbol("radix.slottable");function Wze(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gze}function Zze(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 Xze(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 Kze=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],e0=Kze.reduce((e,t)=>{const a=Fze(`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}},{}),CY=["PageUp","PageDown"],NY=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],LY={"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",[vP,Yze,Qze]=q2(su),[EY]=Vze(su,[Qze]),[Jze,ZA]=EY(su),IY=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"?eqe:tqe,[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=iqe(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=dqe(s),pe=uqe(Math.round((q-o)/s)*s+o,J),R=sA(pe,[o,i]);D(($=[])=>{const T=oqe($,R,B);if(lqe(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(Jze,{scope:e.__scopeSlider,name:a,disabled:h,min:o,max:i,valueIndexToChangeRef:N,thumbs:_.current,values:O,orientation:l,form:b,children:M.jsx(vP.Provider,{scope:e.__scopeSlider,children:M.jsx(vP.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=CY.includes(q.key)||q.shiftKey&&NY.includes(q.key)?10:1,R=N.current,$=O[R],T=s*pe*B;K($+T,R,{commit:!0})}}})})})})});IY.displayName=su;var[AY,TY]=EY(su,{startEdge:"left",endEdge:"right",size:"width",direction:1}),eqe=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=H2(i),_=w==="ltr",N=_&&!s||!_&&s;function L(I){const O=b.current||m.getBoundingClientRect(),D=[0,O.width],A=JO(D,N?[a,o]:[o,a]);return b.current=O,A(I-O.left)}return M.jsx(AY,{scope:e.__scopeSlider,startEdge:N?"left":"right",endEdge:N?"right":"left",direction:N?1:-1,size:"width",children:M.jsx(RY,{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=LY[N?"from-left":"from-right"].includes(I.key);y==null||y({event:I,direction:D?-1:1})}})})}),tqe=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=JO(N,S?[o,a]:[a,o]);return x.current=_,I(w-_.top)}return M.jsx(AY,{scope:e.__scopeSlider,startEdge:S?"bottom":"top",endEdge:S?"top":"bottom",size:"height",direction:S?1:-1,children:M.jsx(RY,{"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=LY[S?"from-bottom":"from-top"].includes(w.key);f==null||f({event:w,direction:N?-1:1})}})})}),RY=p.forwardRef((e,t)=>{const{__scopeSlider:a,onSlideStart:o,onSlideMove:i,onSlideEnd:s,onHomeKeyDown:l,onEndKeyDown:h,onStepKeyDown:f,...y}=e,k=ZA(su,a);return M.jsx(e0.span,{...y,ref:t,onKeyDown:xe(e.onKeyDown,m=>{m.key==="Home"?(l(m),m.preventDefault()):m.key==="End"?(h(m),m.preventDefault()):CY.concat(NY).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))})})}),$Y="SliderTrack",jY=p.forwardRef((e,t)=>{const{__scopeSlider:a,...o}=e,i=ZA($Y,a);return M.jsx(e0.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...o,ref:t})});jY.displayName=$Y;var kP="SliderRange",PY=p.forwardRef((e,t)=>{const{__scopeSlider:a,...o}=e,i=ZA(kP,a),s=TY(kP,a),l=p.useRef(null),h=ze(t,l),f=i.values.length,y=i.values.map(x=>zY(x,i.min,i.max)),k=f>1?Math.min(...y):0,m=100-Math.max(...y);return M.jsx(e0.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...o,ref:h,style:{...e.style,[s.startEdge]:k+"%",[s.endEdge]:m+"%"}})});PY.displayName=kP;var gP="SliderThumb",OY=p.forwardRef((e,t)=>{const a=Yze(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(nqe,{...e,ref:s,index:l})}),nqe=p.forwardRef((e,t)=>{const{__scopeSlider:a,index:o,name:i,...s}=e,l=ZA(gP,a),h=TY(gP,a),[f,y]=p.useState(null),k=ze(t,L=>y(L)),m=f?l.form||!!f.closest("form"):!0,x=_A(f),S=l.values[o],b=S===void 0?0:zY(S,l.min,l.max),w=rqe(o,l.values.length),_=x==null?void 0:x[h.size],N=_?cqe(_,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(vP.ItemSlot,{scope:e.__scopeSlider,children:M.jsx(e0.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(DY,{name:i??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:S},o)]})});OY.displayName=gP;var aqe="RadioBubbleInput",DY=p.forwardRef(({__scopeSlider:e,value:t,...a},o)=>{const i=p.useRef(null),s=ze(i,o),l=wA(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(e0.input,{style:{display:"none"},...a,ref:s,defaultValue:t})});DY.displayName=aqe;function oqe(e=[],t,a){const o=[...e];return o[a]=t,o.sort((i,s)=>i-s)}function zY(e,t,a){const s=100/(a-t)*(e-t);return sA(s,[0,100])}function rqe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function iqe(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 cqe(e,t,a){const o=e/2,s=JO([0,50],[0,o]);return(o-s(t)*a)*a}function sqe(e){return e.slice(0,-1).map((t,a)=>e[a+1]-t)}function lqe(e,t){if(t>0){const a=sqe(e);return Math.min(...a)>=t}return!0}function JO(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 dqe(e){return(String(e).split(".")[1]||"").length}function uqe(e,t){const a=Math.pow(10,t);return Math.round(e*a)/a}var hqe=IY,pqe=jY,fqe=PY,yqe=OY;function mqe({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(hqe,{"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(pqe,{"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(fqe,{"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(yqe,{"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 vqe=(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{}},kqe=p.createContext(void 0),gqe={setTheme:e=>{},themes:[]},Mqe=()=>{var e;return(e=p.useContext(kqe))!=null?e:gqe};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:`(${vqe.toString()})(${k})`}})});function xqe(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 bqe=e=>{switch(e){case"success":return Sqe;case"info":return Nqe;case"warning":return Cqe;case"error":return Lqe;default:return null}},wqe=Array(12).fill(0),_qe=({visible:e,className:t})=>ke.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ke.createElement("div",{className:"sonner-spinner"},wqe.map((a,o)=>ke.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),Sqe=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"})),Cqe=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"})),Nqe=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"})),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-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"})),Eqe=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"})),Iqe=()=>{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 MP=1;class Aqe{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:MP++,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(Rqe(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)||MP++;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 Aqe,Tqe=(e,t)=>{const a=(t==null?void 0:t.id)||MP++;return kn.addToast({title:e,...t,id:a}),a},Rqe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",$qe=Tqe,jqe=()=>kn.toasts,Pqe=()=>kn.getActiveToasts(),Oqe=Object.assign($qe,{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:jqe,getToasts:Pqe});xqe("[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 Ch(e){return e.label!==void 0}const Dqe=3,zqe="24px",qqe="16px",MF=4e3,Hqe=356,Vqe=14,Bqe=45,Fqe=200;function er(...e){return e.filter(Boolean).join(" ")}function Uqe(e){const[t,a]=e.split("-"),o=[];return t&&o.push(t),a&&o.push(a),o}const Gqe=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||MF),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||MF,[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=Iqe(),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)},Fqe)},[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(_qe,{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])||bqe(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)>=Bqe||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:Uqe(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:Eqe):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&&Ch(m.cancel)?ke.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||j,onClick:Ie=>{Ch(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&&Ch(m.action)?ke.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||V,onClick:Ie=>{Ch(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 xF(){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 Wqe(e,t){const a={};return[e,t].forEach((o,i)=>{const s=i===1,l=s?"--mobile-offset":"--offset",h=s?qqe:zqe;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 Zqe(){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 qY=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:_=Dqe,toastOptions:N,dir:L=xF(),gap:I=Vqe,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"?xF():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":`${Hqe}px`,"--gap":`${I}px`,...w,...Wqe(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(Gqe,{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}))}),Xqe=Object.freeze(Object.defineProperty({__proto__:null,Toaster:qY,toast:Oqe,useSonner:Zqe},Symbol.toStringTag,{value:"Module"})),Kqe=({...e})=>{const{theme:t="system"}=Mqe();return M.jsx(qY,{theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};function Yqe(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,Qqe(i,...t)]}function Qqe(...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 Jqe(e){const t=eHe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(nHe);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 eHe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=oHe(i),h=aHe(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 tHe=Symbol("radix.slottable");function nHe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tHe}function aHe(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 oHe(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 rHe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],HY=rHe.reduce((e,t)=>{const a=Jqe(`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}},{}),XA="Switch",[iHe]=Yqe(XA),[cHe,sHe]=iHe(XA),VY=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:XA});return M.jsxs(cHe,{scope:a,checked:N,disabled:h,children:[M.jsx(HY.button,{type:"button",role:"switch","aria-checked":N,"aria-required":l,"data-state":GY(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(UY,{control:x,bubbles:!w.current,name:o,value:f,checked:N,required:l,disabled:h,form:k,style:{transform:"translateX(-100%)"}})]})});VY.displayName=XA;var BY="SwitchThumb",FY=p.forwardRef((e,t)=>{const{__scopeSwitch:a,...o}=e,i=sHe(BY,a);return M.jsx(HY.span,{"data-state":GY(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})});FY.displayName=BY;var lHe="SwitchBubbleInput",UY=p.forwardRef(({__scopeSwitch:e,control:t,checked:a,bubbles:o=!0,...i},s)=>{const l=p.useRef(null),h=ze(l,s),f=wA(a),y=_A(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}})});UY.displayName=lHe;function GY(e){return e?"checked":"unchecked"}var dHe=VY,uHe=FY;function hHe({className:e,...t}){return M.jsx(dHe,{"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(uHe,{"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 pHe({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 fHe({className:e,...t}){return M.jsx("thead",{"data-slot":"table-header",className:ee("[&_tr]:border-b",e),...t})}function yHe({className:e,...t}){return M.jsx("tbody",{"data-slot":"table-body",className:ee("[&_tr:last-child]:border-0",e),...t})}function mHe({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 vHe({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 kHe({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 gHe({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 MHe({className:e,...t}){return M.jsx("caption",{"data-slot":"table-caption",className:ee("text-muted-foreground mt-4 text-sm",e),...t})}function xHe({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 bHe=()=>typeof window>"u"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,wHe=(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"&&bHe();document.documentElement.classList.toggle("dark",t)},WY=()=>typeof window>"u"?null:window.matchMedia("(prefers-color-scheme: dark)"),ZY=()=>{const e=localStorage.getItem("appearance");M2(e||"light")};function hVe(){var t;const e=localStorage.getItem("appearance")||"system";M2(e),(t=WY())==null||t.addEventListener("change",ZY)}function eD(){const[e,t]=p.useState("system"),[a,o]=p.useState(!1),i=p.useCallback(s=>{o(!0),t(s),localStorage.setItem("appearance",s),wHe("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=WY())==null||f.removeEventListener("change",ZY)}},[i]),{appearance:e,updateAppearance:i,isThemeChanging:a}}const _He={errors:{}},j1=new Proxy(_He,{set(e,t,a){return t==="errors"&&(Object.keys(a).length===0?e.errors={}:e.errors={...e.errors,...a}),!0}}),bF=(e,t,a)=>{if(t)j1.errors={...j1.errors,[e]:{hasError:!0,message:a}};else{const{[e]:o,...i}=j1.errors;j1.errors=i}},pVe=e=>{var t;return(t=j1.errors[e])==null?void 0:t.message},fVe=()=>Object.values(j1.errors).some(e=>e.hasError),yVe=()=>{j1.errors={}};function xP(e){const t=p.useRef(null),a=p.useRef(null),o=p.useRef(e),{appearance:i}=eD(),[s,l]=p.useState("");return p.useEffect(()=>{l(i==="dark"?"jse-theme-dark":"")},[i]),p.useEffect(()=>{a.current&&a.current.updateProps({content:e.content?{json:e.content}:e.json?{json:e.json}:void 0})},[e.content]),p.useEffect(()=>{var y;const h=e.schema?uee({schema:e.schema}):void 0,f=e.content?{json:e.content}:e.json?{json:e.json}:void 0;if(a.current=hee({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;bF(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}),bF(e.name,x,"Error validation JSON schema")}return()=>{a.current&&(a.current.destroy(),a.current=null)}},[]),p.useEffect(()=>{if(a.current){const h=SHe(e,o.current);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 SHe(e,t){var o;const a={};for(const[i,s]of Object.entries(e))if(i==="content"){const l=s==null?void 0:s.json,h=(o=t[i])==null?void 0:o.json;JSON.stringify(l)!==JSON.stringify(h)&&(a[i]=s)}else s!==t[i]&&(a[i]=s);return a}const mVe=Object.freeze(Object.defineProperty({__proto__:null,default:xP},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},kIe="DialogDescriptionWarning",gIe=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${xW(kIe).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},oO=cW,bW=lW,rO=uW,iO=hW,cO=pW,wW=yW,_W=vW,AA=gW,l2='[cmdk-group=""]',Lj='[cmdk-group-items=""]',MIe='[cmdk-group-heading=""]',SW='[cmdk-item=""]',rF=`${SW}:not([aria-disabled="true"])`,eP="cmdk-item-select",zd="data-value",xIe=(e,t,a)=>DLe(e,t,a),CW=p.createContext(void 0),z2=()=>p.useContext(CW),NW=p.createContext(void 0),sO=()=>p.useContext(NW),LW=p.createContext(void 0),EW=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=IW(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=TIe();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:xIe;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(Lj);ye?ye.appendChild(ie.parentElement===ye?ie:ie.closest(`${Lj} > *`)):le.appendChild(ie.parentElement===le?ie:ie.closest(`${Lj} > *`))}),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(MIe))==null||le.scrollIntoView({block:"nearest"})),ie.scrollIntoView({block:"nearest"}))}function J(){var X;return(X=D.current)==null?void 0:X.querySelector(`${SW}[aria-selected="true"]`)}function pe(){var X;return Array.from(((X=D.current)==null?void 0:X.querySelectorAll(rF))||[])}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?IIe(le,l2):AIe(le,l2),ie=le==null?void 0:le.querySelector(rF);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(eP);ie.dispatchEvent(ye)}}}}},p.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:$Ie},f),TA(e,X=>p.createElement(NW.Provider,{value:A},p.createElement(CW.Provider,{value:j},X))))}),bIe=p.forwardRef((e,t)=>{var a,o;let i=It(),s=p.useRef(null),l=p.useContext(LW),h=z2(),f=IW(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=AW(i,s,[e.value,e.children,s],e.keywords),m=sO(),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(eP,b),()=>P.removeEventListener(eP,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)}),wIe=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=z2(),m=Ci(S=>i||k.filter()===!1?!0:S.search?S.filtered.groups.has(l):!0);V1(()=>k.group(l),[]),AW(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),TA(e,S=>p.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?y:void 0},p.createElement(LW.Provider,{value:x},S))))}),_Ie=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"})}),SIe=p.forwardRef((e,t)=>{let{onValueChange:a,...o}=e,i=e.value!=null,s=sO(),l=Ci(y=>y.search),h=Ci(y=>y.selectedItemId),f=z2();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)}})}),CIe=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=z2();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},TA(e,y=>p.createElement("div",{ref:kt(l,f.listInnerRef),"cmdk-list-sizer":""},y)))}),NIe=p.forwardRef((e,t)=>{let{open:a,onOpenChange:o,overlayClassName:i,contentClassName:s,container:l,...h}=e;return p.createElement(oO,{open:a,onOpenChange:o},p.createElement(rO,{container:l},p.createElement(iO,{"cmdk-overlay":"",className:i}),p.createElement(cO,{"aria-label":e.label,"cmdk-dialog":"",className:s},p.createElement(EW,{ref:t,...h}))))}),LIe=p.forwardRef((e,t)=>Ci(a=>a.filtered.count===0)?p.createElement(jn.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),EIe=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},TA(e,l=>p.createElement("div",{"aria-hidden":!0},l)))}),Z1=Object.assign(EW,{List:CIe,Item:bIe,Input:SIe,Group:wIe,Separator:_Ie,Dialog:NIe,Empty:LIe,Loading:EIe});function IIe(e,t){let a=e.nextElementSibling;for(;a;){if(a.matches(t))return a;a=a.nextElementSibling}}function AIe(e,t){let a=e.previousElementSibling;for(;a;){if(a.matches(t))return a;a=a.previousElementSibling}}function IW(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=sO(),a=()=>e(t.snapshot());return p.useSyncExternalStore(t.subscribe,a,a)}function AW(e,t,a,o=[]){let i=p.useRef(),s=z2();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 TIe=()=>{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 RIe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function TA({asChild:e,children:t},a){return e&&p.isValidElement(t)?p.cloneElement(RIe(t),{ref:t.ref},a(t.props.children)):a(t)}var $Ie={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function TW({...e}){return M.jsx(oO,{"data-slot":"dialog",...e})}function jIe({...e}){return M.jsx(bW,{"data-slot":"dialog-trigger",...e})}function RW({...e}){return M.jsx(rO,{"data-slot":"dialog-portal",...e})}function PIe({...e}){return M.jsx(AA,{"data-slot":"dialog-close",...e})}function $W({className:e,...t}){return M.jsx(iO,{"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 jW({className:e,children:t,...a}){return M.jsxs(RW,{"data-slot":"dialog-portal",children:[M.jsx($W,{}),M.jsxs(cO,{"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(AA,{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 PW({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 OIe({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 OW({className:e,...t}){return M.jsx(wW,{"data-slot":"dialog-title",className:ee("text-lg leading-none font-semibold",e),...t})}function DW({className:e,...t}){return M.jsx(_W,{"data-slot":"dialog-description",className:ee("text-muted-foreground text-sm",e),...t})}function lO({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 DIe({title:e="Command Palette",description:t="Search for a command to run...",children:a,...o}){return M.jsxs(TW,{...o,children:[M.jsxs(PW,{className:"sr-only",children:[M.jsx(OW,{children:e}),M.jsx(DW,{children:t})]}),M.jsx(jW,{className:"overflow-hidden p-0",children:M.jsx(lO,{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 zW({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 qW({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 HW({...e}){return M.jsx(Z1.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function VW({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 BW({className:e,...t}){return M.jsx(Z1.Separator,{"data-slot":"command-separator",className:ee("bg-border -mx-1 h-px",e),...t})}function FW({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 zIe({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 qIe(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,HIe(i,...t)]}function HIe(...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 VIe(e){const t=BIe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(UIe);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 BIe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=WIe(i),h=GIe(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 FIe=Symbol("radix.slottable");function UIe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===FIe}function GIe(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 WIe(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 ZIe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],XIe=ZIe.reduce((e,t)=>{const a=VIe(`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 KIe(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,YIe(i,...t)]}function YIe(...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 iF(e){const t=QIe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(eAe);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 QIe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=nAe(i),h=tAe(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 JIe=Symbol("radix.slottable");function eAe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JIe}function tAe(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 nAe(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 q2(e){const t=e+"CollectionProvider",[a,o]=KIe(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=iF(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=iF(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 aAe(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,oAe(i,...t)]}function oAe(...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 rAe=p.createContext(void 0);function H2(e){const t=p.useContext(rAe);return e||t||"ltr"}const iAe=["top","right","bottom","left"],Ni=Math.min,Gn=Math.max,nA=Math.round,_h=Math.floor,dr=e=>({x:e,y:e}),cAe={left:"right",right:"left",bottom:"top",top:"bottom"};function tP(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 dO(e){return e==="x"?"y":"x"}function uO(e){return e==="y"?"height":"width"}function cr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function hO(e){return dO(cr(e))}function sAe(e,t,a){a===void 0&&(a=!1);const o=ou(e),i=hO(e),s=uO(i);let l=i==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=aA(l)),[l,aA(l)]}function lAe(e){const t=aA(e);return[nP(e),t,nP(t)]}function nP(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const cF=["left","right"],sF=["right","left"],dAe=["top","bottom"],uAe=["bottom","top"];function hAe(e,t,a){switch(e){case"top":case"bottom":return a?t?sF:cF:t?cF:sF;case"left":case"right":return t?dAe:uAe;default:return[]}}function pAe(e,t,a,o){const i=ou(e);let s=hAe(Hr(e),a==="start",o);return i&&(s=s.map(l=>l+"-"+i),t&&(s=s.concat(s.map(nP)))),s}function aA(e){const t=Hr(e);return cAe[t]+e.slice(t.length)}function fAe(e){return{top:0,right:0,bottom:0,left:0,...e}}function UW(e){return typeof e!="number"?fAe(e):{top:e,right:e,bottom:e,left:e}}function oA(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 lF(e,t,a){let{reference:o,floating:i}=e;const s=cr(t),l=hO(t),h=uO(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 yAe(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=UW(S),_=h[x?m==="floating"?"reference":"floating":m],N=oA(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=oA(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 mAe=50,vAe=async(e,t,a)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:l}=a,h=l.detectOverflow?l:{...l,detectOverflow:yAe},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}=lF(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<mAe&&(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}=lF(y,x,f)),w=-1)}return{x:k,y:m,placement:x,strategy:i,middlewareData:b}},kAe=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=UW(k),x={x:a,y:o},S=hO(i),b=uO(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=tP(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}}}),gAe=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?[aA(h)]:lAe(h)),P=b!=="none";!x&&P&&D.push(...pAe(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=sAe(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 dF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uF(e){return iAe.some(t=>e[t]>=0)}const MAe=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=dF(l,a.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:uF(h)}}}case"escaped":{const l=await o.detectOverflow(t,{...s,altBoundary:!0}),h=dF(l,a.floating);return{data:{escapedOffsets:h,escaped:uF(h)}}}default:return{}}}}},GW=new Set(["left","top"]);async function xAe(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=GW.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 bAe=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 xAe(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}}}}},wAe=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=dO(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=tP(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=tP(I,w,O)}const _=f.fn({...t,[S]:b,[x]:w});return{..._,data:{x:_.x-a,y:_.y-o,enabled:{[S]:l,[x]:h}}}}}},_Ae=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=dO(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=GW.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}}}},SAe=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 RA(){return typeof window<"u"}function ru(e){return WW(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=(WW(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function WW(e){return RA()?e instanceof Node||e instanceof Wn(e).Node:!1}function _a(e){return RA()?e instanceof Element||e instanceof Wn(e).Element:!1}function Vr(e){return RA()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function hF(e){return!RA()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}function V2(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 CAe(e){return/^(table|td|th)$/.test(ru(e))}function $A(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const NAe=/transform|translate|scale|rotate|perspective|filter/,LAe=/paint|layout|strict|content/,nc=e=>!!e&&e!=="none";let Ej;function pO(e){const t=_a(e)?Sa(e):e;return nc(t.transform)||nc(t.translate)||nc(t.scale)||nc(t.rotate)||nc(t.perspective)||!fO()&&(nc(t.backdropFilter)||nc(t.filter))||NAe.test(t.willChange||"")||LAe.test(t.contain||"")}function EAe(e){let t=Li(e);for(;Vr(t)&&!Wd(t);){if(pO(t))return t;if($A(t))return null;t=Li(t)}return null}function fO(){return Ej==null&&(Ej=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ej}function Wd(e){return/^(html|body|#document)$/.test(ru(e))}function Sa(e){return Wn(e).getComputedStyle(e)}function jA(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||hF(e)&&e.host||pr(e);return hF(t)?t.host:t}function ZW(e){const t=Li(e);return Wd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(t)&&V2(t)?t:ZW(t)}function _2(e,t,a){var o;t===void 0&&(t=[]),a===void 0&&(a=!0);const i=ZW(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),l=Wn(i);if(s){const h=aP(l);return t.concat(l,l.visualViewport||[],V2(i)?i:[],h&&a?_2(h):[])}else return t.concat(i,_2(i,[],a))}function aP(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function XW(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=nA(a)!==s||nA(o)!==l;return h&&(a=s,o=l),{width:a,height:o,$:h}}function yO(e){return _a(e)?e:e.contextElement}function Bd(e){const t=yO(e);if(!Vr(t))return dr(1);const a=t.getBoundingClientRect(),{width:o,height:i,$:s}=XW(t);let l=(s?nA(a.width):a.width)/o,h=(s?nA(a.height):a.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!h||!Number.isFinite(h))&&(h=1),{x:l,y:h}}const IAe=dr(0);function KW(e){const t=Wn(e);return!fO()||!t.visualViewport?IAe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AAe(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=yO(e);let l=dr(1);t&&(o?_a(o)&&(l=Bd(o)):l=Bd(e));const h=AAe(s,a,o)?KW(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=aP(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=aP(b)}}return oA({width:k,height:m,x:f,y})}function PA(e,t){const a=jA(e).scrollLeft;return t?t.left+a:B1(pr(e)).left+a}function YW(e,t){const a=e.getBoundingClientRect(),o=a.left+t.scrollLeft-PA(e,a),i=a.top+t.scrollTop;return{x:o,y:i}}function TAe(e){let{elements:t,rect:a,offsetParent:o,strategy:i}=e;const s=i==="fixed",l=pr(o),h=t?$A(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"||V2(l))&&(f=jA(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?YW(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 RAe(e){return Array.from(e.getClientRects())}function $Ae(e){const t=pr(e),a=jA(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+PA(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 pF=25;function jAe(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=fO();(!k||k&&t==="fixed")&&(h=i.offsetLeft,f=i.offsetTop)}const y=PA(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<=pF&&(s-=b)}else y<=pF&&(s+=y);return{width:s,height:l,x:h,y:f}}function PAe(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 fF(e,t,a){let o;if(t==="viewport")o=jAe(e,a);else if(t==="document")o=$Ae(pr(e));else if(_a(t))o=PAe(t,a);else{const i=KW(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return oA(o)}function QW(e,t){const a=Li(e);return a===t||!_a(a)||Wd(a)?!1:Sa(a).position==="fixed"||QW(a,t)}function OAe(e,t){const a=t.get(e);if(a)return a;let o=_2(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=pO(l);!f&&h.position==="fixed"&&(i=null),(s?!f&&!i:!f&&h.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||V2(l)&&!f&&QW(e,l))?o=o.filter(k=>k!==l):i=h,l=Li(l)}return t.set(e,o),o}function DAe(e){let{element:t,boundary:a,rootBoundary:o,strategy:i}=e;const l=[...a==="clippingAncestors"?$A(t)?[]:OAe(t,this._c):[].concat(a),o],h=fF(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=fF(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 zAe(e){const{width:t,height:a}=XW(e);return{width:t,height:a}}function qAe(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=PA(i)}if(o||!o&&!s)if((ru(t)!=="body"||V2(i))&&(h=jA(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?YW(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 Ij(e){return Sa(e).position==="static"}function yF(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 JW(e,t){const a=Wn(e);if($A(e))return a;if(!Vr(e)){let i=Li(e);for(;i&&!Wd(i);){if(_a(i)&&!Ij(i))return i;i=Li(i)}return a}let o=yF(e,t);for(;o&&CAe(o)&&Ij(o);)o=yF(o,t);return o&&Wd(o)&&Ij(o)&&!pO(o)?a:o||EAe(e)||a}const HAe=async function(e){const t=this.getOffsetParent||JW,a=this.getDimensions,o=await a(e.floating);return{reference:qAe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function VAe(e){return Sa(e).direction==="rtl"}const BAe={convertOffsetParentRelativeRectToViewportRelativeRect:TAe,getDocumentElement:pr,getClippingRect:DAe,getOffsetParent:JW,getElementRects:HAe,getClientRects:RAe,getDimensions:zAe,getScale:Bd,isElement:_a,isRTL:VAe};function eZ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function FAe(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=_h(m),w=_h(i.clientWidth-(k+x)),_=_h(i.clientHeight-(m+S)),N=_h(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&&!eZ(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 UAe(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=yO(e),k=i||s?[...y?_2(y):[],...t?_2(t):[]]:[];k.forEach(N=>{i&&N.addEventListener("scroll",a,{passive:!0}),s&&N.addEventListener("resize",a)});const m=y&&h?FAe(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&&!eZ(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 GAe=bAe,WAe=wAe,ZAe=gAe,XAe=SAe,KAe=MAe,mF=kAe,YAe=_Ae,QAe=(e,t,a)=>{const o=new Map,i={platform:BAe,...a},s={...i.platform,_c:o};return vAe(e,t,{...i,platform:s})};var JAe=typeof document<"u",eTe=function(){},VI=JAe?p.useLayoutEffect:eTe;function rA(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(!rA(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)&&!rA(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function tZ(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vF(e,t){const a=tZ(e);return Math.round(t*a)/a}function Aj(e){const t=p.useRef(e);return VI(()=>{t.current=e}),t}function tTe(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);rA(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=Aj(f),q=Aj(i),B=Aj(y),F=p.useCallback(()=>{if(!P.current||!A.current)return;const T={placement:t,strategy:a,middleware:x};q.current&&(T.platform=q.current),QAe(P.current,A.current,T).then(G=>{const W={...G,isPositioned:B.current!==!1};J.current&&!rA(j.current,W)&&(j.current=W,Kd.flushSync(()=>{m(W)}))})},[x,t,a,q,B]);VI(()=>{y===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,m(T=>({...T,isPositioned:!1})))},[y]);const J=p.useRef(!1);VI(()=>(J.current=!0,()=>{J.current=!1}),[]),VI(()=>{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=vF(R.floating,k.x),W=vF(R.floating,k.y);return h?{...T,transform:"translate("+G+"px, "+W+"px)",...tZ(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 nTe=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?mF({element:o.current,padding:i}).fn(a):{}:o?mF({element:o,padding:i}).fn(a):{}}}},aTe=(e,t)=>{const a=GAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},oTe=(e,t)=>{const a=WAe(e);return{name:a.name,fn:a.fn,options:[e,t]}},rTe=(e,t)=>({fn:YAe(e).fn,options:[e,t]}),iTe=(e,t)=>{const a=ZAe(e);return{name:a.name,fn:a.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=nTe(e);return{name:a.name,fn:a.fn,options:[e,t]}};function dTe(e){const t=uTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(pTe);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 uTe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=yTe(i),h=fTe(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 hTe=Symbol("radix.slottable");function pTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hTe}function fTe(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 mTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vTe=mTe.reduce((e,t)=>{const a=dTe(`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}},{}),kTe="Arrow",nZ=p.forwardRef((e,t)=>{const{children:a,width:o=10,height:i=5,...s}=e;return M.jsx(vTe.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"})})});nZ.displayName=kTe;var gTe=nZ;function MTe(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,xTe(i,...t)]}function xTe(...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 bTe(e){const t=wTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(STe);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=NTe(i),h=CTe(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 _Te=Symbol("radix.slottable");function STe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_Te}function CTe(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 NTe(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 LTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],aZ=LTe.reduce((e,t)=>{const a=bTe(`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}},{}),mO="Popper",[oZ,Ti]=MTe(mO),[ETe,rZ]=oZ(mO),iZ=e=>{const{__scopePopper:t,children:a}=e,[o,i]=p.useState(null);return M.jsx(ETe,{scope:t,anchor:o,onAnchorChange:i,children:a})};iZ.displayName=mO;var cZ="PopperAnchor",sZ=p.forwardRef((e,t)=>{const{__scopePopper:a,virtualRef:o,...i}=e,s=rZ(cZ,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(aZ.div,{...i,ref:h})});sZ.displayName=cZ;var vO="PopperContent",[ITe,ATe]=oZ(vO),lZ=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,_=rZ(vO,a),[N,L]=p.useState(null),I=ze(t,Ee=>L(Ee)),[O,D]=p.useState(null),P=_A(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(RTe),altBoundary:B},{refs:J,floatingStyles:pe,placement:R,isPositioned:$,middlewareData:T}=tTe({strategy:"fixed",placement:V,whileElementsMounted:(...Ee)=>UAe(...Ee,{animationFrame:S==="always"}),elements:{reference:_.anchor},middleware:[aTe({mainAxis:i+j,alignmentAxis:l}),f&&oTe({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?rTe():void 0,...F}),f&&iTe({...F}),cTe({...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&&lTe({element:O,padding:h}),$Te({arrowWidth:A,arrowHeight:j}),x&&sTe({strategy:"referenceHidden",...F})]}),[G,W]=hZ(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(ITe,{scope:a,placedSide:G,onArrowChange:D,arrowX:X,arrowY:ne,shouldHideArrow:le,children:M.jsx(aZ.div,{"data-side":G,"data-align":W,...w,ref:I,style:{...w.style,animation:$?void 0:"none"}})})})});lZ.displayName=vO;var dZ="PopperArrow",TTe={top:"bottom",right:"left",bottom:"top",left:"right"},uZ=p.forwardRef(function(t,a){const{__scopePopper:o,...i}=t,s=ATe(dZ,o),l=TTe[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(gTe,{...i,ref:a,style:{...i.style,display:"block"}})})});uZ.displayName=dZ;function RTe(e){return e!==null}var $Te=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]=hZ(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 hZ(e){const[t,a="center"]=e.split("-");return[t,a]}var B2=iZ,F2=sZ,OA=lZ,DA=uZ;function pZ(e){const t=jTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(OTe);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 jTe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=zTe(i),h=DTe(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 OTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===PTe}function DTe(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 zTe(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"],iu=qTe.reduce((e,t)=>{const a=pZ(`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 HTe(e,t){e&&Kd.flushSync(()=>e.dispatchEvent(t))}var VTe="Portal",fZ=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});fZ.displayName=VTe;function BTe(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,FTe(i,...t)]}function FTe(...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 UTe(e){const t=GTe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(ZTe);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 GTe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=KTe(i),h=XTe(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 WTe=Symbol("radix.slottable");function ZTe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WTe}function XTe(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 KTe(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 YTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yZ=YTe.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}},{}),Tj="rovingFocusGroup.onEntryFocus",QTe={bubbles:!1,cancelable:!0},U2="RovingFocusGroup",[oP,mZ,JTe]=q2(U2),[eRe,zA]=BTe(U2,[JTe]),[tRe,nRe]=eRe(U2),vZ=p.forwardRef((e,t)=>M.jsx(oP.Provider,{scope:e.__scopeRovingFocusGroup,children:M.jsx(oP.Slot,{scope:e.__scopeRovingFocusGroup,children:M.jsx(aRe,{...e,ref:t})})}));vZ.displayName=U2;var aRe=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=H2(s),[w,_]=bn({prop:l,defaultProp:h??null,onChange:f,caller:U2}),[N,L]=p.useState(!1),I=Zn(y),O=mZ(a),D=p.useRef(!1),[P,A]=p.useState(0);return p.useEffect(()=>{const j=x.current;if(j)return j.addEventListener(Tj,I),()=>j.removeEventListener(Tj,I)},[I]),M.jsx(tRe,{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(yZ.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(Tj,QTe);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);MZ(pe,k)}}D.current=!1}),onBlur:xe(e.onBlur,()=>L(!1))})})}),kZ="RovingFocusGroupItem",gZ=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=nRe(kZ,a),m=k.currentTabStopId===y,x=mZ(a),{onFocusableItemAdd:S,onFocusableItemRemove:b,currentTabStopId:w}=k;return p.useEffect(()=>{if(o)return S(),()=>b()},[o,S,b]),M.jsx(oP.ItemSlot,{scope:a,id:y,focusable:o,active:i,children:M.jsx(yZ.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=iRe(_,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?cRe(I,O+1):I.slice(O+1)}setTimeout(()=>MZ(I))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:w!=null}):l})})});gZ.displayName=kZ;var oRe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rRe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function iRe(e,t,a){const o=rRe(e.key,a);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return oRe[o]}function MZ(e,t=!1){const a=document.activeElement;for(const o of e)if(o===a||(o.focus({preventScroll:t}),document.activeElement!==a))return}function cRe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var xZ=vZ,bZ=gZ,rP=["Enter"," "],sRe=["ArrowDown","PageUp","Home"],wZ=["ArrowUp","PageDown","End"],lRe=[...sRe,...wZ],dRe={ltr:[...rP,"ArrowRight"],rtl:[...rP,"ArrowLeft"]},uRe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},G2="Menu",[S2,hRe,pRe]=q2(G2),[X1,W2]=aAe(G2,[pRe,Ti,zA]),Z2=Ti(),_Z=zA(),[SZ,Ri]=X1(G2),[fRe,X2]=X1(G2),CZ=e=>{const{__scopeMenu:t,open:a=!1,children:o,dir:i,onOpenChange:s,modal:l=!0}=e,h=Z2(t),[f,y]=p.useState(null),k=p.useRef(!1),m=Zn(s),x=H2(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(B2,{...h,children:M.jsx(SZ,{scope:t,open:a,onOpenChange:m,content:f,onContentChange:y,children:M.jsx(fRe,{scope:t,onClose:p.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:k,dir:x,modal:l,children:o})})})};CZ.displayName=G2;var yRe="MenuAnchor",kO=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e,i=Z2(a);return M.jsx(F2,{...i,...o,ref:t})});kO.displayName=yRe;var gO="MenuPortal",[mRe,NZ]=X1(gO,{forceMount:void 0}),LZ=e=>{const{__scopeMenu:t,forceMount:a,children:o,container:i}=e,s=Ri(gO,t);return M.jsx(mRe,{scope:t,forceMount:a,children:M.jsx(Pn,{present:a||s.open,children:M.jsx(fZ,{asChild:!0,container:i,children:o})})})};LZ.displayName=gO;var da="MenuContent",[vRe,MO]=X1(da),EZ=p.forwardRef((e,t)=>{const a=NZ(da,e.__scopeMenu),{forceMount:o=a.forceMount,...i}=e,s=Ri(da,e.__scopeMenu),l=X2(da,e.__scopeMenu);return M.jsx(S2.Provider,{scope:e.__scopeMenu,children:M.jsx(Pn,{present:o||s.open,children:M.jsx(S2.Slot,{scope:e.__scopeMenu,children:l.modal?M.jsx(kRe,{...i,ref:t}):M.jsx(gRe,{...i,ref:t})})})})}),kRe=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 EA(s)},[]),M.jsx(xO,{...e,ref:i,trapFocus:a.open,disableOutsidePointerEvents:a.open,disableOutsideScroll:!0,onFocusOutside:xe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>a.onOpenChange(!1)})}),gRe=p.forwardRef((e,t)=>{const a=Ri(da,e.__scopeMenu);return M.jsx(xO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>a.onOpenChange(!1)})}),MRe=pZ("MenuContent.ScrollLock"),xO=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=X2(da,a),L=Z2(a),I=_Z(a),O=hRe(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?D2:p.Fragment,R=b?{as:MRe,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=TRe(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),[]),NA();const T=p.useCallback(G=>{var Me,X;return F.current===((Me=B.current)==null?void 0:Me.side)&&$Re(G,(X=B.current)==null?void 0:X.area)},[]);return M.jsx(vRe,{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(O2,{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(xZ,{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(OA,{role:"menu","aria-orientation":"vertical","data-state":GZ(_.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||!lRe.includes(G.key))return;G.preventDefault();const ye=O().filter(he=>!he.disabled).map(he=>he.ref.current);wZ.includes(G.key)&&ye.reverse(),IRe(ye)}),onBlur:xe(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(V.current),K.current="")}),onPointerMove:xe(e.onPointerMove,C2(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}}))})})})})})})});EZ.displayName=da;var xRe="MenuGroup",bO=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e;return M.jsx(iu.div,{role:"group",...o,ref:t})});bO.displayName=xRe;var bRe="MenuLabel",IZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e;return M.jsx(iu.div,{...o,ref:t})});IZ.displayName=bRe;var iA="MenuItem",kF="menu.itemSelect",qA=p.forwardRef((e,t)=>{const{disabled:a=!1,onSelect:o,...i}=e,s=p.useRef(null),l=X2(iA,e.__scopeMenu),h=MO(iA,e.__scopeMenu),f=ze(t,s),y=p.useRef(!1),k=()=>{const m=s.current;if(!a&&m){const x=new CustomEvent(kF,{bubbles:!0,cancelable:!0});m.addEventListener(kF,S=>o==null?void 0:o(S),{once:!0}),HTe(m,x),x.defaultPrevented?y.current=!1:l.onClose()}};return M.jsx(AZ,{...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===" "||rP.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});qA.displayName=iA;var AZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,disabled:o=!1,textValue:i,...s}=e,l=MO(iA,a),h=_Z(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(S2.ItemSlot,{scope:a,disabled:o,textValue:i??x,children:M.jsx(bZ,{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,C2(b=>{o?l.onItemLeave(b):(l.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:xe(e.onPointerLeave,C2(b=>l.onItemLeave(b))),onFocus:xe(e.onFocus,()=>m(!0)),onBlur:xe(e.onBlur,()=>m(!1))})})})}),wRe="MenuCheckboxItem",TZ=p.forwardRef((e,t)=>{const{checked:a=!1,onCheckedChange:o,...i}=e;return M.jsx(OZ,{scope:e.__scopeMenu,checked:a,children:M.jsx(qA,{role:"menuitemcheckbox","aria-checked":cA(a)?"mixed":a,...i,ref:t,"data-state":SO(a),onSelect:xe(i.onSelect,()=>o==null?void 0:o(cA(a)?!0:!a),{checkForDefaultPrevented:!1})})})});TZ.displayName=wRe;var RZ="MenuRadioGroup",[_Re,SRe]=X1(RZ,{value:void 0,onValueChange:()=>{}}),$Z=p.forwardRef((e,t)=>{const{value:a,onValueChange:o,...i}=e,s=Zn(o);return M.jsx(_Re,{scope:e.__scopeMenu,value:a,onValueChange:s,children:M.jsx(bO,{...i,ref:t})})});$Z.displayName=RZ;var jZ="MenuRadioItem",PZ=p.forwardRef((e,t)=>{const{value:a,...o}=e,i=SRe(jZ,e.__scopeMenu),s=a===i.value;return M.jsx(OZ,{scope:e.__scopeMenu,checked:s,children:M.jsx(qA,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":SO(s),onSelect:xe(o.onSelect,()=>{var l;return(l=i.onValueChange)==null?void 0:l.call(i,a)},{checkForDefaultPrevented:!1})})})});PZ.displayName=jZ;var wO="MenuItemIndicator",[OZ,CRe]=X1(wO,{checked:!1}),DZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,forceMount:o,...i}=e,s=CRe(wO,a);return M.jsx(Pn,{present:o||cA(s.checked)||s.checked===!0,children:M.jsx(iu.span,{...i,ref:t,"data-state":SO(s.checked)})})});DZ.displayName=wO;var NRe="MenuSeparator",zZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e;return M.jsx(iu.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});zZ.displayName=NRe;var LRe="MenuArrow",qZ=p.forwardRef((e,t)=>{const{__scopeMenu:a,...o}=e,i=Z2(a);return M.jsx(DA,{...i,...o,ref:t})});qZ.displayName=LRe;var _O="MenuSub",[ERe,HZ]=X1(_O),VZ=e=>{const{__scopeMenu:t,children:a,open:o=!1,onOpenChange:i}=e,s=Ri(_O,t),l=Z2(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(B2,{...l,children:M.jsx(SZ,{scope:t,open:o,onOpenChange:m,content:y,onContentChange:k,children:M.jsx(ERe,{scope:t,contentId:It(),triggerId:It(),trigger:h,onTriggerChange:f,children:a})})})};VZ.displayName=_O;var u2="MenuSubTrigger",BZ=p.forwardRef((e,t)=>{const a=Ri(u2,e.__scopeMenu),o=X2(u2,e.__scopeMenu),i=HZ(u2,e.__scopeMenu),s=MO(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(kO,{asChild:!0,...y,children:M.jsx(AZ,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":i.contentId,"data-state":GZ(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,C2(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,C2(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===" "||dRe[o.dir].includes(m.key)&&(a.onOpenChange(!0),(S=a.content)==null||S.focus(),m.preventDefault())})})})});BZ.displayName=u2;var FZ="MenuSubContent",UZ=p.forwardRef((e,t)=>{const a=NZ(da,e.__scopeMenu),{forceMount:o=a.forceMount,...i}=e,s=Ri(da,e.__scopeMenu),l=X2(da,e.__scopeMenu),h=HZ(FZ,e.__scopeMenu),f=p.useRef(null),y=ze(t,f);return M.jsx(S2.Provider,{scope:e.__scopeMenu,children:M.jsx(Pn,{present:o||s.open,children:M.jsx(S2.Slot,{scope:e.__scopeMenu,children:M.jsx(xO,{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=uRe[l.dir].includes(k.key);m&&x&&(s.onOpenChange(!1),(S=h.trigger)==null||S.focus(),k.preventDefault())})})})})})});UZ.displayName=FZ;function GZ(e){return e?"open":"closed"}function cA(e){return e==="indeterminate"}function SO(e){return cA(e)?"indeterminate":e?"checked":"unchecked"}function IRe(e){const t=document.activeElement;for(const a of e)if(a===t||(a.focus(),document.activeElement!==t))return}function ARe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}function TRe(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=ARe(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 RRe(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 $Re(e,t){if(!t)return!1;const a={x:e.clientX,y:e.clientY};return RRe(a,t)}function C2(e){return t=>t.pointerType==="mouse"?e(t):void 0}var CO=CZ,NO=kO,LO=LZ,EO=EZ,IO=bO,AO=IZ,TO=qA,RO=TZ,$O=$Z,jO=PZ,PO=DZ,OO=zZ,DO=qZ,zO=VZ,qO=BZ,HO=UZ,VO="ContextMenu",[jRe]=qIe(VO,[W2]),hn=W2(),[PRe,WZ]=jRe(VO),ZZ=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(PRe,{scope:t,open:l,onOpenChange:k,modal:s,children:M.jsx(CO,{...f,dir:i,open:l,onOpenChange:k,modal:s,children:a})})};ZZ.displayName=VO;var XZ="ContextMenuTrigger",KZ=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,disabled:o=!1,...i}=e,s=WZ(XZ,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(NO,{...l,virtualRef:f}),M.jsx(XIe.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,Sh(x=>{k(),y.current=window.setTimeout(()=>m(x),700)})),onPointerMove:o?e.onPointerMove:xe(e.onPointerMove,Sh(k)),onPointerCancel:o?e.onPointerCancel:xe(e.onPointerCancel,Sh(k)),onPointerUp:o?e.onPointerUp:xe(e.onPointerUp,Sh(k))})]})});KZ.displayName=XZ;var ORe="ContextMenuPortal",YZ=e=>{const{__scopeContextMenu:t,...a}=e,o=hn(t);return M.jsx(LO,{...o,...a})};YZ.displayName=ORe;var QZ="ContextMenuContent",JZ=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=WZ(QZ,a),s=hn(a),l=p.useRef(!1);return M.jsx(EO,{...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)"}})});JZ.displayName=QZ;var DRe="ContextMenuGroup",eX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(IO,{...i,...o,ref:t})});eX.displayName=DRe;var zRe="ContextMenuLabel",tX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(AO,{...i,...o,ref:t})});tX.displayName=zRe;var qRe="ContextMenuItem",nX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(TO,{...i,...o,ref:t})});nX.displayName=qRe;var HRe="ContextMenuCheckboxItem",aX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(RO,{...i,...o,ref:t})});aX.displayName=HRe;var VRe="ContextMenuRadioGroup",oX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx($O,{...i,...o,ref:t})});oX.displayName=VRe;var BRe="ContextMenuRadioItem",rX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(jO,{...i,...o,ref:t})});rX.displayName=BRe;var FRe="ContextMenuItemIndicator",iX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(PO,{...i,...o,ref:t})});iX.displayName=FRe;var URe="ContextMenuSeparator",cX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(OO,{...i,...o,ref:t})});cX.displayName=URe;var GRe="ContextMenuArrow",WRe=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(DO,{...i,...o,ref:t})});WRe.displayName=GRe;var sX="ContextMenuSub",lX=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:sX});return M.jsx(zO,{...l,open:h,onOpenChange:f,children:a})};lX.displayName=sX;var ZRe="ContextMenuSubTrigger",dX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(qO,{...i,...o,ref:t})});dX.displayName=ZRe;var XRe="ContextMenuSubContent",uX=p.forwardRef((e,t)=>{const{__scopeContextMenu:a,...o}=e,i=hn(a);return M.jsx(HO,{...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)"}})});uX.displayName=XRe;function Sh(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var KRe=ZZ,YRe=KZ,hX=YZ,QRe=JZ,JRe=eX,e$e=tX,t$e=nX,n$e=aX,a$e=oX,o$e=rX,pX=iX,r$e=cX,i$e=lX,c$e=dX,s$e=uX;function l$e({...e}){return M.jsx(KRe,{"data-slot":"context-menu",...e})}function d$e({...e}){return M.jsx(YRe,{"data-slot":"context-menu-trigger",...e})}function u$e({...e}){return M.jsx(JRe,{"data-slot":"context-menu-group",...e})}function h$e({...e}){return M.jsx(hX,{"data-slot":"context-menu-portal",...e})}function p$e({...e}){return M.jsx(i$e,{"data-slot":"context-menu-sub",...e})}function f$e({...e}){return M.jsx(a$e,{"data-slot":"context-menu-radio-group",...e})}function y$e({className:e,inset:t,children:a,...o}){return M.jsxs(c$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 m$e({className:e,...t}){return M.jsx(s$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 v$e({className:e,...t}){return M.jsx(hX,{children:M.jsx(QRe,{"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 k$e({className:e,inset:t,variant:a="default",...o}){return M.jsx(t$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 g$e({className:e,children:t,checked:a,...o}){return M.jsxs(n$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(pX,{children:M.jsx(sr,{className:"size-4"})})}),t]})}function M$e({className:e,children:t,...a}){return M.jsxs(o$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(pX,{children:M.jsx(O1,{className:"size-2 fill-current"})})}),t]})}function x$e({className:e,inset:t,...a}){return M.jsx(e$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 b$e({className:e,...t}){return M.jsx(r$e,{"data-slot":"context-menu-separator",className:ee("bg-border -mx-1 my-1 h-px",e),...t})}function w$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 _$e="Portal",fX=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});fX.displayName=_$e;var yX=fX;const Ei=p.createContext({activeIndex:0,setActiveIndex:()=>{},totalDialogs:0,setTotalDialogs:()=>{},isOpen:!1,setIsOpen:()=>{},clickable:!1,shouldAnimate:!1,setShouldAnimate:()=>{},closeDialog:()=>{}}),mX=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})})});mX.displayName="DialogStack";const S$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})},C$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},N$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(yX,{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},L$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(yX,{children:M.jsx(xA,{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,{})})})]})},E$e=({children:e,className:t,...a})=>M.jsx("h2",{className:ee("font-semibold text-lg leading-none tracking-tight",t),...a,children:e}),I$e=({children:e,className:t,...a})=>M.jsx("p",{className:ee("text-muted-foreground text-sm",t),...a,children:e}),A$e=({className:e,...t})=>M.jsx("div",{className:ee("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),T$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}),R$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"})},$$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 j$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,P$e(i,...t)]}function P$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 O$e(e){const t=D$e(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(q$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 D$e(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=V$e(i),h=H$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 z$e=Symbol("radix.slottable");function q$e(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z$e}function H$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 V$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 B$e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],F$e=B$e.reduce((e,t)=>{const a=O$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}},{}),HA="DropdownMenu",[U$e]=j$e(HA,[W2]),pn=W2(),[G$e,vX]=U$e(HA),kX=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:HA});return M.jsx(G$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(CO,{...f,open:k,onOpenChange:m,dir:o,modal:h,children:a})})};kX.displayName=HA;var gX="DropdownMenuTrigger",MX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,disabled:o=!1,...i}=e,s=vX(gX,a),l=pn(a);return M.jsx(NO,{asChild:!0,...l,children:M.jsx(F$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())})})})});MX.displayName=gX;var W$e="DropdownMenuPortal",xX=e=>{const{__scopeDropdownMenu:t,...a}=e,o=pn(t);return M.jsx(LO,{...o,...a})};xX.displayName=W$e;var bX="DropdownMenuContent",wX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=vX(bX,a),s=pn(a),l=p.useRef(!1);return M.jsx(EO,{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)"}})});wX.displayName=bX;var Z$e="DropdownMenuGroup",_X=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(IO,{...i,...o,ref:t})});_X.displayName=Z$e;var X$e="DropdownMenuLabel",SX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(AO,{...i,...o,ref:t})});SX.displayName=X$e;var K$e="DropdownMenuItem",CX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(TO,{...i,...o,ref:t})});CX.displayName=K$e;var Y$e="DropdownMenuCheckboxItem",NX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(RO,{...i,...o,ref:t})});NX.displayName=Y$e;var Q$e="DropdownMenuRadioGroup",LX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx($O,{...i,...o,ref:t})});LX.displayName=Q$e;var J$e="DropdownMenuRadioItem",EX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(jO,{...i,...o,ref:t})});EX.displayName=J$e;var eje="DropdownMenuItemIndicator",IX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(PO,{...i,...o,ref:t})});IX.displayName=eje;var tje="DropdownMenuSeparator",AX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(OO,{...i,...o,ref:t})});AX.displayName=tje;var nje="DropdownMenuArrow",aje=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(DO,{...i,...o,ref:t})});aje.displayName=nje;var oje=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(zO,{...l,open:h,onOpenChange:f,children:a})},rje="DropdownMenuSubTrigger",TX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(qO,{...i,...o,ref:t})});TX.displayName=rje;var ije="DropdownMenuSubContent",RX=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...o}=e,i=pn(a);return M.jsx(HO,{...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)"}})});RX.displayName=ije;var cje=kX,sje=MX,$X=xX,lje=wX,dje=_X,uje=SX,hje=CX,pje=NX,fje=LX,yje=EX,jX=IX,mje=AX,vje=oje,kje=TX,gje=RX;function Mje({...e}){return M.jsx(cje,{"data-slot":"dropdown-menu",...e})}function xje({...e}){return M.jsx($X,{"data-slot":"dropdown-menu-portal",...e})}function bje({...e}){return M.jsx(sje,{"data-slot":"dropdown-menu-trigger",...e})}function wje({className:e,sideOffset:t=4,...a}){return M.jsx($X,{children:M.jsx(lje,{"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 _je({...e}){return M.jsx(dje,{"data-slot":"dropdown-menu-group",...e})}function Sje({className:e,inset:t,variant:a="default",...o}){return M.jsx(hje,{"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 Cje({className:e,children:t,checked:a,...o}){return M.jsxs(pje,{"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(jX,{children:M.jsx(sr,{className:"size-4"})})}),t]})}function Nje({...e}){return M.jsx(fje,{"data-slot":"dropdown-menu-radio-group",...e})}function Lje({className:e,children:t,...a}){return M.jsxs(yje,{"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(jX,{children:M.jsx(O1,{className:"size-2 fill-current"})})}),t]})}function Eje({className:e,inset:t,...a}){return M.jsx(uje,{"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 Ije({className:e,...t}){return M.jsx(mje,{"data-slot":"dropdown-menu-separator",className:ee("bg-border -mx-1 my-1 h-px",e),...t})}function Aje({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 Tje({...e}){return M.jsx(vje,{"data-slot":"dropdown-menu-sub",...e})}function Rje({className:e,inset:t,children:a,...o}){return M.jsxs(kje,{"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 $je({className:e,...t}){return M.jsx(gje,{"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 PX({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 jje="Label",OX=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())}}));OX.displayName=jje;var Pje=OX;function Oje({className:e,...t}){return M.jsx(Pje,{"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 Dje(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,zje(i,...t)]}function zje(...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 qje(e){const t=Hje(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(Bje);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 Hje(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=Uje(i),h=Fje(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 Vje=Symbol("radix.slottable");function Bje(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vje}function Fje(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 Uje(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 Gje=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],DX=Gje.reduce((e,t)=>{const a=qje(`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}},{}),K2="Menubar",[iP,Wje,Zje]=q2(K2),[zX]=Dje(K2,[Zje,zA]),fn=W2(),qX=zA(),[Xje,BO]=zX(K2),HX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,value:o,onValueChange:i,defaultValue:s,loop:l=!0,dir:h,...f}=e,y=H2(h),k=qX(a),[m,x]=bn({prop:o,onChange:i,defaultProp:s??"",caller:K2}),[S,b]=p.useState(null);return M.jsx(Xje,{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(iP.Provider,{scope:a,children:M.jsx(iP.Slot,{scope:a,children:M.jsx(xZ,{asChild:!0,...k,orientation:"horizontal",loop:l,dir:y,currentTabStopId:S,onCurrentTabStopIdChange:b,children:M.jsx(DX.div,{role:"menubar",...f,ref:t})})})})})});HX.displayName=K2;var FO="MenubarMenu",[Kje,VX]=zX(FO),BX=e=>{const{__scopeMenubar:t,value:a,...o}=e,i=It(),s=a||i||"LEGACY_REACT_AUTO_VALUE",l=BO(FO,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(Kje,{scope:t,value:s,triggerId:It(),triggerRef:f,contentId:It(),wasKeyboardTriggerOpenRef:y,children:M.jsx(CO,{...h,open:k,onOpenChange:m=>{m||l.onMenuClose()},modal:!1,dir:l.dir,...o})})};BX.displayName=FO;var cP="MenubarTrigger",FX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,disabled:o=!1,...i}=e,s=qX(a),l=fn(a),h=BO(cP,a),f=VX(cP,a),y=p.useRef(null),k=ze(t,y,f.triggerRef),[m,x]=p.useState(!1),S=h.value===f.value;return M.jsx(iP.ItemSlot,{scope:a,value:f.value,disabled:o,children:M.jsx(bZ,{asChild:!0,...s,focusable:!o,tabStopId:f.value,children:M.jsx(NO,{asChild:!0,...l,children:M.jsx(DX.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))})})})})});FX.displayName=cP;var Yje="MenubarPortal",UX=e=>{const{__scopeMenubar:t,...a}=e,o=fn(t);return M.jsx(LO,{...o,...a})};UX.displayName=Yje;var sP="MenubarContent",GX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,align:o="start",...i}=e,s=fn(a),l=BO(sP,a),h=VX(sP,a),f=Wje(a),y=p.useRef(!1);return M.jsx(EO,{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?dPe(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)"}})});GX.displayName=sP;var Qje="MenubarGroup",WX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(IO,{...i,...o,ref:t})});WX.displayName=Qje;var Jje="MenubarLabel",ZX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(AO,{...i,...o,ref:t})});ZX.displayName=Jje;var ePe="MenubarItem",XX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(TO,{...i,...o,ref:t})});XX.displayName=ePe;var tPe="MenubarCheckboxItem",KX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(RO,{...i,...o,ref:t})});KX.displayName=tPe;var nPe="MenubarRadioGroup",YX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx($O,{...i,...o,ref:t})});YX.displayName=nPe;var aPe="MenubarRadioItem",QX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(jO,{...i,...o,ref:t})});QX.displayName=aPe;var oPe="MenubarItemIndicator",JX=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(PO,{...i,...o,ref:t})});JX.displayName=oPe;var rPe="MenubarSeparator",eK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(OO,{...i,...o,ref:t})});eK.displayName=rPe;var iPe="MenubarArrow",cPe=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(DO,{...i,...o,ref:t})});cPe.displayName=iPe;var tK="MenubarSub",nK=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:tK});return M.jsx(zO,{...l,open:h,onOpenChange:f,children:a})};nK.displayName=tK;var sPe="MenubarSubTrigger",aK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(qO,{"data-radix-menubar-subtrigger":"",...i,...o,ref:t})});aK.displayName=sPe;var lPe="MenubarSubContent",oK=p.forwardRef((e,t)=>{const{__scopeMenubar:a,...o}=e,i=fn(a);return M.jsx(HO,{...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)"}})});oK.displayName=lPe;function dPe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var uPe=HX,hPe=BX,pPe=FX,fPe=UX,yPe=GX,mPe=WX,vPe=ZX,kPe=XX,gPe=KX,MPe=YX,xPe=QX,rK=JX,bPe=eK,wPe=nK,_Pe=aK,SPe=oK;function CPe({className:e,...t}){return M.jsx(uPe,{"data-slot":"menubar",className:ee("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",e),...t})}function NPe({...e}){return M.jsx(hPe,{"data-slot":"menubar-menu",...e})}function LPe({...e}){return M.jsx(mPe,{"data-slot":"menubar-group",...e})}function iK({...e}){return M.jsx(fPe,{"data-slot":"menubar-portal",...e})}function EPe({...e}){return M.jsx(MPe,{"data-slot":"menubar-radio-group",...e})}function IPe({className:e,...t}){return M.jsx(pPe,{"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 APe({className:e,align:t="start",alignOffset:a=-4,sideOffset:o=8,...i}){return M.jsx(iK,{children:M.jsx(yPe,{"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 TPe({className:e,inset:t,variant:a="default",...o}){return M.jsx(kPe,{"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 RPe({className:e,children:t,checked:a,...o}){return M.jsxs(gPe,{"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(rK,{children:M.jsx(sr,{className:"size-4"})})}),t]})}function $Pe({className:e,children:t,...a}){return M.jsxs(xPe,{"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(rK,{children:M.jsx(O1,{className:"size-2 fill-current"})})}),t]})}function jPe({className:e,inset:t,...a}){return M.jsx(vPe,{"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 PPe({className:e,...t}){return M.jsx(bPe,{"data-slot":"menubar-separator",className:ee("bg-border -mx-1 my-1 h-px",e),...t})}function OPe({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 DPe({...e}){return M.jsx(wPe,{"data-slot":"menubar-sub",...e})}function zPe({className:e,inset:t,children:a,...o}){return M.jsxs(_Pe,{"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 qPe({className:e,...t}){return M.jsx(SPe,{"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 HPe({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 VPe({className:e,...t}){return M.jsx("ul",{"data-slot":"pagination-content",className:ee("flex flex-row items-center gap-1",e),...t})}function BPe({...e}){return M.jsx("li",{"data-slot":"pagination-item",...e})}function UO({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(QI({variant:t?"outline":"ghost",size:a}),e),...o})}function FPe({className:e,label:t="Previous",...a}){return M.jsxs(UO,{"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 UPe({className:e,label:t="Next",...a}){return M.jsxs(UO,{"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 GPe({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 WPe(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,ZPe(i,...t)]}function ZPe(...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 cK(e){const t=XPe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(YPe);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 XPe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=JPe(i),h=QPe(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 KPe=Symbol("radix.slottable");function YPe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===KPe}function QPe(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 JPe(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 eOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],GO=eOe.reduce((e,t)=>{const a=cK(`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}},{}),tOe="Portal",sK=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(GO.div,{...o,ref:t}),l):null});sK.displayName=tOe;var VA="Popover",[lK]=WPe(VA,[Ti]),Y2=Ti(),[nOe,$i]=lK(VA),dK=e=>{const{__scopePopover:t,children:a,open:o,defaultOpen:i,onOpenChange:s,modal:l=!1}=e,h=Y2(t),f=p.useRef(null),[y,k]=p.useState(!1),[m,x]=bn({prop:o,defaultProp:i??!1,onChange:s,caller:VA});return M.jsx(B2,{...h,children:M.jsx(nOe,{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})})};dK.displayName=VA;var uK="PopoverAnchor",hK=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=$i(uK,a),s=Y2(a),{onCustomAnchorAdd:l,onCustomAnchorRemove:h}=i;return p.useEffect(()=>(l(),()=>h()),[l,h]),M.jsx(F2,{...s,...o,ref:t})});hK.displayName=uK;var pK="PopoverTrigger",fK=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=$i(pK,a),s=Y2(a),l=ze(t,i.triggerRef),h=M.jsx(GO.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":gK(i.open),...o,ref:l,onClick:xe(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?h:M.jsx(F2,{asChild:!0,...s,children:h})});fK.displayName=pK;var WO="PopoverPortal",[aOe,oOe]=lK(WO,{forceMount:void 0}),yK=e=>{const{__scopePopover:t,forceMount:a,children:o,container:i}=e,s=$i(WO,t);return M.jsx(aOe,{scope:t,forceMount:a,children:M.jsx(Pn,{present:a||s.open,children:M.jsx(sK,{asChild:!0,container:i,children:o})})})};yK.displayName=WO;var Zd="PopoverContent",mK=p.forwardRef((e,t)=>{const a=oOe(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(iOe,{...i,ref:t}):M.jsx(cOe,{...i,ref:t})})});mK.displayName=Zd;var rOe=cK("PopoverContent.RemoveScroll"),iOe=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 EA(l)},[]),M.jsx(D2,{as:rOe,allowPinchZoom:!0,children:M.jsx(vK,{...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})})})}),cOe=p.forwardRef((e,t)=>{const a=$i(Zd,e.__scopePopover),o=p.useRef(!1),i=p.useRef(!1);return M.jsx(vK,{...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()}})}),vK=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=Y2(a);return NA(),M.jsx(O2,{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(OA,{"data-state":gK(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)"}})})})}),kK="PopoverClose",sOe=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=$i(kK,a);return M.jsx(GO.button,{type:"button",...o,ref:t,onClick:xe(e.onClick,()=>i.onOpenChange(!1))})});sOe.displayName=kK;var lOe="PopoverArrow",dOe=p.forwardRef((e,t)=>{const{__scopePopover:a,...o}=e,i=Y2(a);return M.jsx(DA,{...i,...o,ref:t})});dOe.displayName=lOe;function gK(e){return e?"open":"closed"}var uOe=dK,hOe=hK,pOe=fK,fOe=yK,yOe=mK;function MK({...e}){return M.jsx(uOe,{"data-slot":"popover",...e})}function xK({...e}){return M.jsx(pOe,{"data-slot":"popover-trigger",...e})}function bK({className:e,align:t="center",sideOffset:a=4,...o}){return M.jsx(fOe,{children:M.jsx(yOe,{"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 mOe({...e}){return M.jsx(hOe,{"data-slot":"popover-anchor",...e})}function sA(e,[t,a]){return Math.min(a,Math.max(t,e))}function vOe(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,kOe(i,...t)]}function kOe(...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 wK(e){const t=gOe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(xOe);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 gOe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=wOe(i),h=bOe(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 MOe=Symbol("radix.slottable");function xOe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MOe}function bOe(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 wOe(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 _Oe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],On=_Oe.reduce((e,t)=>{const a=wK(`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}},{}),SOe="Portal",_K=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});_K.displayName=SOe;function COe(e){const t=NOe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(EOe);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 NOe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=AOe(i),h=IOe(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 LOe=Symbol("radix.slottable");function EOe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===LOe}function IOe(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 AOe(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"],ROe=TOe.reduce((e,t)=>{const a=COe(`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}},{}),SK=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"}),$Oe="VisuallyHidden",CK=p.forwardRef((e,t)=>M.jsx(ROe.span,{...e,ref:t,style:{...SK,...e.style}}));CK.displayName=$Oe;var jOe=CK,POe=[" ","Enter","ArrowUp","ArrowDown"],OOe=[" ","Enter"],F1="Select",[BA,FA,DOe]=q2(F1),[cu]=vOe(F1,[DOe,Ti]),UA=Ti(),[zOe,ji]=cu(F1),[qOe,HOe]=cu(F1),NK=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=UA(t),[_,N]=p.useState(null),[L,I]=p.useState(null),[O,D]=p.useState(!1),P=H2(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(B2,{...w,children:M.jsxs(zOe,{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(BA.Provider,{scope:t,children:M.jsx(qOe,{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(QK,{"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]})})};NK.displayName=F1;var LK="SelectTrigger",EK=p.forwardRef((e,t)=>{const{__scopeSelect:a,disabled:o=!1,...i}=e,s=UA(a),l=ji(LK,a),h=l.disabled||o,f=ze(t,l.onTriggerChange),y=FA(a),k=p.useRef("touch"),[m,x,S]=eY(w=>{const _=y().filter(I=>!I.disabled),N=_.find(I=>I.value===l.value),L=tY(_,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(F2,{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":JK(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===" ")&&POe.includes(w.key)&&(b(),w.preventDefault())})})})});EK.displayName=LK;var IK="SelectValue",AK=p.forwardRef((e,t)=>{const{__scopeSelect:a,className:o,style:i,children:s,placeholder:l="",...h}=e,f=ji(IK,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:JK(f.value)?M.jsx(M.Fragment,{children:l}):s})});AK.displayName=IK;var VOe="SelectIcon",TK=p.forwardRef((e,t)=>{const{__scopeSelect:a,children:o,...i}=e;return M.jsx(On.span,{"aria-hidden":!0,...i,ref:t,children:o||"▼"})});TK.displayName=VOe;var BOe="SelectPortal",RK=e=>M.jsx(_K,{asChild:!0,...e});RK.displayName=BOe;var U1="SelectContent",$K=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(jK,{scope:e.__scopeSelect,children:M.jsx(BA.Slot,{scope:e.__scopeSelect,children:M.jsx("div",{children:e.children})})}),s):null}return M.jsx(PK,{...e,ref:t})});$K.displayName=U1;var ka=10,[jK,Pi]=cu(U1),FOe="SelectContentImpl",UOe=wK("SelectContent.RemoveScroll"),PK=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=FA(a),[F,J]=p.useState(!1),pe=p.useRef(!1);p.useEffect(()=>{if(I)return EA(I)},[I]),NA();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]=eY(he=>{const ve=B().filter(fe=>!fe.disabled),me=ve.find(fe=>fe.ref.current===document.activeElement),ge=tY(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"?lP:OK,ye=ie===lP?{side:h,sideOffset:f,align:y,alignOffset:k,arrowPadding:m,collisionBoundary:x,collisionPadding:S,sticky:b,hideWhenDetached:w,avoidCollisions:_}:{};return M.jsx(jK,{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(D2,{as:UOe,allowPinchZoom:!0,children:M.jsx(O2,{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()}})})})})})})});PK.displayName=FOe;var GOe="SelectItemAlignedPosition",OK=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=FA(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=sA(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=sA(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(ZOe,{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}})})})});OK.displayName=GOe;var WOe="SelectPopperPosition",lP=p.forwardRef((e,t)=>{const{__scopeSelect:a,align:o="start",collisionPadding:i=ka,...s}=e,l=UA(a);return M.jsx(OA,{...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)"}})});lP.displayName=WOe;var[ZOe,ZO]=cu(U1,{}),dP="SelectViewport",DK=p.forwardRef((e,t)=>{const{__scopeSelect:a,nonce:o,...i}=e,s=Pi(dP,a),l=ZO(dP,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(BA.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})})})]})});DK.displayName=dP;var zK="SelectGroup",[XOe,KOe]=cu(zK),qK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e,i=It();return M.jsx(XOe,{scope:a,id:i,children:M.jsx(On.div,{role:"group","aria-labelledby":i,...o,ref:t})})});qK.displayName=zK;var HK="SelectLabel",VK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e,i=KOe(HK,a);return M.jsx(On.div,{id:i.id,...o,ref:t})});VK.displayName=HK;var lA="SelectItem",[YOe,BK]=cu(lA),FK=p.forwardRef((e,t)=>{const{__scopeSelect:a,value:o,disabled:i=!1,textValue:s,...l}=e,h=ji(lA,a),f=Pi(lA,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(YOe,{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(BA.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===" "||(OOe.includes(L.key)&&N(),L.key===" "&&L.preventDefault())})})})})});FK.displayName=lA;var h2="SelectItemText",UK=p.forwardRef((e,t)=>{const{__scopeSelect:a,className:o,style:i,...s}=e,l=ji(h2,a),h=Pi(h2,a),f=BK(h2,a),y=HOe(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]})});UK.displayName=h2;var GK="SelectItemIndicator",WK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e;return BK(GK,a).isSelected?M.jsx(On.span,{"aria-hidden":!0,...o,ref:t}):null});WK.displayName=GK;var uP="SelectScrollUpButton",ZK=p.forwardRef((e,t)=>{const a=Pi(uP,e.__scopeSelect),o=ZO(uP,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(KK,{...e,ref:l,onAutoScroll:()=>{const{viewport:h,selectedItem:f}=a;h&&f&&(h.scrollTop=h.scrollTop-f.offsetHeight)}}):null});ZK.displayName=uP;var hP="SelectScrollDownButton",XK=p.forwardRef((e,t)=>{const a=Pi(hP,e.__scopeSelect),o=ZO(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.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(KK,{...e,ref:l,onAutoScroll:()=>{const{viewport:h,selectedItem:f}=a;h&&f&&(h.scrollTop=h.scrollTop+f.offsetHeight)}}):null});XK.displayName=hP;var KK=p.forwardRef((e,t)=>{const{__scopeSelect:a,onAutoScroll:o,...i}=e,s=Pi("SelectScrollButton",a),l=p.useRef(null),h=FA(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()})})}),QOe="SelectSeparator",YK=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e;return M.jsx(On.div,{"aria-hidden":!0,...o,ref:t})});YK.displayName=QOe;var pP="SelectArrow",JOe=p.forwardRef((e,t)=>{const{__scopeSelect:a,...o}=e,i=UA(a),s=ji(pP,a),l=Pi(pP,a);return s.open&&l.position==="popper"?M.jsx(DA,{...i,...o,ref:t}):null});JOe.displayName=pP;var eDe="SelectBubbleInput",QK=p.forwardRef(({__scopeSelect:e,value:t,...a},o)=>{const i=p.useRef(null),s=ze(o,i),l=wA(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:{...SK,...a.style},ref:s,defaultValue:t})});QK.displayName=eDe;function JK(e){return e===""||e===void 0}function eY(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 tY(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=tDe(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 tDe(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var nDe=NK,aDe=EK,oDe=AK,rDe=TK,iDe=RK,cDe=$K,sDe=DK,lDe=qK,dDe=VK,uDe=FK,hDe=UK,pDe=WK,fDe=ZK,yDe=XK,mDe=YK;function vDe({...e}){return M.jsx(nDe,{"data-slot":"select",...e})}function kDe({...e}){return M.jsx(lDe,{"data-slot":"select-group",...e})}function gDe({...e}){return M.jsx(oDe,{"data-slot":"select-value",...e})}function MDe({className:e,size:t="default",children:a,...o}){return M.jsxs(aDe,{"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(rDe,{asChild:!0,children:M.jsx(xi,{className:"size-4 opacity-50"})})]})}function xDe({className:e,children:t,position:a="popper",...o}){return M.jsx(iDe,{children:M.jsxs(cDe,{"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(nY,{}),M.jsx(sDe,{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(aY,{})]})})}function bDe({className:e,...t}){return M.jsx(dDe,{"data-slot":"select-label",className:ee("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function wDe({className:e,children:t,...a}){return M.jsxs(uDe,{"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(pDe,{children:M.jsx(sr,{className:"size-4"})})}),M.jsx(hDe,{children:t})]})}function _De({className:e,...t}){return M.jsx(mDe,{"data-slot":"select-separator",className:ee("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function nY({className:e,...t}){return M.jsx(fDe,{"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 aY({className:e,...t}){return M.jsx(yDe,{"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 SDe="Separator",gF="horizontal",CDe=["horizontal","vertical"],oY=p.forwardRef((e,t)=>{const{decorative:a,orientation:o=gF,...i}=e,s=NDe(o)?o:gF,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})});oY.displayName=SDe;function NDe(e){return CDe.includes(e)}var LDe=oY;function XO({className:e,orientation:t="horizontal",decorative:a=!0,...o}){return M.jsx(LDe,{"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 rY({...e}){return M.jsx(oO,{"data-slot":"sheet",...e})}function EDe({...e}){return M.jsx(bW,{"data-slot":"sheet-trigger",...e})}function IDe({...e}){return M.jsx(AA,{"data-slot":"sheet-close",...e})}function ADe({...e}){return M.jsx(rO,{"data-slot":"sheet-portal",...e})}function TDe({className:e,...t}){return M.jsx(iO,{"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 iY({className:e,children:t,side:a="right",...o}){return M.jsxs(ADe,{children:[M.jsx(TDe,{}),M.jsxs(cO,{"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(AA,{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 cY({className:e,...t}){return M.jsx("div",{"data-slot":"sheet-header",className:ee("flex flex-col gap-1.5 p-4",e),...t})}function RDe({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 sY({className:e,...t}){return M.jsx(wW,{"data-slot":"sheet-title",className:ee("text-foreground font-semibold",e),...t})}function lY({className:e,...t}){return M.jsx(_W,{"data-slot":"sheet-description",className:ee("text-muted-foreground text-sm",e),...t})}const Rj=768;function $De(){const[e,t]=p.useState(void 0);return p.useEffect(()=>{const a=window.matchMedia(`(max-width: ${Rj-1}px)`),o=()=>{t(window.innerWidth<Rj)};return a.addEventListener("change",o),t(window.innerWidth<Rj),()=>a.removeEventListener("change",o)},[]),!!e}function fP({className:e,...t}){return M.jsx("div",{"data-slot":"skeleton",className:ee("bg-accent animate-pulse rounded-md",e),...t})}function jDe(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,PDe(i,...t)]}function PDe(...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 ODe(e){const t=DDe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(qDe);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 DDe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=VDe(i),h=HDe(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 dY=Symbol("radix.slottable");function zDe(e){const t=({children:a})=>M.jsx(M.Fragment,{children:a});return t.displayName=`${e}.Slottable`,t.__radixId=dY,t}function qDe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dY}function HDe(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 VDe(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 BDe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],uY=BDe.reduce((e,t)=>{const a=ODe(`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}},{}),FDe="Portal",hY=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(uY.div,{...o,ref:t}),l):null});hY.displayName=FDe;var[GA]=jDe("Tooltip",[Ti]),WA=Ti(),pY="TooltipProvider",UDe=700,yP="tooltip.open",[GDe,KO]=GA(pY),fY=e=>{const{__scopeTooltip:t,delayDuration:a=UDe,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(GDe,{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})};fY.displayName=pY;var N2="Tooltip",[WDe,Q2]=GA(N2),yY=e=>{const{__scopeTooltip:t,children:a,open:o,defaultOpen:i,onOpenChange:s,disableHoverableContent:l,delayDuration:h}=e,f=KO(N2,e.__scopeTooltip),y=WA(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(yP))):f.onClose(),s==null||s(A)},caller:N2}),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(B2,{...y,children:M.jsx(WDe,{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})})};yY.displayName=N2;var mP="TooltipTrigger",mY=p.forwardRef((e,t)=>{const{__scopeTooltip:a,...o}=e,i=Q2(mP,a),s=KO(mP,a),l=WA(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(F2,{asChild:!0,...l,children:M.jsx(uY.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)})})});mY.displayName=mP;var YO="TooltipPortal",[ZDe,XDe]=GA(YO,{forceMount:void 0}),vY=e=>{const{__scopeTooltip:t,forceMount:a,children:o,container:i}=e,s=Q2(YO,t);return M.jsx(ZDe,{scope:t,forceMount:a,children:M.jsx(Pn,{present:a||s.open,children:M.jsx(hY,{asChild:!0,container:i,children:o})})})};vY.displayName=YO;var Xd="TooltipContent",kY=p.forwardRef((e,t)=>{const a=XDe(Xd,e.__scopeTooltip),{forceMount:o=a.forceMount,side:i="top",...s}=e,l=Q2(Xd,e.__scopeTooltip);return M.jsx(Pn,{present:o||l.open,children:l.disableHoverableContent?M.jsx(gY,{side:i,...s,ref:t}):M.jsx(KDe,{side:i,...s,ref:t})})}),KDe=p.forwardRef((e,t)=>{const a=Q2(Xd,e.__scopeTooltip),o=KO(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=eze(N,_.getBoundingClientRect()),I=tze(N,L),O=nze(w.getBoundingClientRect()),D=oze([...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=!aze(N,l);L?x():I&&(x(),y())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[f,k,l,y,x]),M.jsx(gY,{...e,ref:s})}),[YDe,QDe]=GA(N2,{isInside:!1}),JDe=zDe("TooltipContent"),gY=p.forwardRef((e,t)=>{const{__scopeTooltip:a,children:o,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:l,...h}=e,f=Q2(Xd,a),y=WA(a),{onClose:k}=f;return p.useEffect(()=>(document.addEventListener(yP,k),()=>document.removeEventListener(yP,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(OA,{"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(JDe,{children:o}),M.jsx(YDe,{scope:a,isInside:!0,children:M.jsx(jOe,{id:f.contentId,role:"tooltip",children:i||o})})]})})});kY.displayName=Xd;var MY="TooltipArrow",xY=p.forwardRef((e,t)=>{const{__scopeTooltip:a,...o}=e,i=WA(a);return QDe(MY,a).isInside?null:M.jsx(DA,{...i,...o,ref:t})});xY.displayName=MY;function eze(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 tze(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 nze(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 aze(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 oze(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),rze(t)}function rze(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 ize=fY,cze=yY,sze=mY,lze=vY,dze=kY,uze=xY;function QO({delayDuration:e=0,...t}){return M.jsx(ize,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function bY({...e}){return M.jsx(QO,{children:M.jsx(cze,{"data-slot":"tooltip",...e})})}function wY({...e}){return M.jsx(sze,{"data-slot":"tooltip-trigger",...e})}function _Y({className:e,sideOffset:t=0,children:a,...o}){return M.jsx(lze,{children:M.jsxs(dze,{"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(uze,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const hze="sidebar_state",pze=3600*24*7,fze="16rem",yze="18rem",mze="3rem",vze="b",SY=p.createContext(null);function J2(){const e=p.useContext(SY);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function kze({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:i,children:s,...l}){const h=$De(),[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=`${hze}=${L}; path=/; max-age=${pze}`},[a,x]),b=p.useCallback(()=>h?y(N=>!N):S(N=>!N),[h,S,y]);p.useEffect(()=>{const N=L=>{L.key===vze&&(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(SY.Provider,{value:_,children:M.jsx(QO,{delayDuration:0,children:M.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":fze,"--sidebar-width-icon":mze,...i},className:ee("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...l,children:s})})})}function gze({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:i,...s}){const{isMobile:l,state:h,openMobile:f,setOpenMobile:y}=J2();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(rY,{open:f,onOpenChange:y,...s,children:M.jsxs(iY,{"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":yze},side:e,children:[M.jsxs(cY,{className:"sr-only",children:[M.jsx(sY,{children:"Sidebar"}),M.jsx(lY,{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 Mze({className:e,onClick:t,...a}){const{toggleSidebar:o}=J2();return M.jsxs(xA,{"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 xze({className:e,...t}){const{toggleSidebar:a}=J2();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 bze({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 wze({className:e,...t}){return M.jsx(PX,{"data-slot":"sidebar-input","data-sidebar":"input",className:ee("bg-background h-8 w-full shadow-none",e),...t})}function _ze({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 Sze({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 Cze({className:e,...t}){return M.jsx(XO,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:ee("bg-sidebar-border mx-2 w-auto",e),...t})}function Nze({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 Lze({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 Eze({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 Ize({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 Aze({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 Tze({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 Rze({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 $ze=MA("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 jze({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}=J2(),k=M.jsx(h,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":o,"data-active":t,className:ee($ze({variant:a,size:o}),s),...l});return i?(typeof i=="string"&&(i={children:i}),M.jsxs(bY,{children:[M.jsx(wY,{asChild:!0,children:k}),M.jsx(_Y,{side:"right",align:"center",hidden:y!=="collapsed"||f,...i})]})):k}function Pze({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 Oze({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 Dze({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(fP,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),M.jsx(fP,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}function zze({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 qze({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 Hze({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 Vze(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,Bze(i,...t)]}function Bze(...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 Fze(e){const t=Uze(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(Wze);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 Uze(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=Xze(i),h=Zze(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 Gze=Symbol("radix.slottable");function Wze(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gze}function Zze(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 Xze(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 Kze=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],e0=Kze.reduce((e,t)=>{const a=Fze(`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}},{}),CY=["PageUp","PageDown"],NY=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],LY={"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",[vP,Yze,Qze]=q2(su),[EY]=Vze(su,[Qze]),[Jze,ZA]=EY(su),IY=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"?eqe:tqe,[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=iqe(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=dqe(s),pe=uqe(Math.round((q-o)/s)*s+o,J),R=sA(pe,[o,i]);D(($=[])=>{const T=oqe($,R,B);if(lqe(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(Jze,{scope:e.__scopeSlider,name:a,disabled:h,min:o,max:i,valueIndexToChangeRef:N,thumbs:_.current,values:O,orientation:l,form:b,children:M.jsx(vP.Provider,{scope:e.__scopeSlider,children:M.jsx(vP.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=CY.includes(q.key)||q.shiftKey&&NY.includes(q.key)?10:1,R=N.current,$=O[R],T=s*pe*B;K($+T,R,{commit:!0})}}})})})})});IY.displayName=su;var[AY,TY]=EY(su,{startEdge:"left",endEdge:"right",size:"width",direction:1}),eqe=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=H2(i),_=w==="ltr",N=_&&!s||!_&&s;function L(I){const O=b.current||m.getBoundingClientRect(),D=[0,O.width],A=JO(D,N?[a,o]:[o,a]);return b.current=O,A(I-O.left)}return M.jsx(AY,{scope:e.__scopeSlider,startEdge:N?"left":"right",endEdge:N?"right":"left",direction:N?1:-1,size:"width",children:M.jsx(RY,{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=LY[N?"from-left":"from-right"].includes(I.key);y==null||y({event:I,direction:D?-1:1})}})})}),tqe=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=JO(N,S?[o,a]:[a,o]);return x.current=_,I(w-_.top)}return M.jsx(AY,{scope:e.__scopeSlider,startEdge:S?"bottom":"top",endEdge:S?"top":"bottom",size:"height",direction:S?1:-1,children:M.jsx(RY,{"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=LY[S?"from-bottom":"from-top"].includes(w.key);f==null||f({event:w,direction:N?-1:1})}})})}),RY=p.forwardRef((e,t)=>{const{__scopeSlider:a,onSlideStart:o,onSlideMove:i,onSlideEnd:s,onHomeKeyDown:l,onEndKeyDown:h,onStepKeyDown:f,...y}=e,k=ZA(su,a);return M.jsx(e0.span,{...y,ref:t,onKeyDown:xe(e.onKeyDown,m=>{m.key==="Home"?(l(m),m.preventDefault()):m.key==="End"?(h(m),m.preventDefault()):CY.concat(NY).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))})})}),$Y="SliderTrack",jY=p.forwardRef((e,t)=>{const{__scopeSlider:a,...o}=e,i=ZA($Y,a);return M.jsx(e0.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...o,ref:t})});jY.displayName=$Y;var kP="SliderRange",PY=p.forwardRef((e,t)=>{const{__scopeSlider:a,...o}=e,i=ZA(kP,a),s=TY(kP,a),l=p.useRef(null),h=ze(t,l),f=i.values.length,y=i.values.map(x=>zY(x,i.min,i.max)),k=f>1?Math.min(...y):0,m=100-Math.max(...y);return M.jsx(e0.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...o,ref:h,style:{...e.style,[s.startEdge]:k+"%",[s.endEdge]:m+"%"}})});PY.displayName=kP;var gP="SliderThumb",OY=p.forwardRef((e,t)=>{const a=Yze(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(nqe,{...e,ref:s,index:l})}),nqe=p.forwardRef((e,t)=>{const{__scopeSlider:a,index:o,name:i,...s}=e,l=ZA(gP,a),h=TY(gP,a),[f,y]=p.useState(null),k=ze(t,L=>y(L)),m=f?l.form||!!f.closest("form"):!0,x=_A(f),S=l.values[o],b=S===void 0?0:zY(S,l.min,l.max),w=rqe(o,l.values.length),_=x==null?void 0:x[h.size],N=_?cqe(_,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(vP.ItemSlot,{scope:e.__scopeSlider,children:M.jsx(e0.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(DY,{name:i??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:S},o)]})});OY.displayName=gP;var aqe="RadioBubbleInput",DY=p.forwardRef(({__scopeSlider:e,value:t,...a},o)=>{const i=p.useRef(null),s=ze(i,o),l=wA(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(e0.input,{style:{display:"none"},...a,ref:s,defaultValue:t})});DY.displayName=aqe;function oqe(e=[],t,a){const o=[...e];return o[a]=t,o.sort((i,s)=>i-s)}function zY(e,t,a){const s=100/(a-t)*(e-t);return sA(s,[0,100])}function rqe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function iqe(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 cqe(e,t,a){const o=e/2,s=JO([0,50],[0,o]);return(o-s(t)*a)*a}function sqe(e){return e.slice(0,-1).map((t,a)=>e[a+1]-t)}function lqe(e,t){if(t>0){const a=sqe(e);return Math.min(...a)>=t}return!0}function JO(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 dqe(e){return(String(e).split(".")[1]||"").length}function uqe(e,t){const a=Math.pow(10,t);return Math.round(e*a)/a}var hqe=IY,pqe=jY,fqe=PY,yqe=OY;function mqe({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(hqe,{"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(pqe,{"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(fqe,{"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(yqe,{"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 vqe=(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{}},kqe=p.createContext(void 0),gqe={setTheme:e=>{},themes:[]},Mqe=()=>{var e;return(e=p.useContext(kqe))!=null?e:gqe};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:`(${vqe.toString()})(${k})`}})});function xqe(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 bqe=e=>{switch(e){case"success":return Sqe;case"info":return Nqe;case"warning":return Cqe;case"error":return Lqe;default:return null}},wqe=Array(12).fill(0),_qe=({visible:e,className:t})=>ke.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ke.createElement("div",{className:"sonner-spinner"},wqe.map((a,o)=>ke.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),Sqe=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"})),Cqe=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"})),Nqe=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"})),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-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"})),Eqe=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"})),Iqe=()=>{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 MP=1;class Aqe{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:MP++,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(Rqe(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)||MP++;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 Aqe,Tqe=(e,t)=>{const a=(t==null?void 0:t.id)||MP++;return kn.addToast({title:e,...t,id:a}),a},Rqe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",$qe=Tqe,jqe=()=>kn.toasts,Pqe=()=>kn.getActiveToasts(),Oqe=Object.assign($qe,{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:jqe,getToasts:Pqe});xqe("[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 Ch(e){return e.label!==void 0}const Dqe=3,zqe="24px",qqe="16px",MF=4e3,Hqe=356,Vqe=14,Bqe=45,Fqe=200;function er(...e){return e.filter(Boolean).join(" ")}function Uqe(e){const[t,a]=e.split("-"),o=[];return t&&o.push(t),a&&o.push(a),o}const Gqe=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||MF),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||MF,[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=Iqe(),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)},Fqe)},[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(_qe,{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])||bqe(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)>=Bqe||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:Uqe(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:Eqe):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&&Ch(m.cancel)?ke.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||j,onClick:Ie=>{Ch(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&&Ch(m.action)?ke.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||V,onClick:Ie=>{Ch(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 xF(){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 Wqe(e,t){const a={};return[e,t].forEach((o,i)=>{const s=i===1,l=s?"--mobile-offset":"--offset",h=s?qqe:zqe;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 Zqe(){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 qY=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:_=Dqe,toastOptions:N,dir:L=xF(),gap:I=Vqe,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"?xF():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":`${Hqe}px`,"--gap":`${I}px`,...w,...Wqe(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(Gqe,{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}))}),Xqe=Object.freeze(Object.defineProperty({__proto__:null,Toaster:qY,toast:Oqe,useSonner:Zqe},Symbol.toStringTag,{value:"Module"})),Kqe=({...e})=>{const{theme:t="system"}=Mqe();return M.jsx(qY,{theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};function Yqe(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,Qqe(i,...t)]}function Qqe(...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 Jqe(e){const t=eHe(e),a=p.forwardRef((o,i)=>{const{children:s,...l}=o,h=p.Children.toArray(s),f=h.find(nHe);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 eHe(e){const t=p.forwardRef((a,o)=>{const{children:i,...s}=a;if(p.isValidElement(i)){const l=oHe(i),h=aHe(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 tHe=Symbol("radix.slottable");function nHe(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tHe}function aHe(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 oHe(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 rHe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],HY=rHe.reduce((e,t)=>{const a=Jqe(`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}},{}),XA="Switch",[iHe]=Yqe(XA),[cHe,sHe]=iHe(XA),VY=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:XA});return M.jsxs(cHe,{scope:a,checked:N,disabled:h,children:[M.jsx(HY.button,{type:"button",role:"switch","aria-checked":N,"aria-required":l,"data-state":GY(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(UY,{control:x,bubbles:!w.current,name:o,value:f,checked:N,required:l,disabled:h,form:k,style:{transform:"translateX(-100%)"}})]})});VY.displayName=XA;var BY="SwitchThumb",FY=p.forwardRef((e,t)=>{const{__scopeSwitch:a,...o}=e,i=sHe(BY,a);return M.jsx(HY.span,{"data-state":GY(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})});FY.displayName=BY;var lHe="SwitchBubbleInput",UY=p.forwardRef(({__scopeSwitch:e,control:t,checked:a,bubbles:o=!0,...i},s)=>{const l=p.useRef(null),h=ze(l,s),f=wA(a),y=_A(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}})});UY.displayName=lHe;function GY(e){return e?"checked":"unchecked"}var dHe=VY,uHe=FY;function hHe({className:e,...t}){return M.jsx(dHe,{"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(uHe,{"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 pHe({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 fHe({className:e,...t}){return M.jsx("thead",{"data-slot":"table-header",className:ee("[&_tr]:border-b",e),...t})}function yHe({className:e,...t}){return M.jsx("tbody",{"data-slot":"table-body",className:ee("[&_tr:last-child]:border-0",e),...t})}function mHe({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 vHe({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 kHe({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 gHe({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 MHe({className:e,...t}){return M.jsx("caption",{"data-slot":"table-caption",className:ee("text-muted-foreground mt-4 text-sm",e),...t})}function xHe({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 bHe=()=>typeof window>"u"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,wHe=(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"&&bHe();document.documentElement.classList.toggle("dark",t)},WY=()=>typeof window>"u"?null:window.matchMedia("(prefers-color-scheme: dark)"),ZY=()=>{const e=localStorage.getItem("appearance");M2(e||"light")};function hVe(){var t;const e=localStorage.getItem("appearance")||"system";M2(e),(t=WY())==null||t.addEventListener("change",ZY)}function eD(){const[e,t]=p.useState("system"),[a,o]=p.useState(!1),i=p.useCallback(s=>{o(!0),t(s),localStorage.setItem("appearance",s),wHe("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=WY())==null||f.removeEventListener("change",ZY)}},[i]),{appearance:e,updateAppearance:i,isThemeChanging:a}}const _He={errors:{}},j1=new Proxy(_He,{set(e,t,a){return t==="errors"&&(Object.keys(a).length===0?e.errors={}:e.errors={...e.errors,...a}),!0}}),bF=(e,t,a)=>{if(t)j1.errors={...j1.errors,[e]:{hasError:!0,message:a}};else{const{[e]:o,...i}=j1.errors;j1.errors=i}},pVe=e=>{var t;return(t=j1.errors[e])==null?void 0:t.message},fVe=()=>Object.values(j1.errors).some(e=>e.hasError),yVe=()=>{j1.errors={}};function xP(e){const t=p.useRef(null),a=p.useRef(null),o=p.useRef(e),{appearance:i}=eD(),[s,l]=p.useState("");return p.useEffect(()=>{l(i==="dark"?"jse-theme-dark":"")},[i]),p.useEffect(()=>{a.current&&a.current.updateProps({content:e.content?{json:e.content}:e.json?{json:e.json}:void 0})},[e.content]),p.useEffect(()=>{var y;const h=e.schema?uee({schema:e.schema}):void 0,f=e.content?{json:e.content}:e.json?{json:e.json}:void 0;if(a.current=hee({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;bF(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}),bF(e.name,x,"Error validation JSON schema")}return()=>{a.current&&(a.current.destroy(),a.current=null)}},[]),p.useEffect(()=>{if(a.current){const h=SHe(e,o.current);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 SHe(e,t){var o;const a={};for(const[i,s]of Object.entries(e))if(i==="content"){const l=s==null?void 0:s.json,h=(o=t[i])==null?void 0:o.json;JSON.stringify(l)!==JSON.stringify(h)&&(a[i]=s)}else s!==t[i]&&(a[i]=s);return a}const mVe=Object.freeze(Object.defineProperty({__proto__:null,default:xP},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 PHe={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]:"第二值"};vee();const wF={de:CHe,en:Mee,es:NHe,fr:LHe,it:EHe,ja:IHe,ko:AHe,nl:THe,pl:RHe,pt:$He,ru:jHe,zh:PHe},OHe=document.documentElement.lang,XY=wF[OHe]??wF.en;kee(XY);const KY=({config:e,data:t=[],onChange:a,disabled:o})=>{const{appearance:i}=eD(),[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(gee,{className:o?"pointer-events-none opacity-50":"",themeName:s,language:XY.languageCode,ref:k,...e,afterChange:y,children:e.columns.map(m=>M.jsx(xee,{data:m.data,...m},m.data))})})},vVe=Object.freeze(Object.defineProperty({__proto__:null,default:KY},Symbol.toStringTag,{value:"Module"})),DHe=()=>{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},YY=({onChange:e,value:t,options:a,disabled:o})=>{const{appearance:i}=eD(),[s,l]=p.useState("light"),h=p.useRef(null),f=p.useRef(null),{width:y}=DHe(),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(bee,{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":""}`})})},kVe=Object.freeze(Object.defineProperty({__proto__:null,default:YY},Symbol.toStringTag,{value:"Module"})),$j=MA("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"}}),tD=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=gA().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":"",$j({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(MK,{open:A,onOpenChange:j,modal:m,children:[M.jsx(xK,{asChild:!0,children:M.jsx(xA,{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":"",$j({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":"",$j({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(XO,{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(bK,{className:"w-auto p-0 z-[1003]",align:"start",onEscapeKeyDown:()=>j(!1),children:M.jsxs(lO,{children:[M.jsx(zW,{placeholder:f,onKeyDown:q}),M.jsxs(qW,{children:[M.jsx(HW,{children:h}),M.jsx(VW,{children:e.map($=>{const T=D.includes($.value);return M.jsxs(FW,{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(BW,{})]})]})}),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)})]})});tD.displayName="MultiSelect";const gVe=Object.freeze(Object.defineProperty({__proto__:null,default:tD},Symbol.toStringTag,{value:"Module"}));function zHe(){window.UIComponents??(window.UIComponents={}),window.JSComponents??(window.JSComponents={}),window.axios=Nt,window.sonner=Xqe,Object.assign(window.UIComponents,{Avatar:zre,AvatarImage:qre,AvatarFallback:Hre,Badge:Bre,Breadcrumb:U_e,BreadcrumbList:G_e,BreadcrumbItem:W_e,BreadcrumbLink:Z_e,BreadcrumbPage:X_e,BreadcrumbSeparator:K_e,BreadcrumbEllipsis:Y_e,Button:xA,Calendar:DNe,Card:zNe,CardHeader:qNe,CardFooter:UNe,CardTitle:HNe,CardAction:BNe,CardDescription:VNe,CardContent:FNe,Checkbox:uLe,Collapsible:NLe,CollapsibleTrigger:LLe,CollapsibleContent:ELe,Command:lO,CommandDialog:DIe,CommandInput:zW,CommandList:qW,CommandEmpty:HW,CommandGroup:VW,CommandItem:FW,CommandShortcut:zIe,CommandSeparator:BW,ContextMenu:l$e,ContextMenuTrigger:d$e,ContextMenuContent:v$e,ContextMenuItem:k$e,ContextMenuCheckboxItem:g$e,ContextMenuRadioItem:M$e,ContextMenuLabel:x$e,ContextMenuSeparator:b$e,ContextMenuShortcut:w$e,ContextMenuGroup:u$e,ContextMenuPortal:h$e,ContextMenuSub:p$e,ContextMenuSubContent:m$e,ContextMenuSubTrigger:y$e,ContextMenuRadioGroup:f$e,Dialog:TW,DialogClose:PIe,DialogContent:jW,DialogDescription:DW,DialogFooter:OIe,DialogHeader:PW,DialogOverlay:$W,DialogPortal:RW,DialogTitle:OW,DialogTrigger:jIe,DialogStack:mX,DialogStackTrigger:S$e,DialogStackOverlay:C$e,DialogStackBody:N$e,DialogStackContent:L$e,DialogStackTitle:E$e,DialogStackDescription:I$e,DialogStackHeader:A$e,DialogStackFooter:T$e,DialogStackNext:R$e,DialogStackPrevious:$$e,DropdownMenu:Mje,DropdownMenuPortal:xje,DropdownMenuTrigger:bje,DropdownMenuContent:wje,DropdownMenuGroup:_je,DropdownMenuLabel:Eje,DropdownMenuItem:Sje,DropdownMenuCheckboxItem:Cje,DropdownMenuRadioGroup:Nje,DropdownMenuRadioItem:Lje,DropdownMenuSeparator:Ije,DropdownMenuShortcut:Aje,DropdownMenuSub:Tje,DropdownMenuSubTrigger:Rje,DropdownMenuSubContent:$je,Input:PX,Label:Oje,Menubar:CPe,MenubarPortal:iK,MenubarMenu:NPe,MenubarTrigger:IPe,MenubarContent:APe,MenubarGroup:LPe,MenubarSeparator:PPe,MenubarLabel:jPe,MenubarItem:TPe,MenubarShortcut:OPe,MenubarCheckboxItem:RPe,MenubarRadioGroup:EPe,MenubarRadioItem:$Pe,MenubarSub:DPe,MenubarSubTrigger:zPe,MenubarSubContent:qPe,Pagination:HPe,PaginationContent:VPe,PaginationLink:UO,PaginationItem:BPe,PaginationPrevious:FPe,PaginationNext:UPe,PaginationEllipsis:GPe,Popover:MK,PopoverTrigger:xK,PopoverContent:bK,PopoverAnchor:mOe,Select:vDe,SelectContent:xDe,SelectGroup:kDe,SelectItem:wDe,SelectLabel:bDe,SelectScrollDownButton:aY,SelectScrollUpButton:nY,SelectSeparator:_De,SelectTrigger:MDe,SelectValue:gDe,Separator:XO,Sheet:rY,SheetTrigger:EDe,SheetClose:IDe,SheetContent:iY,SheetHeader:cY,SheetFooter:RDe,SheetTitle:sY,SheetDescription:lY,Sidebar:gze,SidebarContent:Nze,SidebarFooter:Sze,SidebarGroup:Lze,SidebarGroupAction:Ize,SidebarGroupContent:Aze,SidebarGroupLabel:Eze,SidebarHeader:_ze,SidebarInput:wze,SidebarInset:bze,SidebarMenu:Tze,SidebarMenuAction:Pze,SidebarMenuBadge:Oze,SidebarMenuButton:jze,SidebarMenuItem:Rze,SidebarMenuSkeleton:Dze,SidebarMenuSub:zze,SidebarMenuSubButton:Hze,SidebarMenuSubItem:qze,SidebarProvider:kze,SidebarRail:xze,SidebarSeparator:Cze,SidebarTrigger:Mze,useSidebar:J2,Skeleton:fP,Slider:mqe,Toaster:Kqe,Switch:hHe,Table:pHe,TableHeader:fHe,TableBody:yHe,TableFooter:mHe,TableHead:kHe,TableRow:vHe,TableCell:gHe,TableCaption:MHe,Textarea:xHe,Tooltip:bY,TooltipTrigger:wY,TooltipContent:_Y,TooltipProvider:QO,VanillaJSONEditor:xP}),Object.assign(window.JSComponents,{VanillaJSONEditor:xP,HandsonTable:KY,MonacoEditor:YY,MultiSelect:tD})}const{createInertiaApp:qHe,router:QY}=HU;window.React=ke;window.ReactDOM=ur;window.InertiajsReact=HU;window.LucideReact=F_e;zHe();async function HHe(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 nD=!1;QY.on("navigate",e=>{nD=!0});QY.on("finish",e=>{nD=!1});const _F=document.createElement.bind(document);document.createElement=function(e,t){const a=_F(e,t);return e.toLowerCase()==="iframe"&&nD?(console.warn("[Adminizer] Prevented iframe creation, forcing full page reload"),setTimeout(()=>{window.location.reload()},0),_F("div")):a};qHe({title:e=>`${e}`,resolve:e=>HHe(`./pages/${e}.tsx`,Object.assign({"./pages/add-group.tsx":()=>vn(()=>import("./add-group-Bjq2R0iV.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-ChZGses8.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-COpwiOsy.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-RUS5EBuy.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-5NZ3QseL.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-Cb-Rvm4q.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-B_8v8I3J.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-C_xUaJoJ.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-CDFtsuUr.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-CrRDdlUP.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-Deuf56Yd.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-BerxxdCf.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}){Loe.createRoot(e).render(M.jsx(t,{...a}))},progress:{color:"#0f4898"}});export{MK as $,v$e as A,xA as B,lr as C,mX as D,l5 as E,k$e as F,zNe as G,qNe as H,PX as I,HNe as J,UNe as K,Fs as L,QO as M,bY as N,wY as O,k2 as P,_Y as Q,hHe as R,vDe as S,Kqe as T,S$e as U,E$e as V,hr as W,hj as X,c2 as Y,s2 as Z,_Se as _,s5 as a,G8 as a$,xK as a0,uv as a1,W1 as a2,bK as a3,DNe as a4,pHe as a5,fHe as a6,vHe as a7,kHe as a8,yHe as a9,ee as aA,OIe as aB,PIe as aC,vf as aD,Qp as aE,nf as aF,cf as aG,jIe as aH,Rs as aI,kt as aJ,H2 as aK,bn as aL,It as aM,xZ as aN,bZ as aO,xe as aP,Pn as aQ,zA as aR,D7 as aS,yM as aT,kze as aU,XHe as aV,Mje as aW,xy as aX,Sje as aY,Ije as aZ,Mze as a_,gHe as aa,vc as ab,TW as ac,jW as ad,PW as ae,OW as af,vG as ag,voe as ah,goe as ai,$U as aj,hVe as ak,jE as al,$x as am,bze as an,vl as ao,bi as ap,YU as aq,xHe as ar,DHe as as,eD as at,sb as au,F8 as av,v_ as aw,sr as ax,UL as ay,M1 as az,Oje as b,kVe as b$,gze as b0,_ze as b1,Tze as b2,Rze as b3,CPe as b4,NPe as b5,IPe as b6,jze as b7,e4 as b8,APe as b9,Eze as bA,Aze as bB,NLe as bC,ELe as bD,J2 as bE,$De as bF,wN as bG,w7 as bH,SN as bI,zre as bJ,qre as bK,Hre as bL,Eje as bM,Px as bN,dVe as bO,uf as bP,g2 as bQ,r1 as bR,__ as bS,HPe as bT,VPe as bU,BPe as bV,UO as bW,FPe as bX,UPe as bY,mVe as bZ,vVe as b_,DPe as ba,zPe as bb,qPe as bc,TPe as bd,Lze as be,HG as bf,LLe as bg,FG as bh,zze as bi,qze as bj,Hze as bk,Nze as bl,Sze as bm,U_e as bn,G_e as bo,W_e as bp,X_e as bq,Z_e as br,K_e as bs,tD as bt,mqe as bu,Un as bv,s7 as bw,yVe as bx,fVe as by,pVe as bz,MDe as c,gVe as c0,gDe as d,xDe as e,wDe as f,uLe as g,Nt as h,C$e as i,M as j,N$e as k,L$e as l,fP as m,Bre as n,Qw as o,Uf as p,kX as q,qU as r,bje as s,Oqe as t,gA as u,fc as v,wje as w,_je as x,l$e as y,d$e as z};
|
|
8073
|
+
*/const PHe={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]:"第二值"};vee();const wF={de:CHe,en:Mee,es:NHe,fr:LHe,it:EHe,ja:IHe,ko:AHe,nl:THe,pl:RHe,pt:$He,ru:jHe,zh:PHe},OHe=document.documentElement.lang,XY=wF[OHe]??wF.en;kee(XY);const KY=({config:e,data:t=[],onChange:a,disabled:o})=>{const{appearance:i}=eD(),[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(gee,{className:o?"pointer-events-none opacity-50":"",themeName:s,language:XY.languageCode,ref:k,...e,afterChange:y,children:e.columns.map(m=>M.jsx(xee,{data:m.data,...m},m.data))})})},vVe=Object.freeze(Object.defineProperty({__proto__:null,default:KY},Symbol.toStringTag,{value:"Module"})),DHe=()=>{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},YY=({onChange:e,value:t,options:a,disabled:o})=>{const{appearance:i}=eD(),[s,l]=p.useState("light"),h=p.useRef(null),f=p.useRef(null),{width:y}=DHe(),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(bee,{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":""}`})})},kVe=Object.freeze(Object.defineProperty({__proto__:null,default:YY},Symbol.toStringTag,{value:"Module"})),$j=MA("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"}}),tD=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=gA().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":"",$j({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(MK,{open:A,onOpenChange:j,modal:m,children:[M.jsx(xK,{asChild:!0,children:M.jsx(xA,{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":"",$j({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":"",$j({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(XO,{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(bK,{className:"w-auto p-0 z-[1003]",align:"start",onEscapeKeyDown:()=>j(!1),children:M.jsxs(lO,{children:[M.jsx(zW,{placeholder:f,onKeyDown:q}),M.jsxs(qW,{children:[M.jsx(HW,{children:h}),M.jsx(VW,{children:e.map($=>{const T=D.includes($.value);return M.jsxs(FW,{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(BW,{})]})]})}),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)})]})});tD.displayName="MultiSelect";const gVe=Object.freeze(Object.defineProperty({__proto__:null,default:tD},Symbol.toStringTag,{value:"Module"}));function zHe(){window.UIComponents??(window.UIComponents={}),window.JSComponents??(window.JSComponents={}),window.axios=Nt,window.sonner=Xqe,Object.assign(window.UIComponents,{Avatar:zre,AvatarImage:qre,AvatarFallback:Hre,Badge:Bre,Breadcrumb:U_e,BreadcrumbList:G_e,BreadcrumbItem:W_e,BreadcrumbLink:Z_e,BreadcrumbPage:X_e,BreadcrumbSeparator:K_e,BreadcrumbEllipsis:Y_e,Button:xA,Calendar:DNe,Card:zNe,CardHeader:qNe,CardFooter:UNe,CardTitle:HNe,CardAction:BNe,CardDescription:VNe,CardContent:FNe,Checkbox:uLe,Collapsible:NLe,CollapsibleTrigger:LLe,CollapsibleContent:ELe,Command:lO,CommandDialog:DIe,CommandInput:zW,CommandList:qW,CommandEmpty:HW,CommandGroup:VW,CommandItem:FW,CommandShortcut:zIe,CommandSeparator:BW,ContextMenu:l$e,ContextMenuTrigger:d$e,ContextMenuContent:v$e,ContextMenuItem:k$e,ContextMenuCheckboxItem:g$e,ContextMenuRadioItem:M$e,ContextMenuLabel:x$e,ContextMenuSeparator:b$e,ContextMenuShortcut:w$e,ContextMenuGroup:u$e,ContextMenuPortal:h$e,ContextMenuSub:p$e,ContextMenuSubContent:m$e,ContextMenuSubTrigger:y$e,ContextMenuRadioGroup:f$e,Dialog:TW,DialogClose:PIe,DialogContent:jW,DialogDescription:DW,DialogFooter:OIe,DialogHeader:PW,DialogOverlay:$W,DialogPortal:RW,DialogTitle:OW,DialogTrigger:jIe,DialogStack:mX,DialogStackTrigger:S$e,DialogStackOverlay:C$e,DialogStackBody:N$e,DialogStackContent:L$e,DialogStackTitle:E$e,DialogStackDescription:I$e,DialogStackHeader:A$e,DialogStackFooter:T$e,DialogStackNext:R$e,DialogStackPrevious:$$e,DropdownMenu:Mje,DropdownMenuPortal:xje,DropdownMenuTrigger:bje,DropdownMenuContent:wje,DropdownMenuGroup:_je,DropdownMenuLabel:Eje,DropdownMenuItem:Sje,DropdownMenuCheckboxItem:Cje,DropdownMenuRadioGroup:Nje,DropdownMenuRadioItem:Lje,DropdownMenuSeparator:Ije,DropdownMenuShortcut:Aje,DropdownMenuSub:Tje,DropdownMenuSubTrigger:Rje,DropdownMenuSubContent:$je,Input:PX,Label:Oje,Menubar:CPe,MenubarPortal:iK,MenubarMenu:NPe,MenubarTrigger:IPe,MenubarContent:APe,MenubarGroup:LPe,MenubarSeparator:PPe,MenubarLabel:jPe,MenubarItem:TPe,MenubarShortcut:OPe,MenubarCheckboxItem:RPe,MenubarRadioGroup:EPe,MenubarRadioItem:$Pe,MenubarSub:DPe,MenubarSubTrigger:zPe,MenubarSubContent:qPe,Pagination:HPe,PaginationContent:VPe,PaginationLink:UO,PaginationItem:BPe,PaginationPrevious:FPe,PaginationNext:UPe,PaginationEllipsis:GPe,Popover:MK,PopoverTrigger:xK,PopoverContent:bK,PopoverAnchor:mOe,Select:vDe,SelectContent:xDe,SelectGroup:kDe,SelectItem:wDe,SelectLabel:bDe,SelectScrollDownButton:aY,SelectScrollUpButton:nY,SelectSeparator:_De,SelectTrigger:MDe,SelectValue:gDe,Separator:XO,Sheet:rY,SheetTrigger:EDe,SheetClose:IDe,SheetContent:iY,SheetHeader:cY,SheetFooter:RDe,SheetTitle:sY,SheetDescription:lY,Sidebar:gze,SidebarContent:Nze,SidebarFooter:Sze,SidebarGroup:Lze,SidebarGroupAction:Ize,SidebarGroupContent:Aze,SidebarGroupLabel:Eze,SidebarHeader:_ze,SidebarInput:wze,SidebarInset:bze,SidebarMenu:Tze,SidebarMenuAction:Pze,SidebarMenuBadge:Oze,SidebarMenuButton:jze,SidebarMenuItem:Rze,SidebarMenuSkeleton:Dze,SidebarMenuSub:zze,SidebarMenuSubButton:Hze,SidebarMenuSubItem:qze,SidebarProvider:kze,SidebarRail:xze,SidebarSeparator:Cze,SidebarTrigger:Mze,useSidebar:J2,Skeleton:fP,Slider:mqe,Toaster:Kqe,Switch:hHe,Table:pHe,TableHeader:fHe,TableBody:yHe,TableFooter:mHe,TableHead:kHe,TableRow:vHe,TableCell:gHe,TableCaption:MHe,Textarea:xHe,Tooltip:bY,TooltipTrigger:wY,TooltipContent:_Y,TooltipProvider:QO,VanillaJSONEditor:xP}),Object.assign(window.JSComponents,{VanillaJSONEditor:xP,HandsonTable:KY,MonacoEditor:YY,MultiSelect:tD})}const{createInertiaApp:qHe,router:QY}=HU;window.React=ke;window.ReactDOM=ur;window.InertiajsReact=HU;window.LucideReact=F_e;zHe();async function HHe(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 nD=!1;QY.on("navigate",e=>{nD=!0});QY.on("finish",e=>{nD=!1});const _F=document.createElement.bind(document);document.createElement=function(e,t){const a=_F(e,t);return e.toLowerCase()==="iframe"&&nD?(console.warn("[Adminizer] Prevented iframe creation, forcing full page reload"),setTimeout(()=>{window.location.reload()},0),_F("div")):a};qHe({title:e=>`${e}`,resolve:e=>HHe(`./pages/${e}.tsx`,Object.assign({"./pages/add-group.tsx":()=>vn(()=>import("./add-group-Bjq2R0iV.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-ChZGses8.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-COpwiOsy.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-BoonmK4z.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-5NZ3QseL.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-Cb-Rvm4q.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-B_8v8I3J.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-Bk_HC60_.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-CpkT1A5r.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-BDXazYdM.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-Deuf56Yd.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-BerxxdCf.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}){Loe.createRoot(e).render(M.jsx(t,{...a}))},progress:{color:"#0f4898"}});export{MK as $,v$e as A,xA as B,lr as C,mX as D,l5 as E,k$e as F,zNe as G,qNe as H,PX as I,HNe as J,UNe as K,Fs as L,QO as M,bY as N,wY as O,k2 as P,_Y as Q,hHe as R,vDe as S,Kqe as T,S$e as U,E$e as V,hr as W,hj as X,c2 as Y,s2 as Z,_Se as _,s5 as a,G8 as a$,xK as a0,uv as a1,W1 as a2,bK as a3,DNe as a4,pHe as a5,fHe as a6,vHe as a7,kHe as a8,yHe as a9,ee as aA,OIe as aB,PIe as aC,vf as aD,Qp as aE,nf as aF,cf as aG,jIe as aH,Rs as aI,kt as aJ,H2 as aK,bn as aL,It as aM,xZ as aN,bZ as aO,xe as aP,Pn as aQ,zA as aR,D7 as aS,yM as aT,kze as aU,XHe as aV,Mje as aW,xy as aX,Sje as aY,Ije as aZ,Mze as a_,gHe as aa,vc as ab,TW as ac,jW as ad,PW as ae,OW as af,vG as ag,voe as ah,goe as ai,$U as aj,hVe as ak,jE as al,$x as am,bze as an,vl as ao,bi as ap,YU as aq,xHe as ar,DHe as as,eD as at,sb as au,F8 as av,v_ as aw,sr as ax,UL as ay,M1 as az,Oje as b,kVe as b$,gze as b0,_ze as b1,Tze as b2,Rze as b3,CPe as b4,NPe as b5,IPe as b6,jze as b7,e4 as b8,APe as b9,Eze as bA,Aze as bB,NLe as bC,ELe as bD,J2 as bE,$De as bF,wN as bG,w7 as bH,SN as bI,zre as bJ,qre as bK,Hre as bL,Eje as bM,Px as bN,dVe as bO,uf as bP,g2 as bQ,r1 as bR,__ as bS,HPe as bT,VPe as bU,BPe as bV,UO as bW,FPe as bX,UPe as bY,mVe as bZ,vVe as b_,DPe as ba,zPe as bb,qPe as bc,TPe as bd,Lze as be,HG as bf,LLe as bg,FG as bh,zze as bi,qze as bj,Hze as bk,Nze as bl,Sze as bm,U_e as bn,G_e as bo,W_e as bp,X_e as bq,Z_e as br,K_e as bs,tD as bt,mqe as bu,Un as bv,s7 as bw,yVe as bx,fVe as by,pVe as bz,MDe as c,gVe as c0,gDe as d,xDe as e,wDe as f,uLe as g,Nt as h,C$e as i,M as j,N$e as k,L$e as l,fP as m,Bre as n,Qw as o,Uf as p,kX as q,qU as r,bje as s,Oqe as t,gA as u,fc as v,wje as w,_je as x,l$e as y,d$e as z};
|