import{r as c,R as de,a as Bn,b as Ci,c as Gn}from"./vendor-react-Dg0Tra3e.js";var Un={exports:{}},ct={};/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ri=c,Si=Symbol.for("react.element"),Pi=Symbol.for("react.fragment"),_i=Object.prototype.hasOwnProperty,Mi=Ri.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ai={key:!0,ref:!0,__self:!0,__source:!0};function Hn(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)_i.call(t,r)&&!Ai.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Si,type:e,key:i,ref:s,props:o,_owner:Mi.current}}ct.Fragment=Pi;ct.jsx=Hn;ct.jsxs=Hn;Un.exports=ct;var y=Un.exports;function P(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function vn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lt(...e){return t=>{let n=!1;const r=e.map(o=>{const i=vn(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():vn(e[o],null)}}}}function W(...e){return c.useCallback(lt(...e),e)}function Oi(e,t){const n=c.createContext(t),r=i=>{const{children:s,...a}=i,d=c.useMemo(()=>a,Object.values(a));return y.jsx(n.Provider,{value:d,children:s})};r.displayName=e+"Provider";function o(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function he(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s),d=n.length;n=[...n,s];const l=f=>{const{scope:h,children:p,...v}=f,m=h?.[e]?.[d]||a,g=c.useMemo(()=>v,Object.values(v));return y.jsx(m.Provider,{value:g,children:p})};l.displayName=i+"Provider";function u(f,h){const p=h?.[e]?.[d]||a,v=c.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[l,u]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(a){const d=a?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return o.scopeName=e,[r,Ti(o,...t)]}function Ti(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:d,scopeName:l})=>{const f=d(i)[`__scope${l}`];return{...a,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Re(e){const t=Di(e),n=c.forwardRef((r,o)=>{const{children:i,...s}=r,a=c.Children.toArray(i),d=a.find(Ni);if(d){const l=d.props.children,u=a.map(f=>f===d?c.Children.count(l)>1?c.Children.only(null):c.isValidElement(l)?l.props.children:null:f);return y.jsx(t,{...s,ref:o,children:c.isValidElement(l)?c.cloneElement(l,void 0,u):null})}return y.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var au=Re("Slot");function Di(e){const t=c.forwardRef((n,r)=>{const{children:o,...i}=n;if(c.isValidElement(o)){const s=ji(o),a=Li(i,o.props);return o.type!==c.Fragment&&(a.ref=r?lt(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kn=Symbol("radix.slottable");function Ii(e){const t=({children:n})=>y.jsx(y.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Kn,t}function Ni(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kn}function Li(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const d=i(...a);return o(...a),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ji(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Vn(e){const t=e+"CollectionProvider",[n,r]=he(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:g,children:w}=m,E=de.useRef(null),x=de.useRef(new Map).current;return y.jsx(o,{scope:g,itemMap:x,collectionRef:E,children:w})};s.displayName=t;const a=e+"CollectionSlot",d=Re(a),l=de.forwardRef((m,g)=>{const{scope:w,children:E}=m,x=i(a,w),b=W(g,x.collectionRef);return y.jsx(d,{ref:b,children:E})});l.displayName=a;const u=e+"CollectionItemSlot",f="data-radix-collection-item",h=Re(u),p=de.forwardRef((m,g)=>{const{scope:w,children:E,...x}=m,b=de.useRef(null),C=W(g,b),_=i(u,w);return de.useEffect(()=>(_.itemMap.set(b,{ref:b,...x}),()=>void _.itemMap.delete(b))),y.jsx(h,{[f]:"",ref:C,children:E})});p.displayName=u;function v(m){const g=i(e+"CollectionConsumer",m);return de.useCallback(()=>{const E=g.collectionRef.current;if(!E)return[];const x=Array.from(E.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((_,R)=>x.indexOf(_.ref.current)-x.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:s,Slot:l,ItemSlot:p},v,r]}var Fi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],L=Fi.reduce((e,t)=>{const n=Re(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,d=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function zn(e,t){e&&Bn.flushSync(()=>e.dispatchEvent(t))}function ne(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function ki(e,t=globalThis?.document){const n=ne(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var $i="DismissableLayer",It="dismissableLayer.update",Wi="dismissableLayer.pointerDownOutside",Bi="dismissableLayer.focusOutside",gn,Yn=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ke=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...d}=e,l=c.useContext(Yn),[u,f]=c.useState(null),h=u?.ownerDocument??globalThis?.document,[,p]=c.useState({}),v=W(t,R=>f(R)),m=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(g),E=u?m.indexOf(u):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,b=E>=w,C=Ui(R=>{const M=R.target,D=[...l.branches].some(O=>O.contains(M));!b||D||(o?.(R),s?.(R),R.defaultPrevented||a?.())},h),_=Hi(R=>{const M=R.target;[...l.branches].some(O=>O.contains(M))||(i?.(R),s?.(R),R.defaultPrevented||a?.())},h);return ki(R=>{E===l.layers.size-1&&(r?.(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},h),c.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(gn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),yn(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=gn)}},[u,h,n,l]),c.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),yn())},[u,l]),c.useEffect(()=>{const R=()=>p({});return document.addEventListener(It,R),()=>document.removeEventListener(It,R)},[]),y.jsx(L.div,{...d,ref:v,style:{pointerEvents:x?b?"auto":"none":void 0,...e.style},onFocusCapture:P(e.onFocusCapture,_.onFocusCapture),onBlurCapture:P(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:P(e.onPointerDownCapture,C.onPointerDownCapture)})});ke.displayName=$i;var Gi="DismissableLayerBranch",Xn=c.forwardRef((e,t)=>{const n=c.useContext(Yn),r=c.useRef(null),o=W(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),y.jsx(L.div,{...e,ref:o})});Xn.displayName=Gi;function Ui(e,t=globalThis?.document){const n=ne(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let d=function(){qn(Wi,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Hi(e,t=globalThis?.document){const n=ne(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&qn(Bi,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yn(){const e=new CustomEvent(It);document.dispatchEvent(e)}function qn(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?zn(o,i):o.dispatchEvent(i)}var cu=ke,lu=Xn,ae=globalThis?.document?c.useLayoutEffect:()=>{},Ki="Portal",Ut=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=c.useState(!1);ae(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?Ci.createPortal(y.jsx(L.div,{...r,ref:t}),s):null});Ut.displayName=Ki;function Vi(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ie=e=>{const{present:t,children:n}=e,r=zi(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=W(r.ref,Yi(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};ie.displayName="Presence";function zi(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),i=c.useRef("none"),s=e?"mounted":"unmounted",[a,d]=Vi(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=Ke(r.current);i.current=a==="mounted"?l:"none"},[a]),ae(()=>{const l=r.current,u=o.current;if(u!==e){const h=i.current,p=Ke(l);e?d("MOUNT"):p==="none"||l?.display==="none"?d("UNMOUNT"):d(u&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),ae(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,f=p=>{const m=Ke(r.current).includes(p.animationName);if(p.target===t&&m&&(d("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=p=>{p.target===t&&(i.current=Ke(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Ke(e){return e?.animationName||"none"}function Yi(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xi=Gn[" useInsertionEffect ".trim().toString()]||ae;function Ht({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=qi({defaultProp:t,onChange:n}),a=e!==void 0,d=a?e:o;{const u=c.useRef(e!==void 0);c.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const l=c.useCallback(u=>{if(a){const f=Zi(u)?u(e):u;f!==e&&s.current?.(f)}else i(u)},[a,e,i,s]);return[d,l]}function qi({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return Xi(()=>{i.current=t},[t]),c.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function Zi(e){return typeof e=="function"}var Qi=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"}),Ji="VisuallyHidden",Zn=c.forwardRef((e,t)=>y.jsx(L.span,{...e,ref:t,style:{...Qi,...e.style}}));Zn.displayName=Ji;var es=Zn,ts=Gn[" useId ".trim().toString()]||(()=>{}),ns=0;function be(e){const[t,n]=c.useState(ts());return ae(()=>{n(r=>r??String(ns++))},[e]),t?`radix-${t}`:""}const rs=["top","right","bottom","left"],ce=Math.min,H=Math.max,et=Math.round,Ve=Math.floor,J=e=>({x:e,y:e}),os={left:"right",right:"left",bottom:"top",top:"bottom"},is={start:"end",end:"start"};function Nt(e,t,n){return H(e,ce(t,n))}function re(e,t){return typeof e=="function"?e(t):e}function oe(e){return e.split("-")[0]}function Me(e){return e.split("-")[1]}function Kt(e){return e==="x"?"y":"x"}function Vt(e){return e==="y"?"height":"width"}const ss=new Set(["top","bottom"]);function Q(e){return ss.has(oe(e))?"y":"x"}function zt(e){return Kt(Q(e))}function as(e,t,n){n===void 0&&(n=!1);const r=Me(e),o=zt(e),i=Vt(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=tt(s)),[s,tt(s)]}function cs(e){const t=tt(e);return[Lt(e),t,Lt(t)]}function Lt(e){return e.replace(/start|end/g,t=>is[t])}const wn=["left","right"],xn=["right","left"],ls=["top","bottom"],us=["bottom","top"];function fs(e,t,n){switch(e){case"top":case"bottom":return n?t?xn:wn:t?wn:xn;case"left":case"right":return t?ls:us;default:return[]}}function ds(e,t,n,r){const o=Me(e);let i=fs(oe(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Lt)))),i}function tt(e){return e.replace(/left|right|bottom|top/g,t=>os[t])}function ps(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qn(e){return typeof e!="number"?ps(e):{top:e,right:e,bottom:e,left:e}}function nt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function bn(e,t,n){let{reference:r,floating:o}=e;const i=Q(t),s=zt(t),a=Vt(s),d=oe(t),l=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(d){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Me(t)){case"start":p[s]-=h*(n&&l?-1:1);break;case"end":p[s]+=h*(n&&l?-1:1);break}return p}const ms=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),d=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=bn(l,r,d),h=r,p={},v=0;for(let m=0;m<a.length;m++){const{name:g,fn:w}=a[m],{x:E,y:x,data:b,reset:C}=await w({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:l,platform:s,elements:{reference:e,floating:t}});u=E??u,f=x??f,p={...p,[g]:{...p[g],...b}},C&&v<=50&&(v++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(l=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:u,y:f}=bn(l,h,d)),m=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:p}};async function Ne(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:d}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=re(t,e),v=Qn(p),g=a[h?f==="floating"?"reference":"floating":f],w=nt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:d})),E=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},C=nt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:x,strategy:d}):E);return{top:(w.top-C.top+v.top)/b.y,bottom:(C.bottom-w.bottom+v.bottom)/b.y,left:(w.left-C.left+v.left)/b.x,right:(C.right-w.right+v.right)/b.x}}const hs=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:d}=t,{element:l,padding:u=0}=re(e,t)||{};if(l==null)return{};const f=Qn(u),h={x:n,y:r},p=zt(o),v=Vt(p),m=await s.getDimensions(l),g=p==="y",w=g?"top":"left",E=g?"bottom":"right",x=g?"clientHeight":"clientWidth",b=i.reference[v]+i.reference[p]-h[p]-i.floating[v],C=h[p]-i.reference[p],_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let R=_?_[x]:0;(!R||!await(s.isElement==null?void 0:s.isElement(_)))&&(R=a.floating[x]||i.floating[v]);const M=b/2-C/2,D=R/2-m[v]/2-1,O=ce(f[w],D),j=ce(f[E],D),F=O,N=R-m[v]-j,I=R/2-m[v]/2+M,B=Nt(F,I,N),T=!d.arrow&&Me(o)!=null&&I!==B&&i.reference[v]/2-(I<F?O:j)-m[v]/2<0,k=T?I<F?I-F:I-N:0;return{[p]:h[p]+k,data:{[p]:B,centerOffset:I-B-k,...T&&{alignmentOffset:k}},reset:T}}}),vs=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:d,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...g}=re(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=oe(o),E=Q(a),x=oe(a)===a,b=await(d.isRTL==null?void 0:d.isRTL(l.floating)),C=h||(x||!m?[tt(a)]:cs(a)),_=v!=="none";!h&&_&&C.push(...ds(a,m,v,b));const R=[a,...C],M=await Ne(t,g),D=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&D.push(M[w]),f){const I=as(o,s,b);D.push(M[I[0]],M[I[1]])}if(O=[...O,{placement:o,overflows:D}],!D.every(I=>I<=0)){var j,F;const I=(((j=i.flip)==null?void 0:j.index)||0)+1,B=R[I];if(B&&(!(f==="alignment"?E!==Q(B):!1)||O.every(A=>A.overflows[0]>0&&Q(A.placement)===E)))return{data:{index:I,overflows:O},reset:{placement:B}};let T=(F=O.filter(k=>k.overflows[0]<=0).sort((k,A)=>k.overflows[1]-A.overflows[1])[0])==null?void 0:F.placement;if(!T)switch(p){case"bestFit":{var N;const k=(N=O.filter(A=>{if(_){const S=Q(A.placement);return S===E||S==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(S=>S>0).reduce((S,G)=>S+G,0)]).sort((A,S)=>A[1]-S[1])[0])==null?void 0:N[0];k&&(T=k);break}case"initialPlacement":T=a;break}if(o!==T)return{reset:{placement:T}}}return{}}}};function En(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cn(e){return rs.some(t=>e[t]>=0)}const gs=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=re(e,t);switch(r){case"referenceHidden":{const i=await Ne(t,{...o,elementContext:"reference"}),s=En(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Cn(s)}}}case"escaped":{const i=await Ne(t,{...o,altBoundary:!0}),s=En(i,n.floating);return{data:{escapedOffsets:s,escaped:Cn(s)}}}default:return{}}}}},Jn=new Set(["left","top"]);async function ys(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=oe(n),a=Me(n),d=Q(n)==="y",l=Jn.has(s)?-1:1,u=i&&d?-1:1,f=re(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),d?{x:p*u,y:h*l}:{x:h*l,y:p*u}}const ws=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,d=await ys(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:i+d.y,data:{...d,placement:s}}}}},xs=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:w,y:E}=g;return{x:w,y:E}}},...d}=re(e,t),l={x:n,y:r},u=await Ne(t,d),f=Q(oe(o)),h=Kt(f);let p=l[h],v=l[f];if(i){const g=h==="y"?"top":"left",w=h==="y"?"bottom":"right",E=p+u[g],x=p-u[w];p=Nt(E,p,x)}if(s){const g=f==="y"?"top":"left",w=f==="y"?"bottom":"right",E=v+u[g],x=v-u[w];v=Nt(E,v,x)}const m=a.fn({...t,[h]:p,[f]:v});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[f]:s}}}}}},bs=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:d=!0,crossAxis:l=!0}=re(e,t),u={x:n,y:r},f=Q(o),h=Kt(f);let p=u[h],v=u[f];const m=re(a,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(d){const x=h==="y"?"height":"width",b=i.reference[h]-i.floating[x]+g.mainAxis,C=i.reference[h]+i.reference[x]-g.mainAxis;p<b?p=b:p>C&&(p=C)}if(l){var w,E;const x=h==="y"?"width":"height",b=Jn.has(oe(o)),C=i.reference[f]-i.floating[x]+(b&&((w=s.offset)==null?void 0:w[f])||0)+(b?0:g.crossAxis),_=i.reference[f]+i.reference[x]+(b?0:((E=s.offset)==null?void 0:E[f])||0)-(b?g.crossAxis:0);v<C?v=C:v>_&&(v=_)}return{[h]:p,[f]:v}}}},Es=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:d=()=>{},...l}=re(e,t),u=await Ne(t,l),f=oe(o),h=Me(o),p=Q(o)==="y",{width:v,height:m}=i.floating;let g,w;f==="top"||f==="bottom"?(g=f,w=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(w=f,g=h==="end"?"top":"bottom");const E=m-u.top-u.bottom,x=v-u.left-u.right,b=ce(m-u[g],E),C=ce(v-u[w],x),_=!t.middlewareData.shift;let R=b,M=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=E),_&&!h){const O=H(u.left,0),j=H(u.right,0),F=H(u.top,0),N=H(u.bottom,0);p?M=v-2*(O!==0||j!==0?O+j:H(u.left,u.right)):R=m-2*(F!==0||N!==0?F+N:H(u.top,u.bottom))}await d({...t,availableWidth:M,availableHeight:R});const D=await s.getDimensions(a.floating);return v!==D.width||m!==D.height?{reset:{rects:!0}}:{}}}};function ut(){return typeof window<"u"}function Ae(e){return er(e)?(e.nodeName||"").toLowerCase():"#document"}function K(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function te(e){var t;return(t=(er(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function er(e){return ut()?e instanceof Node||e instanceof K(e).Node:!1}function Y(e){return ut()?e instanceof Element||e instanceof K(e).Element:!1}function ee(e){return ut()?e instanceof HTMLElement||e instanceof K(e).HTMLElement:!1}function Rn(e){return!ut()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof K(e).ShadowRoot}const Cs=new Set(["inline","contents"]);function $e(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Cs.has(o)}const Rs=new Set(["table","td","th"]);function Ss(e){return Rs.has(Ae(e))}const Ps=[":popover-open",":modal"];function ft(e){return Ps.some(t=>{try{return e.matches(t)}catch{return!1}})}const _s=["transform","translate","scale","rotate","perspective"],Ms=["transform","translate","scale","rotate","perspective","filter"],As=["paint","layout","strict","content"];function Yt(e){const t=Xt(),n=Y(e)?X(e):e;return _s.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Ms.some(r=>(n.willChange||"").includes(r))||As.some(r=>(n.contain||"").includes(r))}function Os(e){let t=le(e);for(;ee(t)&&!Se(t);){if(Yt(t))return t;if(ft(t))return null;t=le(t)}return null}function Xt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ts=new Set(["html","body","#document"]);function Se(e){return Ts.has(Ae(e))}function X(e){return K(e).getComputedStyle(e)}function dt(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function le(e){if(Ae(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rn(e)&&e.host||te(e);return Rn(t)?t.host:t}function tr(e){const t=le(e);return Se(t)?e.ownerDocument?e.ownerDocument.body:e.body:ee(t)&&$e(t)?t:tr(t)}function Le(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=tr(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=K(o);if(i){const a=jt(s);return t.concat(s,s.visualViewport||[],$e(o)?o:[],a&&n?Le(a):[])}return t.concat(o,Le(o,[],n))}function jt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nr(e){const t=X(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ee(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=et(n)!==i||et(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function qt(e){return Y(e)?e:e.contextElement}function Ee(e){const t=qt(e);if(!ee(t))return J(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=nr(t);let s=(i?et(n.width):n.width)/r,a=(i?et(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Ds=J(0);function rr(e){const t=K(e);return!Xt()||!t.visualViewport?Ds:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Is(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==K(e)?!1:t}function pe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=qt(e);let s=J(1);t&&(r?Y(r)&&(s=Ee(r)):s=Ee(e));const a=Is(i,n,r)?rr(i):J(0);let d=(o.left+a.x)/s.x,l=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const h=K(i),p=r&&Y(r)?K(r):r;let v=h,m=jt(v);for(;m&&r&&p!==v;){const g=Ee(m),w=m.getBoundingClientRect(),E=X(m),x=w.left+(m.clientLeft+parseFloat(E.paddingLeft))*g.x,b=w.top+(m.clientTop+parseFloat(E.paddingTop))*g.y;d*=g.x,l*=g.y,u*=g.x,f*=g.y,d+=x,l+=b,v=K(m),m=jt(v)}}return nt({width:u,height:f,x:d,y:l})}function Zt(e,t){const n=dt(e).scrollLeft;return t?t.left+n:pe(te(e)).left+n}function or(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Zt(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function Ns(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=te(r),a=t?ft(t.floating):!1;if(r===s||a&&i)return n;let d={scrollLeft:0,scrollTop:0},l=J(1);const u=J(0),f=ee(r);if((f||!f&&!i)&&((Ae(r)!=="body"||$e(s))&&(d=dt(r)),ee(r))){const p=pe(r);l=Ee(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const h=s&&!f&&!i?or(s,d,!0):J(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-d.scrollLeft*l.x+u.x+h.x,y:n.y*l.y-d.scrollTop*l.y+u.y+h.y}}function Ls(e){return Array.from(e.getClientRects())}function js(e){const t=te(e),n=dt(e),r=e.ownerDocument.body,o=H(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=H(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Zt(e);const a=-n.scrollTop;return X(r).direction==="rtl"&&(s+=H(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Fs(e,t){const n=K(e),r=te(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,d=0;if(o){i=o.width,s=o.height;const l=Xt();(!l||l&&t==="fixed")&&(a=o.offsetLeft,d=o.offsetTop)}return{width:i,height:s,x:a,y:d}}const ks=new Set(["absolute","fixed"]);function $s(e,t){const n=pe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ee(e)?Ee(e):J(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,d=o*i.x,l=r*i.y;return{width:s,height:a,x:d,y:l}}function Sn(e,t,n){let r;if(t==="viewport")r=Fs(e,n);else if(t==="document")r=js(te(e));else if(Y(t))r=$s(t,n);else{const o=rr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return nt(r)}function ir(e,t){const n=le(e);return n===t||!Y(n)||Se(n)?!1:X(n).position==="fixed"||ir(n,t)}function Ws(e,t){const n=t.get(e);if(n)return n;let r=Le(e,[],!1).filter(a=>Y(a)&&Ae(a)!=="body"),o=null;const i=X(e).position==="fixed";let s=i?le(e):e;for(;Y(s)&&!Se(s);){const a=X(s),d=Yt(s);!d&&a.position==="fixed"&&(o=null),(i?!d&&!o:!d&&a.position==="static"&&!!o&&ks.has(o.position)||$e(s)&&!d&&ir(e,s))?r=r.filter(u=>u!==s):o=a,s=le(s)}return t.set(e,r),r}function Bs(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?ft(t)?[]:Ws(t,this._c):[].concat(n),r],a=s[0],d=s.reduce((l,u)=>{const f=Sn(t,u,o);return l.top=H(f.top,l.top),l.right=ce(f.right,l.right),l.bottom=ce(f.bottom,l.bottom),l.left=H(f.left,l.left),l},Sn(t,a,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Gs(e){const{width:t,height:n}=nr(e);return{width:t,height:n}}function Us(e,t,n){const r=ee(t),o=te(t),i=n==="fixed",s=pe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const d=J(0);function l(){d.x=Zt(o)}if(r||!r&&!i)if((Ae(t)!=="body"||$e(o))&&(a=dt(t)),r){const p=pe(t,!0,i,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else o&&l();i&&!r&&o&&l();const u=o&&!r&&!i?or(o,a):J(0),f=s.left+a.scrollLeft-d.x-u.x,h=s.top+a.scrollTop-d.y-u.y;return{x:f,y:h,width:s.width,height:s.height}}function Ct(e){return X(e).position==="static"}function Pn(e,t){if(!ee(e)||X(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return te(e)===n&&(n=n.ownerDocument.body),n}function sr(e,t){const n=K(e);if(ft(e))return n;if(!ee(e)){let o=le(e);for(;o&&!Se(o);){if(Y(o)&&!Ct(o))return o;o=le(o)}return n}let r=Pn(e,t);for(;r&&Ss(r)&&Ct(r);)r=Pn(r,t);return r&&Se(r)&&Ct(r)&&!Yt(r)?n:r||Os(e)||n}const Hs=async function(e){const t=this.getOffsetParent||sr,n=this.getDimensions,r=await n(e.floating);return{reference:Us(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ks(e){return X(e).direction==="rtl"}const Vs={convertOffsetParentRelativeRectToViewportRelativeRect:Ns,getDocumentElement:te,getClippingRect:Bs,getOffsetParent:sr,getElementRects:Hs,getClientRects:Ls,getDimensions:Gs,getScale:Ee,isElement:Y,isRTL:Ks};function ar(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zs(e,t){let n=null,r;const o=te(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),i();const l=e.getBoundingClientRect(),{left:u,top:f,width:h,height:p}=l;if(a||t(),!h||!p)return;const v=Ve(f),m=Ve(o.clientWidth-(u+h)),g=Ve(o.clientHeight-(f+p)),w=Ve(u),x={rootMargin:-v+"px "+-m+"px "+-g+"px "+-w+"px",threshold:H(0,ce(1,d))||1};let b=!0;function C(_){const R=_[0].intersectionRatio;if(R!==d){if(!b)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!ar(l,e.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return s(!0),i}function Ys(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,l=qt(e),u=o||i?[...l?Le(l):[],...Le(t)]:[];u.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const f=l&&a?zs(l,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(w=>{let[E]=w;E&&E.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),l&&!d&&p.observe(l),p.observe(t));let v,m=d?pe(e):null;d&&g();function g(){const w=pe(e);m&&!ar(m,w)&&n(),m=w,v=requestAnimationFrame(g)}return n(),()=>{var w;u.forEach(E=>{o&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),f?.(),(w=p)==null||w.disconnect(),p=null,d&&cancelAnimationFrame(v)}}const Xs=ws,qs=xs,Zs=vs,Qs=Es,Js=gs,_n=hs,ea=bs,ta=(e,t,n)=>{const r=new Map,o={platform:Vs,...n},i={...o.platform,_c:r};return ms(e,t,{...o,platform:i})};var na=typeof document<"u",ra=function(){},Ze=na?c.useLayoutEffect:ra;function rt(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 n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!rt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!rt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function cr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mn(e,t){const n=cr(e);return Math.round(t*n)/n}function Rt(e){const t=c.useRef(e);return Ze(()=>{t.current=e}),t}function oa(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:d,open:l}=e,[u,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=c.useState(r);rt(h,r)||p(r);const[v,m]=c.useState(null),[g,w]=c.useState(null),E=c.useCallback(A=>{A!==_.current&&(_.current=A,m(A))},[]),x=c.useCallback(A=>{A!==R.current&&(R.current=A,w(A))},[]),b=i||v,C=s||g,_=c.useRef(null),R=c.useRef(null),M=c.useRef(u),D=d!=null,O=Rt(d),j=Rt(o),F=Rt(l),N=c.useCallback(()=>{if(!_.current||!R.current)return;const A={placement:t,strategy:n,middleware:h};j.current&&(A.platform=j.current),ta(_.current,R.current,A).then(S=>{const G={...S,isPositioned:F.current!==!1};I.current&&!rt(M.current,G)&&(M.current=G,Bn.flushSync(()=>{f(G)}))})},[h,t,n,j,F]);Ze(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[l]);const I=c.useRef(!1);Ze(()=>(I.current=!0,()=>{I.current=!1}),[]),Ze(()=>{if(b&&(_.current=b),C&&(R.current=C),b&&C){if(O.current)return O.current(b,C,N);N()}},[b,C,N,O,D]);const B=c.useMemo(()=>({reference:_,floating:R,setReference:E,setFloating:x}),[E,x]),T=c.useMemo(()=>({reference:b,floating:C}),[b,C]),k=c.useMemo(()=>{const A={position:n,left:0,top:0};if(!T.floating)return A;const S=Mn(T.floating,u.x),G=Mn(T.floating,u.y);return a?{...A,transform:"translate("+S+"px, "+G+"px)",...cr(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:S,top:G}},[n,a,T.floating,u.x,u.y]);return c.useMemo(()=>({...u,update:N,refs:B,elements:T,floatingStyles:k}),[u,N,B,T,k])}const ia=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?_n({element:r.current,padding:o}).fn(n):{}:r?_n({element:r,padding:o}).fn(n):{}}}},sa=(e,t)=>({...Xs(e),options:[e,t]}),aa=(e,t)=>({...qs(e),options:[e,t]}),ca=(e,t)=>({...ea(e),options:[e,t]}),la=(e,t)=>({...Zs(e),options:[e,t]}),ua=(e,t)=>({...Qs(e),options:[e,t]}),fa=(e,t)=>({...Js(e),options:[e,t]}),da=(e,t)=>({...ia(e),options:[e,t]});var pa="Arrow",lr=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return y.jsx(L.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});lr.displayName=pa;var ma=lr;function ha(e){const[t,n]=c.useState(void 0);return ae(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const d=i.borderBoxSize,l=Array.isArray(d)?d[0]:d;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Qt="Popper",[ur,pt]=he(Qt),[va,fr]=ur(Qt),dr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return y.jsx(va,{scope:t,anchor:r,onAnchorChange:o,children:n})};dr.displayName=Qt;var pr="PopperAnchor",mr=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=fr(pr,n),s=c.useRef(null),a=W(t,s);return c.useEffect(()=>{i.onAnchorChange(r?.current||s.current)}),r?null:y.jsx(L.div,{...o,ref:a})});mr.displayName=pr;var Jt="PopperContent",[ga,ya]=ur(Jt),hr=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:v,...m}=e,g=fr(Jt,n),[w,E]=c.useState(null),x=W(t,$=>E($)),[b,C]=c.useState(null),_=ha(b),R=_?.width??0,M=_?.height??0,D=r+(i!=="center"?"-"+i:""),O=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},j=Array.isArray(l)?l:[l],F=j.length>0,N={padding:O,boundary:j.filter(xa),altBoundary:F},{refs:I,floatingStyles:B,placement:T,isPositioned:k,middlewareData:A}=oa({strategy:"fixed",placement:D,whileElementsMounted:(...$)=>Ys(...$,{animationFrame:p==="always"}),elements:{reference:g.anchor},middleware:[sa({mainAxis:o+M,alignmentAxis:s}),d&&aa({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?ca():void 0,...N}),d&&la({...N}),ua({...N,apply:({elements:$,rects:De,availableWidth:wi,availableHeight:xi})=>{const{width:bi,height:Ei}=De.reference,He=$.floating.style;He.setProperty("--radix-popper-available-width",`${wi}px`),He.setProperty("--radix-popper-available-height",`${xi}px`),He.setProperty("--radix-popper-anchor-width",`${bi}px`),He.setProperty("--radix-popper-anchor-height",`${Ei}px`)}}),b&&da({element:b,padding:a}),ba({arrowWidth:R,arrowHeight:M}),h&&fa({strategy:"referenceHidden",...N})]}),[S,G]=yr(T),Z=ne(v);ae(()=>{k&&Z?.()},[k,Z]);const ue=A.arrow?.x,Oe=A.arrow?.y,Te=A.arrow?.centerOffset!==0,[Ue,fe]=c.useState();return ae(()=>{w&&fe(window.getComputedStyle(w).zIndex)},[w]),y.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:k?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ue,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(ga,{scope:n,placedSide:S,onArrowChange:C,arrowX:ue,arrowY:Oe,shouldHideArrow:Te,children:y.jsx(L.div,{"data-side":S,"data-align":G,...m,ref:x,style:{...m.style,animation:k?void 0:"none"}})})})});hr.displayName=Jt;var vr="PopperArrow",wa={top:"bottom",right:"left",bottom:"top",left:"right"},gr=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=ya(vr,r),s=wa[i.placedSide];return y.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]: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:y.jsx(ma,{...o,ref:n,style:{...o.style,display:"block"}})})});gr.displayName=vr;function xa(e){return e!==null}var ba=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[l,u]=yr(n),f={start:"0%",center:"50%",end:"100%"}[u],h=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+d/2;let v="",m="";return l==="bottom"?(v=s?f:`${h}px`,m=`${-d}px`):l==="top"?(v=s?f:`${h}px`,m=`${r.floating.height+d}px`):l==="right"?(v=`${-d}px`,m=s?f:`${p}px`):l==="left"&&(v=`${r.floating.width+d}px`,m=s?f:`${p}px`),{data:{x:v,y:m}}}});function yr(e){const[t,n="center"]=e.split("-");return[t,n]}var Ea=dr,wr=mr,xr=hr,br=gr,[mt,uu]=he("Tooltip",[pt]),en=pt(),Er="TooltipProvider",Ca=700,An="tooltip.open",[Ra,Cr]=mt(Er),Rr=e=>{const{__scopeTooltip:t,delayDuration:n=Ca,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=c.useRef(!0),a=c.useRef(!1),d=c.useRef(0);return c.useEffect(()=>{const l=d.current;return()=>window.clearTimeout(l)},[]),y.jsx(Ra,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(d.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(l=>{a.current=l},[]),disableHoverableContent:o,children:i})};Rr.displayName=Er;var Sr="Tooltip",[fu,ht]=mt(Sr),Ft="TooltipTrigger",Sa=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ht(Ft,n),i=Cr(Ft,n),s=en(n),a=c.useRef(null),d=W(t,a,o.onTriggerChange),l=c.useRef(!1),u=c.useRef(!1),f=c.useCallback(()=>l.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),y.jsx(wr,{asChild:!0,...s,children:y.jsx(L.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:d,onPointerMove:P(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:P(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:P(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:P(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:P(e.onBlur,o.onClose),onClick:P(e.onClick,o.onClose)})})});Sa.displayName=Ft;var Pa="TooltipPortal",[du,_a]=mt(Pa,{forceMount:void 0}),Pe="TooltipContent",Pr=c.forwardRef((e,t)=>{const n=_a(Pe,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=ht(Pe,e.__scopeTooltip);return y.jsx(ie,{present:r||s.open,children:s.disableHoverableContent?y.jsx(_r,{side:o,...i,ref:t}):y.jsx(Ma,{side:o,...i,ref:t})})}),Ma=c.forwardRef((e,t)=>{const n=ht(Pe,e.__scopeTooltip),r=Cr(Pe,e.__scopeTooltip),o=c.useRef(null),i=W(t,o),[s,a]=c.useState(null),{trigger:d,onClose:l}=n,u=o.current,{onPointerInTransitChange:f}=r,h=c.useCallback(()=>{a(null),f(!1)},[f]),p=c.useCallback((v,m)=>{const g=v.currentTarget,w={x:v.clientX,y:v.clientY},E=Ia(w,g.getBoundingClientRect()),x=Na(w,E),b=La(m.getBoundingClientRect()),C=Fa([...x,...b]);a(C),f(!0)},[f]);return c.useEffect(()=>()=>h(),[h]),c.useEffect(()=>{if(d&&u){const v=g=>p(g,u),m=g=>p(g,d);return d.addEventListener("pointerleave",v),u.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",m)}}},[d,u,p,h]),c.useEffect(()=>{if(s){const v=m=>{const g=m.target,w={x:m.clientX,y:m.clientY},E=d?.contains(g)||u?.contains(g),x=!ja(w,s);E?h():x&&(h(),l())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[d,u,s,l,h]),y.jsx(_r,{...e,ref:i})}),[Aa,Oa]=mt(Sr,{isInside:!1}),Ta=Ii("TooltipContent"),_r=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,d=ht(Pe,n),l=en(n),{onClose:u}=d;return c.useEffect(()=>(document.addEventListener(An,u),()=>document.removeEventListener(An,u)),[u]),c.useEffect(()=>{if(d.trigger){const f=h=>{h.target?.contains(d.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[d.trigger,u]),y.jsx(ke,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:y.jsxs(xr,{"data-state":d.stateAttribute,...l,...a,ref:t,style:{...a.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:[y.jsx(Ta,{children:r}),y.jsx(Aa,{scope:n,isInside:!0,children:y.jsx(es,{id:d.contentId,role:"tooltip",children:o||r})})]})})});Pr.displayName=Pe;var Mr="TooltipArrow",Da=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=en(n);return Oa(Mr,n).isInside?null:y.jsx(br,{...o,...r,ref:t})});Da.displayName=Mr;function Ia(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Na(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function La(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function ja(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],d=t[s],l=a.x,u=a.y,f=d.x,h=d.y;u>r!=h>r&&n<(f-l)*(r-u)/(h-u)+l&&(o=!o)}return o}function Fa(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ka(t)}function ka(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var pu=Rr,mu=Pr,kt=function(e,t){return kt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},kt(e,t)};function Ar(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");kt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var V=function(){return V=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},V.apply(this,arguments)};function vt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Or(e,t,n,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,n,i):s(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function Tr(e,t){return function(n,r){t(n,r,e)}}function Dr(e,t,n,r,o,i){function s(w){if(w!==void 0&&typeof w!="function")throw new TypeError("Function expected");return w}for(var a=r.kind,d=a==="getter"?"get":a==="setter"?"set":"value",l=!t&&e?r.static?e:e.prototype:null,u=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),f,h=!1,p=n.length-1;p>=0;p--){var v={};for(var m in r)v[m]=m==="access"?{}:r[m];for(var m in r.access)v.access[m]=r.access[m];v.addInitializer=function(w){if(h)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(w||null))};var g=(0,n[p])(a==="accessor"?{get:u.get,set:u.set}:u[d],v);if(a==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(f=s(g.get))&&(u.get=f),(f=s(g.set))&&(u.set=f),(f=s(g.init))&&o.unshift(f)}else(f=s(g))&&(a==="field"?o.unshift(f):u[d]=f)}l&&Object.defineProperty(l,r.name,u),h=!0}function Ir(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function Nr(e){return typeof e=="symbol"?e:"".concat(e)}function Lr(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function jr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Fr(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{l(r.next(u))}catch(f){s(f)}}function d(u){try{l(r.throw(u))}catch(f){s(f)}}function l(u){u.done?i(u.value):o(u.value).then(a,d)}l((r=r.apply(e,t||[])).next())})}function kr(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return d([l,u])}}function d(l){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var gt=Object.create?function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};function $r(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&gt(t,e,n)}function ot(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function tn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function Wr(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(tn(arguments[t]));return e}function Br(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}function nn(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function _e(e){return this instanceof _e?(this.v=e,this):new _e(e)}function Gr(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(p){return function(v){return Promise.resolve(v).then(p,f)}}function a(p,v){r[p]&&(o[p]=function(m){return new Promise(function(g,w){i.push([p,m,g,w])>1||d(p,m)})},v&&(o[p]=v(o[p])))}function d(p,v){try{l(r[p](v))}catch(m){h(i[0][3],m)}}function l(p){p.value instanceof _e?Promise.resolve(p.value.v).then(u,f):h(i[0][2],p)}function u(p){d("next",p)}function f(p){d("throw",p)}function h(p,v){p(v),i.shift(),i.length&&d(i[0][0],i[0][1])}}function Ur(e){var t,n;return t={},r("next"),r("throw",function(o){throw o}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(o,i){t[o]=e[o]?function(s){return(n=!n)?{value:_e(e[o](s)),done:!1}:i?i(s):s}:i}}function Hr(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof ot=="function"?ot(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(s){return new Promise(function(a,d){s=e[i](s),o(a,d,s.done,s.value)})}}function o(i,s,a,d){Promise.resolve(d).then(function(l){i({value:l,done:a})},s)}}function Kr(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var $a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},$t=function(e){return $t=Object.getOwnPropertyNames||function(t){var n=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[n.length]=r);return n},$t(e)};function Vr(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=$t(e),r=0;r<n.length;r++)n[r]!=="default"&&gt(t,e,n[r]);return $a(t,e),t}function zr(e){return e&&e.__esModule?e:{default:e}}function Yr(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function Xr(e,t,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n}function qr(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Zr(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(i){return Promise.reject(i)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var Wa=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function Qr(e){function t(i){e.error=e.hasError?new Wa(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}var n,r=0;function o(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,function(s){return t(s),o()})}else r|=1}catch(s){t(s)}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()}function Jr(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,o,i,s){return r?t?".jsx":".js":o&&(!i||!s)?n:o+i+"."+s.toLowerCase()+"js"}):e}const Ba={__extends:Ar,__assign:V,__rest:vt,__decorate:Or,__param:Tr,__esDecorate:Dr,__runInitializers:Ir,__propKey:Nr,__setFunctionName:Lr,__metadata:jr,__awaiter:Fr,__generator:kr,__createBinding:gt,__exportStar:$r,__values:ot,__read:tn,__spread:Wr,__spreadArrays:Br,__spreadArray:nn,__await:_e,__asyncGenerator:Gr,__asyncDelegator:Ur,__asyncValues:Hr,__makeTemplateObject:Kr,__importStar:Vr,__importDefault:zr,__classPrivateFieldGet:Yr,__classPrivateFieldSet:Xr,__classPrivateFieldIn:qr,__addDisposableResource:Zr,__disposeResources:Qr,__rewriteRelativeImportExtension:Jr},hu=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Zr,get __assign(){return V},__asyncDelegator:Ur,__asyncGenerator:Gr,__asyncValues:Hr,__await:_e,__awaiter:Fr,__classPrivateFieldGet:Yr,__classPrivateFieldIn:qr,__classPrivateFieldSet:Xr,__createBinding:gt,__decorate:Or,__disposeResources:Qr,__esDecorate:Dr,__exportStar:$r,__extends:Ar,__generator:kr,__importDefault:zr,__importStar:Vr,__makeTemplateObject:Kr,__metadata:jr,__param:Tr,__propKey:Nr,__read:tn,__rest:vt,__rewriteRelativeImportExtension:Jr,__runInitializers:Ir,__setFunctionName:Lr,__spread:Wr,__spreadArray:nn,__spreadArrays:Br,__values:ot,default:Ba},Symbol.toStringTag,{value:"Module"}));var Ga=c.createContext(void 0);function eo(e){const t=c.useContext(Ga);return e||t||"ltr"}var St=0;function to(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??On()),document.body.insertAdjacentElement("beforeend",e[1]??On()),St++,()=>{St===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),St--}},[])}function On(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Pt="focusScope.autoFocusOnMount",_t="focusScope.autoFocusOnUnmount",Tn={bubbles:!1,cancelable:!0},Ua="FocusScope",rn=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,d]=c.useState(null),l=ne(o),u=ne(i),f=c.useRef(null),h=W(t,m=>d(m)),p=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let m=function(x){if(p.paused||!a)return;const b=x.target;a.contains(b)?f.current=b:se(f.current,{select:!0})},g=function(x){if(p.paused||!a)return;const b=x.relatedTarget;b!==null&&(a.contains(b)||se(f.current,{select:!0}))},w=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&se(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const E=new MutationObserver(w);return a&&E.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),E.disconnect()}}},[r,a,p.paused]),c.useEffect(()=>{if(a){In.add(p);const m=document.activeElement;if(!a.contains(m)){const w=new CustomEvent(Pt,Tn);a.addEventListener(Pt,l),a.dispatchEvent(w),w.defaultPrevented||(Ha(Xa(no(a)),{select:!0}),document.activeElement===m&&se(a))}return()=>{a.removeEventListener(Pt,l),setTimeout(()=>{const w=new CustomEvent(_t,Tn);a.addEventListener(_t,u),a.dispatchEvent(w),w.defaultPrevented||se(m??document.body,{select:!0}),a.removeEventListener(_t,u),In.remove(p)},0)}}},[a,l,u,p]);const v=c.useCallback(m=>{if(!n&&!r||p.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(g&&w){const E=m.currentTarget,[x,b]=Ka(E);x&&b?!m.shiftKey&&w===b?(m.preventDefault(),n&&se(x,{select:!0})):m.shiftKey&&w===x&&(m.preventDefault(),n&&se(b,{select:!0})):w===E&&m.preventDefault()}},[n,r,p.paused]);return y.jsx(L.div,{tabIndex:-1,...s,ref:h,onKeyDown:v})});rn.displayName=Ua;function Ha(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(se(r,{select:t}),document.activeElement!==n)return}function Ka(e){const t=no(e),n=Dn(t,e),r=Dn(t.reverse(),e);return[n,r]}function no(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Dn(e,t){for(const n of e)if(!Va(n,{upTo:t}))return n}function Va(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function za(e){return e instanceof HTMLInputElement&&"select"in e}function se(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&za(e)&&t&&e.select()}}var In=Ya();function Ya(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Nn(e,t),e.unshift(t)},remove(t){e=Nn(e,t),e[0]?.resume()}}}function Nn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Xa(e){return e.filter(t=>t.tagName!=="A")}var Mt="rovingFocusGroup.onEntryFocus",qa={bubbles:!1,cancelable:!0},We="RovingFocusGroup",[Wt,ro,Za]=Vn(We),[Qa,oo]=he(We,[Za]),[Ja,ec]=Qa(We),io=c.forwardRef((e,t)=>y.jsx(Wt.Provider,{scope:e.__scopeRovingFocusGroup,children:y.jsx(Wt.Slot,{scope:e.__scopeRovingFocusGroup,children:y.jsx(tc,{...e,ref:t})})}));io.displayName=We;var tc=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:d,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=e,h=c.useRef(null),p=W(t,h),v=eo(i),[m,g]=Ht({prop:s,defaultProp:a??null,onChange:d,caller:We}),[w,E]=c.useState(!1),x=ne(l),b=ro(n),C=c.useRef(!1),[_,R]=c.useState(0);return c.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(Mt,x),()=>M.removeEventListener(Mt,x)},[x]),y.jsx(Ja,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:m,onItemFocus:c.useCallback(M=>g(M),[g]),onItemShiftTab:c.useCallback(()=>E(!0),[]),onFocusableItemAdd:c.useCallback(()=>R(M=>M+1),[]),onFocusableItemRemove:c.useCallback(()=>R(M=>M-1),[]),children:y.jsx(L.div,{tabIndex:w||_===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:P(e.onMouseDown,()=>{C.current=!0}),onFocus:P(e.onFocus,M=>{const D=!C.current;if(M.target===M.currentTarget&&D&&!w){const O=new CustomEvent(Mt,qa);if(M.currentTarget.dispatchEvent(O),!O.defaultPrevented){const j=b().filter(T=>T.focusable),F=j.find(T=>T.active),N=j.find(T=>T.id===m),B=[F,N,...j].filter(Boolean).map(T=>T.ref.current);co(B,u)}}C.current=!1}),onBlur:P(e.onBlur,()=>E(!1))})})}),so="RovingFocusGroupItem",ao=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...a}=e,d=be(),l=i||d,u=ec(so,n),f=u.currentTabStopId===l,h=ro(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:m}=u;return c.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),y.jsx(Wt.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:y.jsx(L.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:P(e.onMouseDown,g=>{r?u.onItemFocus(l):g.preventDefault()}),onFocus:P(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:P(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const w=oc(g,u.orientation,u.dir);if(w!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=h().filter(b=>b.focusable).map(b=>b.ref.current);if(w==="last")x.reverse();else if(w==="prev"||w==="next"){w==="prev"&&x.reverse();const b=x.indexOf(g.currentTarget);x=u.loop?ic(x,b+1):x.slice(b+1)}setTimeout(()=>co(x))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:m!=null}):s})})});ao.displayName=so;var nc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rc(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function oc(e,t,n){const r=rc(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return nc[r]}function co(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ic(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var sc=io,ac=ao,cc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ye=new WeakMap,ze=new WeakMap,Ye={},At=0,lo=function(e){return e&&(e.host||lo(e.parentNode))},lc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=lo(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},uc=function(e,t,n,r){var o=lc(t,Array.isArray(e)?e:[e]);Ye[n]||(Ye[n]=new WeakMap);var i=Ye[n],s=[],a=new Set,d=new Set(o),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};o.forEach(l);var u=function(f){!f||d.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))u(h);else try{var p=h.getAttribute(r),v=p!==null&&p!=="false",m=(ye.get(h)||0)+1,g=(i.get(h)||0)+1;ye.set(h,m),i.set(h,g),s.push(h),m===1&&v&&ze.set(h,!0),g===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return u(t),a.clear(),At++,function(){s.forEach(function(f){var h=ye.get(f)-1,p=i.get(f)-1;ye.set(f,h),i.set(f,p),h||(ze.has(f)||f.removeAttribute(r),ze.delete(f)),p||f.removeAttribute(n)}),At--,At||(ye=new WeakMap,ye=new WeakMap,ze=new WeakMap,Ye={})}},uo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=cc(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),uc(r,o,n,"aria-hidden")):function(){return null}},Qe="right-scroll-bar-position",Je="width-before-scroll-bar",fc="with-scroll-bars-hidden",dc="--removed-body-scroll-bar-size";function Ot(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pc(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var mc=typeof window<"u"?c.useLayoutEffect:c.useEffect,Ln=new WeakMap;function hc(e,t){var n=pc(null,function(r){return e.forEach(function(o){return Ot(o,r)})});return mc(function(){var r=Ln.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Ot(a,null)}),i.forEach(function(a){o.has(a)||Ot(a,s)})}Ln.set(n,e)},[e]),n}function vc(e){return e}function gc(e,t){t===void 0&&(t=vc);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var d=function(){var u=s;s=[],u.forEach(i)},l=function(){return Promise.resolve().then(d)};l(),n={push:function(u){s.push(u),l()},filter:function(u){return s=s.filter(u),n}}}};return o}function yc(e){e===void 0&&(e={});var t=gc(null);return t.options=V({async:!0,ssr:!1},e),t}var fo=function(e){var t=e.sideCar,n=vt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,V({},n))};fo.isSideCarExport=!0;function wc(e,t){return e.useMedium(t),fo}var po=yc(),Tt=function(){},yt=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Tt,onWheelCapture:Tt,onTouchMoveCapture:Tt}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,d=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,h=e.sideCar,p=e.noRelative,v=e.noIsolation,m=e.inert,g=e.allowPinchZoom,w=e.as,E=w===void 0?"div":w,x=e.gapMode,b=vt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,_=hc([n,t]),R=V(V({},b),o);return c.createElement(c.Fragment,null,u&&c.createElement(C,{sideCar:po,removeScrollBar:l,shards:f,noRelative:p,noIsolation:v,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:x}),s?c.cloneElement(c.Children.only(a),V(V({},R),{ref:_})):c.createElement(E,V({},R,{className:d,ref:_}),a))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yt.classNames={fullWidth:Je,zeroRight:Qe};var xc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xc();return t&&e.setAttribute("nonce",t),e}function Ec(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=bc())&&(Ec(t,n),Cc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sc=function(){var e=Rc();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},mo=function(){var e=Sc(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Pc={left:0,top:0,right:0,gap:0},Dt=function(e){return parseInt(e||"",10)||0},_c=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Dt(n),Dt(r),Dt(o)]},Mc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Pc;var t=_c(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ac=mo(),Ce="data-scroll-locked",Oc=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(fc,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(a,"px ").concat(r,`;
  }
  body[`).concat(Ce,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(o,`px;
    padding-top: `).concat(i,`px;
    padding-right: `).concat(s,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(a,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(Qe,` {
    right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(Je,` {
    margin-right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(Qe," .").concat(Qe,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(Je," .").concat(Je,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(Ce,`] {
    `).concat(dc,": ").concat(a,`px;
  }
`)},jn=function(){var e=parseInt(document.body.getAttribute(Ce)||"0",10);return isFinite(e)?e:0},Tc=function(){c.useEffect(function(){return document.body.setAttribute(Ce,(jn()+1).toString()),function(){var e=jn()-1;e<=0?document.body.removeAttribute(Ce):document.body.setAttribute(Ce,e.toString())}},[])},Dc=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Tc();var i=c.useMemo(function(){return Mc(o)},[o]);return c.createElement(Ac,{styles:Oc(i,!t,o,n?"":"!important")})},Bt=!1;if(typeof window<"u")try{var Xe=Object.defineProperty({},"passive",{get:function(){return Bt=!0,!0}});window.addEventListener("test",Xe,Xe),window.removeEventListener("test",Xe,Xe)}catch{Bt=!1}var we=Bt?{passive:!1}:!1,Ic=function(e){return e.tagName==="TEXTAREA"},ho=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ic(e)&&n[t]==="visible")},Nc=function(e){return ho(e,"overflowY")},Lc=function(e){return ho(e,"overflowX")},Fn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=vo(e,r);if(o){var i=go(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},jc=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Fc=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vo=function(e,t){return e==="v"?Nc(t):Lc(t)},go=function(e,t){return e==="v"?jc(t):Fc(t)},kc=function(e,t){return e==="h"&&t==="rtl"?-1:1},$c=function(e,t,n,r,o){var i=kc(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,d=t.contains(a),l=!1,u=s>0,f=0,h=0;do{if(!a)break;var p=go(e,a),v=p[0],m=p[1],g=p[2],w=m-g-i*v;(v||w)&&vo(e,a)&&(f+=w,h+=v);var E=a.parentNode;a=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!d&&a!==document.body||d&&(t.contains(a)||t===a));return(u&&(Math.abs(f)<1||!o)||!u&&(Math.abs(h)<1||!o))&&(l=!0),l},qe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kn=function(e){return[e.deltaX,e.deltaY]},$n=function(e){return e&&"current"in e?e.current:e},Wc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Bc=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},Gc=0,xe=[];function Uc(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(Gc++)[0],i=c.useState(mo)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=nn([e.lockRef.current],(e.shards||[]).map($n),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var w=qe(m),E=n.current,x="deltaX"in m?m.deltaX:E[0]-w[0],b="deltaY"in m?m.deltaY:E[1]-w[1],C,_=m.target,R=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in m&&R==="h"&&_.type==="range")return!1;var M=Fn(R,_);if(!M)return!0;if(M?C=R:(C=R==="v"?"h":"v",M=Fn(R,_)),!M)return!1;if(!r.current&&"changedTouches"in m&&(x||b)&&(r.current=C),!C)return!0;var D=r.current||C;return $c(D,g,m,D==="h"?x:b,!0)},[]),d=c.useCallback(function(m){var g=m;if(!(!xe.length||xe[xe.length-1]!==i)){var w="deltaY"in g?kn(g):qe(g),E=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&Wc(C.delta,w)})[0];if(E&&E.should){g.cancelable&&g.preventDefault();return}if(!E){var x=(s.current.shards||[]).map($n).filter(Boolean).filter(function(C){return C.contains(g.target)}),b=x.length>0?a(g,x[0]):!s.current.noIsolation;b&&g.cancelable&&g.preventDefault()}}},[]),l=c.useCallback(function(m,g,w,E){var x={name:m,delta:g,target:w,should:E,shadowParent:Hc(w)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(b){return b!==x})},1)},[]),u=c.useCallback(function(m){n.current=qe(m),r.current=void 0},[]),f=c.useCallback(function(m){l(m.type,kn(m),m.target,a(m,e.lockRef.current))},[]),h=c.useCallback(function(m){l(m.type,qe(m),m.target,a(m,e.lockRef.current))},[]);c.useEffect(function(){return xe.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",d,we),document.addEventListener("touchmove",d,we),document.addEventListener("touchstart",u,we),function(){xe=xe.filter(function(m){return m!==i}),document.removeEventListener("wheel",d,we),document.removeEventListener("touchmove",d,we),document.removeEventListener("touchstart",u,we)}},[]);var p=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(i,{styles:Bc(o)}):null,p?c.createElement(Dc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Hc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Kc=wc(po,Uc);var on=c.forwardRef(function(e,t){return c.createElement(yt,V({},e,{ref:t,sideCar:Kc}))});on.classNames=yt.classNames;var Gt=["Enter"," "],Vc=["ArrowDown","PageUp","Home"],yo=["ArrowUp","PageDown","End"],zc=[...Vc,...yo],Yc={ltr:[...Gt,"ArrowRight"],rtl:[...Gt,"ArrowLeft"]},Xc={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Be="Menu",[je,qc,Zc]=Vn(Be),[ve,wo]=he(Be,[Zc,pt,oo]),wt=pt(),xo=oo(),[Qc,ge]=ve(Be),[Jc,Ge]=ve(Be),bo=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,a=wt(t),[d,l]=c.useState(null),u=c.useRef(!1),f=ne(i),h=eo(o);return c.useEffect(()=>{const p=()=>{u.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>u.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),y.jsx(Ea,{...a,children:y.jsx(Qc,{scope:t,open:n,onOpenChange:f,content:d,onContentChange:l,children:y.jsx(Jc,{scope:t,onClose:c.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:s,children:r})})})};bo.displayName=Be;var el="MenuAnchor",sn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wt(n);return y.jsx(wr,{...o,...r,ref:t})});sn.displayName=el;var an="MenuPortal",[tl,Eo]=ve(an,{forceMount:void 0}),Co=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=ge(an,t);return y.jsx(tl,{scope:t,forceMount:n,children:y.jsx(ie,{present:n||i.open,children:y.jsx(Ut,{asChild:!0,container:o,children:r})})})};Co.displayName=an;var z="MenuContent",[nl,cn]=ve(z),Ro=c.forwardRef((e,t)=>{const n=Eo(z,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=ge(z,e.__scopeMenu),s=Ge(z,e.__scopeMenu);return y.jsx(je.Provider,{scope:e.__scopeMenu,children:y.jsx(ie,{present:r||i.open,children:y.jsx(je.Slot,{scope:e.__scopeMenu,children:s.modal?y.jsx(rl,{...o,ref:t}):y.jsx(ol,{...o,ref:t})})})})}),rl=c.forwardRef((e,t)=>{const n=ge(z,e.__scopeMenu),r=c.useRef(null),o=W(t,r);return c.useEffect(()=>{const i=r.current;if(i)return uo(i)},[]),y.jsx(ln,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:P(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ol=c.forwardRef((e,t)=>{const n=ge(z,e.__scopeMenu);return y.jsx(ln,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),il=Re("MenuContent.ScrollLock"),ln=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:d,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:v,...m}=e,g=ge(z,n),w=Ge(z,n),E=wt(n),x=xo(n),b=qc(n),[C,_]=c.useState(null),R=c.useRef(null),M=W(t,R,g.onContentChange),D=c.useRef(0),O=c.useRef(""),j=c.useRef(0),F=c.useRef(null),N=c.useRef("right"),I=c.useRef(0),B=v?on:c.Fragment,T=v?{as:il,allowPinchZoom:!0}:void 0,k=S=>{const G=O.current+S,Z=b().filter($=>!$.disabled),ue=document.activeElement,Oe=Z.find($=>$.ref.current===ue)?.textValue,Te=Z.map($=>$.textValue),Ue=gl(Te,G,Oe),fe=Z.find($=>$.textValue===Ue)?.ref.current;(function $(De){O.current=De,window.clearTimeout(D.current),De!==""&&(D.current=window.setTimeout(()=>$(""),1e3))})(G),fe&&setTimeout(()=>fe.focus())};c.useEffect(()=>()=>window.clearTimeout(D.current),[]),to();const A=c.useCallback(S=>N.current===F.current?.side&&wl(S,F.current?.area),[]);return y.jsx(nl,{scope:n,searchRef:O,onItemEnter:c.useCallback(S=>{A(S)&&S.preventDefault()},[A]),onItemLeave:c.useCallback(S=>{A(S)||(R.current?.focus(),_(null))},[A]),onTriggerLeave:c.useCallback(S=>{A(S)&&S.preventDefault()},[A]),pointerGraceTimerRef:j,onPointerGraceIntentChange:c.useCallback(S=>{F.current=S},[]),children:y.jsx(B,{...T,children:y.jsx(rn,{asChild:!0,trapped:o,onMountAutoFocus:P(i,S=>{S.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:y.jsx(ke,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:p,children:y.jsx(sc,{asChild:!0,...x,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:_,onEntryFocus:P(d,S=>{w.isUsingKeyboardRef.current||S.preventDefault()}),preventScrollOnEntryFocus:!0,children:y.jsx(xr,{role:"menu","aria-orientation":"vertical","data-state":Wo(g.open),"data-radix-menu-content":"",dir:w.dir,...E,...m,ref:M,style:{outline:"none",...m.style},onKeyDown:P(m.onKeyDown,S=>{const Z=S.target.closest("[data-radix-menu-content]")===S.currentTarget,ue=S.ctrlKey||S.altKey||S.metaKey,Oe=S.key.length===1;Z&&(S.key==="Tab"&&S.preventDefault(),!ue&&Oe&&k(S.key));const Te=R.current;if(S.target!==Te||!zc.includes(S.key))return;S.preventDefault();const fe=b().filter($=>!$.disabled).map($=>$.ref.current);yo.includes(S.key)&&fe.reverse(),hl(fe)}),onBlur:P(e.onBlur,S=>{S.currentTarget.contains(S.target)||(window.clearTimeout(D.current),O.current="")}),onPointerMove:P(e.onPointerMove,Fe(S=>{const G=S.target,Z=I.current!==S.clientX;if(S.currentTarget.contains(G)&&Z){const ue=S.clientX>I.current?"right":"left";N.current=ue,I.current=S.clientX}}))})})})})})})});Ro.displayName=z;var sl="MenuGroup",un=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.jsx(L.div,{role:"group",...r,ref:t})});un.displayName=sl;var al="MenuLabel",So=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.jsx(L.div,{...r,ref:t})});So.displayName=al;var it="MenuItem",Wn="menu.itemSelect",xt=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=c.useRef(null),s=Ge(it,e.__scopeMenu),a=cn(it,e.__scopeMenu),d=W(t,i),l=c.useRef(!1),u=()=>{const f=i.current;if(!n&&f){const h=new CustomEvent(Wn,{bubbles:!0,cancelable:!0});f.addEventListener(Wn,p=>r?.(p),{once:!0}),zn(f,h),h.defaultPrevented?l.current=!1:s.onClose()}};return y.jsx(Po,{...o,ref:d,disabled:n,onClick:P(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:P(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:P(e.onKeyDown,f=>{const h=a.searchRef.current!=="";n||h&&f.key===" "||Gt.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});xt.displayName=it;var Po=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=cn(it,n),a=xo(n),d=c.useRef(null),l=W(t,d),[u,f]=c.useState(!1),[h,p]=c.useState("");return c.useEffect(()=>{const v=d.current;v&&p((v.textContent??"").trim())},[i.children]),y.jsx(je.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:y.jsx(ac,{asChild:!0,...a,focusable:!r,children:y.jsx(L.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:l,onPointerMove:P(e.onPointerMove,Fe(v=>{r?s.onItemLeave(v):(s.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:P(e.onPointerLeave,Fe(v=>s.onItemLeave(v))),onFocus:P(e.onFocus,()=>f(!0)),onBlur:P(e.onBlur,()=>f(!1))})})})}),cl="MenuCheckboxItem",_o=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return y.jsx(Do,{scope:e.__scopeMenu,checked:n,children:y.jsx(xt,{role:"menuitemcheckbox","aria-checked":st(n)?"mixed":n,...o,ref:t,"data-state":dn(n),onSelect:P(o.onSelect,()=>r?.(st(n)?!0:!n),{checkForDefaultPrevented:!1})})})});_o.displayName=cl;var Mo="MenuRadioGroup",[ll,ul]=ve(Mo,{value:void 0,onValueChange:()=>{}}),Ao=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=ne(r);return y.jsx(ll,{scope:e.__scopeMenu,value:n,onValueChange:i,children:y.jsx(un,{...o,ref:t})})});Ao.displayName=Mo;var Oo="MenuRadioItem",To=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=ul(Oo,e.__scopeMenu),i=n===o.value;return y.jsx(Do,{scope:e.__scopeMenu,checked:i,children:y.jsx(xt,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":dn(i),onSelect:P(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});To.displayName=Oo;var fn="MenuItemIndicator",[Do,fl]=ve(fn,{checked:!1}),Io=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=fl(fn,n);return y.jsx(ie,{present:r||st(i.checked)||i.checked===!0,children:y.jsx(L.span,{...o,ref:t,"data-state":dn(i.checked)})})});Io.displayName=fn;var dl="MenuSeparator",No=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.jsx(L.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});No.displayName=dl;var pl="MenuArrow",Lo=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wt(n);return y.jsx(br,{...o,...r,ref:t})});Lo.displayName=pl;var ml="MenuSub",[vu,jo]=ve(ml),Ie="MenuSubTrigger",Fo=c.forwardRef((e,t)=>{const n=ge(Ie,e.__scopeMenu),r=Ge(Ie,e.__scopeMenu),o=jo(Ie,e.__scopeMenu),i=cn(Ie,e.__scopeMenu),s=c.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:d}=i,l={__scopeMenu:e.__scopeMenu},u=c.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return c.useEffect(()=>u,[u]),c.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),d(null)}},[a,d]),y.jsx(sn,{asChild:!0,...l,children:y.jsx(Po,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Wo(n.open),...e,ref:lt(t,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:P(e.onPointerMove,Fe(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:P(e.onPointerLeave,Fe(f=>{u();const h=n.content?.getBoundingClientRect();if(h){const p=n.content?.dataset.side,v=p==="right",m=v?-5:5,g=h[v?"left":"right"],w=h[v?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x:g,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:g,y:h.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:P(e.onKeyDown,f=>{const h=i.searchRef.current!=="";e.disabled||h&&f.key===" "||Yc[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});Fo.displayName=Ie;var ko="MenuSubContent",$o=c.forwardRef((e,t)=>{const n=Eo(z,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=ge(z,e.__scopeMenu),s=Ge(z,e.__scopeMenu),a=jo(ko,e.__scopeMenu),d=c.useRef(null),l=W(t,d);return y.jsx(je.Provider,{scope:e.__scopeMenu,children:y.jsx(ie,{present:r||i.open,children:y.jsx(je.Slot,{scope:e.__scopeMenu,children:y.jsx(ln,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:l,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{s.isUsingKeyboardRef.current&&d.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:P(e.onFocusOutside,u=>{u.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:P(e.onEscapeKeyDown,u=>{s.onClose(),u.preventDefault()}),onKeyDown:P(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),h=Xc[s.dir].includes(u.key);f&&h&&(i.onOpenChange(!1),a.trigger?.focus(),u.preventDefault())})})})})})});$o.displayName=ko;function Wo(e){return e?"open":"closed"}function st(e){return e==="indeterminate"}function dn(e){return st(e)?"indeterminate":e?"checked":"unchecked"}function hl(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function vl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function gl(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=vl(e,Math.max(i,0));o.length===1&&(s=s.filter(l=>l!==n));const d=s.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function yl(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],d=t[s],l=a.x,u=a.y,f=d.x,h=d.y;u>r!=h>r&&n<(f-l)*(r-u)/(h-u)+l&&(o=!o)}return o}function wl(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return yl(n,t)}function Fe(e){return t=>t.pointerType==="mouse"?e(t):void 0}var xl=bo,bl=sn,El=Co,Cl=Ro,Rl=un,Sl=So,Pl=xt,_l=_o,Ml=Ao,Al=To,Ol=Io,Tl=No,Dl=Lo,Il=Fo,Nl=$o,bt="DropdownMenu",[Ll,gu]=he(bt,[wo]),U=wo(),[jl,Bo]=Ll(bt),Go=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,d=U(t),l=c.useRef(null),[u,f]=Ht({prop:o,defaultProp:i??!1,onChange:s,caller:bt});return y.jsx(jl,{scope:t,triggerId:be(),triggerRef:l,contentId:be(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(h=>!h),[f]),modal:a,children:y.jsx(xl,{...d,open:u,onOpenChange:f,dir:r,modal:a,children:n})})};Go.displayName=bt;var Uo="DropdownMenuTrigger",Ho=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=Bo(Uo,n),s=U(n);return y.jsx(bl,{asChild:!0,...s,children:y.jsx(L.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:lt(t,i.triggerRef),onPointerDown:P(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:P(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Ho.displayName=Uo;var Fl="DropdownMenuPortal",Ko=e=>{const{__scopeDropdownMenu:t,...n}=e,r=U(t);return y.jsx(El,{...r,...n})};Ko.displayName=Fl;var Vo="DropdownMenuContent",zo=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Bo(Vo,n),i=U(n),s=c.useRef(!1);return y.jsx(Cl,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:P(e.onCloseAutoFocus,a=>{s.current||o.triggerRef.current?.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:P(e.onInteractOutside,a=>{const d=a.detail.originalEvent,l=d.button===0&&d.ctrlKey===!0,u=d.button===2||l;(!o.modal||u)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});zo.displayName=Vo;var kl="DropdownMenuGroup",$l=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return y.jsx(Rl,{...o,...r,ref:t})});$l.displayName=kl;var Wl="DropdownMenuLabel",Yo=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return y.jsx(Sl,{...o,...r,ref:t})});Yo.displayName=Wl;var Bl="DropdownMenuItem",Xo=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return y.jsx(Pl,{...o,...r,ref:t})});Xo.displayName=Bl;var Gl="DropdownMenuCheckboxItem",qo=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return y.jsx(_l,{...o,...r,ref:t})});qo.displayName=Gl;var Ul="DropdownMenuRadioGroup",Zo=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return y.jsx(Ml,{...o,...r,ref:t})});Zo.displayName=Ul;var Hl="DropdownMenuRadioItem",Qo=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return y.jsx(Al,{...o,...r,ref:t})});Qo.displayName=Hl;var Kl="DropdownMenuItemIndicator",Jo=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return y.jsx(Ol,{...o,...r,ref:t})});Jo.displayName=Kl;var Vl="DropdownMenuSeparator",ei=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return y.jsx(Tl,{...o,...r,ref:t})});ei.displayName=Vl;var zl="DropdownMenuArrow",Yl=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return y.jsx(Dl,{...o,...r,ref:t})});Yl.displayName=zl;var Xl="DropdownMenuSubTrigger",ti=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return y.jsx(Il,{...o,...r,ref:t})});ti.displayName=Xl;var ql="DropdownMenuSubContent",ni=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return y.jsx(Nl,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ni.displayName=ql;var yu=Go,wu=Ho,xu=Ko,bu=zo,Eu=Yo,Cu=Xo,Ru=qo,Su=Zo,Pu=Qo,_u=Jo,Mu=ei,Au=ti,Ou=ni,Et="Dialog",[ri,Tu]=he(Et),[Zl,q]=ri(Et),oi=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=c.useRef(null),d=c.useRef(null),[l,u]=Ht({prop:r,defaultProp:o??!1,onChange:i,caller:Et});return y.jsx(Zl,{scope:t,triggerRef:a,contentRef:d,contentId:be(),titleId:be(),descriptionId:be(),open:l,onOpenChange:u,onOpenToggle:c.useCallback(()=>u(f=>!f),[u]),modal:s,children:n})};oi.displayName=Et;var ii="DialogTrigger",si=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=q(ii,n),i=W(t,o.triggerRef);return y.jsx(L.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":hn(o.open),...r,ref:i,onClick:P(e.onClick,o.onOpenToggle)})});si.displayName=ii;var pn="DialogPortal",[Ql,ai]=ri(pn,{forceMount:void 0}),ci=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=q(pn,t);return y.jsx(Ql,{scope:t,forceMount:n,children:c.Children.map(r,s=>y.jsx(ie,{present:n||i.open,children:y.jsx(Ut,{asChild:!0,container:o,children:s})}))})};ci.displayName=pn;var at="DialogOverlay",li=c.forwardRef((e,t)=>{const n=ai(at,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=q(at,e.__scopeDialog);return i.modal?y.jsx(ie,{present:r||i.open,children:y.jsx(eu,{...o,ref:t})}):null});li.displayName=at;var Jl=Re("DialogOverlay.RemoveScroll"),eu=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=q(at,n);return y.jsx(on,{as:Jl,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx(L.div,{"data-state":hn(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),me="DialogContent",ui=c.forwardRef((e,t)=>{const n=ai(me,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=q(me,e.__scopeDialog);return y.jsx(ie,{present:r||i.open,children:i.modal?y.jsx(tu,{...o,ref:t}):y.jsx(nu,{...o,ref:t})})});ui.displayName=me;var tu=c.forwardRef((e,t)=>{const n=q(me,e.__scopeDialog),r=c.useRef(null),o=W(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return uo(i)},[]),y.jsx(fi,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:P(e.onFocusOutside,i=>i.preventDefault())})}),nu=c.forwardRef((e,t)=>{const n=q(me,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return y.jsx(fi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),fi=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=q(me,n),d=c.useRef(null),l=W(t,d);return to(),y.jsxs(y.Fragment,{children:[y.jsx(rn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:y.jsx(ke,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":hn(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(ru,{titleId:a.titleId}),y.jsx(iu,{contentRef:d,descriptionId:a.descriptionId})]})]})}),mn="DialogTitle",di=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=q(mn,n);return y.jsx(L.h2,{id:o.titleId,...r,ref:t})});di.displayName=mn;var pi="DialogDescription",mi=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=q(pi,n);return y.jsx(L.p,{id:o.descriptionId,...r,ref:t})});mi.displayName=pi;var hi="DialogClose",vi=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=q(hi,n);return y.jsx(L.button,{type:"button",...r,ref:t,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});vi.displayName=hi;function hn(e){return e?"open":"closed"}var gi="DialogTitleWarning",[Du,yi]=Oi(gi,{contentName:me,titleName:mn,docsSlug:"dialog"}),ru=({titleId:e})=>{const t=yi(gi),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ou="DialogDescriptionWarning",iu=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yi(ou).contentName}}.`;return c.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Iu=oi,Nu=si,Lu=ci,ju=li,Fu=ui,ku=di,$u=mi,Wu=vi;export{Qi as $,ku as A,lu as B,mu as C,$u as D,Lu as E,Iu as F,Nu as G,eo as H,Cu as I,pt as J,wr as K,Eu as L,uo as M,to as N,ju as O,L as P,on as Q,cu as R,Au as S,wu as T,rn as U,Zn as V,ke as W,xr as X,be as Y,br as Z,Fr as _,vt as a,Ea as a0,Re as a1,ha as a2,he as b,Vn as c,Ht as d,ie as e,ne as f,P as g,Ut as h,ae as i,y as j,zn as k,pu as l,Ou as m,xu as n,bu as o,Ru as p,_u as q,Pu as r,Mu as s,hu as t,W as u,yu as v,Su as w,au as x,Fu as y,Wu as z};