import{r as c,a as X,b as Mt,v as ki,R as Do}from"./vendor-react-BsBmf7g_.js";var Lo={exports:{}},It={};/** * @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 Fi=c,$i=Symbol.for("react.element"),Bi=Symbol.for("react.fragment"),Wi=Object.prototype.hasOwnProperty,Vi=Fi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Hi={key:!0,ref:!0,__self:!0,__source:!0};function jo(e,t,n){var o,r={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(o in t)Wi.call(t,o)&&!Hi.hasOwnProperty(o)&&(r[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)r[o]===void 0&&(r[o]=t[o]);return{$$typeof:$i,type:e,key:s,ref:i,props:r,_owner:Vi.current}}It.Fragment=Bi;It.jsx=jo;It.jsxs=jo;Lo.exports=It;var m=Lo.exports;function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function co(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ot(...e){return t=>{let n=!1;const o=e.map(r=>{const s=co(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r{const{children:i,...a}=s,l=c.useMemo(()=>a,Object.values(a));return m.jsx(n.Provider,{value:l,children:i})};o.displayName=e+"Provider";function r(s){const i=c.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function de(e,t=[]){let n=[];function o(s,i){const a=c.createContext(i),l=n.length;n=[...n,i];const u=f=>{var y;const{scope:v,children:h,...x}=f,p=((y=v==null?void 0:v[e])==null?void 0:y[l])||a,g=c.useMemo(()=>x,Object.values(x));return m.jsx(p.Provider,{value:g,children:h})};u.displayName=s+"Provider";function d(f,v){var p;const h=((p=v==null?void 0:v[e])==null?void 0:p[l])||a,x=c.useContext(h);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const r=()=>{const s=n.map(i=>c.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return r.scopeName=e,[o,Gi(r,...t)]}function Gi(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const i=o.reduce((a,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...a,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ie(e){const t=Ki(e),n=c.forwardRef((o,r)=>{const{children:s,...i}=o,a=c.Children.toArray(s),l=a.find(Yi);if(l){const u=l.props.children,d=a.map(f=>f===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...i,ref:r,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return m.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var nf=Ie("Slot");function Ki(e){const t=c.forwardRef((n,o)=>{const{children:r,...s}=n;if(c.isValidElement(r)){const i=qi(r),a=Xi(s,r.props);return r.type!==c.Fragment&&(a.ref=o?Ot(o,i):i),c.cloneElement(r,a)}return c.Children.count(r)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ko=Symbol("radix.slottable");function zi(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ko,t}function Yi(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ko}function Xi(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...a)=>{const l=s(...a);return r(...a),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function qi(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Nt(e){const t=e+"CollectionProvider",[n,o]=de(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:g,children:y}=p,w=X.useRef(null),C=X.useRef(new Map).current;return m.jsx(r,{scope:g,itemMap:C,collectionRef:w,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=Ie(a),u=X.forwardRef((p,g)=>{const{scope:y,children:w}=p,C=s(a,y),b=B(g,C.collectionRef);return m.jsx(l,{ref:b,children:w})});u.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",v=Ie(d),h=X.forwardRef((p,g)=>{const{scope:y,children:w,...C}=p,b=X.useRef(null),S=B(g,b),T=s(d,y);return X.useEffect(()=>(T.itemMap.set(b,{ref:b,...C}),()=>void T.itemMap.delete(b))),m.jsx(v,{[f]:"",ref:S,children:w})});h.displayName=d;function x(p){const g=s(e+"CollectionConsumer",p);return X.useCallback(()=>{const w=g.collectionRef.current;if(!w)return[];const C=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((T,E)=>C.indexOf(T.ref.current)-C.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},x,o]}var Zi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],O=Zi.reduce((e,t)=>{const n=Ie(`Primitive.${t}`),o=c.forwardRef((r,s)=>{const{asChild:i,...a}=r,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...a,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Fo(e,t){e&&Mt.flushSync(()=>e.dispatchEvent(t))}function ae(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function Qi(e,t=globalThis==null?void 0:globalThis.document){const n=ae(e);c.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Ji="DismissableLayer",pn="dismissableLayer.update",ea="dismissableLayer.pointerDownOutside",ta="dismissableLayer.focusOutside",lo,$o=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ue=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=c.useContext($o),[d,f]=c.useState(null),v=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=c.useState({}),x=B(t,E=>f(E)),p=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(g),w=d?p.indexOf(d):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,b=w>=y,S=oa(E=>{const A=E.target,D=[...u.branches].some(N=>N.contains(A));!b||D||(r==null||r(E),i==null||i(E),E.defaultPrevented||a==null||a())},v),T=ra(E=>{const A=E.target;[...u.branches].some(N=>N.contains(A))||(s==null||s(E),i==null||i(E),E.defaultPrevented||a==null||a())},v);return Qi(E=>{w===u.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},v),c.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(lo=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),uo(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=lo)}},[d,v,n,u]),c.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),uo())},[d,u]),c.useEffect(()=>{const E=()=>h({});return document.addEventListener(pn,E),()=>document.removeEventListener(pn,E)},[]),m.jsx(O.div,{...l,ref:x,style:{pointerEvents:C?b?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,T.onFocusCapture),onBlurCapture:R(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,S.onPointerDownCapture)})});Ue.displayName=Ji;var na="DismissableLayerBranch",Bo=c.forwardRef((e,t)=>{const n=c.useContext($o),o=c.useRef(null),r=B(t,o);return c.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(O.div,{...e,ref:r})});Bo.displayName=na;function oa(e,t=globalThis==null?void 0:globalThis.document){const n=ae(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let l=function(){Wo(ea,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function ra(e,t=globalThis==null?void 0:globalThis.document){const n=ae(e),o=c.useRef(!1);return c.useEffect(()=>{const r=s=>{s.target&&!o.current&&Wo(ta,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function uo(){const e=new CustomEvent(pn);document.dispatchEvent(e)}function Wo(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Fo(r,s):r.dispatchEvent(s)}var of=Ue,rf=Bo,q=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},sa="Portal",Dt=c.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=c.useState(!1);q(()=>s(!0),[]);const i=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?ki.createPortal(m.jsx(O.div,{...o,ref:t}),i):null});Dt.displayName=sa;function ia(e,t){return c.useReducer((n,o)=>t[n][o]??n,e)}var fe=e=>{const{present:t,children:n}=e,o=aa(t),r=typeof n=="function"?n({present:o.isPresent}):c.Children.only(n),s=B(o.ref,ca(r));return typeof n=="function"||o.isPresent?c.cloneElement(r,{ref:s}):null};fe.displayName="Presence";function aa(e){const[t,n]=c.useState(),o=c.useRef(null),r=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,l]=ia(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=ft(o.current);s.current=a==="mounted"?u:"none"},[a]),q(()=>{const u=o.current,d=r.current;if(d!==e){const v=s.current,h=ft(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&v!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),q(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=h=>{const p=ft(o.current).includes(h.animationName);if(h.target===t&&p&&(l("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=h=>{h.target===t&&(s.current=ft(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function ft(e){return(e==null?void 0:e.animationName)||"none"}function ca(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var la=Do[" useInsertionEffect ".trim().toString()]||q;function ce({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,i]=ua({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:r;{const d=c.useRef(e!==void 0);c.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${o} 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.`),d.current=a},[a,o])}const u=c.useCallback(d=>{var f;if(a){const v=da(d)?d(e):d;v!==e&&((f=i.current)==null||f.call(i,v))}else s(d)},[a,e,s,i]);return[l,u]}function ua({defaultProp:e,onChange:t}){const[n,o]=c.useState(e),r=c.useRef(n),s=c.useRef(t);return la(()=>{s.current=t},[t]),c.useEffect(()=>{var i;r.current!==n&&((i=s.current)==null||i.call(s,n),r.current=n)},[n,r]),[n,o,s]}function da(e){return typeof e=="function"}var Vo=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"}),fa="VisuallyHidden",Ho=c.forwardRef((e,t)=>m.jsx(O.span,{...e,ref:t,style:{...Vo,...e.style}}));Ho.displayName=fa;var pa=Ho,ma=Do[" useId ".trim().toString()]||(()=>{}),va=0;function Q(e){const[t,n]=c.useState(ma());return q(()=>{n(o=>o??String(va++))},[e]),t?`radix-${t}`:""}const ha=["top","right","bottom","left"],Pe=Math.min,ne=Math.max,Ct=Math.round,pt=Math.floor,we=e=>({x:e,y:e}),ga={left:"right",right:"left",bottom:"top",top:"bottom"},wa={start:"end",end:"start"};function mn(e,t,n){return ne(e,Pe(t,n))}function Se(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function Ge(e){return e.split("-")[1]}function An(e){return e==="x"?"y":"x"}function _n(e){return e==="y"?"height":"width"}const xa=new Set(["top","bottom"]);function ge(e){return xa.has(Ee(e))?"y":"x"}function Mn(e){return An(ge(e))}function ya(e,t,n){n===void 0&&(n=!1);const o=Ge(e),r=Mn(e),s=_n(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=bt(i)),[i,bt(i)]}function Ca(e){const t=bt(e);return[vn(e),t,vn(t)]}function vn(e){return e.replace(/start|end/g,t=>wa[t])}const fo=["left","right"],po=["right","left"],ba=["top","bottom"],Sa=["bottom","top"];function Ea(e,t,n){switch(e){case"top":case"bottom":return n?t?po:fo:t?fo:po;case"left":case"right":return t?ba:Sa;default:return[]}}function Ra(e,t,n,o){const r=Ge(e);let s=Ea(Ee(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(vn)))),s}function bt(e){return e.replace(/left|right|bottom|top/g,t=>ga[t])}function Pa(e){return{top:0,right:0,bottom:0,left:0,...e}}function Uo(e){return typeof e!="number"?Pa(e):{top:e,right:e,bottom:e,left:e}}function St(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function mo(e,t,n){let{reference:o,floating:r}=e;const s=ge(t),i=Mn(t),a=_n(i),l=Ee(t),u=s==="y",d=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,v=o[a]/2-r[a]/2;let h;switch(l){case"top":h={x:d,y:o.y-r.height};break;case"bottom":h={x:d,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}switch(Ge(t)){case"start":h[i]-=v*(n&&u?-1:1);break;case"end":h[i]+=v*(n&&u?-1:1);break}return h}const Ta=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=mo(u,o,l),v=o,h={},x=0;for(let p=0;p({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=Se(e,t)||{};if(u==null)return{};const f=Uo(d),v={x:n,y:o},h=Mn(r),x=_n(h),p=await i.getDimensions(u),g=h==="y",y=g?"top":"left",w=g?"bottom":"right",C=g?"clientHeight":"clientWidth",b=s.reference[x]+s.reference[h]-v[h]-s.floating[x],S=v[h]-s.reference[h],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=T?T[C]:0;(!E||!await(i.isElement==null?void 0:i.isElement(T)))&&(E=a.floating[C]||s.floating[x]);const A=b/2-S/2,D=E/2-p[x]/2-1,N=Pe(f[y],D),F=Pe(f[w],D),$=N,j=E-p[x]-F,L=E/2-p[x]/2+A,G=mn($,L,j),I=!l.arrow&&Ge(r)!=null&&L!==G&&s.reference[x]/2-(L<$?N:F)-p[x]/2<0,k=I?L<$?L-$:L-j:0;return{[h]:v[h]+k,data:{[h]:G,centerOffset:L-G-k,...I&&{alignmentOffset:k}},reset:I}}}),_a=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:p=!0,...g}=Se(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Ee(r),w=ge(a),C=Ee(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=v||(C||!p?[bt(a)]:Ca(a)),T=x!=="none";!v&&T&&S.push(...Ra(a,p,x,b));const E=[a,...S],A=await et(t,g),D=[];let N=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&D.push(A[y]),f){const L=ya(r,i,b);D.push(A[L[0]],A[L[1]])}if(N=[...N,{placement:r,overflows:D}],!D.every(L=>L<=0)){var F,$;const L=(((F=s.flip)==null?void 0:F.index)||0)+1,G=E[L];if(G&&(!(f==="alignment"?w!==ge(G):!1)||N.every(_=>_.overflows[0]>0&&ge(_.placement)===w)))return{data:{index:L,overflows:N},reset:{placement:G}};let I=($=N.filter(k=>k.overflows[0]<=0).sort((k,_)=>k.overflows[1]-_.overflows[1])[0])==null?void 0:$.placement;if(!I)switch(h){case"bestFit":{var j;const k=(j=N.filter(_=>{if(T){const P=ge(_.placement);return P===w||P==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(P=>P>0).reduce((P,K)=>P+K,0)]).sort((_,P)=>_[1]-P[1])[0])==null?void 0:j[0];k&&(I=k);break}case"initialPlacement":I=a;break}if(r!==I)return{reset:{placement:I}}}return{}}}};function vo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ho(e){return ha.some(t=>e[t]>=0)}const Ma=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Se(e,t);switch(o){case"referenceHidden":{const s=await et(t,{...r,elementContext:"reference"}),i=vo(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ho(i)}}}case"escaped":{const s=await et(t,{...r,altBoundary:!0}),i=vo(s,n.floating);return{data:{escapedOffsets:i,escaped:ho(i)}}}default:return{}}}}},Go=new Set(["left","top"]);async function Ia(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Ee(n),a=Ge(n),l=ge(n)==="y",u=Go.has(i)?-1:1,d=s&&l?-1:1,f=Se(t,e);let{mainAxis:v,crossAxis:h,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof x=="number"&&(h=a==="end"?x*-1:x),l?{x:h*d,y:v*u}:{x:v*u,y:h*d}}const Oa=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:a}=t,l=await Ia(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},Na=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:g=>{let{x:y,y:w}=g;return{x:y,y:w}}},...l}=Se(e,t),u={x:n,y:o},d=await et(t,l),f=ge(Ee(r)),v=An(f);let h=u[v],x=u[f];if(s){const g=v==="y"?"top":"left",y=v==="y"?"bottom":"right",w=h+d[g],C=h-d[y];h=mn(w,h,C)}if(i){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",w=x+d[g],C=x-d[y];x=mn(w,x,C)}const p=a.fn({...t,[v]:h,[f]:x});return{...p,data:{x:p.x-n,y:p.y-o,enabled:{[v]:s,[f]:i}}}}}},Da=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Se(e,t),d={x:n,y:o},f=ge(r),v=An(f);let h=d[v],x=d[f];const p=Se(a,t),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const C=v==="y"?"height":"width",b=s.reference[v]-s.floating[C]+g.mainAxis,S=s.reference[v]+s.reference[C]-g.mainAxis;hS&&(h=S)}if(u){var y,w;const C=v==="y"?"width":"height",b=Go.has(Ee(r)),S=s.reference[f]-s.floating[C]+(b&&((y=i.offset)==null?void 0:y[f])||0)+(b?0:g.crossAxis),T=s.reference[f]+s.reference[C]+(b?0:((w=i.offset)==null?void 0:w[f])||0)-(b?g.crossAxis:0);xT&&(x=T)}return{[v]:h,[f]:x}}}},La=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...u}=Se(e,t),d=await et(t,u),f=Ee(r),v=Ge(r),h=ge(r)==="y",{width:x,height:p}=s.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=v===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,g=v==="end"?"top":"bottom");const w=p-d.top-d.bottom,C=x-d.left-d.right,b=Pe(p-d[g],w),S=Pe(x-d[y],C),T=!t.middlewareData.shift;let E=b,A=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=w),T&&!v){const N=ne(d.left,0),F=ne(d.right,0),$=ne(d.top,0),j=ne(d.bottom,0);h?A=x-2*(N!==0||F!==0?N+F:ne(d.left,d.right)):E=p-2*($!==0||j!==0?$+j:ne(d.top,d.bottom))}await l({...t,availableWidth:A,availableHeight:E});const D=await i.getDimensions(a.floating);return x!==D.width||p!==D.height?{reset:{rects:!0}}:{}}}};function Lt(){return typeof window<"u"}function Ke(e){return Ko(e)?(e.nodeName||"").toLowerCase():"#document"}function oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(Ko(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ko(e){return Lt()?e instanceof Node||e instanceof oe(e).Node:!1}function le(e){return Lt()?e instanceof Element||e instanceof oe(e).Element:!1}function xe(e){return Lt()?e instanceof HTMLElement||e instanceof oe(e).HTMLElement:!1}function go(e){return!Lt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oe(e).ShadowRoot}const ja=new Set(["inline","contents"]);function st(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!ja.has(r)}const ka=new Set(["table","td","th"]);function Fa(e){return ka.has(Ke(e))}const $a=[":popover-open",":modal"];function jt(e){return $a.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ba=["transform","translate","scale","rotate","perspective"],Wa=["transform","translate","scale","rotate","perspective","filter"],Va=["paint","layout","strict","content"];function In(e){const t=On(),n=le(e)?ue(e):e;return Ba.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Wa.some(o=>(n.willChange||"").includes(o))||Va.some(o=>(n.contain||"").includes(o))}function Ha(e){let t=Te(e);for(;xe(t)&&!Ve(t);){if(In(t))return t;if(jt(t))return null;t=Te(t)}return null}function On(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ua=new Set(["html","body","#document"]);function Ve(e){return Ua.has(Ke(e))}function ue(e){return oe(e).getComputedStyle(e)}function kt(e){return le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Te(e){if(Ke(e)==="html")return e;const t=e.assignedSlot||e.parentNode||go(e)&&e.host||ye(e);return go(t)?t.host:t}function zo(e){const t=Te(e);return Ve(t)?e.ownerDocument?e.ownerDocument.body:e.body:xe(t)&&st(t)?t:zo(t)}function tt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=zo(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=oe(r);if(s){const a=hn(i);return t.concat(i,i.visualViewport||[],st(r)?r:[],a&&n?tt(a):[])}return t.concat(r,tt(r,[],n))}function hn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yo(e){const t=ue(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=xe(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,a=Ct(n)!==s||Ct(o)!==i;return a&&(n=s,o=i),{width:n,height:o,$:a}}function Nn(e){return le(e)?e:e.contextElement}function Be(e){const t=Nn(e);if(!xe(t))return we(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Yo(t);let i=(s?Ct(n.width):n.width)/o,a=(s?Ct(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Ga=we(0);function Xo(e){const t=oe(e);return!On()||!t.visualViewport?Ga:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ka(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==oe(e)?!1:t}function Oe(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Nn(e);let i=we(1);t&&(o?le(o)&&(i=Be(o)):i=Be(e));const a=Ka(s,n,o)?Xo(s):we(0);let l=(r.left+a.x)/i.x,u=(r.top+a.y)/i.y,d=r.width/i.x,f=r.height/i.y;if(s){const v=oe(s),h=o&&le(o)?oe(o):o;let x=v,p=hn(x);for(;p&&o&&h!==x;){const g=Be(p),y=p.getBoundingClientRect(),w=ue(p),C=y.left+(p.clientLeft+parseFloat(w.paddingLeft))*g.x,b=y.top+(p.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,u*=g.y,d*=g.x,f*=g.y,l+=C,u+=b,x=oe(p),p=hn(x)}}return St({width:d,height:f,x:l,y:u})}function Dn(e,t){const n=kt(e).scrollLeft;return t?t.left+n:Oe(ye(e)).left+n}function qo(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:Dn(e,o)),s=o.top+t.scrollTop;return{x:r,y:s}}function za(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=ye(o),a=t?jt(t.floating):!1;if(o===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=we(1);const d=we(0),f=xe(o);if((f||!f&&!s)&&((Ke(o)!=="body"||st(i))&&(l=kt(o)),xe(o))){const h=Oe(o);u=Be(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}const v=i&&!f&&!s?qo(i,l,!0):we(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+v.x,y:n.y*u.y-l.scrollTop*u.y+d.y+v.y}}function Ya(e){return Array.from(e.getClientRects())}function Xa(e){const t=ye(e),n=kt(e),o=e.ownerDocument.body,r=ne(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=ne(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+Dn(e);const a=-n.scrollTop;return ue(o).direction==="rtl"&&(i+=ne(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:a}}function qa(e,t){const n=oe(e),o=ye(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,a=0,l=0;if(r){s=r.width,i=r.height;const u=On();(!u||u&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:i,x:a,y:l}}const Za=new Set(["absolute","fixed"]);function Qa(e,t){const n=Oe(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=xe(e)?Be(e):we(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=r*s.x,u=o*s.y;return{width:i,height:a,x:l,y:u}}function wo(e,t,n){let o;if(t==="viewport")o=qa(e,n);else if(t==="document")o=Xa(ye(e));else if(le(t))o=Qa(t,n);else{const r=Xo(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return St(o)}function Zo(e,t){const n=Te(e);return n===t||!le(n)||Ve(n)?!1:ue(n).position==="fixed"||Zo(n,t)}function Ja(e,t){const n=t.get(e);if(n)return n;let o=tt(e,[],!1).filter(a=>le(a)&&Ke(a)!=="body"),r=null;const s=ue(e).position==="fixed";let i=s?Te(e):e;for(;le(i)&&!Ve(i);){const a=ue(i),l=In(i);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&Za.has(r.position)||st(i)&&!l&&Zo(e,i))?o=o.filter(d=>d!==i):r=a,i=Te(i)}return t.set(e,o),o}function ec(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?jt(t)?[]:Ja(t,this._c):[].concat(n),o],a=i[0],l=i.reduce((u,d)=>{const f=wo(t,d,r);return u.top=ne(f.top,u.top),u.right=Pe(f.right,u.right),u.bottom=Pe(f.bottom,u.bottom),u.left=ne(f.left,u.left),u},wo(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function tc(e){const{width:t,height:n}=Yo(e);return{width:t,height:n}}function nc(e,t,n){const o=xe(t),r=ye(t),s=n==="fixed",i=Oe(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=we(0);function u(){l.x=Dn(r)}if(o||!o&&!s)if((Ke(t)!=="body"||st(r))&&(a=kt(t)),o){const h=Oe(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else r&&u();s&&!o&&r&&u();const d=r&&!o&&!s?qo(r,a):we(0),f=i.left+a.scrollLeft-l.x-d.x,v=i.top+a.scrollTop-l.y-d.y;return{x:f,y:v,width:i.width,height:i.height}}function nn(e){return ue(e).position==="static"}function xo(e,t){if(!xe(e)||ue(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ye(e)===n&&(n=n.ownerDocument.body),n}function Qo(e,t){const n=oe(e);if(jt(e))return n;if(!xe(e)){let r=Te(e);for(;r&&!Ve(r);){if(le(r)&&!nn(r))return r;r=Te(r)}return n}let o=xo(e,t);for(;o&&Fa(o)&&nn(o);)o=xo(o,t);return o&&Ve(o)&&nn(o)&&!In(o)?n:o||Ha(e)||n}const oc=async function(e){const t=this.getOffsetParent||Qo,n=this.getDimensions,o=await n(e.floating);return{reference:nc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function rc(e){return ue(e).direction==="rtl"}const sc={convertOffsetParentRelativeRectToViewportRelativeRect:za,getDocumentElement:ye,getClippingRect:ec,getOffsetParent:Qo,getElementRects:oc,getClientRects:Ya,getDimensions:tc,getScale:Be,isElement:le,isRTL:rc};function Jo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ic(e,t){let n=null,o;const r=ye(e);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:v,height:h}=u;if(a||t(),!v||!h)return;const x=pt(f),p=pt(r.clientWidth-(d+v)),g=pt(r.clientHeight-(f+h)),y=pt(d),C={rootMargin:-x+"px "+-p+"px "+-g+"px "+-y+"px",threshold:ne(0,Pe(1,l))||1};let b=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!b)return i();E?i(!1,E):o=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!Jo(u,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(S,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,C)}n.observe(e)}return i(!0),s}function ac(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=Nn(e),d=r||s?[...u?tt(u):[],...tt(t)]:[];d.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=u&&a?ic(u,n):null;let v=-1,h=null;i&&(h=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let x,p=l?Oe(e):null;l&&g();function g(){const y=Oe(e);p&&!Jo(p,y)&&n(),p=y,x=requestAnimationFrame(g)}return n(),()=>{var y;d.forEach(w=>{r&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(x)}}const cc=Oa,lc=Na,uc=_a,dc=La,fc=Ma,yo=Aa,pc=Da,mc=(e,t,n)=>{const o=new Map,r={platform:sc,...n},s={...r.platform,_c:o};return Ta(e,t,{...r,platform:s})};var vc=typeof document<"u",hc=function(){},wt=vc?c.useLayoutEffect:hc;function Et(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,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Et(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!Et(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function er(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Co(e,t){const n=er(e);return Math.round(t*n)/n}function on(e){const t=c.useRef(e);return wt(()=>{t.current=e}),t}function gc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,h]=c.useState(o);Et(v,o)||h(o);const[x,p]=c.useState(null),[g,y]=c.useState(null),w=c.useCallback(_=>{_!==T.current&&(T.current=_,p(_))},[]),C=c.useCallback(_=>{_!==E.current&&(E.current=_,y(_))},[]),b=s||x,S=i||g,T=c.useRef(null),E=c.useRef(null),A=c.useRef(d),D=l!=null,N=on(l),F=on(r),$=on(u),j=c.useCallback(()=>{if(!T.current||!E.current)return;const _={placement:t,strategy:n,middleware:v};F.current&&(_.platform=F.current),mc(T.current,E.current,_).then(P=>{const K={...P,isPositioned:$.current!==!1};L.current&&!Et(A.current,K)&&(A.current=K,Mt.flushSync(()=>{f(K)}))})},[v,t,n,F,$]);wt(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(_=>({..._,isPositioned:!1})))},[u]);const L=c.useRef(!1);wt(()=>(L.current=!0,()=>{L.current=!1}),[]),wt(()=>{if(b&&(T.current=b),S&&(E.current=S),b&&S){if(N.current)return N.current(b,S,j);j()}},[b,S,j,N,D]);const G=c.useMemo(()=>({reference:T,floating:E,setReference:w,setFloating:C}),[w,C]),I=c.useMemo(()=>({reference:b,floating:S}),[b,S]),k=c.useMemo(()=>{const _={position:n,left:0,top:0};if(!I.floating)return _;const P=Co(I.floating,d.x),K=Co(I.floating,d.y);return a?{..._,transform:"translate("+P+"px, "+K+"px)",...er(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:K}},[n,a,I.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:j,refs:G,elements:I,floatingStyles:k}),[d,j,G,I,k])}const wc=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?yo({element:o.current,padding:r}).fn(n):{}:o?yo({element:o,padding:r}).fn(n):{}}}},xc=(e,t)=>({...cc(e),options:[e,t]}),yc=(e,t)=>({...lc(e),options:[e,t]}),Cc=(e,t)=>({...pc(e),options:[e,t]}),bc=(e,t)=>({...uc(e),options:[e,t]}),Sc=(e,t)=>({...dc(e),options:[e,t]}),Ec=(e,t)=>({...fc(e),options:[e,t]}),Rc=(e,t)=>({...wc(e),options:[e,t]});var Pc="Arrow",tr=c.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return m.jsx(O.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});tr.displayName=Pc;var Tc=tr;function Ac(e){const[t,n]=c.useState(void 0);return q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Ln="Popper",[nr,ze]=de(Ln),[_c,or]=nr(Ln),rr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=c.useState(null);return m.jsx(_c,{scope:t,anchor:o,onAnchorChange:r,children:n})};rr.displayName=Ln;var sr="PopperAnchor",ir=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=or(sr,n),i=c.useRef(null),a=B(t,i);return c.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||i.current)}),o?null:m.jsx(O.div,{...r,ref:a})});ir.displayName=sr;var jn="PopperContent",[Mc,Ic]=nr(jn),ar=c.forwardRef((e,t)=>{var M,V,z,W,H,U;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:v=!1,updatePositionStrategy:h="optimized",onPlaced:x,...p}=e,g=or(jn,n),[y,w]=c.useState(null),C=B(t,te=>w(te)),[b,S]=c.useState(null),T=Ac(b),E=(T==null?void 0:T.width)??0,A=(T==null?void 0:T.height)??0,D=o+(s!=="center"?"-"+s:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},F=Array.isArray(u)?u:[u],$=F.length>0,j={padding:N,boundary:F.filter(Nc),altBoundary:$},{refs:L,floatingStyles:G,placement:I,isPositioned:k,middlewareData:_}=gc({strategy:"fixed",placement:D,whileElementsMounted:(...te)=>ac(...te,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[xc({mainAxis:r+A,alignmentAxis:i}),l&&yc({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Cc():void 0,...j}),l&&bc({...j}),Sc({...j,apply:({elements:te,rects:ve,availableWidth:Xe,availableHeight:qe})=>{const{width:Ze,height:ji}=ve.reference,dt=te.floating.style;dt.setProperty("--radix-popper-available-width",`${Xe}px`),dt.setProperty("--radix-popper-available-height",`${qe}px`),dt.setProperty("--radix-popper-anchor-width",`${Ze}px`),dt.setProperty("--radix-popper-anchor-height",`${ji}px`)}}),b&&Rc({element:b,padding:a}),Dc({arrowWidth:E,arrowHeight:A}),v&&Ec({strategy:"referenceHidden",...j})]}),[P,K]=ur(I),Y=ae(x);q(()=>{k&&(Y==null||Y())},[k,Y]);const J=(M=_.arrow)==null?void 0:M.x,Ce=(V=_.arrow)==null?void 0:V.y,re=((z=_.arrow)==null?void 0:z.centerOffset)!==0,[be,ee]=c.useState();return q(()=>{y&&ee(window.getComputedStyle(y).zIndex)},[y]),m.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:k?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(W=_.transformOrigin)==null?void 0:W.x,(H=_.transformOrigin)==null?void 0:H.y].join(" "),...((U=_.hide)==null?void 0:U.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Mc,{scope:n,placedSide:P,onArrowChange:S,arrowX:J,arrowY:Ce,shouldHideArrow:re,children:m.jsx(O.div,{"data-side":P,"data-align":K,...p,ref:C,style:{...p.style,animation:k?void 0:"none"}})})})});ar.displayName=jn;var cr="PopperArrow",Oc={top:"bottom",right:"left",bottom:"top",left:"right"},lr=c.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Ic(cr,o),i=Oc[s.placedSide];return m.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:m.jsx(Tc,{...r,ref:n,style:{...r.style,display:"block"}})})});lr.displayName=cr;function Nc(e){return e!==null}var Dc=e=>({name:"transformOrigin",options:e,fn(t){var g,y,w;const{placement:n,rects:o,middlewareData:r}=t,i=((g=r.arrow)==null?void 0:g.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=ur(n),f={start:"0%",center:"50%",end:"100%"}[d],v=(((y=r.arrow)==null?void 0:y.x)??0)+a/2,h=(((w=r.arrow)==null?void 0:w.y)??0)+l/2;let x="",p="";return u==="bottom"?(x=i?f:`${v}px`,p=`${-l}px`):u==="top"?(x=i?f:`${v}px`,p=`${o.floating.height+l}px`):u==="right"?(x=`${-l}px`,p=i?f:`${h}px`):u==="left"&&(x=`${o.floating.width+l}px`,p=i?f:`${h}px`),{data:{x,y:p}}}});function ur(e){const[t,n="center"]=e.split("-");return[t,n]}var Ft=rr,kn=ir,Fn=ar,$n=lr,[$t,sf]=de("Tooltip",[ze]),Bt=ze(),dr="TooltipProvider",Lc=700,gn="tooltip.open",[jc,Bn]=$t(dr),fr=e=>{const{__scopeTooltip:t,delayDuration:n=Lc,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,i=c.useRef(!0),a=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),m.jsx(jc,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(u=>{a.current=u},[]),disableHoverableContent:r,children:s})};fr.displayName=dr;var nt="Tooltip",[kc,Wt]=$t(nt),pr=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=Bn(nt,e.__scopeTooltip),u=Bt(t),[d,f]=c.useState(null),v=Q(),h=c.useRef(0),x=i??l.disableHoverableContent,p=a??l.delayDuration,g=c.useRef(!1),[y,w]=ce({prop:o,defaultProp:r??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(gn))):l.onClose(),s==null||s(E)},caller:nt}),C=c.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),b=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,w(!0)},[w]),S=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),T=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,w(!0),h.current=0},p)},[p,w]);return c.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),m.jsx(Ft,{...u,children:m.jsx(kc,{scope:t,contentId:v,open:y,stateAttribute:C,trigger:d,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?T():b()},[l.isOpenDelayedRef,T,b]),onTriggerLeave:c.useCallback(()=>{x?S():(window.clearTimeout(h.current),h.current=0)},[S,x]),onOpen:b,onClose:S,disableHoverableContent:x,children:n})})};pr.displayName=nt;var wn="TooltipTrigger",mr=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Wt(wn,n),s=Bn(wn,n),i=Bt(n),a=c.useRef(null),l=B(t,a,r.onTriggerChange),u=c.useRef(!1),d=c.useRef(!1),f=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),m.jsx(kn,{asChild:!0,...i,children:m.jsx(O.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:R(e.onPointerMove,v=>{v.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:R(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:R(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:R(e.onBlur,r.onClose),onClick:R(e.onClick,r.onClose)})})});mr.displayName=wn;var Fc="TooltipPortal",[af,$c]=$t(Fc,{forceMount:void 0}),He="TooltipContent",vr=c.forwardRef((e,t)=>{const n=$c(He,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,i=Wt(He,e.__scopeTooltip);return m.jsx(fe,{present:o||i.open,children:i.disableHoverableContent?m.jsx(hr,{side:r,...s,ref:t}):m.jsx(Bc,{side:r,...s,ref:t})})}),Bc=c.forwardRef((e,t)=>{const n=Wt(He,e.__scopeTooltip),o=Bn(He,e.__scopeTooltip),r=c.useRef(null),s=B(t,r),[i,a]=c.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:f}=o,v=c.useCallback(()=>{a(null),f(!1)},[f]),h=c.useCallback((x,p)=>{const g=x.currentTarget,y={x:x.clientX,y:x.clientY},w=Gc(y,g.getBoundingClientRect()),C=Kc(y,w),b=zc(p.getBoundingClientRect()),S=Xc([...C,...b]);a(S),f(!0)},[f]);return c.useEffect(()=>()=>v(),[v]),c.useEffect(()=>{if(l&&d){const x=g=>h(g,d),p=g=>h(g,l);return l.addEventListener("pointerleave",x),d.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",p)}}},[l,d,h,v]),c.useEffect(()=>{if(i){const x=p=>{const g=p.target,y={x:p.clientX,y:p.clientY},w=(l==null?void 0:l.contains(g))||(d==null?void 0:d.contains(g)),C=!Yc(y,i);w?v():C&&(v(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,d,i,u,v]),m.jsx(hr,{...e,ref:s})}),[Wc,Vc]=$t(nt,{isInside:!1}),Hc=zi("TooltipContent"),hr=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=Wt(He,n),u=Bt(n),{onClose:d}=l;return c.useEffect(()=>(document.addEventListener(gn,d),()=>document.removeEventListener(gn,d)),[d]),c.useEffect(()=>{if(l.trigger){const f=v=>{const h=v.target;h!=null&&h.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),m.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:m.jsxs(Fn,{"data-state":l.stateAttribute,...u,...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:[m.jsx(Hc,{children:o}),m.jsx(Wc,{scope:n,isInside:!0,children:m.jsx(pa,{id:l.contentId,role:"tooltip",children:r||o})})]})})});vr.displayName=He;var gr="TooltipArrow",Uc=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Bt(n);return Vc(gr,n).isInside?null:m.jsx($n,{...r,...o,ref:t})});Uc.displayName=gr;function Gc(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Kc(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function zc(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Yc(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;so!=v>o&&n<(f-u)*(o-d)/(v-d)+u&&(r=!r)}return r}function Xc(e){const t=e.slice();return t.sort((n,o)=>n.xo.x?1:n.yo.y?1:0),qc(t)}function qc(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(r.y-i.y)>=(s.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(r.y-i.y)>=(s.y-i.y)*(r.x-i.x))n.pop();else break}n.push(r)}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 cf=fr,lf=pr,uf=mr,df=vr,rn="focusScope.autoFocusOnMount",sn="focusScope.autoFocusOnUnmount",bo={bubbles:!1,cancelable:!0},Zc="FocusScope",Vt=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...i}=e,[a,l]=c.useState(null),u=ae(r),d=ae(s),f=c.useRef(null),v=B(t,p=>l(p)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let p=function(C){if(h.paused||!a)return;const b=C.target;a.contains(b)?f.current=b:Re(f.current,{select:!0})},g=function(C){if(h.paused||!a)return;const b=C.relatedTarget;b!==null&&(a.contains(b)||Re(f.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const S of C)S.removedNodes.length>0&&Re(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const w=new MutationObserver(y);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),w.disconnect()}}},[o,a,h.paused]),c.useEffect(()=>{if(a){Eo.add(h);const p=document.activeElement;if(!a.contains(p)){const y=new CustomEvent(rn,bo);a.addEventListener(rn,u),a.dispatchEvent(y),y.defaultPrevented||(Qc(ol(wr(a)),{select:!0}),document.activeElement===p&&Re(a))}return()=>{a.removeEventListener(rn,u),setTimeout(()=>{const y=new CustomEvent(sn,bo);a.addEventListener(sn,d),a.dispatchEvent(y),y.defaultPrevented||Re(p??document.body,{select:!0}),a.removeEventListener(sn,d),Eo.remove(h)},0)}}},[a,u,d,h]);const x=c.useCallback(p=>{if(!n&&!o||h.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(g&&y){const w=p.currentTarget,[C,b]=Jc(w);C&&b?!p.shiftKey&&y===b?(p.preventDefault(),n&&Re(C,{select:!0})):p.shiftKey&&y===C&&(p.preventDefault(),n&&Re(b,{select:!0})):y===w&&p.preventDefault()}},[n,o,h.paused]);return m.jsx(O.div,{tabIndex:-1,...i,ref:v,onKeyDown:x})});Vt.displayName=Zc;function Qc(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Re(o,{select:t}),document.activeElement!==n)return}function Jc(e){const t=wr(e),n=So(t,e),o=So(t.reverse(),e);return[n,o]}function wr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function So(e,t){for(const n of e)if(!el(n,{upTo:t}))return n}function el(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 tl(e){return e instanceof HTMLInputElement&&"select"in e}function Re(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tl(e)&&t&&e.select()}}var Eo=nl();function nl(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ro(e,t),e.unshift(t)},remove(t){var n;e=Ro(e,t),(n=e[0])==null||n.resume()}}}function Ro(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function ol(e){return e.filter(t=>t.tagName!=="A")}var an=0;function Wn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Po()),document.body.insertAdjacentElement("beforeend",e[1]??Po()),an++,()=>{an===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),an--}},[])}function Po(){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 he=function(){return he=Object.assign||function(t){for(var n,o=1,r=arguments.length;o"u")return yl;var t=Cl(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Sl=br(),We="data-scroll-locked",El=function(e,t,n,o){var r=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),` .`.concat(sl,` { overflow: hidden `).concat(o,`; padding-right: `).concat(a,"px ").concat(o,`; } body[`).concat(We,`] { overflow: hidden `).concat(o,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&` padding-left: `.concat(r,`px; padding-top: `).concat(s,`px; padding-right: `).concat(i,`px; margin-left:0; margin-top:0; margin-right: `).concat(a,"px ").concat(o,`; `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(o,";")].filter(Boolean).join(""),` } .`).concat(xt,` { right: `).concat(a,"px ").concat(o,`; } .`).concat(yt,` { margin-right: `).concat(a,"px ").concat(o,`; } .`).concat(xt," .").concat(xt,` { right: 0 `).concat(o,`; } .`).concat(yt," .").concat(yt,` { margin-right: 0 `).concat(o,`; } body[`).concat(We,`] { `).concat(il,": ").concat(a,`px; } `)},Ao=function(){var e=parseInt(document.body.getAttribute(We)||"0",10);return isFinite(e)?e:0},Rl=function(){c.useEffect(function(){return document.body.setAttribute(We,(Ao()+1).toString()),function(){var e=Ao()-1;e<=0?document.body.removeAttribute(We):document.body.setAttribute(We,e.toString())}},[])},Pl=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Rl();var s=c.useMemo(function(){return bl(r)},[r]);return c.createElement(Sl,{styles:El(s,!t,r,n?"":"!important")})},xn=!1;if(typeof window<"u")try{var mt=Object.defineProperty({},"passive",{get:function(){return xn=!0,!0}});window.addEventListener("test",mt,mt),window.removeEventListener("test",mt,mt)}catch{xn=!1}var ke=xn?{passive:!1}:!1,Tl=function(e){return e.tagName==="TEXTAREA"},Sr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Tl(e)&&n[t]==="visible")},Al=function(e){return Sr(e,"overflowY")},_l=function(e){return Sr(e,"overflowX")},_o=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=Er(e,o);if(r){var s=Rr(e,o),i=s[1],a=s[2];if(i>a)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Ml=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Il=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Er=function(e,t){return e==="v"?Al(t):_l(t)},Rr=function(e,t){return e==="v"?Ml(t):Il(t)},Ol=function(e,t){return e==="h"&&t==="rtl"?-1:1},Nl=function(e,t,n,o,r){var s=Ol(e,window.getComputedStyle(t).direction),i=s*o,a=n.target,l=t.contains(a),u=!1,d=i>0,f=0,v=0;do{if(!a)break;var h=Rr(e,a),x=h[0],p=h[1],g=h[2],y=p-g-s*x;(x||y)&&Er(e,a)&&(f+=y,v+=x);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!r)||!d&&(Math.abs(v)<1||!r))&&(u=!0),u},vt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Mo=function(e){return[e.deltaX,e.deltaY]},Io=function(e){return e&&"current"in e?e.current:e},Dl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ll=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},jl=0,Fe=[];function kl(e){var t=c.useRef([]),n=c.useRef([0,0]),o=c.useRef(),r=c.useState(jl++)[0],s=c.useState(br)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=rl([e.lockRef.current],(e.shards||[]).map(Io),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var y=vt(p),w=n.current,C="deltaX"in p?p.deltaX:w[0]-y[0],b="deltaY"in p?p.deltaY:w[1]-y[1],S,T=p.target,E=Math.abs(C)>Math.abs(b)?"h":"v";if("touches"in p&&E==="h"&&T.type==="range")return!1;var A=_o(E,T);if(!A)return!0;if(A?S=E:(S=E==="v"?"h":"v",A=_o(E,T)),!A)return!1;if(!o.current&&"changedTouches"in p&&(C||b)&&(o.current=S),!S)return!0;var D=o.current||S;return Nl(D,g,p,D==="h"?C:b,!0)},[]),l=c.useCallback(function(p){var g=p;if(!(!Fe.length||Fe[Fe.length-1]!==s)){var y="deltaY"in g?Mo(g):vt(g),w=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&Dl(S.delta,y)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var C=(i.current.shards||[]).map(Io).filter(Boolean).filter(function(S){return S.contains(g.target)}),b=C.length>0?a(g,C[0]):!i.current.noIsolation;b&&g.cancelable&&g.preventDefault()}}},[]),u=c.useCallback(function(p,g,y,w){var C={name:p,delta:g,target:y,should:w,shadowParent:Fl(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(b){return b!==C})},1)},[]),d=c.useCallback(function(p){n.current=vt(p),o.current=void 0},[]),f=c.useCallback(function(p){u(p.type,Mo(p),p.target,a(p,e.lockRef.current))},[]),v=c.useCallback(function(p){u(p.type,vt(p),p.target,a(p,e.lockRef.current))},[]);c.useEffect(function(){return Fe.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:v}),document.addEventListener("wheel",l,ke),document.addEventListener("touchmove",l,ke),document.addEventListener("touchstart",d,ke),function(){Fe=Fe.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,ke),document.removeEventListener("touchmove",l,ke),document.removeEventListener("touchstart",d,ke)}},[]);var h=e.removeScrollBar,x=e.inert;return c.createElement(c.Fragment,null,x?c.createElement(s,{styles:Ll(r)}):null,h?c.createElement(Pl,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Fl(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $l=pl(Cr,kl);var Ut=c.forwardRef(function(e,t){return c.createElement(Ht,he({},e,{ref:t,sideCar:$l}))});Ut.classNames=Ht.classNames;var Bl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$e=new WeakMap,ht=new WeakMap,gt={},dn=0,Pr=function(e){return e&&(e.host||Pr(e.parentNode))},Wl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Pr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Vl=function(e,t,n,o){var r=Wl(t,Array.isArray(e)?e:[e]);gt[n]||(gt[n]=new WeakMap);var s=gt[n],i=[],a=new Set,l=new Set(r),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};r.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(v){if(a.has(v))d(v);else try{var h=v.getAttribute(o),x=h!==null&&h!=="false",p=($e.get(v)||0)+1,g=(s.get(v)||0)+1;$e.set(v,p),s.set(v,g),i.push(v),p===1&&x&&ht.set(v,!0),g===1&&v.setAttribute(n,"true"),x||v.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return d(t),a.clear(),dn++,function(){i.forEach(function(f){var v=$e.get(f)-1,h=s.get(f)-1;$e.set(f,v),s.set(f,h),v||(ht.has(f)||f.removeAttribute(o),ht.delete(f)),h||f.removeAttribute(n)}),dn--,dn||($e=new WeakMap,$e=new WeakMap,ht=new WeakMap,gt={})}},Vn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Bl(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),Vl(o,r,n,"aria-hidden")):function(){return null}},Gt="Dialog",[Tr,ff]=de(Gt),[Hl,pe]=Tr(Gt),Ar=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:i=!0}=e,a=c.useRef(null),l=c.useRef(null),[u,d]=ce({prop:o,defaultProp:r??!1,onChange:s,caller:Gt});return m.jsx(Hl,{scope:t,triggerRef:a,contentRef:l,contentId:Q(),titleId:Q(),descriptionId:Q(),open:u,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};Ar.displayName=Gt;var _r="DialogTrigger",Mr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(_r,n),s=B(t,r.triggerRef);return m.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Gn(r.open),...o,ref:s,onClick:R(e.onClick,r.onOpenToggle)})});Mr.displayName=_r;var Hn="DialogPortal",[Ul,Ir]=Tr(Hn,{forceMount:void 0}),Or=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=pe(Hn,t);return m.jsx(Ul,{scope:t,forceMount:n,children:c.Children.map(o,i=>m.jsx(fe,{present:n||s.open,children:m.jsx(Dt,{asChild:!0,container:r,children:i})}))})};Or.displayName=Hn;var Rt="DialogOverlay",Nr=c.forwardRef((e,t)=>{const n=Ir(Rt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=pe(Rt,e.__scopeDialog);return s.modal?m.jsx(fe,{present:o||s.open,children:m.jsx(Kl,{...r,ref:t})}):null});Nr.displayName=Rt;var Gl=Ie("DialogOverlay.RemoveScroll"),Kl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(Rt,n);return m.jsx(Ut,{as:Gl,allowPinchZoom:!0,shards:[r.contentRef],children:m.jsx(O.div,{"data-state":Gn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Ne="DialogContent",Dr=c.forwardRef((e,t)=>{const n=Ir(Ne,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=pe(Ne,e.__scopeDialog);return m.jsx(fe,{present:o||s.open,children:s.modal?m.jsx(zl,{...r,ref:t}):m.jsx(Yl,{...r,ref:t})})});Dr.displayName=Ne;var zl=c.forwardRef((e,t)=>{const n=pe(Ne,e.__scopeDialog),o=c.useRef(null),r=B(t,n.contentRef,o);return c.useEffect(()=>{const s=o.current;if(s)return Vn(s)},[]),m.jsx(Lr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault())})}),Yl=c.forwardRef((e,t)=>{const n=pe(Ne,e.__scopeDialog),o=c.useRef(!1),r=c.useRef(!1);return m.jsx(Lr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(o.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Lr=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...i}=e,a=pe(Ne,n),l=c.useRef(null),u=B(t,l);return Wn(),m.jsxs(m.Fragment,{children:[m.jsx(Vt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:m.jsx(Ue,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Gn(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(Xl,{titleId:a.titleId}),m.jsx(Zl,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Un="DialogTitle",jr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(Un,n);return m.jsx(O.h2,{id:r.titleId,...o,ref:t})});jr.displayName=Un;var kr="DialogDescription",Fr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe(kr,n);return m.jsx(O.p,{id:r.descriptionId,...o,ref:t})});Fr.displayName=kr;var $r="DialogClose",Br=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=pe($r,n);return m.jsx(O.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Br.displayName=$r;function Gn(e){return e?"open":"closed"}var Wr="DialogTitleWarning",[pf,Vr]=Ui(Wr,{contentName:Ne,titleName:Un,docsSlug:"dialog"}),Xl=({titleId:e})=>{const t=Vr(Wr),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},ql="DialogDescriptionWarning",Zl=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vr(ql).contentName}}.`;return c.useEffect(()=>{var s;const r=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},mf=Ar,vf=Mr,hf=Or,gf=Nr,wf=Dr,xf=jr,yf=Fr,Cf=Br,Ql=c.createContext(void 0);function it(e){const t=c.useContext(Ql);return e||t||"ltr"}var fn="rovingFocusGroup.onEntryFocus",Jl={bubbles:!1,cancelable:!0},at="RovingFocusGroup",[yn,Hr,eu]=Nt(at),[tu,Kt]=de(at,[eu]),[nu,ou]=tu(at),Ur=c.forwardRef((e,t)=>m.jsx(yn.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(yn.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(ru,{...e,ref:t})})}));Ur.displayName=at;var ru=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,v=c.useRef(null),h=B(t,v),x=it(s),[p,g]=ce({prop:i,defaultProp:a??null,onChange:l,caller:at}),[y,w]=c.useState(!1),C=ae(u),b=Hr(n),S=c.useRef(!1),[T,E]=c.useState(0);return c.useEffect(()=>{const A=v.current;if(A)return A.addEventListener(fn,C),()=>A.removeEventListener(fn,C)},[C]),m.jsx(nu,{scope:n,orientation:o,dir:x,loop:r,currentTabStopId:p,onItemFocus:c.useCallback(A=>g(A),[g]),onItemShiftTab:c.useCallback(()=>w(!0),[]),onFocusableItemAdd:c.useCallback(()=>E(A=>A+1),[]),onFocusableItemRemove:c.useCallback(()=>E(A=>A-1),[]),children:m.jsx(O.div,{tabIndex:y||T===0?-1:0,"data-orientation":o,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:R(e.onMouseDown,()=>{S.current=!0}),onFocus:R(e.onFocus,A=>{const D=!S.current;if(A.target===A.currentTarget&&D&&!y){const N=new CustomEvent(fn,Jl);if(A.currentTarget.dispatchEvent(N),!N.defaultPrevented){const F=b().filter(I=>I.focusable),$=F.find(I=>I.active),j=F.find(I=>I.id===p),G=[$,j,...F].filter(Boolean).map(I=>I.ref.current);zr(G,d)}}S.current=!1}),onBlur:R(e.onBlur,()=>w(!1))})})}),Gr="RovingFocusGroupItem",Kr=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:i,...a}=e,l=Q(),u=s||l,d=ou(Gr,n),f=d.currentTabStopId===u,v=Hr(n),{onFocusableItemAdd:h,onFocusableItemRemove:x,currentTabStopId:p}=d;return c.useEffect(()=>{if(o)return h(),()=>x()},[o,h,x]),m.jsx(yn.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:m.jsx(O.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:R(e.onMouseDown,g=>{o?d.onItemFocus(u):g.preventDefault()}),onFocus:R(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:R(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=au(g,d.orientation,d.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let C=v().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const b=C.indexOf(g.currentTarget);C=d.loop?cu(C,b+1):C.slice(b+1)}setTimeout(()=>zr(C))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:p!=null}):i})})});Kr.displayName=Gr;var su={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iu(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function au(e,t,n){const o=iu(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return su[o]}function zr(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function cu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Yr=Ur,Xr=Kr,Cn=["Enter"," "],lu=["ArrowDown","PageUp","Home"],qr=["ArrowUp","PageDown","End"],uu=[...lu,...qr],du={ltr:[...Cn,"ArrowRight"],rtl:[...Cn,"ArrowLeft"]},fu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ct="Menu",[ot,pu,mu]=Nt(ct),[je,Zr]=de(ct,[mu,ze,Kt]),lt=ze(),Qr=Kt(),[Jr,Ae]=je(ct),[vu,ut]=je(ct),es=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:i=!0}=e,a=lt(t),[l,u]=c.useState(null),d=c.useRef(!1),f=ae(s),v=it(r);return c.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),m.jsx(Ft,{...a,children:m.jsx(Jr,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:m.jsx(vu,{scope:t,onClose:c.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:v,modal:i,children:o})})})};es.displayName=ct;var hu="MenuAnchor",Kn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=lt(n);return m.jsx(kn,{...r,...o,ref:t})});Kn.displayName=hu;var zn="MenuPortal",[gu,ts]=je(zn,{forceMount:void 0}),ns=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=Ae(zn,t);return m.jsx(gu,{scope:t,forceMount:n,children:m.jsx(fe,{present:n||s.open,children:m.jsx(Dt,{asChild:!0,container:r,children:o})})})};ns.displayName=zn;var se="MenuContent",[wu,Yn]=je(se),os=c.forwardRef((e,t)=>{const n=ts(se,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ae(se,e.__scopeMenu),i=ut(se,e.__scopeMenu);return m.jsx(ot.Provider,{scope:e.__scopeMenu,children:m.jsx(fe,{present:o||s.open,children:m.jsx(ot.Slot,{scope:e.__scopeMenu,children:i.modal?m.jsx(xu,{...r,ref:t}):m.jsx(yu,{...r,ref:t})})})})}),xu=c.forwardRef((e,t)=>{const n=Ae(se,e.__scopeMenu),o=c.useRef(null),r=B(t,o);return c.useEffect(()=>{const s=o.current;if(s)return Vn(s)},[]),m.jsx(Xn,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),yu=c.forwardRef((e,t)=>{const n=Ae(se,e.__scopeMenu);return m.jsx(Xn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Cu=Ie("MenuContent.ScrollLock"),Xn=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:v,onDismiss:h,disableOutsideScroll:x,...p}=e,g=Ae(se,n),y=ut(se,n),w=lt(n),C=Qr(n),b=pu(n),[S,T]=c.useState(null),E=c.useRef(null),A=B(t,E,g.onContentChange),D=c.useRef(0),N=c.useRef(""),F=c.useRef(0),$=c.useRef(null),j=c.useRef("right"),L=c.useRef(0),G=x?Ut:c.Fragment,I=x?{as:Cu,allowPinchZoom:!0}:void 0,k=P=>{var M,V;const K=N.current+P,Y=b().filter(z=>!z.disabled),J=document.activeElement,Ce=(M=Y.find(z=>z.ref.current===J))==null?void 0:M.textValue,re=Y.map(z=>z.textValue),be=Nu(re,K,Ce),ee=(V=Y.find(z=>z.textValue===be))==null?void 0:V.ref.current;(function z(W){N.current=W,window.clearTimeout(D.current),W!==""&&(D.current=window.setTimeout(()=>z(""),1e3))})(K),ee&&setTimeout(()=>ee.focus())};c.useEffect(()=>()=>window.clearTimeout(D.current),[]),Wn();const _=c.useCallback(P=>{var Y,J;return j.current===((Y=$.current)==null?void 0:Y.side)&&Lu(P,(J=$.current)==null?void 0:J.area)},[]);return m.jsx(wu,{scope:n,searchRef:N,onItemEnter:c.useCallback(P=>{_(P)&&P.preventDefault()},[_]),onItemLeave:c.useCallback(P=>{var K;_(P)||((K=E.current)==null||K.focus(),T(null))},[_]),onTriggerLeave:c.useCallback(P=>{_(P)&&P.preventDefault()},[_]),pointerGraceTimerRef:F,onPointerGraceIntentChange:c.useCallback(P=>{$.current=P},[]),children:m.jsx(G,{...I,children:m.jsx(Vt,{asChild:!0,trapped:r,onMountAutoFocus:R(s,P=>{var K;P.preventDefault(),(K=E.current)==null||K.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:m.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:v,onDismiss:h,children:m.jsx(Yr,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:T,onEntryFocus:R(l,P=>{y.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(Fn,{role:"menu","aria-orientation":"vertical","data-state":ys(g.open),"data-radix-menu-content":"",dir:y.dir,...w,...p,ref:A,style:{outline:"none",...p.style},onKeyDown:R(p.onKeyDown,P=>{const Y=P.target.closest("[data-radix-menu-content]")===P.currentTarget,J=P.ctrlKey||P.altKey||P.metaKey,Ce=P.key.length===1;Y&&(P.key==="Tab"&&P.preventDefault(),!J&&Ce&&k(P.key));const re=E.current;if(P.target!==re||!uu.includes(P.key))return;P.preventDefault();const ee=b().filter(M=>!M.disabled).map(M=>M.ref.current);qr.includes(P.key)&&ee.reverse(),Iu(ee)}),onBlur:R(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(D.current),N.current="")}),onPointerMove:R(e.onPointerMove,rt(P=>{const K=P.target,Y=L.current!==P.clientX;if(P.currentTarget.contains(K)&&Y){const J=P.clientX>L.current?"right":"left";j.current=J,L.current=P.clientX}}))})})})})})})});os.displayName=se;var bu="MenuGroup",qn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return m.jsx(O.div,{role:"group",...o,ref:t})});qn.displayName=bu;var Su="MenuLabel",rs=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return m.jsx(O.div,{...o,ref:t})});rs.displayName=Su;var Pt="MenuItem",Oo="menu.itemSelect",zt=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=c.useRef(null),i=ut(Pt,e.__scopeMenu),a=Yn(Pt,e.__scopeMenu),l=B(t,s),u=c.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const v=new CustomEvent(Oo,{bubbles:!0,cancelable:!0});f.addEventListener(Oo,h=>o==null?void 0:o(h),{once:!0}),Fo(f,v),v.defaultPrevented?u.current=!1:i.onClose()}};return m.jsx(ss,{...r,ref:l,disabled:n,onClick:R(e.onClick,d),onPointerDown:f=>{var v;(v=e.onPointerDown)==null||v.call(e,f),u.current=!0},onPointerUp:R(e.onPointerUp,f=>{var v;u.current||(v=f.currentTarget)==null||v.click()}),onKeyDown:R(e.onKeyDown,f=>{const v=a.searchRef.current!=="";n||v&&f.key===" "||Cn.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});zt.displayName=Pt;var ss=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,i=Yn(Pt,n),a=Qr(n),l=c.useRef(null),u=B(t,l),[d,f]=c.useState(!1),[v,h]=c.useState("");return c.useEffect(()=>{const x=l.current;x&&h((x.textContent??"").trim())},[s.children]),m.jsx(ot.ItemSlot,{scope:n,disabled:o,textValue:r??v,children:m.jsx(Xr,{asChild:!0,...a,focusable:!o,children:m.jsx(O.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:R(e.onPointerMove,rt(x=>{o?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,rt(x=>i.onItemLeave(x))),onFocus:R(e.onFocus,()=>f(!0)),onBlur:R(e.onBlur,()=>f(!1))})})})}),Eu="MenuCheckboxItem",is=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return m.jsx(ds,{scope:e.__scopeMenu,checked:n,children:m.jsx(zt,{role:"menuitemcheckbox","aria-checked":Tt(n)?"mixed":n,...r,ref:t,"data-state":Jn(n),onSelect:R(r.onSelect,()=>o==null?void 0:o(Tt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});is.displayName=Eu;var as="MenuRadioGroup",[Ru,Pu]=je(as,{value:void 0,onValueChange:()=>{}}),cs=c.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=ae(o);return m.jsx(Ru,{scope:e.__scopeMenu,value:n,onValueChange:s,children:m.jsx(qn,{...r,ref:t})})});cs.displayName=as;var ls="MenuRadioItem",us=c.forwardRef((e,t)=>{const{value:n,...o}=e,r=Pu(ls,e.__scopeMenu),s=n===r.value;return m.jsx(ds,{scope:e.__scopeMenu,checked:s,children:m.jsx(zt,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":Jn(s),onSelect:R(o.onSelect,()=>{var i;return(i=r.onValueChange)==null?void 0:i.call(r,n)},{checkForDefaultPrevented:!1})})})});us.displayName=ls;var Zn="MenuItemIndicator",[ds,Tu]=je(Zn,{checked:!1}),fs=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=Tu(Zn,n);return m.jsx(fe,{present:o||Tt(s.checked)||s.checked===!0,children:m.jsx(O.span,{...r,ref:t,"data-state":Jn(s.checked)})})});fs.displayName=Zn;var Au="MenuSeparator",ps=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return m.jsx(O.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});ps.displayName=Au;var _u="MenuArrow",ms=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=lt(n);return m.jsx($n,{...r,...o,ref:t})});ms.displayName=_u;var Qn="MenuSub",[Mu,vs]=je(Qn),hs=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,s=Ae(Qn,t),i=lt(t),[a,l]=c.useState(null),[u,d]=c.useState(null),f=ae(r);return c.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),m.jsx(Ft,{...i,children:m.jsx(Jr,{scope:t,open:o,onOpenChange:f,content:u,onContentChange:d,children:m.jsx(Mu,{scope:t,contentId:Q(),triggerId:Q(),trigger:a,onTriggerChange:l,children:n})})})};hs.displayName=Qn;var Qe="MenuSubTrigger",gs=c.forwardRef((e,t)=>{const n=Ae(Qe,e.__scopeMenu),o=ut(Qe,e.__scopeMenu),r=vs(Qe,e.__scopeMenu),s=Yn(Qe,e.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>d,[d]),c.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),m.jsx(Kn,{asChild:!0,...u,children:m.jsx(ss,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ys(n.open),...e,ref:Ot(t,r.onTriggerChange),onClick:f=>{var v;(v=e.onClick)==null||v.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:R(e.onPointerMove,rt(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:R(e.onPointerLeave,rt(f=>{var h,x;d();const v=(h=n.content)==null?void 0:h.getBoundingClientRect();if(v){const p=(x=n.content)==null?void 0:x.dataset.side,g=p==="right",y=g?-5:5,w=v[g?"left":"right"],C=v[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x:w,y:v.top},{x:C,y:v.top},{x:C,y:v.bottom},{x:w,y:v.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,f=>{var h;const v=s.searchRef.current!=="";e.disabled||v&&f.key===" "||du[o.dir].includes(f.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),f.preventDefault())})})})});gs.displayName=Qe;var ws="MenuSubContent",xs=c.forwardRef((e,t)=>{const n=ts(se,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ae(se,e.__scopeMenu),i=ut(se,e.__scopeMenu),a=vs(ws,e.__scopeMenu),l=c.useRef(null),u=B(t,l);return m.jsx(ot.Provider,{scope:e.__scopeMenu,children:m.jsx(fe,{present:o||s.open,children:m.jsx(ot.Slot,{scope:e.__scopeMenu,children:m.jsx(Xn,{id:a.contentId,"aria-labelledby":a.triggerId,...r,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;i.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:R(e.onFocusOutside,d=>{d.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:R(e.onKeyDown,d=>{var h;const f=d.currentTarget.contains(d.target),v=fu[i.dir].includes(d.key);f&&v&&(s.onOpenChange(!1),(h=a.trigger)==null||h.focus(),d.preventDefault())})})})})})});xs.displayName=ws;function ys(e){return e?"open":"closed"}function Tt(e){return e==="indeterminate"}function Jn(e){return Tt(e)?"indeterminate":e?"checked":"unchecked"}function Iu(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ou(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Nu(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Ou(e,Math.max(s,0));r.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Du(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;so!=v>o&&n<(f-u)*(o-d)/(v-d)+u&&(r=!r)}return r}function Lu(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Du(n,t)}function rt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ju=es,ku=Kn,Fu=ns,$u=os,Bu=qn,Wu=rs,Vu=zt,Hu=is,Uu=cs,Gu=us,Ku=fs,zu=ps,Yu=ms,Xu=hs,qu=gs,Zu=xs,Yt="DropdownMenu",[Qu,bf]=de(Yt,[Zr]),Z=Zr(),[Ju,Cs]=Qu(Yt),bs=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,l=Z(t),u=c.useRef(null),[d,f]=ce({prop:r,defaultProp:s??!1,onChange:i,caller:Yt});return m.jsx(Ju,{scope:t,triggerId:Q(),triggerRef:u,contentId:Q(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(v=>!v),[f]),modal:a,children:m.jsx(ju,{...l,open:d,onOpenChange:f,dir:o,modal:a,children:n})})};bs.displayName=Yt;var Ss="DropdownMenuTrigger",Es=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=Cs(Ss,n),i=Z(n);return m.jsx(ku,{asChild:!0,...i,children:m.jsx(O.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Ot(t,s.triggerRef),onPointerDown:R(e.onPointerDown,a=>{!o&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:R(e.onKeyDown,a=>{o||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Es.displayName=Ss;var ed="DropdownMenuPortal",Rs=e=>{const{__scopeDropdownMenu:t,...n}=e,o=Z(t);return m.jsx(Fu,{...o,...n})};Rs.displayName=ed;var Ps="DropdownMenuContent",Ts=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Cs(Ps,n),s=Z(n),i=c.useRef(!1);return m.jsx($u,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,a=>{var l;i.current||(l=r.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:R(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!r.modal||d)&&(i.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)"}})});Ts.displayName=Ps;var td="DropdownMenuGroup",nd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Z(n);return m.jsx(Bu,{...r,...o,ref:t})});nd.displayName=td;var od="DropdownMenuLabel",As=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Z(n);return m.jsx(Wu,{...r,...o,ref:t})});As.displayName=od;var rd="DropdownMenuItem",_s=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Z(n);return m.jsx(Vu,{...r,...o,ref:t})});_s.displayName=rd;var sd="DropdownMenuCheckboxItem",Ms=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Z(n);return m.jsx(Hu,{...r,...o,ref:t})});Ms.displayName=sd;var id="DropdownMenuRadioGroup",ad=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Z(n);return m.jsx(Uu,{...r,...o,ref:t})});ad.displayName=id;var cd="DropdownMenuRadioItem",Is=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Z(n);return m.jsx(Gu,{...r,...o,ref:t})});Is.displayName=cd;var ld="DropdownMenuItemIndicator",Os=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Z(n);return m.jsx(Ku,{...r,...o,ref:t})});Os.displayName=ld;var ud="DropdownMenuSeparator",Ns=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Z(n);return m.jsx(zu,{...r,...o,ref:t})});Ns.displayName=ud;var dd="DropdownMenuArrow",fd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Z(n);return m.jsx(Yu,{...r,...o,ref:t})});fd.displayName=dd;var pd=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:s}=e,i=Z(t),[a,l]=ce({prop:o,defaultProp:s??!1,onChange:r,caller:"DropdownMenuSub"});return m.jsx(Xu,{...i,open:a,onOpenChange:l,children:n})},md="DropdownMenuSubTrigger",Ds=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Z(n);return m.jsx(qu,{...r,...o,ref:t})});Ds.displayName=md;var vd="DropdownMenuSubContent",Ls=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Z(n);return m.jsx(Zu,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ls.displayName=vd;var Sf=bs,Ef=Es,Rf=Rs,Pf=Ts,Tf=As,Af=_s,_f=Ms,Mf=Is,If=Os,Of=Ns,Nf=pd,Df=Ds,Lf=Ls,Xt="Collapsible",[hd,js]=de(Xt),[gd,eo]=hd(Xt),ks=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:s,onOpenChange:i,...a}=e,[l,u]=ce({prop:o,defaultProp:r??!1,onChange:i,caller:Xt});return m.jsx(gd,{scope:n,disabled:s,contentId:Q(),open:l,onOpenToggle:c.useCallback(()=>u(d=>!d),[u]),children:m.jsx(O.div,{"data-state":no(l),"data-disabled":s?"":void 0,...a,ref:t})})});ks.displayName=Xt;var Fs="CollapsibleTrigger",$s=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=eo(Fs,n);return m.jsx(O.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":no(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:R(e.onClick,r.onOpenToggle)})});$s.displayName=Fs;var to="CollapsibleContent",Bs=c.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=eo(to,e.__scopeCollapsible);return m.jsx(fe,{present:n||r.open,children:({present:s})=>m.jsx(wd,{...o,ref:t,present:s})})});Bs.displayName=to;var wd=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...s}=e,i=eo(to,n),[a,l]=c.useState(o),u=c.useRef(null),d=B(t,u),f=c.useRef(0),v=f.current,h=c.useRef(0),x=h.current,p=i.open||a,g=c.useRef(p),y=c.useRef(void 0);return c.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),q(()=>{const w=u.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const C=w.getBoundingClientRect();f.current=C.height,h.current=C.width,g.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),l(o)}},[i.open,o]),m.jsx(O.div,{"data-state":no(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!p,...s,ref:d,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:p&&r})});function no(e){return e?"open":"closed"}var xd=ks,yd=$s,Cd=Bs,me="Accordion",bd=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[oo,Sd,Ed]=Nt(me),[qt,jf]=de(me,[Ed,js]),ro=js(),Ws=X.forwardRef((e,t)=>{const{type:n,...o}=e,r=o,s=o;return m.jsx(oo.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?m.jsx(Ad,{...s,ref:t}):m.jsx(Td,{...r,ref:t})})});Ws.displayName=me;var[Vs,Rd]=qt(me),[Hs,Pd]=qt(me,{collapsible:!1}),Td=X.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},collapsible:s=!1,...i}=e,[a,l]=ce({prop:n,defaultProp:o??"",onChange:r,caller:me});return m.jsx(Vs,{scope:e.__scopeAccordion,value:X.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:X.useCallback(()=>s&&l(""),[s,l]),children:m.jsx(Hs,{scope:e.__scopeAccordion,collapsible:s,children:m.jsx(Us,{...i,ref:t})})})}),Ad=X.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...s}=e,[i,a]=ce({prop:n,defaultProp:o??[],onChange:r,caller:me}),l=X.useCallback(d=>a((f=[])=>[...f,d]),[a]),u=X.useCallback(d=>a((f=[])=>f.filter(v=>v!==d)),[a]);return m.jsx(Vs,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:m.jsx(Hs,{scope:e.__scopeAccordion,collapsible:!0,children:m.jsx(Us,{...s,ref:t})})})}),[_d,Zt]=qt(me),Us=X.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:o,dir:r,orientation:s="vertical",...i}=e,a=X.useRef(null),l=B(a,t),u=Sd(n),f=it(r)==="ltr",v=R(e.onKeyDown,h=>{var A;if(!bd.includes(h.key))return;const x=h.target,p=u().filter(D=>{var N;return!((N=D.ref.current)!=null&&N.disabled)}),g=p.findIndex(D=>D.ref.current===x),y=p.length;if(g===-1)return;h.preventDefault();let w=g;const C=0,b=y-1,S=()=>{w=g+1,w>b&&(w=C)},T=()=>{w=g-1,w{const{__scopeAccordion:n,value:o,...r}=e,s=Zt(At,n),i=Rd(At,n),a=ro(n),l=Q(),u=o&&i.value.includes(o)||!1,d=s.disabled||e.disabled;return m.jsx(Md,{scope:n,open:u,disabled:d,triggerId:l,children:m.jsx(xd,{"data-orientation":s.orientation,"data-state":Zs(u),...a,...r,ref:t,disabled:d,open:u,onOpenChange:f=>{f?i.onItemOpen(o):i.onItemClose(o)}})})});Gs.displayName=At;var Ks="AccordionHeader",zs=X.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=Zt(me,n),s=so(Ks,n);return m.jsx(O.h3,{"data-orientation":r.orientation,"data-state":Zs(s.open),"data-disabled":s.disabled?"":void 0,...o,ref:t})});zs.displayName=Ks;var bn="AccordionTrigger",Ys=X.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=Zt(me,n),s=so(bn,n),i=Pd(bn,n),a=ro(n);return m.jsx(oo.ItemSlot,{scope:n,children:m.jsx(yd,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":r.orientation,id:s.triggerId,...a,...o,ref:t})})});Ys.displayName=bn;var Xs="AccordionContent",qs=X.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=Zt(me,n),s=so(Xs,n),i=ro(n);return m.jsx(Cd,{role:"region","aria-labelledby":s.triggerId,"data-orientation":r.orientation,...i,...o,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});qs.displayName=Xs;function Zs(e){return e?"open":"closed"}var kf=Ws,Ff=Gs,$f=zs,Bf=Ys,Wf=qs;function No(e,[t,n]){return Math.min(n,Math.max(t,e))}function Id(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Od=[" ","Enter","ArrowUp","ArrowDown"],Nd=[" ","Enter"],De="Select",[Qt,Jt,Dd]=Nt(De),[Ye,Vf]=de(De,[Dd,ze]),en=ze(),[Ld,_e]=Ye(De),[jd,kd]=Ye(De),Qs=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:v,required:h,form:x}=e,p=en(t),[g,y]=c.useState(null),[w,C]=c.useState(null),[b,S]=c.useState(!1),T=it(u),[E,A]=ce({prop:o,defaultProp:r??!1,onChange:s,caller:De}),[D,N]=ce({prop:i,defaultProp:a,onChange:l,caller:De}),F=c.useRef(null),$=g?x||!!g.closest("form"):!0,[j,L]=c.useState(new Set),G=Array.from(j).map(I=>I.props.value).join(";");return m.jsx(Ft,{...p,children:m.jsxs(Ld,{required:h,scope:t,trigger:g,onTriggerChange:y,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:b,onValueNodeHasChildrenChange:S,contentId:Q(),value:D,onValueChange:N,open:E,onOpenChange:A,dir:T,triggerPointerDownPosRef:F,disabled:v,children:[m.jsx(Qt.Provider,{scope:t,children:m.jsx(jd,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(I=>{L(k=>new Set(k).add(I))},[]),onNativeOptionRemove:c.useCallback(I=>{L(k=>{const _=new Set(k);return _.delete(I),_})},[]),children:n})}),$?m.jsxs(bi,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:f,value:D,onChange:I=>N(I.target.value),disabled:v,form:x,children:[D===void 0?m.jsx("option",{value:""}):null,Array.from(j)]},G):null]})})};Qs.displayName=De;var Js="SelectTrigger",ei=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=en(n),i=_e(Js,n),a=i.disabled||o,l=B(t,i.onTriggerChange),u=Jt(n),d=c.useRef("touch"),[f,v,h]=Ei(p=>{const g=u().filter(C=>!C.disabled),y=g.find(C=>C.value===i.value),w=Ri(g,p,y);w!==void 0&&i.onValueChange(w.value)}),x=p=>{a||(i.onOpenChange(!0),h()),p&&(i.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return m.jsx(kn,{asChild:!0,...s,children:m.jsx(O.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Si(i.value)?"":void 0,...r,ref:l,onClick:R(r.onClick,p=>{p.currentTarget.focus(),d.current!=="mouse"&&x(p)}),onPointerDown:R(r.onPointerDown,p=>{d.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(x(p),p.preventDefault())}),onKeyDown:R(r.onKeyDown,p=>{const g=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&v(p.key),!(g&&p.key===" ")&&Od.includes(p.key)&&(x(),p.preventDefault())})})})});ei.displayName=Js;var ti="SelectValue",ni=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:i="",...a}=e,l=_e(ti,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,f=B(t,l.onValueNodeChange);return q(()=>{u(d)},[u,d]),m.jsx(O.span,{...a,ref:f,style:{pointerEvents:"none"},children:Si(l.value)?m.jsx(m.Fragment,{children:i}):s})});ni.displayName=ti;var Fd="SelectIcon",oi=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return m.jsx(O.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});oi.displayName=Fd;var $d="SelectPortal",ri=e=>m.jsx(Dt,{asChild:!0,...e});ri.displayName=$d;var Le="SelectContent",si=c.forwardRef((e,t)=>{const n=_e(Le,e.__scopeSelect),[o,r]=c.useState();if(q(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?Mt.createPortal(m.jsx(ii,{scope:e.__scopeSelect,children:m.jsx(Qt.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),s):null}return m.jsx(ai,{...e,ref:t})});si.displayName=Le;var ie=10,[ii,Me]=Ye(Le),Bd="SelectContentImpl",Wd=Ie("SelectContent.RemoveScroll"),ai=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:v,collisionPadding:h,sticky:x,hideWhenDetached:p,avoidCollisions:g,...y}=e,w=_e(Le,n),[C,b]=c.useState(null),[S,T]=c.useState(null),E=B(t,M=>b(M)),[A,D]=c.useState(null),[N,F]=c.useState(null),$=Jt(n),[j,L]=c.useState(!1),G=c.useRef(!1);c.useEffect(()=>{if(C)return Vn(C)},[C]),Wn();const I=c.useCallback(M=>{const[V,...z]=$().map(U=>U.ref.current),[W]=z.slice(-1),H=document.activeElement;for(const U of M)if(U===H||(U==null||U.scrollIntoView({block:"nearest"}),U===V&&S&&(S.scrollTop=0),U===W&&S&&(S.scrollTop=S.scrollHeight),U==null||U.focus(),document.activeElement!==H))return},[$,S]),k=c.useCallback(()=>I([A,C]),[I,A,C]);c.useEffect(()=>{j&&k()},[j,k]);const{onOpenChange:_,triggerPointerDownPosRef:P}=w;c.useEffect(()=>{if(C){let M={x:0,y:0};const V=W=>{var H,U;M={x:Math.abs(Math.round(W.pageX)-(((H=P.current)==null?void 0:H.x)??0)),y:Math.abs(Math.round(W.pageY)-(((U=P.current)==null?void 0:U.y)??0))}},z=W=>{M.x<=10&&M.y<=10?W.preventDefault():C.contains(W.target)||_(!1),document.removeEventListener("pointermove",V),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",z,{capture:!0})}}},[C,_,P]),c.useEffect(()=>{const M=()=>_(!1);return window.addEventListener("blur",M),window.addEventListener("resize",M),()=>{window.removeEventListener("blur",M),window.removeEventListener("resize",M)}},[_]);const[K,Y]=Ei(M=>{const V=$().filter(H=>!H.disabled),z=V.find(H=>H.ref.current===document.activeElement),W=Ri(V,M,z);W&&setTimeout(()=>W.ref.current.focus())}),J=c.useCallback((M,V,z)=>{const W=!G.current&&!z;(w.value!==void 0&&w.value===V||W)&&(D(M),W&&(G.current=!0))},[w.value]),Ce=c.useCallback(()=>C==null?void 0:C.focus(),[C]),re=c.useCallback((M,V,z)=>{const W=!G.current&&!z;(w.value!==void 0&&w.value===V||W)&&F(M)},[w.value]),be=o==="popper"?Sn:ci,ee=be===Sn?{side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:v,collisionPadding:h,sticky:x,hideWhenDetached:p,avoidCollisions:g}:{};return m.jsx(ii,{scope:n,content:C,viewport:S,onViewportChange:T,itemRefCallback:J,selectedItem:A,onItemLeave:Ce,itemTextRefCallback:re,focusSelectedItem:k,selectedItemText:N,position:o,isPositioned:j,searchRef:K,children:m.jsx(Ut,{as:Wd,allowPinchZoom:!0,children:m.jsx(Vt,{asChild:!0,trapped:w.open,onMountAutoFocus:M=>{M.preventDefault()},onUnmountAutoFocus:R(r,M=>{var V;(V=w.trigger)==null||V.focus({preventScroll:!0}),M.preventDefault()}),children:m.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:M=>M.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:m.jsx(be,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:M=>M.preventDefault(),...y,...ee,onPlaced:()=>L(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:R(y.onKeyDown,M=>{const V=M.ctrlKey||M.altKey||M.metaKey;if(M.key==="Tab"&&M.preventDefault(),!V&&M.key.length===1&&Y(M.key),["ArrowUp","ArrowDown","Home","End"].includes(M.key)){let W=$().filter(H=>!H.disabled).map(H=>H.ref.current);if(["ArrowUp","End"].includes(M.key)&&(W=W.slice().reverse()),["ArrowUp","ArrowDown"].includes(M.key)){const H=M.target,U=W.indexOf(H);W=W.slice(U+1)}setTimeout(()=>I(W)),M.preventDefault()}})})})})})})});ai.displayName=Bd;var Vd="SelectItemAlignedPosition",ci=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=_e(Le,n),i=Me(Le,n),[a,l]=c.useState(null),[u,d]=c.useState(null),f=B(t,E=>d(E)),v=Jt(n),h=c.useRef(!1),x=c.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:y,focusSelectedItem:w}=i,C=c.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&p&&g&&y){const E=s.trigger.getBoundingClientRect(),A=u.getBoundingClientRect(),D=s.valueNode.getBoundingClientRect(),N=y.getBoundingClientRect();if(s.dir!=="rtl"){const H=N.left-A.left,U=D.left-H,te=E.left-U,ve=E.width+te,Xe=Math.max(ve,A.width),qe=window.innerWidth-ie,Ze=No(U,[ie,Math.max(ie,qe-Xe)]);a.style.minWidth=ve+"px",a.style.left=Ze+"px"}else{const H=A.right-N.right,U=window.innerWidth-D.right-H,te=window.innerWidth-E.right-U,ve=E.width+te,Xe=Math.max(ve,A.width),qe=window.innerWidth-ie,Ze=No(U,[ie,Math.max(ie,qe-Xe)]);a.style.minWidth=ve+"px",a.style.right=Ze+"px"}const F=v(),$=window.innerHeight-ie*2,j=p.scrollHeight,L=window.getComputedStyle(u),G=parseInt(L.borderTopWidth,10),I=parseInt(L.paddingTop,10),k=parseInt(L.borderBottomWidth,10),_=parseInt(L.paddingBottom,10),P=G+I+j+_+k,K=Math.min(g.offsetHeight*5,P),Y=window.getComputedStyle(p),J=parseInt(Y.paddingTop,10),Ce=parseInt(Y.paddingBottom,10),re=E.top+E.height/2-ie,be=$-re,ee=g.offsetHeight/2,M=g.offsetTop+ee,V=G+I+M,z=P-V;if(V<=re){const H=F.length>0&&g===F[F.length-1].ref.current;a.style.bottom="0px";const U=u.clientHeight-p.offsetTop-p.offsetHeight,te=Math.max(be,ee+(H?Ce:0)+U+k),ve=V+te;a.style.height=ve+"px"}else{const H=F.length>0&&g===F[0].ref.current;a.style.top="0px";const te=Math.max(re,G+p.offsetTop+(H?J:0)+ee)+z;a.style.height=te+"px",p.scrollTop=V-re+p.offsetTop}a.style.margin=`${ie}px 0`,a.style.minHeight=K+"px",a.style.maxHeight=$+"px",o==null||o(),requestAnimationFrame(()=>h.current=!0)}},[v,s.trigger,s.valueNode,a,u,p,g,y,s.dir,o]);q(()=>C(),[C]);const[b,S]=c.useState();q(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const T=c.useCallback(E=>{E&&x.current===!0&&(C(),w==null||w(),x.current=!1)},[C,w]);return m.jsx(Ud,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:T,children:m.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:m.jsx(O.div,{...r,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ci.displayName=Vd;var Hd="SelectPopperPosition",Sn=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=ie,...s}=e,i=en(n);return m.jsx(Fn,{...i,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Sn.displayName=Hd;var[Ud,io]=Ye(Le,{}),En="SelectViewport",li=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=Me(En,n),i=io(En,n),a=B(t,s.onViewportChange),l=c.useRef(0);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m.jsx(Qt.Slot,{scope:n,children:m.jsx(O.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:R(r.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:v}=i;if(v!=null&&v.current&&f){const h=Math.abs(l.current-d.scrollTop);if(h>0){const x=window.innerHeight-ie*2,p=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),y=Math.max(p,g);if(y0?b:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});li.displayName=En;var ui="SelectGroup",[Gd,Kd]=Ye(ui),zd=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Q();return m.jsx(Gd,{scope:n,id:r,children:m.jsx(O.div,{role:"group","aria-labelledby":r,...o,ref:t})})});zd.displayName=ui;var di="SelectLabel",fi=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Kd(di,n);return m.jsx(O.div,{id:r.id,...o,ref:t})});fi.displayName=di;var _t="SelectItem",[Yd,pi]=Ye(_t),mi=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...i}=e,a=_e(_t,n),l=Me(_t,n),u=a.value===o,[d,f]=c.useState(s??""),[v,h]=c.useState(!1),x=B(t,w=>{var C;return(C=l.itemRefCallback)==null?void 0:C.call(l,w,o,r)}),p=Q(),g=c.useRef("touch"),y=()=>{r||(a.onValueChange(o),a.onOpenChange(!1))};if(o==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.jsx(Yd,{scope:n,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:c.useCallback(w=>{f(C=>C||((w==null?void 0:w.textContent)??"").trim())},[]),children:m.jsx(Qt.ItemSlot,{scope:n,value:o,disabled:r,textValue:d,children:m.jsx(O.div,{role:"option","aria-labelledby":p,"data-highlighted":v?"":void 0,"aria-selected":u&&v,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,ref:x,onFocus:R(i.onFocus,()=>h(!0)),onBlur:R(i.onBlur,()=>h(!1)),onClick:R(i.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:R(i.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:R(i.onPointerDown,w=>{g.current=w.pointerType}),onPointerMove:R(i.onPointerMove,w=>{var C;g.current=w.pointerType,r?(C=l.onItemLeave)==null||C.call(l):g.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(i.onPointerLeave,w=>{var C;w.currentTarget===document.activeElement&&((C=l.onItemLeave)==null||C.call(l))}),onKeyDown:R(i.onKeyDown,w=>{var b;((b=l.searchRef)==null?void 0:b.current)!==""&&w.key===" "||(Nd.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});mi.displayName=_t;var Je="SelectItemText",vi=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,i=_e(Je,n),a=Me(Je,n),l=pi(Je,n),u=kd(Je,n),[d,f]=c.useState(null),v=B(t,y=>f(y),l.onItemTextChange,y=>{var w;return(w=a.itemTextRefCallback)==null?void 0:w.call(a,y,l.value,l.disabled)}),h=d==null?void 0:d.textContent,x=c.useMemo(()=>m.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return q(()=>(p(x),()=>g(x)),[p,g,x]),m.jsxs(m.Fragment,{children:[m.jsx(O.span,{id:l.textId,...s,ref:v}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Mt.createPortal(s.children,i.valueNode):null]})});vi.displayName=Je;var hi="SelectItemIndicator",gi=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return pi(hi,n).isSelected?m.jsx(O.span,{"aria-hidden":!0,...o,ref:t}):null});gi.displayName=hi;var Rn="SelectScrollUpButton",wi=c.forwardRef((e,t)=>{const n=Me(Rn,e.__scopeSelect),o=io(Rn,e.__scopeSelect),[r,s]=c.useState(!1),i=B(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),r?m.jsx(yi,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});wi.displayName=Rn;var Pn="SelectScrollDownButton",xi=c.forwardRef((e,t)=>{const n=Me(Pn,e.__scopeSelect),o=io(Pn,e.__scopeSelect),[r,s]=c.useState(!1),i=B(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),r?m.jsx(yi,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});xi.displayName=Pn;var yi=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=Me("SelectScrollButton",n),i=c.useRef(null),a=Jt(n),l=c.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return c.useEffect(()=>()=>l(),[l]),q(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),m.jsx(O.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:R(r.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:R(r.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:R(r.onPointerLeave,()=>{l()})})}),Xd="SelectSeparator",Ci=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return m.jsx(O.div,{"aria-hidden":!0,...o,ref:t})});Ci.displayName=Xd;var Tn="SelectArrow",qd=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=en(n),s=_e(Tn,n),i=Me(Tn,n);return s.open&&i.position==="popper"?m.jsx($n,{...r,...o,ref:t}):null});qd.displayName=Tn;var Zd="SelectBubbleInput",bi=c.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=c.useRef(null),s=B(o,r),i=Id(t);return c.useEffect(()=>{const a=r.current;if(!a)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&d){const f=new Event("change",{bubbles:!0});d.call(a,t),a.dispatchEvent(f)}},[i,t]),m.jsx(O.select,{...n,style:{...Vo,...n.style},ref:s,defaultValue:t})});bi.displayName=Zd;function Si(e){return e===""||e===void 0}function Ei(e){const t=ae(e),n=c.useRef(""),o=c.useRef(0),r=c.useCallback(i=>{const a=n.current+i;t(a),function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=c.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Ri(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Qd(e,Math.max(s,0));r.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Qd(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Hf=Qs,Uf=ei,Gf=ni,Kf=oi,zf=ri,Yf=si,Xf=li,qf=fi,Zf=mi,Qf=vi,Jf=gi,ep=wi,tp=xi,np=Ci,tn="Tabs",[Jd,op]=de(tn,[Kt]),Pi=Kt(),[ef,ao]=Jd(tn),Ti=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=it(a),[f,v]=ce({prop:o,onChange:r,defaultProp:s??"",caller:tn});return m.jsx(ef,{scope:n,baseId:Q(),value:f,onValueChange:v,orientation:i,dir:d,activationMode:l,children:m.jsx(O.div,{dir:d,"data-orientation":i,...u,ref:t})})});Ti.displayName=tn;var Ai="TabsList",_i=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,s=ao(Ai,n),i=Pi(n);return m.jsx(Yr,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:o,children:m.jsx(O.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:t})})});_i.displayName=Ai;var Mi="TabsTrigger",Ii=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...s}=e,i=ao(Mi,n),a=Pi(n),l=Di(i.baseId,o),u=Li(i.baseId,o),d=o===i.value;return m.jsx(Xr,{asChild:!0,...a,focusable:!r,active:d,children:m.jsx(O.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:t,onMouseDown:R(e.onMouseDown,f=>{!r&&f.button===0&&f.ctrlKey===!1?i.onValueChange(o):f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(o)}),onFocus:R(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!r&&f&&i.onValueChange(o)})})})});Ii.displayName=Mi;var Oi="TabsContent",Ni=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:s,...i}=e,a=ao(Oi,n),l=Di(a.baseId,o),u=Li(a.baseId,o),d=o===a.value,f=c.useRef(d);return c.useEffect(()=>{const v=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(v)},[]),m.jsx(fe,{present:r||d,children:({present:v})=>m.jsx(O.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!v,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:v&&s})})});Ni.displayName=Oi;function Di(e,t){return`${e}-trigger-${t}`}function Li(e,t){return`${e}-content-${t}`}var rp=Ti,sp=_i,ip=Ii,ap=Ni;export{Gf as $,Of as A,rf as B,df as C,yf as D,Sf as E,Ef as F,Nf as G,Ff as H,Af as I,$f as J,Bf as K,Tf as L,Wf as M,kf as N,gf as O,O as P,sp as Q,of as R,nf as S,uf as T,ip as U,Ho as V,ap as W,rp as X,Id as Y,Ac as Z,Hf as _,de as a,Uf as a0,Kf as a1,ep as a2,tp as a3,zf as a4,Yf as a5,Xf as a6,qf as a7,Zf as a8,Jf as a9,Qf as aa,np as ab,it as ac,No as ad,ce as b,Nt as c,fe as d,ae as e,R as f,Dt as g,q as h,Fo as i,m as j,cf as k,lf as l,wf as m,Cf as n,xf as o,hf as p,mf as q,vf as r,Df as s,Lf as t,B as u,Rf as v,Pf as w,_f as x,If as y,Mf as z};