@qodo/design-system 0.20.13 → 0.20.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -147,7 +147,7 @@ React keys must be passed directly to JSX without using spread:
147
147
  *
148
148
  * This source code is licensed under the ISC license.
149
149
  * See the LICENSE file in the root directory of this source tree.
150
- */const ih=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ao=Ce("x",ih),ac=Bt("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none cursor-pointer",{variants:{variant:{default:"bg-[var(--fill-action-emphasis-idle)] text-[var(--text-action-on-emphasis-idle)] hover:bg-[var(--fill-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-[var(--fill-action-emphasis-disabled)]",secondary:"bg-[var(--fill-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-[var(--fill-action-neutral-disabled)] disabled:text-[var(--text-action-neutral-disabled)]",outline:"border border-[var(--border-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",ghost:"text-[var(--text-action-neutral-idle)] hover:text-[var(--text-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",link:"text-[var(--text-action-emphasis-idle)] hover:text-[var(--text-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-none disabled:text-[var(--text-action-emphasis-disabled)]",danger:"border border-[var(--border-action-negative-idle)] text-[var(--icon-action-negative-idle)] hover:bg-[var(--fill-action-negative-hover)] active:bg-[var(--fill-action-negative-active)] disabled:border-[var(--border-action-negative-disabled)] disabled:text-[var(--icon-action-negative-disabled)]"},size:{default:"h-10 px-4 py-2",xs:"h-fit rounded-md text-xs px-2 py-1.5",sm:"h-8 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10","icon-sm":"h-7 w-7 p-1.5 rounded-md","icon-md":"h-8 w-8 p-1.5 rounded-md","icon-lg":"h-[45px] w-[45px] p-3 rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),Be=d.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,icon:s,iconPosition:i="left",...c},u)=>{const f=s&&l.jsx(s,{className:P("w-4 h-4 transition-opacity",{"mr-2":o&&i==="left","ml-2":o&&i!=="left","opacity-50":a||n})});return l.jsxs("button",{className:P(ac({variant:t,size:r,className:e})),ref:u,disabled:a||n,...c,children:[i==="left"&&f,o,i==="right"&&f,n&&l.jsx(nc,{className:"ml-2 w-4 h-4 animate-spin"})]})});Be.displayName="Button";const lh=Bt("qodo qodo-input file:text-foreground placeholder:text-purple-muted-400 selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-purple-muted-900 px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-none focus-visible:ring-none aria-invalid:border-red-600 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:bg-[var(--fill-input-neutral-idle)] disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:cursor-default md:text-sm dark:border-input-neutral-idle dark:bg-purple-muted-900 dark:text-foreground dark:placeholder:text-[var(--color-purple-muted-400)] [:not(:placeholder-shown)]:bg-purple-muted-700 [&[readonly]]:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:border-0 [&[readonly]]:text-[var(--text-input-neutral-idle)] [&[readonly]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:hover:border-[var(--border-input-neutral-idle)] [&[readonly]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus:border-[var(--border-input-neutral-idle)] [&[readonly]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus-visible:border-[var(--border-input-neutral-idle)] [&[readonly][disabled]]:opacity-100 [&[readonly][disabled]]:cursor-default [&[readonly][disabled]]:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:border-0 [&[readonly][disabled]]:text-[var(--text-input-neutral-idle)] [&[readonly][disabled]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:hover:border-0 [&[readonly][disabled]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:focus:border-0 [&[readonly][disabled]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:focus-visible:border-0",{variants:{variant:{default:"dark:focus-visible:bg-fill-input-neutral-idle dark:hover:bg-purple-muted-700 border-purple-muted-600 hover:bg-fill-input-neutral-hover focus:bg-purple-muted-700 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none [&[readonly]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:hover:border-0 [&[readonly]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus:border-0 [&[readonly]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus-visible:border-0",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-color-purple-muted-400 dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-purple-muted-400",accent:"bg-accent border-accent text-accent-foreground placeholder:text-color-purple-muted-400 dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-purple-muted-400",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive bg-purple-muted-700 text-[--var(text-input-neutral-idle)] placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70",ghost:"bg-transparent border-purple-muted-600 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none [:not(:placeholder-shown)]:bg-transparent"}},defaultVariants:{variant:"default"}}),Jr=d.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>l.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:P(lh({variant:t,className:e})),...o}));Jr.displayName="Input";function Si(e,[t,r]){return Math.min(r,Math.max(t,e))}function K(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ch(e,t){const r=d.createContext(t),n=a=>{const{children:s,...i}=a,c=d.useMemo(()=>i,Object.values(i));return l.jsx(r.Provider,{value:c,children:s})};n.displayName=e+"Provider";function o(a){const s=d.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function je(e,t=[]){let r=[];function n(a,s){const i=d.createContext(s),c=r.length;r=[...r,s];const u=p=>{var b;const{scope:m,children:g,...h}=p,v=((b=m==null?void 0:m[e])==null?void 0:b[c])||i,x=d.useMemo(()=>h,Object.values(h));return l.jsx(v.Provider,{value:x,children:g})};u.displayName=a+"Provider";function f(p,m){var v;const g=((v=m==null?void 0:m[e])==null?void 0:v[c])||i,h=d.useContext(g);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(s=>d.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,uh(o,...t)]}function uh(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...i,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Ei(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ie(...e){return t=>{let r=!1;const n=e.map(o=>{const a=Ei(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():Ei(e[o],null)}}}}function le(...e){return d.useCallback(Ie(...e),e)}function Ri(e){const t=dh(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(ph);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function dh(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=gh(o),i=mh(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ie(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fh=Symbol("radix.slottable");function ph(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fh}function mh(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function gh(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function so(e){const t=e+"CollectionProvider",[r,n]=je(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:x,children:b}=v,y=E.useRef(null),w=E.useRef(new Map).current;return l.jsx(o,{scope:x,itemMap:w,collectionRef:y,children:b})};s.displayName=t;const i=e+"CollectionSlot",c=Ri(i),u=E.forwardRef((v,x)=>{const{scope:b,children:y}=v,w=a(i,b),C=le(x,w.collectionRef);return l.jsx(c,{ref:C,children:y})});u.displayName=i;const f=e+"CollectionItemSlot",p="data-radix-collection-item",m=Ri(f),g=E.forwardRef((v,x)=>{const{scope:b,children:y,...w}=v,C=E.useRef(null),R=le(x,C),j=a(f,b);return E.useEffect(()=>(j.itemMap.set(C,{ref:C,...w}),()=>void j.itemMap.delete(C))),l.jsx(m,{[p]:"",ref:R,children:y})});g.displayName=f;function h(v){const x=a(e+"CollectionConsumer",v);return E.useCallback(()=>{const y=x.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((j,k)=>w.indexOf(j.ref.current)-w.indexOf(k.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},h,n]}var vh=d.createContext(void 0);function Gt(e){const t=d.useContext(vh);return e||t||"ltr"}function hh(e){const t=xh(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(yh);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function xh(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=Ch(o),i=wh(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ie(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bh=Symbol("radix.slottable");function yh(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bh}function wh(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Ch(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Sh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=Sh.reduce((e,t)=>{const r=hh(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:s,...i}=o,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function sc(e,t){e&&no.flushSync(()=>e.dispatchEvent(t))}function ze(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Eh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e);d.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Rh="DismissableLayer",ga="dismissableLayer.update",kh="dismissableLayer.pointerDownOutside",Nh="dismissableLayer.focusOutside",ki,ic=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,u=d.useContext(ic),[f,p]=d.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),h=le(t,k=>p(k)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(x),y=f?v.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=b,R=Th(k=>{const N=k.target,$=[...u.branches].some(V=>V.contains(N));!C||$||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},m),j=Ah(k=>{const N=k.target;[...u.branches].some(V=>V.contains(N))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},m);return Eh(k=>{y===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},m),d.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ki=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Ni(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ki)}},[f,m,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Ni())},[f,u]),d.useEffect(()=>{const k=()=>g({});return document.addEventListener(ga,k),()=>document.removeEventListener(ga,k)},[]),l.jsx(ne.div,{...c,ref:h,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,j.onFocusCapture),onBlurCapture:K(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,R.onPointerDownCapture)})});gr.displayName=Rh;var jh="DismissableLayerBranch",Ph=d.forwardRef((e,t)=>{const r=d.useContext(ic),n=d.useRef(null),o=le(t,n);return d.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),l.jsx(ne.div,{...e,ref:o})});Ph.displayName=jh;function Th(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let c=function(){lc(kh,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Ah(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!n.current&&lc(Nh,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ni(){const e=new CustomEvent(ga);document.dispatchEvent(e)}function lc(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?sc(o,a):o.dispatchEvent(a)}var Yo=0;function io(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ji()),document.body.insertAdjacentElement("beforeend",e[1]??ji()),Yo++,()=>{Yo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Yo--}},[])}function ji(){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 Xo="focusScope.autoFocusOnMount",Zo="focusScope.autoFocusOnUnmount",Pi={bubbles:!1,cancelable:!0},Ih="FocusScope",Qr=d.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=d.useState(null),u=ze(o),f=ze(a),p=d.useRef(null),m=le(t,v=>c(v)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(n){let v=function(w){if(g.paused||!i)return;const C=w.target;i.contains(C)?p.current=C:pt(p.current,{select:!0})},x=function(w){if(g.paused||!i)return;const C=w.relatedTarget;C!==null&&(i.contains(C)||pt(p.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const R of w)R.removedNodes.length>0&&pt(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const y=new MutationObserver(b);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),y.disconnect()}}},[n,i,g.paused]),d.useEffect(()=>{if(i){Ai.add(g);const v=document.activeElement;if(!i.contains(v)){const b=new CustomEvent(Xo,Pi);i.addEventListener(Xo,u),i.dispatchEvent(b),b.defaultPrevented||(_h(Lh(cc(i)),{select:!0}),document.activeElement===v&&pt(i))}return()=>{i.removeEventListener(Xo,u),setTimeout(()=>{const b=new CustomEvent(Zo,Pi);i.addEventListener(Zo,f),i.dispatchEvent(b),b.defaultPrevented||pt(v??document.body,{select:!0}),i.removeEventListener(Zo,f),Ai.remove(g)},0)}}},[i,u,f,g]);const h=d.useCallback(v=>{if(!r&&!n||g.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(x&&b){const y=v.currentTarget,[w,C]=Oh(y);w&&C?!v.shiftKey&&b===C?(v.preventDefault(),r&&pt(w,{select:!0})):v.shiftKey&&b===w&&(v.preventDefault(),r&&pt(C,{select:!0})):b===y&&v.preventDefault()}},[r,n,g.paused]);return l.jsx(ne.div,{tabIndex:-1,...s,ref:m,onKeyDown:h})});Qr.displayName=Ih;function _h(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(pt(n,{select:t}),document.activeElement!==r)return}function Oh(e){const t=cc(e),r=Ti(t,e),n=Ti(t.reverse(),e);return[r,n]}function cc(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ti(e,t){for(const r of e)if(!Mh(r,{upTo:t}))return r}function Mh(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 Dh(e){return e instanceof HTMLInputElement&&"select"in e}function pt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Dh(e)&&t&&e.select()}}var Ai=$h();function $h(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Ii(e,t),e.unshift(t)},remove(t){var r;e=Ii(e,t),(r=e[0])==null||r.resume()}}}function Ii(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Lh(e){return e.filter(t=>t.tagName!=="A")}var Ne=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Fh=d[" useId ".trim().toString()]||(()=>{}),Vh=0;function be(e){const[t,r]=d.useState(Fh());return Ne(()=>{r(n=>n??String(Vh++))},[e]),t?`radix-${t}`:""}const Bh=["top","right","bottom","left"],vt=Math.min,De=Math.max,Vn=Math.round,kn=Math.floor,et=e=>({x:e,y:e}),Gh={left:"right",right:"left",bottom:"top",top:"bottom"},Wh={start:"end",end:"start"};function va(e,t,r){return De(e,vt(t,r))}function lt(e,t){return typeof e=="function"?e(t):e}function ct(e){return e.split("-")[0]}function vr(e){return e.split("-")[1]}function Wa(e){return e==="x"?"y":"x"}function za(e){return e==="y"?"height":"width"}const zh=new Set(["top","bottom"]);function Qe(e){return zh.has(ct(e))?"y":"x"}function qa(e){return Wa(Qe(e))}function qh(e,t,r){r===void 0&&(r=!1);const n=vr(e),o=qa(e),a=za(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bn(s)),[s,Bn(s)]}function Hh(e){const t=Bn(e);return[ha(e),t,ha(t)]}function ha(e){return e.replace(/start|end/g,t=>Wh[t])}const _i=["left","right"],Oi=["right","left"],Uh=["top","bottom"],Kh=["bottom","top"];function Yh(e,t,r){switch(e){case"top":case"bottom":return r?t?Oi:_i:t?_i:Oi;case"left":case"right":return t?Uh:Kh;default:return[]}}function Xh(e,t,r,n){const o=vr(e);let a=Yh(ct(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(ha)))),a}function Bn(e){return e.replace(/left|right|bottom|top/g,t=>Gh[t])}function Zh(e){return{top:0,right:0,bottom:0,left:0,...e}}function uc(e){return typeof e!="number"?Zh(e):{top:e,right:e,bottom:e,left:e}}function Gn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Mi(e,t,r){let{reference:n,floating:o}=e;const a=Qe(t),s=qa(t),i=za(s),c=ct(t),u=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,m=n[i]/2-o[i]/2;let g;switch(c){case"top":g={x:f,y:n.y-o.height};break;case"bottom":g={x:f,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:p};break;case"left":g={x:n.x-o.width,y:p};break;default:g={x:n.x,y:n.y}}switch(vr(t)){case"start":g[s]-=m*(r&&u?-1:1);break;case"end":g[s]+=m*(r&&u?-1:1);break}return g}const Jh=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Mi(u,n,c),m=n,g={},h=0;for(let v=0;v<i.length;v++){const{name:x,fn:b}=i[v],{x:y,y:w,data:C,reset:R}=await b({x:f,y:p,initialPlacement:n,placement:m,strategy:o,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});f=y??f,p=w??p,g={...g,[x]:{...g[x],...C}},R&&h<=50&&(h++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:f,y:p}=Mi(u,m,c)),v=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:g}};async function Wr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=lt(t,e),h=uc(g),x=i[m?p==="floating"?"reference":"floating":p],b=Gn(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:c})),y=p==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),C=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},R=Gn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:w,strategy:c}):y);return{top:(b.top-R.top+h.top)/C.y,bottom:(R.bottom-b.bottom+h.bottom)/C.y,left:(b.left-R.left+h.left)/C.x,right:(R.right-b.right+h.right)/C.x}}const Qh=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:u,padding:f=0}=lt(e,t)||{};if(u==null)return{};const p=uc(f),m={x:r,y:n},g=qa(o),h=za(g),v=await s.getDimensions(u),x=g==="y",b=x?"top":"left",y=x?"bottom":"right",w=x?"clientHeight":"clientWidth",C=a.reference[h]+a.reference[g]-m[g]-a.floating[h],R=m[g]-a.reference[g],j=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=j?j[w]:0;(!k||!await(s.isElement==null?void 0:s.isElement(j)))&&(k=i.floating[w]||a.floating[h]);const N=C/2-R/2,$=k/2-v[h]/2-1,V=vt(p[b],$),q=vt(p[y],$),Q=V,Z=k-v[h]-q,z=k/2-v[h]/2+N,M=va(Q,z,Z),_=!c.arrow&&vr(o)!=null&&z!==M&&a.reference[h]/2-(z<Q?V:q)-v[h]/2<0,D=_?z<Q?z-Q:z-Z:0;return{[g]:m[g]+D,data:{[g]:M,centerOffset:z-M-D,..._&&{alignmentOffset:D}},reset:_}}}),ex=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...x}=lt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const b=ct(o),y=Qe(i),w=ct(i)===i,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=m||(w||!v?[Bn(i)]:Hh(i)),j=h!=="none";!m&&j&&R.push(...Xh(i,v,h,C));const k=[i,...R],N=await Wr(t,x),$=[];let V=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&$.push(N[b]),p){const z=qh(o,s,C);$.push(N[z[0]],N[z[1]])}if(V=[...V,{placement:o,overflows:$}],!$.every(z=>z<=0)){var q,Q;const z=(((q=a.flip)==null?void 0:q.index)||0)+1,M=k[z];if(M&&(!(p==="alignment"?y!==Qe(M):!1)||V.every(T=>Qe(T.placement)===y?T.overflows[0]>0:!0)))return{data:{index:z,overflows:V},reset:{placement:M}};let _=(Q=V.filter(D=>D.overflows[0]<=0).sort((D,T)=>D.overflows[1]-T.overflows[1])[0])==null?void 0:Q.placement;if(!_)switch(g){case"bestFit":{var Z;const D=(Z=V.filter(T=>{if(j){const O=Qe(T.placement);return O===y||O==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(O=>O>0).reduce((O,U)=>O+U,0)]).sort((T,O)=>T[1]-O[1])[0])==null?void 0:Z[0];D&&(_=D);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Di(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $i(e){return Bh.some(t=>e[t]>=0)}const tx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=lt(e,t);switch(n){case"referenceHidden":{const a=await Wr(t,{...o,elementContext:"reference"}),s=Di(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:$i(s)}}}case"escaped":{const a=await Wr(t,{...o,altBoundary:!0}),s=Di(a,r.floating);return{data:{escapedOffsets:s,escaped:$i(s)}}}default:return{}}}}},dc=new Set(["left","top"]);async function rx(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=ct(r),i=vr(r),c=Qe(r)==="y",u=dc.has(s)?-1:1,f=a&&c?-1:1,p=lt(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof h=="number"&&(g=i==="end"?h*-1:h),c?{x:g*f,y:m*u}:{x:m*u,y:g*f}}const nx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,c=await rx(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},ox=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:x=>{let{x:b,y}=x;return{x:b,y}}},...c}=lt(e,t),u={x:r,y:n},f=await Wr(t,c),p=Qe(ct(o)),m=Wa(p);let g=u[m],h=u[p];if(a){const x=m==="y"?"top":"left",b=m==="y"?"bottom":"right",y=g+f[x],w=g-f[b];g=va(y,g,w)}if(s){const x=p==="y"?"top":"left",b=p==="y"?"bottom":"right",y=h+f[x],w=h-f[b];h=va(y,h,w)}const v=i.fn({...t,[m]:g,[p]:h});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:a,[p]:s}}}}}},ax=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=lt(e,t),f={x:r,y:n},p=Qe(o),m=Wa(p);let g=f[m],h=f[p];const v=lt(i,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const w=m==="y"?"height":"width",C=a.reference[m]-a.floating[w]+x.mainAxis,R=a.reference[m]+a.reference[w]-x.mainAxis;g<C?g=C:g>R&&(g=R)}if(u){var b,y;const w=m==="y"?"width":"height",C=dc.has(ct(o)),R=a.reference[p]-a.floating[w]+(C&&((b=s.offset)==null?void 0:b[p])||0)+(C?0:x.crossAxis),j=a.reference[p]+a.reference[w]+(C?0:((y=s.offset)==null?void 0:y[p])||0)-(C?x.crossAxis:0);h<R?h=R:h>j&&(h=j)}return{[m]:g,[p]:h}}}},sx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:c=()=>{},...u}=lt(e,t),f=await Wr(t,u),p=ct(o),m=vr(o),g=Qe(o)==="y",{width:h,height:v}=a.floating;let x,b;p==="top"||p==="bottom"?(x=p,b=m===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=p,x=m==="end"?"top":"bottom");const y=v-f.top-f.bottom,w=h-f.left-f.right,C=vt(v-f[x],y),R=vt(h-f[b],w),j=!t.middlewareData.shift;let k=C,N=R;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=y),j&&!m){const V=De(f.left,0),q=De(f.right,0),Q=De(f.top,0),Z=De(f.bottom,0);g?N=h-2*(V!==0||q!==0?V+q:De(f.left,f.right)):k=v-2*(Q!==0||Z!==0?Q+Z:De(f.top,f.bottom))}await c({...t,availableWidth:N,availableHeight:k});const $=await s.getDimensions(i.floating);return h!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function lo(){return typeof window<"u"}function hr(e){return fc(e)?(e.nodeName||"").toLowerCase():"#document"}function $e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rt(e){var t;return(t=(fc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fc(e){return lo()?e instanceof Node||e instanceof $e(e).Node:!1}function qe(e){return lo()?e instanceof Element||e instanceof $e(e).Element:!1}function tt(e){return lo()?e instanceof HTMLElement||e instanceof $e(e).HTMLElement:!1}function Li(e){return!lo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $e(e).ShadowRoot}const ix=new Set(["inline","contents"]);function en(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=He(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!ix.has(o)}const lx=new Set(["table","td","th"]);function cx(e){return lx.has(hr(e))}const ux=[":popover-open",":modal"];function co(e){return ux.some(t=>{try{return e.matches(t)}catch{return!1}})}const dx=["transform","translate","scale","rotate","perspective"],fx=["transform","translate","scale","rotate","perspective","filter"],px=["paint","layout","strict","content"];function Ha(e){const t=Ua(),r=qe(e)?He(e):e;return dx.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||fx.some(n=>(r.willChange||"").includes(n))||px.some(n=>(r.contain||"").includes(n))}function mx(e){let t=ht(e);for(;tt(t)&&!cr(t);){if(Ha(t))return t;if(co(t))return null;t=ht(t)}return null}function Ua(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const gx=new Set(["html","body","#document"]);function cr(e){return gx.has(hr(e))}function He(e){return $e(e).getComputedStyle(e)}function uo(e){return qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if(hr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Li(e)&&e.host||rt(e);return Li(t)?t.host:t}function pc(e){const t=ht(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&en(t)?t:pc(t)}function zr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=pc(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=$e(o);if(a){const i=xa(s);return t.concat(s,s.visualViewport||[],en(o)?o:[],i&&r?zr(i):[])}return t.concat(o,zr(o,[],r))}function xa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mc(e){const t=He(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=tt(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=Vn(r)!==a||Vn(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function Ka(e){return qe(e)?e:e.contextElement}function ir(e){const t=Ka(e);if(!tt(t))return et(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=mc(t);let s=(a?Vn(r.width):r.width)/n,i=(a?Vn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const vx=et(0);function gc(e){const t=$e(e);return!Ua()||!t.visualViewport?vx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hx(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==$e(e)?!1:t}function _t(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Ka(e);let s=et(1);t&&(n?qe(n)&&(s=ir(n)):s=ir(e));const i=hx(a,r,n)?gc(a):et(0);let c=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(a){const m=$e(a),g=n&&qe(n)?$e(n):n;let h=m,v=xa(h);for(;v&&n&&g!==h;){const x=ir(v),b=v.getBoundingClientRect(),y=He(v),w=b.left+(v.clientLeft+parseFloat(y.paddingLeft))*x.x,C=b.top+(v.clientTop+parseFloat(y.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,p*=x.y,c+=w,u+=C,h=$e(v),v=xa(h)}}return Gn({width:f,height:p,x:c,y:u})}function fo(e,t){const r=uo(e).scrollLeft;return t?t.left+r:_t(rt(e)).left+r}function vc(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-fo(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function xx(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=rt(n),i=t?co(t.floating):!1;if(n===s||i&&a)return r;let c={scrollLeft:0,scrollTop:0},u=et(1);const f=et(0),p=tt(n);if((p||!p&&!a)&&((hr(n)!=="body"||en(s))&&(c=uo(n)),tt(n))){const g=_t(n);u=ir(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const m=s&&!p&&!a?vc(s,c):et(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:r.y*u.y-c.scrollTop*u.y+f.y+m.y}}function bx(e){return Array.from(e.getClientRects())}function yx(e){const t=rt(e),r=uo(e),n=e.ownerDocument.body,o=De(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=De(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+fo(e);const i=-r.scrollTop;return He(n).direction==="rtl"&&(s+=De(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Fi=25;function wx(e,t){const r=$e(e),n=rt(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const f=Ua();(!f||f&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const u=fo(n);if(u<=0){const f=n.ownerDocument,p=f.body,m=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(n.clientWidth-p.clientWidth-g);h<=Fi&&(a-=h)}else u<=Fi&&(a+=u);return{width:a,height:s,x:i,y:c}}const Cx=new Set(["absolute","fixed"]);function Sx(e,t){const r=_t(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=tt(e)?ir(e):et(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,u=n*a.y;return{width:s,height:i,x:c,y:u}}function Vi(e,t,r){let n;if(t==="viewport")n=wx(e,r);else if(t==="document")n=yx(rt(e));else if(qe(t))n=Sx(t,r);else{const o=gc(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Gn(n)}function hc(e,t){const r=ht(e);return r===t||!qe(r)||cr(r)?!1:He(r).position==="fixed"||hc(r,t)}function Ex(e,t){const r=t.get(e);if(r)return r;let n=zr(e,[],!1).filter(i=>qe(i)&&hr(i)!=="body"),o=null;const a=He(e).position==="fixed";let s=a?ht(e):e;for(;qe(s)&&!cr(s);){const i=He(s),c=Ha(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&Cx.has(o.position)||en(s)&&!c&&hc(e,s))?n=n.filter(f=>f!==s):o=i,s=ht(s)}return t.set(e,n),n}function Rx(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?co(t)?[]:Ex(t,this._c):[].concat(r),n],i=s[0],c=s.reduce((u,f)=>{const p=Vi(t,f,o);return u.top=De(p.top,u.top),u.right=vt(p.right,u.right),u.bottom=vt(p.bottom,u.bottom),u.left=De(p.left,u.left),u},Vi(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function kx(e){const{width:t,height:r}=mc(e);return{width:t,height:r}}function Nx(e,t,r){const n=tt(t),o=rt(t),a=r==="fixed",s=_t(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=et(0);function u(){c.x=fo(o)}if(n||!n&&!a)if((hr(t)!=="body"||en(o))&&(i=uo(t)),n){const g=_t(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?vc(o,i):et(0),p=s.left+i.scrollLeft-c.x-f.x,m=s.top+i.scrollTop-c.y-f.y;return{x:p,y:m,width:s.width,height:s.height}}function Jo(e){return He(e).position==="static"}function Bi(e,t){if(!tt(e)||He(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return rt(e)===r&&(r=r.ownerDocument.body),r}function xc(e,t){const r=$e(e);if(co(e))return r;if(!tt(e)){let o=ht(e);for(;o&&!cr(o);){if(qe(o)&&!Jo(o))return o;o=ht(o)}return r}let n=Bi(e,t);for(;n&&cx(n)&&Jo(n);)n=Bi(n,t);return n&&cr(n)&&Jo(n)&&!Ha(n)?r:n||mx(e)||r}const jx=async function(e){const t=this.getOffsetParent||xc,r=this.getDimensions,n=await r(e.floating);return{reference:Nx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Px(e){return He(e).direction==="rtl"}const Tx={convertOffsetParentRelativeRectToViewportRelativeRect:xx,getDocumentElement:rt,getClippingRect:Rx,getOffsetParent:xc,getElementRects:jx,getClientRects:bx,getDimensions:kx,getScale:ir,isElement:qe,isRTL:Px};function bc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ax(e,t){let r=null,n;const o=rt(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=u;if(i||t(),!m||!g)return;const h=kn(p),v=kn(o.clientWidth-(f+m)),x=kn(o.clientHeight-(p+g)),b=kn(f),w={rootMargin:-h+"px "+-v+"px "+-x+"px "+-b+"px",threshold:De(0,vt(1,c))||1};let C=!0;function R(j){const k=j[0].intersectionRatio;if(k!==c){if(!C)return s();k?s(!1,k):n=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!bc(u,e.getBoundingClientRect())&&s(),C=!1}try{r=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(R,w)}r.observe(e)}return s(!0),a}function Ix(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Ka(e),f=o||a?[...u?zr(u):[],...zr(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),a&&b.addEventListener("resize",r)});const p=u&&i?Ax(u,r):null;let m=-1,g=null;s&&(g=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),r()}),u&&!c&&g.observe(u),g.observe(t));let h,v=c?_t(e):null;c&&x();function x(){const b=_t(e);v&&!bc(v,b)&&r(),v=b,h=requestAnimationFrame(x)}return r(),()=>{var b;f.forEach(y=>{o&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),p==null||p(),(b=g)==null||b.disconnect(),g=null,c&&cancelAnimationFrame(h)}}const _x=nx,Ox=ox,Mx=ex,Dx=sx,$x=tx,Gi=Qh,Lx=ax,Fx=(e,t,r)=>{const n=new Map,o={platform:Tx,...r},a={...o.platform,_c:n};return Jh(e,t,{...o,platform:a})};var Vx=typeof document<"u",Bx=function(){},On=Vx?E.useLayoutEffect:Bx;function Wn(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Wn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Wn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function yc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wi(e,t){const r=yc(e);return Math.round(t*r)/r}function Qo(e){const t=d.useRef(e);return On(()=>{t.current=e}),t}function Gx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=d.useState(n);Wn(m,n)||g(n);const[h,v]=d.useState(null),[x,b]=d.useState(null),y=d.useCallback(T=>{T!==j.current&&(j.current=T,v(T))},[]),w=d.useCallback(T=>{T!==k.current&&(k.current=T,b(T))},[]),C=a||h,R=s||x,j=d.useRef(null),k=d.useRef(null),N=d.useRef(f),$=c!=null,V=Qo(c),q=Qo(o),Q=Qo(u),Z=d.useCallback(()=>{if(!j.current||!k.current)return;const T={placement:t,strategy:r,middleware:m};q.current&&(T.platform=q.current),Fx(j.current,k.current,T).then(O=>{const U={...O,isPositioned:Q.current!==!1};z.current&&!Wn(N.current,U)&&(N.current=U,no.flushSync(()=>{p(U)}))})},[m,t,r,q,Q]);On(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(T=>({...T,isPositioned:!1})))},[u]);const z=d.useRef(!1);On(()=>(z.current=!0,()=>{z.current=!1}),[]),On(()=>{if(C&&(j.current=C),R&&(k.current=R),C&&R){if(V.current)return V.current(C,R,Z);Z()}},[C,R,Z,V,$]);const M=d.useMemo(()=>({reference:j,floating:k,setReference:y,setFloating:w}),[y,w]),_=d.useMemo(()=>({reference:C,floating:R}),[C,R]),D=d.useMemo(()=>{const T={position:r,left:0,top:0};if(!_.floating)return T;const O=Wi(_.floating,f.x),U=Wi(_.floating,f.y);return i?{...T,transform:"translate("+O+"px, "+U+"px)",...yc(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:U}},[r,i,_.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:Z,refs:M,elements:_,floatingStyles:D}),[f,Z,M,_,D])}const Wx=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Gi({element:n.current,padding:o}).fn(r):{}:n?Gi({element:n,padding:o}).fn(r):{}}}},zx=(e,t)=>({..._x(e),options:[e,t]}),qx=(e,t)=>({...Ox(e),options:[e,t]}),Hx=(e,t)=>({...Lx(e),options:[e,t]}),Ux=(e,t)=>({...Mx(e),options:[e,t]}),Kx=(e,t)=>({...Dx(e),options:[e,t]}),Yx=(e,t)=>({...$x(e),options:[e,t]}),Xx=(e,t)=>({...Wx(e),options:[e,t]});var Zx="Arrow",wc=d.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return l.jsx(ne.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});wc.displayName=Zx;var Jx=wc;function po(e){const[t,r]=d.useState(void 0);return Ne(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Ya="Popper",[Cc,bt]=je(Ya),[Qx,Sc]=Cc(Ya),Ec=e=>{const{__scopePopper:t,children:r}=e,[n,o]=d.useState(null);return l.jsx(Qx,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ec.displayName=Ya;var Rc="PopperAnchor",kc=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Sc(Rc,r),s=d.useRef(null),i=le(t,s),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||s.current,u!==c.current&&a.onAnchorChange(c.current)}),n?null:l.jsx(ne.div,{...o,ref:i})});kc.displayName=Rc;var Xa="PopperContent",[eb,tb]=Cc(Xa),Nc=d.forwardRef((e,t)=>{var I,W,G,ee,te,L;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:h,...v}=e,x=Sc(Xa,r),[b,y]=d.useState(null),w=le(t,se=>y(se)),[C,R]=d.useState(null),j=po(C),k=(j==null?void 0:j.width)??0,N=(j==null?void 0:j.height)??0,$=n+(a!=="center"?"-"+a:""),V=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},q=Array.isArray(u)?u:[u],Q=q.length>0,Z={padding:V,boundary:q.filter(nb),altBoundary:Q},{refs:z,floatingStyles:M,placement:_,isPositioned:D,middlewareData:T}=Gx({strategy:"fixed",placement:$,whileElementsMounted:(...se)=>Ix(...se,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[zx({mainAxis:o+N,alignmentAxis:s}),c&&qx({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Hx():void 0,...Z}),c&&Ux({...Z}),Kx({...Z,apply:({elements:se,rects:ue,availableWidth:me,availableHeight:xe})=>{const{width:Ee,height:Le}=ue.reference,Re=se.floating.style;Re.setProperty("--radix-popper-available-width",`${me}px`),Re.setProperty("--radix-popper-available-height",`${xe}px`),Re.setProperty("--radix-popper-anchor-width",`${Ee}px`),Re.setProperty("--radix-popper-anchor-height",`${Le}px`)}}),C&&Xx({element:C,padding:i}),ob({arrowWidth:k,arrowHeight:N}),m&&Yx({strategy:"referenceHidden",...Z})]}),[O,U]=Tc(_),J=ze(h);Ne(()=>{D&&(J==null||J())},[D,J]);const A=(I=T.arrow)==null?void 0:I.x,H=(W=T.arrow)==null?void 0:W.y,X=((G=T.arrow)==null?void 0:G.centerOffset)!==0,[Y,F]=d.useState();return Ne(()=>{b&&F(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:D?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[(ee=T.transformOrigin)==null?void 0:ee.x,(te=T.transformOrigin)==null?void 0:te.y].join(" "),...((L=T.hide)==null?void 0:L.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(eb,{scope:r,placedSide:O,onArrowChange:R,arrowX:A,arrowY:H,shouldHideArrow:X,children:l.jsx(ne.div,{"data-side":O,"data-align":U,...v,ref:w,style:{...v.style,animation:D?void 0:"none"}})})})});Nc.displayName=Xa;var jc="PopperArrow",rb={top:"bottom",right:"left",bottom:"top",left:"right"},Pc=d.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=tb(jc,n),s=rb[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(Jx,{...o,ref:r,style:{...o.style,display:"block"}})})});Pc.displayName=jc;function nb(e){return e!==null}var ob=e=>({name:"transformOrigin",options:e,fn(t){var x,b,y;const{placement:r,rects:n,middlewareData:o}=t,s=((x=o.arrow)==null?void 0:x.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,f]=Tc(r),p={start:"0%",center:"50%",end:"100%"}[f],m=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let h="",v="";return u==="bottom"?(h=s?p:`${m}px`,v=`${-c}px`):u==="top"?(h=s?p:`${m}px`,v=`${n.floating.height+c}px`):u==="right"?(h=`${-c}px`,v=s?p:`${g}px`):u==="left"&&(h=`${n.floating.width+c}px`,v=s?p:`${g}px`),{data:{x:h,y:v}}}});function Tc(e){const[t,r="center"]=e.split("-");return[t,r]}var tn=Ec,rn=kc,mo=Nc,go=Pc,ab="Portal",xr=d.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=d.useState(!1);Ne(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Zr.createPortal(l.jsx(ne.div,{...n,ref:t}),s):null});xr.displayName=ab;function sb(e){const t=ib(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(cb);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function ib(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=db(o),i=ub(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ie(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lb=Symbol("radix.slottable");function cb(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lb}function ub(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function db(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var fb=d[" useInsertionEffect ".trim().toString()]||Ne;function ke({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,s]=pb({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const p=f.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"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.`),f.current=i},[i,n])}const u=d.useCallback(f=>{var p;if(i){const m=mb(f)?f(e):f;m!==e&&((p=s.current)==null||p.call(s,m))}else a(f)},[i,e,a,s]);return[c,u]}function pb({defaultProp:e,onChange:t}){const[r,n]=d.useState(e),o=d.useRef(r),a=d.useRef(t);return fb(()=>{a.current=t},[t]),d.useEffect(()=>{var s;o.current!==r&&((s=a.current)==null||s.call(a,r),o.current=r)},[r,o]),[r,n,a]}function mb(e){return typeof e=="function"}function vo(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ac=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"}),gb="VisuallyHidden",Ic=d.forwardRef((e,t)=>l.jsx(ne.span,{...e,ref:t,style:{...Ac,...e.style}}));Ic.displayName=gb;var vb=Ic,hb=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qt=new WeakMap,Nn=new WeakMap,jn={},ea=0,_c=function(e){return e&&(e.host||_c(e.parentNode))},xb=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=_c(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},bb=function(e,t,r,n){var o=xb(t,Array.isArray(e)?e:[e]);jn[r]||(jn[r]=new WeakMap);var a=jn[r],s=[],i=new Set,c=new Set(o),u=function(p){!p||i.has(p)||(i.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(i.has(m))f(m);else try{var g=m.getAttribute(n),h=g!==null&&g!=="false",v=(Qt.get(m)||0)+1,x=(a.get(m)||0)+1;Qt.set(m,v),a.set(m,x),s.push(m),v===1&&h&&Nn.set(m,!0),x===1&&m.setAttribute(r,"true"),h||m.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return f(t),i.clear(),ea++,function(){s.forEach(function(p){var m=Qt.get(p)-1,g=a.get(p)-1;Qt.set(p,m),a.set(p,g),m||(Nn.has(p)||p.removeAttribute(n),Nn.delete(p)),g||p.removeAttribute(r)}),ea--,ea||(Qt=new WeakMap,Qt=new WeakMap,Nn=new WeakMap,jn={})}},ho=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=hb(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),bb(n,o,r,"aria-hidden")):function(){return null}},Je=function(){return Je=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Je.apply(this,arguments)};function Oc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function yb(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Mn="right-scroll-bar-position",Dn="width-before-scroll-bar",wb="with-scroll-bars-hidden",Cb="--removed-body-scroll-bar-size";function ta(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Sb(e,t){var r=E.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Eb=typeof window<"u"?d.useLayoutEffect:d.useEffect,zi=new WeakMap;function Rb(e,t){var r=Sb(null,function(n){return e.forEach(function(o){return ta(o,n)})});return Eb(function(){var n=zi.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(i){a.has(i)||ta(i,null)}),a.forEach(function(i){o.has(i)||ta(i,s)})}zi.set(r,e)},[e]),r}function kb(e){return e}function Nb(e,t){t===void 0&&(t=kb);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var c=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),r}}}};return o}function jb(e){e===void 0&&(e={});var t=Nb(null);return t.options=Je({async:!0,ssr:!1},e),t}var Mc=function(e){var t=e.sideCar,r=Oc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return d.createElement(n,Je({},r))};Mc.isSideCarExport=!0;function Pb(e,t){return e.useMedium(t),Mc}var Dc=jb(),ra=function(){},xo=d.forwardRef(function(e,t){var r=d.useRef(null),n=d.useState({onScrollCapture:ra,onWheelCapture:ra,onTouchMoveCapture:ra}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,g=e.noRelative,h=e.noIsolation,v=e.inert,x=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,C=Oc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=m,j=Rb([r,t]),k=Je(Je({},C),o);return d.createElement(d.Fragment,null,f&&d.createElement(R,{sideCar:Dc,removeScrollBar:u,shards:p,noRelative:g,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:w}),s?d.cloneElement(d.Children.only(i),Je(Je({},k),{ref:j})):d.createElement(y,Je({},k,{className:c,ref:j}),i))});xo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xo.classNames={fullWidth:Dn,zeroRight:Mn};var Tb=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ab(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Tb();return t&&e.setAttribute("nonce",t),e}function Ib(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _b(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ob=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Ab())&&(Ib(t,r),_b(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mb=function(){var e=Ob();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},$c=function(){var e=Mb(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Db={left:0,top:0,right:0,gap:0},na=function(e){return parseInt(e||"",10)||0},$b=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[na(r),na(n),na(o)]},Lb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Db;var t=$b(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Fb=$c(),lr="data-scroll-locked",Vb=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
150
+ */const ih=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ao=Ce("x",ih),ac=Bt("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-normal ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none cursor-pointer",{variants:{variant:{default:"bg-[var(--fill-action-emphasis-idle)] text-[var(--text-action-on-emphasis-idle)] hover:bg-[var(--fill-action-emphasis-hover)] focus:bg-[var(--fill-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-hover)] disabled:bg-[var(--fill-action-emphasis-disabled)]",secondary:"bg-[var(--fill-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-[var(--fill-action-neutral-disabled)] disabled:text-[var(--text-action-neutral-disabled)]",outline:"border border-[var(--border-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",ghost:"text-[var(--text-action-neutral-idle)] hover:text-[var(--text-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",link:"text-[var(--text-action-emphasis-idle)] hover:text-[var(--text-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-none disabled:text-[var(--text-action-emphasis-disabled)]",danger:"border border-[var(--border-action-negative-idle)] text-[var(--icon-action-negative-idle)] hover:bg-[var(--fill-action-negative-hover)] active:bg-[var(--fill-action-negative-active)] disabled:border-[var(--border-action-negative-disabled)] disabled:text-[var(--icon-action-negative-disabled)]"},size:{default:"h-10 px-4 py-2",xs:"h-fit rounded-md text-xs px-2 py-1.5",sm:"h-8 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10","icon-sm":"h-7 w-7 p-1.5 rounded-md","icon-md":"h-8 w-8 p-1.5 rounded-md","icon-lg":"h-[45px] w-[45px] p-3 rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),Be=d.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,icon:s,iconPosition:i="left",...c},u)=>{const f={lg:"w-[18px] h-[18px]",default:"w-[18px] h-[18px]",sm:"w-[18px] h-[18px]",xs:"w-3.5 h-3.5",icon:"w-[18px] h-[18px]","icon-sm":"w-3.5 h-3.5","icon-md":"w-[18px] h-[18px]","icon-lg":"w-[18px] h-[18px]"}[r??"default"],p=s&&l.jsx(s,{className:P(f,"transition-opacity",{"mr-2":o&&i==="left","ml-2":o&&i!=="left","opacity-50":a||n})});return l.jsxs("button",{className:P(ac({variant:t,size:r,className:e})),ref:u,disabled:a||n,...c,children:[i==="left"&&p,o,i==="right"&&p,n&&l.jsx(nc,{className:P("ml-2 animate-spin",f)})]})});Be.displayName="Button";const lh=Bt("qodo qodo-input file:text-foreground placeholder:text-purple-muted-400 selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-purple-muted-900 px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-none focus-visible:ring-none aria-invalid:border-red-600 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:bg-[var(--fill-input-neutral-idle)] disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:cursor-default md:text-sm dark:border-input-neutral-idle dark:bg-purple-muted-900 dark:text-foreground dark:placeholder:text-[var(--color-purple-muted-400)] [:not(:placeholder-shown)]:bg-purple-muted-700 [&[readonly]]:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:border-0 [&[readonly]]:text-[var(--text-input-neutral-idle)] [&[readonly]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:hover:border-[var(--border-input-neutral-idle)] [&[readonly]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus:border-[var(--border-input-neutral-idle)] [&[readonly]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus-visible:border-[var(--border-input-neutral-idle)] [&[readonly][disabled]]:opacity-100 [&[readonly][disabled]]:cursor-default [&[readonly][disabled]]:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:border-0 [&[readonly][disabled]]:text-[var(--text-input-neutral-idle)] [&[readonly][disabled]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:hover:border-0 [&[readonly][disabled]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:focus:border-0 [&[readonly][disabled]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:focus-visible:border-0",{variants:{variant:{default:"dark:focus-visible:bg-fill-input-neutral-idle dark:hover:bg-purple-muted-700 border-purple-muted-600 hover:bg-fill-input-neutral-hover focus:bg-purple-muted-700 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none [&[readonly]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:hover:border-0 [&[readonly]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus:border-0 [&[readonly]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus-visible:border-0",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-color-purple-muted-400 dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-purple-muted-400",accent:"bg-accent border-accent text-accent-foreground placeholder:text-color-purple-muted-400 dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-purple-muted-400",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive bg-purple-muted-700 text-[--var(text-input-neutral-idle)] placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70",ghost:"bg-transparent border-purple-muted-600 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none [:not(:placeholder-shown)]:bg-transparent"}},defaultVariants:{variant:"default"}}),Jr=d.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>l.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:P(lh({variant:t,className:e})),...o}));Jr.displayName="Input";function Si(e,[t,r]){return Math.min(r,Math.max(t,e))}function K(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ch(e,t){const r=d.createContext(t),n=a=>{const{children:s,...i}=a,c=d.useMemo(()=>i,Object.values(i));return l.jsx(r.Provider,{value:c,children:s})};n.displayName=e+"Provider";function o(a){const s=d.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function je(e,t=[]){let r=[];function n(a,s){const i=d.createContext(s),c=r.length;r=[...r,s];const u=p=>{var b;const{scope:m,children:g,...h}=p,v=((b=m==null?void 0:m[e])==null?void 0:b[c])||i,x=d.useMemo(()=>h,Object.values(h));return l.jsx(v.Provider,{value:x,children:g})};u.displayName=a+"Provider";function f(p,m){var v;const g=((v=m==null?void 0:m[e])==null?void 0:v[c])||i,h=d.useContext(g);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(s=>d.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,uh(o,...t)]}function uh(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...i,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Ei(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ie(...e){return t=>{let r=!1;const n=e.map(o=>{const a=Ei(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():Ei(e[o],null)}}}}function le(...e){return d.useCallback(Ie(...e),e)}function Ri(e){const t=dh(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(ph);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function dh(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=gh(o),i=mh(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ie(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fh=Symbol("radix.slottable");function ph(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fh}function mh(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function gh(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function so(e){const t=e+"CollectionProvider",[r,n]=je(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:x,children:b}=v,y=E.useRef(null),w=E.useRef(new Map).current;return l.jsx(o,{scope:x,itemMap:w,collectionRef:y,children:b})};s.displayName=t;const i=e+"CollectionSlot",c=Ri(i),u=E.forwardRef((v,x)=>{const{scope:b,children:y}=v,w=a(i,b),C=le(x,w.collectionRef);return l.jsx(c,{ref:C,children:y})});u.displayName=i;const f=e+"CollectionItemSlot",p="data-radix-collection-item",m=Ri(f),g=E.forwardRef((v,x)=>{const{scope:b,children:y,...w}=v,C=E.useRef(null),R=le(x,C),j=a(f,b);return E.useEffect(()=>(j.itemMap.set(C,{ref:C,...w}),()=>void j.itemMap.delete(C))),l.jsx(m,{[p]:"",ref:R,children:y})});g.displayName=f;function h(v){const x=a(e+"CollectionConsumer",v);return E.useCallback(()=>{const y=x.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((j,k)=>w.indexOf(j.ref.current)-w.indexOf(k.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},h,n]}var vh=d.createContext(void 0);function Gt(e){const t=d.useContext(vh);return e||t||"ltr"}function hh(e){const t=xh(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(yh);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function xh(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=Ch(o),i=wh(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ie(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bh=Symbol("radix.slottable");function yh(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bh}function wh(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Ch(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Sh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=Sh.reduce((e,t)=>{const r=hh(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:s,...i}=o,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function sc(e,t){e&&no.flushSync(()=>e.dispatchEvent(t))}function ze(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Eh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e);d.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Rh="DismissableLayer",ga="dismissableLayer.update",kh="dismissableLayer.pointerDownOutside",Nh="dismissableLayer.focusOutside",ki,ic=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,u=d.useContext(ic),[f,p]=d.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),h=le(t,k=>p(k)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(x),y=f?v.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=b,R=Th(k=>{const N=k.target,$=[...u.branches].some(V=>V.contains(N));!C||$||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},m),j=Ah(k=>{const N=k.target;[...u.branches].some(V=>V.contains(N))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},m);return Eh(k=>{y===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},m),d.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ki=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Ni(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ki)}},[f,m,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Ni())},[f,u]),d.useEffect(()=>{const k=()=>g({});return document.addEventListener(ga,k),()=>document.removeEventListener(ga,k)},[]),l.jsx(ne.div,{...c,ref:h,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,j.onFocusCapture),onBlurCapture:K(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,R.onPointerDownCapture)})});gr.displayName=Rh;var jh="DismissableLayerBranch",Ph=d.forwardRef((e,t)=>{const r=d.useContext(ic),n=d.useRef(null),o=le(t,n);return d.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),l.jsx(ne.div,{...e,ref:o})});Ph.displayName=jh;function Th(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let c=function(){lc(kh,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Ah(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!n.current&&lc(Nh,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ni(){const e=new CustomEvent(ga);document.dispatchEvent(e)}function lc(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?sc(o,a):o.dispatchEvent(a)}var Yo=0;function io(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ji()),document.body.insertAdjacentElement("beforeend",e[1]??ji()),Yo++,()=>{Yo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Yo--}},[])}function ji(){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 Xo="focusScope.autoFocusOnMount",Zo="focusScope.autoFocusOnUnmount",Pi={bubbles:!1,cancelable:!0},Ih="FocusScope",Qr=d.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=d.useState(null),u=ze(o),f=ze(a),p=d.useRef(null),m=le(t,v=>c(v)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(n){let v=function(w){if(g.paused||!i)return;const C=w.target;i.contains(C)?p.current=C:pt(p.current,{select:!0})},x=function(w){if(g.paused||!i)return;const C=w.relatedTarget;C!==null&&(i.contains(C)||pt(p.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const R of w)R.removedNodes.length>0&&pt(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const y=new MutationObserver(b);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),y.disconnect()}}},[n,i,g.paused]),d.useEffect(()=>{if(i){Ai.add(g);const v=document.activeElement;if(!i.contains(v)){const b=new CustomEvent(Xo,Pi);i.addEventListener(Xo,u),i.dispatchEvent(b),b.defaultPrevented||(_h(Lh(cc(i)),{select:!0}),document.activeElement===v&&pt(i))}return()=>{i.removeEventListener(Xo,u),setTimeout(()=>{const b=new CustomEvent(Zo,Pi);i.addEventListener(Zo,f),i.dispatchEvent(b),b.defaultPrevented||pt(v??document.body,{select:!0}),i.removeEventListener(Zo,f),Ai.remove(g)},0)}}},[i,u,f,g]);const h=d.useCallback(v=>{if(!r&&!n||g.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(x&&b){const y=v.currentTarget,[w,C]=Oh(y);w&&C?!v.shiftKey&&b===C?(v.preventDefault(),r&&pt(w,{select:!0})):v.shiftKey&&b===w&&(v.preventDefault(),r&&pt(C,{select:!0})):b===y&&v.preventDefault()}},[r,n,g.paused]);return l.jsx(ne.div,{tabIndex:-1,...s,ref:m,onKeyDown:h})});Qr.displayName=Ih;function _h(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(pt(n,{select:t}),document.activeElement!==r)return}function Oh(e){const t=cc(e),r=Ti(t,e),n=Ti(t.reverse(),e);return[r,n]}function cc(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ti(e,t){for(const r of e)if(!Mh(r,{upTo:t}))return r}function Mh(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 Dh(e){return e instanceof HTMLInputElement&&"select"in e}function pt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Dh(e)&&t&&e.select()}}var Ai=$h();function $h(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Ii(e,t),e.unshift(t)},remove(t){var r;e=Ii(e,t),(r=e[0])==null||r.resume()}}}function Ii(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Lh(e){return e.filter(t=>t.tagName!=="A")}var Ne=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Fh=d[" useId ".trim().toString()]||(()=>{}),Vh=0;function be(e){const[t,r]=d.useState(Fh());return Ne(()=>{r(n=>n??String(Vh++))},[e]),t?`radix-${t}`:""}const Bh=["top","right","bottom","left"],vt=Math.min,De=Math.max,Vn=Math.round,kn=Math.floor,et=e=>({x:e,y:e}),Gh={left:"right",right:"left",bottom:"top",top:"bottom"},Wh={start:"end",end:"start"};function va(e,t,r){return De(e,vt(t,r))}function lt(e,t){return typeof e=="function"?e(t):e}function ct(e){return e.split("-")[0]}function vr(e){return e.split("-")[1]}function Wa(e){return e==="x"?"y":"x"}function za(e){return e==="y"?"height":"width"}const zh=new Set(["top","bottom"]);function Qe(e){return zh.has(ct(e))?"y":"x"}function qa(e){return Wa(Qe(e))}function qh(e,t,r){r===void 0&&(r=!1);const n=vr(e),o=qa(e),a=za(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bn(s)),[s,Bn(s)]}function Hh(e){const t=Bn(e);return[ha(e),t,ha(t)]}function ha(e){return e.replace(/start|end/g,t=>Wh[t])}const _i=["left","right"],Oi=["right","left"],Uh=["top","bottom"],Kh=["bottom","top"];function Yh(e,t,r){switch(e){case"top":case"bottom":return r?t?Oi:_i:t?_i:Oi;case"left":case"right":return t?Uh:Kh;default:return[]}}function Xh(e,t,r,n){const o=vr(e);let a=Yh(ct(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(ha)))),a}function Bn(e){return e.replace(/left|right|bottom|top/g,t=>Gh[t])}function Zh(e){return{top:0,right:0,bottom:0,left:0,...e}}function uc(e){return typeof e!="number"?Zh(e):{top:e,right:e,bottom:e,left:e}}function Gn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Mi(e,t,r){let{reference:n,floating:o}=e;const a=Qe(t),s=qa(t),i=za(s),c=ct(t),u=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,m=n[i]/2-o[i]/2;let g;switch(c){case"top":g={x:f,y:n.y-o.height};break;case"bottom":g={x:f,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:p};break;case"left":g={x:n.x-o.width,y:p};break;default:g={x:n.x,y:n.y}}switch(vr(t)){case"start":g[s]-=m*(r&&u?-1:1);break;case"end":g[s]+=m*(r&&u?-1:1);break}return g}const Jh=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Mi(u,n,c),m=n,g={},h=0;for(let v=0;v<i.length;v++){const{name:x,fn:b}=i[v],{x:y,y:w,data:C,reset:R}=await b({x:f,y:p,initialPlacement:n,placement:m,strategy:o,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});f=y??f,p=w??p,g={...g,[x]:{...g[x],...C}},R&&h<=50&&(h++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:f,y:p}=Mi(u,m,c)),v=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:g}};async function Wr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=lt(t,e),h=uc(g),x=i[m?p==="floating"?"reference":"floating":p],b=Gn(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:c})),y=p==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),C=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},R=Gn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:w,strategy:c}):y);return{top:(b.top-R.top+h.top)/C.y,bottom:(R.bottom-b.bottom+h.bottom)/C.y,left:(b.left-R.left+h.left)/C.x,right:(R.right-b.right+h.right)/C.x}}const Qh=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:u,padding:f=0}=lt(e,t)||{};if(u==null)return{};const p=uc(f),m={x:r,y:n},g=qa(o),h=za(g),v=await s.getDimensions(u),x=g==="y",b=x?"top":"left",y=x?"bottom":"right",w=x?"clientHeight":"clientWidth",C=a.reference[h]+a.reference[g]-m[g]-a.floating[h],R=m[g]-a.reference[g],j=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=j?j[w]:0;(!k||!await(s.isElement==null?void 0:s.isElement(j)))&&(k=i.floating[w]||a.floating[h]);const N=C/2-R/2,$=k/2-v[h]/2-1,V=vt(p[b],$),q=vt(p[y],$),Q=V,Z=k-v[h]-q,z=k/2-v[h]/2+N,M=va(Q,z,Z),_=!c.arrow&&vr(o)!=null&&z!==M&&a.reference[h]/2-(z<Q?V:q)-v[h]/2<0,D=_?z<Q?z-Q:z-Z:0;return{[g]:m[g]+D,data:{[g]:M,centerOffset:z-M-D,..._&&{alignmentOffset:D}},reset:_}}}),ex=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...x}=lt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const b=ct(o),y=Qe(i),w=ct(i)===i,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=m||(w||!v?[Bn(i)]:Hh(i)),j=h!=="none";!m&&j&&R.push(...Xh(i,v,h,C));const k=[i,...R],N=await Wr(t,x),$=[];let V=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&$.push(N[b]),p){const z=qh(o,s,C);$.push(N[z[0]],N[z[1]])}if(V=[...V,{placement:o,overflows:$}],!$.every(z=>z<=0)){var q,Q;const z=(((q=a.flip)==null?void 0:q.index)||0)+1,M=k[z];if(M&&(!(p==="alignment"?y!==Qe(M):!1)||V.every(T=>Qe(T.placement)===y?T.overflows[0]>0:!0)))return{data:{index:z,overflows:V},reset:{placement:M}};let _=(Q=V.filter(D=>D.overflows[0]<=0).sort((D,T)=>D.overflows[1]-T.overflows[1])[0])==null?void 0:Q.placement;if(!_)switch(g){case"bestFit":{var Z;const D=(Z=V.filter(T=>{if(j){const O=Qe(T.placement);return O===y||O==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(O=>O>0).reduce((O,U)=>O+U,0)]).sort((T,O)=>T[1]-O[1])[0])==null?void 0:Z[0];D&&(_=D);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Di(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $i(e){return Bh.some(t=>e[t]>=0)}const tx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=lt(e,t);switch(n){case"referenceHidden":{const a=await Wr(t,{...o,elementContext:"reference"}),s=Di(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:$i(s)}}}case"escaped":{const a=await Wr(t,{...o,altBoundary:!0}),s=Di(a,r.floating);return{data:{escapedOffsets:s,escaped:$i(s)}}}default:return{}}}}},dc=new Set(["left","top"]);async function rx(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=ct(r),i=vr(r),c=Qe(r)==="y",u=dc.has(s)?-1:1,f=a&&c?-1:1,p=lt(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof h=="number"&&(g=i==="end"?h*-1:h),c?{x:g*f,y:m*u}:{x:m*u,y:g*f}}const nx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,c=await rx(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},ox=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:x=>{let{x:b,y}=x;return{x:b,y}}},...c}=lt(e,t),u={x:r,y:n},f=await Wr(t,c),p=Qe(ct(o)),m=Wa(p);let g=u[m],h=u[p];if(a){const x=m==="y"?"top":"left",b=m==="y"?"bottom":"right",y=g+f[x],w=g-f[b];g=va(y,g,w)}if(s){const x=p==="y"?"top":"left",b=p==="y"?"bottom":"right",y=h+f[x],w=h-f[b];h=va(y,h,w)}const v=i.fn({...t,[m]:g,[p]:h});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:a,[p]:s}}}}}},ax=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=lt(e,t),f={x:r,y:n},p=Qe(o),m=Wa(p);let g=f[m],h=f[p];const v=lt(i,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const w=m==="y"?"height":"width",C=a.reference[m]-a.floating[w]+x.mainAxis,R=a.reference[m]+a.reference[w]-x.mainAxis;g<C?g=C:g>R&&(g=R)}if(u){var b,y;const w=m==="y"?"width":"height",C=dc.has(ct(o)),R=a.reference[p]-a.floating[w]+(C&&((b=s.offset)==null?void 0:b[p])||0)+(C?0:x.crossAxis),j=a.reference[p]+a.reference[w]+(C?0:((y=s.offset)==null?void 0:y[p])||0)-(C?x.crossAxis:0);h<R?h=R:h>j&&(h=j)}return{[m]:g,[p]:h}}}},sx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:c=()=>{},...u}=lt(e,t),f=await Wr(t,u),p=ct(o),m=vr(o),g=Qe(o)==="y",{width:h,height:v}=a.floating;let x,b;p==="top"||p==="bottom"?(x=p,b=m===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=p,x=m==="end"?"top":"bottom");const y=v-f.top-f.bottom,w=h-f.left-f.right,C=vt(v-f[x],y),R=vt(h-f[b],w),j=!t.middlewareData.shift;let k=C,N=R;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=y),j&&!m){const V=De(f.left,0),q=De(f.right,0),Q=De(f.top,0),Z=De(f.bottom,0);g?N=h-2*(V!==0||q!==0?V+q:De(f.left,f.right)):k=v-2*(Q!==0||Z!==0?Q+Z:De(f.top,f.bottom))}await c({...t,availableWidth:N,availableHeight:k});const $=await s.getDimensions(i.floating);return h!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function lo(){return typeof window<"u"}function hr(e){return fc(e)?(e.nodeName||"").toLowerCase():"#document"}function $e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rt(e){var t;return(t=(fc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fc(e){return lo()?e instanceof Node||e instanceof $e(e).Node:!1}function qe(e){return lo()?e instanceof Element||e instanceof $e(e).Element:!1}function tt(e){return lo()?e instanceof HTMLElement||e instanceof $e(e).HTMLElement:!1}function Li(e){return!lo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $e(e).ShadowRoot}const ix=new Set(["inline","contents"]);function en(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=He(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!ix.has(o)}const lx=new Set(["table","td","th"]);function cx(e){return lx.has(hr(e))}const ux=[":popover-open",":modal"];function co(e){return ux.some(t=>{try{return e.matches(t)}catch{return!1}})}const dx=["transform","translate","scale","rotate","perspective"],fx=["transform","translate","scale","rotate","perspective","filter"],px=["paint","layout","strict","content"];function Ha(e){const t=Ua(),r=qe(e)?He(e):e;return dx.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||fx.some(n=>(r.willChange||"").includes(n))||px.some(n=>(r.contain||"").includes(n))}function mx(e){let t=ht(e);for(;tt(t)&&!cr(t);){if(Ha(t))return t;if(co(t))return null;t=ht(t)}return null}function Ua(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const gx=new Set(["html","body","#document"]);function cr(e){return gx.has(hr(e))}function He(e){return $e(e).getComputedStyle(e)}function uo(e){return qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if(hr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Li(e)&&e.host||rt(e);return Li(t)?t.host:t}function pc(e){const t=ht(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&en(t)?t:pc(t)}function zr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=pc(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=$e(o);if(a){const i=xa(s);return t.concat(s,s.visualViewport||[],en(o)?o:[],i&&r?zr(i):[])}return t.concat(o,zr(o,[],r))}function xa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mc(e){const t=He(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=tt(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=Vn(r)!==a||Vn(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function Ka(e){return qe(e)?e:e.contextElement}function ir(e){const t=Ka(e);if(!tt(t))return et(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=mc(t);let s=(a?Vn(r.width):r.width)/n,i=(a?Vn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const vx=et(0);function gc(e){const t=$e(e);return!Ua()||!t.visualViewport?vx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hx(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==$e(e)?!1:t}function _t(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Ka(e);let s=et(1);t&&(n?qe(n)&&(s=ir(n)):s=ir(e));const i=hx(a,r,n)?gc(a):et(0);let c=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(a){const m=$e(a),g=n&&qe(n)?$e(n):n;let h=m,v=xa(h);for(;v&&n&&g!==h;){const x=ir(v),b=v.getBoundingClientRect(),y=He(v),w=b.left+(v.clientLeft+parseFloat(y.paddingLeft))*x.x,C=b.top+(v.clientTop+parseFloat(y.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,p*=x.y,c+=w,u+=C,h=$e(v),v=xa(h)}}return Gn({width:f,height:p,x:c,y:u})}function fo(e,t){const r=uo(e).scrollLeft;return t?t.left+r:_t(rt(e)).left+r}function vc(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-fo(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function xx(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=rt(n),i=t?co(t.floating):!1;if(n===s||i&&a)return r;let c={scrollLeft:0,scrollTop:0},u=et(1);const f=et(0),p=tt(n);if((p||!p&&!a)&&((hr(n)!=="body"||en(s))&&(c=uo(n)),tt(n))){const g=_t(n);u=ir(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const m=s&&!p&&!a?vc(s,c):et(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:r.y*u.y-c.scrollTop*u.y+f.y+m.y}}function bx(e){return Array.from(e.getClientRects())}function yx(e){const t=rt(e),r=uo(e),n=e.ownerDocument.body,o=De(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=De(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+fo(e);const i=-r.scrollTop;return He(n).direction==="rtl"&&(s+=De(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Fi=25;function wx(e,t){const r=$e(e),n=rt(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const f=Ua();(!f||f&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const u=fo(n);if(u<=0){const f=n.ownerDocument,p=f.body,m=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(n.clientWidth-p.clientWidth-g);h<=Fi&&(a-=h)}else u<=Fi&&(a+=u);return{width:a,height:s,x:i,y:c}}const Cx=new Set(["absolute","fixed"]);function Sx(e,t){const r=_t(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=tt(e)?ir(e):et(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,u=n*a.y;return{width:s,height:i,x:c,y:u}}function Vi(e,t,r){let n;if(t==="viewport")n=wx(e,r);else if(t==="document")n=yx(rt(e));else if(qe(t))n=Sx(t,r);else{const o=gc(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Gn(n)}function hc(e,t){const r=ht(e);return r===t||!qe(r)||cr(r)?!1:He(r).position==="fixed"||hc(r,t)}function Ex(e,t){const r=t.get(e);if(r)return r;let n=zr(e,[],!1).filter(i=>qe(i)&&hr(i)!=="body"),o=null;const a=He(e).position==="fixed";let s=a?ht(e):e;for(;qe(s)&&!cr(s);){const i=He(s),c=Ha(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&Cx.has(o.position)||en(s)&&!c&&hc(e,s))?n=n.filter(f=>f!==s):o=i,s=ht(s)}return t.set(e,n),n}function Rx(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?co(t)?[]:Ex(t,this._c):[].concat(r),n],i=s[0],c=s.reduce((u,f)=>{const p=Vi(t,f,o);return u.top=De(p.top,u.top),u.right=vt(p.right,u.right),u.bottom=vt(p.bottom,u.bottom),u.left=De(p.left,u.left),u},Vi(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function kx(e){const{width:t,height:r}=mc(e);return{width:t,height:r}}function Nx(e,t,r){const n=tt(t),o=rt(t),a=r==="fixed",s=_t(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=et(0);function u(){c.x=fo(o)}if(n||!n&&!a)if((hr(t)!=="body"||en(o))&&(i=uo(t)),n){const g=_t(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?vc(o,i):et(0),p=s.left+i.scrollLeft-c.x-f.x,m=s.top+i.scrollTop-c.y-f.y;return{x:p,y:m,width:s.width,height:s.height}}function Jo(e){return He(e).position==="static"}function Bi(e,t){if(!tt(e)||He(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return rt(e)===r&&(r=r.ownerDocument.body),r}function xc(e,t){const r=$e(e);if(co(e))return r;if(!tt(e)){let o=ht(e);for(;o&&!cr(o);){if(qe(o)&&!Jo(o))return o;o=ht(o)}return r}let n=Bi(e,t);for(;n&&cx(n)&&Jo(n);)n=Bi(n,t);return n&&cr(n)&&Jo(n)&&!Ha(n)?r:n||mx(e)||r}const jx=async function(e){const t=this.getOffsetParent||xc,r=this.getDimensions,n=await r(e.floating);return{reference:Nx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Px(e){return He(e).direction==="rtl"}const Tx={convertOffsetParentRelativeRectToViewportRelativeRect:xx,getDocumentElement:rt,getClippingRect:Rx,getOffsetParent:xc,getElementRects:jx,getClientRects:bx,getDimensions:kx,getScale:ir,isElement:qe,isRTL:Px};function bc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ax(e,t){let r=null,n;const o=rt(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=u;if(i||t(),!m||!g)return;const h=kn(p),v=kn(o.clientWidth-(f+m)),x=kn(o.clientHeight-(p+g)),b=kn(f),w={rootMargin:-h+"px "+-v+"px "+-x+"px "+-b+"px",threshold:De(0,vt(1,c))||1};let C=!0;function R(j){const k=j[0].intersectionRatio;if(k!==c){if(!C)return s();k?s(!1,k):n=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!bc(u,e.getBoundingClientRect())&&s(),C=!1}try{r=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(R,w)}r.observe(e)}return s(!0),a}function Ix(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Ka(e),f=o||a?[...u?zr(u):[],...zr(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),a&&b.addEventListener("resize",r)});const p=u&&i?Ax(u,r):null;let m=-1,g=null;s&&(g=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),r()}),u&&!c&&g.observe(u),g.observe(t));let h,v=c?_t(e):null;c&&x();function x(){const b=_t(e);v&&!bc(v,b)&&r(),v=b,h=requestAnimationFrame(x)}return r(),()=>{var b;f.forEach(y=>{o&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),p==null||p(),(b=g)==null||b.disconnect(),g=null,c&&cancelAnimationFrame(h)}}const _x=nx,Ox=ox,Mx=ex,Dx=sx,$x=tx,Gi=Qh,Lx=ax,Fx=(e,t,r)=>{const n=new Map,o={platform:Tx,...r},a={...o.platform,_c:n};return Jh(e,t,{...o,platform:a})};var Vx=typeof document<"u",Bx=function(){},On=Vx?E.useLayoutEffect:Bx;function Wn(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Wn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Wn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function yc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wi(e,t){const r=yc(e);return Math.round(t*r)/r}function Qo(e){const t=d.useRef(e);return On(()=>{t.current=e}),t}function Gx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=d.useState(n);Wn(m,n)||g(n);const[h,v]=d.useState(null),[x,b]=d.useState(null),y=d.useCallback(T=>{T!==j.current&&(j.current=T,v(T))},[]),w=d.useCallback(T=>{T!==k.current&&(k.current=T,b(T))},[]),C=a||h,R=s||x,j=d.useRef(null),k=d.useRef(null),N=d.useRef(f),$=c!=null,V=Qo(c),q=Qo(o),Q=Qo(u),Z=d.useCallback(()=>{if(!j.current||!k.current)return;const T={placement:t,strategy:r,middleware:m};q.current&&(T.platform=q.current),Fx(j.current,k.current,T).then(O=>{const U={...O,isPositioned:Q.current!==!1};z.current&&!Wn(N.current,U)&&(N.current=U,no.flushSync(()=>{p(U)}))})},[m,t,r,q,Q]);On(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(T=>({...T,isPositioned:!1})))},[u]);const z=d.useRef(!1);On(()=>(z.current=!0,()=>{z.current=!1}),[]),On(()=>{if(C&&(j.current=C),R&&(k.current=R),C&&R){if(V.current)return V.current(C,R,Z);Z()}},[C,R,Z,V,$]);const M=d.useMemo(()=>({reference:j,floating:k,setReference:y,setFloating:w}),[y,w]),_=d.useMemo(()=>({reference:C,floating:R}),[C,R]),D=d.useMemo(()=>{const T={position:r,left:0,top:0};if(!_.floating)return T;const O=Wi(_.floating,f.x),U=Wi(_.floating,f.y);return i?{...T,transform:"translate("+O+"px, "+U+"px)",...yc(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:U}},[r,i,_.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:Z,refs:M,elements:_,floatingStyles:D}),[f,Z,M,_,D])}const Wx=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Gi({element:n.current,padding:o}).fn(r):{}:n?Gi({element:n,padding:o}).fn(r):{}}}},zx=(e,t)=>({..._x(e),options:[e,t]}),qx=(e,t)=>({...Ox(e),options:[e,t]}),Hx=(e,t)=>({...Lx(e),options:[e,t]}),Ux=(e,t)=>({...Mx(e),options:[e,t]}),Kx=(e,t)=>({...Dx(e),options:[e,t]}),Yx=(e,t)=>({...$x(e),options:[e,t]}),Xx=(e,t)=>({...Wx(e),options:[e,t]});var Zx="Arrow",wc=d.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return l.jsx(ne.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});wc.displayName=Zx;var Jx=wc;function po(e){const[t,r]=d.useState(void 0);return Ne(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Ya="Popper",[Cc,bt]=je(Ya),[Qx,Sc]=Cc(Ya),Ec=e=>{const{__scopePopper:t,children:r}=e,[n,o]=d.useState(null);return l.jsx(Qx,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ec.displayName=Ya;var Rc="PopperAnchor",kc=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Sc(Rc,r),s=d.useRef(null),i=le(t,s),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||s.current,u!==c.current&&a.onAnchorChange(c.current)}),n?null:l.jsx(ne.div,{...o,ref:i})});kc.displayName=Rc;var Xa="PopperContent",[eb,tb]=Cc(Xa),Nc=d.forwardRef((e,t)=>{var I,W,G,ee,te,L;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:h,...v}=e,x=Sc(Xa,r),[b,y]=d.useState(null),w=le(t,se=>y(se)),[C,R]=d.useState(null),j=po(C),k=(j==null?void 0:j.width)??0,N=(j==null?void 0:j.height)??0,$=n+(a!=="center"?"-"+a:""),V=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},q=Array.isArray(u)?u:[u],Q=q.length>0,Z={padding:V,boundary:q.filter(nb),altBoundary:Q},{refs:z,floatingStyles:M,placement:_,isPositioned:D,middlewareData:T}=Gx({strategy:"fixed",placement:$,whileElementsMounted:(...se)=>Ix(...se,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[zx({mainAxis:o+N,alignmentAxis:s}),c&&qx({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Hx():void 0,...Z}),c&&Ux({...Z}),Kx({...Z,apply:({elements:se,rects:ue,availableWidth:me,availableHeight:xe})=>{const{width:Ee,height:Le}=ue.reference,Re=se.floating.style;Re.setProperty("--radix-popper-available-width",`${me}px`),Re.setProperty("--radix-popper-available-height",`${xe}px`),Re.setProperty("--radix-popper-anchor-width",`${Ee}px`),Re.setProperty("--radix-popper-anchor-height",`${Le}px`)}}),C&&Xx({element:C,padding:i}),ob({arrowWidth:k,arrowHeight:N}),m&&Yx({strategy:"referenceHidden",...Z})]}),[O,U]=Tc(_),J=ze(h);Ne(()=>{D&&(J==null||J())},[D,J]);const A=(I=T.arrow)==null?void 0:I.x,H=(W=T.arrow)==null?void 0:W.y,X=((G=T.arrow)==null?void 0:G.centerOffset)!==0,[Y,F]=d.useState();return Ne(()=>{b&&F(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:D?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[(ee=T.transformOrigin)==null?void 0:ee.x,(te=T.transformOrigin)==null?void 0:te.y].join(" "),...((L=T.hide)==null?void 0:L.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(eb,{scope:r,placedSide:O,onArrowChange:R,arrowX:A,arrowY:H,shouldHideArrow:X,children:l.jsx(ne.div,{"data-side":O,"data-align":U,...v,ref:w,style:{...v.style,animation:D?void 0:"none"}})})})});Nc.displayName=Xa;var jc="PopperArrow",rb={top:"bottom",right:"left",bottom:"top",left:"right"},Pc=d.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=tb(jc,n),s=rb[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(Jx,{...o,ref:r,style:{...o.style,display:"block"}})})});Pc.displayName=jc;function nb(e){return e!==null}var ob=e=>({name:"transformOrigin",options:e,fn(t){var x,b,y;const{placement:r,rects:n,middlewareData:o}=t,s=((x=o.arrow)==null?void 0:x.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,f]=Tc(r),p={start:"0%",center:"50%",end:"100%"}[f],m=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let h="",v="";return u==="bottom"?(h=s?p:`${m}px`,v=`${-c}px`):u==="top"?(h=s?p:`${m}px`,v=`${n.floating.height+c}px`):u==="right"?(h=`${-c}px`,v=s?p:`${g}px`):u==="left"&&(h=`${n.floating.width+c}px`,v=s?p:`${g}px`),{data:{x:h,y:v}}}});function Tc(e){const[t,r="center"]=e.split("-");return[t,r]}var tn=Ec,rn=kc,mo=Nc,go=Pc,ab="Portal",xr=d.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=d.useState(!1);Ne(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Zr.createPortal(l.jsx(ne.div,{...n,ref:t}),s):null});xr.displayName=ab;function sb(e){const t=ib(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(cb);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function ib(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=db(o),i=ub(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ie(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lb=Symbol("radix.slottable");function cb(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lb}function ub(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function db(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var fb=d[" useInsertionEffect ".trim().toString()]||Ne;function ke({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,s]=pb({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const p=f.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"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.`),f.current=i},[i,n])}const u=d.useCallback(f=>{var p;if(i){const m=mb(f)?f(e):f;m!==e&&((p=s.current)==null||p.call(s,m))}else a(f)},[i,e,a,s]);return[c,u]}function pb({defaultProp:e,onChange:t}){const[r,n]=d.useState(e),o=d.useRef(r),a=d.useRef(t);return fb(()=>{a.current=t},[t]),d.useEffect(()=>{var s;o.current!==r&&((s=a.current)==null||s.call(a,r),o.current=r)},[r,o]),[r,n,a]}function mb(e){return typeof e=="function"}function vo(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ac=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"}),gb="VisuallyHidden",Ic=d.forwardRef((e,t)=>l.jsx(ne.span,{...e,ref:t,style:{...Ac,...e.style}}));Ic.displayName=gb;var vb=Ic,hb=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qt=new WeakMap,Nn=new WeakMap,jn={},ea=0,_c=function(e){return e&&(e.host||_c(e.parentNode))},xb=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=_c(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},bb=function(e,t,r,n){var o=xb(t,Array.isArray(e)?e:[e]);jn[r]||(jn[r]=new WeakMap);var a=jn[r],s=[],i=new Set,c=new Set(o),u=function(p){!p||i.has(p)||(i.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(i.has(m))f(m);else try{var g=m.getAttribute(n),h=g!==null&&g!=="false",v=(Qt.get(m)||0)+1,x=(a.get(m)||0)+1;Qt.set(m,v),a.set(m,x),s.push(m),v===1&&h&&Nn.set(m,!0),x===1&&m.setAttribute(r,"true"),h||m.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return f(t),i.clear(),ea++,function(){s.forEach(function(p){var m=Qt.get(p)-1,g=a.get(p)-1;Qt.set(p,m),a.set(p,g),m||(Nn.has(p)||p.removeAttribute(n),Nn.delete(p)),g||p.removeAttribute(r)}),ea--,ea||(Qt=new WeakMap,Qt=new WeakMap,Nn=new WeakMap,jn={})}},ho=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=hb(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),bb(n,o,r,"aria-hidden")):function(){return null}},Je=function(){return Je=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Je.apply(this,arguments)};function Oc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function yb(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Mn="right-scroll-bar-position",Dn="width-before-scroll-bar",wb="with-scroll-bars-hidden",Cb="--removed-body-scroll-bar-size";function ta(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Sb(e,t){var r=E.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Eb=typeof window<"u"?d.useLayoutEffect:d.useEffect,zi=new WeakMap;function Rb(e,t){var r=Sb(null,function(n){return e.forEach(function(o){return ta(o,n)})});return Eb(function(){var n=zi.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(i){a.has(i)||ta(i,null)}),a.forEach(function(i){o.has(i)||ta(i,s)})}zi.set(r,e)},[e]),r}function kb(e){return e}function Nb(e,t){t===void 0&&(t=kb);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var c=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),r}}}};return o}function jb(e){e===void 0&&(e={});var t=Nb(null);return t.options=Je({async:!0,ssr:!1},e),t}var Mc=function(e){var t=e.sideCar,r=Oc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return d.createElement(n,Je({},r))};Mc.isSideCarExport=!0;function Pb(e,t){return e.useMedium(t),Mc}var Dc=jb(),ra=function(){},xo=d.forwardRef(function(e,t){var r=d.useRef(null),n=d.useState({onScrollCapture:ra,onWheelCapture:ra,onTouchMoveCapture:ra}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,g=e.noRelative,h=e.noIsolation,v=e.inert,x=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,C=Oc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=m,j=Rb([r,t]),k=Je(Je({},C),o);return d.createElement(d.Fragment,null,f&&d.createElement(R,{sideCar:Dc,removeScrollBar:u,shards:p,noRelative:g,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:w}),s?d.cloneElement(d.Children.only(i),Je(Je({},k),{ref:j})):d.createElement(y,Je({},k,{className:c,ref:j}),i))});xo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xo.classNames={fullWidth:Dn,zeroRight:Mn};var Tb=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ab(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Tb();return t&&e.setAttribute("nonce",t),e}function Ib(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _b(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ob=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Ab())&&(Ib(t,r),_b(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mb=function(){var e=Ob();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},$c=function(){var e=Mb(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Db={left:0,top:0,right:0,gap:0},na=function(e){return parseInt(e||"",10)||0},$b=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[na(r),na(n),na(o)]},Lb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Db;var t=$b(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Fb=$c(),lr="data-scroll-locked",Vb=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
151
151
  .`.concat(wb,` {
152
152
  overflow: hidden `).concat(n,`;
153
153
  padding-right: `).concat(i,"px ").concat(n,`;