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