@epilot/volt-ui 1.0.1 → 1.0.2
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/dist/index.cjs.js +1 -1
- package/dist/index.es.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -42,4 +42,4 @@
|
|
|
42
42
|
|
|
43
43
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
44
|
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},rd="DialogDescriptionWarning",id=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yi(rd).contentName}}.`;return l.useEffect(()=>{var i;const r=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},wi=ai,ad=li,Ci=ui,Si=di,Ri=fi,sd=vi,ld=gi,Ei=xi,gt='[cmdk-group=""]',_o='[cmdk-group-items=""]',cd='[cmdk-group-heading=""]',Pi='[cmdk-item=""]',ir=`${Pi}:not([aria-disabled="true"])`,zo="cmdk-item-select",Qe="data-value",ud=(e,t,o)=>jc(e,t,o),Ti=l.createContext(void 0),Rt=()=>l.useContext(Ti),ki=l.createContext(void 0),dn=()=>l.useContext(ki),Ai=l.createContext(void 0),Ii=l.forwardRef((e,t)=>{let o=Je(()=>{var P,O;return{search:"",value:(O=(P=e.value)!=null?P:e.defaultValue)!=null?O:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Je(()=>new Set),r=Je(()=>new Map),i=Je(()=>new Map),a=Je(()=>new Set),s=Ni(e),{label:c,children:u,value:f,onValueChange:p,filter:g,shouldFilter:m,loop:b,disablePointerSelection:v=!1,vimBindings:h=!0,...y}=e,x=ie(),w=ie(),C=ie(),S=l.useRef(null),k=wd();We(()=>{if(f!==void 0){let P=f.trim();o.current.value=P,E.emit()}},[f]),We(()=>{k(6,Z)},[]);let E=l.useMemo(()=>({subscribe:P=>(a.current.add(P),()=>a.current.delete(P)),snapshot:()=>o.current,setState:(P,O,D)=>{var _,H,A,V;if(!Object.is(o.current[P],O)){if(o.current[P]=O,P==="search")Y(),B(),k(1,K);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let U=document.getElementById(C);U?U.focus():(_=document.getElementById(x))==null||_.focus()}if(k(7,()=>{var U;o.current.selectedItemId=(U=q())==null?void 0:U.id,E.emit()}),D||k(5,Z),((H=s.current)==null?void 0:H.value)!==void 0){let U=O??"";(V=(A=s.current).onValueChange)==null||V.call(A,U);return}}E.emit()}},emit:()=>{a.current.forEach(P=>P())}}),[]),R=l.useMemo(()=>({value:(P,O,D)=>{var _;O!==((_=i.current.get(P))==null?void 0:_.value)&&(i.current.set(P,{value:O,keywords:D}),o.current.filtered.items.set(P,F(O,D)),k(2,()=>{B(),E.emit()}))},item:(P,O)=>(n.current.add(P),O&&(r.current.has(O)?r.current.get(O).add(P):r.current.set(O,new Set([P]))),k(3,()=>{Y(),B(),o.current.value||K(),E.emit()}),()=>{i.current.delete(P),n.current.delete(P),o.current.filtered.items.delete(P);let D=q();k(4,()=>{Y(),(D==null?void 0:D.getAttribute("id"))===P&&K(),E.emit()})}),group:P=>(r.current.has(P)||r.current.set(P,new Set),()=>{i.current.delete(P),r.current.delete(P)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:x,inputId:C,labelId:w,listInnerRef:S}),[]);function F(P,O){var D,_;let H=(_=(D=s.current)==null?void 0:D.filter)!=null?_:ud;return P?H(P,o.current.search,O):0}function B(){if(!o.current.search||s.current.shouldFilter===!1)return;let P=o.current.filtered.items,O=[];o.current.filtered.groups.forEach(_=>{let H=r.current.get(_),A=0;H.forEach(V=>{let U=P.get(V);A=Math.max(U,A)}),O.push([_,A])});let D=S.current;G().sort((_,H)=>{var A,V;let U=_.getAttribute("id"),X=H.getAttribute("id");return((A=P.get(X))!=null?A:0)-((V=P.get(U))!=null?V:0)}).forEach(_=>{let H=_.closest(_o);H?H.appendChild(_.parentElement===H?_:_.closest(`${_o} > *`)):D.appendChild(_.parentElement===D?_:_.closest(`${_o} > *`))}),O.sort((_,H)=>H[1]-_[1]).forEach(_=>{var H;let A=(H=S.current)==null?void 0:H.querySelector(`${gt}[${Qe}="${encodeURIComponent(_[0])}"]`);A==null||A.parentElement.appendChild(A)})}function K(){let P=G().find(D=>D.getAttribute("aria-disabled")!=="true"),O=P==null?void 0:P.getAttribute(Qe);E.setState("value",O||void 0)}function Y(){var P,O,D,_;if(!o.current.search||s.current.shouldFilter===!1){o.current.filtered.count=n.current.size;return}o.current.filtered.groups=new Set;let H=0;for(let A of n.current){let V=(O=(P=i.current.get(A))==null?void 0:P.value)!=null?O:"",U=(_=(D=i.current.get(A))==null?void 0:D.keywords)!=null?_:[],X=F(V,U);o.current.filtered.items.set(A,X),X>0&&H++}for(let[A,V]of r.current)for(let U of V)if(o.current.filtered.items.get(U)>0){o.current.filtered.groups.add(A);break}o.current.filtered.count=H}function Z(){var P,O,D;let _=q();_&&(((P=_.parentElement)==null?void 0:P.firstChild)===_&&((D=(O=_.closest(gt))==null?void 0:O.querySelector(cd))==null||D.scrollIntoView({block:"nearest"})),_.scrollIntoView({block:"nearest"}))}function q(){var P;return(P=S.current)==null?void 0:P.querySelector(`${Pi}[aria-selected="true"]`)}function G(){var P;return Array.from(((P=S.current)==null?void 0:P.querySelectorAll(ir))||[])}function M(P){let O=G()[P];O&&E.setState("value",O.getAttribute(Qe))}function z(P){var O;let D=q(),_=G(),H=_.findIndex(V=>V===D),A=_[H+P];(O=s.current)!=null&&O.loop&&(A=H+P<0?_[_.length-1]:H+P===_.length?_[0]:_[H+P]),A&&E.setState("value",A.getAttribute(Qe))}function T(P){let O=q(),D=O==null?void 0:O.closest(gt),_;for(;D&&!_;)D=P>0?bd(D,gt):yd(D,gt),_=D==null?void 0:D.querySelector(ir);_?E.setState("value",_.getAttribute(Qe)):z(P)}let te=()=>M(G().length-1),ne=P=>{P.preventDefault(),P.metaKey?te():P.altKey?T(1):z(1)},se=P=>{P.preventDefault(),P.metaKey?M(0):P.altKey?T(-1):z(-1)};return l.createElement(Re.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:P=>{var O;(O=y.onKeyDown)==null||O.call(y,P);let D=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||D))switch(P.key){case"n":case"j":{h&&P.ctrlKey&&ne(P);break}case"ArrowDown":{ne(P);break}case"p":case"k":{h&&P.ctrlKey&&se(P);break}case"ArrowUp":{se(P);break}case"Home":{P.preventDefault(),M(0);break}case"End":{P.preventDefault(),te();break}case"Enter":{P.preventDefault();let _=q();if(_){let H=new Event(zo);_.dispatchEvent(H)}}}}},l.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:Sd},c),to(e,P=>l.createElement(ki.Provider,{value:E},l.createElement(Ti.Provider,{value:R},P))))}),dd=l.forwardRef((e,t)=>{var o,n;let r=ie(),i=l.useRef(null),a=l.useContext(Ai),s=Rt(),c=Ni(e),u=(n=(o=c.current)==null?void 0:o.forceMount)!=null?n:a==null?void 0:a.forceMount;We(()=>{if(!u)return s.item(r,a==null?void 0:a.id)},[u]);let f=ji(r,i,[e.value,e.children,i],e.keywords),p=dn(),g=Me(k=>k.value&&k.value===f.current),m=Me(k=>u||s.filter()===!1?!0:k.search?k.filtered.items.get(r)>0:!0);l.useEffect(()=>{let k=i.current;if(!(!k||e.disabled))return k.addEventListener(zo,b),()=>k.removeEventListener(zo,b)},[m,e.onSelect,e.disabled]);function b(){var k,E;v(),(E=(k=c.current).onSelect)==null||E.call(k,f.current)}function v(){p.setState("value",f.current,!0)}if(!m)return null;let{disabled:h,value:y,onSelect:x,forceMount:w,keywords:C,...S}=e;return l.createElement(Re.div,{ref:Oe(i,t),...S,id:r,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!g,"data-disabled":!!h,"data-selected":!!g,onPointerMove:h||s.getDisablePointerSelection()?void 0:v,onClick:h?void 0:b},e.children)}),fd=l.forwardRef((e,t)=>{let{heading:o,children:n,forceMount:r,...i}=e,a=ie(),s=l.useRef(null),c=l.useRef(null),u=ie(),f=Rt(),p=Me(m=>r||f.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);We(()=>f.group(a),[]),ji(a,s,[e.value,e.heading,c]);let g=l.useMemo(()=>({id:a,forceMount:r}),[r]);return l.createElement(Re.div,{ref:Oe(s,t),...i,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},o&&l.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},o),to(e,m=>l.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?u:void 0},l.createElement(Ai.Provider,{value:g},m))))}),pd=l.forwardRef((e,t)=>{let{alwaysRender:o,...n}=e,r=l.useRef(null),i=Me(a=>!a.search);return!o&&!i?null:l.createElement(Re.div,{ref:Oe(r,t),...n,"cmdk-separator":"",role:"separator"})}),vd=l.forwardRef((e,t)=>{let{onValueChange:o,...n}=e,r=e.value!=null,i=dn(),a=Me(u=>u.search),s=Me(u=>u.selectedItemId),c=Rt();return l.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),l.createElement(Re.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:"text",value:r?e.value:a,onChange:u=>{r||i.setState("search",u.target.value),o==null||o(u.target.value)}})}),md=l.forwardRef((e,t)=>{let{children:o,label:n="Suggestions",...r}=e,i=l.useRef(null),a=l.useRef(null),s=Me(u=>u.selectedItemId),c=Rt();return l.useEffect(()=>{if(a.current&&i.current){let u=a.current,f=i.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let m=u.offsetHeight;f.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return g.observe(u),()=>{cancelAnimationFrame(p),g.unobserve(u)}}},[]),l.createElement(Re.div,{ref:Oe(i,t),...r,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":n,id:c.listId},to(e,u=>l.createElement("div",{ref:Oe(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),gd=l.forwardRef((e,t)=>{let{open:o,onOpenChange:n,overlayClassName:r,contentClassName:i,container:a,...s}=e;return l.createElement(wi,{open:o,onOpenChange:n},l.createElement(Ci,{container:a},l.createElement(Si,{"cmdk-overlay":"",className:r}),l.createElement(Ri,{"aria-label":e.label,"cmdk-dialog":"",className:i},l.createElement(Ii,{ref:t,...s}))))}),hd=l.forwardRef((e,t)=>Me(o=>o.filtered.count===0)?l.createElement(Re.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),xd=l.forwardRef((e,t)=>{let{progress:o,children:n,label:r="Loading...",...i}=e;return l.createElement(Re.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r},to(e,a=>l.createElement("div",{"aria-hidden":!0},a)))}),Fe=Object.assign(Ii,{List:md,Item:dd,Input:vd,Group:fd,Separator:pd,Dialog:gd,Empty:hd,Loading:xd});function bd(e,t){let o=e.nextElementSibling;for(;o;){if(o.matches(t))return o;o=o.nextElementSibling}}function yd(e,t){let o=e.previousElementSibling;for(;o;){if(o.matches(t))return o;o=o.previousElementSibling}}function Ni(e){let t=l.useRef(e);return We(()=>{t.current=e}),t}var We=typeof window>"u"?l.useEffect:l.useLayoutEffect;function Je(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function Me(e){let t=dn(),o=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,o,o)}function ji(e,t,o,n=[]){let r=l.useRef(),i=Rt();return We(()=>{var a;let s=(()=>{var u;for(let f of o){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():r.current}})(),c=n.map(u=>u.trim());i.value(e,s,c),(a=t.current)==null||a.setAttribute(Qe,s),r.current=s}),r}var wd=()=>{let[e,t]=l.useState(),o=Je(()=>new Map);return We(()=>{o.current.forEach(n=>n()),o.current=new Map},[e]),(n,r)=>{o.current.set(n,r),t({})}};function Cd(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function to({asChild:e,children:t},o){return e&&l.isValidElement(t)?l.cloneElement(Cd(t),{ref:t.ref},o(t.props.children)):o(t)}var Sd={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Rd=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z"})}),Ed=({...e})=>d.jsx(wi,{"data-slot":"dialog",...e}),Pd=({...e})=>d.jsx(ad,{"data-slot":"dialog-trigger",...e}),Oi=({...e})=>d.jsx(Ci,{"data-slot":"dialog-portal",...e}),Td=({className:e,...t})=>d.jsx(Ei,{"data-slot":"dialog-close",className:I("volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-offset-2 volt-ui-focus-visible:outline-accent-a8",e),...t}),_i=({className:e,...t})=>d.jsx(Si,{"data-slot":"dialog-overlay",className:I("volt-ui-data-[state=open]:animate-in volt-ui-data-[state=closed]:animate-out volt-ui-data-[state=closed]:fade-out-0 volt-ui-data-[state=open]:fade-in-0 volt-ui-fixed volt-ui-inset-0 volt-ui-z-50 volt-ui-bg-black/50",e),...t}),kd=({className:e,children:t,showCloseButton:o=!0,size:n="lg",...r})=>d.jsxs(Oi,{"data-slot":"dialog-portal",children:[d.jsx(_i,{}),d.jsxs(Ri,{"data-slot":"dialog-content",className:I("volt-ui-bg-body volt-ui-data-[state=open]:animate-in volt-ui-data-[state=closed]:animate-out volt-ui-data-[state=closed]:fade-out-0 volt-ui-data-[state=open]:fade-in-0 volt-ui-data-[state=closed]:zoom-out-95 volt-ui-data-[state=open]:zoom-in-95 volt-ui-fixed volt-ui-top-[50%] volt-ui-left-[50%] volt-ui-z-50 volt-ui-grid volt-ui-w-full volt-ui-max-w-[calc(100%-2rem)] volt-ui-translate-x-[-50%] volt-ui-translate-y-[-50%] volt-ui-gap-6 volt-ui-rounded-xl volt-ui-border volt-ui-p-6 volt-ui-shadow-lg volt-ui-duration-200",{"volt-ui-sm:max-w-sm":n==="sm","volt-ui-sm:max-w-md":n==="md","volt-ui-sm:max-w-lg":n==="lg","volt-ui-sm:max-w-xl":n==="xl","volt-ui-sm:max-w-2xl":n==="2xl","volt-ui-sm:max-w-3xl":n==="3xl","volt-ui-sm:max-w-4xl":n==="4xl","volt-ui-sm:max-w-5xl":n==="5xl","volt-ui-w-full":n==="volt-ui-full-width"},e),...r,children:[t,o&&d.jsxs(Ei,{"data-slot":"dialog-close",className:"volt-ui-data-[state=open]:bg-body volt-ui-size-6 volt-ui-opacity-70 volt-ui-hover:opacity-100 volt-ui-focus-visible:opacity-100 volt-ui-transition-all volt-ui-data-[state=open]:text-gray-light volt-ui-absolute volt-ui-top-4 volt-ui-right-4 volt-ui-rounded-full volt-ui-cursor-pointer volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-offset-2 volt-ui-focus-visible:outline-accent-a8 volt-ui-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='volt-ui-size-'])]:size-4",children:[d.jsx(Rd,{}),d.jsx("span",{className:"volt-ui-sr-only",children:"Close"})]})]})]}),Ad=({className:e,...t})=>d.jsx("div",{"data-slot":"volt-ui-dialog-header",className:I("volt-ui-flex volt-ui-flex-col volt-ui-gap-2 volt-ui-text-left",e),...t}),Id=({className:e,...t})=>d.jsx("div",{"data-slot":"volt-ui-dialog-footer",className:I("volt-ui-flex volt-ui-gap-2 volt-ui-justify-end",e),...t}),Nd=({className:e,...t})=>d.jsx(sd,{"data-slot":"volt-ui-dialog-title",className:I("volt-ui-text-lg volt-ui-leading-none volt-ui-font-semibold volt-ui-text-gray-default",e),...t}),jd=({className:e,...t})=>d.jsx(ld,{"data-slot":"volt-ui-dialog-description",className:I("volt-ui-text-gray-light volt-ui-text-sm",e),...t}),Od=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M380-320q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l224 224q11 11 11 28t-11 28q-11 11-28 11t-28-11L532-372q-30 24-69 38t-83 14Zm0-80q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"})}),_d=({className:e,...t})=>d.jsx(Fe,{"data-slot":"command",className:I("volt-ui-bg-body volt-ui-text-gray-default volt-ui-flex volt-ui-h-full volt-ui-w-full volt-ui-flex-col volt-ui-overflow-hidden volt-ui-rounded-md",e),...t}),Md=({className:e,...t})=>d.jsxs("div",{"data-slot":"command-input-wrapper",className:"volt-ui-flex volt-ui-items-center volt-ui-gap-2 volt-ui-border-b volt-ui-px-3",children:[d.jsx(Od,{className:"volt-ui-size-5 volt-ui-shrink-0 volt-ui-opacity-50"}),d.jsx(Fe.Input,{"data-slot":"command-input",className:I("volt-ui-placeholder:text-gray-light volt-ui-h-12 volt-ui-flex volt-ui-w-full volt-ui-rounded-md volt-ui-bg-transparent volt-ui-py-3 volt-ui-text-sm volt-ui-outline-hidden volt-ui-disabled:cursor-not-allowed volt-ui-disabled:opacity-50",e),...t})]}),Dd=({className:e,...t})=>d.jsx(Fe.List,{"data-slot":"command-list",className:I("volt-ui-scroll-py-1 volt-ui-overflow-x-hidden volt-ui-overflow-y-auto",e),...t}),Ld=({...e})=>d.jsx(Fe.Empty,{"data-slot":"command-empty",className:"volt-ui-py-6 volt-ui-text-center volt-ui-text-sm",...e}),Fd=({className:e,...t})=>d.jsx(Fe.Group,{"data-slot":"command-group",className:I("volt-ui-text-foreground volt-ui-**:[[cmdk-group-heading]]:text-gray-light volt-ui-overflow-hidden volt-ui-p-1 volt-ui-**:[[cmdk-group-heading]]:px-2 volt-ui-**:[[cmdk-group-heading]]:py-1.5 volt-ui-**:[[cmdk-group-heading]]:text-xs volt-ui-**:[[cmdk-group-heading]]:font-medium",e),...t}),$d=({className:e,...t})=>d.jsx(Fe.Separator,{"data-slot":"command-separator",className:I("volt-ui-bg-gray-soft volt-ui--mx-1 volt-ui-h-px",e),...t}),Bd=({className:e,...t})=>d.jsx(Fe.Item,{"data-slot":"command-item",className:I("volt-ui-data-[selected=true]:bg-accent-a3 volt-ui-data-[selected=true]:text-gray-default [&_svg:not([class*='volt-ui-text-'])]:text-gray-light volt-ui-relative volt-ui-flex volt-ui-cursor-default volt-ui-items-center volt-ui-gap-2 volt-ui-rounded-sm volt-ui-px-2 volt-ui-py-1.5 volt-ui-text-sm volt-ui-outline-hidden volt-ui-select-none volt-ui-data-[disabled=true]:pointer-events-none volt-ui-data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='volt-ui-size-'])]:size-4",e),...t}),qd=({className:e,...t})=>d.jsx(Fe.Loading,{"data-slot":"volt-ui-command-loading",className:I("volt-ui-text-gray-light",e),...t}),zd=["top","right","bottom","left"],De=Math.min,ce=Math.max,Wt=Math.round,Lt=Math.floor,Ce=e=>({x:e,y:e}),Vd={left:"right",right:"left",bottom:"top",top:"bottom"},Wd={start:"end",end:"start"};function Vo(e,t,o){return ce(e,De(t,o))}function Te(e,t){return typeof e=="function"?e(t):e}function ke(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function fn(e){return e==="x"?"y":"x"}function pn(e){return e==="y"?"height":"width"}const Gd=new Set(["top","bottom"]);function we(e){return Gd.has(ke(e))?"y":"x"}function vn(e){return fn(we(e))}function Hd(e,t,o){o===void 0&&(o=!1);const n=lt(e),r=vn(e),i=pn(r);let a=r==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Gt(a)),[a,Gt(a)]}function Ud(e){const t=Gt(e);return[Wo(e),t,Wo(t)]}function Wo(e){return e.replace(/start|end/g,t=>Wd[t])}const ar=["left","right"],sr=["right","left"],Kd=["top","bottom"],Yd=["bottom","top"];function Zd(e,t,o){switch(e){case"top":case"bottom":return o?t?sr:ar:t?ar:sr;case"left":case"right":return t?Kd:Yd;default:return[]}}function Xd(e,t,o,n){const r=lt(e);let i=Zd(ke(e),o==="start",n);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(Wo)))),i}function Gt(e){return e.replace(/left|right|bottom|top/g,t=>Vd[t])}function Qd(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mi(e){return typeof e!="number"?Qd(e):{top:e,right:e,bottom:e,left:e}}function Ht(e){const{x:t,y:o,width:n,height:r}=e;return{width:n,height:r,top:o,left:t,right:t+n,bottom:o+r,x:t,y:o}}function lr(e,t,o){let{reference:n,floating:r}=e;const i=we(t),a=vn(t),s=pn(a),c=ke(t),u=i==="y",f=n.x+n.width/2-r.width/2,p=n.y+n.height/2-r.height/2,g=n[s]/2-r[s]/2;let m;switch(c){case"top":m={x:f,y:n.y-r.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-r.width,y:p};break;default:m={x:n.x,y:n.y}}switch(lt(t)){case"start":m[a]-=g*(o&&u?-1:1);break;case"end":m[a]+=g*(o&&u?-1:1);break}return m}const Jd=async(e,t,o)=>{const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:a}=o,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:p}=lr(u,n,c),g=n,m={},b=0;for(let v=0;v<s.length;v++){const{name:h,fn:y}=s[v],{x,y:w,data:C,reset:S}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:r,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});f=x??f,p=w??p,m={...m,[h]:{...m[h],...C}},S&&b<=50&&(b++,typeof S=="object"&&(S.placement&&(g=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:f,y:p}=lr(u,g,c)),v=-1)}return{x:f,y:p,placement:g,strategy:r,middlewareData:m}};async function xt(e,t){var o;t===void 0&&(t={});const{x:n,y:r,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=Te(t,e),b=Mi(m),h=s[g?p==="floating"?"reference":"floating":p],y=Ht(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(h)))==null||o?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:c})),x=p==="floating"?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},S=Ht(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:c}):x);return{top:(y.top-S.top+b.top)/C.y,bottom:(S.bottom-y.bottom+b.bottom)/C.y,left:(y.left-S.left+b.left)/C.x,right:(S.right-y.right+b.right)/C.x}}const ef=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:n,placement:r,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:u,padding:f=0}=Te(e,t)||{};if(u==null)return{};const p=Mi(f),g={x:o,y:n},m=vn(r),b=pn(m),v=await a.getDimensions(u),h=m==="y",y=h?"top":"left",x=h?"bottom":"right",w=h?"clientHeight":"clientWidth",C=i.reference[b]+i.reference[m]-g[m]-i.floating[b],S=g[m]-i.reference[m],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=k?k[w]:0;(!E||!await(a.isElement==null?void 0:a.isElement(k)))&&(E=s.floating[w]||i.floating[b]);const R=C/2-S/2,F=E/2-v[b]/2-1,B=De(p[y],F),K=De(p[x],F),Y=B,Z=E-v[b]-K,q=E/2-v[b]/2+R,G=Vo(Y,q,Z),M=!c.arrow&<(r)!=null&&q!==G&&i.reference[b]/2-(q<Y?B:K)-v[b]/2<0,z=M?q<Y?q-Y:q-Z:0;return{[m]:g[m]+z,data:{[m]:G,centerOffset:q-G-z,...M&&{alignmentOffset:z}},reset:M}}}),tf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...h}=Te(e,t);if((o=i.arrow)!=null&&o.alignmentOffset)return{};const y=ke(r),x=we(s),w=ke(s)===s,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),S=g||(w||!v?[Gt(s)]:Ud(s)),k=b!=="none";!g&&k&&S.push(...Xd(s,v,b,C));const E=[s,...S],R=await xt(t,h),F=[];let B=((n=i.flip)==null?void 0:n.overflows)||[];if(f&&F.push(R[y]),p){const q=Hd(r,a,C);F.push(R[q[0]],R[q[1]])}if(B=[...B,{placement:r,overflows:F}],!F.every(q=>q<=0)){var K,Y;const q=(((K=i.flip)==null?void 0:K.index)||0)+1,G=E[q];if(G&&(!(p==="alignment"?x!==we(G):!1)||B.every(T=>we(T.placement)===x?T.overflows[0]>0:!0)))return{data:{index:q,overflows:B},reset:{placement:G}};let M=(Y=B.filter(z=>z.overflows[0]<=0).sort((z,T)=>z.overflows[1]-T.overflows[1])[0])==null?void 0:Y.placement;if(!M)switch(m){case"bestFit":{var Z;const z=(Z=B.filter(T=>{if(k){const te=we(T.placement);return te===x||te==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(te=>te>0).reduce((te,ne)=>te+ne,0)]).sort((T,te)=>T[1]-te[1])[0])==null?void 0:Z[0];z&&(M=z);break}case"initialPlacement":M=s;break}if(r!==M)return{reset:{placement:M}}}return{}}}};function cr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ur(e){return zd.some(t=>e[t]>=0)}const of=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o}=t,{strategy:n="referenceHidden",...r}=Te(e,t);switch(n){case"referenceHidden":{const i=await xt(t,{...r,elementContext:"reference"}),a=cr(i,o.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ur(a)}}}case"escaped":{const i=await xt(t,{...r,altBoundary:!0}),a=cr(i,o.floating);return{data:{escapedOffsets:a,escaped:ur(a)}}}default:return{}}}}},Di=new Set(["left","top"]);async function nf(e,t){const{placement:o,platform:n,elements:r}=e,i=await(n.isRTL==null?void 0:n.isRTL(r.floating)),a=ke(o),s=lt(o),c=we(o)==="y",u=Di.has(a)?-1:1,f=i&&c?-1:1,p=Te(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof b=="number"&&(m=s==="end"?b*-1:b),c?{x:m*f,y:g*u}:{x:g*u,y:m*f}}const rf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:r,y:i,placement:a,middlewareData:s}=t,c=await nf(t,e);return a===((o=s.offset)==null?void 0:o.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:a}}}}},af=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:y,y:x}=h;return{x:y,y:x}}},...c}=Te(e,t),u={x:o,y:n},f=await xt(t,c),p=we(ke(r)),g=fn(p);let m=u[g],b=u[p];if(i){const h=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=m+f[h],w=m-f[y];m=Vo(x,m,w)}if(a){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=b+f[h],w=b-f[y];b=Vo(x,b,w)}const v=s.fn({...t,[g]:m,[p]:b});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[g]:i,[p]:a}}}}}},sf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:n,placement:r,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Te(e,t),f={x:o,y:n},p=we(r),g=fn(p);let m=f[g],b=f[p];const v=Te(s,t),h=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const w=g==="y"?"height":"width",C=i.reference[g]-i.floating[w]+h.mainAxis,S=i.reference[g]+i.reference[w]-h.mainAxis;m<C?m=C:m>S&&(m=S)}if(u){var y,x;const w=g==="y"?"width":"height",C=Di.has(ke(r)),S=i.reference[p]-i.floating[w]+(C&&((y=a.offset)==null?void 0:y[p])||0)+(C?0:h.crossAxis),k=i.reference[p]+i.reference[w]+(C?0:((x=a.offset)==null?void 0:x[p])||0)-(C?h.crossAxis:0);b<S?b=S:b>k&&(b=k)}return{[g]:m,[p]:b}}}},lf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,n;const{placement:r,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...u}=Te(e,t),f=await xt(t,u),p=ke(r),g=lt(r),m=we(r)==="y",{width:b,height:v}=i.floating;let h,y;p==="top"||p==="bottom"?(h=p,y=g===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=p,h=g==="end"?"top":"bottom");const x=v-f.top-f.bottom,w=b-f.left-f.right,C=De(v-f[h],x),S=De(b-f[y],w),k=!t.middlewareData.shift;let E=C,R=S;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(R=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=x),k&&!g){const B=ce(f.left,0),K=ce(f.right,0),Y=ce(f.top,0),Z=ce(f.bottom,0);m?R=b-2*(B!==0||K!==0?B+K:ce(f.left,f.right)):E=v-2*(Y!==0||Z!==0?Y+Z:ce(f.top,f.bottom))}await c({...t,availableWidth:R,availableHeight:E});const F=await a.getDimensions(s.floating);return b!==F.width||v!==F.height?{reset:{rects:!0}}:{}}}};function oo(){return typeof window<"u"}function ct(e){return Li(e)?(e.nodeName||"").toLowerCase():"#document"}function ue(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ee(e){var t;return(t=(Li(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Li(e){return oo()?e instanceof Node||e instanceof ue(e).Node:!1}function ve(e){return oo()?e instanceof Element||e instanceof ue(e).Element:!1}function Se(e){return oo()?e instanceof HTMLElement||e instanceof ue(e).HTMLElement:!1}function dr(e){return!oo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ue(e).ShadowRoot}const cf=new Set(["inline","contents"]);function Et(e){const{overflow:t,overflowX:o,overflowY:n,display:r}=me(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!cf.has(r)}const uf=new Set(["table","td","th"]);function df(e){return uf.has(ct(e))}const ff=[":popover-open",":modal"];function no(e){return ff.some(t=>{try{return e.matches(t)}catch{return!1}})}const pf=["transform","translate","scale","rotate","perspective"],vf=["transform","translate","scale","rotate","perspective","filter"],mf=["paint","layout","strict","content"];function mn(e){const t=gn(),o=ve(e)?me(e):e;return pf.some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||vf.some(n=>(o.willChange||"").includes(n))||mf.some(n=>(o.contain||"").includes(n))}function gf(e){let t=Le(e);for(;Se(t)&&!nt(t);){if(mn(t))return t;if(no(t))return null;t=Le(t)}return null}function gn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const hf=new Set(["html","body","#document"]);function nt(e){return hf.has(ct(e))}function me(e){return ue(e).getComputedStyle(e)}function ro(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Le(e){if(ct(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dr(e)&&e.host||Ee(e);return dr(t)?t.host:t}function Fi(e){const t=Le(e);return nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Se(t)&&Et(t)?t:Fi(t)}function bt(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);const r=Fi(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=ue(r);if(i){const s=Go(a);return t.concat(a,a.visualViewport||[],Et(r)?r:[],s&&o?bt(s):[])}return t.concat(r,bt(r,[],o))}function Go(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $i(e){const t=me(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=Se(e),i=r?e.offsetWidth:o,a=r?e.offsetHeight:n,s=Wt(o)!==i||Wt(n)!==a;return s&&(o=i,n=a),{width:o,height:n,$:s}}function hn(e){return ve(e)?e:e.contextElement}function tt(e){const t=hn(e);if(!Se(t))return Ce(1);const o=t.getBoundingClientRect(),{width:n,height:r,$:i}=$i(t);let a=(i?Wt(o.width):o.width)/n,s=(i?Wt(o.height):o.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const xf=Ce(0);function Bi(e){const t=ue(e);return!gn()||!t.visualViewport?xf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bf(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ue(e)?!1:t}function Ge(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const r=e.getBoundingClientRect(),i=hn(e);let a=Ce(1);t&&(n?ve(n)&&(a=tt(n)):a=tt(e));const s=bf(i,o,n)?Bi(i):Ce(0);let c=(r.left+s.x)/a.x,u=(r.top+s.y)/a.y,f=r.width/a.x,p=r.height/a.y;if(i){const g=ue(i),m=n&&ve(n)?ue(n):n;let b=g,v=Go(b);for(;v&&n&&m!==b;){const h=tt(v),y=v.getBoundingClientRect(),x=me(v),w=y.left+(v.clientLeft+parseFloat(x.paddingLeft))*h.x,C=y.top+(v.clientTop+parseFloat(x.paddingTop))*h.y;c*=h.x,u*=h.y,f*=h.x,p*=h.y,c+=w,u+=C,b=ue(v),v=Go(b)}}return Ht({width:f,height:p,x:c,y:u})}function io(e,t){const o=ro(e).scrollLeft;return t?t.left+o:Ge(Ee(e)).left+o}function qi(e,t){const o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-io(e,o),r=o.top+t.scrollTop;return{x:n,y:r}}function yf(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e;const i=r==="fixed",a=Ee(n),s=t?no(t.floating):!1;if(n===a||s&&i)return o;let c={scrollLeft:0,scrollTop:0},u=Ce(1);const f=Ce(0),p=Se(n);if((p||!p&&!i)&&((ct(n)!=="body"||Et(a))&&(c=ro(n)),Se(n))){const m=Ge(n);u=tt(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=a&&!p&&!i?qi(a,c):Ce(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-c.scrollLeft*u.x+f.x+g.x,y:o.y*u.y-c.scrollTop*u.y+f.y+g.y}}function wf(e){return Array.from(e.getClientRects())}function Cf(e){const t=Ee(e),o=ro(e),n=e.ownerDocument.body,r=ce(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=ce(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-o.scrollLeft+io(e);const s=-o.scrollTop;return me(n).direction==="rtl"&&(a+=ce(t.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:s}}const fr=25;function Sf(e,t){const o=ue(e),n=Ee(e),r=o.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,c=0;if(r){i=r.width,a=r.height;const f=gn();(!f||f&&t==="fixed")&&(s=r.offsetLeft,c=r.offsetTop)}const u=io(n);if(u<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(n.clientWidth-p.clientWidth-m);b<=fr&&(i-=b)}else u<=fr&&(i+=u);return{width:i,height:a,x:s,y:c}}const Rf=new Set(["absolute","fixed"]);function Ef(e,t){const o=Ge(e,!0,t==="fixed"),n=o.top+e.clientTop,r=o.left+e.clientLeft,i=Se(e)?tt(e):Ce(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=r*i.x,u=n*i.y;return{width:a,height:s,x:c,y:u}}function pr(e,t,o){let n;if(t==="viewport")n=Sf(e,o);else if(t==="document")n=Cf(Ee(e));else if(ve(t))n=Ef(t,o);else{const r=Bi(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Ht(n)}function zi(e,t){const o=Le(e);return o===t||!ve(o)||nt(o)?!1:me(o).position==="fixed"||zi(o,t)}function Pf(e,t){const o=t.get(e);if(o)return o;let n=bt(e,[],!1).filter(s=>ve(s)&&ct(s)!=="body"),r=null;const i=me(e).position==="fixed";let a=i?Le(e):e;for(;ve(a)&&!nt(a);){const s=me(a),c=mn(a);!c&&s.position==="fixed"&&(r=null),(i?!c&&!r:!c&&s.position==="static"&&!!r&&Rf.has(r.position)||Et(a)&&!c&&zi(e,a))?n=n.filter(f=>f!==a):r=s,a=Le(a)}return t.set(e,n),n}function Tf(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e;const a=[...o==="clippingAncestors"?no(t)?[]:Pf(t,this._c):[].concat(o),n],s=a[0],c=a.reduce((u,f)=>{const p=pr(t,f,r);return u.top=ce(p.top,u.top),u.right=De(p.right,u.right),u.bottom=De(p.bottom,u.bottom),u.left=ce(p.left,u.left),u},pr(t,s,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function kf(e){const{width:t,height:o}=$i(e);return{width:t,height:o}}function Af(e,t,o){const n=Se(t),r=Ee(t),i=o==="fixed",a=Ge(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=Ce(0);function u(){c.x=io(r)}if(n||!n&&!i)if((ct(t)!=="body"||Et(r))&&(s=ro(t)),n){const m=Ge(t,!0,i,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else r&&u();i&&!n&&r&&u();const f=r&&!n&&!i?qi(r,s):Ce(0),p=a.left+s.scrollLeft-c.x-f.x,g=a.top+s.scrollTop-c.y-f.y;return{x:p,y:g,width:a.width,height:a.height}}function Mo(e){return me(e).position==="static"}function vr(e,t){if(!Se(e)||me(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Ee(e)===o&&(o=o.ownerDocument.body),o}function Vi(e,t){const o=ue(e);if(no(e))return o;if(!Se(e)){let r=Le(e);for(;r&&!nt(r);){if(ve(r)&&!Mo(r))return r;r=Le(r)}return o}let n=vr(e,t);for(;n&&df(n)&&Mo(n);)n=vr(n,t);return n&&nt(n)&&Mo(n)&&!mn(n)?o:n||gf(e)||o}const If=async function(e){const t=this.getOffsetParent||Vi,o=this.getDimensions,n=await o(e.floating);return{reference:Af(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Nf(e){return me(e).direction==="rtl"}const jf={convertOffsetParentRelativeRectToViewportRelativeRect:yf,getDocumentElement:Ee,getClippingRect:Tf,getOffsetParent:Vi,getElementRects:If,getClientRects:wf,getDimensions:kf,getScale:tt,isElement:ve,isRTL:Nf};function Wi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Of(e,t){let o=null,n;const r=Ee(e);function i(){var s;clearTimeout(n),(s=o)==null||s.disconnect(),o=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=u;if(s||t(),!g||!m)return;const b=Lt(p),v=Lt(r.clientWidth-(f+g)),h=Lt(r.clientHeight-(p+m)),y=Lt(f),w={rootMargin:-b+"px "+-v+"px "+-h+"px "+-y+"px",threshold:ce(0,De(1,c))||1};let C=!0;function S(k){const E=k[0].intersectionRatio;if(E!==c){if(!C)return a();E?a(!1,E):n=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!Wi(u,e.getBoundingClientRect())&&a(),C=!1}try{o=new IntersectionObserver(S,{...w,root:r.ownerDocument})}catch{o=new IntersectionObserver(S,w)}o.observe(e)}return a(!0),i}function _f(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=hn(e),f=r||i?[...u?bt(u):[],...bt(t)]:[];f.forEach(y=>{r&&y.addEventListener("scroll",o,{passive:!0}),i&&y.addEventListener("resize",o)});const p=u&&s?Of(u,o):null;let g=-1,m=null;a&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),o()}),u&&!c&&m.observe(u),m.observe(t));let b,v=c?Ge(e):null;c&&h();function h(){const y=Ge(e);v&&!Wi(v,y)&&o(),v=y,b=requestAnimationFrame(h)}return o(),()=>{var y;f.forEach(x=>{r&&x.removeEventListener("scroll",o),i&&x.removeEventListener("resize",o)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(b)}}const Mf=rf,Df=af,Lf=tf,Ff=lf,$f=of,mr=ef,Bf=sf,qf=(e,t,o)=>{const n=new Map,r={platform:jf,...o},i={...r.platform,_c:n};return Jd(e,t,{...r,platform:i})};var zf=typeof document<"u",Vf=function(){},Bt=zf?oe.useLayoutEffect:Vf;function Ut(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 o,n,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!Ut(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=o;n--!==0;){const i=r[n];if(!(i==="_owner"&&e.$$typeof)&&!Ut(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Gi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gr(e,t){const o=Gi(e);return Math.round(t*o)/o}function Do(e){const t=l.useRef(e);return Bt(()=>{t.current=e}),t}function Wf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:r,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,p]=l.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=l.useState(n);Ut(g,n)||m(n);const[b,v]=l.useState(null),[h,y]=l.useState(null),x=l.useCallback(T=>{T!==k.current&&(k.current=T,v(T))},[]),w=l.useCallback(T=>{T!==E.current&&(E.current=T,y(T))},[]),C=i||b,S=a||h,k=l.useRef(null),E=l.useRef(null),R=l.useRef(f),F=c!=null,B=Do(c),K=Do(r),Y=Do(u),Z=l.useCallback(()=>{if(!k.current||!E.current)return;const T={placement:t,strategy:o,middleware:g};K.current&&(T.platform=K.current),qf(k.current,E.current,T).then(te=>{const ne={...te,isPositioned:Y.current!==!1};q.current&&!Ut(R.current,ne)&&(R.current=ne,Zt.flushSync(()=>{p(ne)}))})},[g,t,o,K,Y]);Bt(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(T=>({...T,isPositioned:!1})))},[u]);const q=l.useRef(!1);Bt(()=>(q.current=!0,()=>{q.current=!1}),[]),Bt(()=>{if(C&&(k.current=C),S&&(E.current=S),C&&S){if(B.current)return B.current(C,S,Z);Z()}},[C,S,Z,B,F]);const G=l.useMemo(()=>({reference:k,floating:E,setReference:x,setFloating:w}),[x,w]),M=l.useMemo(()=>({reference:C,floating:S}),[C,S]),z=l.useMemo(()=>{const T={position:o,left:0,top:0};if(!M.floating)return T;const te=gr(M.floating,f.x),ne=gr(M.floating,f.y);return s?{...T,transform:"translate("+te+"px, "+ne+"px)",...Gi(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:te,top:ne}},[o,s,M.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:Z,refs:G,elements:M,floatingStyles:z}),[f,Z,G,M,z])}const Gf=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:n,padding:r}=typeof e=="function"?e(o):e;return n&&t(n)?n.current!=null?mr({element:n.current,padding:r}).fn(o):{}:n?mr({element:n,padding:r}).fn(o):{}}}},Hf=(e,t)=>({...Mf(e),options:[e,t]}),Uf=(e,t)=>({...Df(e),options:[e,t]}),Kf=(e,t)=>({...Bf(e),options:[e,t]}),Yf=(e,t)=>({...Lf(e),options:[e,t]}),Zf=(e,t)=>({...Ff(e),options:[e,t]}),Xf=(e,t)=>({...$f(e),options:[e,t]}),Qf=(e,t)=>({...Gf(e),options:[e,t]});var Jf="Arrow",Hi=l.forwardRef((e,t)=>{const{children:o,width:n=10,height:r=5,...i}=e;return d.jsx($.svg,{...i,ref:t,width:n,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Hi.displayName=Jf;var ep=Hi;function ao(e){const[t,o]=l.useState(void 0);return ae(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;o({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else o(void 0)},[e]),t}var xn="Popper",[Ui,ut]=de(xn),[tp,Ki]=Ui(xn),Yi=e=>{const{__scopePopper:t,children:o}=e,[n,r]=l.useState(null);return d.jsx(tp,{scope:t,anchor:n,onAnchorChange:r,children:o})};Yi.displayName=xn;var Zi="PopperAnchor",Xi=l.forwardRef((e,t)=>{const{__scopePopper:o,virtualRef:n,...r}=e,i=Ki(Zi,o),a=l.useRef(null),s=Q(t,a),c=l.useRef(null);return l.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||a.current,u!==c.current&&i.onAnchorChange(c.current)}),n?null:d.jsx($.div,{...r,ref:s})});Xi.displayName=Zi;var bn="PopperContent",[op,np]=Ui(bn),Qi=l.forwardRef((e,t)=>{var A,V,U,X,ee,J;const{__scopePopper:o,side:n="bottom",sideOffset:r=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:b,...v}=e,h=Ki(bn,o),[y,x]=l.useState(null),w=Q(t,le=>x(le)),[C,S]=l.useState(null),k=ao(C),E=(k==null?void 0:k.width)??0,R=(k==null?void 0:k.height)??0,F=n+(i!=="center"?"-"+i:""),B=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},K=Array.isArray(u)?u:[u],Y=K.length>0,Z={padding:B,boundary:K.filter(ip),altBoundary:Y},{refs:q,floatingStyles:G,placement:M,isPositioned:z,middlewareData:T}=Wf({strategy:"fixed",placement:F,whileElementsMounted:(...le)=>_f(...le,{animationFrame:m==="always"}),elements:{reference:h.anchor},middleware:[Hf({mainAxis:r+R,alignmentAxis:a}),c&&Uf({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Kf():void 0,...Z}),c&&Yf({...Z}),Zf({...Z,apply:({elements:le,rects:be,availableWidth:ft,availableHeight:pt})=>{const{width:vt,height:il}=be.reference,At=le.floating.style;At.setProperty("--radix-popper-available-width",`${ft}px`),At.setProperty("--radix-popper-available-height",`${pt}px`),At.setProperty("--radix-popper-anchor-width",`${vt}px`),At.setProperty("--radix-popper-anchor-height",`${il}px`)}}),C&&Qf({element:C,padding:s}),ap({arrowWidth:E,arrowHeight:R}),g&&Xf({strategy:"referenceHidden",...Z})]}),[te,ne]=ta(M),se=_e(b);ae(()=>{z&&(se==null||se())},[z,se]);const P=(A=T.arrow)==null?void 0:A.x,O=(V=T.arrow)==null?void 0:V.y,D=((U=T.arrow)==null?void 0:U.centerOffset)!==0,[_,H]=l.useState();return ae(()=>{y&&H(window.getComputedStyle(y).zIndex)},[y]),d.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:z?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_,"--radix-popper-transform-origin":[(X=T.transformOrigin)==null?void 0:X.x,(ee=T.transformOrigin)==null?void 0:ee.y].join(" "),...((J=T.hide)==null?void 0:J.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(op,{scope:o,placedSide:te,onArrowChange:S,arrowX:P,arrowY:O,shouldHideArrow:D,children:d.jsx($.div,{"data-side":te,"data-align":ne,...v,ref:w,style:{...v.style,animation:z?void 0:"none"}})})})});Qi.displayName=bn;var Ji="PopperArrow",rp={top:"bottom",right:"left",bottom:"top",left:"right"},ea=l.forwardRef(function(t,o){const{__scopePopper:n,...r}=t,i=np(Ji,n),a=rp[i.placedSide];return d.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:d.jsx(ep,{...r,ref:o,style:{...r.style,display:"block"}})})});ea.displayName=Ji;function ip(e){return e!==null}var ap=e=>({name:"transformOrigin",options:e,fn(t){var h,y,x;const{placement:o,rects:n,middlewareData:r}=t,a=((h=r.arrow)==null?void 0:h.centerOffset)!==0,s=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,f]=ta(o),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=r.arrow)==null?void 0:y.x)??0)+s/2,m=(((x=r.arrow)==null?void 0:x.y)??0)+c/2;let b="",v="";return u==="bottom"?(b=a?p:`${g}px`,v=`${-c}px`):u==="top"?(b=a?p:`${g}px`,v=`${n.floating.height+c}px`):u==="right"?(b=`${-c}px`,v=a?p:`${m}px`):u==="left"&&(b=`${n.floating.width+c}px`,v=a?p:`${m}px`),{data:{x:b,y:v}}}});function ta(e){const[t,o="center"]=e.split("-");return[t,o]}var yn=Yi,so=Xi,wn=Qi,Cn=ea,lo="Popover",[oa]=de(lo,[ut]),Pt=ut(),[sp,$e]=oa(lo),na=e=>{const{__scopePopover:t,children:o,open:n,defaultOpen:r,onOpenChange:i,modal:a=!1}=e,s=Pt(t),c=l.useRef(null),[u,f]=l.useState(!1),[p,g]=fe({prop:n,defaultProp:r??!1,onChange:i,caller:lo});return d.jsx(yn,{...s,children:d.jsx(sp,{scope:t,contentId:ie(),triggerRef:c,open:p,onOpenChange:g,onOpenToggle:l.useCallback(()=>g(m=>!m),[g]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:a,children:o})})};na.displayName=lo;var ra="PopoverAnchor",ia=l.forwardRef((e,t)=>{const{__scopePopover:o,...n}=e,r=$e(ra,o),i=Pt(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=r;return l.useEffect(()=>(a(),()=>s()),[a,s]),d.jsx(so,{...i,...n,ref:t})});ia.displayName=ra;var aa="PopoverTrigger",sa=l.forwardRef((e,t)=>{const{__scopePopover:o,...n}=e,r=$e(aa,o),i=Pt(o),a=Q(t,r.triggerRef),s=d.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":fa(r.open),...n,ref:a,onClick:L(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?s:d.jsx(so,{asChild:!0,...i,children:s})});sa.displayName=aa;var Sn="PopoverPortal",[lp,cp]=oa(Sn,{forceMount:void 0}),la=e=>{const{__scopePopover:t,forceMount:o,children:n,container:r}=e,i=$e(Sn,t);return d.jsx(lp,{scope:t,forceMount:o,children:d.jsx(ge,{present:o||i.open,children:d.jsx(St,{asChild:!0,container:r,children:n})})})};la.displayName=Sn;var rt="PopoverContent",ca=l.forwardRef((e,t)=>{const o=cp(rt,e.__scopePopover),{forceMount:n=o.forceMount,...r}=e,i=$e(rt,e.__scopePopover);return d.jsx(ge,{present:n||i.open,children:i.modal?d.jsx(dp,{...r,ref:t}):d.jsx(fp,{...r,ref:t})})});ca.displayName=rt;var up=ot("PopoverContent.RemoveScroll"),dp=l.forwardRef((e,t)=>{const o=$e(rt,e.__scopePopover),n=l.useRef(null),r=Q(t,n),i=l.useRef(!1);return l.useEffect(()=>{const a=n.current;if(a)return sn(a)},[]),d.jsx(Jt,{as:up,allowPinchZoom:!0,children:d.jsx(ua,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:L(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=o.triggerRef.current)==null||s.focus()}),onPointerDownOutside:L(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,u=s.button===2||c;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:L(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),fp=l.forwardRef((e,t)=>{const o=$e(rt,e.__scopePopover),n=l.useRef(!1),r=l.useRef(!1);return d.jsx(ua,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(n.current||(s=o.triggerRef.current)==null||s.focus(),i.preventDefault()),n.current=!1,r.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=i.target;((u=o.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),ua=l.forwardRef((e,t)=>{const{__scopePopover:o,trapFocus:n,onOpenAutoFocus:r,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...p}=e,g=$e(rt,o),m=Pt(o);return an(),d.jsx(Xt,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:r,onUnmountAutoFocus:i,children:d.jsx(Ct,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),children:d.jsx(wn,{"data-state":fa(g.open),role:"dialog",id:g.contentId,...m,...p,ref:t,style:{...p.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)"}})})})}),da="PopoverClose",pp=l.forwardRef((e,t)=>{const{__scopePopover:o,...n}=e,r=$e(da,o);return d.jsx($.button,{type:"button",...n,ref:t,onClick:L(e.onClick,()=>r.onOpenChange(!1))})});pp.displayName=da;var vp="PopoverArrow",mp=l.forwardRef((e,t)=>{const{__scopePopover:o,...n}=e,r=Pt(o);return d.jsx(Cn,{...r,...n,ref:t})});mp.displayName=vp;function fa(e){return e?"open":"closed"}var pa=na,gp=ia,va=sa,hp=la,ma=ca;const xp=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z"})}),bp=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M459-381 314-526q-3-3-4.5-6.5T308-540q0-8 5.5-14t14.5-6h304q9 0 14.5 6t5.5 14q0 2-6 14L501-381q-5 5-10 7t-11 2q-6 0-11-2t-10-7Z"})}),ga=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z"})}),yp=({...e})=>d.jsx(pa,{"data-slot":"combobox",...e}),wp=({className:e,...t})=>d.jsx(Fd,{"data-slot":"combobox-group",className:I("volt-ui-p-0!",e),...t}),Cp=({className:e,...t})=>d.jsx(rn,{"data-slot":"combobox-group-label",className:I("volt-ui-text-gray volt-ui-font-semibold volt-ui-px-2 volt-ui-py-1.5 volt-ui-text-xs",e),...t}),Sp=({className:e,children:t,...o})=>d.jsx("div",{"data-slot":"combobox-value",className:I("volt-ui-text-gray-default volt-ui-w-full volt-ui-text-left volt-ui-flex-wrap volt-ui-flex volt-ui-gap-2 volt-ui-relative",e),...o,children:t}),Rp=l.forwardRef(({className:e,children:t,...o},n)=>{const{inputRef:r}=wt();return d.jsxs(va,{ref:i=>{r&&(r.current=i),typeof n=="function"?n(i):n&&(n.current=i)},"data-slot":"select-trigger",className:I("volt-ui-group volt-ui-data-placeholder:text-gray-a8 volt-ui-w-full volt-ui-flex volt-ui-items-center volt-ui-justify-between volt-ui-gap-2 volt-ui-rounded-lg volt-ui-bg-transparent volt-ui-text-sm volt-ui-whitespace-nowrap volt-ui-transition-[color,box-shadow] volt-ui-outline-none volt-ui-disabled:cursor-not-allowed volt-ui-disabled:opacity-50 volt-ui-*:data-[slot=select-value]:line-clamp-1 volt-ui-*:data-[slot=select-value]:flex volt-ui-*:data-[slot=select-value]:items-center volt-ui-*:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...o,children:[t,d.jsx(bp,{className:"volt-ui-transition-all volt-ui-size-6 volt-ui-group-data-[selected=open]:rotate-180 volt-ui-text-gray-light"})]})}),Ep=({className:e,children:t,...o})=>d.jsx(ma,{"data-slot":"combobox-content",className:I("volt-ui-bg-body volt-ui-gap-1 volt-ui-text-gray-default volt-ui-data-[selected=open]:animate-in volt-ui-data-[selected=closed]:animate-out volt-ui-data-[selected=closed]:fade-out-0 volt-ui-data-[selected=open]:fade-in-0 volt-ui-data-[selected=closed]:zoom-out-95 volt-ui-data-[selected=open]:zoom-in-95 volt-ui-data-[side=bottom]:slide-in-from-top-2 volt-ui-data-[side=left]:slide-in-from-right-2 volt-ui-data-[side=right]:slide-in-from-left-2 volt-ui-data-[side=top]:slide-in-from-bottom-2 volt-ui-relative volt-ui-z-50 volt-ui-origin-(--radix-select-content-transform-origin) volt-ui-overflow-x-hidden volt-ui-overflow-y-auto volt-ui-rounded-2xl volt-ui-border volt-ui-shadow-md","volt-ui-w-(--radix-popover-trigger-width) volt-ui-max-h-(--radix-popper-available-height)",e),...o,children:d.jsx(_d,{"data-slot":"combobox-command",className:"volt-ui-w-full volt-ui-rounded-none",children:t})}),Pp=({className:e,...t})=>d.jsx(Md,{"data-slot":"combobox-command-input",className:I("volt-ui-w-full volt-ui-placeholder:text-gray-a8",e),...t}),Tp=({className:e,...t})=>d.jsx(Dd,{"data-slot":"combobox-command-list",className:I("volt-ui-px-2 volt-ui-py-3",e),...t}),kp=({className:e,children:t,...o})=>d.jsx(Bd,{"data-slot":"combobox-item",className:I("volt-ui-pl-3 volt-ui-py-1.5 volt-ui-not-first:mt-0.5 volt-ui-text-gray-default [&_svg:not([class*='volt-ui-text-'])]:text-gray-default volt-ui-relative volt-ui-flex volt-ui-w-full volt-ui-cursor-default volt-ui-items-center volt-ui-gap-2 volt-ui-rounded-md! volt-ui-pr-8 volt-ui-text-sm volt-ui-outline-none volt-ui-select-none volt-ui-data-[disabled=true]:pointer-events-none volt-ui-data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 volt-ui-*:[span]:last:flex volt-ui-*:[span]:last:items-center volt-ui-*:[span]:last:gap-2","volt-ui-hover:bg-accent-a3 volt-ui-focus:bg-accent-a3 volt-ui-data-[selected=true]:bg-accent-a3",e),...o,children:t}),Ap=({className:e,...t})=>d.jsx(Ld,{"data-slot":"volt-ui-combobox-empty",className:I("volt-ui-py-6 volt-ui-text-center volt-ui-text-gray-default volt-ui-text-sm",e),...t}),Ip=({className:e,...t})=>d.jsx($d,{"data-slot":"volt-ui-select-separator",className:I("volt-ui-bg-gray-soft volt-ui-pointer-events-none volt-ui--mx-1 volt-ui-my-2 volt-ui-h-px",e),...t}),Np=({className:e})=>d.jsx("span",{className:"volt-ui-absolute volt-ui-right-2 volt-ui-flex volt-ui-size-4 volt-ui-items-center volt-ui-justify-center",children:d.jsx(xp,{className:I("volt-ui-size-4 volt-ui-text-gray-default",e)})}),jp=({className:e,...t})=>d.jsx(qd,{"data-slot":"volt-ui-combobox-command-loading",className:I("volt-ui-text-gray-light volt-ui-px-3 volt-ui-py-2",e),...t}),Op=({className:e,onClick:t,...o})=>d.jsx("span",{className:I("volt-ui-p-0.5! volt-ui-min-h-auto volt-ui-absolute volt-ui-right-11 volt-ui-cursor-pointer",nn({variant:"primary",size:"xs"}),e),role:"button",tabIndex:0,onMouseDown:n=>{var r;n.preventDefault(),(r=o.onMouseDown)==null||r.call(o,n)},onClick:n=>{n.preventDefault(),n.stopPropagation(),t==null||t(n)},...o,children:d.jsx(ga,{className:"volt-ui-transition-all volt-ui-text-accent-contrast volt-ui-size-4 volt-ui-group-data-[selected=open]:rotate-180"})}),_p=({className:e,...t})=>d.jsx("span",{className:I("volt-ui-text-gray-a8",e),...t}),Mp=({className:e,onClick:t,...o})=>d.jsx("span",{role:"button",tabIndex:0,className:I("volt-ui-cursor-pointer volt-ui-hover:opacity-70 volt-ui-text-current volt-ui-rounded-full volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-offset-1 volt-ui-focus-visible:outline-accent-a8",e),onMouseDown:n=>{var r;n.preventDefault(),(r=o.onMouseDown)==null||r.call(o,n)},onClick:n=>{n.preventDefault(),n.stopPropagation(),t==null||t(n)},...o,children:d.jsx(ga,{className:"volt-ui-size-4 volt-ui-text-current"})});function hr(e,[t,o]){return Math.min(o,Math.max(t,e))}function Rn(e){const t=e+"CollectionProvider",[o,n]=de(t),[r,i]=o(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:h,children:y}=v,x=oe.useRef(null),w=oe.useRef(new Map).current;return d.jsx(r,{scope:h,itemMap:w,collectionRef:x,children:y})};a.displayName=t;const s=e+"CollectionSlot",c=ot(s),u=oe.forwardRef((v,h)=>{const{scope:y,children:x}=v,w=i(s,y),C=Q(h,w.collectionRef);return d.jsx(c,{ref:C,children:x})});u.displayName=s;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=ot(f),m=oe.forwardRef((v,h)=>{const{scope:y,children:x,...w}=v,C=oe.useRef(null),S=Q(h,C),k=i(f,y);return oe.useEffect(()=>(k.itemMap.set(C,{ref:C,...w}),()=>void k.itemMap.delete(C))),d.jsx(g,{[p]:"",ref:S,children:x})});m.displayName=f;function b(v){const h=i(e+"CollectionConsumer",v);return oe.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((k,E)=>w.indexOf(k.ref.current)-w.indexOf(E.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},b,n]}var Dp=l.createContext(void 0);function co(e){const t=l.useContext(Dp);return e||t||"ltr"}function uo(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ha=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"}),Lp="VisuallyHidden",xa=l.forwardRef((e,t)=>d.jsx($.span,{...e,ref:t,style:{...ha,...e.style}}));xa.displayName=Lp;var Fp=xa,$p=[" ","Enter","ArrowUp","ArrowDown"],Bp=[" ","Enter"],He="Select",[fo,po,qp]=Rn(He),[dt]=de(He,[qp,ut]),vo=ut(),[zp,Be]=dt(He),[Vp,Wp]=dt(He),ba=e=>{const{__scopeSelect:t,children:o,open:n,defaultOpen:r,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:p,disabled:g,required:m,form:b}=e,v=vo(t),[h,y]=l.useState(null),[x,w]=l.useState(null),[C,S]=l.useState(!1),k=co(u),[E,R]=fe({prop:n,defaultProp:r??!1,onChange:i,caller:He}),[F,B]=fe({prop:a,defaultProp:s,onChange:c,caller:He}),K=l.useRef(null),Y=h?b||!!h.closest("form"):!0,[Z,q]=l.useState(new Set),G=Array.from(Z).map(M=>M.props.value).join(";");return d.jsx(yn,{...v,children:d.jsxs(zp,{required:m,scope:t,trigger:h,onTriggerChange:y,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:C,onValueNodeHasChildrenChange:S,contentId:ie(),value:F,onValueChange:B,open:E,onOpenChange:R,dir:k,triggerPointerDownPosRef:K,disabled:g,children:[d.jsx(fo.Provider,{scope:t,children:d.jsx(Vp,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(M=>{q(z=>new Set(z).add(M))},[]),onNativeOptionRemove:l.useCallback(M=>{q(z=>{const T=new Set(z);return T.delete(M),T})},[]),children:o})}),Y?d.jsxs(Wa,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:F,onChange:M=>B(M.target.value),disabled:g,form:b,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(Z)]},G):null]})})};ba.displayName=He;var ya="SelectTrigger",wa=l.forwardRef((e,t)=>{const{__scopeSelect:o,disabled:n=!1,...r}=e,i=vo(o),a=Be(ya,o),s=a.disabled||n,c=Q(t,a.onTriggerChange),u=po(o),f=l.useRef("touch"),[p,g,m]=Ha(v=>{const h=u().filter(w=>!w.disabled),y=h.find(w=>w.value===a.value),x=Ua(h,v,y);x!==void 0&&a.onValueChange(x.value)}),b=v=>{s||(a.onOpenChange(!0),m()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return d.jsx(so,{asChild:!0,...i,children:d.jsx($.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Ga(a.value)?"":void 0,...r,ref:c,onClick:L(r.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&b(v)}),onPointerDown:L(r.onPointerDown,v=>{f.current=v.pointerType;const h=v.target;h.hasPointerCapture(v.pointerId)&&h.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(b(v),v.preventDefault())}),onKeyDown:L(r.onKeyDown,v=>{const h=p.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&g(v.key),!(h&&v.key===" ")&&$p.includes(v.key)&&(b(),v.preventDefault())})})})});wa.displayName=ya;var Ca="SelectValue",Sa=l.forwardRef((e,t)=>{const{__scopeSelect:o,className:n,style:r,children:i,placeholder:a="",...s}=e,c=Be(Ca,o),{onValueNodeHasChildrenChange:u}=c,f=i!==void 0,p=Q(t,c.onValueNodeChange);return ae(()=>{u(f)},[u,f]),d.jsx($.span,{...s,ref:p,style:{pointerEvents:"none"},children:Ga(c.value)?d.jsx(d.Fragment,{children:a}):i})});Sa.displayName=Ca;var Gp="SelectIcon",Ra=l.forwardRef((e,t)=>{const{__scopeSelect:o,children:n,...r}=e;return d.jsx($.span,{"aria-hidden":!0,...r,ref:t,children:n||"▼"})});Ra.displayName=Gp;var Hp="SelectPortal",Ea=e=>d.jsx(St,{asChild:!0,...e});Ea.displayName=Hp;var Ue="SelectContent",Pa=l.forwardRef((e,t)=>{const o=Be(Ue,e.__scopeSelect),[n,r]=l.useState();if(ae(()=>{r(new DocumentFragment)},[]),!o.open){const i=n;return i?Zt.createPortal(d.jsx(Ta,{scope:e.__scopeSelect,children:d.jsx(fo.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),i):null}return d.jsx(ka,{...e,ref:t})});Pa.displayName=Ue;var pe=10,[Ta,qe]=dt(Ue),Up="SelectContentImpl",Kp=ot("SelectContent.RemoveScroll"),ka=l.forwardRef((e,t)=>{const{__scopeSelect:o,position:n="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:b,hideWhenDetached:v,avoidCollisions:h,...y}=e,x=Be(Ue,o),[w,C]=l.useState(null),[S,k]=l.useState(null),E=Q(t,A=>C(A)),[R,F]=l.useState(null),[B,K]=l.useState(null),Y=po(o),[Z,q]=l.useState(!1),G=l.useRef(!1);l.useEffect(()=>{if(w)return sn(w)},[w]),an();const M=l.useCallback(A=>{const[V,...U]=Y().map(J=>J.ref.current),[X]=U.slice(-1),ee=document.activeElement;for(const J of A)if(J===ee||(J==null||J.scrollIntoView({block:"nearest"}),J===V&&S&&(S.scrollTop=0),J===X&&S&&(S.scrollTop=S.scrollHeight),J==null||J.focus(),document.activeElement!==ee))return},[Y,S]),z=l.useCallback(()=>M([R,w]),[M,R,w]);l.useEffect(()=>{Z&&z()},[Z,z]);const{onOpenChange:T,triggerPointerDownPosRef:te}=x;l.useEffect(()=>{if(w){let A={x:0,y:0};const V=X=>{var ee,J;A={x:Math.abs(Math.round(X.pageX)-(((ee=te.current)==null?void 0:ee.x)??0)),y:Math.abs(Math.round(X.pageY)-(((J=te.current)==null?void 0:J.y)??0))}},U=X=>{A.x<=10&&A.y<=10?X.preventDefault():w.contains(X.target)||T(!1),document.removeEventListener("pointermove",V),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",U,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",U,{capture:!0})}}},[w,T,te]),l.useEffect(()=>{const A=()=>T(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[T]);const[ne,se]=Ha(A=>{const V=Y().filter(ee=>!ee.disabled),U=V.find(ee=>ee.ref.current===document.activeElement),X=Ua(V,A,U);X&&setTimeout(()=>X.ref.current.focus())}),P=l.useCallback((A,V,U)=>{const X=!G.current&&!U;(x.value!==void 0&&x.value===V||X)&&(F(A),X&&(G.current=!0))},[x.value]),O=l.useCallback(()=>w==null?void 0:w.focus(),[w]),D=l.useCallback((A,V,U)=>{const X=!G.current&&!U;(x.value!==void 0&&x.value===V||X)&&K(A)},[x.value]),_=n==="popper"?Ho:Aa,H=_===Ho?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:b,hideWhenDetached:v,avoidCollisions:h}:{};return d.jsx(Ta,{scope:o,content:w,viewport:S,onViewportChange:k,itemRefCallback:P,selectedItem:R,onItemLeave:O,itemTextRefCallback:D,focusSelectedItem:z,selectedItemText:B,position:n,isPositioned:Z,searchRef:ne,children:d.jsx(Jt,{as:Kp,allowPinchZoom:!0,children:d.jsx(Xt,{asChild:!0,trapped:x.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:L(r,A=>{var V;(V=x.trigger)==null||V.focus({preventScroll:!0}),A.preventDefault()}),children:d.jsx(Ct,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:d.jsx(_,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:A=>A.preventDefault(),...y,...H,onPlaced:()=>q(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:L(y.onKeyDown,A=>{const V=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!V&&A.key.length===1&&se(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let X=Y().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(A.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const ee=A.target,J=X.indexOf(ee);X=X.slice(J+1)}setTimeout(()=>M(X)),A.preventDefault()}})})})})})})});ka.displayName=Up;var Yp="SelectItemAlignedPosition",Aa=l.forwardRef((e,t)=>{const{__scopeSelect:o,onPlaced:n,...r}=e,i=Be(Ue,o),a=qe(Ue,o),[s,c]=l.useState(null),[u,f]=l.useState(null),p=Q(t,E=>f(E)),g=po(o),m=l.useRef(!1),b=l.useRef(!0),{viewport:v,selectedItem:h,selectedItemText:y,focusSelectedItem:x}=a,w=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&v&&h&&y){const E=i.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),F=i.valueNode.getBoundingClientRect(),B=y.getBoundingClientRect();if(i.dir!=="rtl"){const ee=B.left-R.left,J=F.left-ee,le=E.left-J,be=E.width+le,ft=Math.max(be,R.width),pt=window.innerWidth-pe,vt=hr(J,[pe,Math.max(pe,pt-ft)]);s.style.minWidth=be+"px",s.style.left=vt+"px"}else{const ee=R.right-B.right,J=window.innerWidth-F.right-ee,le=window.innerWidth-E.right-J,be=E.width+le,ft=Math.max(be,R.width),pt=window.innerWidth-pe,vt=hr(J,[pe,Math.max(pe,pt-ft)]);s.style.minWidth=be+"px",s.style.right=vt+"px"}const K=g(),Y=window.innerHeight-pe*2,Z=v.scrollHeight,q=window.getComputedStyle(u),G=parseInt(q.borderTopWidth,10),M=parseInt(q.paddingTop,10),z=parseInt(q.borderBottomWidth,10),T=parseInt(q.paddingBottom,10),te=G+M+Z+T+z,ne=Math.min(h.offsetHeight*5,te),se=window.getComputedStyle(v),P=parseInt(se.paddingTop,10),O=parseInt(se.paddingBottom,10),D=E.top+E.height/2-pe,_=Y-D,H=h.offsetHeight/2,A=h.offsetTop+H,V=G+M+A,U=te-V;if(V<=D){const ee=K.length>0&&h===K[K.length-1].ref.current;s.style.bottom="0px";const J=u.clientHeight-v.offsetTop-v.offsetHeight,le=Math.max(_,H+(ee?O:0)+J+z),be=V+le;s.style.height=be+"px"}else{const ee=K.length>0&&h===K[0].ref.current;s.style.top="0px";const le=Math.max(D,G+v.offsetTop+(ee?P:0)+H)+U;s.style.height=le+"px",v.scrollTop=V-D+v.offsetTop}s.style.margin=`${pe}px 0`,s.style.minHeight=ne+"px",s.style.maxHeight=Y+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[g,i.trigger,i.valueNode,s,u,v,h,y,i.dir,n]);ae(()=>w(),[w]);const[C,S]=l.useState();ae(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const k=l.useCallback(E=>{E&&b.current===!0&&(w(),x==null||x(),b.current=!1)},[w,x]);return d.jsx(Xp,{scope:o,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:k,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:d.jsx($.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Aa.displayName=Yp;var Zp="SelectPopperPosition",Ho=l.forwardRef((e,t)=>{const{__scopeSelect:o,align:n="start",collisionPadding:r=pe,...i}=e,a=vo(o);return d.jsx(wn,{...a,...i,ref:t,align:n,collisionPadding:r,style:{boxSizing:"border-box",...i.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)"}})});Ho.displayName=Zp;var[Xp,En]=dt(Ue,{}),Uo="SelectViewport",Ia=l.forwardRef((e,t)=>{const{__scopeSelect:o,nonce:n,...r}=e,i=qe(Uo,o),a=En(Uo,o),s=Q(t,i.onViewportChange),c=l.useRef(0);return d.jsxs(d.Fragment,{children:[d.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:n}),d.jsx(fo.Slot,{scope:o,children:d.jsx($.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:L(r.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=a;if(g!=null&&g.current&&p){const m=Math.abs(c.current-f.scrollTop);if(m>0){const b=window.innerHeight-pe*2,v=parseFloat(p.style.minHeight),h=parseFloat(p.style.height),y=Math.max(v,h);if(y<b){const x=y+m,w=Math.min(b,x),C=x-w;p.style.height=w+"px",p.style.bottom==="0px"&&(f.scrollTop=C>0?C:0,p.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});Ia.displayName=Uo;var Na="SelectGroup",[Qp,Jp]=dt(Na),ja=l.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=ie();return d.jsx(Qp,{scope:o,id:r,children:d.jsx($.div,{role:"group","aria-labelledby":r,...n,ref:t})})});ja.displayName=Na;var Oa="SelectLabel",_a=l.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=Jp(Oa,o);return d.jsx($.div,{id:r.id,...n,ref:t})});_a.displayName=Oa;var Kt="SelectItem",[ev,Ma]=dt(Kt),Da=l.forwardRef((e,t)=>{const{__scopeSelect:o,value:n,disabled:r=!1,textValue:i,...a}=e,s=Be(Kt,o),c=qe(Kt,o),u=s.value===n,[f,p]=l.useState(i??""),[g,m]=l.useState(!1),b=Q(t,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,n,r)}),v=ie(),h=l.useRef("touch"),y=()=>{r||(s.onValueChange(n),s.onOpenChange(!1))};if(n==="")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 d.jsx(ev,{scope:o,value:n,disabled:r,textId:v,isSelected:u,onItemTextChange:l.useCallback(x=>{p(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:d.jsx(fo.ItemSlot,{scope:o,value:n,disabled:r,textValue:f,children:d.jsx($.div,{role:"option","aria-labelledby":v,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:b,onFocus:L(a.onFocus,()=>m(!0)),onBlur:L(a.onBlur,()=>m(!1)),onClick:L(a.onClick,()=>{h.current!=="mouse"&&y()}),onPointerUp:L(a.onPointerUp,()=>{h.current==="mouse"&&y()}),onPointerDown:L(a.onPointerDown,x=>{h.current=x.pointerType}),onPointerMove:L(a.onPointerMove,x=>{var w;h.current=x.pointerType,r?(w=c.onItemLeave)==null||w.call(c):h.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:L(a.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:L(a.onKeyDown,x=>{var C;((C=c.searchRef)==null?void 0:C.current)!==""&&x.key===" "||(Bp.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});Da.displayName=Kt;var ht="SelectItemText",La=l.forwardRef((e,t)=>{const{__scopeSelect:o,className:n,style:r,...i}=e,a=Be(ht,o),s=qe(ht,o),c=Ma(ht,o),u=Wp(ht,o),[f,p]=l.useState(null),g=Q(t,y=>p(y),c.onItemTextChange,y=>{var x;return(x=s.itemTextRefCallback)==null?void 0:x.call(s,y,c.value,c.disabled)}),m=f==null?void 0:f.textContent,b=l.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:h}=u;return ae(()=>(v(b),()=>h(b)),[v,h,b]),d.jsxs(d.Fragment,{children:[d.jsx($.span,{id:c.textId,...i,ref:g}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Zt.createPortal(i.children,a.valueNode):null]})});La.displayName=ht;var Fa="SelectItemIndicator",$a=l.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e;return Ma(Fa,o).isSelected?d.jsx($.span,{"aria-hidden":!0,...n,ref:t}):null});$a.displayName=Fa;var Ko="SelectScrollUpButton",Ba=l.forwardRef((e,t)=>{const o=qe(Ko,e.__scopeSelect),n=En(Ko,e.__scopeSelect),[r,i]=l.useState(!1),a=Q(t,n.onScrollButtonChange);return ae(()=>{if(o.viewport&&o.isPositioned){let s=function(){const u=c.scrollTop>0;i(u)};const c=o.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[o.viewport,o.isPositioned]),r?d.jsx(za,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=o;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});Ba.displayName=Ko;var Yo="SelectScrollDownButton",qa=l.forwardRef((e,t)=>{const o=qe(Yo,e.__scopeSelect),n=En(Yo,e.__scopeSelect),[r,i]=l.useState(!1),a=Q(t,n.onScrollButtonChange);return ae(()=>{if(o.viewport&&o.isPositioned){let s=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;i(f)};const c=o.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[o.viewport,o.isPositioned]),r?d.jsx(za,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=o;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});qa.displayName=Yo;var za=l.forwardRef((e,t)=>{const{__scopeSelect:o,onAutoScroll:n,...r}=e,i=qe("SelectScrollButton",o),a=l.useRef(null),s=po(o),c=l.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),ae(()=>{var f;const u=s().find(p=>p.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[s]),d.jsx($.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:L(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:L(r.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:L(r.onPointerLeave,()=>{c()})})}),tv="SelectSeparator",Va=l.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e;return d.jsx($.div,{"aria-hidden":!0,...n,ref:t})});Va.displayName=tv;var Zo="SelectArrow",ov=l.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=vo(o),i=Be(Zo,o),a=qe(Zo,o);return i.open&&a.position==="popper"?d.jsx(Cn,{...r,...n,ref:t}):null});ov.displayName=Zo;var nv="SelectBubbleInput",Wa=l.forwardRef(({__scopeSelect:e,value:t,...o},n)=>{const r=l.useRef(null),i=Q(n,r),a=uo(t);return l.useEffect(()=>{const s=r.current;if(!s)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&f){const p=new Event("change",{bubbles:!0});f.call(s,t),s.dispatchEvent(p)}},[a,t]),d.jsx($.select,{...o,style:{...ha,...o.style},ref:i,defaultValue:t})});Wa.displayName=nv;function Ga(e){return e===""||e===void 0}function Ha(e){const t=_e(e),o=l.useRef(""),n=l.useRef(0),r=l.useCallback(a=>{const s=o.current+a;t(s),function c(u){o.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),i=l.useCallback(()=>{o.current="",window.clearTimeout(n.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(n.current),[]),[o,r,i]}function Ua(e,t,o){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=o?e.indexOf(o):-1;let a=rv(e,Math.max(i,0));r.length===1&&(a=a.filter(u=>u!==o));const c=a.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return c!==o?c:void 0}function rv(e,t){return e.map((o,n)=>e[(t+n)%e.length])}var iv=ba,av=wa,sv=Sa,lv=Ra,cv=Ea,uv=Pa,dv=Ia,fv=ja,pv=_a,vv=Da,mv=La,gv=$a,hv=Ba,xv=qa,bv=Va;const yv=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z"})}),wv=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M459-381 314-526q-3-3-4.5-6.5T308-540q0-8 5.5-14t14.5-6h304q9 0 14.5 6t5.5 14q0 2-6 14L501-381q-5 5-10 7t-11 2q-6 0-11-2t-10-7Z"})}),Ka=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M480-528 324-372q-11 11-28 11t-28-11q-11-11-11-28t11-28l184-184q12-12 28-12t28 12l184 184q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-528Z"})}),Cv=({...e})=>d.jsx(iv,{"data-slot":"select",...e}),Sv=({...e})=>d.jsx(fv,{"data-slot":"select-group",...e}),Rv=({className:e,...t})=>d.jsx(sv,{"data-slot":"select-value",className:I("volt-ui-whitespace-break-spaces volt-ui-wrap-break-word",e),...t}),Ya=l.forwardRef(({className:e,children:t,...o},n)=>{const{inputRef:r}=wt();return d.jsxs(av,{ref:i=>{r&&(r.current=i),typeof n=="function"?n(i):n&&(n.current=i)},"data-slot":"select-trigger",className:I("volt-ui-group volt-ui-data-placeholder:text-gray-a8 volt-ui-w-full volt-ui-flex volt-ui-items-center volt-ui-justify-between volt-ui-gap-2 volt-ui-rounded-lg volt-ui-bg-transparent volt-ui-text-sm volt-ui-whitespace-nowrap volt-ui-transition-[color,box-shadow] volt-ui-outline-none volt-ui-disabled:cursor-not-allowed volt-ui-disabled:opacity-50 volt-ui-*:data-[slot=select-value]:line-clamp-1 volt-ui-*:data-[slot=select-value]:flex volt-ui-*:data-[slot=select-value]:items-center volt-ui-*:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...o,children:[t,d.jsx(lv,{asChild:!0,children:d.jsx(wv,{className:"volt-ui-transition-all volt-ui-size-6 volt-ui-group-data-[state=open]:rotate-180 volt-ui-text-gray-light"})})]})});Ya.displayName="SelectTrigger";const Ev=({className:e,children:t,position:o="popper",align:n="center",...r})=>d.jsx(cv,{children:d.jsxs(uv,{"data-slot":"select-content",className:I("volt-ui-bg-body volt-ui-px-2 volt-ui-py-3 volt-ui-gap-1 volt-ui-text-gray-default volt-ui-data-[state=open]:animate-in volt-ui-data-[state=closed]:animate-out volt-ui-data-[state=closed]:fade-out-0 volt-ui-data-[state=open]:fade-in-0 volt-ui-data-[state=closed]:zoom-out-95 volt-ui-data-[state=open]:zoom-in-95 volt-ui-data-[side=bottom]:slide-in-from-top-2 volt-ui-data-[side=left]:slide-in-from-right-2 volt-ui-data-[side=right]:slide-in-from-left-2 volt-ui-data-[side=top]:slide-in-from-bottom-2 volt-ui-relative volt-ui-z-50 volt-ui-origin-(--radix-select-content-transform-origin) volt-ui-overflow-x-hidden volt-ui-overflow-y-auto volt-ui-rounded-2xl volt-ui-border volt-ui-shadow-md","volt-ui-max-h-(--radix-popper-available-height)",{"volt-ui-data-[side=bottom]:translate-y-1 volt-ui-data-[side=left]:-translate-x-1 volt-ui-data-[side=right]:translate-x-1 volt-ui-data-[side=top]:-translate-y-1":o==="popper"},e),position:o,align:n,...r,children:[d.jsx(Za,{}),d.jsx(dv,{className:I({"volt-ui-h-(--radix-select-trigger-height) volt-ui-w-full volt-ui-min-w-(--radix-select-trigger-width) volt-ui-scroll-my-1":o==="popper"}),children:t}),d.jsx(Xa,{})]})}),Pv=({className:e,...t})=>d.jsx(pv,{"data-slot":"select-label",className:I("volt-ui-text-gray volt-ui-font-semibold volt-ui-px-2 volt-ui-py-1.5 volt-ui-text-xs",e),...t}),Tv=({className:e,children:t,...o})=>d.jsxs(vv,{"data-slot":"select-item",className:I("volt-ui-pl-3 volt-ui-py-1.5 volt-ui-not-first:mt-0.5 volt-ui-text-gray-default [&_svg:not([class*='volt-ui-text-'])]:text-gray-light volt-ui-relative volt-ui-flex volt-ui-w-full volt-ui-cursor-default volt-ui-items-center volt-ui-gap-2 volt-ui-rounded-md volt-ui-pr-8 volt-ui-text-sm volt-ui-outline-none volt-ui-select-none volt-ui-data-disabled:pointer-events-none volt-ui-data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 volt-ui-*:[span]:last:flex volt-ui-*:[span]:last:items-center volt-ui-*:[span]:last:gap-2","volt-ui-focus:bg-accent-a3 volt-ui-data-[state=checked]:bg-accent-a3",e),...o,children:[d.jsx("span",{className:"volt-ui-absolute volt-ui-right-2 volt-ui-flex volt-ui-size-4 volt-ui-items-center volt-ui-justify-center",children:d.jsx(gv,{children:d.jsx(yv,{className:"volt-ui-size-4 volt-ui-text-gray-light"})})}),d.jsx(mv,{children:t})]}),kv=({className:e,...t})=>d.jsx(bv,{"data-slot":"volt-ui-select-separator",className:I("volt-ui-bg-gray-soft volt-ui-pointer-events-none volt-ui--mx-1 volt-ui-my-1 volt-ui-h-px",e),...t}),Za=({className:e,...t})=>d.jsx(hv,{"data-slot":"volt-ui-select-scroll-up-button",className:I("volt-ui-flex volt-ui-cursor-default volt-ui-items-center volt-ui-justify-center volt-ui-pb-1",e),...t,children:d.jsx(Ka,{className:"volt-ui-size-6"})}),Xa=({className:e,...t})=>d.jsx(xv,{"data-slot":"volt-ui-select-scroll-down-button",className:I("volt-ui-flex volt-ui-cursor-default volt-ui-items-center volt-ui-justify-center volt-ui-pt-1",e),...t,children:d.jsx(Ka,{className:"volt-ui-size-6 volt-ui-rotate-180"})});var[mo]=de("Tooltip",[ut]),go=ut(),Qa="TooltipProvider",Av=700,Xo="tooltip.open",[Iv,Pn]=mo(Qa),Ja=e=>{const{__scopeTooltip:t,delayDuration:o=Av,skipDelayDuration:n=300,disableHoverableContent:r=!1,children:i}=e,a=l.useRef(!0),s=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),d.jsx(Iv,{scope:t,isOpenDelayedRef:a,delayDuration:o,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:l.useCallback(u=>{s.current=u},[]),disableHoverableContent:r,children:i})};Ja.displayName=Qa;var yt="Tooltip",[Nv,Tt]=mo(yt),es=e=>{const{__scopeTooltip:t,children:o,open:n,defaultOpen:r,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=Pn(yt,e.__scopeTooltip),u=go(t),[f,p]=l.useState(null),g=ie(),m=l.useRef(0),b=a??c.disableHoverableContent,v=s??c.delayDuration,h=l.useRef(!1),[y,x]=fe({prop:n,defaultProp:r??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Xo))):c.onClose(),i==null||i(E)},caller:yt}),w=l.useMemo(()=>y?h.current?"delayed-open":"instant-open":"closed",[y]),C=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,h.current=!1,x(!0)},[x]),S=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),k=l.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{h.current=!0,x(!0),m.current=0},v)},[v,x]);return l.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),d.jsx(yn,{...u,children:d.jsx(Nv,{scope:t,contentId:g,open:y,stateAttribute:w,trigger:f,onTriggerChange:p,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?k():C()},[c.isOpenDelayedRef,k,C]),onTriggerLeave:l.useCallback(()=>{b?S():(window.clearTimeout(m.current),m.current=0)},[S,b]),onOpen:C,onClose:S,disableHoverableContent:b,children:o})})};es.displayName=yt;var Qo="TooltipTrigger",ts=l.forwardRef((e,t)=>{const{__scopeTooltip:o,...n}=e,r=Tt(Qo,o),i=Pn(Qo,o),a=go(o),s=l.useRef(null),c=Q(t,s,r.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),p=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),d.jsx(so,{asChild:!0,...a,children:d.jsx($.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...n,ref:c,onPointerMove:L(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:L(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:L(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:L(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:L(e.onBlur,r.onClose),onClick:L(e.onClick,r.onClose)})})});ts.displayName=Qo;var Tn="TooltipPortal",[jv,Ov]=mo(Tn,{forceMount:void 0}),os=e=>{const{__scopeTooltip:t,forceMount:o,children:n,container:r}=e,i=Tt(Tn,t);return d.jsx(jv,{scope:t,forceMount:o,children:d.jsx(ge,{present:o||i.open,children:d.jsx(St,{asChild:!0,container:r,children:n})})})};os.displayName=Tn;var it="TooltipContent",ns=l.forwardRef((e,t)=>{const o=Ov(it,e.__scopeTooltip),{forceMount:n=o.forceMount,side:r="top",...i}=e,a=Tt(it,e.__scopeTooltip);return d.jsx(ge,{present:n||a.open,children:a.disableHoverableContent?d.jsx(rs,{side:r,...i,ref:t}):d.jsx(_v,{side:r,...i,ref:t})})}),_v=l.forwardRef((e,t)=>{const o=Tt(it,e.__scopeTooltip),n=Pn(it,e.__scopeTooltip),r=l.useRef(null),i=Q(t,r),[a,s]=l.useState(null),{trigger:c,onClose:u}=o,f=r.current,{onPointerInTransitChange:p}=n,g=l.useCallback(()=>{s(null),p(!1)},[p]),m=l.useCallback((b,v)=>{const h=b.currentTarget,y={x:b.clientX,y:b.clientY},x=Fv(y,h.getBoundingClientRect()),w=$v(y,x),C=Bv(v.getBoundingClientRect()),S=zv([...w,...C]);s(S),p(!0)},[p]);return l.useEffect(()=>()=>g(),[g]),l.useEffect(()=>{if(c&&f){const b=h=>m(h,f),v=h=>m(h,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",v)}}},[c,f,m,g]),l.useEffect(()=>{if(a){const b=v=>{const h=v.target,y={x:v.clientX,y:v.clientY},x=(c==null?void 0:c.contains(h))||(f==null?void 0:f.contains(h)),w=!qv(y,a);x?g():w&&(g(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,a,u,g]),d.jsx(rs,{...e,ref:i})}),[Mv,Dv]=mo(yt,{isInside:!1}),Lv=qc("TooltipContent"),rs=l.forwardRef((e,t)=>{const{__scopeTooltip:o,children:n,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,c=Tt(it,o),u=go(o),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(Xo,f),()=>document.removeEventListener(Xo,f)),[f]),l.useEffect(()=>{if(c.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),d.jsx(Ct,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:d.jsxs(wn,{"data-state":c.stateAttribute,...u,...s,ref:t,style:{...s.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:[d.jsx(Lv,{children:n}),d.jsx(Mv,{scope:o,isInside:!0,children:d.jsx(Fp,{id:c.contentId,role:"tooltip",children:r||n})})]})})});ns.displayName=it;var is="TooltipArrow",as=l.forwardRef((e,t)=>{const{__scopeTooltip:o,...n}=e,r=go(o);return Dv(is,o).isInside?null:d.jsx(Cn,{...r,...n,ref:t})});as.displayName=is;function Fv(e,t){const o=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(o,n,r,i)){case i:return"left";case r:return"right";case o:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function $v(e,t,o=5){const n=[];switch(t){case"top":n.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":n.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":n.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":n.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return n}function Bv(e){const{top:t,right:o,bottom:n,left:r}=e;return[{x:r,y:t},{x:o,y:t},{x:o,y:n},{x:r,y:n}]}function qv(e,t){const{x:o,y:n}=e;let r=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],c=t[a],u=s.x,f=s.y,p=c.x,g=c.y;f>n!=g>n&&o<(p-u)*(n-f)/(g-f)+u&&(r=!r)}return r}function zv(e){const t=e.slice();return t.sort((o,n)=>o.x<n.x?-1:o.x>n.x?1:o.y<n.y?-1:o.y>n.y?1:0),Vv(t)}function Vv(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(r.y-a.y)>=(i.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const o=[];for(let n=e.length-1;n>=0;n--){const r=e[n];for(;o.length>=2;){const i=o[o.length-1],a=o[o.length-2];if((i.x-a.x)*(r.y-a.y)>=(i.y-a.y)*(r.x-a.x))o.pop();else break}o.push(r)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var Wv=Ja,Gv=es,Hv=ts,Uv=os,Kv=ns,Yv=as;const ss=({...e})=>d.jsx(Wv,{"data-slot":"tooltip-provider",...e}),Zv=({...e})=>d.jsx(ss,{children:d.jsx(Gv,{"data-slot":"tooltip",...e})}),Xv=({...e})=>d.jsx(Hv,{"data-slot":"tooltip-trigger",...e}),Qv=({className:e,sideOffset:t=2,hideArrow:o=!1,children:n,...r})=>d.jsx(Uv,{children:d.jsxs(Kv,{"data-slot":"tooltip-content",sideOffset:t,className:I("volt-ui-bg-gray-12 volt-ui-text-gray-1 volt-ui-animate-in volt-ui-fade-in-0 volt-ui-zoom-in-95 volt-ui-data-[state=closed]:animate-out volt-ui-data-[state=closed]:fade-out-0 volt-ui-data-[state=closed]:zoom-out-95 volt-ui-data-[side=bottom]:slide-in-from-top-2 volt-ui-data-[side=left]:slide-in-from-right-2 volt-ui-data-[side=right]:slide-in-from-left-2 volt-ui-data-[side=top]:slide-in-from-bottom-2 volt-ui-z-50 volt-ui-w-fit volt-ui-origin-(--radix-tooltip-content-transform-origin) volt-ui-rounded-lg volt-ui-p-2 volt-ui-text-xs volt-ui-text-balance",e),...r,children:[n,!o&&d.jsx(Yv,{className:"volt-ui-bg-gray-12 volt-ui-fill-gray-12 volt-ui-z-50 volt-ui-size-3 volt-ui-translate-y-[calc(-50%-2px)] volt-ui-rotate-45 volt-ui-rounded-[2px]"})]})});var ho="Switch",[Jv]=de(ho),[em,tm]=Jv(ho),ls=l.forwardRef((e,t)=>{const{__scopeSwitch:o,name:n,checked:r,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,form:f,...p}=e,[g,m]=l.useState(null),b=Q(t,w=>m(w)),v=l.useRef(!1),h=g?f||!!g.closest("form"):!0,[y,x]=fe({prop:r,defaultProp:i??!1,onChange:u,caller:ho});return d.jsxs(em,{scope:o,checked:y,disabled:s,children:[d.jsx($.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":fs(y),"data-disabled":s?"":void 0,disabled:s,value:c,...p,ref:b,onClick:L(e.onClick,w=>{x(C=>!C),h&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})}),h&&d.jsx(ds,{control:g,bubbles:!v.current,name:n,value:c,checked:y,required:a,disabled:s,form:f,style:{transform:"translateX(-100%)"}})]})});ls.displayName=ho;var cs="SwitchThumb",us=l.forwardRef((e,t)=>{const{__scopeSwitch:o,...n}=e,r=tm(cs,o);return d.jsx($.span,{"data-state":fs(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:t})});us.displayName=cs;var om="SwitchBubbleInput",ds=l.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:n=!0,...r},i)=>{const a=l.useRef(null),s=Q(a,i),c=uo(o),u=ao(t);return l.useEffect(()=>{const f=a.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==o&&m){const b=new Event("click",{bubbles:n});m.call(f,o),f.dispatchEvent(b)}},[c,o,n]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...r,tabIndex:-1,ref:s,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ds.displayName=om;function fs(e){return e?"checked":"unchecked"}var nm=ls,rm=us;const im=Ae("volt-ui-peer volt-ui-cursor-pointer volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-offset-2 volt-ui-inline-flex volt-ui-shrink-0 volt-ui-items-center volt-ui-rounded-full volt-ui-border volt-ui-border-transparent volt-ui-shadow-xs volt-ui-transition-all volt-ui-disabled:pointer-events-none volt-ui-disabled:opacity-50",{variants:{variant:{primary:"volt-ui-data-[state=checked]:bg-accent-solid volt-ui-data-[state=unchecked]:bg-gray-a4 volt-ui-focus-visible:outline-accent-a8",destructive:"volt-ui-data-[state=checked]:bg-error-solid volt-ui-data-[state=unchecked]:bg-error-a4 volt-ui-focus-visible:outline-error-a8"},size:{sm:"volt-ui-h-[16px] volt-ui-w-[27px]",base:"volt-ui-h-[19px] volt-ui-w-[33px]",lg:"volt-ui-h-[24px] volt-ui-w-[41px]"}},defaultVariants:{variant:"primary",size:"base"}}),am=Ae("volt-ui-pointer-events-none volt-ui-block volt-ui-rounded-full volt-ui-ring-0 volt-ui-transition-transform volt-ui-data-[state=checked]:translate-x-[calc(100%-2px)] volt-ui-data-[state=unchecked]:translate-x-px",{variants:{variant:{primary:"volt-ui-bg-gray-contrast volt-ui-border volt-ui-border-gray-a7 volt-ui-data-[state=checked]:border-accent-a11",destructive:"volt-ui-bg-error-contrast volt-ui-border volt-ui-border-error-a7 volt-ui-data-[state=checked]:border-error-a11"},size:{sm:"volt-ui-w-[13px] volt-ui-h-[13px]",base:"volt-ui-w-4 volt-ui-h-4",lg:"volt-ui-w-[20px] volt-ui-h-[20px]"}},defaultVariants:{variant:"primary",size:"base"}});function sm({variant:e,size:t,className:o,...n}){return d.jsx(nm,{"data-slot":"switch",className:I(im({variant:e,size:t,className:o})),...n,children:d.jsx(rm,{"data-slot":"switch-thumb",className:I(am({variant:e,size:t}))})})}const lm=({...e})=>d.jsx(hp,{"data-slot":"popover-portal",...e}),cm=({...e})=>d.jsx(pa,{"data-slot":"popover",...e}),um=({...e})=>d.jsx(va,{"data-slot":"popover-trigger",...e}),dm=({className:e,align:t="center",sideOffset:o=4,...n})=>d.jsx(ma,{"data-slot":"popover-content",align:t,sideOffset:o,className:I("volt-ui-bg-body volt-ui-text-gray-default volt-ui-data-[state=open]:animate-in volt-ui-data-[state=closed]:animate-out volt-ui-data-[state=closed]:fade-out-0 volt-ui-data-[state=open]:fade-in-0 volt-ui-data-[state=closed]:zoom-out-95 volt-ui-data-[state=open]:zoom-in-95 volt-ui-data-[side=bottom]:slide-in-from-top-2 volt-ui-data-[side=left]:slide-in-from-right-2 volt-ui-data-[side=right]:slide-in-from-left-2 volt-ui-data-[side=top]:slide-in-from-bottom-2 volt-ui-z-50 volt-ui-origin-(--radix-popover-content-transform-origin) volt-ui-rounded-lg volt-ui-border volt-ui-p-6 volt-ui-shadow-md volt-ui-outline-hidden",e),...n}),fm=({...e})=>d.jsx(gp,{"data-slot":"popover-anchor",...e});var xo="Checkbox",[pm]=de(xo),[vm,kn]=pm(xo);function mm(e){const{__scopeCheckbox:t,checked:o,children:n,defaultChecked:r,disabled:i,form:a,name:s,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:p}=e,[g,m]=fe({prop:o,defaultProp:r??!1,onChange:c,caller:xo}),[b,v]=l.useState(null),[h,y]=l.useState(null),x=l.useRef(!1),w=b?!!a||!!b.closest("form"):!0,C={checked:g,disabled:i,setChecked:m,control:b,setControl:v,name:s,form:a,value:f,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:je(r)?!1:r,isFormControl:w,bubbleInput:h,setBubbleInput:y};return d.jsx(vm,{scope:t,...C,children:gm(p)?p(C):n})}var ps="CheckboxTrigger",vs=l.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...n},r)=>{const{control:i,value:a,disabled:s,checked:c,required:u,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:m,bubbleInput:b}=kn(ps,e),v=Q(r,f),h=l.useRef(c);return l.useEffect(()=>{const y=i==null?void 0:i.form;if(y){const x=()=>p(h.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[i,p]),d.jsx($.button,{type:"button",role:"checkbox","aria-checked":je(c)?"mixed":c,"aria-required":u,"data-state":ys(c),"data-disabled":s?"":void 0,disabled:s,value:a,...n,ref:v,onKeyDown:L(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:L(o,y=>{p(x=>je(x)?!0:!x),b&&m&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});vs.displayName=ps;var ms=l.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:n,checked:r,defaultChecked:i,required:a,disabled:s,value:c,onCheckedChange:u,form:f,...p}=e;return d.jsx(mm,{__scopeCheckbox:o,checked:r,defaultChecked:i,disabled:s,required:a,onCheckedChange:u,name:n,form:f,value:c,internal_do_not_use_render:({isFormControl:g})=>d.jsxs(d.Fragment,{children:[d.jsx(vs,{...p,ref:t,__scopeCheckbox:o}),g&&d.jsx(bs,{__scopeCheckbox:o})]})})});ms.displayName=xo;var gs="CheckboxIndicator",hs=l.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:n,...r}=e,i=kn(gs,o);return d.jsx(ge,{present:n||je(i.checked)||i.checked===!0,children:d.jsx($.span,{"data-state":ys(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});hs.displayName=gs;var xs="CheckboxBubbleInput",bs=l.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:n,hasConsumerStoppedPropagationRef:r,checked:i,defaultChecked:a,required:s,disabled:c,name:u,value:f,form:p,bubbleInput:g,setBubbleInput:m}=kn(xs,e),b=Q(o,m),v=uo(i),h=ao(n);l.useEffect(()=>{const x=g;if(!x)return;const w=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(w,"checked").set,k=!r.current;if(v!==i&&S){const E=new Event("click",{bubbles:k});x.indeterminate=je(i),S.call(x,je(i)?!1:i),x.dispatchEvent(E)}},[g,v,i,r]);const y=l.useRef(je(i)?!1:i);return d.jsx($.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??y.current,required:s,disabled:c,name:u,value:f,form:p,...t,tabIndex:-1,ref:b,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});bs.displayName=xs;function gm(e){return typeof e=="function"}function je(e){return e==="indeterminate"}function ys(e){return je(e)?"indeterminate":e?"checked":"unchecked"}const hm=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z"})}),xm=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M280-440q-17 0-28.5-11.5T240-480q0-17 11.5-28.5T280-520h400q17 0 28.5 11.5T720-480q0 17-11.5 28.5T680-440H280Z"})}),bm=({className:e,...t})=>d.jsx(ms,{"data-slot":"checkbox",className:I("volt-ui-peer volt-ui-border-accent-a7 volt-ui-bg-accent-a4 volt-ui-disabled:border-gray-a4 volt-ui-data-[state=indeterminate]:bg-accent-a7 volt-ui-data-[state=indeterminate]:border-transparent volt-ui-data-[state=indeterminate]:text-accent-a12 volt-ui-data-[state=checked]:bg-accent-solid volt-ui-data-[state=checked]:border-0 volt-ui-data-[state=checked]:text-accent-contrast volt-ui-focus-visible:outline-offset-2 volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-accent-a8 volt-ui-aria-invalid:outline-error-a8 volt-ui-aria-invalid:border-error-a8 volt-ui-size-4 volt-ui-shrink-0 volt-ui-rounded-sm volt-ui-border volt-ui-shadow-xs volt-ui-transition-shadow volt-ui-disabled:cursor-not-allowed volt-ui-disabled:opacity-50",e),...t,children:d.jsx(hs,{"data-slot":"checkbox-indicator",className:"volt-ui-grid volt-ui-place-content-center volt-ui-text-current volt-ui-transition-none",children:t.checked==="indeterminate"?d.jsx(xm,{className:"volt-ui-size-3.5"}):d.jsx(hm,{className:"volt-ui-size-3.5"})})});var Lo="rovingFocusGroup.onEntryFocus",ym={bubbles:!1,cancelable:!0},kt="RovingFocusGroup",[Jo,ws,wm]=Rn(kt),[Cm,Cs]=de(kt,[wm]),[Sm,Rm]=Cm(kt),Ss=l.forwardRef((e,t)=>d.jsx(Jo.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Jo.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Em,{...e,ref:t})})}));Ss.displayName=kt;var Em=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:n,loop:r=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=l.useRef(null),m=Q(t,g),b=co(i),[v,h]=fe({prop:a,defaultProp:s??null,onChange:c,caller:kt}),[y,x]=l.useState(!1),w=_e(u),C=ws(o),S=l.useRef(!1),[k,E]=l.useState(0);return l.useEffect(()=>{const R=g.current;if(R)return R.addEventListener(Lo,w),()=>R.removeEventListener(Lo,w)},[w]),d.jsx(Sm,{scope:o,orientation:n,dir:b,loop:r,currentTabStopId:v,onItemFocus:l.useCallback(R=>h(R),[h]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>E(R=>R+1),[]),onFocusableItemRemove:l.useCallback(()=>E(R=>R-1),[]),children:d.jsx($.div,{tabIndex:y||k===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:L(e.onMouseDown,()=>{S.current=!0}),onFocus:L(e.onFocus,R=>{const F=!S.current;if(R.target===R.currentTarget&&F&&!y){const B=new CustomEvent(Lo,ym);if(R.currentTarget.dispatchEvent(B),!B.defaultPrevented){const K=C().filter(M=>M.focusable),Y=K.find(M=>M.active),Z=K.find(M=>M.id===v),G=[Y,Z,...K].filter(Boolean).map(M=>M.ref.current);Ps(G,f)}}S.current=!1}),onBlur:L(e.onBlur,()=>x(!1))})})}),Rs="RovingFocusGroupItem",Es=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:n=!0,active:r=!1,tabStopId:i,children:a,...s}=e,c=ie(),u=i||c,f=Rm(Rs,o),p=f.currentTabStopId===u,g=ws(o),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:v}=f;return l.useEffect(()=>{if(n)return m(),()=>b()},[n,m,b]),d.jsx(Jo.ItemSlot,{scope:o,id:u,focusable:n,active:r,children:d.jsx($.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:L(e.onMouseDown,h=>{n?f.onItemFocus(u):h.preventDefault()}),onFocus:L(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:L(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){f.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const y=km(h,f.orientation,f.dir);if(y!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let w=g().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const C=w.indexOf(h.currentTarget);w=f.loop?Am(w,C+1):w.slice(C+1)}setTimeout(()=>Ps(w))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:v!=null}):a})})});Es.displayName=Rs;var Pm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Tm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function km(e,t,o){const n=Tm(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Pm[n]}function Ps(e,t=!1){const o=document.activeElement;for(const n of e)if(n===o||(n.focus({preventScroll:t}),document.activeElement!==o))return}function Am(e,t){return e.map((o,n)=>e[(t+n)%e.length])}var Im=Ss,Nm=Es,An="Radio",[jm,Ts]=de(An),[Om,_m]=jm(An),ks=l.forwardRef((e,t)=>{const{__scopeRadio:o,name:n,checked:r=!1,required:i,disabled:a,value:s="on",onCheck:c,form:u,...f}=e,[p,g]=l.useState(null),m=Q(t,h=>g(h)),b=l.useRef(!1),v=p?u||!!p.closest("form"):!0;return d.jsxs(Om,{scope:o,checked:r,disabled:a,children:[d.jsx($.button,{type:"button",role:"radio","aria-checked":r,"data-state":js(r),"data-disabled":a?"":void 0,disabled:a,value:s,...f,ref:m,onClick:L(e.onClick,h=>{r||c==null||c(),v&&(b.current=h.isPropagationStopped(),b.current||h.stopPropagation())})}),v&&d.jsx(Ns,{control:p,bubbles:!b.current,name:n,value:s,checked:r,required:i,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});ks.displayName=An;var As="RadioIndicator",Is=l.forwardRef((e,t)=>{const{__scopeRadio:o,forceMount:n,...r}=e,i=_m(As,o);return d.jsx(ge,{present:n||i.checked,children:d.jsx($.span,{"data-state":js(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})})});Is.displayName=As;var Mm="RadioBubbleInput",Ns=l.forwardRef(({__scopeRadio:e,control:t,checked:o,bubbles:n=!0,...r},i)=>{const a=l.useRef(null),s=Q(a,i),c=uo(o),u=ao(t);return l.useEffect(()=>{const f=a.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==o&&m){const b=new Event("click",{bubbles:n});m.call(f,o),f.dispatchEvent(b)}},[c,o,n]),d.jsx($.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...r,tabIndex:-1,ref:s,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ns.displayName=Mm;function js(e){return e?"checked":"unchecked"}var Dm=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],bo="RadioGroup",[Lm]=de(bo,[Cs,Ts]),Os=Cs(),_s=Ts(),[Fm,$m]=Lm(bo),Ms=l.forwardRef((e,t)=>{const{__scopeRadioGroup:o,name:n,defaultValue:r,value:i,required:a=!1,disabled:s=!1,orientation:c,dir:u,loop:f=!0,onValueChange:p,...g}=e,m=Os(o),b=co(u),[v,h]=fe({prop:i,defaultProp:r??null,onChange:p,caller:bo});return d.jsx(Fm,{scope:o,name:n,required:a,disabled:s,value:v,onValueChange:h,children:d.jsx(Im,{asChild:!0,...m,orientation:c,dir:b,loop:f,children:d.jsx($.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b,...g,ref:t})})})});Ms.displayName=bo;var Ds="RadioGroupItem",Ls=l.forwardRef((e,t)=>{const{__scopeRadioGroup:o,disabled:n,...r}=e,i=$m(Ds,o),a=i.disabled||n,s=Os(o),c=_s(o),u=l.useRef(null),f=Q(t,u),p=i.value===r.value,g=l.useRef(!1);return l.useEffect(()=>{const m=v=>{Dm.includes(v.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),d.jsx(Nm,{asChild:!0,...s,focusable:!a,active:p,children:d.jsx(ks,{disabled:a,required:i.required,checked:p,...c,...r,name:i.name,ref:f,onCheck:()=>i.onValueChange(r.value),onKeyDown:L(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:L(r.onFocus,()=>{var m;g.current&&((m=u.current)==null||m.click())})})})});Ls.displayName=Ds;var Bm="RadioGroupIndicator",Fs=l.forwardRef((e,t)=>{const{__scopeRadioGroup:o,...n}=e,r=_s(o);return d.jsx(Is,{...r,...n,ref:t})});Fs.displayName=Bm;var qm=Ms,zm=Ls,Vm=Fs;const Wm=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:d.jsx("circle",{cx:"12",cy:"12",r:"10"})}),Gm=({className:e,...t})=>d.jsx(qm,{"data-slot":"radio-group",className:I("volt-ui-grid volt-ui-gap-3",e),...t}),Hm=({className:e,...t})=>d.jsx(zm,{"data-slot":"radio-group-item",className:I("volt-ui-border-accent-a7 volt-ui-data-[state='checked']:bg-accent-solid volt-ui-data-[checked=true]:text-accent-contrast volt-ui-bg-accent-a4 volt-ui-text-accent-default volt-ui-focus-visible:outline-accent-a8 volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-offset-2 volt-ui-aria-invalid:bg-error-a4 volt-ui-aria-invalid:border-error-a8 volt-ui-aria-invalid:outline-error-a8 volt-ui-data-[state='checked']:aria-invalid:border-transparent volt-ui-data-[state='checked']:aria-invalid:bg-error-a10 volt-ui-aspect-square volt-ui-size-4 volt-ui-shrink-0 volt-ui-rounded-full volt-ui-border volt-ui-shadow-xs volt-ui-transition-[color,box-shadow] volt-ui-disabled:cursor-not-allowed volt-ui-disabled:bg-gray-a3 volt-ui-disabled:border-transparent volt-ui-data-[state='checked']:disabled:bg-gray-a3",e),...t,children:d.jsx(Vm,{"data-slot":"radio-group-indicator",className:"volt-ui-relative volt-ui-flex volt-ui-items-center volt-ui-justify-center",children:d.jsx(Wm,{className:"volt-ui-text-accent-contrast volt-ui-absolute volt-ui-top-1/2 volt-ui-left-1/2 volt-ui-size-2 volt-ui--translate-x-1/2 volt-ui--translate-y-1/2"})})}),$s={blue:"blue",sky:"sky",mint:"mint",green:"green",teal:"teal",cyan:"cyan",indigo:"indigo",purple:"purple",pink:"pink",red:"red",orange:"orange",yellow:"yellow",bronze:"bronze",gray:"gray"},Bs={soft:e=>`volt-ui-bg-${e}-soft volt-ui-border volt-ui-border-transparent volt-ui-text-${e}-default [a&]:hover:bg-${e}-soft-hover`,solid:e=>`volt-ui-bg-${e}-solid volt-ui-border volt-ui-border-transparent volt-ui-text-${e}-contrast [a&]:hover:bg-${e}-solid-hover`,surface:e=>`volt-ui-bg-${e}-surface volt-ui-border-${e}-a6 volt-ui-border volt-ui-text-${e}-default`},Um=Object.keys($s),Km=Object.keys(Bs),Ym=Um.flatMap(e=>Km.map(t=>({color:e,style:t,class:Bs[t](e)}))),qs=Ae("volt-ui-inline-flex volt-ui-items-center volt-ui-gap-2 volt-ui-justify-center volt-ui-px-1.5 volt-ui-py-0.25 volt-ui-text-sm volt-ui-font-normal volt-ui-w-fit volt-ui-whitespace-nowrap volt-ui-shrink-0 [&>svg]:size-4 [&>svg]:pointer-events-none volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-offset-2 volt-ui-focus-visible:outline-accent-a8 volt-ui-aria-invalid:outline-error-a8 volt-ui-transition-[color,box-shadow] volt-ui-overflow-hidden",{variants:{color:$s,style:{soft:"",solid:"",surface:""},shape:{default:"volt-ui-rounded-md",rounded:"volt-ui-rounded-full"}},compoundVariants:Ym,defaultVariants:{color:"blue",shape:"default",style:"soft"}}),Zm=({className:e,color:t,style:o,shape:n,asChild:r=!1,...i})=>{const a=r?on:"span";return d.jsx(a,{"data-slot":"badge",className:I(qs({color:t,style:o,shape:n}),e),...i})},xr=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M480-280q17 0 28.5-11.5T520-320v-160q0-17-11.5-28.5T480-520q-17 0-28.5 11.5T440-480v160q0 17 11.5 28.5T480-280Zm0-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}),Xm=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M109-120q-11 0-20-5.5T75-140q-5-9-5.5-19.5T75-180l370-640q6-10 15.5-15t19.5-5q10 0 19.5 5t15.5 15l370 640q6 10 5.5 20.5T885-140q-5 9-14 14.5t-20 5.5H109Zm69-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm0-120q17 0 28.5-11.5T520-400v-120q0-17-11.5-28.5T480-560q-17 0-28.5 11.5T440-520v120q0 17 11.5 28.5T480-360Zm0-100Z"})}),Qm=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"m424-408-86-86q-11-11-28-11t-28 11q-11 11-11 28t11 28l114 114q12 12 28 12t28-12l226-226q11-11 11-28t-11-28q-11-11-28-11t-28 11L424-408Zm56 328q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}),Jm=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm0-160q17 0 28.5-11.5T520-480v-160q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640v160q0 17 11.5 28.5T480-440Zm0 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}),eg=Ae("volt-ui-group volt-ui-relative volt-ui-w-full volt-ui-rounded-xl volt-ui-p-3 volt-ui-text-sm volt-ui-has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] volt-ui-has-data-[slot=callout-icon]:grid-cols-[calc(var(--spacing)*4)_1fr] volt-ui-grid volt-ui-grid-cols-[0_1fr_auto] volt-ui-has-[>svg]:gap-x-3 volt-ui-has-data-[slot=callout-icon]:gap-x-4 volt-ui-gap-y-0.5 volt-ui-items-start",{variants:{type:{info:"volt-ui-bg-accent-soft volt-ui-text-accent-default",gray:"volt-ui-bg-gray-soft volt-ui-text-gray-default",success:"volt-ui-bg-success-soft volt-ui-text-success-default",warning:"volt-ui-bg-warning-soft volt-ui-text-warning-default",destructive:"volt-ui-text-error-default volt-ui-bg-error-soft"}},defaultVariants:{type:"info"}}),zs=l.createContext({type:"info"}),tg=({className:e,type:t="info",customIcon:o,...n})=>d.jsx(zs.Provider,{value:{type:t},children:d.jsxs("div",{"data-callout-variant":t,"data-slot":"callout",role:"alert",className:I(eg({type:t}),e),...n,children:[d.jsx(ag,{customIcon:o}),n.children]})}),og=({className:e,...t})=>d.jsx("div",{"data-slot":"callout-title",className:I("volt-ui-col-start-2 volt-ui-line-clamp-1 volt-ui-text-current volt-ui-min-h-4 volt-ui-text-base volt-ui-font-medium",e),...t}),ng=({className:e,...t})=>d.jsx("div",{"data-slot":"callout-description",className:I("volt-ui-text-current volt-ui-col-start-2 volt-ui-grid volt-ui-justify-items-start volt-ui-gap-1 volt-ui-text-sm [&_p]:leading-relaxed",e),...t}),rg=({className:e,align:t="start",...o})=>d.jsx("div",{"data-slot":"callout-action","data-align":t,className:I("volt-ui-flex volt-ui-w-full volt-ui-col-span-3 volt-ui-mt-2",{"volt-ui-justify-start volt-ui-ml-8":t==="start","volt-ui-justify-end":t==="end"},e),...o}),ig=({customIcon:e,...t})=>{const{type:o}=l.useContext(zs);if(e)return e;let n=null;switch(o){case"info":n=d.jsx(xr,{...t});break;case"success":n=d.jsx(Qm,{...t});break;case"warning":n=d.jsx(Xm,{...t});break;case"destructive":n=d.jsx(Jm,{...t});break;case"gray":n=d.jsx(xr,{...t});break}return n},ag=({className:e,customIcon:t,...o})=>d.jsx(ig,{"data-slot":"callout-icon",customIcon:t,className:I("volt-ui-size-5 volt-ui-translate-y-0.5 volt-ui-text-current volt-ui-shrink-0",e),...o});var yo="Collapsible",[sg,Vs]=de(yo),[lg,In]=sg(yo),Ws=l.forwardRef((e,t)=>{const{__scopeCollapsible:o,open:n,defaultOpen:r,disabled:i,onOpenChange:a,...s}=e,[c,u]=fe({prop:n,defaultProp:r??!1,onChange:a,caller:yo});return d.jsx(lg,{scope:o,disabled:i,contentId:ie(),open:c,onOpenToggle:l.useCallback(()=>u(f=>!f),[u]),children:d.jsx($.div,{"data-state":jn(c),"data-disabled":i?"":void 0,...s,ref:t})})});Ws.displayName=yo;var Gs="CollapsibleTrigger",Hs=l.forwardRef((e,t)=>{const{__scopeCollapsible:o,...n}=e,r=In(Gs,o);return d.jsx($.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":jn(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...n,ref:t,onClick:L(e.onClick,r.onOpenToggle)})});Hs.displayName=Gs;var Nn="CollapsibleContent",Us=l.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=In(Nn,e.__scopeCollapsible);return d.jsx(ge,{present:o||r.open,children:({present:i})=>d.jsx(cg,{...n,ref:t,present:i})})});Us.displayName=Nn;var cg=l.forwardRef((e,t)=>{const{__scopeCollapsible:o,present:n,children:r,...i}=e,a=In(Nn,o),[s,c]=l.useState(n),u=l.useRef(null),f=Q(t,u),p=l.useRef(0),g=p.current,m=l.useRef(0),b=m.current,v=a.open||s,h=l.useRef(v),y=l.useRef(void 0);return l.useEffect(()=>{const x=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(x)},[]),ae(()=>{const x=u.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();p.current=w.height,m.current=w.width,h.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),c(n)}},[a.open,n]),d.jsx($.div,{"data-state":jn(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...i,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&r})});function jn(e){return e?"open":"closed"}var ug=Ws,dg=Hs,fg=Us,xe="Accordion",pg=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[On,vg,mg]=Rn(xe),[wo]=de(xe,[mg,Vs]),_n=Vs(),Ks=oe.forwardRef((e,t)=>{const{type:o,...n}=e,r=n,i=n;return d.jsx(On.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?d.jsx(bg,{...i,ref:t}):d.jsx(xg,{...r,ref:t})})});Ks.displayName=xe;var[Ys,gg]=wo(xe),[Zs,hg]=wo(xe,{collapsible:!1}),xg=oe.forwardRef((e,t)=>{const{value:o,defaultValue:n,onValueChange:r=()=>{},collapsible:i=!1,...a}=e,[s,c]=fe({prop:o,defaultProp:n??"",onChange:r,caller:xe});return d.jsx(Ys,{scope:e.__scopeAccordion,value:oe.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:oe.useCallback(()=>i&&c(""),[i,c]),children:d.jsx(Zs,{scope:e.__scopeAccordion,collapsible:i,children:d.jsx(Xs,{...a,ref:t})})})}),bg=oe.forwardRef((e,t)=>{const{value:o,defaultValue:n,onValueChange:r=()=>{},...i}=e,[a,s]=fe({prop:o,defaultProp:n??[],onChange:r,caller:xe}),c=oe.useCallback(f=>s((p=[])=>[...p,f]),[s]),u=oe.useCallback(f=>s((p=[])=>p.filter(g=>g!==f)),[s]);return d.jsx(Ys,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:d.jsx(Zs,{scope:e.__scopeAccordion,collapsible:!0,children:d.jsx(Xs,{...i,ref:t})})})}),[yg,Co]=wo(xe),Xs=oe.forwardRef((e,t)=>{const{__scopeAccordion:o,disabled:n,dir:r,orientation:i="vertical",...a}=e,s=oe.useRef(null),c=Q(s,t),u=vg(o),p=co(r)==="ltr",g=L(e.onKeyDown,m=>{var R;if(!pg.includes(m.key))return;const b=m.target,v=u().filter(F=>{var B;return!((B=F.ref.current)!=null&&B.disabled)}),h=v.findIndex(F=>F.ref.current===b),y=v.length;if(h===-1)return;m.preventDefault();let x=h;const w=0,C=y-1,S=()=>{x=h+1,x>C&&(x=w)},k=()=>{x=h-1,x<w&&(x=C)};switch(m.key){case"Home":x=w;break;case"End":x=C;break;case"ArrowRight":i==="horizontal"&&(p?S():k());break;case"ArrowDown":i==="vertical"&&S();break;case"ArrowLeft":i==="horizontal"&&(p?k():S());break;case"ArrowUp":i==="vertical"&&k();break}const E=x%y;(R=v[E].ref.current)==null||R.focus()});return d.jsx(yg,{scope:o,disabled:n,direction:r,orientation:i,children:d.jsx(On.Slot,{scope:o,children:d.jsx($.div,{...a,"data-orientation":i,ref:c,onKeyDown:n?void 0:g})})})}),Yt="AccordionItem",[wg,Mn]=wo(Yt),Qs=oe.forwardRef((e,t)=>{const{__scopeAccordion:o,value:n,...r}=e,i=Co(Yt,o),a=gg(Yt,o),s=_n(o),c=ie(),u=n&&a.value.includes(n)||!1,f=i.disabled||e.disabled;return d.jsx(wg,{scope:o,open:u,disabled:f,triggerId:c,children:d.jsx(ug,{"data-orientation":i.orientation,"data-state":rl(u),...s,...r,ref:t,disabled:f,open:u,onOpenChange:p=>{p?a.onItemOpen(n):a.onItemClose(n)}})})});Qs.displayName=Yt;var Js="AccordionHeader",el=oe.forwardRef((e,t)=>{const{__scopeAccordion:o,...n}=e,r=Co(xe,o),i=Mn(Js,o);return d.jsx($.h3,{"data-orientation":r.orientation,"data-state":rl(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:t})});el.displayName=Js;var en="AccordionTrigger",tl=oe.forwardRef((e,t)=>{const{__scopeAccordion:o,...n}=e,r=Co(xe,o),i=Mn(en,o),a=hg(en,o),s=_n(o);return d.jsx(On.ItemSlot,{scope:o,children:d.jsx(dg,{"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":r.orientation,id:i.triggerId,...s,...n,ref:t})})});tl.displayName=en;var ol="AccordionContent",nl=oe.forwardRef((e,t)=>{const{__scopeAccordion:o,...n}=e,r=Co(xe,o),i=Mn(ol,o),a=_n(o);return d.jsx(fg,{role:"region","aria-labelledby":i.triggerId,"data-orientation":r.orientation,...a,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});nl.displayName=ol;function rl(e){return e?"open":"closed"}var Cg=Ks,Sg=Qs,Rg=el,Eg=tl,Pg=nl;const Tg=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M480-361q-8 0-15-2.5t-13-8.5L268-556q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-372q-6 6-13 8.5t-15 2.5Z"})}),kg=({className:e,...t})=>d.jsx(Cg,{"data-slot":"accordion",className:I(e),...t}),Ag=({className:e,...t})=>d.jsx(Sg,{"data-slot":"accordion-item",className:I(e),...t}),br=({className:e,...t})=>d.jsx(Tg,{className:I("volt-ui-text-gray-light volt-ui-pointer-events-none volt-ui-size-5 volt-ui-shrink-0 volt-ui-translate-y-0 volt-ui-transition-transform volt-ui-duration-200",e),...t}),Ig=({className:e,align:t="end",children:o,...n})=>d.jsx(Rg,{className:"volt-ui-flex",children:d.jsxs(Eg,{"data-slot":"accordion-trigger",className:I("volt-ui-outline-accent-a8 volt-ui-p-3 volt-ui-focus-visible:outline-offset-2 volt-ui-focus-visible:outline-2 volt-ui-flex volt-ui-flex-1 volt-ui-items-start volt-ui-gap-3 volt-ui-rounded-md volt-ui-py-4 volt-ui-text-left volt-ui-text-sm volt-ui-font-medium volt-ui-transition-all volt-ui-disabled:pointer-events-none volt-ui-disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",{"volt-ui-justify-start":t==="start","volt-ui-justify-between":t==="end"},e),...n,children:[t==="start"&&d.jsx(br,{}),o,t==="end"&&d.jsx(br,{})]})}),Ng=({className:e,children:t,...o})=>d.jsx(Pg,{"data-slot":"accordion-content",className:"volt-ui-data-[state=closed]:animate-accordion-up volt-ui-data-[state=open]:animate-accordion-down volt-ui-overflow-hidden volt-ui-duration-75 volt-ui-text-sm volt-ui-px-3 volt-ui-pb-2 volt-ui-pt-0",...o,children:d.jsx("div",{className:I("volt-ui-p-0",e),children:t})});exports.Accordion=kg;exports.AccordionContent=Ng;exports.AccordionItem=Ag;exports.AccordionTrigger=Ig;exports.Badge=Zm;exports.Button=Fr;exports.ButtonGroup=sc;exports.ButtonGroupSeparator=cc;exports.ButtonGroupText=lc;exports.Callout=tg;exports.CalloutAction=rg;exports.CalloutDescription=ng;exports.CalloutTitle=og;exports.Checkbox=bm;exports.Dialog=Ed;exports.DialogClose=Td;exports.DialogContent=kd;exports.DialogDescription=jd;exports.DialogFooter=Id;exports.DialogHeader=Ad;exports.DialogOverlay=_i;exports.DialogPortal=Oi;exports.DialogTitle=Nd;exports.DialogTrigger=Pd;exports.Field=gc;exports.FieldCombobox=yp;exports.FieldComboboxClear=Op;exports.FieldComboboxClearValue=Mp;exports.FieldComboboxContent=Ep;exports.FieldComboboxEmpty=Ap;exports.FieldComboboxGroup=wp;exports.FieldComboboxGroupLabel=Cp;exports.FieldComboboxInput=Pp;exports.FieldComboboxItem=kp;exports.FieldComboboxItemCheckIcon=Np;exports.FieldComboboxList=Tp;exports.FieldComboboxLoading=jp;exports.FieldComboboxPlaceholder=_p;exports.FieldComboboxSeparator=Ip;exports.FieldComboboxTrigger=Rp;exports.FieldComboboxValue=Sp;exports.FieldContent=hc;exports.FieldDescription=yc;exports.FieldError=wc;exports.FieldGroup=pc;exports.FieldGroupAddon=Sc;exports.FieldInput=Vr;exports.FieldInputGroup=Wr;exports.FieldLabel=xc;exports.FieldLabelContent=bc;exports.FieldSet=vc;exports.FieldTextarea=Gr;exports.Label=rn;exports.Popover=cm;exports.PopoverAnchor=fm;exports.PopoverContent=dm;exports.PopoverPortal=lm;exports.PopoverTrigger=um;exports.RadioGroup=Gm;exports.RadioGroupItem=Hm;exports.Select=Cv;exports.SelectContent=Ev;exports.SelectGroup=Sv;exports.SelectItem=Tv;exports.SelectLabel=Pv;exports.SelectScrollDownButton=Xa;exports.SelectScrollUpButton=Za;exports.SelectSeparator=kv;exports.SelectTrigger=Ya;exports.SelectValue=Rv;exports.Separator=Br;exports.Switch=sm;exports.Tooltip=Zv;exports.TooltipContent=Qv;exports.TooltipProvider=ss;exports.TooltipTrigger=Xv;exports.badgeVariants=qs;exports.buttonVariants=nn;exports.cn=I;exports.useFieldContext=wt;
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},rd="DialogDescriptionWarning",id=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yi(rd).contentName}}.`;return l.useEffect(()=>{var i;const r=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},wi=ai,ad=li,Ci=ui,Si=di,Ri=fi,sd=vi,ld=gi,Ei=xi,gt='[cmdk-group=""]',_o='[cmdk-group-items=""]',cd='[cmdk-group-heading=""]',Pi='[cmdk-item=""]',ir=`${Pi}:not([aria-disabled="true"])`,zo="cmdk-item-select",Qe="data-value",ud=(e,t,o)=>jc(e,t,o),Ti=l.createContext(void 0),Rt=()=>l.useContext(Ti),ki=l.createContext(void 0),dn=()=>l.useContext(ki),Ai=l.createContext(void 0),Ii=l.forwardRef((e,t)=>{let o=Je(()=>{var P,O;return{search:"",value:(O=(P=e.value)!=null?P:e.defaultValue)!=null?O:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Je(()=>new Set),r=Je(()=>new Map),i=Je(()=>new Map),a=Je(()=>new Set),s=Ni(e),{label:c,children:u,value:f,onValueChange:p,filter:g,shouldFilter:m,loop:b,disablePointerSelection:v=!1,vimBindings:h=!0,...y}=e,x=ie(),w=ie(),C=ie(),S=l.useRef(null),k=wd();We(()=>{if(f!==void 0){let P=f.trim();o.current.value=P,E.emit()}},[f]),We(()=>{k(6,Z)},[]);let E=l.useMemo(()=>({subscribe:P=>(a.current.add(P),()=>a.current.delete(P)),snapshot:()=>o.current,setState:(P,O,D)=>{var _,H,A,V;if(!Object.is(o.current[P],O)){if(o.current[P]=O,P==="search")Y(),B(),k(1,K);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let U=document.getElementById(C);U?U.focus():(_=document.getElementById(x))==null||_.focus()}if(k(7,()=>{var U;o.current.selectedItemId=(U=q())==null?void 0:U.id,E.emit()}),D||k(5,Z),((H=s.current)==null?void 0:H.value)!==void 0){let U=O??"";(V=(A=s.current).onValueChange)==null||V.call(A,U);return}}E.emit()}},emit:()=>{a.current.forEach(P=>P())}}),[]),R=l.useMemo(()=>({value:(P,O,D)=>{var _;O!==((_=i.current.get(P))==null?void 0:_.value)&&(i.current.set(P,{value:O,keywords:D}),o.current.filtered.items.set(P,F(O,D)),k(2,()=>{B(),E.emit()}))},item:(P,O)=>(n.current.add(P),O&&(r.current.has(O)?r.current.get(O).add(P):r.current.set(O,new Set([P]))),k(3,()=>{Y(),B(),o.current.value||K(),E.emit()}),()=>{i.current.delete(P),n.current.delete(P),o.current.filtered.items.delete(P);let D=q();k(4,()=>{Y(),(D==null?void 0:D.getAttribute("id"))===P&&K(),E.emit()})}),group:P=>(r.current.has(P)||r.current.set(P,new Set),()=>{i.current.delete(P),r.current.delete(P)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:x,inputId:C,labelId:w,listInnerRef:S}),[]);function F(P,O){var D,_;let H=(_=(D=s.current)==null?void 0:D.filter)!=null?_:ud;return P?H(P,o.current.search,O):0}function B(){if(!o.current.search||s.current.shouldFilter===!1)return;let P=o.current.filtered.items,O=[];o.current.filtered.groups.forEach(_=>{let H=r.current.get(_),A=0;H.forEach(V=>{let U=P.get(V);A=Math.max(U,A)}),O.push([_,A])});let D=S.current;G().sort((_,H)=>{var A,V;let U=_.getAttribute("id"),X=H.getAttribute("id");return((A=P.get(X))!=null?A:0)-((V=P.get(U))!=null?V:0)}).forEach(_=>{let H=_.closest(_o);H?H.appendChild(_.parentElement===H?_:_.closest(`${_o} > *`)):D.appendChild(_.parentElement===D?_:_.closest(`${_o} > *`))}),O.sort((_,H)=>H[1]-_[1]).forEach(_=>{var H;let A=(H=S.current)==null?void 0:H.querySelector(`${gt}[${Qe}="${encodeURIComponent(_[0])}"]`);A==null||A.parentElement.appendChild(A)})}function K(){let P=G().find(D=>D.getAttribute("aria-disabled")!=="true"),O=P==null?void 0:P.getAttribute(Qe);E.setState("value",O||void 0)}function Y(){var P,O,D,_;if(!o.current.search||s.current.shouldFilter===!1){o.current.filtered.count=n.current.size;return}o.current.filtered.groups=new Set;let H=0;for(let A of n.current){let V=(O=(P=i.current.get(A))==null?void 0:P.value)!=null?O:"",U=(_=(D=i.current.get(A))==null?void 0:D.keywords)!=null?_:[],X=F(V,U);o.current.filtered.items.set(A,X),X>0&&H++}for(let[A,V]of r.current)for(let U of V)if(o.current.filtered.items.get(U)>0){o.current.filtered.groups.add(A);break}o.current.filtered.count=H}function Z(){var P,O,D;let _=q();_&&(((P=_.parentElement)==null?void 0:P.firstChild)===_&&((D=(O=_.closest(gt))==null?void 0:O.querySelector(cd))==null||D.scrollIntoView({block:"nearest"})),_.scrollIntoView({block:"nearest"}))}function q(){var P;return(P=S.current)==null?void 0:P.querySelector(`${Pi}[aria-selected="true"]`)}function G(){var P;return Array.from(((P=S.current)==null?void 0:P.querySelectorAll(ir))||[])}function M(P){let O=G()[P];O&&E.setState("value",O.getAttribute(Qe))}function z(P){var O;let D=q(),_=G(),H=_.findIndex(V=>V===D),A=_[H+P];(O=s.current)!=null&&O.loop&&(A=H+P<0?_[_.length-1]:H+P===_.length?_[0]:_[H+P]),A&&E.setState("value",A.getAttribute(Qe))}function T(P){let O=q(),D=O==null?void 0:O.closest(gt),_;for(;D&&!_;)D=P>0?bd(D,gt):yd(D,gt),_=D==null?void 0:D.querySelector(ir);_?E.setState("value",_.getAttribute(Qe)):z(P)}let te=()=>M(G().length-1),ne=P=>{P.preventDefault(),P.metaKey?te():P.altKey?T(1):z(1)},se=P=>{P.preventDefault(),P.metaKey?M(0):P.altKey?T(-1):z(-1)};return l.createElement(Re.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:P=>{var O;(O=y.onKeyDown)==null||O.call(y,P);let D=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||D))switch(P.key){case"n":case"j":{h&&P.ctrlKey&&ne(P);break}case"ArrowDown":{ne(P);break}case"p":case"k":{h&&P.ctrlKey&&se(P);break}case"ArrowUp":{se(P);break}case"Home":{P.preventDefault(),M(0);break}case"End":{P.preventDefault(),te();break}case"Enter":{P.preventDefault();let _=q();if(_){let H=new Event(zo);_.dispatchEvent(H)}}}}},l.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:Sd},c),to(e,P=>l.createElement(ki.Provider,{value:E},l.createElement(Ti.Provider,{value:R},P))))}),dd=l.forwardRef((e,t)=>{var o,n;let r=ie(),i=l.useRef(null),a=l.useContext(Ai),s=Rt(),c=Ni(e),u=(n=(o=c.current)==null?void 0:o.forceMount)!=null?n:a==null?void 0:a.forceMount;We(()=>{if(!u)return s.item(r,a==null?void 0:a.id)},[u]);let f=ji(r,i,[e.value,e.children,i],e.keywords),p=dn(),g=Me(k=>k.value&&k.value===f.current),m=Me(k=>u||s.filter()===!1?!0:k.search?k.filtered.items.get(r)>0:!0);l.useEffect(()=>{let k=i.current;if(!(!k||e.disabled))return k.addEventListener(zo,b),()=>k.removeEventListener(zo,b)},[m,e.onSelect,e.disabled]);function b(){var k,E;v(),(E=(k=c.current).onSelect)==null||E.call(k,f.current)}function v(){p.setState("value",f.current,!0)}if(!m)return null;let{disabled:h,value:y,onSelect:x,forceMount:w,keywords:C,...S}=e;return l.createElement(Re.div,{ref:Oe(i,t),...S,id:r,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!g,"data-disabled":!!h,"data-selected":!!g,onPointerMove:h||s.getDisablePointerSelection()?void 0:v,onClick:h?void 0:b},e.children)}),fd=l.forwardRef((e,t)=>{let{heading:o,children:n,forceMount:r,...i}=e,a=ie(),s=l.useRef(null),c=l.useRef(null),u=ie(),f=Rt(),p=Me(m=>r||f.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);We(()=>f.group(a),[]),ji(a,s,[e.value,e.heading,c]);let g=l.useMemo(()=>({id:a,forceMount:r}),[r]);return l.createElement(Re.div,{ref:Oe(s,t),...i,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},o&&l.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},o),to(e,m=>l.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?u:void 0},l.createElement(Ai.Provider,{value:g},m))))}),pd=l.forwardRef((e,t)=>{let{alwaysRender:o,...n}=e,r=l.useRef(null),i=Me(a=>!a.search);return!o&&!i?null:l.createElement(Re.div,{ref:Oe(r,t),...n,"cmdk-separator":"",role:"separator"})}),vd=l.forwardRef((e,t)=>{let{onValueChange:o,...n}=e,r=e.value!=null,i=dn(),a=Me(u=>u.search),s=Me(u=>u.selectedItemId),c=Rt();return l.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),l.createElement(Re.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:"text",value:r?e.value:a,onChange:u=>{r||i.setState("search",u.target.value),o==null||o(u.target.value)}})}),md=l.forwardRef((e,t)=>{let{children:o,label:n="Suggestions",...r}=e,i=l.useRef(null),a=l.useRef(null),s=Me(u=>u.selectedItemId),c=Rt();return l.useEffect(()=>{if(a.current&&i.current){let u=a.current,f=i.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let m=u.offsetHeight;f.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return g.observe(u),()=>{cancelAnimationFrame(p),g.unobserve(u)}}},[]),l.createElement(Re.div,{ref:Oe(i,t),...r,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":n,id:c.listId},to(e,u=>l.createElement("div",{ref:Oe(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),gd=l.forwardRef((e,t)=>{let{open:o,onOpenChange:n,overlayClassName:r,contentClassName:i,container:a,...s}=e;return l.createElement(wi,{open:o,onOpenChange:n},l.createElement(Ci,{container:a},l.createElement(Si,{"cmdk-overlay":"",className:r}),l.createElement(Ri,{"aria-label":e.label,"cmdk-dialog":"",className:i},l.createElement(Ii,{ref:t,...s}))))}),hd=l.forwardRef((e,t)=>Me(o=>o.filtered.count===0)?l.createElement(Re.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),xd=l.forwardRef((e,t)=>{let{progress:o,children:n,label:r="Loading...",...i}=e;return l.createElement(Re.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r},to(e,a=>l.createElement("div",{"aria-hidden":!0},a)))}),Fe=Object.assign(Ii,{List:md,Item:dd,Input:vd,Group:fd,Separator:pd,Dialog:gd,Empty:hd,Loading:xd});function bd(e,t){let o=e.nextElementSibling;for(;o;){if(o.matches(t))return o;o=o.nextElementSibling}}function yd(e,t){let o=e.previousElementSibling;for(;o;){if(o.matches(t))return o;o=o.previousElementSibling}}function Ni(e){let t=l.useRef(e);return We(()=>{t.current=e}),t}var We=typeof window>"u"?l.useEffect:l.useLayoutEffect;function Je(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function Me(e){let t=dn(),o=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,o,o)}function ji(e,t,o,n=[]){let r=l.useRef(),i=Rt();return We(()=>{var a;let s=(()=>{var u;for(let f of o){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():r.current}})(),c=n.map(u=>u.trim());i.value(e,s,c),(a=t.current)==null||a.setAttribute(Qe,s),r.current=s}),r}var wd=()=>{let[e,t]=l.useState(),o=Je(()=>new Map);return We(()=>{o.current.forEach(n=>n()),o.current=new Map},[e]),(n,r)=>{o.current.set(n,r),t({})}};function Cd(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function to({asChild:e,children:t},o){return e&&l.isValidElement(t)?l.cloneElement(Cd(t),{ref:t.ref},o(t.props.children)):o(t)}var Sd={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Rd=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z"})}),Ed=({...e})=>d.jsx(wi,{"data-slot":"dialog",...e}),Pd=({...e})=>d.jsx(ad,{"data-slot":"dialog-trigger",...e}),Oi=({...e})=>d.jsx(Ci,{"data-slot":"dialog-portal",...e}),Td=({className:e,...t})=>d.jsx(Ei,{"data-slot":"dialog-close",className:I("volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-offset-2 volt-ui-focus-visible:outline-accent-a8",e),...t}),_i=({className:e,...t})=>d.jsx(Si,{"data-slot":"dialog-overlay",className:I("volt-ui-data-[state=open]:animate-in volt-ui-data-[state=closed]:animate-out volt-ui-data-[state=closed]:fade-out-0 volt-ui-data-[state=open]:fade-in-0 volt-ui-fixed volt-ui-inset-0 volt-ui-z-50 volt-ui-bg-black/50",e),...t}),kd=({className:e,children:t,showCloseButton:o=!0,size:n="lg",...r})=>d.jsxs(Oi,{"data-slot":"dialog-portal",children:[d.jsx(_i,{}),d.jsxs(Ri,{"data-slot":"dialog-content",className:I("volt-ui-bg-body volt-ui-data-[state=open]:animate-in volt-ui-data-[state=closed]:animate-out volt-ui-data-[state=closed]:fade-out-0 volt-ui-data-[state=open]:fade-in-0 volt-ui-data-[state=closed]:zoom-out-95 volt-ui-data-[state=open]:zoom-in-95 volt-ui-fixed volt-ui-top-[50%] volt-ui-left-[50%] volt-ui-z-50 volt-ui-grid volt-ui-w-full volt-ui-max-w-[calc(100%-2rem)] volt-ui-translate-x-[-50%] volt-ui-translate-y-[-50%] volt-ui-gap-6 volt-ui-rounded-xl volt-ui-border volt-ui-p-6 volt-ui-shadow-lg volt-ui-duration-200",{"volt-ui-sm:max-w-sm":n==="sm","volt-ui-sm:max-w-md":n==="md","volt-ui-sm:max-w-lg":n==="lg","volt-ui-sm:max-w-xl":n==="xl","volt-ui-sm:max-w-2xl":n==="2xl","volt-ui-sm:max-w-3xl":n==="3xl","volt-ui-sm:max-w-4xl":n==="4xl","volt-ui-sm:max-w-5xl":n==="5xl","volt-ui-w-full":n==="volt-ui-full-width"},e),...r,children:[t,o&&d.jsxs(Ei,{"data-slot":"dialog-close",className:"volt-ui-data-[state=open]:bg-body volt-ui-size-6 volt-ui-opacity-70 volt-ui-hover:opacity-100 volt-ui-focus-visible:opacity-100 volt-ui-transition-all volt-ui-data-[state=open]:text-gray-light volt-ui-absolute volt-ui-top-4 volt-ui-right-4 volt-ui-rounded-full volt-ui-cursor-pointer volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-offset-2 volt-ui-focus-visible:outline-accent-a8 volt-ui-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='volt-ui-size-'])]:size-4",children:[d.jsx(Rd,{}),d.jsx("span",{className:"volt-ui-sr-only",children:"Close"})]})]})]}),Ad=({className:e,...t})=>d.jsx("div",{"data-slot":"volt-ui-dialog-header",className:I("volt-ui-flex volt-ui-flex-col volt-ui-gap-2 volt-ui-text-left",e),...t}),Id=({className:e,...t})=>d.jsx("div",{"data-slot":"volt-ui-dialog-footer",className:I("volt-ui-flex volt-ui-gap-2 volt-ui-justify-end",e),...t}),Nd=({className:e,...t})=>d.jsx(sd,{"data-slot":"volt-ui-dialog-title",className:I("volt-ui-text-lg volt-ui-leading-none volt-ui-font-semibold volt-ui-text-gray-default",e),...t}),jd=({className:e,...t})=>d.jsx(ld,{"data-slot":"volt-ui-dialog-description",className:I("volt-ui-text-gray-light volt-ui-text-sm",e),...t}),Od=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M380-320q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l224 224q11 11 11 28t-11 28q-11 11-28 11t-28-11L532-372q-30 24-69 38t-83 14Zm0-80q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"})}),_d=({className:e,...t})=>d.jsx(Fe,{"data-slot":"command",className:I("volt-ui-bg-body volt-ui-text-gray-default volt-ui-flex volt-ui-h-full volt-ui-w-full volt-ui-flex-col volt-ui-overflow-hidden volt-ui-rounded-md",e),...t}),Md=({className:e,...t})=>d.jsxs("div",{"data-slot":"command-input-wrapper",className:"volt-ui-flex volt-ui-items-center volt-ui-gap-2 volt-ui-border-b volt-ui-px-3",children:[d.jsx(Od,{className:"volt-ui-size-5 volt-ui-shrink-0 volt-ui-opacity-50"}),d.jsx(Fe.Input,{"data-slot":"command-input",className:I("volt-ui-placeholder:text-gray-light volt-ui-h-12 volt-ui-flex volt-ui-w-full volt-ui-rounded-md volt-ui-bg-transparent volt-ui-py-3 volt-ui-text-sm volt-ui-outline-hidden volt-ui-disabled:cursor-not-allowed volt-ui-disabled:opacity-50",e),...t})]}),Dd=({className:e,...t})=>d.jsx(Fe.List,{"data-slot":"command-list",className:I("volt-ui-scroll-py-1 volt-ui-overflow-x-hidden volt-ui-overflow-y-auto",e),...t}),Ld=({...e})=>d.jsx(Fe.Empty,{"data-slot":"command-empty",className:"volt-ui-py-6 volt-ui-text-center volt-ui-text-sm",...e}),Fd=({className:e,...t})=>d.jsx(Fe.Group,{"data-slot":"command-group",className:I("volt-ui-text-foreground volt-ui-**:[[cmdk-group-heading]]:text-gray-light volt-ui-overflow-hidden volt-ui-p-1 volt-ui-**:[[cmdk-group-heading]]:px-2 volt-ui-**:[[cmdk-group-heading]]:py-1.5 volt-ui-**:[[cmdk-group-heading]]:text-xs volt-ui-**:[[cmdk-group-heading]]:font-medium",e),...t}),$d=({className:e,...t})=>d.jsx(Fe.Separator,{"data-slot":"command-separator",className:I("volt-ui-bg-gray-soft volt-ui--mx-1 volt-ui-h-px",e),...t}),Bd=({className:e,...t})=>d.jsx(Fe.Item,{"data-slot":"command-item",className:I("volt-ui-data-[selected=true]:bg-accent-a3 volt-ui-data-[selected=true]:text-gray-default [&_svg:not([class*='volt-ui-text-'])]:text-gray-light volt-ui-relative volt-ui-flex volt-ui-cursor-default volt-ui-items-center volt-ui-gap-2 volt-ui-rounded-sm volt-ui-px-2 volt-ui-py-1.5 volt-ui-text-sm volt-ui-outline-hidden volt-ui-select-none volt-ui-data-[disabled=true]:pointer-events-none volt-ui-data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='volt-ui-size-'])]:size-4",e),...t}),qd=({className:e,...t})=>d.jsx(Fe.Loading,{"data-slot":"volt-ui-command-loading",className:I("volt-ui-text-gray-light",e),...t}),zd=["top","right","bottom","left"],De=Math.min,ce=Math.max,Wt=Math.round,Lt=Math.floor,Ce=e=>({x:e,y:e}),Vd={left:"right",right:"left",bottom:"top",top:"bottom"},Wd={start:"end",end:"start"};function Vo(e,t,o){return ce(e,De(t,o))}function Te(e,t){return typeof e=="function"?e(t):e}function ke(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function fn(e){return e==="x"?"y":"x"}function pn(e){return e==="y"?"height":"width"}const Gd=new Set(["top","bottom"]);function we(e){return Gd.has(ke(e))?"y":"x"}function vn(e){return fn(we(e))}function Hd(e,t,o){o===void 0&&(o=!1);const n=lt(e),r=vn(e),i=pn(r);let a=r==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Gt(a)),[a,Gt(a)]}function Ud(e){const t=Gt(e);return[Wo(e),t,Wo(t)]}function Wo(e){return e.replace(/start|end/g,t=>Wd[t])}const ar=["left","right"],sr=["right","left"],Kd=["top","bottom"],Yd=["bottom","top"];function Zd(e,t,o){switch(e){case"top":case"bottom":return o?t?sr:ar:t?ar:sr;case"left":case"right":return t?Kd:Yd;default:return[]}}function Xd(e,t,o,n){const r=lt(e);let i=Zd(ke(e),o==="start",n);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(Wo)))),i}function Gt(e){return e.replace(/left|right|bottom|top/g,t=>Vd[t])}function Qd(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mi(e){return typeof e!="number"?Qd(e):{top:e,right:e,bottom:e,left:e}}function Ht(e){const{x:t,y:o,width:n,height:r}=e;return{width:n,height:r,top:o,left:t,right:t+n,bottom:o+r,x:t,y:o}}function lr(e,t,o){let{reference:n,floating:r}=e;const i=we(t),a=vn(t),s=pn(a),c=ke(t),u=i==="y",f=n.x+n.width/2-r.width/2,p=n.y+n.height/2-r.height/2,g=n[s]/2-r[s]/2;let m;switch(c){case"top":m={x:f,y:n.y-r.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-r.width,y:p};break;default:m={x:n.x,y:n.y}}switch(lt(t)){case"start":m[a]-=g*(o&&u?-1:1);break;case"end":m[a]+=g*(o&&u?-1:1);break}return m}const Jd=async(e,t,o)=>{const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:a}=o,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:p}=lr(u,n,c),g=n,m={},b=0;for(let v=0;v<s.length;v++){const{name:h,fn:y}=s[v],{x,y:w,data:C,reset:S}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:r,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});f=x??f,p=w??p,m={...m,[h]:{...m[h],...C}},S&&b<=50&&(b++,typeof S=="object"&&(S.placement&&(g=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:f,y:p}=lr(u,g,c)),v=-1)}return{x:f,y:p,placement:g,strategy:r,middlewareData:m}};async function xt(e,t){var o;t===void 0&&(t={});const{x:n,y:r,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=Te(t,e),b=Mi(m),h=s[g?p==="floating"?"reference":"floating":p],y=Ht(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(h)))==null||o?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:c})),x=p==="floating"?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},S=Ht(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:c}):x);return{top:(y.top-S.top+b.top)/C.y,bottom:(S.bottom-y.bottom+b.bottom)/C.y,left:(y.left-S.left+b.left)/C.x,right:(S.right-y.right+b.right)/C.x}}const ef=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:n,placement:r,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:u,padding:f=0}=Te(e,t)||{};if(u==null)return{};const p=Mi(f),g={x:o,y:n},m=vn(r),b=pn(m),v=await a.getDimensions(u),h=m==="y",y=h?"top":"left",x=h?"bottom":"right",w=h?"clientHeight":"clientWidth",C=i.reference[b]+i.reference[m]-g[m]-i.floating[b],S=g[m]-i.reference[m],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=k?k[w]:0;(!E||!await(a.isElement==null?void 0:a.isElement(k)))&&(E=s.floating[w]||i.floating[b]);const R=C/2-S/2,F=E/2-v[b]/2-1,B=De(p[y],F),K=De(p[x],F),Y=B,Z=E-v[b]-K,q=E/2-v[b]/2+R,G=Vo(Y,q,Z),M=!c.arrow&<(r)!=null&&q!==G&&i.reference[b]/2-(q<Y?B:K)-v[b]/2<0,z=M?q<Y?q-Y:q-Z:0;return{[m]:g[m]+z,data:{[m]:G,centerOffset:q-G-z,...M&&{alignmentOffset:z}},reset:M}}}),tf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...h}=Te(e,t);if((o=i.arrow)!=null&&o.alignmentOffset)return{};const y=ke(r),x=we(s),w=ke(s)===s,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),S=g||(w||!v?[Gt(s)]:Ud(s)),k=b!=="none";!g&&k&&S.push(...Xd(s,v,b,C));const E=[s,...S],R=await xt(t,h),F=[];let B=((n=i.flip)==null?void 0:n.overflows)||[];if(f&&F.push(R[y]),p){const q=Hd(r,a,C);F.push(R[q[0]],R[q[1]])}if(B=[...B,{placement:r,overflows:F}],!F.every(q=>q<=0)){var K,Y;const q=(((K=i.flip)==null?void 0:K.index)||0)+1,G=E[q];if(G&&(!(p==="alignment"?x!==we(G):!1)||B.every(T=>we(T.placement)===x?T.overflows[0]>0:!0)))return{data:{index:q,overflows:B},reset:{placement:G}};let M=(Y=B.filter(z=>z.overflows[0]<=0).sort((z,T)=>z.overflows[1]-T.overflows[1])[0])==null?void 0:Y.placement;if(!M)switch(m){case"bestFit":{var Z;const z=(Z=B.filter(T=>{if(k){const te=we(T.placement);return te===x||te==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(te=>te>0).reduce((te,ne)=>te+ne,0)]).sort((T,te)=>T[1]-te[1])[0])==null?void 0:Z[0];z&&(M=z);break}case"initialPlacement":M=s;break}if(r!==M)return{reset:{placement:M}}}return{}}}};function cr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ur(e){return zd.some(t=>e[t]>=0)}const of=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o}=t,{strategy:n="referenceHidden",...r}=Te(e,t);switch(n){case"referenceHidden":{const i=await xt(t,{...r,elementContext:"reference"}),a=cr(i,o.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ur(a)}}}case"escaped":{const i=await xt(t,{...r,altBoundary:!0}),a=cr(i,o.floating);return{data:{escapedOffsets:a,escaped:ur(a)}}}default:return{}}}}},Di=new Set(["left","top"]);async function nf(e,t){const{placement:o,platform:n,elements:r}=e,i=await(n.isRTL==null?void 0:n.isRTL(r.floating)),a=ke(o),s=lt(o),c=we(o)==="y",u=Di.has(a)?-1:1,f=i&&c?-1:1,p=Te(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof b=="number"&&(m=s==="end"?b*-1:b),c?{x:m*f,y:g*u}:{x:g*u,y:m*f}}const rf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:r,y:i,placement:a,middlewareData:s}=t,c=await nf(t,e);return a===((o=s.offset)==null?void 0:o.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:a}}}}},af=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:y,y:x}=h;return{x:y,y:x}}},...c}=Te(e,t),u={x:o,y:n},f=await xt(t,c),p=we(ke(r)),g=fn(p);let m=u[g],b=u[p];if(i){const h=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=m+f[h],w=m-f[y];m=Vo(x,m,w)}if(a){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=b+f[h],w=b-f[y];b=Vo(x,b,w)}const v=s.fn({...t,[g]:m,[p]:b});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[g]:i,[p]:a}}}}}},sf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:n,placement:r,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Te(e,t),f={x:o,y:n},p=we(r),g=fn(p);let m=f[g],b=f[p];const v=Te(s,t),h=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const w=g==="y"?"height":"width",C=i.reference[g]-i.floating[w]+h.mainAxis,S=i.reference[g]+i.reference[w]-h.mainAxis;m<C?m=C:m>S&&(m=S)}if(u){var y,x;const w=g==="y"?"width":"height",C=Di.has(ke(r)),S=i.reference[p]-i.floating[w]+(C&&((y=a.offset)==null?void 0:y[p])||0)+(C?0:h.crossAxis),k=i.reference[p]+i.reference[w]+(C?0:((x=a.offset)==null?void 0:x[p])||0)-(C?h.crossAxis:0);b<S?b=S:b>k&&(b=k)}return{[g]:m,[p]:b}}}},lf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,n;const{placement:r,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...u}=Te(e,t),f=await xt(t,u),p=ke(r),g=lt(r),m=we(r)==="y",{width:b,height:v}=i.floating;let h,y;p==="top"||p==="bottom"?(h=p,y=g===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=p,h=g==="end"?"top":"bottom");const x=v-f.top-f.bottom,w=b-f.left-f.right,C=De(v-f[h],x),S=De(b-f[y],w),k=!t.middlewareData.shift;let E=C,R=S;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(R=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=x),k&&!g){const B=ce(f.left,0),K=ce(f.right,0),Y=ce(f.top,0),Z=ce(f.bottom,0);m?R=b-2*(B!==0||K!==0?B+K:ce(f.left,f.right)):E=v-2*(Y!==0||Z!==0?Y+Z:ce(f.top,f.bottom))}await c({...t,availableWidth:R,availableHeight:E});const F=await a.getDimensions(s.floating);return b!==F.width||v!==F.height?{reset:{rects:!0}}:{}}}};function oo(){return typeof window<"u"}function ct(e){return Li(e)?(e.nodeName||"").toLowerCase():"#document"}function ue(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ee(e){var t;return(t=(Li(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Li(e){return oo()?e instanceof Node||e instanceof ue(e).Node:!1}function ve(e){return oo()?e instanceof Element||e instanceof ue(e).Element:!1}function Se(e){return oo()?e instanceof HTMLElement||e instanceof ue(e).HTMLElement:!1}function dr(e){return!oo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ue(e).ShadowRoot}const cf=new Set(["inline","contents"]);function Et(e){const{overflow:t,overflowX:o,overflowY:n,display:r}=me(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!cf.has(r)}const uf=new Set(["table","td","th"]);function df(e){return uf.has(ct(e))}const ff=[":popover-open",":modal"];function no(e){return ff.some(t=>{try{return e.matches(t)}catch{return!1}})}const pf=["transform","translate","scale","rotate","perspective"],vf=["transform","translate","scale","rotate","perspective","filter"],mf=["paint","layout","strict","content"];function mn(e){const t=gn(),o=ve(e)?me(e):e;return pf.some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||vf.some(n=>(o.willChange||"").includes(n))||mf.some(n=>(o.contain||"").includes(n))}function gf(e){let t=Le(e);for(;Se(t)&&!nt(t);){if(mn(t))return t;if(no(t))return null;t=Le(t)}return null}function gn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const hf=new Set(["html","body","#document"]);function nt(e){return hf.has(ct(e))}function me(e){return ue(e).getComputedStyle(e)}function ro(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Le(e){if(ct(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dr(e)&&e.host||Ee(e);return dr(t)?t.host:t}function Fi(e){const t=Le(e);return nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Se(t)&&Et(t)?t:Fi(t)}function bt(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);const r=Fi(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=ue(r);if(i){const s=Go(a);return t.concat(a,a.visualViewport||[],Et(r)?r:[],s&&o?bt(s):[])}return t.concat(r,bt(r,[],o))}function Go(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $i(e){const t=me(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=Se(e),i=r?e.offsetWidth:o,a=r?e.offsetHeight:n,s=Wt(o)!==i||Wt(n)!==a;return s&&(o=i,n=a),{width:o,height:n,$:s}}function hn(e){return ve(e)?e:e.contextElement}function tt(e){const t=hn(e);if(!Se(t))return Ce(1);const o=t.getBoundingClientRect(),{width:n,height:r,$:i}=$i(t);let a=(i?Wt(o.width):o.width)/n,s=(i?Wt(o.height):o.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const xf=Ce(0);function Bi(e){const t=ue(e);return!gn()||!t.visualViewport?xf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bf(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ue(e)?!1:t}function Ge(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const r=e.getBoundingClientRect(),i=hn(e);let a=Ce(1);t&&(n?ve(n)&&(a=tt(n)):a=tt(e));const s=bf(i,o,n)?Bi(i):Ce(0);let c=(r.left+s.x)/a.x,u=(r.top+s.y)/a.y,f=r.width/a.x,p=r.height/a.y;if(i){const g=ue(i),m=n&&ve(n)?ue(n):n;let b=g,v=Go(b);for(;v&&n&&m!==b;){const h=tt(v),y=v.getBoundingClientRect(),x=me(v),w=y.left+(v.clientLeft+parseFloat(x.paddingLeft))*h.x,C=y.top+(v.clientTop+parseFloat(x.paddingTop))*h.y;c*=h.x,u*=h.y,f*=h.x,p*=h.y,c+=w,u+=C,b=ue(v),v=Go(b)}}return Ht({width:f,height:p,x:c,y:u})}function io(e,t){const o=ro(e).scrollLeft;return t?t.left+o:Ge(Ee(e)).left+o}function qi(e,t){const o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-io(e,o),r=o.top+t.scrollTop;return{x:n,y:r}}function yf(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e;const i=r==="fixed",a=Ee(n),s=t?no(t.floating):!1;if(n===a||s&&i)return o;let c={scrollLeft:0,scrollTop:0},u=Ce(1);const f=Ce(0),p=Se(n);if((p||!p&&!i)&&((ct(n)!=="body"||Et(a))&&(c=ro(n)),Se(n))){const m=Ge(n);u=tt(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=a&&!p&&!i?qi(a,c):Ce(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-c.scrollLeft*u.x+f.x+g.x,y:o.y*u.y-c.scrollTop*u.y+f.y+g.y}}function wf(e){return Array.from(e.getClientRects())}function Cf(e){const t=Ee(e),o=ro(e),n=e.ownerDocument.body,r=ce(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=ce(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-o.scrollLeft+io(e);const s=-o.scrollTop;return me(n).direction==="rtl"&&(a+=ce(t.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:s}}const fr=25;function Sf(e,t){const o=ue(e),n=Ee(e),r=o.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,c=0;if(r){i=r.width,a=r.height;const f=gn();(!f||f&&t==="fixed")&&(s=r.offsetLeft,c=r.offsetTop)}const u=io(n);if(u<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(n.clientWidth-p.clientWidth-m);b<=fr&&(i-=b)}else u<=fr&&(i+=u);return{width:i,height:a,x:s,y:c}}const Rf=new Set(["absolute","fixed"]);function Ef(e,t){const o=Ge(e,!0,t==="fixed"),n=o.top+e.clientTop,r=o.left+e.clientLeft,i=Se(e)?tt(e):Ce(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=r*i.x,u=n*i.y;return{width:a,height:s,x:c,y:u}}function pr(e,t,o){let n;if(t==="viewport")n=Sf(e,o);else if(t==="document")n=Cf(Ee(e));else if(ve(t))n=Ef(t,o);else{const r=Bi(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Ht(n)}function zi(e,t){const o=Le(e);return o===t||!ve(o)||nt(o)?!1:me(o).position==="fixed"||zi(o,t)}function Pf(e,t){const o=t.get(e);if(o)return o;let n=bt(e,[],!1).filter(s=>ve(s)&&ct(s)!=="body"),r=null;const i=me(e).position==="fixed";let a=i?Le(e):e;for(;ve(a)&&!nt(a);){const s=me(a),c=mn(a);!c&&s.position==="fixed"&&(r=null),(i?!c&&!r:!c&&s.position==="static"&&!!r&&Rf.has(r.position)||Et(a)&&!c&&zi(e,a))?n=n.filter(f=>f!==a):r=s,a=Le(a)}return t.set(e,n),n}function Tf(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e;const a=[...o==="clippingAncestors"?no(t)?[]:Pf(t,this._c):[].concat(o),n],s=a[0],c=a.reduce((u,f)=>{const p=pr(t,f,r);return u.top=ce(p.top,u.top),u.right=De(p.right,u.right),u.bottom=De(p.bottom,u.bottom),u.left=ce(p.left,u.left),u},pr(t,s,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function kf(e){const{width:t,height:o}=$i(e);return{width:t,height:o}}function Af(e,t,o){const n=Se(t),r=Ee(t),i=o==="fixed",a=Ge(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=Ce(0);function u(){c.x=io(r)}if(n||!n&&!i)if((ct(t)!=="body"||Et(r))&&(s=ro(t)),n){const m=Ge(t,!0,i,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else r&&u();i&&!n&&r&&u();const f=r&&!n&&!i?qi(r,s):Ce(0),p=a.left+s.scrollLeft-c.x-f.x,g=a.top+s.scrollTop-c.y-f.y;return{x:p,y:g,width:a.width,height:a.height}}function Mo(e){return me(e).position==="static"}function vr(e,t){if(!Se(e)||me(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Ee(e)===o&&(o=o.ownerDocument.body),o}function Vi(e,t){const o=ue(e);if(no(e))return o;if(!Se(e)){let r=Le(e);for(;r&&!nt(r);){if(ve(r)&&!Mo(r))return r;r=Le(r)}return o}let n=vr(e,t);for(;n&&df(n)&&Mo(n);)n=vr(n,t);return n&&nt(n)&&Mo(n)&&!mn(n)?o:n||gf(e)||o}const If=async function(e){const t=this.getOffsetParent||Vi,o=this.getDimensions,n=await o(e.floating);return{reference:Af(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Nf(e){return me(e).direction==="rtl"}const jf={convertOffsetParentRelativeRectToViewportRelativeRect:yf,getDocumentElement:Ee,getClippingRect:Tf,getOffsetParent:Vi,getElementRects:If,getClientRects:wf,getDimensions:kf,getScale:tt,isElement:ve,isRTL:Nf};function Wi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Of(e,t){let o=null,n;const r=Ee(e);function i(){var s;clearTimeout(n),(s=o)==null||s.disconnect(),o=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=u;if(s||t(),!g||!m)return;const b=Lt(p),v=Lt(r.clientWidth-(f+g)),h=Lt(r.clientHeight-(p+m)),y=Lt(f),w={rootMargin:-b+"px "+-v+"px "+-h+"px "+-y+"px",threshold:ce(0,De(1,c))||1};let C=!0;function S(k){const E=k[0].intersectionRatio;if(E!==c){if(!C)return a();E?a(!1,E):n=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!Wi(u,e.getBoundingClientRect())&&a(),C=!1}try{o=new IntersectionObserver(S,{...w,root:r.ownerDocument})}catch{o=new IntersectionObserver(S,w)}o.observe(e)}return a(!0),i}function _f(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=hn(e),f=r||i?[...u?bt(u):[],...bt(t)]:[];f.forEach(y=>{r&&y.addEventListener("scroll",o,{passive:!0}),i&&y.addEventListener("resize",o)});const p=u&&s?Of(u,o):null;let g=-1,m=null;a&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),o()}),u&&!c&&m.observe(u),m.observe(t));let b,v=c?Ge(e):null;c&&h();function h(){const y=Ge(e);v&&!Wi(v,y)&&o(),v=y,b=requestAnimationFrame(h)}return o(),()=>{var y;f.forEach(x=>{r&&x.removeEventListener("scroll",o),i&&x.removeEventListener("resize",o)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(b)}}const Mf=rf,Df=af,Lf=tf,Ff=lf,$f=of,mr=ef,Bf=sf,qf=(e,t,o)=>{const n=new Map,r={platform:jf,...o},i={...r.platform,_c:n};return Jd(e,t,{...r,platform:i})};var zf=typeof document<"u",Vf=function(){},Bt=zf?oe.useLayoutEffect:Vf;function Ut(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 o,n,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!Ut(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=o;n--!==0;){const i=r[n];if(!(i==="_owner"&&e.$$typeof)&&!Ut(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Gi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gr(e,t){const o=Gi(e);return Math.round(t*o)/o}function Do(e){const t=l.useRef(e);return Bt(()=>{t.current=e}),t}function Wf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:r,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,p]=l.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=l.useState(n);Ut(g,n)||m(n);const[b,v]=l.useState(null),[h,y]=l.useState(null),x=l.useCallback(T=>{T!==k.current&&(k.current=T,v(T))},[]),w=l.useCallback(T=>{T!==E.current&&(E.current=T,y(T))},[]),C=i||b,S=a||h,k=l.useRef(null),E=l.useRef(null),R=l.useRef(f),F=c!=null,B=Do(c),K=Do(r),Y=Do(u),Z=l.useCallback(()=>{if(!k.current||!E.current)return;const T={placement:t,strategy:o,middleware:g};K.current&&(T.platform=K.current),qf(k.current,E.current,T).then(te=>{const ne={...te,isPositioned:Y.current!==!1};q.current&&!Ut(R.current,ne)&&(R.current=ne,Zt.flushSync(()=>{p(ne)}))})},[g,t,o,K,Y]);Bt(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(T=>({...T,isPositioned:!1})))},[u]);const q=l.useRef(!1);Bt(()=>(q.current=!0,()=>{q.current=!1}),[]),Bt(()=>{if(C&&(k.current=C),S&&(E.current=S),C&&S){if(B.current)return B.current(C,S,Z);Z()}},[C,S,Z,B,F]);const G=l.useMemo(()=>({reference:k,floating:E,setReference:x,setFloating:w}),[x,w]),M=l.useMemo(()=>({reference:C,floating:S}),[C,S]),z=l.useMemo(()=>{const T={position:o,left:0,top:0};if(!M.floating)return T;const te=gr(M.floating,f.x),ne=gr(M.floating,f.y);return s?{...T,transform:"translate("+te+"px, "+ne+"px)",...Gi(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:te,top:ne}},[o,s,M.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:Z,refs:G,elements:M,floatingStyles:z}),[f,Z,G,M,z])}const Gf=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:n,padding:r}=typeof e=="function"?e(o):e;return n&&t(n)?n.current!=null?mr({element:n.current,padding:r}).fn(o):{}:n?mr({element:n,padding:r}).fn(o):{}}}},Hf=(e,t)=>({...Mf(e),options:[e,t]}),Uf=(e,t)=>({...Df(e),options:[e,t]}),Kf=(e,t)=>({...Bf(e),options:[e,t]}),Yf=(e,t)=>({...Lf(e),options:[e,t]}),Zf=(e,t)=>({...Ff(e),options:[e,t]}),Xf=(e,t)=>({...$f(e),options:[e,t]}),Qf=(e,t)=>({...Gf(e),options:[e,t]});var Jf="Arrow",Hi=l.forwardRef((e,t)=>{const{children:o,width:n=10,height:r=5,...i}=e;return d.jsx($.svg,{...i,ref:t,width:n,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Hi.displayName=Jf;var ep=Hi;function ao(e){const[t,o]=l.useState(void 0);return ae(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;o({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else o(void 0)},[e]),t}var xn="Popper",[Ui,ut]=de(xn),[tp,Ki]=Ui(xn),Yi=e=>{const{__scopePopper:t,children:o}=e,[n,r]=l.useState(null);return d.jsx(tp,{scope:t,anchor:n,onAnchorChange:r,children:o})};Yi.displayName=xn;var Zi="PopperAnchor",Xi=l.forwardRef((e,t)=>{const{__scopePopper:o,virtualRef:n,...r}=e,i=Ki(Zi,o),a=l.useRef(null),s=Q(t,a),c=l.useRef(null);return l.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||a.current,u!==c.current&&i.onAnchorChange(c.current)}),n?null:d.jsx($.div,{...r,ref:s})});Xi.displayName=Zi;var bn="PopperContent",[op,np]=Ui(bn),Qi=l.forwardRef((e,t)=>{var A,V,U,X,ee,J;const{__scopePopper:o,side:n="bottom",sideOffset:r=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:b,...v}=e,h=Ki(bn,o),[y,x]=l.useState(null),w=Q(t,le=>x(le)),[C,S]=l.useState(null),k=ao(C),E=(k==null?void 0:k.width)??0,R=(k==null?void 0:k.height)??0,F=n+(i!=="center"?"-"+i:""),B=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},K=Array.isArray(u)?u:[u],Y=K.length>0,Z={padding:B,boundary:K.filter(ip),altBoundary:Y},{refs:q,floatingStyles:G,placement:M,isPositioned:z,middlewareData:T}=Wf({strategy:"fixed",placement:F,whileElementsMounted:(...le)=>_f(...le,{animationFrame:m==="always"}),elements:{reference:h.anchor},middleware:[Hf({mainAxis:r+R,alignmentAxis:a}),c&&Uf({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Kf():void 0,...Z}),c&&Yf({...Z}),Zf({...Z,apply:({elements:le,rects:be,availableWidth:ft,availableHeight:pt})=>{const{width:vt,height:il}=be.reference,At=le.floating.style;At.setProperty("--radix-popper-available-width",`${ft}px`),At.setProperty("--radix-popper-available-height",`${pt}px`),At.setProperty("--radix-popper-anchor-width",`${vt}px`),At.setProperty("--radix-popper-anchor-height",`${il}px`)}}),C&&Qf({element:C,padding:s}),ap({arrowWidth:E,arrowHeight:R}),g&&Xf({strategy:"referenceHidden",...Z})]}),[te,ne]=ta(M),se=_e(b);ae(()=>{z&&(se==null||se())},[z,se]);const P=(A=T.arrow)==null?void 0:A.x,O=(V=T.arrow)==null?void 0:V.y,D=((U=T.arrow)==null?void 0:U.centerOffset)!==0,[_,H]=l.useState();return ae(()=>{y&&H(window.getComputedStyle(y).zIndex)},[y]),d.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:z?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_,"--radix-popper-transform-origin":[(X=T.transformOrigin)==null?void 0:X.x,(ee=T.transformOrigin)==null?void 0:ee.y].join(" "),...((J=T.hide)==null?void 0:J.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(op,{scope:o,placedSide:te,onArrowChange:S,arrowX:P,arrowY:O,shouldHideArrow:D,children:d.jsx($.div,{"data-side":te,"data-align":ne,...v,ref:w,style:{...v.style,animation:z?void 0:"none"}})})})});Qi.displayName=bn;var Ji="PopperArrow",rp={top:"bottom",right:"left",bottom:"top",left:"right"},ea=l.forwardRef(function(t,o){const{__scopePopper:n,...r}=t,i=np(Ji,n),a=rp[i.placedSide];return d.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:d.jsx(ep,{...r,ref:o,style:{...r.style,display:"block"}})})});ea.displayName=Ji;function ip(e){return e!==null}var ap=e=>({name:"transformOrigin",options:e,fn(t){var h,y,x;const{placement:o,rects:n,middlewareData:r}=t,a=((h=r.arrow)==null?void 0:h.centerOffset)!==0,s=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,f]=ta(o),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=r.arrow)==null?void 0:y.x)??0)+s/2,m=(((x=r.arrow)==null?void 0:x.y)??0)+c/2;let b="",v="";return u==="bottom"?(b=a?p:`${g}px`,v=`${-c}px`):u==="top"?(b=a?p:`${g}px`,v=`${n.floating.height+c}px`):u==="right"?(b=`${-c}px`,v=a?p:`${m}px`):u==="left"&&(b=`${n.floating.width+c}px`,v=a?p:`${m}px`),{data:{x:b,y:v}}}});function ta(e){const[t,o="center"]=e.split("-");return[t,o]}var yn=Yi,so=Xi,wn=Qi,Cn=ea,lo="Popover",[oa]=de(lo,[ut]),Pt=ut(),[sp,$e]=oa(lo),na=e=>{const{__scopePopover:t,children:o,open:n,defaultOpen:r,onOpenChange:i,modal:a=!1}=e,s=Pt(t),c=l.useRef(null),[u,f]=l.useState(!1),[p,g]=fe({prop:n,defaultProp:r??!1,onChange:i,caller:lo});return d.jsx(yn,{...s,children:d.jsx(sp,{scope:t,contentId:ie(),triggerRef:c,open:p,onOpenChange:g,onOpenToggle:l.useCallback(()=>g(m=>!m),[g]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:a,children:o})})};na.displayName=lo;var ra="PopoverAnchor",ia=l.forwardRef((e,t)=>{const{__scopePopover:o,...n}=e,r=$e(ra,o),i=Pt(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=r;return l.useEffect(()=>(a(),()=>s()),[a,s]),d.jsx(so,{...i,...n,ref:t})});ia.displayName=ra;var aa="PopoverTrigger",sa=l.forwardRef((e,t)=>{const{__scopePopover:o,...n}=e,r=$e(aa,o),i=Pt(o),a=Q(t,r.triggerRef),s=d.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":fa(r.open),...n,ref:a,onClick:L(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?s:d.jsx(so,{asChild:!0,...i,children:s})});sa.displayName=aa;var Sn="PopoverPortal",[lp,cp]=oa(Sn,{forceMount:void 0}),la=e=>{const{__scopePopover:t,forceMount:o,children:n,container:r}=e,i=$e(Sn,t);return d.jsx(lp,{scope:t,forceMount:o,children:d.jsx(ge,{present:o||i.open,children:d.jsx(St,{asChild:!0,container:r,children:n})})})};la.displayName=Sn;var rt="PopoverContent",ca=l.forwardRef((e,t)=>{const o=cp(rt,e.__scopePopover),{forceMount:n=o.forceMount,...r}=e,i=$e(rt,e.__scopePopover);return d.jsx(ge,{present:n||i.open,children:i.modal?d.jsx(dp,{...r,ref:t}):d.jsx(fp,{...r,ref:t})})});ca.displayName=rt;var up=ot("PopoverContent.RemoveScroll"),dp=l.forwardRef((e,t)=>{const o=$e(rt,e.__scopePopover),n=l.useRef(null),r=Q(t,n),i=l.useRef(!1);return l.useEffect(()=>{const a=n.current;if(a)return sn(a)},[]),d.jsx(Jt,{as:up,allowPinchZoom:!0,children:d.jsx(ua,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:L(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=o.triggerRef.current)==null||s.focus()}),onPointerDownOutside:L(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,u=s.button===2||c;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:L(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),fp=l.forwardRef((e,t)=>{const o=$e(rt,e.__scopePopover),n=l.useRef(!1),r=l.useRef(!1);return d.jsx(ua,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(n.current||(s=o.triggerRef.current)==null||s.focus(),i.preventDefault()),n.current=!1,r.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=i.target;((u=o.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),ua=l.forwardRef((e,t)=>{const{__scopePopover:o,trapFocus:n,onOpenAutoFocus:r,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...p}=e,g=$e(rt,o),m=Pt(o);return an(),d.jsx(Xt,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:r,onUnmountAutoFocus:i,children:d.jsx(Ct,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),children:d.jsx(wn,{"data-state":fa(g.open),role:"dialog",id:g.contentId,...m,...p,ref:t,style:{...p.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)"}})})})}),da="PopoverClose",pp=l.forwardRef((e,t)=>{const{__scopePopover:o,...n}=e,r=$e(da,o);return d.jsx($.button,{type:"button",...n,ref:t,onClick:L(e.onClick,()=>r.onOpenChange(!1))})});pp.displayName=da;var vp="PopoverArrow",mp=l.forwardRef((e,t)=>{const{__scopePopover:o,...n}=e,r=Pt(o);return d.jsx(Cn,{...r,...n,ref:t})});mp.displayName=vp;function fa(e){return e?"open":"closed"}var pa=na,gp=ia,va=sa,hp=la,ma=ca;const xp=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z"})}),bp=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M459-381 314-526q-3-3-4.5-6.5T308-540q0-8 5.5-14t14.5-6h304q9 0 14.5 6t5.5 14q0 2-6 14L501-381q-5 5-10 7t-11 2q-6 0-11-2t-10-7Z"})}),ga=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z"})}),yp=({...e})=>d.jsx(pa,{"data-slot":"combobox",...e}),wp=({className:e,...t})=>d.jsx(Fd,{"data-slot":"combobox-group",className:I("volt-ui-p-0!",e),...t}),Cp=({className:e,...t})=>d.jsx(rn,{"data-slot":"combobox-group-label",className:I("volt-ui-text-gray volt-ui-font-semibold volt-ui-px-2 volt-ui-py-1.5 volt-ui-text-xs",e),...t}),Sp=({className:e,children:t,...o})=>d.jsx("div",{"data-slot":"combobox-value",className:I("volt-ui-text-gray-default volt-ui-w-full volt-ui-text-left volt-ui-flex-wrap volt-ui-flex volt-ui-gap-2 volt-ui-relative",e),...o,children:t}),Rp=l.forwardRef(({className:e,children:t,...o},n)=>{const{inputRef:r}=wt();return d.jsxs(va,{ref:i=>{r&&(r.current=i),typeof n=="function"?n(i):n&&(n.current=i)},"data-slot":"select-trigger",className:I("volt-ui-group volt-ui-data-placeholder:text-gray-a8 volt-ui-w-full volt-ui-flex volt-ui-items-center volt-ui-justify-between volt-ui-gap-2 volt-ui-rounded-lg volt-ui-bg-transparent volt-ui-text-sm volt-ui-whitespace-nowrap volt-ui-transition-[color,box-shadow] volt-ui-outline-none volt-ui-disabled:cursor-not-allowed volt-ui-disabled:opacity-50 volt-ui-*:data-[slot=select-value]:line-clamp-1 volt-ui-*:data-[slot=select-value]:flex volt-ui-*:data-[slot=select-value]:items-center volt-ui-*:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...o,children:[t,d.jsx(bp,{className:"volt-ui-transition-all volt-ui-size-6 volt-ui-group-data-[selected=open]:rotate-180 volt-ui-text-gray-light"})]})}),Ep=({className:e,children:t,...o})=>d.jsx(ma,{"data-slot":"combobox-content",className:I("volt-ui-bg-body volt-ui-gap-1 volt-ui-text-gray-default volt-ui-data-[selected=open]:animate-in volt-ui-data-[selected=closed]:animate-out volt-ui-data-[selected=closed]:fade-out-0 volt-ui-data-[selected=open]:fade-in-0 volt-ui-data-[selected=closed]:zoom-out-95 volt-ui-data-[selected=open]:zoom-in-95 volt-ui-data-[side=bottom]:slide-in-from-top-2 volt-ui-data-[side=left]:slide-in-from-right-2 volt-ui-data-[side=right]:slide-in-from-left-2 volt-ui-data-[side=top]:slide-in-from-bottom-2 volt-ui-relative volt-ui-z-50 volt-ui-origin-(--radix-select-content-transform-origin) volt-ui-overflow-x-hidden volt-ui-overflow-y-auto volt-ui-rounded-2xl volt-ui-border volt-ui-shadow-md","volt-ui-w-(--radix-popover-trigger-width) volt-ui-max-h-(--radix-popper-available-height)",e),...o,children:d.jsx(_d,{"data-slot":"combobox-command",className:"volt-ui-w-full volt-ui-rounded-none",children:t})}),Pp=({className:e,...t})=>d.jsx(Md,{"data-slot":"combobox-command-input",className:I("volt-ui-w-full volt-ui-placeholder:text-gray-a8",e),...t}),Tp=({className:e,...t})=>d.jsx(Dd,{"data-slot":"combobox-command-list",className:I("volt-ui-px-2 volt-ui-py-3",e),...t}),kp=({className:e,children:t,...o})=>d.jsx(Bd,{"data-slot":"combobox-item",className:I("volt-ui-pl-3 volt-ui-py-1.5 volt-ui-not-first:mt-0.5 volt-ui-text-gray-default [&_svg:not([class*='volt-ui-text-'])]:text-gray-default volt-ui-relative volt-ui-flex volt-ui-w-full volt-ui-cursor-default volt-ui-items-center volt-ui-gap-2 volt-ui-rounded-md! volt-ui-pr-8 volt-ui-text-sm volt-ui-outline-none volt-ui-select-none volt-ui-data-[disabled=true]:pointer-events-none volt-ui-data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 volt-ui-*:[span]:last:flex volt-ui-*:[span]:last:items-center volt-ui-*:[span]:last:gap-2","volt-ui-hover:bg-accent-a3 volt-ui-focus:bg-accent-a3 volt-ui-data-[selected=true]:bg-accent-a3",e),...o,children:t}),Ap=({className:e,...t})=>d.jsx(Ld,{"data-slot":"volt-ui-combobox-empty",className:I("volt-ui-py-6 volt-ui-text-center volt-ui-text-gray-default volt-ui-text-sm",e),...t}),Ip=({className:e,...t})=>d.jsx($d,{"data-slot":"volt-ui-select-separator",className:I("volt-ui-bg-gray-soft volt-ui-pointer-events-none volt-ui--mx-1 volt-ui-my-2 volt-ui-h-px",e),...t}),Np=({className:e})=>d.jsx("span",{className:"volt-ui-absolute volt-ui-right-2 volt-ui-flex volt-ui-size-4 volt-ui-items-center volt-ui-justify-center",children:d.jsx(xp,{className:I("volt-ui-size-4 volt-ui-text-gray-default",e)})}),jp=({className:e,...t})=>d.jsx(qd,{"data-slot":"volt-ui-combobox-command-loading",className:I("volt-ui-text-gray-light volt-ui-px-3 volt-ui-py-2",e),...t}),Op=({className:e,onClick:t,...o})=>d.jsx("span",{className:I("volt-ui-p-0.5! volt-ui-min-h-auto volt-ui-absolute volt-ui-right-11 volt-ui-cursor-pointer",nn({variant:"primary",size:"xs"}),e),role:"button",tabIndex:0,onMouseDown:n=>{var r;n.preventDefault(),(r=o.onMouseDown)==null||r.call(o,n)},onClick:n=>{n.preventDefault(),n.stopPropagation(),t==null||t(n)},...o,children:d.jsx(ga,{className:"volt-ui-transition-all volt-ui-text-accent-contrast volt-ui-size-4 volt-ui-group-data-[selected=open]:rotate-180"})}),_p=({className:e,...t})=>d.jsx("span",{className:I("volt-ui-text-gray-a8",e),...t}),Mp=({className:e,onClick:t,...o})=>d.jsx("span",{role:"button",tabIndex:0,className:I("volt-ui-cursor-pointer volt-ui-hover:opacity-70 volt-ui-text-current volt-ui-rounded-full volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-offset-1 volt-ui-focus-visible:outline-accent-a8",e),onMouseDown:n=>{var r;n.preventDefault(),(r=o.onMouseDown)==null||r.call(o,n)},onClick:n=>{n.preventDefault(),n.stopPropagation(),t==null||t(n)},...o,children:d.jsx(ga,{className:"volt-ui-size-4 volt-ui-text-current"})});function hr(e,[t,o]){return Math.min(o,Math.max(t,e))}function Rn(e){const t=e+"CollectionProvider",[o,n]=de(t),[r,i]=o(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:h,children:y}=v,x=oe.useRef(null),w=oe.useRef(new Map).current;return d.jsx(r,{scope:h,itemMap:w,collectionRef:x,children:y})};a.displayName=t;const s=e+"CollectionSlot",c=ot(s),u=oe.forwardRef((v,h)=>{const{scope:y,children:x}=v,w=i(s,y),C=Q(h,w.collectionRef);return d.jsx(c,{ref:C,children:x})});u.displayName=s;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=ot(f),m=oe.forwardRef((v,h)=>{const{scope:y,children:x,...w}=v,C=oe.useRef(null),S=Q(h,C),k=i(f,y);return oe.useEffect(()=>(k.itemMap.set(C,{ref:C,...w}),()=>void k.itemMap.delete(C))),d.jsx(g,{[p]:"",ref:S,children:x})});m.displayName=f;function b(v){const h=i(e+"CollectionConsumer",v);return oe.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((k,E)=>w.indexOf(k.ref.current)-w.indexOf(E.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},b,n]}var Dp=l.createContext(void 0);function co(e){const t=l.useContext(Dp);return e||t||"ltr"}function uo(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ha=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"}),Lp="VisuallyHidden",xa=l.forwardRef((e,t)=>d.jsx($.span,{...e,ref:t,style:{...ha,...e.style}}));xa.displayName=Lp;var Fp=xa,$p=[" ","Enter","ArrowUp","ArrowDown"],Bp=[" ","Enter"],He="Select",[fo,po,qp]=Rn(He),[dt]=de(He,[qp,ut]),vo=ut(),[zp,Be]=dt(He),[Vp,Wp]=dt(He),ba=e=>{const{__scopeSelect:t,children:o,open:n,defaultOpen:r,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:p,disabled:g,required:m,form:b}=e,v=vo(t),[h,y]=l.useState(null),[x,w]=l.useState(null),[C,S]=l.useState(!1),k=co(u),[E,R]=fe({prop:n,defaultProp:r??!1,onChange:i,caller:He}),[F,B]=fe({prop:a,defaultProp:s,onChange:c,caller:He}),K=l.useRef(null),Y=h?b||!!h.closest("form"):!0,[Z,q]=l.useState(new Set),G=Array.from(Z).map(M=>M.props.value).join(";");return d.jsx(yn,{...v,children:d.jsxs(zp,{required:m,scope:t,trigger:h,onTriggerChange:y,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:C,onValueNodeHasChildrenChange:S,contentId:ie(),value:F,onValueChange:B,open:E,onOpenChange:R,dir:k,triggerPointerDownPosRef:K,disabled:g,children:[d.jsx(fo.Provider,{scope:t,children:d.jsx(Vp,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(M=>{q(z=>new Set(z).add(M))},[]),onNativeOptionRemove:l.useCallback(M=>{q(z=>{const T=new Set(z);return T.delete(M),T})},[]),children:o})}),Y?d.jsxs(Wa,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:F,onChange:M=>B(M.target.value),disabled:g,form:b,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(Z)]},G):null]})})};ba.displayName=He;var ya="SelectTrigger",wa=l.forwardRef((e,t)=>{const{__scopeSelect:o,disabled:n=!1,...r}=e,i=vo(o),a=Be(ya,o),s=a.disabled||n,c=Q(t,a.onTriggerChange),u=po(o),f=l.useRef("touch"),[p,g,m]=Ha(v=>{const h=u().filter(w=>!w.disabled),y=h.find(w=>w.value===a.value),x=Ua(h,v,y);x!==void 0&&a.onValueChange(x.value)}),b=v=>{s||(a.onOpenChange(!0),m()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return d.jsx(so,{asChild:!0,...i,children:d.jsx($.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Ga(a.value)?"":void 0,...r,ref:c,onClick:L(r.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&b(v)}),onPointerDown:L(r.onPointerDown,v=>{f.current=v.pointerType;const h=v.target;h.hasPointerCapture(v.pointerId)&&h.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(b(v),v.preventDefault())}),onKeyDown:L(r.onKeyDown,v=>{const h=p.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&g(v.key),!(h&&v.key===" ")&&$p.includes(v.key)&&(b(),v.preventDefault())})})})});wa.displayName=ya;var Ca="SelectValue",Sa=l.forwardRef((e,t)=>{const{__scopeSelect:o,className:n,style:r,children:i,placeholder:a="",...s}=e,c=Be(Ca,o),{onValueNodeHasChildrenChange:u}=c,f=i!==void 0,p=Q(t,c.onValueNodeChange);return ae(()=>{u(f)},[u,f]),d.jsx($.span,{...s,ref:p,style:{pointerEvents:"none"},children:Ga(c.value)?d.jsx(d.Fragment,{children:a}):i})});Sa.displayName=Ca;var Gp="SelectIcon",Ra=l.forwardRef((e,t)=>{const{__scopeSelect:o,children:n,...r}=e;return d.jsx($.span,{"aria-hidden":!0,...r,ref:t,children:n||"▼"})});Ra.displayName=Gp;var Hp="SelectPortal",Ea=e=>d.jsx(St,{asChild:!0,...e});Ea.displayName=Hp;var Ue="SelectContent",Pa=l.forwardRef((e,t)=>{const o=Be(Ue,e.__scopeSelect),[n,r]=l.useState();if(ae(()=>{r(new DocumentFragment)},[]),!o.open){const i=n;return i?Zt.createPortal(d.jsx(Ta,{scope:e.__scopeSelect,children:d.jsx(fo.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),i):null}return d.jsx(ka,{...e,ref:t})});Pa.displayName=Ue;var pe=10,[Ta,qe]=dt(Ue),Up="SelectContentImpl",Kp=ot("SelectContent.RemoveScroll"),ka=l.forwardRef((e,t)=>{const{__scopeSelect:o,position:n="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:b,hideWhenDetached:v,avoidCollisions:h,...y}=e,x=Be(Ue,o),[w,C]=l.useState(null),[S,k]=l.useState(null),E=Q(t,A=>C(A)),[R,F]=l.useState(null),[B,K]=l.useState(null),Y=po(o),[Z,q]=l.useState(!1),G=l.useRef(!1);l.useEffect(()=>{if(w)return sn(w)},[w]),an();const M=l.useCallback(A=>{const[V,...U]=Y().map(J=>J.ref.current),[X]=U.slice(-1),ee=document.activeElement;for(const J of A)if(J===ee||(J==null||J.scrollIntoView({block:"nearest"}),J===V&&S&&(S.scrollTop=0),J===X&&S&&(S.scrollTop=S.scrollHeight),J==null||J.focus(),document.activeElement!==ee))return},[Y,S]),z=l.useCallback(()=>M([R,w]),[M,R,w]);l.useEffect(()=>{Z&&z()},[Z,z]);const{onOpenChange:T,triggerPointerDownPosRef:te}=x;l.useEffect(()=>{if(w){let A={x:0,y:0};const V=X=>{var ee,J;A={x:Math.abs(Math.round(X.pageX)-(((ee=te.current)==null?void 0:ee.x)??0)),y:Math.abs(Math.round(X.pageY)-(((J=te.current)==null?void 0:J.y)??0))}},U=X=>{A.x<=10&&A.y<=10?X.preventDefault():w.contains(X.target)||T(!1),document.removeEventListener("pointermove",V),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",U,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",U,{capture:!0})}}},[w,T,te]),l.useEffect(()=>{const A=()=>T(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[T]);const[ne,se]=Ha(A=>{const V=Y().filter(ee=>!ee.disabled),U=V.find(ee=>ee.ref.current===document.activeElement),X=Ua(V,A,U);X&&setTimeout(()=>X.ref.current.focus())}),P=l.useCallback((A,V,U)=>{const X=!G.current&&!U;(x.value!==void 0&&x.value===V||X)&&(F(A),X&&(G.current=!0))},[x.value]),O=l.useCallback(()=>w==null?void 0:w.focus(),[w]),D=l.useCallback((A,V,U)=>{const X=!G.current&&!U;(x.value!==void 0&&x.value===V||X)&&K(A)},[x.value]),_=n==="popper"?Ho:Aa,H=_===Ho?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:b,hideWhenDetached:v,avoidCollisions:h}:{};return d.jsx(Ta,{scope:o,content:w,viewport:S,onViewportChange:k,itemRefCallback:P,selectedItem:R,onItemLeave:O,itemTextRefCallback:D,focusSelectedItem:z,selectedItemText:B,position:n,isPositioned:Z,searchRef:ne,children:d.jsx(Jt,{as:Kp,allowPinchZoom:!0,children:d.jsx(Xt,{asChild:!0,trapped:x.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:L(r,A=>{var V;(V=x.trigger)==null||V.focus({preventScroll:!0}),A.preventDefault()}),children:d.jsx(Ct,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:d.jsx(_,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:A=>A.preventDefault(),...y,...H,onPlaced:()=>q(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:L(y.onKeyDown,A=>{const V=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!V&&A.key.length===1&&se(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let X=Y().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(A.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const ee=A.target,J=X.indexOf(ee);X=X.slice(J+1)}setTimeout(()=>M(X)),A.preventDefault()}})})})})})})});ka.displayName=Up;var Yp="SelectItemAlignedPosition",Aa=l.forwardRef((e,t)=>{const{__scopeSelect:o,onPlaced:n,...r}=e,i=Be(Ue,o),a=qe(Ue,o),[s,c]=l.useState(null),[u,f]=l.useState(null),p=Q(t,E=>f(E)),g=po(o),m=l.useRef(!1),b=l.useRef(!0),{viewport:v,selectedItem:h,selectedItemText:y,focusSelectedItem:x}=a,w=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&v&&h&&y){const E=i.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),F=i.valueNode.getBoundingClientRect(),B=y.getBoundingClientRect();if(i.dir!=="rtl"){const ee=B.left-R.left,J=F.left-ee,le=E.left-J,be=E.width+le,ft=Math.max(be,R.width),pt=window.innerWidth-pe,vt=hr(J,[pe,Math.max(pe,pt-ft)]);s.style.minWidth=be+"px",s.style.left=vt+"px"}else{const ee=R.right-B.right,J=window.innerWidth-F.right-ee,le=window.innerWidth-E.right-J,be=E.width+le,ft=Math.max(be,R.width),pt=window.innerWidth-pe,vt=hr(J,[pe,Math.max(pe,pt-ft)]);s.style.minWidth=be+"px",s.style.right=vt+"px"}const K=g(),Y=window.innerHeight-pe*2,Z=v.scrollHeight,q=window.getComputedStyle(u),G=parseInt(q.borderTopWidth,10),M=parseInt(q.paddingTop,10),z=parseInt(q.borderBottomWidth,10),T=parseInt(q.paddingBottom,10),te=G+M+Z+T+z,ne=Math.min(h.offsetHeight*5,te),se=window.getComputedStyle(v),P=parseInt(se.paddingTop,10),O=parseInt(se.paddingBottom,10),D=E.top+E.height/2-pe,_=Y-D,H=h.offsetHeight/2,A=h.offsetTop+H,V=G+M+A,U=te-V;if(V<=D){const ee=K.length>0&&h===K[K.length-1].ref.current;s.style.bottom="0px";const J=u.clientHeight-v.offsetTop-v.offsetHeight,le=Math.max(_,H+(ee?O:0)+J+z),be=V+le;s.style.height=be+"px"}else{const ee=K.length>0&&h===K[0].ref.current;s.style.top="0px";const le=Math.max(D,G+v.offsetTop+(ee?P:0)+H)+U;s.style.height=le+"px",v.scrollTop=V-D+v.offsetTop}s.style.margin=`${pe}px 0`,s.style.minHeight=ne+"px",s.style.maxHeight=Y+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[g,i.trigger,i.valueNode,s,u,v,h,y,i.dir,n]);ae(()=>w(),[w]);const[C,S]=l.useState();ae(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const k=l.useCallback(E=>{E&&b.current===!0&&(w(),x==null||x(),b.current=!1)},[w,x]);return d.jsx(Xp,{scope:o,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:k,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:d.jsx($.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Aa.displayName=Yp;var Zp="SelectPopperPosition",Ho=l.forwardRef((e,t)=>{const{__scopeSelect:o,align:n="start",collisionPadding:r=pe,...i}=e,a=vo(o);return d.jsx(wn,{...a,...i,ref:t,align:n,collisionPadding:r,style:{boxSizing:"border-box",...i.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)"}})});Ho.displayName=Zp;var[Xp,En]=dt(Ue,{}),Uo="SelectViewport",Ia=l.forwardRef((e,t)=>{const{__scopeSelect:o,nonce:n,...r}=e,i=qe(Uo,o),a=En(Uo,o),s=Q(t,i.onViewportChange),c=l.useRef(0);return d.jsxs(d.Fragment,{children:[d.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:n}),d.jsx(fo.Slot,{scope:o,children:d.jsx($.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:L(r.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=a;if(g!=null&&g.current&&p){const m=Math.abs(c.current-f.scrollTop);if(m>0){const b=window.innerHeight-pe*2,v=parseFloat(p.style.minHeight),h=parseFloat(p.style.height),y=Math.max(v,h);if(y<b){const x=y+m,w=Math.min(b,x),C=x-w;p.style.height=w+"px",p.style.bottom==="0px"&&(f.scrollTop=C>0?C:0,p.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});Ia.displayName=Uo;var Na="SelectGroup",[Qp,Jp]=dt(Na),ja=l.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=ie();return d.jsx(Qp,{scope:o,id:r,children:d.jsx($.div,{role:"group","aria-labelledby":r,...n,ref:t})})});ja.displayName=Na;var Oa="SelectLabel",_a=l.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=Jp(Oa,o);return d.jsx($.div,{id:r.id,...n,ref:t})});_a.displayName=Oa;var Kt="SelectItem",[ev,Ma]=dt(Kt),Da=l.forwardRef((e,t)=>{const{__scopeSelect:o,value:n,disabled:r=!1,textValue:i,...a}=e,s=Be(Kt,o),c=qe(Kt,o),u=s.value===n,[f,p]=l.useState(i??""),[g,m]=l.useState(!1),b=Q(t,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,n,r)}),v=ie(),h=l.useRef("touch"),y=()=>{r||(s.onValueChange(n),s.onOpenChange(!1))};if(n==="")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 d.jsx(ev,{scope:o,value:n,disabled:r,textId:v,isSelected:u,onItemTextChange:l.useCallback(x=>{p(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:d.jsx(fo.ItemSlot,{scope:o,value:n,disabled:r,textValue:f,children:d.jsx($.div,{role:"option","aria-labelledby":v,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:b,onFocus:L(a.onFocus,()=>m(!0)),onBlur:L(a.onBlur,()=>m(!1)),onClick:L(a.onClick,()=>{h.current!=="mouse"&&y()}),onPointerUp:L(a.onPointerUp,()=>{h.current==="mouse"&&y()}),onPointerDown:L(a.onPointerDown,x=>{h.current=x.pointerType}),onPointerMove:L(a.onPointerMove,x=>{var w;h.current=x.pointerType,r?(w=c.onItemLeave)==null||w.call(c):h.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:L(a.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:L(a.onKeyDown,x=>{var C;((C=c.searchRef)==null?void 0:C.current)!==""&&x.key===" "||(Bp.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});Da.displayName=Kt;var ht="SelectItemText",La=l.forwardRef((e,t)=>{const{__scopeSelect:o,className:n,style:r,...i}=e,a=Be(ht,o),s=qe(ht,o),c=Ma(ht,o),u=Wp(ht,o),[f,p]=l.useState(null),g=Q(t,y=>p(y),c.onItemTextChange,y=>{var x;return(x=s.itemTextRefCallback)==null?void 0:x.call(s,y,c.value,c.disabled)}),m=f==null?void 0:f.textContent,b=l.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:h}=u;return ae(()=>(v(b),()=>h(b)),[v,h,b]),d.jsxs(d.Fragment,{children:[d.jsx($.span,{id:c.textId,...i,ref:g}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Zt.createPortal(i.children,a.valueNode):null]})});La.displayName=ht;var Fa="SelectItemIndicator",$a=l.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e;return Ma(Fa,o).isSelected?d.jsx($.span,{"aria-hidden":!0,...n,ref:t}):null});$a.displayName=Fa;var Ko="SelectScrollUpButton",Ba=l.forwardRef((e,t)=>{const o=qe(Ko,e.__scopeSelect),n=En(Ko,e.__scopeSelect),[r,i]=l.useState(!1),a=Q(t,n.onScrollButtonChange);return ae(()=>{if(o.viewport&&o.isPositioned){let s=function(){const u=c.scrollTop>0;i(u)};const c=o.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[o.viewport,o.isPositioned]),r?d.jsx(za,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=o;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});Ba.displayName=Ko;var Yo="SelectScrollDownButton",qa=l.forwardRef((e,t)=>{const o=qe(Yo,e.__scopeSelect),n=En(Yo,e.__scopeSelect),[r,i]=l.useState(!1),a=Q(t,n.onScrollButtonChange);return ae(()=>{if(o.viewport&&o.isPositioned){let s=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;i(f)};const c=o.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[o.viewport,o.isPositioned]),r?d.jsx(za,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=o;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});qa.displayName=Yo;var za=l.forwardRef((e,t)=>{const{__scopeSelect:o,onAutoScroll:n,...r}=e,i=qe("SelectScrollButton",o),a=l.useRef(null),s=po(o),c=l.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),ae(()=>{var f;const u=s().find(p=>p.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[s]),d.jsx($.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:L(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:L(r.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:L(r.onPointerLeave,()=>{c()})})}),tv="SelectSeparator",Va=l.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e;return d.jsx($.div,{"aria-hidden":!0,...n,ref:t})});Va.displayName=tv;var Zo="SelectArrow",ov=l.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=vo(o),i=Be(Zo,o),a=qe(Zo,o);return i.open&&a.position==="popper"?d.jsx(Cn,{...r,...n,ref:t}):null});ov.displayName=Zo;var nv="SelectBubbleInput",Wa=l.forwardRef(({__scopeSelect:e,value:t,...o},n)=>{const r=l.useRef(null),i=Q(n,r),a=uo(t);return l.useEffect(()=>{const s=r.current;if(!s)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&f){const p=new Event("change",{bubbles:!0});f.call(s,t),s.dispatchEvent(p)}},[a,t]),d.jsx($.select,{...o,style:{...ha,...o.style},ref:i,defaultValue:t})});Wa.displayName=nv;function Ga(e){return e===""||e===void 0}function Ha(e){const t=_e(e),o=l.useRef(""),n=l.useRef(0),r=l.useCallback(a=>{const s=o.current+a;t(s),function c(u){o.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),i=l.useCallback(()=>{o.current="",window.clearTimeout(n.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(n.current),[]),[o,r,i]}function Ua(e,t,o){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=o?e.indexOf(o):-1;let a=rv(e,Math.max(i,0));r.length===1&&(a=a.filter(u=>u!==o));const c=a.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return c!==o?c:void 0}function rv(e,t){return e.map((o,n)=>e[(t+n)%e.length])}var iv=ba,av=wa,sv=Sa,lv=Ra,cv=Ea,uv=Pa,dv=Ia,fv=ja,pv=_a,vv=Da,mv=La,gv=$a,hv=Ba,xv=qa,bv=Va;const yv=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z"})}),wv=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M459-381 314-526q-3-3-4.5-6.5T308-540q0-8 5.5-14t14.5-6h304q9 0 14.5 6t5.5 14q0 2-6 14L501-381q-5 5-10 7t-11 2q-6 0-11-2t-10-7Z"})}),Ka=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M480-528 324-372q-11 11-28 11t-28-11q-11-11-11-28t11-28l184-184q12-12 28-12t28 12l184 184q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-528Z"})}),Cv=({...e})=>d.jsx(iv,{"data-slot":"select",...e}),Sv=({...e})=>d.jsx(fv,{"data-slot":"select-group",...e}),Rv=({className:e,...t})=>d.jsx(sv,{"data-slot":"select-value",className:I("volt-ui-whitespace-break-spaces volt-ui-wrap-break-word",e),...t}),Ya=l.forwardRef(({className:e,children:t,...o},n)=>{const{inputRef:r}=wt();return d.jsxs(av,{ref:i=>{r&&(r.current=i),typeof n=="function"?n(i):n&&(n.current=i)},"data-slot":"select-trigger",className:I("volt-ui-group volt-ui-data-placeholder:text-gray-a8 volt-ui-w-full volt-ui-flex volt-ui-items-center volt-ui-justify-between volt-ui-gap-2 volt-ui-rounded-lg volt-ui-bg-transparent volt-ui-text-sm volt-ui-whitespace-nowrap volt-ui-transition-[color,box-shadow] volt-ui-outline-none volt-ui-disabled:cursor-not-allowed volt-ui-disabled:opacity-50 volt-ui-*:data-[slot=select-value]:line-clamp-1 volt-ui-*:data-[slot=select-value]:flex volt-ui-*:data-[slot=select-value]:items-center volt-ui-*:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...o,children:[t,d.jsx(lv,{asChild:!0,children:d.jsx(wv,{className:"volt-ui-transition-all volt-ui-size-6 volt-ui-group-data-[state=open]:rotate-180 volt-ui-text-gray-light"})})]})});Ya.displayName="SelectTrigger";const Ev=({className:e,children:t,position:o="popper",align:n="center",...r})=>d.jsx(cv,{children:d.jsxs(uv,{"data-slot":"select-content",className:I("volt-ui-bg-body volt-ui-px-2 volt-ui-py-3 volt-ui-gap-1 volt-ui-text-gray-default volt-ui-data-[state=open]:animate-in volt-ui-data-[state=closed]:animate-out volt-ui-data-[state=closed]:fade-out-0 volt-ui-data-[state=open]:fade-in-0 volt-ui-data-[state=closed]:zoom-out-95 volt-ui-data-[state=open]:zoom-in-95 volt-ui-data-[side=bottom]:slide-in-from-top-2 volt-ui-data-[side=left]:slide-in-from-right-2 volt-ui-data-[side=right]:slide-in-from-left-2 volt-ui-data-[side=top]:slide-in-from-bottom-2 volt-ui-relative volt-ui-z-50 volt-ui-origin-(--radix-select-content-transform-origin) volt-ui-overflow-x-hidden volt-ui-overflow-y-auto volt-ui-rounded-2xl volt-ui-border volt-ui-shadow-md","volt-ui-max-h-(--radix-popper-available-height)",{"volt-ui-data-[side=bottom]:translate-y-1 volt-ui-data-[side=left]:-translate-x-1 volt-ui-data-[side=right]:translate-x-1 volt-ui-data-[side=top]:-translate-y-1":o==="popper"},e),position:o,align:n,...r,children:[d.jsx(Za,{}),d.jsx(dv,{className:I({"volt-ui-h-(--radix-select-trigger-height) volt-ui-w-full volt-ui-min-w-(--radix-select-trigger-width) volt-ui-scroll-my-1":o==="popper"}),children:t}),d.jsx(Xa,{})]})}),Pv=({className:e,...t})=>d.jsx(pv,{"data-slot":"select-label",className:I("volt-ui-text-gray volt-ui-font-semibold volt-ui-px-2 volt-ui-py-1.5 volt-ui-text-xs",e),...t}),Tv=({className:e,children:t,...o})=>d.jsxs(vv,{"data-slot":"select-item",className:I("volt-ui-pl-3 volt-ui-py-1.5 volt-ui-not-first:mt-0.5 volt-ui-text-gray-default [&_svg:not([class*='volt-ui-text-'])]:text-gray-light volt-ui-relative volt-ui-flex volt-ui-w-full volt-ui-cursor-default volt-ui-items-center volt-ui-gap-2 volt-ui-rounded-md volt-ui-pr-8 volt-ui-text-sm volt-ui-outline-none volt-ui-select-none volt-ui-data-disabled:pointer-events-none volt-ui-data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 volt-ui-*:[span]:last:flex volt-ui-*:[span]:last:items-center volt-ui-*:[span]:last:gap-2","volt-ui-focus:bg-accent-a3 volt-ui-data-[state=checked]:bg-accent-a3",e),...o,children:[d.jsx("span",{className:"volt-ui-absolute volt-ui-right-2 volt-ui-flex volt-ui-size-4 volt-ui-items-center volt-ui-justify-center",children:d.jsx(gv,{children:d.jsx(yv,{className:"volt-ui-size-4 volt-ui-text-gray-light"})})}),d.jsx(mv,{children:t})]}),kv=({className:e,...t})=>d.jsx(bv,{"data-slot":"volt-ui-select-separator",className:I("volt-ui-bg-gray-soft volt-ui-pointer-events-none volt-ui--mx-1 volt-ui-my-1 volt-ui-h-px",e),...t}),Za=({className:e,...t})=>d.jsx(hv,{"data-slot":"volt-ui-select-scroll-up-button",className:I("volt-ui-flex volt-ui-cursor-default volt-ui-items-center volt-ui-justify-center volt-ui-pb-1",e),...t,children:d.jsx(Ka,{className:"volt-ui-size-6"})}),Xa=({className:e,...t})=>d.jsx(xv,{"data-slot":"volt-ui-select-scroll-down-button",className:I("volt-ui-flex volt-ui-cursor-default volt-ui-items-center volt-ui-justify-center volt-ui-pt-1",e),...t,children:d.jsx(Ka,{className:"volt-ui-size-6 volt-ui-rotate-180"})});var[mo]=de("Tooltip",[ut]),go=ut(),Qa="TooltipProvider",Av=700,Xo="tooltip.open",[Iv,Pn]=mo(Qa),Ja=e=>{const{__scopeTooltip:t,delayDuration:o=Av,skipDelayDuration:n=300,disableHoverableContent:r=!1,children:i}=e,a=l.useRef(!0),s=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),d.jsx(Iv,{scope:t,isOpenDelayedRef:a,delayDuration:o,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:l.useCallback(u=>{s.current=u},[]),disableHoverableContent:r,children:i})};Ja.displayName=Qa;var yt="Tooltip",[Nv,Tt]=mo(yt),es=e=>{const{__scopeTooltip:t,children:o,open:n,defaultOpen:r,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=Pn(yt,e.__scopeTooltip),u=go(t),[f,p]=l.useState(null),g=ie(),m=l.useRef(0),b=a??c.disableHoverableContent,v=s??c.delayDuration,h=l.useRef(!1),[y,x]=fe({prop:n,defaultProp:r??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Xo))):c.onClose(),i==null||i(E)},caller:yt}),w=l.useMemo(()=>y?h.current?"delayed-open":"instant-open":"closed",[y]),C=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,h.current=!1,x(!0)},[x]),S=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),k=l.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{h.current=!0,x(!0),m.current=0},v)},[v,x]);return l.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),d.jsx(yn,{...u,children:d.jsx(Nv,{scope:t,contentId:g,open:y,stateAttribute:w,trigger:f,onTriggerChange:p,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?k():C()},[c.isOpenDelayedRef,k,C]),onTriggerLeave:l.useCallback(()=>{b?S():(window.clearTimeout(m.current),m.current=0)},[S,b]),onOpen:C,onClose:S,disableHoverableContent:b,children:o})})};es.displayName=yt;var Qo="TooltipTrigger",ts=l.forwardRef((e,t)=>{const{__scopeTooltip:o,...n}=e,r=Tt(Qo,o),i=Pn(Qo,o),a=go(o),s=l.useRef(null),c=Q(t,s,r.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),p=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),d.jsx(so,{asChild:!0,...a,children:d.jsx($.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...n,ref:c,onPointerMove:L(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:L(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:L(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:L(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:L(e.onBlur,r.onClose),onClick:L(e.onClick,r.onClose)})})});ts.displayName=Qo;var Tn="TooltipPortal",[jv,Ov]=mo(Tn,{forceMount:void 0}),os=e=>{const{__scopeTooltip:t,forceMount:o,children:n,container:r}=e,i=Tt(Tn,t);return d.jsx(jv,{scope:t,forceMount:o,children:d.jsx(ge,{present:o||i.open,children:d.jsx(St,{asChild:!0,container:r,children:n})})})};os.displayName=Tn;var it="TooltipContent",ns=l.forwardRef((e,t)=>{const o=Ov(it,e.__scopeTooltip),{forceMount:n=o.forceMount,side:r="top",...i}=e,a=Tt(it,e.__scopeTooltip);return d.jsx(ge,{present:n||a.open,children:a.disableHoverableContent?d.jsx(rs,{side:r,...i,ref:t}):d.jsx(_v,{side:r,...i,ref:t})})}),_v=l.forwardRef((e,t)=>{const o=Tt(it,e.__scopeTooltip),n=Pn(it,e.__scopeTooltip),r=l.useRef(null),i=Q(t,r),[a,s]=l.useState(null),{trigger:c,onClose:u}=o,f=r.current,{onPointerInTransitChange:p}=n,g=l.useCallback(()=>{s(null),p(!1)},[p]),m=l.useCallback((b,v)=>{const h=b.currentTarget,y={x:b.clientX,y:b.clientY},x=Fv(y,h.getBoundingClientRect()),w=$v(y,x),C=Bv(v.getBoundingClientRect()),S=zv([...w,...C]);s(S),p(!0)},[p]);return l.useEffect(()=>()=>g(),[g]),l.useEffect(()=>{if(c&&f){const b=h=>m(h,f),v=h=>m(h,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",v)}}},[c,f,m,g]),l.useEffect(()=>{if(a){const b=v=>{const h=v.target,y={x:v.clientX,y:v.clientY},x=(c==null?void 0:c.contains(h))||(f==null?void 0:f.contains(h)),w=!qv(y,a);x?g():w&&(g(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,a,u,g]),d.jsx(rs,{...e,ref:i})}),[Mv,Dv]=mo(yt,{isInside:!1}),Lv=qc("TooltipContent"),rs=l.forwardRef((e,t)=>{const{__scopeTooltip:o,children:n,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,c=Tt(it,o),u=go(o),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(Xo,f),()=>document.removeEventListener(Xo,f)),[f]),l.useEffect(()=>{if(c.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),d.jsx(Ct,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:d.jsxs(wn,{"data-state":c.stateAttribute,...u,...s,ref:t,style:{...s.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:[d.jsx(Lv,{children:n}),d.jsx(Mv,{scope:o,isInside:!0,children:d.jsx(Fp,{id:c.contentId,role:"tooltip",children:r||n})})]})})});ns.displayName=it;var is="TooltipArrow",as=l.forwardRef((e,t)=>{const{__scopeTooltip:o,...n}=e,r=go(o);return Dv(is,o).isInside?null:d.jsx(Cn,{...r,...n,ref:t})});as.displayName=is;function Fv(e,t){const o=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(o,n,r,i)){case i:return"left";case r:return"right";case o:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function $v(e,t,o=5){const n=[];switch(t){case"top":n.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":n.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":n.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":n.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return n}function Bv(e){const{top:t,right:o,bottom:n,left:r}=e;return[{x:r,y:t},{x:o,y:t},{x:o,y:n},{x:r,y:n}]}function qv(e,t){const{x:o,y:n}=e;let r=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],c=t[a],u=s.x,f=s.y,p=c.x,g=c.y;f>n!=g>n&&o<(p-u)*(n-f)/(g-f)+u&&(r=!r)}return r}function zv(e){const t=e.slice();return t.sort((o,n)=>o.x<n.x?-1:o.x>n.x?1:o.y<n.y?-1:o.y>n.y?1:0),Vv(t)}function Vv(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(r.y-a.y)>=(i.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const o=[];for(let n=e.length-1;n>=0;n--){const r=e[n];for(;o.length>=2;){const i=o[o.length-1],a=o[o.length-2];if((i.x-a.x)*(r.y-a.y)>=(i.y-a.y)*(r.x-a.x))o.pop();else break}o.push(r)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var Wv=Ja,Gv=es,Hv=ts,Uv=os,Kv=ns,Yv=as;const ss=({...e})=>d.jsx(Wv,{"data-slot":"tooltip-provider",...e}),Zv=({...e})=>d.jsx(ss,{children:d.jsx(Gv,{"data-slot":"tooltip",...e})}),Xv=({...e})=>d.jsx(Hv,{"data-slot":"tooltip-trigger",...e}),Qv=({className:e,sideOffset:t=2,hideArrow:o=!1,children:n,...r})=>d.jsx(Uv,{children:d.jsxs(Kv,{"data-slot":"tooltip-content",sideOffset:t,className:I("volt-ui-bg-gray-12 volt-ui-text-gray-1 volt-ui-animate-in volt-ui-fade-in-0 volt-ui-zoom-in-95 volt-ui-data-[state=closed]:animate-out volt-ui-data-[state=closed]:fade-out-0 volt-ui-data-[state=closed]:zoom-out-95 volt-ui-data-[side=bottom]:slide-in-from-top-2 volt-ui-data-[side=left]:slide-in-from-right-2 volt-ui-data-[side=right]:slide-in-from-left-2 volt-ui-data-[side=top]:slide-in-from-bottom-2 volt-ui-z-50 volt-ui-w-fit volt-ui-origin-(--radix-tooltip-content-transform-origin) volt-ui-rounded-lg volt-ui-p-2 volt-ui-text-xs volt-ui-text-balance",e),...r,children:[n,!o&&d.jsx(Yv,{className:"volt-ui-bg-gray-12 volt-ui-fill-gray-12 volt-ui-z-50 volt-ui-size-3 volt-ui-translate-y-[calc(-50%-2px)] volt-ui-rotate-45 volt-ui-rounded-[2px]"})]})});var ho="Switch",[Jv]=de(ho),[em,tm]=Jv(ho),ls=l.forwardRef((e,t)=>{const{__scopeSwitch:o,name:n,checked:r,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,form:f,...p}=e,[g,m]=l.useState(null),b=Q(t,w=>m(w)),v=l.useRef(!1),h=g?f||!!g.closest("form"):!0,[y,x]=fe({prop:r,defaultProp:i??!1,onChange:u,caller:ho});return d.jsxs(em,{scope:o,checked:y,disabled:s,children:[d.jsx($.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":fs(y),"data-disabled":s?"":void 0,disabled:s,value:c,...p,ref:b,onClick:L(e.onClick,w=>{x(C=>!C),h&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})}),h&&d.jsx(ds,{control:g,bubbles:!v.current,name:n,value:c,checked:y,required:a,disabled:s,form:f,style:{transform:"translateX(-100%)"}})]})});ls.displayName=ho;var cs="SwitchThumb",us=l.forwardRef((e,t)=>{const{__scopeSwitch:o,...n}=e,r=tm(cs,o);return d.jsx($.span,{"data-state":fs(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:t})});us.displayName=cs;var om="SwitchBubbleInput",ds=l.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:n=!0,...r},i)=>{const a=l.useRef(null),s=Q(a,i),c=uo(o),u=ao(t);return l.useEffect(()=>{const f=a.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==o&&m){const b=new Event("click",{bubbles:n});m.call(f,o),f.dispatchEvent(b)}},[c,o,n]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...r,tabIndex:-1,ref:s,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ds.displayName=om;function fs(e){return e?"checked":"unchecked"}var nm=ls,rm=us;const im=Ae("volt-ui-peer volt-ui-cursor-pointer volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-offset-2 volt-ui-inline-flex volt-ui-shrink-0 volt-ui-items-center volt-ui-rounded-full volt-ui-border volt-ui-border-transparent volt-ui-shadow-xs volt-ui-transition-all volt-ui-disabled:pointer-events-none volt-ui-disabled:opacity-50",{variants:{variant:{primary:"volt-ui-data-[state=checked]:bg-accent-solid volt-ui-data-[state=unchecked]:bg-gray-a4 volt-ui-focus-visible:outline-accent-a8",destructive:"volt-ui-data-[state=checked]:bg-error-solid volt-ui-data-[state=unchecked]:bg-error-a4 volt-ui-focus-visible:outline-error-a8"},size:{sm:"volt-ui-h-[16px] volt-ui-w-[27px]",base:"volt-ui-h-[19px] volt-ui-w-[33px]",lg:"volt-ui-h-[24px] volt-ui-w-[41px]"}},defaultVariants:{variant:"primary",size:"base"}}),am=Ae("volt-ui-pointer-events-none volt-ui-block volt-ui-rounded-full volt-ui-ring-0 volt-ui-transition-transform volt-ui-data-[state=checked]:translate-x-[calc(100%-2px)] volt-ui-data-[state=unchecked]:translate-x-px",{variants:{variant:{primary:"volt-ui-bg-gray-contrast volt-ui-border volt-ui-border-gray-a7 volt-ui-data-[state=checked]:border-accent-a11",destructive:"volt-ui-bg-error-contrast volt-ui-border volt-ui-border-error-a7 volt-ui-data-[state=checked]:border-error-a11"},size:{sm:"volt-ui-w-[13px] volt-ui-h-[13px]",base:"volt-ui-w-4 volt-ui-h-4",lg:"volt-ui-w-[20px] volt-ui-h-[20px]"}},defaultVariants:{variant:"primary",size:"base"}});function sm({variant:e,size:t,className:o,...n}){return d.jsx(nm,{"data-slot":"switch",className:I(im({variant:e,size:t,className:o})),...n,children:d.jsx(rm,{"data-slot":"switch-thumb",className:I(am({variant:e,size:t}))})})}const lm=({...e})=>d.jsx(hp,{"data-slot":"popover-portal",...e}),cm=({...e})=>d.jsx(pa,{"data-slot":"popover",...e}),um=({...e})=>d.jsx(va,{"data-slot":"popover-trigger",...e}),dm=({className:e,align:t="center",sideOffset:o=4,...n})=>d.jsx(ma,{"data-slot":"popover-content",align:t,sideOffset:o,className:I("volt-ui-bg-body volt-ui-text-gray-default volt-ui-data-[state=open]:animate-in volt-ui-data-[state=closed]:animate-out volt-ui-data-[state=closed]:fade-out-0 volt-ui-data-[state=open]:fade-in-0 volt-ui-data-[state=closed]:zoom-out-95 volt-ui-data-[state=open]:zoom-in-95 volt-ui-data-[side=bottom]:slide-in-from-top-2 volt-ui-data-[side=left]:slide-in-from-right-2 volt-ui-data-[side=right]:slide-in-from-left-2 volt-ui-data-[side=top]:slide-in-from-bottom-2 volt-ui-z-50 volt-ui-origin-(--radix-popover-content-transform-origin) volt-ui-rounded-lg volt-ui-border volt-ui-p-6 volt-ui-shadow-md volt-ui-outline-hidden",e),...n}),fm=({...e})=>d.jsx(gp,{"data-slot":"popover-anchor",...e});var xo="Checkbox",[pm]=de(xo),[vm,kn]=pm(xo);function mm(e){const{__scopeCheckbox:t,checked:o,children:n,defaultChecked:r,disabled:i,form:a,name:s,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:p}=e,[g,m]=fe({prop:o,defaultProp:r??!1,onChange:c,caller:xo}),[b,v]=l.useState(null),[h,y]=l.useState(null),x=l.useRef(!1),w=b?!!a||!!b.closest("form"):!0,C={checked:g,disabled:i,setChecked:m,control:b,setControl:v,name:s,form:a,value:f,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:je(r)?!1:r,isFormControl:w,bubbleInput:h,setBubbleInput:y};return d.jsx(vm,{scope:t,...C,children:gm(p)?p(C):n})}var ps="CheckboxTrigger",vs=l.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...n},r)=>{const{control:i,value:a,disabled:s,checked:c,required:u,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:m,bubbleInput:b}=kn(ps,e),v=Q(r,f),h=l.useRef(c);return l.useEffect(()=>{const y=i==null?void 0:i.form;if(y){const x=()=>p(h.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[i,p]),d.jsx($.button,{type:"button",role:"checkbox","aria-checked":je(c)?"mixed":c,"aria-required":u,"data-state":ys(c),"data-disabled":s?"":void 0,disabled:s,value:a,...n,ref:v,onKeyDown:L(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:L(o,y=>{p(x=>je(x)?!0:!x),b&&m&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});vs.displayName=ps;var ms=l.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:n,checked:r,defaultChecked:i,required:a,disabled:s,value:c,onCheckedChange:u,form:f,...p}=e;return d.jsx(mm,{__scopeCheckbox:o,checked:r,defaultChecked:i,disabled:s,required:a,onCheckedChange:u,name:n,form:f,value:c,internal_do_not_use_render:({isFormControl:g})=>d.jsxs(d.Fragment,{children:[d.jsx(vs,{...p,ref:t,__scopeCheckbox:o}),g&&d.jsx(bs,{__scopeCheckbox:o})]})})});ms.displayName=xo;var gs="CheckboxIndicator",hs=l.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:n,...r}=e,i=kn(gs,o);return d.jsx(ge,{present:n||je(i.checked)||i.checked===!0,children:d.jsx($.span,{"data-state":ys(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});hs.displayName=gs;var xs="CheckboxBubbleInput",bs=l.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:n,hasConsumerStoppedPropagationRef:r,checked:i,defaultChecked:a,required:s,disabled:c,name:u,value:f,form:p,bubbleInput:g,setBubbleInput:m}=kn(xs,e),b=Q(o,m),v=uo(i),h=ao(n);l.useEffect(()=>{const x=g;if(!x)return;const w=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(w,"checked").set,k=!r.current;if(v!==i&&S){const E=new Event("click",{bubbles:k});x.indeterminate=je(i),S.call(x,je(i)?!1:i),x.dispatchEvent(E)}},[g,v,i,r]);const y=l.useRef(je(i)?!1:i);return d.jsx($.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??y.current,required:s,disabled:c,name:u,value:f,form:p,...t,tabIndex:-1,ref:b,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});bs.displayName=xs;function gm(e){return typeof e=="function"}function je(e){return e==="indeterminate"}function ys(e){return je(e)?"indeterminate":e?"checked":"unchecked"}const hm=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z"})}),xm=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M280-440q-17 0-28.5-11.5T240-480q0-17 11.5-28.5T280-520h400q17 0 28.5 11.5T720-480q0 17-11.5 28.5T680-440H280Z"})}),bm=({className:e,...t})=>d.jsx(ms,{"data-slot":"checkbox",className:I("volt-ui-peer volt-ui-border-accent-a7 volt-ui-bg-accent-a4 volt-ui-disabled:border-gray-a4 volt-ui-data-[state=indeterminate]:bg-accent-a7 volt-ui-data-[state=indeterminate]:border-transparent volt-ui-data-[state=indeterminate]:text-accent-a12 volt-ui-data-[state=checked]:bg-accent-solid volt-ui-data-[state=checked]:border-0 volt-ui-data-[state=checked]:text-accent-contrast volt-ui-focus-visible:outline-offset-2 volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-accent-a8 volt-ui-aria-invalid:outline-error-a8 volt-ui-aria-invalid:border-error-a8 volt-ui-size-4 volt-ui-shrink-0 volt-ui-rounded-sm volt-ui-border volt-ui-shadow-xs volt-ui-transition-shadow volt-ui-disabled:cursor-not-allowed volt-ui-disabled:opacity-50",e),...t,children:d.jsx(hs,{"data-slot":"checkbox-indicator",className:"volt-ui-grid volt-ui-place-content-center volt-ui-text-current volt-ui-transition-none",children:t.checked==="indeterminate"?d.jsx(xm,{className:"volt-ui-size-3.5"}):d.jsx(hm,{className:"volt-ui-size-3.5"})})});var Lo="rovingFocusGroup.onEntryFocus",ym={bubbles:!1,cancelable:!0},kt="RovingFocusGroup",[Jo,ws,wm]=Rn(kt),[Cm,Cs]=de(kt,[wm]),[Sm,Rm]=Cm(kt),Ss=l.forwardRef((e,t)=>d.jsx(Jo.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Jo.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Em,{...e,ref:t})})}));Ss.displayName=kt;var Em=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:n,loop:r=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=l.useRef(null),m=Q(t,g),b=co(i),[v,h]=fe({prop:a,defaultProp:s??null,onChange:c,caller:kt}),[y,x]=l.useState(!1),w=_e(u),C=ws(o),S=l.useRef(!1),[k,E]=l.useState(0);return l.useEffect(()=>{const R=g.current;if(R)return R.addEventListener(Lo,w),()=>R.removeEventListener(Lo,w)},[w]),d.jsx(Sm,{scope:o,orientation:n,dir:b,loop:r,currentTabStopId:v,onItemFocus:l.useCallback(R=>h(R),[h]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>E(R=>R+1),[]),onFocusableItemRemove:l.useCallback(()=>E(R=>R-1),[]),children:d.jsx($.div,{tabIndex:y||k===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:L(e.onMouseDown,()=>{S.current=!0}),onFocus:L(e.onFocus,R=>{const F=!S.current;if(R.target===R.currentTarget&&F&&!y){const B=new CustomEvent(Lo,ym);if(R.currentTarget.dispatchEvent(B),!B.defaultPrevented){const K=C().filter(M=>M.focusable),Y=K.find(M=>M.active),Z=K.find(M=>M.id===v),G=[Y,Z,...K].filter(Boolean).map(M=>M.ref.current);Ps(G,f)}}S.current=!1}),onBlur:L(e.onBlur,()=>x(!1))})})}),Rs="RovingFocusGroupItem",Es=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:n=!0,active:r=!1,tabStopId:i,children:a,...s}=e,c=ie(),u=i||c,f=Rm(Rs,o),p=f.currentTabStopId===u,g=ws(o),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:v}=f;return l.useEffect(()=>{if(n)return m(),()=>b()},[n,m,b]),d.jsx(Jo.ItemSlot,{scope:o,id:u,focusable:n,active:r,children:d.jsx($.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:L(e.onMouseDown,h=>{n?f.onItemFocus(u):h.preventDefault()}),onFocus:L(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:L(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){f.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const y=km(h,f.orientation,f.dir);if(y!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let w=g().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const C=w.indexOf(h.currentTarget);w=f.loop?Am(w,C+1):w.slice(C+1)}setTimeout(()=>Ps(w))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:v!=null}):a})})});Es.displayName=Rs;var Pm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Tm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function km(e,t,o){const n=Tm(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Pm[n]}function Ps(e,t=!1){const o=document.activeElement;for(const n of e)if(n===o||(n.focus({preventScroll:t}),document.activeElement!==o))return}function Am(e,t){return e.map((o,n)=>e[(t+n)%e.length])}var Im=Ss,Nm=Es,An="Radio",[jm,Ts]=de(An),[Om,_m]=jm(An),ks=l.forwardRef((e,t)=>{const{__scopeRadio:o,name:n,checked:r=!1,required:i,disabled:a,value:s="on",onCheck:c,form:u,...f}=e,[p,g]=l.useState(null),m=Q(t,h=>g(h)),b=l.useRef(!1),v=p?u||!!p.closest("form"):!0;return d.jsxs(Om,{scope:o,checked:r,disabled:a,children:[d.jsx($.button,{type:"button",role:"radio","aria-checked":r,"data-state":js(r),"data-disabled":a?"":void 0,disabled:a,value:s,...f,ref:m,onClick:L(e.onClick,h=>{r||c==null||c(),v&&(b.current=h.isPropagationStopped(),b.current||h.stopPropagation())})}),v&&d.jsx(Ns,{control:p,bubbles:!b.current,name:n,value:s,checked:r,required:i,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});ks.displayName=An;var As="RadioIndicator",Is=l.forwardRef((e,t)=>{const{__scopeRadio:o,forceMount:n,...r}=e,i=_m(As,o);return d.jsx(ge,{present:n||i.checked,children:d.jsx($.span,{"data-state":js(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})})});Is.displayName=As;var Mm="RadioBubbleInput",Ns=l.forwardRef(({__scopeRadio:e,control:t,checked:o,bubbles:n=!0,...r},i)=>{const a=l.useRef(null),s=Q(a,i),c=uo(o),u=ao(t);return l.useEffect(()=>{const f=a.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==o&&m){const b=new Event("click",{bubbles:n});m.call(f,o),f.dispatchEvent(b)}},[c,o,n]),d.jsx($.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...r,tabIndex:-1,ref:s,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ns.displayName=Mm;function js(e){return e?"checked":"unchecked"}var Dm=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],bo="RadioGroup",[Lm]=de(bo,[Cs,Ts]),Os=Cs(),_s=Ts(),[Fm,$m]=Lm(bo),Ms=l.forwardRef((e,t)=>{const{__scopeRadioGroup:o,name:n,defaultValue:r,value:i,required:a=!1,disabled:s=!1,orientation:c,dir:u,loop:f=!0,onValueChange:p,...g}=e,m=Os(o),b=co(u),[v,h]=fe({prop:i,defaultProp:r??null,onChange:p,caller:bo});return d.jsx(Fm,{scope:o,name:n,required:a,disabled:s,value:v,onValueChange:h,children:d.jsx(Im,{asChild:!0,...m,orientation:c,dir:b,loop:f,children:d.jsx($.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b,...g,ref:t})})})});Ms.displayName=bo;var Ds="RadioGroupItem",Ls=l.forwardRef((e,t)=>{const{__scopeRadioGroup:o,disabled:n,...r}=e,i=$m(Ds,o),a=i.disabled||n,s=Os(o),c=_s(o),u=l.useRef(null),f=Q(t,u),p=i.value===r.value,g=l.useRef(!1);return l.useEffect(()=>{const m=v=>{Dm.includes(v.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),d.jsx(Nm,{asChild:!0,...s,focusable:!a,active:p,children:d.jsx(ks,{disabled:a,required:i.required,checked:p,...c,...r,name:i.name,ref:f,onCheck:()=>i.onValueChange(r.value),onKeyDown:L(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:L(r.onFocus,()=>{var m;g.current&&((m=u.current)==null||m.click())})})})});Ls.displayName=Ds;var Bm="RadioGroupIndicator",Fs=l.forwardRef((e,t)=>{const{__scopeRadioGroup:o,...n}=e,r=_s(o);return d.jsx(Is,{...r,...n,ref:t})});Fs.displayName=Bm;var qm=Ms,zm=Ls,Vm=Fs;const Wm=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:d.jsx("circle",{cx:"12",cy:"12",r:"10"})}),Gm=({className:e,...t})=>d.jsx(qm,{"data-slot":"radio-group",className:I("volt-ui-grid volt-ui-gap-3",e),...t}),Hm=({className:e,...t})=>d.jsx(zm,{"data-slot":"radio-group-item",className:I("volt-ui-border-accent-a7 volt-ui-data-[state='checked']:bg-accent-solid volt-ui-data-[checked=true]:text-accent-contrast volt-ui-bg-accent-a4 volt-ui-text-accent-default volt-ui-focus-visible:outline-accent-a8 volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-offset-2 volt-ui-aria-invalid:bg-error-a4 volt-ui-aria-invalid:border-error-a8 volt-ui-aria-invalid:outline-error-a8 volt-ui-data-[state='checked']:aria-invalid:border-transparent volt-ui-data-[state='checked']:aria-invalid:bg-error-a10 volt-ui-aspect-square volt-ui-size-4 volt-ui-shrink-0 volt-ui-rounded-full volt-ui-border volt-ui-shadow-xs volt-ui-transition-[color,box-shadow] volt-ui-disabled:cursor-not-allowed volt-ui-disabled:bg-gray-a3 volt-ui-disabled:border-transparent volt-ui-data-[state='checked']:disabled:bg-gray-a3",e),...t,children:d.jsx(Vm,{"data-slot":"radio-group-indicator",className:"volt-ui-relative volt-ui-flex volt-ui-items-center volt-ui-justify-center",children:d.jsx(Wm,{className:"volt-ui-text-accent-contrast volt-ui-absolute volt-ui-top-1/2 volt-ui-left-1/2 volt-ui-size-2 volt-ui--translate-x-1/2 volt-ui--translate-y-1/2"})})}),$s={blue:"blue",sky:"sky",mint:"mint",green:"green",teal:"teal",cyan:"cyan",indigo:"indigo",purple:"purple",pink:"pink",red:"red",orange:"orange",yellow:"yellow",bronze:"bronze",gray:"gray"},Bs={soft:e=>`volt-ui-bg-${e}-soft volt-ui-text-${e}-default [a&]:hover:bg-${e}-soft-hover volt-ui-border volt-ui-border-transparent `,solid:e=>`volt-ui-bg-${e}-solid volt-ui-text-${e}-contrast [a&]:hover:bg-${e}-solid-hover volt-ui-border volt-ui-border-transparent `,surface:e=>`volt-ui-bg-${e}-surface volt-ui-border-${e}-a6 volt-ui-border volt-ui-text-${e}-default`},Um=Object.keys($s),Km=Object.keys(Bs),Ym=Um.flatMap(e=>Km.map(t=>({color:e,style:t,class:Bs[t](e)}))),qs=Ae("volt-ui-inline-flex volt-ui-items-center volt-ui-gap-2 volt-ui-justify-center volt-ui-px-1.5 volt-ui-py-0.25 volt-ui-text-sm volt-ui-font-normal volt-ui-w-fit volt-ui-whitespace-nowrap volt-ui-shrink-0 [&>svg]:size-4 [&>svg]:pointer-events-none volt-ui-focus-visible:outline-2 volt-ui-focus-visible:outline-offset-2 volt-ui-focus-visible:outline-accent-a8 volt-ui-aria-invalid:outline-error-a8 volt-ui-transition-[color,box-shadow] volt-ui-overflow-hidden",{variants:{color:$s,style:{soft:"",solid:"",surface:""},shape:{default:"volt-ui-rounded-md",rounded:"volt-ui-rounded-full"}},compoundVariants:Ym,defaultVariants:{color:"blue",shape:"default",style:"soft"}}),Zm=({className:e,color:t,style:o,shape:n,asChild:r=!1,...i})=>{const a=r?on:"span";return d.jsx(a,{"data-slot":"badge",className:I(qs({color:t,style:o,shape:n}),e),...i})},xr=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M480-280q17 0 28.5-11.5T520-320v-160q0-17-11.5-28.5T480-520q-17 0-28.5 11.5T440-480v160q0 17 11.5 28.5T480-280Zm0-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}),Xm=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M109-120q-11 0-20-5.5T75-140q-5-9-5.5-19.5T75-180l370-640q6-10 15.5-15t19.5-5q10 0 19.5 5t15.5 15l370 640q6 10 5.5 20.5T885-140q-5 9-14 14.5t-20 5.5H109Zm69-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm0-120q17 0 28.5-11.5T520-400v-120q0-17-11.5-28.5T480-560q-17 0-28.5 11.5T440-520v120q0 17 11.5 28.5T480-360Zm0-100Z"})}),Qm=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"m424-408-86-86q-11-11-28-11t-28 11q-11 11-11 28t11 28l114 114q12 12 28 12t28-12l226-226q11-11 11-28t-11-28q-11-11-28-11t-28 11L424-408Zm56 328q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}),Jm=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm0-160q17 0 28.5-11.5T520-480v-160q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640v160q0 17 11.5 28.5T480-440Zm0 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}),eg=Ae("volt-ui-group volt-ui-relative volt-ui-w-full volt-ui-rounded-xl volt-ui-p-3 volt-ui-text-sm volt-ui-has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] volt-ui-has-data-[slot=callout-icon]:grid-cols-[calc(var(--spacing)*4)_1fr] volt-ui-grid volt-ui-grid-cols-[0_1fr_auto] volt-ui-has-[>svg]:gap-x-3 volt-ui-has-data-[slot=callout-icon]:gap-x-4 volt-ui-gap-y-0.5 volt-ui-items-start",{variants:{type:{info:"volt-ui-bg-accent-soft volt-ui-text-accent-default",gray:"volt-ui-bg-gray-soft volt-ui-text-gray-default",success:"volt-ui-bg-success-soft volt-ui-text-success-default",warning:"volt-ui-bg-warning-soft volt-ui-text-warning-default",destructive:"volt-ui-text-error-default volt-ui-bg-error-soft"}},defaultVariants:{type:"info"}}),zs=l.createContext({type:"info"}),tg=({className:e,type:t="info",customIcon:o,...n})=>d.jsx(zs.Provider,{value:{type:t},children:d.jsxs("div",{"data-callout-variant":t,"data-slot":"callout",role:"alert",className:I(eg({type:t}),e),...n,children:[d.jsx(ag,{customIcon:o}),n.children]})}),og=({className:e,...t})=>d.jsx("div",{"data-slot":"callout-title",className:I("volt-ui-col-start-2 volt-ui-line-clamp-1 volt-ui-text-current volt-ui-min-h-4 volt-ui-text-base volt-ui-font-medium",e),...t}),ng=({className:e,...t})=>d.jsx("div",{"data-slot":"callout-description",className:I("volt-ui-text-current volt-ui-col-start-2 volt-ui-grid volt-ui-justify-items-start volt-ui-gap-1 volt-ui-text-sm [&_p]:leading-relaxed",e),...t}),rg=({className:e,align:t="start",...o})=>d.jsx("div",{"data-slot":"callout-action","data-align":t,className:I("volt-ui-flex volt-ui-w-full volt-ui-col-span-3 volt-ui-mt-2",{"volt-ui-justify-start volt-ui-ml-8":t==="start","volt-ui-justify-end":t==="end"},e),...o}),ig=({customIcon:e,...t})=>{const{type:o}=l.useContext(zs);if(e)return e;let n=null;switch(o){case"info":n=d.jsx(xr,{...t});break;case"success":n=d.jsx(Qm,{...t});break;case"warning":n=d.jsx(Xm,{...t});break;case"destructive":n=d.jsx(Jm,{...t});break;case"gray":n=d.jsx(xr,{...t});break}return n},ag=({className:e,customIcon:t,...o})=>d.jsx(ig,{"data-slot":"callout-icon",customIcon:t,className:I("volt-ui-size-5 volt-ui-translate-y-0.5 volt-ui-text-current volt-ui-shrink-0",e),...o});var yo="Collapsible",[sg,Vs]=de(yo),[lg,In]=sg(yo),Ws=l.forwardRef((e,t)=>{const{__scopeCollapsible:o,open:n,defaultOpen:r,disabled:i,onOpenChange:a,...s}=e,[c,u]=fe({prop:n,defaultProp:r??!1,onChange:a,caller:yo});return d.jsx(lg,{scope:o,disabled:i,contentId:ie(),open:c,onOpenToggle:l.useCallback(()=>u(f=>!f),[u]),children:d.jsx($.div,{"data-state":jn(c),"data-disabled":i?"":void 0,...s,ref:t})})});Ws.displayName=yo;var Gs="CollapsibleTrigger",Hs=l.forwardRef((e,t)=>{const{__scopeCollapsible:o,...n}=e,r=In(Gs,o);return d.jsx($.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":jn(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...n,ref:t,onClick:L(e.onClick,r.onOpenToggle)})});Hs.displayName=Gs;var Nn="CollapsibleContent",Us=l.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=In(Nn,e.__scopeCollapsible);return d.jsx(ge,{present:o||r.open,children:({present:i})=>d.jsx(cg,{...n,ref:t,present:i})})});Us.displayName=Nn;var cg=l.forwardRef((e,t)=>{const{__scopeCollapsible:o,present:n,children:r,...i}=e,a=In(Nn,o),[s,c]=l.useState(n),u=l.useRef(null),f=Q(t,u),p=l.useRef(0),g=p.current,m=l.useRef(0),b=m.current,v=a.open||s,h=l.useRef(v),y=l.useRef(void 0);return l.useEffect(()=>{const x=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(x)},[]),ae(()=>{const x=u.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();p.current=w.height,m.current=w.width,h.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),c(n)}},[a.open,n]),d.jsx($.div,{"data-state":jn(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...i,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&r})});function jn(e){return e?"open":"closed"}var ug=Ws,dg=Hs,fg=Us,xe="Accordion",pg=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[On,vg,mg]=Rn(xe),[wo]=de(xe,[mg,Vs]),_n=Vs(),Ks=oe.forwardRef((e,t)=>{const{type:o,...n}=e,r=n,i=n;return d.jsx(On.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?d.jsx(bg,{...i,ref:t}):d.jsx(xg,{...r,ref:t})})});Ks.displayName=xe;var[Ys,gg]=wo(xe),[Zs,hg]=wo(xe,{collapsible:!1}),xg=oe.forwardRef((e,t)=>{const{value:o,defaultValue:n,onValueChange:r=()=>{},collapsible:i=!1,...a}=e,[s,c]=fe({prop:o,defaultProp:n??"",onChange:r,caller:xe});return d.jsx(Ys,{scope:e.__scopeAccordion,value:oe.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:oe.useCallback(()=>i&&c(""),[i,c]),children:d.jsx(Zs,{scope:e.__scopeAccordion,collapsible:i,children:d.jsx(Xs,{...a,ref:t})})})}),bg=oe.forwardRef((e,t)=>{const{value:o,defaultValue:n,onValueChange:r=()=>{},...i}=e,[a,s]=fe({prop:o,defaultProp:n??[],onChange:r,caller:xe}),c=oe.useCallback(f=>s((p=[])=>[...p,f]),[s]),u=oe.useCallback(f=>s((p=[])=>p.filter(g=>g!==f)),[s]);return d.jsx(Ys,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:d.jsx(Zs,{scope:e.__scopeAccordion,collapsible:!0,children:d.jsx(Xs,{...i,ref:t})})})}),[yg,Co]=wo(xe),Xs=oe.forwardRef((e,t)=>{const{__scopeAccordion:o,disabled:n,dir:r,orientation:i="vertical",...a}=e,s=oe.useRef(null),c=Q(s,t),u=vg(o),p=co(r)==="ltr",g=L(e.onKeyDown,m=>{var R;if(!pg.includes(m.key))return;const b=m.target,v=u().filter(F=>{var B;return!((B=F.ref.current)!=null&&B.disabled)}),h=v.findIndex(F=>F.ref.current===b),y=v.length;if(h===-1)return;m.preventDefault();let x=h;const w=0,C=y-1,S=()=>{x=h+1,x>C&&(x=w)},k=()=>{x=h-1,x<w&&(x=C)};switch(m.key){case"Home":x=w;break;case"End":x=C;break;case"ArrowRight":i==="horizontal"&&(p?S():k());break;case"ArrowDown":i==="vertical"&&S();break;case"ArrowLeft":i==="horizontal"&&(p?k():S());break;case"ArrowUp":i==="vertical"&&k();break}const E=x%y;(R=v[E].ref.current)==null||R.focus()});return d.jsx(yg,{scope:o,disabled:n,direction:r,orientation:i,children:d.jsx(On.Slot,{scope:o,children:d.jsx($.div,{...a,"data-orientation":i,ref:c,onKeyDown:n?void 0:g})})})}),Yt="AccordionItem",[wg,Mn]=wo(Yt),Qs=oe.forwardRef((e,t)=>{const{__scopeAccordion:o,value:n,...r}=e,i=Co(Yt,o),a=gg(Yt,o),s=_n(o),c=ie(),u=n&&a.value.includes(n)||!1,f=i.disabled||e.disabled;return d.jsx(wg,{scope:o,open:u,disabled:f,triggerId:c,children:d.jsx(ug,{"data-orientation":i.orientation,"data-state":rl(u),...s,...r,ref:t,disabled:f,open:u,onOpenChange:p=>{p?a.onItemOpen(n):a.onItemClose(n)}})})});Qs.displayName=Yt;var Js="AccordionHeader",el=oe.forwardRef((e,t)=>{const{__scopeAccordion:o,...n}=e,r=Co(xe,o),i=Mn(Js,o);return d.jsx($.h3,{"data-orientation":r.orientation,"data-state":rl(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:t})});el.displayName=Js;var en="AccordionTrigger",tl=oe.forwardRef((e,t)=>{const{__scopeAccordion:o,...n}=e,r=Co(xe,o),i=Mn(en,o),a=hg(en,o),s=_n(o);return d.jsx(On.ItemSlot,{scope:o,children:d.jsx(dg,{"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":r.orientation,id:i.triggerId,...s,...n,ref:t})})});tl.displayName=en;var ol="AccordionContent",nl=oe.forwardRef((e,t)=>{const{__scopeAccordion:o,...n}=e,r=Co(xe,o),i=Mn(ol,o),a=_n(o);return d.jsx(fg,{role:"region","aria-labelledby":i.triggerId,"data-orientation":r.orientation,...a,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});nl.displayName=ol;function rl(e){return e?"open":"closed"}var Cg=Ks,Sg=Qs,Rg=el,Eg=tl,Pg=nl;const Tg=e=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e,children:d.jsx("path",{d:"M480-361q-8 0-15-2.5t-13-8.5L268-556q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-372q-6 6-13 8.5t-15 2.5Z"})}),kg=({className:e,...t})=>d.jsx(Cg,{"data-slot":"accordion",className:I(e),...t}),Ag=({className:e,...t})=>d.jsx(Sg,{"data-slot":"accordion-item",className:I(e),...t}),br=({className:e,...t})=>d.jsx(Tg,{className:I("volt-ui-text-gray-light volt-ui-pointer-events-none volt-ui-size-5 volt-ui-shrink-0 volt-ui-translate-y-0 volt-ui-transition-transform volt-ui-duration-200",e),...t}),Ig=({className:e,align:t="end",children:o,...n})=>d.jsx(Rg,{className:"volt-ui-flex",children:d.jsxs(Eg,{"data-slot":"accordion-trigger",className:I("volt-ui-outline-accent-a8 volt-ui-p-3 volt-ui-focus-visible:outline-offset-2 volt-ui-focus-visible:outline-2 volt-ui-flex volt-ui-flex-1 volt-ui-items-start volt-ui-gap-3 volt-ui-rounded-md volt-ui-py-4 volt-ui-text-left volt-ui-text-sm volt-ui-font-medium volt-ui-transition-all volt-ui-disabled:pointer-events-none volt-ui-disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",{"volt-ui-justify-start":t==="start","volt-ui-justify-between":t==="end"},e),...n,children:[t==="start"&&d.jsx(br,{}),o,t==="end"&&d.jsx(br,{})]})}),Ng=({className:e,children:t,...o})=>d.jsx(Pg,{"data-slot":"accordion-content",className:"volt-ui-data-[state=closed]:animate-accordion-up volt-ui-data-[state=open]:animate-accordion-down volt-ui-overflow-hidden volt-ui-duration-75 volt-ui-text-sm volt-ui-px-3 volt-ui-pb-2 volt-ui-pt-0",...o,children:d.jsx("div",{className:I("volt-ui-p-0",e),children:t})});exports.Accordion=kg;exports.AccordionContent=Ng;exports.AccordionItem=Ag;exports.AccordionTrigger=Ig;exports.Badge=Zm;exports.Button=Fr;exports.ButtonGroup=sc;exports.ButtonGroupSeparator=cc;exports.ButtonGroupText=lc;exports.Callout=tg;exports.CalloutAction=rg;exports.CalloutDescription=ng;exports.CalloutTitle=og;exports.Checkbox=bm;exports.Dialog=Ed;exports.DialogClose=Td;exports.DialogContent=kd;exports.DialogDescription=jd;exports.DialogFooter=Id;exports.DialogHeader=Ad;exports.DialogOverlay=_i;exports.DialogPortal=Oi;exports.DialogTitle=Nd;exports.DialogTrigger=Pd;exports.Field=gc;exports.FieldCombobox=yp;exports.FieldComboboxClear=Op;exports.FieldComboboxClearValue=Mp;exports.FieldComboboxContent=Ep;exports.FieldComboboxEmpty=Ap;exports.FieldComboboxGroup=wp;exports.FieldComboboxGroupLabel=Cp;exports.FieldComboboxInput=Pp;exports.FieldComboboxItem=kp;exports.FieldComboboxItemCheckIcon=Np;exports.FieldComboboxList=Tp;exports.FieldComboboxLoading=jp;exports.FieldComboboxPlaceholder=_p;exports.FieldComboboxSeparator=Ip;exports.FieldComboboxTrigger=Rp;exports.FieldComboboxValue=Sp;exports.FieldContent=hc;exports.FieldDescription=yc;exports.FieldError=wc;exports.FieldGroup=pc;exports.FieldGroupAddon=Sc;exports.FieldInput=Vr;exports.FieldInputGroup=Wr;exports.FieldLabel=xc;exports.FieldLabelContent=bc;exports.FieldSet=vc;exports.FieldTextarea=Gr;exports.Label=rn;exports.Popover=cm;exports.PopoverAnchor=fm;exports.PopoverContent=dm;exports.PopoverPortal=lm;exports.PopoverTrigger=um;exports.RadioGroup=Gm;exports.RadioGroupItem=Hm;exports.Select=Cv;exports.SelectContent=Ev;exports.SelectGroup=Sv;exports.SelectItem=Tv;exports.SelectLabel=Pv;exports.SelectScrollDownButton=Xa;exports.SelectScrollUpButton=Za;exports.SelectSeparator=kv;exports.SelectTrigger=Ya;exports.SelectValue=Rv;exports.Separator=Br;exports.Switch=sm;exports.Tooltip=Zv;exports.TooltipContent=Qv;exports.TooltipProvider=ss;exports.TooltipTrigger=Xv;exports.badgeVariants=qs;exports.buttonVariants=nn;exports.cn=I;exports.useFieldContext=wt;
|