@meridianjs/admin-dashboard 0.1.38 → 0.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{r as s,a as at,R as Wn,b as Js,c as Ne}from"./vendor-react-aoclG454.js";import{j as m}from"./vendor-query-DtBTlSlq.js";function P(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function pr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function X(...e){return t=>{let n=!1;const r=e.map(o=>{const i=pr(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():pr(e[o],null)}}}}function $(...e){return s.useCallback(X(...e),e)}function ec(e,t=[]){let n=[];function r(i,a){const c=s.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:h,...g}=f,v=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=s.useMemo(()=>g,Object.values(g));return m.jsx(v.Provider,{value:y,children:h})};u.displayName=i+"Provider";function d(f,p){var v;const h=((v=p==null?void 0:p[e])==null?void 0:v[l])||c,g=s.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(a=>s.createContext(a));return function(c){const l=(c==null?void 0:c[e])||i;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,tc(o,...t)]}function tc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...c,...f}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function nc(e){const t=rc(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(ic);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function rc(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=cc(o),c=sc(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var oc=Symbol("radix.slottable");function ic(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oc}function sc(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function cc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ac=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Br=ac.reduce((e,t)=>{const n=nc(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function lc(e,t){e&&at.flushSync(()=>e.dispatchEvent(t))}function Z(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function uc(e,t=globalThis==null?void 0:globalThis.document){const n=Z(e);s.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var fc="DismissableLayer",Pn="dismissableLayer.update",dc="dismissableLayer.pointerDownOutside",pc="dismissableLayer.focusOutside",mr,Hr=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xe=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:c,...l}=e,u=s.useContext(Hr),[d,f]=s.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=s.useState({}),g=$(t,b=>f(b)),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(y),w=d?v.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,C=w>=x,E=hc(b=>{const A=b.target,T=[...u.branches].some(O=>O.contains(A));!C||T||(o==null||o(b),a==null||a(b),b.defaultPrevented||c==null||c())},p),R=gc(b=>{const A=b.target;[...u.branches].some(O=>O.contains(A))||(i==null||i(b),a==null||a(b),b.defaultPrevented||c==null||c())},p);return uc(b=>{w===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&c&&(b.preventDefault(),c()))},p),s.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(mr=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),vr(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=mr)}},[d,p,n,u]),s.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),vr())},[d,u]),s.useEffect(()=>{const b=()=>h({});return document.addEventListener(Pn,b),()=>document.removeEventListener(Pn,b)},[]),m.jsx(Br.div,{...l,ref:g,style:{pointerEvents:S?C?"auto":"none":void 0,...e.style},onFocusCapture:P(e.onFocusCapture,R.onFocusCapture),onBlurCapture:P(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:P(e.onPointerDownCapture,E.onPointerDownCapture)})});Xe.displayName=fc;var mc="DismissableLayerBranch",vc=s.forwardRef((e,t)=>{const n=s.useContext(Hr),r=s.useRef(null),o=$(t,r);return s.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),m.jsx(Br.div,{...e,ref:o})});vc.displayName=mc;function hc(e,t=globalThis==null?void 0:globalThis.document){const n=Z(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let l=function(){Ur(dc,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function gc(e,t=globalThis==null?void 0:globalThis.document){const n=Z(e),r=s.useRef(!1);return s.useEffect(()=>{const o=i=>{i.target&&!r.current&&Ur(pc,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function vr(){const e=new CustomEvent(Pn);document.dispatchEvent(e)}function Ur(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?lc(o,i):o.dispatchEvent(i)}var Y=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},yc=Wn[" useId ".trim().toString()]||(()=>{}),xc=0;function le(e){const[t,n]=s.useState(yc());return Y(()=>{n(r=>r??String(xc++))},[e]),t?`radix-${t}`:""}const wc=["top","right","bottom","left"],Pe=Math.min,ne=Math.max,It=Math.round,bt=Math.floor,he=e=>({x:e,y:e}),Sc={left:"right",right:"left",bottom:"top",top:"bottom"},Cc={start:"end",end:"start"};function Rn(e,t,n){return ne(e,Pe(t,n))}function Ce(e,t){return typeof e=="function"?e(t):e}function be(e){return e.split("-")[0]}function Ze(e){return e.split("-")[1]}function Vn(e){return e==="x"?"y":"x"}function Bn(e){return e==="y"?"height":"width"}const bc=new Set(["top","bottom"]);function ve(e){return bc.has(be(e))?"y":"x"}function Hn(e){return Vn(ve(e))}function Ec(e,t,n){n===void 0&&(n=!1);const r=Ze(e),o=Hn(e),i=Bn(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Mt(a)),[a,Mt(a)]}function Pc(e){const t=Mt(e);return[_n(e),t,_n(t)]}function _n(e){return e.replace(/start|end/g,t=>Cc[t])}const hr=["left","right"],gr=["right","left"],Rc=["top","bottom"],_c=["bottom","top"];function Ac(e,t,n){switch(e){case"top":case"bottom":return n?t?gr:hr:t?hr:gr;case"left":case"right":return t?Rc:_c;default:return[]}}function Tc(e,t,n,r){const o=Ze(e);let i=Ac(be(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(_n)))),i}function Mt(e){return e.replace(/left|right|bottom|top/g,t=>Sc[t])}function Oc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kr(e){return typeof e!="number"?Oc(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function yr(e,t,n){let{reference:r,floating:o}=e;const i=ve(t),a=Hn(t),c=Bn(a),l=be(t),u=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[c]/2-o[c]/2;let h;switch(l){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Ze(t)){case"start":h[a]-=p*(n&&u?-1:1);break;case"end":h[a]+=p*(n&&u?-1:1);break}return h}async function Nc(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=Ce(t,e),g=Kr(h),y=c[p?f==="floating"?"reference":"floating":f],x=Dt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),w=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),C=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},E=Dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:S,strategy:l}):w);return{top:(x.top-E.top+g.top)/C.y,bottom:(E.bottom-x.bottom+g.bottom)/C.y,left:(x.left-E.left+g.left)/C.x,right:(E.right-x.right+g.right)/C.x}}const Ic=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=yr(u,r,l),p=r,h={},g=0;for(let y=0;y<c.length;y++){var v;const{name:x,fn:w}=c[y],{x:S,y:C,data:E,reset:R}=await w({x:d,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:{...a,detectOverflow:(v=a.detectOverflow)!=null?v:Nc},elements:{reference:e,floating:t}});d=S??d,f=C??f,h={...h,[x]:{...h[x],...E}},R&&g<=50&&(g++,typeof R=="object"&&(R.placement&&(p=R.placement),R.rects&&(u=R.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:f}=yr(u,p,l)),y=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:h}},Mc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=Ce(e,t)||{};if(u==null)return{};const f=Kr(d),p={x:n,y:r},h=Hn(o),g=Bn(h),v=await a.getDimensions(u),y=h==="y",x=y?"top":"left",w=y?"bottom":"right",S=y?"clientHeight":"clientWidth",C=i.reference[g]+i.reference[h]-p[h]-i.floating[g],E=p[h]-i.reference[h],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let b=R?R[S]:0;(!b||!await(a.isElement==null?void 0:a.isElement(R)))&&(b=c.floating[S]||i.floating[g]);const A=C/2-E/2,T=b/2-v[g]/2-1,O=Pe(f[x],T),D=Pe(f[w],T),L=O,F=b-v[g]-D,j=b/2-v[g]/2+A,U=Rn(L,j,F),M=!l.arrow&&Ze(o)!=null&&j!==U&&i.reference[g]/2-(j<L?O:D)-v[g]/2<0,k=M?j<L?j-L:j-F:0;return{[h]:p[h]+k,data:{[h]:U,centerOffset:j-U-k,...M&&{alignmentOffset:k}},reset:M}}}),Dc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...y}=Ce(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=be(o),w=ve(c),S=be(c)===c,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=p||(S||!v?[Mt(c)]:Pc(c)),R=g!=="none";!p&&R&&E.push(...Tc(c,v,g,C));const b=[c,...E],A=await l.detectOverflow(t,y),T=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&T.push(A[x]),f){const j=Ec(o,a,C);T.push(A[j[0]],A[j[1]])}if(O=[...O,{placement:o,overflows:T}],!T.every(j=>j<=0)){var D,L;const j=(((D=i.flip)==null?void 0:D.index)||0)+1,U=b[j];if(U&&(!(f==="alignment"?w!==ve(U):!1)||O.every(N=>ve(N.placement)===w?N.overflows[0]>0:!0)))return{data:{index:j,overflows:O},reset:{placement:U}};let M=(L=O.filter(k=>k.overflows[0]<=0).sort((k,N)=>k.overflows[1]-N.overflows[1])[0])==null?void 0:L.placement;if(!M)switch(h){case"bestFit":{var F;const k=(F=O.filter(N=>{if(R){const _=ve(N.placement);return _===w||_==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(_=>_>0).reduce((_,K)=>_+K,0)]).sort((N,_)=>N[1]-_[1])[0])==null?void 0:F[0];k&&(M=k);break}case"initialPlacement":M=c;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function xr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wr(e){return wc.some(t=>e[t]>=0)}const $c=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Ce(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...i,elementContext:"reference"}),c=xr(a,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:wr(c)}}}case"escaped":{const a=await r.detectOverflow(t,{...i,altBoundary:!0}),c=xr(a,n.floating);return{data:{escapedOffsets:c,escaped:wr(c)}}}default:return{}}}}},Gr=new Set(["left","top"]);async function jc(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=be(n),c=Ze(n),l=ve(n)==="y",u=Gr.has(a)?-1:1,d=i&&l?-1:1,f=Ce(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 c&&typeof g=="number"&&(h=c==="end"?g*-1:g),l?{x:h*d,y:p*u}:{x:p*u,y:h*d}}const Lc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:c}=t,l=await jc(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Fc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:w,y:S}=x;return{x:w,y:S}}},...u}=Ce(e,t),d={x:n,y:r},f=await i.detectOverflow(t,u),p=ve(be(o)),h=Vn(p);let g=d[h],v=d[p];if(a){const x=h==="y"?"top":"left",w=h==="y"?"bottom":"right",S=g+f[x],C=g-f[w];g=Rn(S,g,C)}if(c){const x=p==="y"?"top":"left",w=p==="y"?"bottom":"right",S=v+f[x],C=v-f[w];v=Rn(S,v,C)}const y=l.fn({...t,[h]:g,[p]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:a,[p]:c}}}}}},kc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Ce(e,t),d={x:n,y:r},f=ve(o),p=Vn(f);let h=d[p],g=d[f];const v=Ce(c,t),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const S=p==="y"?"height":"width",C=i.reference[p]-i.floating[S]+y.mainAxis,E=i.reference[p]+i.reference[S]-y.mainAxis;h<C?h=C:h>E&&(h=E)}if(u){var x,w;const S=p==="y"?"width":"height",C=Gr.has(be(o)),E=i.reference[f]-i.floating[S]+(C&&((x=a.offset)==null?void 0:x[f])||0)+(C?0:y.crossAxis),R=i.reference[f]+i.reference[S]+(C?0:((w=a.offset)==null?void 0:w[f])||0)-(C?y.crossAxis:0);g<E?g=E:g>R&&(g=R)}return{[p]:h,[f]:g}}}},Wc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:c}=t,{apply:l=()=>{},...u}=Ce(e,t),d=await a.detectOverflow(t,u),f=be(o),p=Ze(o),h=ve(o)==="y",{width:g,height:v}=i.floating;let y,x;f==="top"||f==="bottom"?(y=f,x=p===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,y=p==="end"?"top":"bottom");const w=v-d.top-d.bottom,S=g-d.left-d.right,C=Pe(v-d[y],w),E=Pe(g-d[x],S),R=!t.middlewareData.shift;let b=C,A=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(b=w),R&&!p){const O=ne(d.left,0),D=ne(d.right,0),L=ne(d.top,0),F=ne(d.bottom,0);h?A=g-2*(O!==0||D!==0?O+D:ne(d.left,d.right)):b=v-2*(L!==0||F!==0?L+F:ne(d.top,d.bottom))}await l({...t,availableWidth:A,availableHeight:b});const T=await a.getDimensions(c.floating);return g!==T.width||v!==T.height?{reset:{rects:!0}}:{}}}};function Ht(){return typeof window<"u"}function qe(e){return zr(e)?(e.nodeName||"").toLowerCase():"#document"}function re(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(zr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zr(e){return Ht()?e instanceof Node||e instanceof re(e).Node:!1}function ue(e){return Ht()?e instanceof Element||e instanceof re(e).Element:!1}function ge(e){return Ht()?e instanceof HTMLElement||e instanceof re(e).HTMLElement:!1}function Sr(e){return!Ht()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof re(e).ShadowRoot}const Vc=new Set(["inline","contents"]);function lt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Vc.has(o)}const Bc=new Set(["table","td","th"]);function Hc(e){return Bc.has(qe(e))}const Uc=[":popover-open",":modal"];function Ut(e){return Uc.some(t=>{try{return e.matches(t)}catch{return!1}})}const Kc=["transform","translate","scale","rotate","perspective"],Gc=["transform","translate","scale","rotate","perspective","filter"],zc=["paint","layout","strict","content"];function Un(e){const t=Kn(),n=ue(e)?fe(e):e;return Kc.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Gc.some(r=>(n.willChange||"").includes(r))||zc.some(r=>(n.contain||"").includes(r))}function Yc(e){let t=Re(e);for(;ge(t)&&!Ue(t);){if(Un(t))return t;if(Ut(t))return null;t=Re(t)}return null}function Kn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Xc=new Set(["html","body","#document"]);function Ue(e){return Xc.has(qe(e))}function fe(e){return re(e).getComputedStyle(e)}function Kt(e){return ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Re(e){if(qe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Sr(e)&&e.host||ye(e);return Sr(t)?t.host:t}function Yr(e){const t=Re(e);return Ue(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&lt(t)?t:Yr(t)}function ot(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Yr(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=re(o);if(i){const c=An(a);return t.concat(a,a.visualViewport||[],lt(o)?o:[],c&&n?ot(c):[])}return t.concat(o,ot(o,[],n))}function An(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xr(e){const t=fe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ge(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=It(n)!==i||It(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function Gn(e){return ue(e)?e:e.contextElement}function Be(e){const t=Gn(e);if(!ge(t))return he(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Xr(t);let a=(i?It(n.width):n.width)/r,c=(i?It(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const Zc=he(0);function Zr(e){const t=re(e);return!Kn()||!t.visualViewport?Zc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qc(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==re(e)?!1:t}function Ie(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Gn(e);let a=he(1);t&&(r?ue(r)&&(a=Be(r)):a=Be(e));const c=qc(i,n,r)?Zr(i):he(0);let l=(o.left+c.x)/a.x,u=(o.top+c.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(i){const p=re(i),h=r&&ue(r)?re(r):r;let g=p,v=An(g);for(;v&&r&&h!==g;){const y=Be(v),x=v.getBoundingClientRect(),w=fe(v),S=x.left+(v.clientLeft+parseFloat(w.paddingLeft))*y.x,C=x.top+(v.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,u*=y.y,d*=y.x,f*=y.y,l+=S,u+=C,g=re(v),v=An(g)}}return Dt({width:d,height:f,x:l,y:u})}function Gt(e,t){const n=Kt(e).scrollLeft;return t?t.left+n:Ie(ye(e)).left+n}function qr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Gt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Qc(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=ye(r),c=t?Ut(t.floating):!1;if(r===a||c&&i)return n;let l={scrollLeft:0,scrollTop:0},u=he(1);const d=he(0),f=ge(r);if((f||!f&&!i)&&((qe(r)!=="body"||lt(a))&&(l=Kt(r)),ge(r))){const h=Ie(r);u=Be(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const p=a&&!f&&!i?qr(a,l):he(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 Jc(e){return Array.from(e.getClientRects())}function ea(e){const t=ye(e),n=Kt(e),r=e.ownerDocument.body,o=ne(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ne(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Gt(e);const c=-n.scrollTop;return fe(r).direction==="rtl"&&(a+=ne(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:c}}const Cr=25;function ta(e,t){const n=re(e),r=ye(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,l=0;if(o){i=o.width,a=o.height;const d=Kn();(!d||d&&t==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}const u=Gt(r);if(u<=0){const d=r.ownerDocument,f=d.body,p=getComputedStyle(f),h=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-h);g<=Cr&&(i-=g)}else u<=Cr&&(i+=u);return{width:i,height:a,x:c,y:l}}const na=new Set(["absolute","fixed"]);function ra(e,t){const n=Ie(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ge(e)?Be(e):he(1),a=e.clientWidth*i.x,c=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:a,height:c,x:l,y:u}}function br(e,t,n){let r;if(t==="viewport")r=ta(e,n);else if(t==="document")r=ea(ye(e));else if(ue(t))r=ra(t,n);else{const o=Zr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Dt(r)}function Qr(e,t){const n=Re(e);return n===t||!ue(n)||Ue(n)?!1:fe(n).position==="fixed"||Qr(n,t)}function oa(e,t){const n=t.get(e);if(n)return n;let r=ot(e,[],!1).filter(c=>ue(c)&&qe(c)!=="body"),o=null;const i=fe(e).position==="fixed";let a=i?Re(e):e;for(;ue(a)&&!Ue(a);){const c=fe(a),l=Un(a);!l&&c.position==="fixed"&&(o=null),(i?!l&&!o:!l&&c.position==="static"&&!!o&&na.has(o.position)||lt(a)&&!l&&Qr(e,a))?r=r.filter(d=>d!==a):o=c,a=Re(a)}return t.set(e,r),r}function ia(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ut(t)?[]:oa(t,this._c):[].concat(n),r],c=a[0],l=a.reduce((u,d)=>{const f=br(t,d,o);return u.top=ne(f.top,u.top),u.right=Pe(f.right,u.right),u.bottom=Pe(f.bottom,u.bottom),u.left=ne(f.left,u.left),u},br(t,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function sa(e){const{width:t,height:n}=Xr(e);return{width:t,height:n}}function ca(e,t,n){const r=ge(t),o=ye(t),i=n==="fixed",a=Ie(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=he(0);function u(){l.x=Gt(o)}if(r||!r&&!i)if((qe(t)!=="body"||lt(o))&&(c=Kt(t)),r){const h=Ie(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&u();i&&!r&&o&&u();const d=o&&!r&&!i?qr(o,c):he(0),f=a.left+c.scrollLeft-l.x-d.x,p=a.top+c.scrollTop-l.y-d.y;return{x:f,y:p,width:a.width,height:a.height}}function mn(e){return fe(e).position==="static"}function Er(e,t){if(!ge(e)||fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ye(e)===n&&(n=n.ownerDocument.body),n}function Jr(e,t){const n=re(e);if(Ut(e))return n;if(!ge(e)){let o=Re(e);for(;o&&!Ue(o);){if(ue(o)&&!mn(o))return o;o=Re(o)}return n}let r=Er(e,t);for(;r&&Hc(r)&&mn(r);)r=Er(r,t);return r&&Ue(r)&&mn(r)&&!Un(r)?n:r||Yc(e)||n}const aa=async function(e){const t=this.getOffsetParent||Jr,n=this.getDimensions,r=await n(e.floating);return{reference:ca(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function la(e){return fe(e).direction==="rtl"}const ua={convertOffsetParentRelativeRectToViewportRelativeRect:Qc,getDocumentElement:ye,getClippingRect:ia,getOffsetParent:Jr,getElementRects:aa,getClientRects:Jc,getDimensions:sa,getScale:Be,isElement:ue,isRTL:la};function eo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fa(e,t){let n=null,r;const o=ye(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:f,width:p,height:h}=u;if(c||t(),!p||!h)return;const g=bt(f),v=bt(o.clientWidth-(d+p)),y=bt(o.clientHeight-(f+h)),x=bt(d),S={rootMargin:-g+"px "+-v+"px "+-y+"px "+-x+"px",threshold:ne(0,Pe(1,l))||1};let C=!0;function E(R){const b=R[0].intersectionRatio;if(b!==l){if(!C)return a();b?a(!1,b):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b===1&&!eo(u,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(E,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return a(!0),i}function da(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Gn(e),d=o||i?[...u?ot(u):[],...ot(t)]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=u&&c?fa(u,n):null;let p=-1,h=null;a&&(h=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let g,v=l?Ie(e):null;l&&y();function y(){const x=Ie(e);v&&!eo(v,x)&&n(),v=x,g=requestAnimationFrame(y)}return n(),()=>{var x;d.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),f==null||f(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const pa=Lc,ma=Fc,va=Dc,ha=Wc,ga=$c,Pr=Mc,ya=kc,xa=(e,t,n)=>{const r=new Map,o={platform:ua,...n},i={...o.platform,_c:r};return Ic(e,t,{...o,platform:i})};var wa=typeof document<"u",Sa=function(){},Tt=wa?s.useLayoutEffect:Sa;function $t(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$t(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!$t(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function to(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rr(e,t){const n=to(e);return Math.round(t*n)/n}function vn(e){const t=s.useRef(e);return Tt(()=>{t.current=e}),t}function Ca(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=s.useState(r);$t(p,r)||h(r);const[g,v]=s.useState(null),[y,x]=s.useState(null),w=s.useCallback(N=>{N!==R.current&&(R.current=N,v(N))},[]),S=s.useCallback(N=>{N!==b.current&&(b.current=N,x(N))},[]),C=i||g,E=a||y,R=s.useRef(null),b=s.useRef(null),A=s.useRef(d),T=l!=null,O=vn(l),D=vn(o),L=vn(u),F=s.useCallback(()=>{if(!R.current||!b.current)return;const N={placement:t,strategy:n,middleware:p};D.current&&(N.platform=D.current),xa(R.current,b.current,N).then(_=>{const K={..._,isPositioned:L.current!==!1};j.current&&!$t(A.current,K)&&(A.current=K,at.flushSync(()=>{f(K)}))})},[p,t,n,D,L]);Tt(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[u]);const j=s.useRef(!1);Tt(()=>(j.current=!0,()=>{j.current=!1}),[]),Tt(()=>{if(C&&(R.current=C),E&&(b.current=E),C&&E){if(O.current)return O.current(C,E,F);F()}},[C,E,F,O,T]);const U=s.useMemo(()=>({reference:R,floating:b,setReference:w,setFloating:S}),[w,S]),M=s.useMemo(()=>({reference:C,floating:E}),[C,E]),k=s.useMemo(()=>{const N={position:n,left:0,top:0};if(!M.floating)return N;const _=Rr(M.floating,d.x),K=Rr(M.floating,d.y);return c?{...N,transform:"translate("+_+"px, "+K+"px)",...to(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:K}},[n,c,M.floating,d.x,d.y]);return s.useMemo(()=>({...d,update:F,refs:U,elements:M,floatingStyles:k}),[d,F,U,M,k])}const ba=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Pr({element:r.current,padding:o}).fn(n):{}:r?Pr({element:r,padding:o}).fn(n):{}}}},Ea=(e,t)=>({...pa(e),options:[e,t]}),Pa=(e,t)=>({...ma(e),options:[e,t]}),Ra=(e,t)=>({...ya(e),options:[e,t]}),_a=(e,t)=>({...va(e),options:[e,t]}),Aa=(e,t)=>({...ha(e),options:[e,t]}),Ta=(e,t)=>({...ga(e),options:[e,t]}),Oa=(e,t)=>({...ba(e),options:[e,t]});function Na(e){const t=Ia(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(Da);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Ia(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=ja(o),c=$a(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ma=Symbol("radix.slottable");function Da(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ma}function $a(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ja(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var La=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fa=La.reduce((e,t)=>{const n=Na(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ka="Arrow",no=s.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return m.jsx(Fa.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});no.displayName=ka;var Wa=no;function Va(e,t=[]){let n=[];function r(i,a){const c=s.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:h,...g}=f,v=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=s.useMemo(()=>g,Object.values(g));return m.jsx(v.Provider,{value:y,children:h})};u.displayName=i+"Provider";function d(f,p){var v;const h=((v=p==null?void 0:p[e])==null?void 0:v[l])||c,g=s.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(a=>s.createContext(a));return function(c){const l=(c==null?void 0:c[e])||i;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,Ba(o,...t)]}function Ba(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...c,...f}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ha(e){const t=Ua(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(Ga);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Ua(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=Ya(o),c=za(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ka=Symbol("radix.slottable");function Ga(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ka}function za(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ya(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xa=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ro=Xa.reduce((e,t)=>{const n=Ha(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Za(e){const[t,n]=s.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,c;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var zn="Popper",[oo,_e]=Va(zn),[qa,io]=oo(zn),so=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return m.jsx(qa,{scope:t,anchor:r,onAnchorChange:o,children:n})};so.displayName=zn;var co="PopperAnchor",ao=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=io(co,n),a=s.useRef(null),c=$(t,a),l=s.useRef(null);return s.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||a.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:m.jsx(ro.div,{...o,ref:c})});ao.displayName=co;var Yn="PopperContent",[Qa,Ja]=oo(Yn),lo=s.forwardRef((e,t)=>{var I,V,G,W,B,H;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:g,...v}=e,y=io(Yn,n),[x,w]=s.useState(null),S=$(t,te=>w(te)),[C,E]=s.useState(null),R=Za(C),b=(R==null?void 0:R.width)??0,A=(R==null?void 0:R.height)??0,T=r+(i!=="center"?"-"+i:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(u)?u:[u],L=D.length>0,F={padding:O,boundary:D.filter(tl),altBoundary:L},{refs:j,floatingStyles:U,placement:M,isPositioned:k,middlewareData:N}=Ca({strategy:"fixed",placement:T,whileElementsMounted:(...te)=>da(...te,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[Ea({mainAxis:o+A,alignmentAxis:a}),l&&Pa({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Ra():void 0,...F}),l&&_a({...F}),Aa({...F,apply:({elements:te,rects:pe,availableWidth:Je,availableHeight:et})=>{const{width:tt,height:Qs}=pe.reference,Ct=te.floating.style;Ct.setProperty("--radix-popper-available-width",`${Je}px`),Ct.setProperty("--radix-popper-available-height",`${et}px`),Ct.setProperty("--radix-popper-anchor-width",`${tt}px`),Ct.setProperty("--radix-popper-anchor-height",`${Qs}px`)}}),C&&Oa({element:C,padding:c}),nl({arrowWidth:b,arrowHeight:A}),p&&Ta({strategy:"referenceHidden",...F})]}),[_,K]=po(M),z=Z(g);Y(()=>{k&&(z==null||z())},[k,z]);const J=(I=N.arrow)==null?void 0:I.x,we=(V=N.arrow)==null?void 0:V.y,ie=((G=N.arrow)==null?void 0:G.centerOffset)!==0,[Se,ee]=s.useState();return Y(()=>{x&&ee(window.getComputedStyle(x).zIndex)},[x]),m.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:k?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(W=N.transformOrigin)==null?void 0:W.x,(B=N.transformOrigin)==null?void 0:B.y].join(" "),...((H=N.hide)==null?void 0:H.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Qa,{scope:n,placedSide:_,onArrowChange:E,arrowX:J,arrowY:we,shouldHideArrow:ie,children:m.jsx(ro.div,{"data-side":_,"data-align":K,...v,ref:S,style:{...v.style,animation:k?void 0:"none"}})})})});lo.displayName=Yn;var uo="PopperArrow",el={top:"bottom",right:"left",bottom:"top",left:"right"},fo=s.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Ja(uo,r),a=el[i.placedSide];return m.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:m.jsx(Wa,{...o,ref:n,style:{...o.style,display:"block"}})})});fo.displayName=uo;function tl(e){return e!==null}var nl=e=>({name:"transformOrigin",options:e,fn(t){var y,x,w;const{placement:n,rects:r,middlewareData:o}=t,a=((y=o.arrow)==null?void 0:y.centerOffset)!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,d]=po(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((x=o.arrow)==null?void 0:x.x)??0)+c/2,h=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let g="",v="";return u==="bottom"?(g=a?f:`${p}px`,v=`${-l}px`):u==="top"?(g=a?f:`${p}px`,v=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,v=a?f:`${h}px`):u==="left"&&(g=`${r.floating.width+l}px`,v=a?f:`${h}px`),{data:{x:g,y:v}}}});function po(e){const[t,n="center"]=e.split("-");return[t,n]}var zt=so,ut=ao,Yt=lo,Xt=fo;function rl(e){const t=ol(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(sl);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function ol(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=al(o),c=cl(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var il=Symbol("radix.slottable");function sl(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===il}function cl(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function al(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ll=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ul=ll.reduce((e,t)=>{const n=rl(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),fl="Portal",ft=s.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,i]=s.useState(!1);Y(()=>i(!0),[]);const a=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?Js.createPortal(m.jsx(ul.div,{...r,ref:t}),a):null});ft.displayName=fl;function dl(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var q=e=>{const{present:t,children:n}=e,r=pl(t),o=typeof n=="function"?n({present:r.isPresent}):s.Children.only(n),i=$(r.ref,ml(o));return typeof n=="function"||r.isPresent?s.cloneElement(o,{ref:i}):null};q.displayName="Presence";function pl(e){const[t,n]=s.useState(),r=s.useRef(null),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[c,l]=dl(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const u=Et(r.current);i.current=c==="mounted"?u:"none"},[c]),Y(()=>{const u=r.current,d=o.current;if(d!==e){const p=i.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"),o.current=e}},[e,l]),Y(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=h=>{const v=Et(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&v&&(l("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=h=>{h.target===t&&(i.current=Et(r.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(c),ref:s.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Et(e){return(e==null?void 0:e.animationName)||"none"}function ml(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function vl(e){const t=hl(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(yl);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function hl(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=wl(o),c=xl(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mo=Symbol("radix.slottable");function gl(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=mo,t}function yl(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mo}function xl(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function wl(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Cl=Sl.reduce((e,t)=>{const n=vl(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),bl=Wn[" useInsertionEffect ".trim().toString()]||Y;function Me({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=El({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:o;{const d=s.useRef(e!==void 0);s.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${c?"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=c},[c,r])}const u=s.useCallback(d=>{var f;if(c){const p=Pl(d)?d(e):d;p!==e&&((f=a.current)==null||f.call(a,p))}else i(d)},[c,e,i,a]);return[l,u]}function El({defaultProp:e,onChange:t}){const[n,r]=s.useState(e),o=s.useRef(n),i=s.useRef(t);return bl(()=>{i.current=t},[t]),s.useEffect(()=>{var a;o.current!==n&&((a=i.current)==null||a.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Pl(e){return typeof e=="function"}function Rl(e){const t=_l(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(Tl);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function _l(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=Nl(o),c=Ol(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Al=Symbol("radix.slottable");function Tl(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Al}function Ol(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Nl(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Il=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ml=Il.reduce((e,t)=>{const n=Rl(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),vo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Dl="VisuallyHidden",ho=s.forwardRef((e,t)=>m.jsx(Ml.span,{...e,ref:t,style:{...vo,...e.style}}));ho.displayName=Dl;var $l=ho,[Zt]=ec("Tooltip",[_e]),qt=_e(),go="TooltipProvider",jl=700,Tn="tooltip.open",[Ll,Xn]=Zt(go),yo=e=>{const{__scopeTooltip:t,delayDuration:n=jl,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,a=s.useRef(!0),c=s.useRef(!1),l=s.useRef(0);return s.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),m.jsx(Ll,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(u=>{c.current=u},[]),disableHoverableContent:o,children:i})};yo.displayName=go;var it="Tooltip",[Fl,Qt]=Zt(it),xo=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:c}=e,l=Xn(it,e.__scopeTooltip),u=qt(t),[d,f]=s.useState(null),p=le(),h=s.useRef(0),g=a??l.disableHoverableContent,v=c??l.delayDuration,y=s.useRef(!1),[x,w]=Me({prop:r,defaultProp:o??!1,onChange:b=>{b?(l.onOpen(),document.dispatchEvent(new CustomEvent(Tn))):l.onClose(),i==null||i(b)},caller:it}),S=s.useMemo(()=>x?y.current?"delayed-open":"instant-open":"closed",[x]),C=s.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,w(!0)},[w]),E=s.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),R=s.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,w(!0),h.current=0},v)},[v,w]);return s.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),m.jsx(zt,{...u,children:m.jsx(Fl,{scope:t,contentId:p,open:x,stateAttribute:S,trigger:d,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{l.isOpenDelayedRef.current?R():C()},[l.isOpenDelayedRef,R,C]),onTriggerLeave:s.useCallback(()=>{g?E():(window.clearTimeout(h.current),h.current=0)},[E,g]),onOpen:C,onClose:E,disableHoverableContent:g,children:n})})};xo.displayName=it;var On="TooltipTrigger",wo=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Qt(On,n),i=Xn(On,n),a=qt(n),c=s.useRef(null),l=$(t,c,o.onTriggerChange),u=s.useRef(!1),d=s.useRef(!1),f=s.useCallback(()=>u.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),m.jsx(ut,{asChild:!0,...a,children:m.jsx(Cl.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:P(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:P(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:P(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:P(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:P(e.onBlur,o.onClose),onClick:P(e.onClick,o.onClose)})})});wo.displayName=On;var kl="TooltipPortal",[uv,Wl]=Zt(kl,{forceMount:void 0}),Ke="TooltipContent",So=s.forwardRef((e,t)=>{const n=Wl(Ke,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Qt(Ke,e.__scopeTooltip);return m.jsx(q,{present:r||a.open,children:a.disableHoverableContent?m.jsx(Co,{side:o,...i,ref:t}):m.jsx(Vl,{side:o,...i,ref:t})})}),Vl=s.forwardRef((e,t)=>{const n=Qt(Ke,e.__scopeTooltip),r=Xn(Ke,e.__scopeTooltip),o=s.useRef(null),i=$(t,o),[a,c]=s.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,p=s.useCallback(()=>{c(null),f(!1)},[f]),h=s.useCallback((g,v)=>{const y=g.currentTarget,x={x:g.clientX,y:g.clientY},w=Gl(x,y.getBoundingClientRect()),S=zl(x,w),C=Yl(v.getBoundingClientRect()),E=Zl([...S,...C]);c(E),f(!0)},[f]);return s.useEffect(()=>()=>p(),[p]),s.useEffect(()=>{if(l&&d){const g=y=>h(y,d),v=y=>h(y,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",v)}}},[l,d,h,p]),s.useEffect(()=>{if(a){const g=v=>{const y=v.target,x={x:v.clientX,y:v.clientY},w=(l==null?void 0:l.contains(y))||(d==null?void 0:d.contains(y)),S=!Xl(x,a);w?p():S&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,a,u,p]),m.jsx(Co,{...e,ref:i})}),[Bl,Hl]=Zt(it,{isInside:!1}),Ul=gl("TooltipContent"),Co=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...c}=e,l=Qt(Ke,n),u=qt(n),{onClose:d}=l;return s.useEffect(()=>(document.addEventListener(Tn,d),()=>document.removeEventListener(Tn,d)),[d]),s.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]),m.jsx(Xe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:m.jsxs(Yt,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(Ul,{children:r}),m.jsx(Bl,{scope:n,isInside:!0,children:m.jsx($l,{id:l.contentId,role:"tooltip",children:o||r})})]})})});So.displayName=Ke;var bo="TooltipArrow",Kl=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=qt(n);return Hl(bo,n).isInside?null:m.jsx(Xt,{...o,...r,ref:t})});Kl.displayName=bo;function Gl(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function zl(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Yl(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Xl(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const c=t[i],l=t[a],u=c.x,d=c.y,f=l.x,p=l.y;d>r!=p>r&&n<(f-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function Zl(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ql(t)}function ql(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var fv=yo,dv=xo,pv=wo,mv=So,Ql=Symbol.for("react.lazy"),jt=Wn[" use ".trim().toString()];function Jl(e){return typeof e=="object"&&e!==null&&"then"in e}function Eo(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Ql&&"_payload"in e&&Jl(e._payload)}function Po(e){const t=eu(e),n=s.forwardRef((r,o)=>{let{children:i,...a}=r;Eo(i)&&typeof jt=="function"&&(i=jt(i._payload));const c=s.Children.toArray(i),l=c.find(nu);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var vv=Po("Slot");function eu(e){const t=s.forwardRef((n,r)=>{let{children:o,...i}=n;if(Eo(o)&&typeof jt=="function"&&(o=jt(o._payload)),s.isValidElement(o)){const a=ou(o),c=ru(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tu=Symbol("radix.slottable");function nu(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tu}function ru(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ou(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var iu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dt=iu.reduce((e,t)=>{const n=Po(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),su="Separator",_r="horizontal",cu=["horizontal","vertical"],Ro=s.forwardRef((e,t)=>{const{decorative:n,orientation:r=_r,...o}=e,i=au(r)?r:_r,c=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return m.jsx(dt.div,{"data-orientation":i,...c,...o,ref:t})});Ro.displayName=su;function au(e){return cu.includes(e)}var hv=Ro;function lu(e,t){const n=s.createContext(t),r=i=>{const{children:a,...c}=i,l=s.useMemo(()=>c,Object.values(c));return m.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(i){const a=s.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function uu(e,t=[]){let n=[];function r(i,a){const c=s.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:h,...g}=f,v=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=s.useMemo(()=>g,Object.values(g));return m.jsx(v.Provider,{value:y,children:h})};u.displayName=i+"Provider";function d(f,p){var v;const h=((v=p==null?void 0:p[e])==null?void 0:v[l])||c,g=s.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(a=>s.createContext(a));return function(c){const l=(c==null?void 0:c[e])||i;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,fu(o,...t)]}function fu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...c,...f}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function du(e){const t=pu(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(vu);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function pu(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=gu(o),c=hu(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mu=Symbol("radix.slottable");function vu(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mu}function hu(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function gu(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xu=yu.reduce((e,t)=>{const n=du(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),hn="focusScope.autoFocusOnMount",gn="focusScope.autoFocusOnUnmount",Ar={bubbles:!1,cancelable:!0},wu="FocusScope",pt=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[c,l]=s.useState(null),u=Z(o),d=Z(i),f=s.useRef(null),p=$(t,v=>l(v)),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let v=function(S){if(h.paused||!c)return;const C=S.target;c.contains(C)?f.current=C:Ee(f.current,{select:!0})},y=function(S){if(h.paused||!c)return;const C=S.relatedTarget;C!==null&&(c.contains(C)||Ee(f.current,{select:!0}))},x=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Ee(c)};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const w=new MutationObserver(x);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),w.disconnect()}}},[r,c,h.paused]),s.useEffect(()=>{if(c){Or.add(h);const v=document.activeElement;if(!c.contains(v)){const x=new CustomEvent(hn,Ar);c.addEventListener(hn,u),c.dispatchEvent(x),x.defaultPrevented||(Su(Ru(_o(c)),{select:!0}),document.activeElement===v&&Ee(c))}return()=>{c.removeEventListener(hn,u),setTimeout(()=>{const x=new CustomEvent(gn,Ar);c.addEventListener(gn,d),c.dispatchEvent(x),x.defaultPrevented||Ee(v??document.body,{select:!0}),c.removeEventListener(gn,d),Or.remove(h)},0)}}},[c,u,d,h]);const g=s.useCallback(v=>{if(!n&&!r||h.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(y&&x){const w=v.currentTarget,[S,C]=Cu(w);S&&C?!v.shiftKey&&x===C?(v.preventDefault(),n&&Ee(S,{select:!0})):v.shiftKey&&x===S&&(v.preventDefault(),n&&Ee(C,{select:!0})):x===w&&v.preventDefault()}},[n,r,h.paused]);return m.jsx(xu.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})});pt.displayName=wu;function Su(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ee(r,{select:t}),document.activeElement!==n)return}function Cu(e){const t=_o(e),n=Tr(t,e),r=Tr(t.reverse(),e);return[n,r]}function _o(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Tr(e,t){for(const n of e)if(!bu(n,{upTo:t}))return n}function bu(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 Eu(e){return e instanceof HTMLInputElement&&"select"in e}function Ee(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Eu(e)&&t&&e.select()}}var Or=Pu();function Pu(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Nr(e,t),e.unshift(t)},remove(t){var n;e=Nr(e,t),(n=e[0])==null||n.resume()}}}function Nr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ru(e){return e.filter(t=>t.tagName!=="A")}function Ao(e){const t=_u(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(Tu);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function _u(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=Nu(o),c=Ou(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Au=Symbol("radix.slottable");function Tu(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Au}function Ou(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Nu(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Iu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mt=Iu.reduce((e,t)=>{const n=Ao(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),yn=0;function Jt(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ir()),document.body.insertAdjacentElement("beforeend",e[1]??Ir()),yn++,()=>{yn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),yn--}},[])}function Ir(){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 me=function(){return me=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},me.apply(this,arguments)};function To(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Mu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Ot="right-scroll-bar-position",Nt="width-before-scroll-bar",Du="with-scroll-bars-hidden",$u="--removed-body-scroll-bar-size";function xn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ju(e,t){var n=s.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Lu=typeof window<"u"?s.useLayoutEffect:s.useEffect,Mr=new WeakMap;function Fu(e,t){var n=ju(null,function(r){return e.forEach(function(o){return xn(o,r)})});return Lu(function(){var r=Mr.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(c){i.has(c)||xn(c,null)}),i.forEach(function(c){o.has(c)||xn(c,a)})}Mr.set(n,e)},[e]),n}function ku(e){return e}function Wu(e,t){t===void 0&&(t=ku);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(i),a=n}var l=function(){var d=a;a=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return o}function Vu(e){e===void 0&&(e={});var t=Wu(null);return t.options=me({async:!0,ssr:!1},e),t}var Oo=function(e){var t=e.sideCar,n=To(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,me({},n))};Oo.isSideCarExport=!0;function Bu(e,t){return e.useMedium(t),Oo}var No=Vu(),wn=function(){},en=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:wn,onWheelCapture:wn,onTouchMoveCapture:wn}),o=r[0],i=r[1],a=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noRelative,g=e.noIsolation,v=e.inert,y=e.allowPinchZoom,x=e.as,w=x===void 0?"div":x,S=e.gapMode,C=To(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,R=Fu([n,t]),b=me(me({},C),o);return s.createElement(s.Fragment,null,d&&s.createElement(E,{sideCar:No,removeScrollBar:u,shards:f,noRelative:h,noIsolation:g,inert:v,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:S}),a?s.cloneElement(s.Children.only(c),me(me({},b),{ref:R})):s.createElement(w,me({},b,{className:l,ref:R}),c))});en.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};en.classNames={fullWidth:Nt,zeroRight:Ot};var Hu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Uu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Hu();return t&&e.setAttribute("nonce",t),e}function Ku(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Gu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var zu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Uu())&&(Ku(t,n),Gu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Yu=function(){var e=zu();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Io=function(){var e=Yu(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Xu={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||"",10)||0},Zu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Sn(n),Sn(r),Sn(o)]},qu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Xu;var t=Zu(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Qu=Io(),He="data-scroll-locked",Ju=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
1
+ import{r as s,a as at,R as Wn,b as Js,c as Ne}from"./vendor-react-Lycsri1F.js";import{j as m}from"./vendor-query-CaIGp3JB.js";function P(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function pr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function X(...e){return t=>{let n=!1;const r=e.map(o=>{const i=pr(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():pr(e[o],null)}}}}function $(...e){return s.useCallback(X(...e),e)}function ec(e,t=[]){let n=[];function r(i,a){const c=s.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:h,...g}=f,v=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=s.useMemo(()=>g,Object.values(g));return m.jsx(v.Provider,{value:y,children:h})};u.displayName=i+"Provider";function d(f,p){var v;const h=((v=p==null?void 0:p[e])==null?void 0:v[l])||c,g=s.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(a=>s.createContext(a));return function(c){const l=(c==null?void 0:c[e])||i;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,tc(o,...t)]}function tc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...c,...f}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function nc(e){const t=rc(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(ic);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function rc(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=cc(o),c=sc(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var oc=Symbol("radix.slottable");function ic(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oc}function sc(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function cc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ac=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Br=ac.reduce((e,t)=>{const n=nc(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function lc(e,t){e&&at.flushSync(()=>e.dispatchEvent(t))}function Z(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function uc(e,t=globalThis==null?void 0:globalThis.document){const n=Z(e);s.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var fc="DismissableLayer",Pn="dismissableLayer.update",dc="dismissableLayer.pointerDownOutside",pc="dismissableLayer.focusOutside",mr,Hr=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xe=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:c,...l}=e,u=s.useContext(Hr),[d,f]=s.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=s.useState({}),g=$(t,b=>f(b)),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(y),w=d?v.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,C=w>=x,E=hc(b=>{const A=b.target,T=[...u.branches].some(O=>O.contains(A));!C||T||(o==null||o(b),a==null||a(b),b.defaultPrevented||c==null||c())},p),R=gc(b=>{const A=b.target;[...u.branches].some(O=>O.contains(A))||(i==null||i(b),a==null||a(b),b.defaultPrevented||c==null||c())},p);return uc(b=>{w===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&c&&(b.preventDefault(),c()))},p),s.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(mr=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),vr(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=mr)}},[d,p,n,u]),s.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),vr())},[d,u]),s.useEffect(()=>{const b=()=>h({});return document.addEventListener(Pn,b),()=>document.removeEventListener(Pn,b)},[]),m.jsx(Br.div,{...l,ref:g,style:{pointerEvents:S?C?"auto":"none":void 0,...e.style},onFocusCapture:P(e.onFocusCapture,R.onFocusCapture),onBlurCapture:P(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:P(e.onPointerDownCapture,E.onPointerDownCapture)})});Xe.displayName=fc;var mc="DismissableLayerBranch",vc=s.forwardRef((e,t)=>{const n=s.useContext(Hr),r=s.useRef(null),o=$(t,r);return s.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),m.jsx(Br.div,{...e,ref:o})});vc.displayName=mc;function hc(e,t=globalThis==null?void 0:globalThis.document){const n=Z(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let l=function(){Ur(dc,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function gc(e,t=globalThis==null?void 0:globalThis.document){const n=Z(e),r=s.useRef(!1);return s.useEffect(()=>{const o=i=>{i.target&&!r.current&&Ur(pc,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function vr(){const e=new CustomEvent(Pn);document.dispatchEvent(e)}function Ur(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?lc(o,i):o.dispatchEvent(i)}var Y=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},yc=Wn[" useId ".trim().toString()]||(()=>{}),xc=0;function le(e){const[t,n]=s.useState(yc());return Y(()=>{n(r=>r??String(xc++))},[e]),t?`radix-${t}`:""}const wc=["top","right","bottom","left"],Pe=Math.min,ne=Math.max,It=Math.round,bt=Math.floor,he=e=>({x:e,y:e}),Sc={left:"right",right:"left",bottom:"top",top:"bottom"},Cc={start:"end",end:"start"};function Rn(e,t,n){return ne(e,Pe(t,n))}function Ce(e,t){return typeof e=="function"?e(t):e}function be(e){return e.split("-")[0]}function Ze(e){return e.split("-")[1]}function Vn(e){return e==="x"?"y":"x"}function Bn(e){return e==="y"?"height":"width"}const bc=new Set(["top","bottom"]);function ve(e){return bc.has(be(e))?"y":"x"}function Hn(e){return Vn(ve(e))}function Ec(e,t,n){n===void 0&&(n=!1);const r=Ze(e),o=Hn(e),i=Bn(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Mt(a)),[a,Mt(a)]}function Pc(e){const t=Mt(e);return[_n(e),t,_n(t)]}function _n(e){return e.replace(/start|end/g,t=>Cc[t])}const hr=["left","right"],gr=["right","left"],Rc=["top","bottom"],_c=["bottom","top"];function Ac(e,t,n){switch(e){case"top":case"bottom":return n?t?gr:hr:t?hr:gr;case"left":case"right":return t?Rc:_c;default:return[]}}function Tc(e,t,n,r){const o=Ze(e);let i=Ac(be(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(_n)))),i}function Mt(e){return e.replace(/left|right|bottom|top/g,t=>Sc[t])}function Oc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kr(e){return typeof e!="number"?Oc(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function yr(e,t,n){let{reference:r,floating:o}=e;const i=ve(t),a=Hn(t),c=Bn(a),l=be(t),u=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[c]/2-o[c]/2;let h;switch(l){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Ze(t)){case"start":h[a]-=p*(n&&u?-1:1);break;case"end":h[a]+=p*(n&&u?-1:1);break}return h}async function Nc(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=Ce(t,e),g=Kr(h),y=c[p?f==="floating"?"reference":"floating":f],x=Dt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),w=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),C=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},E=Dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:S,strategy:l}):w);return{top:(x.top-E.top+g.top)/C.y,bottom:(E.bottom-x.bottom+g.bottom)/C.y,left:(x.left-E.left+g.left)/C.x,right:(E.right-x.right+g.right)/C.x}}const Ic=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=yr(u,r,l),p=r,h={},g=0;for(let y=0;y<c.length;y++){var v;const{name:x,fn:w}=c[y],{x:S,y:C,data:E,reset:R}=await w({x:d,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:{...a,detectOverflow:(v=a.detectOverflow)!=null?v:Nc},elements:{reference:e,floating:t}});d=S??d,f=C??f,h={...h,[x]:{...h[x],...E}},R&&g<=50&&(g++,typeof R=="object"&&(R.placement&&(p=R.placement),R.rects&&(u=R.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:f}=yr(u,p,l)),y=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:h}},Mc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=Ce(e,t)||{};if(u==null)return{};const f=Kr(d),p={x:n,y:r},h=Hn(o),g=Bn(h),v=await a.getDimensions(u),y=h==="y",x=y?"top":"left",w=y?"bottom":"right",S=y?"clientHeight":"clientWidth",C=i.reference[g]+i.reference[h]-p[h]-i.floating[g],E=p[h]-i.reference[h],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let b=R?R[S]:0;(!b||!await(a.isElement==null?void 0:a.isElement(R)))&&(b=c.floating[S]||i.floating[g]);const A=C/2-E/2,T=b/2-v[g]/2-1,O=Pe(f[x],T),D=Pe(f[w],T),L=O,F=b-v[g]-D,j=b/2-v[g]/2+A,U=Rn(L,j,F),M=!l.arrow&&Ze(o)!=null&&j!==U&&i.reference[g]/2-(j<L?O:D)-v[g]/2<0,k=M?j<L?j-L:j-F:0;return{[h]:p[h]+k,data:{[h]:U,centerOffset:j-U-k,...M&&{alignmentOffset:k}},reset:M}}}),Dc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...y}=Ce(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=be(o),w=ve(c),S=be(c)===c,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=p||(S||!v?[Mt(c)]:Pc(c)),R=g!=="none";!p&&R&&E.push(...Tc(c,v,g,C));const b=[c,...E],A=await l.detectOverflow(t,y),T=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&T.push(A[x]),f){const j=Ec(o,a,C);T.push(A[j[0]],A[j[1]])}if(O=[...O,{placement:o,overflows:T}],!T.every(j=>j<=0)){var D,L;const j=(((D=i.flip)==null?void 0:D.index)||0)+1,U=b[j];if(U&&(!(f==="alignment"?w!==ve(U):!1)||O.every(N=>ve(N.placement)===w?N.overflows[0]>0:!0)))return{data:{index:j,overflows:O},reset:{placement:U}};let M=(L=O.filter(k=>k.overflows[0]<=0).sort((k,N)=>k.overflows[1]-N.overflows[1])[0])==null?void 0:L.placement;if(!M)switch(h){case"bestFit":{var F;const k=(F=O.filter(N=>{if(R){const _=ve(N.placement);return _===w||_==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(_=>_>0).reduce((_,K)=>_+K,0)]).sort((N,_)=>N[1]-_[1])[0])==null?void 0:F[0];k&&(M=k);break}case"initialPlacement":M=c;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function xr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wr(e){return wc.some(t=>e[t]>=0)}const $c=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Ce(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...i,elementContext:"reference"}),c=xr(a,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:wr(c)}}}case"escaped":{const a=await r.detectOverflow(t,{...i,altBoundary:!0}),c=xr(a,n.floating);return{data:{escapedOffsets:c,escaped:wr(c)}}}default:return{}}}}},Gr=new Set(["left","top"]);async function jc(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=be(n),c=Ze(n),l=ve(n)==="y",u=Gr.has(a)?-1:1,d=i&&l?-1:1,f=Ce(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 c&&typeof g=="number"&&(h=c==="end"?g*-1:g),l?{x:h*d,y:p*u}:{x:p*u,y:h*d}}const Lc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:c}=t,l=await jc(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Fc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:w,y:S}=x;return{x:w,y:S}}},...u}=Ce(e,t),d={x:n,y:r},f=await i.detectOverflow(t,u),p=ve(be(o)),h=Vn(p);let g=d[h],v=d[p];if(a){const x=h==="y"?"top":"left",w=h==="y"?"bottom":"right",S=g+f[x],C=g-f[w];g=Rn(S,g,C)}if(c){const x=p==="y"?"top":"left",w=p==="y"?"bottom":"right",S=v+f[x],C=v-f[w];v=Rn(S,v,C)}const y=l.fn({...t,[h]:g,[p]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:a,[p]:c}}}}}},kc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Ce(e,t),d={x:n,y:r},f=ve(o),p=Vn(f);let h=d[p],g=d[f];const v=Ce(c,t),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const S=p==="y"?"height":"width",C=i.reference[p]-i.floating[S]+y.mainAxis,E=i.reference[p]+i.reference[S]-y.mainAxis;h<C?h=C:h>E&&(h=E)}if(u){var x,w;const S=p==="y"?"width":"height",C=Gr.has(be(o)),E=i.reference[f]-i.floating[S]+(C&&((x=a.offset)==null?void 0:x[f])||0)+(C?0:y.crossAxis),R=i.reference[f]+i.reference[S]+(C?0:((w=a.offset)==null?void 0:w[f])||0)-(C?y.crossAxis:0);g<E?g=E:g>R&&(g=R)}return{[p]:h,[f]:g}}}},Wc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:c}=t,{apply:l=()=>{},...u}=Ce(e,t),d=await a.detectOverflow(t,u),f=be(o),p=Ze(o),h=ve(o)==="y",{width:g,height:v}=i.floating;let y,x;f==="top"||f==="bottom"?(y=f,x=p===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,y=p==="end"?"top":"bottom");const w=v-d.top-d.bottom,S=g-d.left-d.right,C=Pe(v-d[y],w),E=Pe(g-d[x],S),R=!t.middlewareData.shift;let b=C,A=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(b=w),R&&!p){const O=ne(d.left,0),D=ne(d.right,0),L=ne(d.top,0),F=ne(d.bottom,0);h?A=g-2*(O!==0||D!==0?O+D:ne(d.left,d.right)):b=v-2*(L!==0||F!==0?L+F:ne(d.top,d.bottom))}await l({...t,availableWidth:A,availableHeight:b});const T=await a.getDimensions(c.floating);return g!==T.width||v!==T.height?{reset:{rects:!0}}:{}}}};function Ht(){return typeof window<"u"}function qe(e){return zr(e)?(e.nodeName||"").toLowerCase():"#document"}function re(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(zr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zr(e){return Ht()?e instanceof Node||e instanceof re(e).Node:!1}function ue(e){return Ht()?e instanceof Element||e instanceof re(e).Element:!1}function ge(e){return Ht()?e instanceof HTMLElement||e instanceof re(e).HTMLElement:!1}function Sr(e){return!Ht()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof re(e).ShadowRoot}const Vc=new Set(["inline","contents"]);function lt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Vc.has(o)}const Bc=new Set(["table","td","th"]);function Hc(e){return Bc.has(qe(e))}const Uc=[":popover-open",":modal"];function Ut(e){return Uc.some(t=>{try{return e.matches(t)}catch{return!1}})}const Kc=["transform","translate","scale","rotate","perspective"],Gc=["transform","translate","scale","rotate","perspective","filter"],zc=["paint","layout","strict","content"];function Un(e){const t=Kn(),n=ue(e)?fe(e):e;return Kc.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Gc.some(r=>(n.willChange||"").includes(r))||zc.some(r=>(n.contain||"").includes(r))}function Yc(e){let t=Re(e);for(;ge(t)&&!Ue(t);){if(Un(t))return t;if(Ut(t))return null;t=Re(t)}return null}function Kn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Xc=new Set(["html","body","#document"]);function Ue(e){return Xc.has(qe(e))}function fe(e){return re(e).getComputedStyle(e)}function Kt(e){return ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Re(e){if(qe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Sr(e)&&e.host||ye(e);return Sr(t)?t.host:t}function Yr(e){const t=Re(e);return Ue(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&lt(t)?t:Yr(t)}function ot(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Yr(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=re(o);if(i){const c=An(a);return t.concat(a,a.visualViewport||[],lt(o)?o:[],c&&n?ot(c):[])}return t.concat(o,ot(o,[],n))}function An(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xr(e){const t=fe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ge(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=It(n)!==i||It(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function Gn(e){return ue(e)?e:e.contextElement}function Be(e){const t=Gn(e);if(!ge(t))return he(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Xr(t);let a=(i?It(n.width):n.width)/r,c=(i?It(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const Zc=he(0);function Zr(e){const t=re(e);return!Kn()||!t.visualViewport?Zc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qc(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==re(e)?!1:t}function Ie(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Gn(e);let a=he(1);t&&(r?ue(r)&&(a=Be(r)):a=Be(e));const c=qc(i,n,r)?Zr(i):he(0);let l=(o.left+c.x)/a.x,u=(o.top+c.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(i){const p=re(i),h=r&&ue(r)?re(r):r;let g=p,v=An(g);for(;v&&r&&h!==g;){const y=Be(v),x=v.getBoundingClientRect(),w=fe(v),S=x.left+(v.clientLeft+parseFloat(w.paddingLeft))*y.x,C=x.top+(v.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,u*=y.y,d*=y.x,f*=y.y,l+=S,u+=C,g=re(v),v=An(g)}}return Dt({width:d,height:f,x:l,y:u})}function Gt(e,t){const n=Kt(e).scrollLeft;return t?t.left+n:Ie(ye(e)).left+n}function qr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Gt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Qc(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=ye(r),c=t?Ut(t.floating):!1;if(r===a||c&&i)return n;let l={scrollLeft:0,scrollTop:0},u=he(1);const d=he(0),f=ge(r);if((f||!f&&!i)&&((qe(r)!=="body"||lt(a))&&(l=Kt(r)),ge(r))){const h=Ie(r);u=Be(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const p=a&&!f&&!i?qr(a,l):he(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 Jc(e){return Array.from(e.getClientRects())}function ea(e){const t=ye(e),n=Kt(e),r=e.ownerDocument.body,o=ne(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ne(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Gt(e);const c=-n.scrollTop;return fe(r).direction==="rtl"&&(a+=ne(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:c}}const Cr=25;function ta(e,t){const n=re(e),r=ye(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,l=0;if(o){i=o.width,a=o.height;const d=Kn();(!d||d&&t==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}const u=Gt(r);if(u<=0){const d=r.ownerDocument,f=d.body,p=getComputedStyle(f),h=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-h);g<=Cr&&(i-=g)}else u<=Cr&&(i+=u);return{width:i,height:a,x:c,y:l}}const na=new Set(["absolute","fixed"]);function ra(e,t){const n=Ie(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ge(e)?Be(e):he(1),a=e.clientWidth*i.x,c=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:a,height:c,x:l,y:u}}function br(e,t,n){let r;if(t==="viewport")r=ta(e,n);else if(t==="document")r=ea(ye(e));else if(ue(t))r=ra(t,n);else{const o=Zr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Dt(r)}function Qr(e,t){const n=Re(e);return n===t||!ue(n)||Ue(n)?!1:fe(n).position==="fixed"||Qr(n,t)}function oa(e,t){const n=t.get(e);if(n)return n;let r=ot(e,[],!1).filter(c=>ue(c)&&qe(c)!=="body"),o=null;const i=fe(e).position==="fixed";let a=i?Re(e):e;for(;ue(a)&&!Ue(a);){const c=fe(a),l=Un(a);!l&&c.position==="fixed"&&(o=null),(i?!l&&!o:!l&&c.position==="static"&&!!o&&na.has(o.position)||lt(a)&&!l&&Qr(e,a))?r=r.filter(d=>d!==a):o=c,a=Re(a)}return t.set(e,r),r}function ia(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ut(t)?[]:oa(t,this._c):[].concat(n),r],c=a[0],l=a.reduce((u,d)=>{const f=br(t,d,o);return u.top=ne(f.top,u.top),u.right=Pe(f.right,u.right),u.bottom=Pe(f.bottom,u.bottom),u.left=ne(f.left,u.left),u},br(t,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function sa(e){const{width:t,height:n}=Xr(e);return{width:t,height:n}}function ca(e,t,n){const r=ge(t),o=ye(t),i=n==="fixed",a=Ie(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=he(0);function u(){l.x=Gt(o)}if(r||!r&&!i)if((qe(t)!=="body"||lt(o))&&(c=Kt(t)),r){const h=Ie(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&u();i&&!r&&o&&u();const d=o&&!r&&!i?qr(o,c):he(0),f=a.left+c.scrollLeft-l.x-d.x,p=a.top+c.scrollTop-l.y-d.y;return{x:f,y:p,width:a.width,height:a.height}}function mn(e){return fe(e).position==="static"}function Er(e,t){if(!ge(e)||fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ye(e)===n&&(n=n.ownerDocument.body),n}function Jr(e,t){const n=re(e);if(Ut(e))return n;if(!ge(e)){let o=Re(e);for(;o&&!Ue(o);){if(ue(o)&&!mn(o))return o;o=Re(o)}return n}let r=Er(e,t);for(;r&&Hc(r)&&mn(r);)r=Er(r,t);return r&&Ue(r)&&mn(r)&&!Un(r)?n:r||Yc(e)||n}const aa=async function(e){const t=this.getOffsetParent||Jr,n=this.getDimensions,r=await n(e.floating);return{reference:ca(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function la(e){return fe(e).direction==="rtl"}const ua={convertOffsetParentRelativeRectToViewportRelativeRect:Qc,getDocumentElement:ye,getClippingRect:ia,getOffsetParent:Jr,getElementRects:aa,getClientRects:Jc,getDimensions:sa,getScale:Be,isElement:ue,isRTL:la};function eo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fa(e,t){let n=null,r;const o=ye(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:f,width:p,height:h}=u;if(c||t(),!p||!h)return;const g=bt(f),v=bt(o.clientWidth-(d+p)),y=bt(o.clientHeight-(f+h)),x=bt(d),S={rootMargin:-g+"px "+-v+"px "+-y+"px "+-x+"px",threshold:ne(0,Pe(1,l))||1};let C=!0;function E(R){const b=R[0].intersectionRatio;if(b!==l){if(!C)return a();b?a(!1,b):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b===1&&!eo(u,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(E,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return a(!0),i}function da(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Gn(e),d=o||i?[...u?ot(u):[],...ot(t)]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=u&&c?fa(u,n):null;let p=-1,h=null;a&&(h=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let g,v=l?Ie(e):null;l&&y();function y(){const x=Ie(e);v&&!eo(v,x)&&n(),v=x,g=requestAnimationFrame(y)}return n(),()=>{var x;d.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),f==null||f(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const pa=Lc,ma=Fc,va=Dc,ha=Wc,ga=$c,Pr=Mc,ya=kc,xa=(e,t,n)=>{const r=new Map,o={platform:ua,...n},i={...o.platform,_c:r};return Ic(e,t,{...o,platform:i})};var wa=typeof document<"u",Sa=function(){},Tt=wa?s.useLayoutEffect:Sa;function $t(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$t(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!$t(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function to(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rr(e,t){const n=to(e);return Math.round(t*n)/n}function vn(e){const t=s.useRef(e);return Tt(()=>{t.current=e}),t}function Ca(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=s.useState(r);$t(p,r)||h(r);const[g,v]=s.useState(null),[y,x]=s.useState(null),w=s.useCallback(N=>{N!==R.current&&(R.current=N,v(N))},[]),S=s.useCallback(N=>{N!==b.current&&(b.current=N,x(N))},[]),C=i||g,E=a||y,R=s.useRef(null),b=s.useRef(null),A=s.useRef(d),T=l!=null,O=vn(l),D=vn(o),L=vn(u),F=s.useCallback(()=>{if(!R.current||!b.current)return;const N={placement:t,strategy:n,middleware:p};D.current&&(N.platform=D.current),xa(R.current,b.current,N).then(_=>{const K={..._,isPositioned:L.current!==!1};j.current&&!$t(A.current,K)&&(A.current=K,at.flushSync(()=>{f(K)}))})},[p,t,n,D,L]);Tt(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[u]);const j=s.useRef(!1);Tt(()=>(j.current=!0,()=>{j.current=!1}),[]),Tt(()=>{if(C&&(R.current=C),E&&(b.current=E),C&&E){if(O.current)return O.current(C,E,F);F()}},[C,E,F,O,T]);const U=s.useMemo(()=>({reference:R,floating:b,setReference:w,setFloating:S}),[w,S]),M=s.useMemo(()=>({reference:C,floating:E}),[C,E]),k=s.useMemo(()=>{const N={position:n,left:0,top:0};if(!M.floating)return N;const _=Rr(M.floating,d.x),K=Rr(M.floating,d.y);return c?{...N,transform:"translate("+_+"px, "+K+"px)",...to(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:K}},[n,c,M.floating,d.x,d.y]);return s.useMemo(()=>({...d,update:F,refs:U,elements:M,floatingStyles:k}),[d,F,U,M,k])}const ba=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Pr({element:r.current,padding:o}).fn(n):{}:r?Pr({element:r,padding:o}).fn(n):{}}}},Ea=(e,t)=>({...pa(e),options:[e,t]}),Pa=(e,t)=>({...ma(e),options:[e,t]}),Ra=(e,t)=>({...ya(e),options:[e,t]}),_a=(e,t)=>({...va(e),options:[e,t]}),Aa=(e,t)=>({...ha(e),options:[e,t]}),Ta=(e,t)=>({...ga(e),options:[e,t]}),Oa=(e,t)=>({...ba(e),options:[e,t]});function Na(e){const t=Ia(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(Da);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Ia(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=ja(o),c=$a(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ma=Symbol("radix.slottable");function Da(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ma}function $a(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ja(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var La=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fa=La.reduce((e,t)=>{const n=Na(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ka="Arrow",no=s.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return m.jsx(Fa.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});no.displayName=ka;var Wa=no;function Va(e,t=[]){let n=[];function r(i,a){const c=s.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:h,...g}=f,v=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=s.useMemo(()=>g,Object.values(g));return m.jsx(v.Provider,{value:y,children:h})};u.displayName=i+"Provider";function d(f,p){var v;const h=((v=p==null?void 0:p[e])==null?void 0:v[l])||c,g=s.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(a=>s.createContext(a));return function(c){const l=(c==null?void 0:c[e])||i;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,Ba(o,...t)]}function Ba(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...c,...f}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ha(e){const t=Ua(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(Ga);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Ua(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=Ya(o),c=za(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ka=Symbol("radix.slottable");function Ga(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ka}function za(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ya(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xa=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ro=Xa.reduce((e,t)=>{const n=Ha(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Za(e){const[t,n]=s.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,c;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var zn="Popper",[oo,_e]=Va(zn),[qa,io]=oo(zn),so=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return m.jsx(qa,{scope:t,anchor:r,onAnchorChange:o,children:n})};so.displayName=zn;var co="PopperAnchor",ao=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=io(co,n),a=s.useRef(null),c=$(t,a),l=s.useRef(null);return s.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||a.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:m.jsx(ro.div,{...o,ref:c})});ao.displayName=co;var Yn="PopperContent",[Qa,Ja]=oo(Yn),lo=s.forwardRef((e,t)=>{var I,V,G,W,B,H;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:g,...v}=e,y=io(Yn,n),[x,w]=s.useState(null),S=$(t,te=>w(te)),[C,E]=s.useState(null),R=Za(C),b=(R==null?void 0:R.width)??0,A=(R==null?void 0:R.height)??0,T=r+(i!=="center"?"-"+i:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(u)?u:[u],L=D.length>0,F={padding:O,boundary:D.filter(tl),altBoundary:L},{refs:j,floatingStyles:U,placement:M,isPositioned:k,middlewareData:N}=Ca({strategy:"fixed",placement:T,whileElementsMounted:(...te)=>da(...te,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[Ea({mainAxis:o+A,alignmentAxis:a}),l&&Pa({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Ra():void 0,...F}),l&&_a({...F}),Aa({...F,apply:({elements:te,rects:pe,availableWidth:Je,availableHeight:et})=>{const{width:tt,height:Qs}=pe.reference,Ct=te.floating.style;Ct.setProperty("--radix-popper-available-width",`${Je}px`),Ct.setProperty("--radix-popper-available-height",`${et}px`),Ct.setProperty("--radix-popper-anchor-width",`${tt}px`),Ct.setProperty("--radix-popper-anchor-height",`${Qs}px`)}}),C&&Oa({element:C,padding:c}),nl({arrowWidth:b,arrowHeight:A}),p&&Ta({strategy:"referenceHidden",...F})]}),[_,K]=po(M),z=Z(g);Y(()=>{k&&(z==null||z())},[k,z]);const J=(I=N.arrow)==null?void 0:I.x,we=(V=N.arrow)==null?void 0:V.y,ie=((G=N.arrow)==null?void 0:G.centerOffset)!==0,[Se,ee]=s.useState();return Y(()=>{x&&ee(window.getComputedStyle(x).zIndex)},[x]),m.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:k?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(W=N.transformOrigin)==null?void 0:W.x,(B=N.transformOrigin)==null?void 0:B.y].join(" "),...((H=N.hide)==null?void 0:H.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Qa,{scope:n,placedSide:_,onArrowChange:E,arrowX:J,arrowY:we,shouldHideArrow:ie,children:m.jsx(ro.div,{"data-side":_,"data-align":K,...v,ref:S,style:{...v.style,animation:k?void 0:"none"}})})})});lo.displayName=Yn;var uo="PopperArrow",el={top:"bottom",right:"left",bottom:"top",left:"right"},fo=s.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Ja(uo,r),a=el[i.placedSide];return m.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:m.jsx(Wa,{...o,ref:n,style:{...o.style,display:"block"}})})});fo.displayName=uo;function tl(e){return e!==null}var nl=e=>({name:"transformOrigin",options:e,fn(t){var y,x,w;const{placement:n,rects:r,middlewareData:o}=t,a=((y=o.arrow)==null?void 0:y.centerOffset)!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,d]=po(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((x=o.arrow)==null?void 0:x.x)??0)+c/2,h=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let g="",v="";return u==="bottom"?(g=a?f:`${p}px`,v=`${-l}px`):u==="top"?(g=a?f:`${p}px`,v=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,v=a?f:`${h}px`):u==="left"&&(g=`${r.floating.width+l}px`,v=a?f:`${h}px`),{data:{x:g,y:v}}}});function po(e){const[t,n="center"]=e.split("-");return[t,n]}var zt=so,ut=ao,Yt=lo,Xt=fo;function rl(e){const t=ol(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(sl);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function ol(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=al(o),c=cl(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var il=Symbol("radix.slottable");function sl(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===il}function cl(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function al(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ll=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ul=ll.reduce((e,t)=>{const n=rl(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),fl="Portal",ft=s.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,i]=s.useState(!1);Y(()=>i(!0),[]);const a=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?Js.createPortal(m.jsx(ul.div,{...r,ref:t}),a):null});ft.displayName=fl;function dl(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var q=e=>{const{present:t,children:n}=e,r=pl(t),o=typeof n=="function"?n({present:r.isPresent}):s.Children.only(n),i=$(r.ref,ml(o));return typeof n=="function"||r.isPresent?s.cloneElement(o,{ref:i}):null};q.displayName="Presence";function pl(e){const[t,n]=s.useState(),r=s.useRef(null),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[c,l]=dl(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const u=Et(r.current);i.current=c==="mounted"?u:"none"},[c]),Y(()=>{const u=r.current,d=o.current;if(d!==e){const p=i.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"),o.current=e}},[e,l]),Y(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=h=>{const v=Et(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&v&&(l("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=h=>{h.target===t&&(i.current=Et(r.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(c),ref:s.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Et(e){return(e==null?void 0:e.animationName)||"none"}function ml(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function vl(e){const t=hl(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(yl);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function hl(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=wl(o),c=xl(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mo=Symbol("radix.slottable");function gl(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=mo,t}function yl(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mo}function xl(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function wl(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Cl=Sl.reduce((e,t)=>{const n=vl(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),bl=Wn[" useInsertionEffect ".trim().toString()]||Y;function Me({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=El({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:o;{const d=s.useRef(e!==void 0);s.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${c?"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=c},[c,r])}const u=s.useCallback(d=>{var f;if(c){const p=Pl(d)?d(e):d;p!==e&&((f=a.current)==null||f.call(a,p))}else i(d)},[c,e,i,a]);return[l,u]}function El({defaultProp:e,onChange:t}){const[n,r]=s.useState(e),o=s.useRef(n),i=s.useRef(t);return bl(()=>{i.current=t},[t]),s.useEffect(()=>{var a;o.current!==n&&((a=i.current)==null||a.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Pl(e){return typeof e=="function"}function Rl(e){const t=_l(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(Tl);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function _l(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=Nl(o),c=Ol(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Al=Symbol("radix.slottable");function Tl(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Al}function Ol(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Nl(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Il=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ml=Il.reduce((e,t)=>{const n=Rl(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),vo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Dl="VisuallyHidden",ho=s.forwardRef((e,t)=>m.jsx(Ml.span,{...e,ref:t,style:{...vo,...e.style}}));ho.displayName=Dl;var $l=ho,[Zt]=ec("Tooltip",[_e]),qt=_e(),go="TooltipProvider",jl=700,Tn="tooltip.open",[Ll,Xn]=Zt(go),yo=e=>{const{__scopeTooltip:t,delayDuration:n=jl,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,a=s.useRef(!0),c=s.useRef(!1),l=s.useRef(0);return s.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),m.jsx(Ll,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(u=>{c.current=u},[]),disableHoverableContent:o,children:i})};yo.displayName=go;var it="Tooltip",[Fl,Qt]=Zt(it),xo=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:c}=e,l=Xn(it,e.__scopeTooltip),u=qt(t),[d,f]=s.useState(null),p=le(),h=s.useRef(0),g=a??l.disableHoverableContent,v=c??l.delayDuration,y=s.useRef(!1),[x,w]=Me({prop:r,defaultProp:o??!1,onChange:b=>{b?(l.onOpen(),document.dispatchEvent(new CustomEvent(Tn))):l.onClose(),i==null||i(b)},caller:it}),S=s.useMemo(()=>x?y.current?"delayed-open":"instant-open":"closed",[x]),C=s.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,w(!0)},[w]),E=s.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),R=s.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,w(!0),h.current=0},v)},[v,w]);return s.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),m.jsx(zt,{...u,children:m.jsx(Fl,{scope:t,contentId:p,open:x,stateAttribute:S,trigger:d,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{l.isOpenDelayedRef.current?R():C()},[l.isOpenDelayedRef,R,C]),onTriggerLeave:s.useCallback(()=>{g?E():(window.clearTimeout(h.current),h.current=0)},[E,g]),onOpen:C,onClose:E,disableHoverableContent:g,children:n})})};xo.displayName=it;var On="TooltipTrigger",wo=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Qt(On,n),i=Xn(On,n),a=qt(n),c=s.useRef(null),l=$(t,c,o.onTriggerChange),u=s.useRef(!1),d=s.useRef(!1),f=s.useCallback(()=>u.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),m.jsx(ut,{asChild:!0,...a,children:m.jsx(Cl.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:P(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:P(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:P(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:P(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:P(e.onBlur,o.onClose),onClick:P(e.onClick,o.onClose)})})});wo.displayName=On;var kl="TooltipPortal",[uv,Wl]=Zt(kl,{forceMount:void 0}),Ke="TooltipContent",So=s.forwardRef((e,t)=>{const n=Wl(Ke,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Qt(Ke,e.__scopeTooltip);return m.jsx(q,{present:r||a.open,children:a.disableHoverableContent?m.jsx(Co,{side:o,...i,ref:t}):m.jsx(Vl,{side:o,...i,ref:t})})}),Vl=s.forwardRef((e,t)=>{const n=Qt(Ke,e.__scopeTooltip),r=Xn(Ke,e.__scopeTooltip),o=s.useRef(null),i=$(t,o),[a,c]=s.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,p=s.useCallback(()=>{c(null),f(!1)},[f]),h=s.useCallback((g,v)=>{const y=g.currentTarget,x={x:g.clientX,y:g.clientY},w=Gl(x,y.getBoundingClientRect()),S=zl(x,w),C=Yl(v.getBoundingClientRect()),E=Zl([...S,...C]);c(E),f(!0)},[f]);return s.useEffect(()=>()=>p(),[p]),s.useEffect(()=>{if(l&&d){const g=y=>h(y,d),v=y=>h(y,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",v)}}},[l,d,h,p]),s.useEffect(()=>{if(a){const g=v=>{const y=v.target,x={x:v.clientX,y:v.clientY},w=(l==null?void 0:l.contains(y))||(d==null?void 0:d.contains(y)),S=!Xl(x,a);w?p():S&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,a,u,p]),m.jsx(Co,{...e,ref:i})}),[Bl,Hl]=Zt(it,{isInside:!1}),Ul=gl("TooltipContent"),Co=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...c}=e,l=Qt(Ke,n),u=qt(n),{onClose:d}=l;return s.useEffect(()=>(document.addEventListener(Tn,d),()=>document.removeEventListener(Tn,d)),[d]),s.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]),m.jsx(Xe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:m.jsxs(Yt,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(Ul,{children:r}),m.jsx(Bl,{scope:n,isInside:!0,children:m.jsx($l,{id:l.contentId,role:"tooltip",children:o||r})})]})})});So.displayName=Ke;var bo="TooltipArrow",Kl=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=qt(n);return Hl(bo,n).isInside?null:m.jsx(Xt,{...o,...r,ref:t})});Kl.displayName=bo;function Gl(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function zl(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Yl(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Xl(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const c=t[i],l=t[a],u=c.x,d=c.y,f=l.x,p=l.y;d>r!=p>r&&n<(f-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function Zl(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ql(t)}function ql(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var fv=yo,dv=xo,pv=wo,mv=So,Ql=Symbol.for("react.lazy"),jt=Wn[" use ".trim().toString()];function Jl(e){return typeof e=="object"&&e!==null&&"then"in e}function Eo(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Ql&&"_payload"in e&&Jl(e._payload)}function Po(e){const t=eu(e),n=s.forwardRef((r,o)=>{let{children:i,...a}=r;Eo(i)&&typeof jt=="function"&&(i=jt(i._payload));const c=s.Children.toArray(i),l=c.find(nu);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var vv=Po("Slot");function eu(e){const t=s.forwardRef((n,r)=>{let{children:o,...i}=n;if(Eo(o)&&typeof jt=="function"&&(o=jt(o._payload)),s.isValidElement(o)){const a=ou(o),c=ru(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tu=Symbol("radix.slottable");function nu(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tu}function ru(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ou(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var iu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dt=iu.reduce((e,t)=>{const n=Po(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),su="Separator",_r="horizontal",cu=["horizontal","vertical"],Ro=s.forwardRef((e,t)=>{const{decorative:n,orientation:r=_r,...o}=e,i=au(r)?r:_r,c=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return m.jsx(dt.div,{"data-orientation":i,...c,...o,ref:t})});Ro.displayName=su;function au(e){return cu.includes(e)}var hv=Ro;function lu(e,t){const n=s.createContext(t),r=i=>{const{children:a,...c}=i,l=s.useMemo(()=>c,Object.values(c));return m.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(i){const a=s.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function uu(e,t=[]){let n=[];function r(i,a){const c=s.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:h,...g}=f,v=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=s.useMemo(()=>g,Object.values(g));return m.jsx(v.Provider,{value:y,children:h})};u.displayName=i+"Provider";function d(f,p){var v;const h=((v=p==null?void 0:p[e])==null?void 0:v[l])||c,g=s.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(a=>s.createContext(a));return function(c){const l=(c==null?void 0:c[e])||i;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,fu(o,...t)]}function fu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...c,...f}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function du(e){const t=pu(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(vu);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function pu(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=gu(o),c=hu(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mu=Symbol("radix.slottable");function vu(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mu}function hu(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function gu(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xu=yu.reduce((e,t)=>{const n=du(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),hn="focusScope.autoFocusOnMount",gn="focusScope.autoFocusOnUnmount",Ar={bubbles:!1,cancelable:!0},wu="FocusScope",pt=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[c,l]=s.useState(null),u=Z(o),d=Z(i),f=s.useRef(null),p=$(t,v=>l(v)),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let v=function(S){if(h.paused||!c)return;const C=S.target;c.contains(C)?f.current=C:Ee(f.current,{select:!0})},y=function(S){if(h.paused||!c)return;const C=S.relatedTarget;C!==null&&(c.contains(C)||Ee(f.current,{select:!0}))},x=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Ee(c)};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const w=new MutationObserver(x);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),w.disconnect()}}},[r,c,h.paused]),s.useEffect(()=>{if(c){Or.add(h);const v=document.activeElement;if(!c.contains(v)){const x=new CustomEvent(hn,Ar);c.addEventListener(hn,u),c.dispatchEvent(x),x.defaultPrevented||(Su(Ru(_o(c)),{select:!0}),document.activeElement===v&&Ee(c))}return()=>{c.removeEventListener(hn,u),setTimeout(()=>{const x=new CustomEvent(gn,Ar);c.addEventListener(gn,d),c.dispatchEvent(x),x.defaultPrevented||Ee(v??document.body,{select:!0}),c.removeEventListener(gn,d),Or.remove(h)},0)}}},[c,u,d,h]);const g=s.useCallback(v=>{if(!n&&!r||h.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(y&&x){const w=v.currentTarget,[S,C]=Cu(w);S&&C?!v.shiftKey&&x===C?(v.preventDefault(),n&&Ee(S,{select:!0})):v.shiftKey&&x===S&&(v.preventDefault(),n&&Ee(C,{select:!0})):x===w&&v.preventDefault()}},[n,r,h.paused]);return m.jsx(xu.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})});pt.displayName=wu;function Su(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ee(r,{select:t}),document.activeElement!==n)return}function Cu(e){const t=_o(e),n=Tr(t,e),r=Tr(t.reverse(),e);return[n,r]}function _o(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Tr(e,t){for(const n of e)if(!bu(n,{upTo:t}))return n}function bu(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 Eu(e){return e instanceof HTMLInputElement&&"select"in e}function Ee(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Eu(e)&&t&&e.select()}}var Or=Pu();function Pu(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Nr(e,t),e.unshift(t)},remove(t){var n;e=Nr(e,t),(n=e[0])==null||n.resume()}}}function Nr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ru(e){return e.filter(t=>t.tagName!=="A")}function Ao(e){const t=_u(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(Tu);if(l){const u=l.props.children,d=c.map(f=>f===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function _u(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=Nu(o),c=Ou(i,o.props);return o.type!==s.Fragment&&(c.ref=r?X(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Au=Symbol("radix.slottable");function Tu(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Au}function Ou(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Nu(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Iu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mt=Iu.reduce((e,t)=>{const n=Ao(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),yn=0;function Jt(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ir()),document.body.insertAdjacentElement("beforeend",e[1]??Ir()),yn++,()=>{yn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),yn--}},[])}function Ir(){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 me=function(){return me=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},me.apply(this,arguments)};function To(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Mu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Ot="right-scroll-bar-position",Nt="width-before-scroll-bar",Du="with-scroll-bars-hidden",$u="--removed-body-scroll-bar-size";function xn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ju(e,t){var n=s.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Lu=typeof window<"u"?s.useLayoutEffect:s.useEffect,Mr=new WeakMap;function Fu(e,t){var n=ju(null,function(r){return e.forEach(function(o){return xn(o,r)})});return Lu(function(){var r=Mr.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(c){i.has(c)||xn(c,null)}),i.forEach(function(c){o.has(c)||xn(c,a)})}Mr.set(n,e)},[e]),n}function ku(e){return e}function Wu(e,t){t===void 0&&(t=ku);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(i),a=n}var l=function(){var d=a;a=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return o}function Vu(e){e===void 0&&(e={});var t=Wu(null);return t.options=me({async:!0,ssr:!1},e),t}var Oo=function(e){var t=e.sideCar,n=To(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,me({},n))};Oo.isSideCarExport=!0;function Bu(e,t){return e.useMedium(t),Oo}var No=Vu(),wn=function(){},en=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:wn,onWheelCapture:wn,onTouchMoveCapture:wn}),o=r[0],i=r[1],a=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noRelative,g=e.noIsolation,v=e.inert,y=e.allowPinchZoom,x=e.as,w=x===void 0?"div":x,S=e.gapMode,C=To(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,R=Fu([n,t]),b=me(me({},C),o);return s.createElement(s.Fragment,null,d&&s.createElement(E,{sideCar:No,removeScrollBar:u,shards:f,noRelative:h,noIsolation:g,inert:v,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:S}),a?s.cloneElement(s.Children.only(c),me(me({},b),{ref:R})):s.createElement(w,me({},b,{className:l,ref:R}),c))});en.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};en.classNames={fullWidth:Nt,zeroRight:Ot};var Hu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Uu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Hu();return t&&e.setAttribute("nonce",t),e}function Ku(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Gu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var zu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Uu())&&(Ku(t,n),Gu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Yu=function(){var e=zu();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Io=function(){var e=Yu(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Xu={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||"",10)||0},Zu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Sn(n),Sn(r),Sn(o)]},qu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Xu;var t=Zu(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Qu=Io(),He="data-scroll-locked",Ju=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
2
2
  .`.concat(Du,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(c,"px ").concat(r,`;
@@ -56,4 +56,4 @@ Error generating stack: `+i.message+`
56
56
  * LICENSE.md file in the root directory of this source tree.
57
57
  *
58
58
  * @license MIT
59
- */function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fl.apply(this,arguments)}function Bc(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,i;for(i=0;i<r.length;i++)l=r[i],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}function rh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function lh(e,t){return e.button===0&&(!t||t==="_self")&&!rh(e)}function to(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function ih(e,t){let n=to(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(i=>{n.append(l,i)})}),n}const oh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],uh=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],ah="6";try{window.__reactRouterVersion=ah}catch{}const sh=k.createContext({isTransitioning:!1}),ch="startTransition",ya=lf[ch];function Ch(e){let{basename:t,children:n,future:r,window:l}=e,i=k.useRef();i.current==null&&(i.current=fp({window:l,v5Compat:!0}));let o=i.current,[u,a]=k.useState({action:o.action,location:o.location}),{v7_startTransition:s}=r||{},h=k.useCallback(p=>{s&&ya?ya(()=>a(p)):a(p)},[a,s]);return k.useLayoutEffect(()=>o.listen(h),[o,h]),k.useEffect(()=>eh(r),[r]),k.createElement(nh,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o,future:r})}const fh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",dh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ph=k.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:i,replace:o,state:u,target:a,to:s,preventScrollReset:h,viewTransition:p}=t,m=Bc(t,oh),{basename:g}=k.useContext(Je),y,w=!1;if(typeof s=="string"&&dh.test(s)&&(y=s,fh))try{let d=new URL(window.location.href),v=s.startsWith("//")?new URL(d.protocol+s):new URL(s),E=cn(v.pathname,g);v.origin===d.origin&&E!=null?s=E+v.search+v.hash:w=!0}catch{}let C=jp(s,{relative:l}),f=mh(s,{replace:o,state:u,target:a,preventScrollReset:h,relative:l,viewTransition:p});function c(d){r&&r(d),d.defaultPrevented||f(d)}return k.createElement("a",fl({},m,{href:y||C,onClick:w||i?r:c,ref:n,target:a}))}),xh=k.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:i="",end:o=!1,style:u,to:a,viewTransition:s,children:h}=t,p=Bc(t,uh),m=zl(a,{relative:p.relative}),g=Ft(),y=k.useContext(Mc),{navigator:w,basename:C}=k.useContext(Je),f=y!=null&&vh(m)&&s===!0,c=w.encodeLocation?w.encodeLocation(m).pathname:m.pathname,d=g.pathname,v=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;l||(d=d.toLowerCase(),v=v?v.toLowerCase():null,c=c.toLowerCase()),v&&C&&(v=cn(v,C)||v);const E=c!=="/"&&c.endsWith("/")?c.length-1:c.length;let _=d===c||!o&&d.startsWith(c)&&d.charAt(E)==="/",N=v!=null&&(v===c||!o&&v.startsWith(c)&&v.charAt(c.length)==="/"),L={isActive:_,isPending:N,isTransitioning:f},B=_?r:void 0,T;typeof i=="function"?T=i(L):T=[i,_?"active":null,N?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let me=typeof u=="function"?u(L):u;return k.createElement(ph,fl({},p,{"aria-current":B,className:T,ref:n,style:me,to:a,viewTransition:s}),typeof h=="function"?h(L):h)});var no;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(no||(no={}));var ga;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ga||(ga={}));function hh(e){let t=k.useContext(Nl);return t||$(!1),t}function mh(e,t){let{target:n,replace:r,state:l,preventScrollReset:i,relative:o,viewTransition:u}=t===void 0?{}:t,a=tu(),s=Ft(),h=zl(e,{relative:o});return k.useCallback(p=>{if(lh(p,n)){p.preventDefault();let m=r!==void 0?r:cl(s)===cl(h);a(e,{replace:m,state:l,preventScrollReset:i,relative:o,viewTransition:u})}},[s,a,h,r,l,n,e,i,o,u])}function Ph(e){let t=k.useRef(to(e)),n=k.useRef(!1),r=Ft(),l=k.useMemo(()=>ih(r.search,n.current?null:t.current),[r.search]),i=tu(),o=k.useCallback((u,a)=>{const s=to(typeof u=="function"?u(l):u);n.current=!0,i("?"+s,a)},[i,l]);return[l,o]}function vh(e,t){t===void 0&&(t={});let n=k.useContext(sh);n==null&&$(!1);let{basename:r}=hh(no.useViewTransitionState),l=zl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=cn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=cn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return bi(l.pathname,o)!=null||bi(l.pathname,i)!=null}export{Ch as B,ph as L,xh as N,kh as O,lf as R,cp as a,gh as b,rf as c,Ft as d,tu as e,Ph as f,wa as g,yh as h,Eh as i,th as j,Sh as k,k as r,wh as u};
59
+ */function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fl.apply(this,arguments)}function Bc(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,i;for(i=0;i<r.length;i++)l=r[i],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}function rh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function lh(e,t){return e.button===0&&(!t||t==="_self")&&!rh(e)}function to(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function ih(e,t){let n=to(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(i=>{n.append(l,i)})}),n}const oh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],uh=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],ah="6";try{window.__reactRouterVersion=ah}catch{}const sh=k.createContext({isTransitioning:!1}),ch="startTransition",ya=lf[ch];function Ch(e){let{basename:t,children:n,future:r,window:l}=e,i=k.useRef();i.current==null&&(i.current=fp({window:l,v5Compat:!0}));let o=i.current,[u,a]=k.useState({action:o.action,location:o.location}),{v7_startTransition:s}=r||{},h=k.useCallback(p=>{s&&ya?ya(()=>a(p)):a(p)},[a,s]);return k.useLayoutEffect(()=>o.listen(h),[o,h]),k.useEffect(()=>eh(r),[r]),k.createElement(nh,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o,future:r})}const fh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",dh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ph=k.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:i,replace:o,state:u,target:a,to:s,preventScrollReset:h,viewTransition:p}=t,m=Bc(t,oh),{basename:g}=k.useContext(Je),y,w=!1;if(typeof s=="string"&&dh.test(s)&&(y=s,fh))try{let d=new URL(window.location.href),v=s.startsWith("//")?new URL(d.protocol+s):new URL(s),E=cn(v.pathname,g);v.origin===d.origin&&E!=null?s=E+v.search+v.hash:w=!0}catch{}let C=jp(s,{relative:l}),f=mh(s,{replace:o,state:u,target:a,preventScrollReset:h,relative:l,viewTransition:p});function c(d){r&&r(d),d.defaultPrevented||f(d)}return k.createElement("a",fl({},m,{href:y||C,onClick:w||i?r:c,ref:n,target:a}))}),xh=k.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:i="",end:o=!1,style:u,to:a,viewTransition:s,children:h}=t,p=Bc(t,uh),m=zl(a,{relative:p.relative}),g=Ft(),y=k.useContext(Mc),{navigator:w,basename:C}=k.useContext(Je),f=y!=null&&vh(m)&&s===!0,c=w.encodeLocation?w.encodeLocation(m).pathname:m.pathname,d=g.pathname,v=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;l||(d=d.toLowerCase(),v=v?v.toLowerCase():null,c=c.toLowerCase()),v&&C&&(v=cn(v,C)||v);const E=c!=="/"&&c.endsWith("/")?c.length-1:c.length;let _=d===c||!o&&d.startsWith(c)&&d.charAt(E)==="/",N=v!=null&&(v===c||!o&&v.startsWith(c)&&v.charAt(c.length)==="/"),L={isActive:_,isPending:N,isTransitioning:f},B=_?r:void 0,T;typeof i=="function"?T=i(L):T=[i,_?"active":null,N?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let me=typeof u=="function"?u(L):u;return k.createElement(ph,fl({},p,{"aria-current":B,className:T,ref:n,style:me,to:a,viewTransition:s}),typeof h=="function"?h(L):h)});var no;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(no||(no={}));var ga;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ga||(ga={}));function hh(e){let t=k.useContext(Nl);return t||$(!1),t}function mh(e,t){let{target:n,replace:r,state:l,preventScrollReset:i,relative:o,viewTransition:u}=t===void 0?{}:t,a=tu(),s=Ft(),h=zl(e,{relative:o});return k.useCallback(p=>{if(lh(p,n)){p.preventDefault();let m=r!==void 0?r:cl(s)===cl(h);a(e,{replace:m,state:l,preventScrollReset:i,relative:o,viewTransition:u})}},[s,a,h,r,l,n,e,i,o,u])}function Ph(e){let t=k.useRef(to(e)),n=k.useRef(!1),r=Ft(),l=k.useMemo(()=>ih(r.search,n.current?null:t.current),[r.search]),i=tu(),o=k.useCallback((u,a)=>{const s=to(typeof u=="function"?u(l):u);n.current=!0,i("?"+s,a)},[i,l]);return[l,o]}function vh(e,t){t===void 0&&(t={});let n=k.useContext(sh);n==null&&$(!1);let{basename:r}=hh(no.useViewTransitionState),l=zl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=cn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=cn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return bi(l.pathname,o)!=null||bi(l.pathname,i)!=null}export{Ch as B,ph as L,xh as N,kh as O,lf as R,cp as a,gh as b,rf as c,Ft as d,tu as e,Ph as f,wa as g,Sh as h,yh as i,Eh as j,th as k,k as r,wh as u};
package/dist/index.html CHANGED
@@ -11,13 +11,13 @@
11
11
  href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap"
12
12
  rel="stylesheet"
13
13
  />
14
- <script type="module" crossorigin src="/assets/index-CQsCbVvy.js"></script>
15
- <link rel="modulepreload" crossorigin href="/assets/vendor-react-aoclG454.js">
16
- <link rel="modulepreload" crossorigin href="/assets/vendor-query-DtBTlSlq.js">
17
- <link rel="modulepreload" crossorigin href="/assets/vendor-radix-Bj-t5iGX.js">
18
- <link rel="modulepreload" crossorigin href="/assets/vendor-dnd-6EGxH1Lf.js">
19
- <link rel="modulepreload" crossorigin href="/assets/vendor-editor-BmhD0BxF.js">
20
- <link rel="stylesheet" crossorigin href="/assets/index-D5vyNUoI.css">
14
+ <script type="module" crossorigin src="/assets/index-B66YRSpH.js"></script>
15
+ <link rel="modulepreload" crossorigin href="/assets/vendor-react-Lycsri1F.js">
16
+ <link rel="modulepreload" crossorigin href="/assets/vendor-query-CaIGp3JB.js">
17
+ <link rel="modulepreload" crossorigin href="/assets/vendor-radix-CeigSZIw.js">
18
+ <link rel="modulepreload" crossorigin href="/assets/vendor-dnd-B31T8w2X.js">
19
+ <link rel="modulepreload" crossorigin href="/assets/vendor-editor-BoEtjgAn.js">
20
+ <link rel="stylesheet" crossorigin href="/assets/index-CpG8Mt5c.css">
21
21
  </head>
22
22
  <body>
23
23
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meridianjs/admin-dashboard",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -1 +0,0 @@
1
- import{a as H,b as L,j as t}from"./vendor-query-DtBTlSlq.js";import{u as Q,r as c}from"./vendor-react-aoclG454.js";import{u as U,a as Z,b as J,c as V,d as X,e as ee,W as C,B as te,P as ae,G as se,f as ne,g as w,h as I,i as re,j as oe,k as de,l as v,m as $,n as ie,o as le,I as ce,C as ue,p as me,q as E,r as T,s as he,t as fe,v as pe,w as xe}from"./index-CQsCbVvy.js";import"./vendor-radix-Bj-t5iGX.js";import"./vendor-dnd-6EGxH1Lf.js";import"./vendor-editor-BmhD0BxF.js";function f(n,p){const r=n.start_date?new Date(n.start_date):new Date(n.due_date),x=n.due_date?E(new Date(n.due_date),1):E(r,1);return{id:n.id,name:`${n.identifier} ${n.title}`,startAt:r,endAt:x,status:{id:n.status,name:n.status,color:p}}}function Ie(){const{projectKey:n}=Q(),p=H(),[r,x]=c.useState("monthly"),[_,S]=c.useState(null),[W,M]=c.useState(!1),G=c.useRef(null);c.useEffect(()=>{const e=requestAnimationFrame(()=>{var P;const s=(P=G.current)==null?void 0:P.querySelector(".gantt");if(!s)return;const a=new Date,N=a.getFullYear()-1,Y=300;let D;if(r==="daily"){const h=new Date(N,0,1);D=Math.floor((a.getTime()-h.getTime())/864e5)*50}else{const h=r==="monthly"?150:100,z=(a.getFullYear()-N)*12+a.getMonth(),O=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();D=z*h+(a.getDate()-1)/O*h}const K=s.clientWidth-Y;s.scrollLeft=Math.max(0,D-K/2)});return()=>cancelAnimationFrame(e)},[r]);const{data:j}=U(n??""),o=(j==null?void 0:j.id)??"",{data:y=[]}=Z(o||void 0),{data:q=[]}=J(o||void 0),{data:g=[]}=V(o||void 0),{data:u}=X(),{data:A=[]}=ee(new Date().getFullYear()),B=L({mutationFn:({id:e,start_date:s,due_date:a})=>xe.put(`/admin/issues/${e}`,{start_date:s,due_date:a}),onSuccess:()=>{p.invalidateQueries({queryKey:pe.byProject(o)})},onError:()=>fe.error("Failed to update issue dates")}),d=Object.fromEntries(q.map(e=>[e.key,e.color])),F=e=>{if(!e.start_date||!e.due_date||!(u!=null&&u.working_days))return;const s=me(new Date(e.start_date),new Date(e.due_date),u.working_days,A);return`${s} business day${s!==1?"s":""}`},R=y.filter(e=>e.due_date),m=y.filter(e=>!e.due_date),i={},l=[];for(const e of R)e.sprint_id?(i[e.sprint_id]||(i[e.sprint_id]=[]),i[e.sprint_id].push(e)):l.push(e);const k=(e,s,a)=>{B.mutate({id:e,start_date:T(s,"yyyy-MM-dd"),due_date:a?T(he(a),"yyyy-MM-dd"):null})},b=e=>{const s=y.find(a=>a.id===e)??null;S(s)};return n?t.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[t.jsx(C,{zone:"project.timeline.before",props:{projectId:o}}),t.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-border shrink-0 bg-white dark:bg-zinc-950",children:[t.jsx("div",{className:"flex items-center gap-1 bg-muted rounded-md p-0.5",children:["daily","monthly","quarterly"].map(e=>t.jsx("button",{onClick:()=>x(e),className:`px-3 py-1 rounded text-xs font-medium transition-colors capitalize ${r===e?"bg-white dark:bg-zinc-900 text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:e},e))}),t.jsxs(te,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:()=>M(!0),children:[t.jsx(ae,{className:"h-3.5 w-3.5"}),"Issue"]})]}),t.jsx("div",{ref:G,className:"flex-1 min-h-0 overflow-hidden",children:t.jsxs(se,{range:r,zoom:100,className:"h-full bg-white dark:bg-zinc-950",children:[t.jsxs(ne,{children:[g.map(e=>{const s=i[e.id]??[];return t.jsx(w,{name:e.name,children:s.map(a=>t.jsx(I,{feature:f(a,d[a.status]??"#94a3b8"),duration:F(a),onSelectItem:b},a.id))},e.id)}),l.length>0&&t.jsx(w,{name:"No Sprint",children:l.map(e=>t.jsx(I,{feature:f(e,d[e.status]??"#94a3b8"),duration:F(e),onSelectItem:b},e.id))}),m.length>0&&t.jsx(w,{name:"Unscheduled",children:m.map(e=>t.jsx(I,{feature:{id:e.id,name:`${e.identifier} ${e.title}`,startAt:new Date,endAt:new Date,status:{id:e.status,name:e.status,color:d[e.status]??"#94a3b8"}},onSelectItem:b},e.id))})]}),t.jsxs(re,{children:[t.jsx(oe,{}),t.jsxs(de,{children:[g.map(e=>{const s=i[e.id]??[];return t.jsx(v,{children:s.map(a=>t.jsx("div",{className:"flex",children:t.jsx($,{onMove:k,...f(a,d[a.status]??"#94a3b8")})},a.id))},e.id)}),l.length>0&&t.jsx(v,{children:l.map(e=>t.jsx("div",{className:"flex",children:t.jsx($,{onMove:k,...f(e,d[e.status]??"#94a3b8")})},e.id))}),m.length>0&&t.jsx(v,{children:m.map(e=>t.jsx("div",{style:{height:"var(--gantt-row-height)"}},e.id))})]}),g.filter(e=>e.end_date).map(e=>t.jsx(ie,{id:e.id,date:new Date(e.end_date),label:`${e.name} end`},e.id)),t.jsx(le,{})]})]})}),t.jsx(C,{zone:"project.timeline.after",props:{projectId:o}}),t.jsx(ce,{issue:_,projectId:o,open:!!_,onClose:()=>S(null)}),t.jsx(ue,{open:W,onClose:()=>M(!1),projectId:o})]}):null}export{Ie as ProjectTimelinePage};
@@ -1 +0,0 @@
1
- import{j as r}from"./vendor-query-DtBTlSlq.js";import{x as t,R as i}from"./index-CQsCbVvy.js";import"./vendor-react-aoclG454.js";import"./vendor-radix-Bj-t5iGX.js";import"./vendor-dnd-6EGxH1Lf.js";import"./vendor-editor-BmhD0BxF.js";function u(){const{workspace:o}=t();return r.jsx(i,{workspaceId:o==null?void 0:o.id})}export{u as WorkspaceReportingPage};