@ryanodd/design-system 0.1.0-dev6 → 0.1.0-dev8
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/cjs/index.js +7 -7
- package/dist/esm/index.d.ts +134 -3
- package/dist/esm/index.js +1105 -1025
- package/dist/index.css +1 -1
- package/package.json +5 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),k=require("react"),mo=require("react-dom");function ho(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=ho(k),sn=ho(mo),Qs="_button_1k08m_1",Js="_buttonNotificationDot_1k08m_143",Fn={button:Qs,buttonNotificationDot:Js},ei=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m12 19l-7-7l7-7m7 7H5"})),ti=k.forwardRef(ei),ni=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7l7 7l-7 7"})),oi=k.forwardRef(ni),ri=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"currentColor",d:"m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"})),si=k.forwardRef(ri),ii=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("circle",{cx:12,cy:12,r:10,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})),ai=k.forwardRef(ii),ci=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 6L6 18M6 6l12 12"})),li=k.forwardRef(ci),ui=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"})),di=k.forwardRef(ui),fi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"currentColor",d:"M31.23 17.736c.063-.57.103-1.148.103-1.736s-.04-1.166-.104-1.737l-4.378-1.557c-.218-.716-.504-1.4-.85-2.05l1.992-4.192a15.6 15.6 0 0 0-2.458-2.46L21.343 6a11 11 0 0 0-2.05-.85L17.737.772C17.166.708 16.588.667 16 .667s-1.166.04-1.737.105L12.707 5.15q-1.075.327-2.05.85L6.464 4.004c-.91.725-1.734 1.55-2.46 2.46L6 10.654q-.523.976-.85 2.05l-4.378 1.56c-.064.57-.105 1.15-.105 1.737s.04 1.165.105 1.736l4.378 1.558q.327 1.074.85 2.05l-1.995 4.192c.725.91 1.55 1.733 2.46 2.458L10.654 26q.976.523 2.05.852l1.558 4.377c.57.063 1.148.103 1.737.103c.588 0 1.165-.04 1.736-.104l1.558-4.378c.715-.218 1.4-.504 2.05-.85l4.192 1.992c.91-.725 1.733-1.55 2.458-2.458L26 21.343c.348-.647.634-1.334.852-2.05l4.377-1.557zM16 20.87a4.871 4.871 0 1 1-.002-9.742A4.871 4.871 0 0 1 16 20.87"})),pi=k.forwardRef(fi),mi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},i.createElement("path",{d:"m15 12l-8.373 8.373a1 1 0 1 1-3-3L12 9m6 6l4-4"}),i.createElement("path",{d:"m21.5 11.5l-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5"}))),hi=k.forwardRef(mi),vi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"currentColor",d:"M6.979 3.074a6 6 0 0 1 4.988 1.425l.037.033l.034-.03a6 6 0 0 1 4.733-1.44l.246.036a6 6 0 0 1 3.364 10.008l-.18.185l-.048.041l-7.45 7.379a1 1 0 0 1-1.313.082l-.094-.082l-7.493-7.422A6 6 0 0 1 6.979 3.074"})),gi=k.forwardRef(vi),wi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},i.createElement("circle",{cx:8,cy:2.5,r:.75}),i.createElement("circle",{cx:8,cy:8,r:.75}),i.createElement("circle",{cx:8,cy:13.5,r:.75}))),xi=k.forwardRef(wi),yi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"currentColor",d:"m213.85 125.46l-112 120a8 8 0 0 1-13.69-7l14.66-73.33l-57.63-21.64a8 8 0 0 1-3-13l112-120a8 8 0 0 1 13.69 7l-14.7 73.41l57.63 21.61a8 8 0 0 1 3 12.95Z"})),bi=k.forwardRef(yi),Ci=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},i.createElement("rect",{width:20,height:16,x:2,y:4,rx:2}),i.createElement("path",{d:"m22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}))),Ei=k.forwardRef(Ci),Ri=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 12h16M4 6h16M4 18h16"})),Ti=k.forwardRef(Ri),Si=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7.159 3.185C7.415 3.066 7.699 3 8 3h8a2 2 0 0 1 2 2v9m0 4v1a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V6m5-2h2M3 3l18 18m-9-4v.01"})),Pi=k.forwardRef(Si),_i=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"currentColor",d:"m12.9 6.855l4.242 4.242l-9.9 9.9H3v-4.243zm1.414-1.415l2.121-2.121a1 1 0 0 1 1.414 0l2.829 2.828a1 1 0 0 1 0 1.415l-2.122 2.121z"})),Mi=k.forwardRef(_i),Ai="_icon_178c1_1",Oi={icon:Ai},Di=["xs","sm","md","lg","xl","2xl","3xl","4xl"],K=(e,t)=>{const n=k.forwardRef(({size:o="lg",className:r,...s},a)=>p.jsx(e,{className:`${r} ${Oi.icon}`,"data-size":o,ref:a,alt:t,...s}));return n.displayName=t,n},vo=K(ti,"Left"),go=K(oi,"Right"),an=K(si,"Check"),wo=K(ai,"Circle"),cn=K(li,"Close"),xo=K(di,"External Link"),yo=K(pi,"Gear"),bo=K(hi,"Hammer"),Co=K(gi,"Heart"),Eo=K(xi,"Kebab"),Ro=K(bi,"Lightning"),To=K(Ei,"Mail"),So=K(Ti,"Menu"),Po=K(Pi,"No Mobile Devices"),_o=K(Mi,"Pencil"),Ut={ArrowLeft:vo,ArrowRight:go,Check:an,Circle:wo,Close:cn,ExternalLink:xo,Gear:yo,Hammer:bo,Heart:Co,Kebab:Eo,Lightning:Ro,Mail:To,Menu:So,NoMobile:Po,Pencil:_o,None:null},Ni="_spinnerWrapper_1mfc7_1",Ii="_spinner_1mfc7_1",$n={spinnerWrapper:Ni,spinner:Ii},ln=k.forwardRef(({className:e,size:t="lg",...n},o)=>p.jsx("div",{ref:o,className:$n.spinnerWrapper,"data-size":t,...n,children:p.jsx("div",{className:$n.spinner})}));ln.displayName="Spinner";const gt=k.forwardRef(({className:e,notificationDotText:t,children:n,icon:o,trailingIcon:r,size:s="medium",variant:a,loading:c,iconOnly:d,...l},u)=>{const f=o?Ut[o]:void 0,h=r?Ut[r]:void 0,v=s==="small"?"sm":s==="medium"?"md":"lg";return p.jsxs("button",{ref:u,...l,className:`${Fn.button} ${e??""}`,"data-size":s,"data-variant":a,"data-icon-only":d,children:[f&&p.jsx(f,{size:v}),c&&p.jsx(ln,{size:v}),n,h&&p.jsx(h,{size:v}),t&&p.jsx("span",{className:Fn.buttonNotificationDot,children:t})]})});gt.displayName="Button";function Bn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Bn(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Bn(e[r],null)}}}}function W(...e){return i.useCallback(wt(...e),e)}function ki(e,t){const n=i.createContext(t),o=s=>{const{children:a,...c}=s,d=i.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:d,children:a})};o.displayName=e+"Provider";function r(s){const a=i.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function de(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),d=n.length;n=[...n,a];const l=f=>{const{scope:h,children:v,...w}=f,m=h?.[e]?.[d]||c,g=i.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:g,children:v})};l.displayName=s+"Provider";function u(f,h){const v=h?.[e]?.[d]||c,w=i.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[l,u]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const d=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return r.scopeName=e,[o,Li(r,...t)]}function Li(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:d,scopeName:l})=>{const f=d(s)[`__scope${l}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function _(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var ce=globalThis?.document?i.useLayoutEffect:()=>{},ji=i[" useInsertionEffect ".trim().toString()]||ce;function Oe({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=Fi({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:r;{const u=i.useRef(e!==void 0);i.useEffect(()=>{const f=u.current;f!==c&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=c},[c,o])}const l=i.useCallback(u=>{if(c){const f=$i(u)?u(e):u;f!==e&&a.current?.(f)}else s(u)},[c,e,s,a]);return[d,l]}function Fi({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return ji(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function $i(e){return typeof e=="function"}function Bi(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Mo(e){const[t,n]=i.useState(void 0);return ce(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,c;if("borderBoxSize"in s){const d=s.borderBoxSize,l=Array.isArray(d)?d[0]:d;a=l.inlineSize,c=l.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function Wi(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Z=e=>{const{present:t,children:n}=e,o=Hi(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=W(o.ref,Vi(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Z.displayName="Presence";function Hi(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,d]=Wi(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=Je(o.current);s.current=c==="mounted"?l:"none"},[c]),ce(()=>{const l=o.current,u=r.current;if(u!==e){const h=s.current,v=Je(l);e?d("MOUNT"):v==="none"||l?.display==="none"?d("UNMOUNT"):d(u&&h!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),ce(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,f=v=>{const m=Je(o.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(d("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=v=>{v.target===t&&(s.current=Je(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function Je(e){return e?.animationName||"none"}function Vi(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function je(e){const t=Ki(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),d=c.find(Gi);if(d){const l=d.props.children,u=c.map(f=>f===d?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(l)?i.cloneElement(l,void 0,u):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Ki(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=Yi(r),c=zi(s,r.props);return r.type!==i.Fragment&&(c.ref=o?wt(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ao=Symbol("radix.slottable");function Ui(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ao,t}function Gi(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ao}function zi(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const d=s(...c);return r(...c),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Yi(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],I=Xi.reduce((e,t)=>{const n=je(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(d,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function un(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}var xt="Checkbox",[qi]=de(xt),[Zi,dn]=qi(xt);function Qi(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:s,form:a,name:c,onCheckedChange:d,required:l,value:u="on",internal_do_not_use_render:f}=e,[h,v]=Oe({prop:n,defaultProp:r??!1,onChange:d,caller:xt}),[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useRef(!1),b=w?!!a||!!w.closest("form"):!0,C={checked:h,disabled:s,setChecked:v,control:w,setControl:m,name:c,form:a,value:u,hasConsumerStoppedPropagationRef:y,required:l,defaultChecked:me(r)?!1:r,isFormControl:b,bubbleInput:g,setBubbleInput:x};return p.jsx(Zi,{scope:t,...C,children:Ji(f)?f(C):o})}var Oo="CheckboxTrigger",Do=i.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:s,value:a,disabled:c,checked:d,required:l,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:w}=dn(Oo,e),m=W(r,u),g=i.useRef(d);return i.useEffect(()=>{const x=s?.form;if(x){const y=()=>f(g.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[s,f]),p.jsx(I.button,{type:"button",role:"checkbox","aria-checked":me(d)?"mixed":d,"aria-required":l,"data-state":Fo(d),"data-disabled":c?"":void 0,disabled:c,value:a,...o,ref:m,onKeyDown:_(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:_(n,x=>{f(y=>me(y)?!0:!y),w&&v&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})})});Do.displayName=Oo;var No=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:s,required:a,disabled:c,value:d,onCheckedChange:l,form:u,...f}=e;return p.jsx(Qi,{__scopeCheckbox:n,checked:r,defaultChecked:s,disabled:c,required:a,onCheckedChange:l,name:o,form:u,value:d,internal_do_not_use_render:({isFormControl:h})=>p.jsxs(p.Fragment,{children:[p.jsx(Do,{...f,ref:t,__scopeCheckbox:n}),h&&p.jsx(jo,{__scopeCheckbox:n})]})})});No.displayName=xt;var Io="CheckboxIndicator",ko=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,s=dn(Io,n);return p.jsx(Z,{present:o||me(s.checked)||s.checked===!0,children:p.jsx(I.span,{"data-state":Fo(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});ko.displayName=Io;var Lo="CheckboxBubbleInput",jo=i.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:a,required:c,disabled:d,name:l,value:u,form:f,bubbleInput:h,setBubbleInput:v}=dn(Lo,e),w=W(n,v),m=Bi(s),g=Mo(o);i.useEffect(()=>{const y=h;if(!y)return;const b=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(b,"checked").set,T=!r.current;if(m!==s&&E){const R=new Event("click",{bubbles:T});y.indeterminate=me(s),E.call(y,me(s)?!1:s),y.dispatchEvent(R)}},[h,m,s,r]);const x=i.useRef(me(s)?!1:s);return p.jsx(I.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??x.current,required:c,disabled:d,name:l,value:u,form:f,...t,tabIndex:-1,ref:w,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});jo.displayName=Lo;function Ji(e){return typeof e=="function"}function me(e){return e==="indeterminate"}function Fo(e){return me(e)?"indeterminate":e?"checked":"unchecked"}const ea="_checkboxRow_aw0oa_1",ta="_checkboxRoot_aw0oa_7",na="_checkboxIndicator_aw0oa_19",oa="_checkboxCheckmarkIcon_aw0oa_29",ra="_checkboxLabel_aw0oa_35",ke={checkboxRow:ea,checkboxRoot:ta,checkboxIndicator:na,checkboxCheckmarkIcon:oa,checkboxLabel:ra},sa=({id:e,labelContent:t,checked:n,onClick:o})=>p.jsxs("div",{className:ke.checkboxRow,children:[p.jsx(No,{checked:n,onCheckedChange:r=>{o(r===!0)},className:ke.checkboxRoot,defaultChecked:!0,id:e,children:p.jsx(ko,{className:ke.checkboxIndicator,children:p.jsx(an,{className:ke.checkboxCheckmarkIcon})})}),p.jsx("label",{className:ke.checkboxLabel,htmlFor:e,children:t})]});var ia=i[" useId ".trim().toString()]||(()=>{}),aa=0;function we(e){const[t,n]=i.useState(ia());return ce(()=>{n(o=>o??String(aa++))},[e]),e||(t?`radix-${t}`:"")}function Y(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function ca(e,t=globalThis?.document){const n=Y(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var la="DismissableLayer",Gt="dismissableLayer.update",ua="dismissableLayer.pointerDownOutside",da="dismissableLayer.focusOutside",Wn,$o=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ve=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...d}=e,l=i.useContext($o),[u,f]=i.useState(null),h=u?.ownerDocument??globalThis?.document,[,v]=i.useState({}),w=W(t,R=>f(R)),m=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(g),y=u?m.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,C=y>=x,E=pa(R=>{const M=R.target,N=[...l.branches].some(D=>D.contains(M));!C||N||(r?.(R),a?.(R),R.defaultPrevented||c?.())},h),T=ma(R=>{const M=R.target;[...l.branches].some(D=>D.contains(M))||(s?.(R),a?.(R),R.defaultPrevented||c?.())},h);return ca(R=>{y===l.layers.size-1&&(o?.(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},h),i.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Wn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Hn(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Wn)}},[u,h,n,l]),i.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Hn())},[u,l]),i.useEffect(()=>{const R=()=>v({});return document.addEventListener(Gt,R),()=>document.removeEventListener(Gt,R)},[]),p.jsx(I.div,{...d,ref:w,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:_(e.onFocusCapture,T.onFocusCapture),onBlurCapture:_(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,E.onPointerDownCapture)})});Ve.displayName=la;var fa="DismissableLayerBranch",Bo=i.forwardRef((e,t)=>{const n=i.useContext($o),o=i.useRef(null),r=W(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(I.div,{...e,ref:r})});Bo.displayName=fa;function pa(e,t=globalThis?.document){const n=Y(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let d=function(){Wo(ua,n,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=d,t.addEventListener("click",r.current,{once:!0})):d()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function ma(e,t=globalThis?.document){const n=Y(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&Wo(da,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Hn(){const e=new CustomEvent(Gt);document.dispatchEvent(e)}function Wo(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,s):r.dispatchEvent(s)}var ha=Ve,va=Bo,It="focusScope.autoFocusOnMount",kt="focusScope.autoFocusOnUnmount",Vn={bubbles:!1,cancelable:!0},ga="FocusScope",fn=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[c,d]=i.useState(null),l=Y(r),u=Y(s),f=i.useRef(null),h=W(t,m=>d(m)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let m=function(b){if(v.paused||!c)return;const C=b.target;c.contains(C)?f.current=C:pe(f.current,{select:!0})},g=function(b){if(v.paused||!c)return;const C=b.relatedTarget;C!==null&&(c.contains(C)||pe(f.current,{select:!0}))},x=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&pe(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const y=new MutationObserver(x);return c&&y.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),y.disconnect()}}},[o,c,v.paused]),i.useEffect(()=>{if(c){Un.add(v);const m=document.activeElement;if(!c.contains(m)){const x=new CustomEvent(It,Vn);c.addEventListener(It,l),c.dispatchEvent(x),x.defaultPrevented||(wa(Ea(Ho(c)),{select:!0}),document.activeElement===m&&pe(c))}return()=>{c.removeEventListener(It,l),setTimeout(()=>{const x=new CustomEvent(kt,Vn);c.addEventListener(kt,u),c.dispatchEvent(x),x.defaultPrevented||pe(m??document.body,{select:!0}),c.removeEventListener(kt,u),Un.remove(v)},0)}}},[c,l,u,v]);const w=i.useCallback(m=>{if(!n&&!o||v.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(g&&x){const y=m.currentTarget,[b,C]=xa(y);b&&C?!m.shiftKey&&x===C?(m.preventDefault(),n&&pe(b,{select:!0})):m.shiftKey&&x===b&&(m.preventDefault(),n&&pe(C,{select:!0})):x===y&&m.preventDefault()}},[n,o,v.paused]);return p.jsx(I.div,{tabIndex:-1,...a,ref:h,onKeyDown:w})});fn.displayName=ga;function wa(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(pe(o,{select:t}),document.activeElement!==n)return}function xa(e){const t=Ho(e),n=Kn(t,e),o=Kn(t.reverse(),e);return[n,o]}function Ho(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kn(e,t){for(const n of e)if(!ya(n,{upTo:t}))return n}function ya(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 ba(e){return e instanceof HTMLInputElement&&"select"in e}function pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ba(e)&&t&&e.select()}}var Un=Ca();function Ca(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Gn(e,t),e.unshift(t)},remove(t){e=Gn(e,t),e[0]?.resume()}}}function Gn(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ea(e){return e.filter(t=>t.tagName!=="A")}var Ra="Portal",Ke=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);ce(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?mo.createPortal(p.jsx(I.div,{...o,ref:t}),a):null});Ke.displayName=Ra;var Lt=0;function Vo(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zn()),document.body.insertAdjacentElement("beforeend",e[1]??zn()),Lt++,()=>{Lt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lt--}},[])}function zn(){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 oe=function(){return oe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},oe.apply(this,arguments)};function Ko(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Ta(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var at="right-scroll-bar-position",ct="width-before-scroll-bar",Sa="with-scroll-bars-hidden",Pa="--removed-body-scroll-bar-size";function jt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _a(e,t){var n=k.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Ma=typeof window<"u"?i.useLayoutEffect:i.useEffect,Yn=new WeakMap;function Aa(e,t){var n=_a(null,function(o){return e.forEach(function(r){return jt(r,o)})});return Ma(function(){var o=Yn.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(c){s.has(c)||jt(c,null)}),s.forEach(function(c){r.has(c)||jt(c,a)})}Yn.set(n,e)},[e]),n}function Oa(e){return e}function Da(e,t){t===void 0&&(t=Oa);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var d=function(){var u=a;a=[],u.forEach(s)},l=function(){return Promise.resolve().then(d)};l(),n={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),n}}}};return r}function Na(e){e===void 0&&(e={});var t=Da(null);return t.options=oe({async:!0,ssr:!1},e),t}var Uo=function(e){var t=e.sideCar,n=Ko(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,oe({},n))};Uo.isSideCarExport=!0;function Ia(e,t){return e.useMedium(t),Uo}var Go=Na(),Ft=function(){},yt=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:Ft,onWheelCapture:Ft,onTouchMoveCapture:Ft}),r=o[0],s=o[1],a=e.forwardProps,c=e.children,d=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,h=e.sideCar,v=e.noRelative,w=e.noIsolation,m=e.inert,g=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,b=e.gapMode,C=Ko(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,T=Aa([n,t]),R=oe(oe({},C),r);return i.createElement(i.Fragment,null,u&&i.createElement(E,{sideCar:Go,removeScrollBar:l,shards:f,noRelative:v,noIsolation:w,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?i.cloneElement(i.Children.only(c),oe(oe({},R),{ref:T})):i.createElement(y,oe({},R,{className:d,ref:T}),c))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yt.classNames={fullWidth:ct,zeroRight:at};var ka=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function La(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ka();return t&&e.setAttribute("nonce",t),e}function ja(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Fa(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $a=function(){var e=0,t=null;return{add:function(n){e==0&&(t=La())&&(ja(t,n),Fa(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ba=function(){var e=$a();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zo=function(){var e=Ba(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Wa={left:0,top:0,right:0,gap:0},$t=function(e){return parseInt(e||"",10)||0},Ha=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[$t(n),$t(o),$t(r)]},Va=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wa;var t=Ha(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Ka=zo(),Pe="data-scroll-locked",Ua=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),k=require("react"),mo=require("react-dom");function ho(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=ho(k),sn=ho(mo),ai="_button_1k08m_1",ci="_buttonNotificationDot_1k08m_143",Fn={button:ai,buttonNotificationDot:ci},li=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m12 19l-7-7l7-7m7 7H5"})),ui=k.forwardRef(li),di=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7l7 7l-7 7"})),fi=k.forwardRef(di),pi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M3 20a2 2 0 0 0 2 2h10a2.4 2.4 0 0 0 1.706-.706l3.588-3.588A2.4 2.4 0 0 0 21 16V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z"}),s.createElement("path",{d:"M15 22v-5a1 1 0 0 1 1-1h5M8 2v4m8-4v4M3 10h18"}))),mi=k.forwardRef(pi),hi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"})),vi=k.forwardRef(hi),gi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m6 9l6 6l6-6"})),wi=k.forwardRef(gi),xi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m15 18l-6-6l6-6"})),yi=k.forwardRef(xi),bi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m9 18l6-6l-6-6"})),Ci=k.forwardRef(bi),Ei=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m18 15l-6-6l-6 6"})),Ri=k.forwardRef(Ei),Si=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("circle",{cx:12,cy:12,r:10,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})),Ti=k.forwardRef(Si),Pi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 6L6 18M6 6l12 12"})),Mi=k.forwardRef(Pi),_i=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 2v2m4-2v2m2 4a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1M6 2v2"})),Ai=k.forwardRef(_i),ki=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"})),Oi=k.forwardRef(ki),Di=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}),s.createElement("circle",{cx:12,cy:12,r:3}))),Ni=k.forwardRef(Di),Ii=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"m15 12l-8.373 8.373a1 1 0 1 1-3-3L12 9m6 6l4-4"}),s.createElement("path",{d:"m21.5 11.5l-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5"}))),Li=k.forwardRef(Ii),ji=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"M6.979 3.074a6 6 0 0 1 4.988 1.425l.037.033l.034-.03a6 6 0 0 1 4.733-1.44l.246.036a6 6 0 0 1 3.364 10.008l-.18.185l-.048.041l-7.45 7.379a1 1 0 0 1-1.313.082l-.094-.082l-7.493-7.422A6 6 0 0 1 6.979 3.074"})),Fi=k.forwardRef(ji),$i=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M22 12h-6l-2 3h-4l-2-3H2"}),s.createElement("path",{d:"M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11"}))),Bi=k.forwardRef($i),Wi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},s.createElement("circle",{cx:8,cy:2.5,r:.75}),s.createElement("circle",{cx:8,cy:8,r:.75}),s.createElement("circle",{cx:8,cy:13.5,r:.75}))),Hi=k.forwardRef(Wi),Vi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M10.293 2.293a1 1 0 0 1 1.414 0l2.5 2.5l5.994 1.227a1 1 0 0 1 .506 1.687l-7 7a1 1 0 0 1-1.687-.506l-1.227-5.994l-2.5-2.5a1 1 0 0 1 0-1.414zm3.914 2.5l-3.414 3.414M3 20a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"}),s.createElement("path",{d:"m9.086 6.5l-4.793 4.793a1 1 0 0 0-.18 1.17L7 18"}))),Ki=k.forwardRef(Vi),Ui=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m213.85 125.46l-112 120a8 8 0 0 1-13.69-7l14.66-73.33l-57.63-21.64a8 8 0 0 1-3-13l112-120a8 8 0 0 1 13.69 7l-14.7 73.41l57.63 21.61a8 8 0 0 1 3 12.95Z"})),Gi=k.forwardRef(Ui),zi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m10 17l5-5l-5-5m5 5H3m12-9h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"})),Yi=k.forwardRef(zi),Xi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m16 17l5-5l-5-5m5 5H9m0 9H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"})),qi=k.forwardRef(Xi),Zi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("rect",{width:20,height:16,x:2,y:4,rx:2}),s.createElement("path",{d:"m22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}))),Qi=k.forwardRef(Zi),Ji=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 12h16M4 6h16M4 18h16"})),ea=k.forwardRef(Ji),ta=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7.159 3.185C7.415 3.066 7.699 3 8 3h8a2 2 0 0 1 2 2v9m0 4v1a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V6m5-2h2M3 3l18 18m-9-4v.01"})),na=k.forwardRef(ta),oa=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m12.9 6.855l4.242 4.242l-9.9 9.9H3v-4.243zm1.414-1.415l2.121-2.121a1 1 0 0 1 1.414 0l2.829 2.828a1 1 0 0 1 0 1.415l-2.122 2.121z"})),ra=k.forwardRef(oa),sa=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7v14"})),ia=k.forwardRef(sa),aa=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 9H4L2 7l2-2h6m4 0h6l2 2l-2 2h-6m-4 13V4a2 2 0 1 1 4 0v18m-6 0h8"})),ca=k.forwardRef(aa),la=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 2v2m2.837 12.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715M16 12a4 4 0 0 0-4-4m7-3l-1.256 1.256M20 12h2"})),ua=k.forwardRef(la),da="_icon_178c1_1",fa={icon:da},pa=["xs","sm","md","lg","xl","2xl","3xl","4xl"],j=(e,t)=>{const n=k.forwardRef(({size:o="lg",className:r,...i},a)=>p.jsx(e,{className:`${r} ${fa.icon}`,"data-size":o,ref:a,alt:t,...i}));return n.displayName=t,n},vo=j(ui,"Left"),go=j(fi,"Right"),wo=j(mi,"Calendar"),an=j(vi,"Check"),ma=j(wi,"Chevron Down"),ha=j(yi,"Chevron Left"),va=j(Ci,"Chevron Right"),ga=j(Ri,"Chevron Up"),xo=j(Ti,"Circle"),cn=j(Mi,"Close"),yo=j(Ai,"Coffee"),bo=j(Oi,"External Link"),Co=j(Ni,"Gear"),Eo=j(Li,"Hammer"),Ro=j(Fi,"Heart"),So=j(Bi,"Inbox"),To=j(Ki,"Lamp"),Po=j(Hi,"Kebab"),Mo=j(Gi,"Lightning"),_o=j(Yi,"Log In"),Ao=j(qi,"Log Out"),ko=j(Qi,"Mail"),Oo=j(ea,"Menu"),Do=j(na,"No Mobile Devices"),No=j(ra,"Pencil"),Io=j(ia,"Plus"),Lo=j(ca,"Signpost"),jo=j(ua,"Sun Moon"),ut={ArrowLeft:vo,ArrowRight:go,Calendar:wo,Check:an,Circle:xo,Close:cn,Coffee:yo,ExternalLink:bo,Gear:Co,Hammer:Eo,Heart:Ro,Inbox:So,Kebab:Po,Lamp:To,Lightning:Mo,LogIn:_o,LogOut:Ao,Mail:ko,Menu:Oo,NoMobile:Do,Pencil:No,Plus:Io,Signpost:Lo,SunMoon:jo},wa="_spinnerWrapper_1mfc7_1",xa="_spinner_1mfc7_1",$n={spinnerWrapper:wa,spinner:xa},ln=k.forwardRef(({className:e,size:t="lg",...n},o)=>p.jsx("div",{ref:o,className:$n.spinnerWrapper,"data-size":t,...n,children:p.jsx("div",{className:$n.spinner})}));ln.displayName="Spinner";const wt=k.forwardRef(({className:e,notificationDotText:t,children:n,icon:o,trailingIcon:r,size:i="medium",variant:a,loading:c,iconOnly:d,...l},u)=>{const f=o?ut[o]:void 0,h=r?ut[r]:void 0,v=i==="small"?"sm":i==="medium"?"md":"lg";return p.jsxs("button",{ref:u,...l,className:`${Fn.button} ${e??""}`,"data-size":i,"data-variant":a,"data-icon-only":d,children:[f&&p.jsx(f,{size:v}),c&&p.jsx(ln,{size:v}),n,h&&p.jsx(h,{size:v}),t&&p.jsx("span",{className:Fn.buttonNotificationDot,children:t})]})});wt.displayName="Button";function Bn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xt(...e){return t=>{let n=!1;const o=e.map(r=>{const i=Bn(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():Bn(e[r],null)}}}}function H(...e){return s.useCallback(xt(...e),e)}function ya(e,t){const n=s.createContext(t),o=i=>{const{children:a,...c}=i,d=s.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:d,children:a})};o.displayName=e+"Provider";function r(i){const a=s.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[o,r]}function de(e,t=[]){let n=[];function o(i,a){const c=s.createContext(a),d=n.length;n=[...n,a];const l=f=>{const{scope:h,children:v,...w}=f,m=h?.[e]?.[d]||c,g=s.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:g,children:v})};l.displayName=i+"Provider";function u(f,h){const v=h?.[e]?.[d]||c,w=s.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[l,u]}const r=()=>{const i=n.map(a=>s.createContext(a));return function(c){const d=c?.[e]||i;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return r.scopeName=e,[o,ba(r,...t)]}function ba(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const a=o.reduce((c,{useScope:d,scopeName:l})=>{const f=d(i)[`__scope${l}`];return{...c,...f}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function M(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var ce=globalThis?.document?s.useLayoutEffect:()=>{},Ca=s[" useInsertionEffect ".trim().toString()]||ce;function ke({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,i,a]=Ea({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:r;{const u=s.useRef(e!==void 0);s.useEffect(()=>{const f=u.current;f!==c&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=c},[c,o])}const l=s.useCallback(u=>{if(c){const f=Ra(u)?u(e):u;f!==e&&a.current?.(f)}else i(u)},[c,e,i,a]);return[d,l]}function Ea({defaultProp:e,onChange:t}){const[n,o]=s.useState(e),r=s.useRef(n),i=s.useRef(t);return Ca(()=>{i.current=t},[t]),s.useEffect(()=>{r.current!==n&&(i.current?.(n),r.current=n)},[n,r]),[n,o,i]}function Ra(e){return typeof e=="function"}function Sa(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Fo(e){const[t,n]=s.useState(void 0);return ce(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,c;if("borderBoxSize"in i){const d=i.borderBoxSize,l=Array.isArray(d)?d[0]:d;a=l.inlineSize,c=l.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function Ta(e,t){return s.useReducer((n,o)=>t[n][o]??n,e)}var Z=e=>{const{present:t,children:n}=e,o=Pa(t),r=typeof n=="function"?n({present:o.isPresent}):s.Children.only(n),i=H(o.ref,Ma(r));return typeof n=="function"||o.isPresent?s.cloneElement(r,{ref:i}):null};Z.displayName="Presence";function Pa(e){const[t,n]=s.useState(),o=s.useRef(null),r=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[c,d]=Ta(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const l=Je(o.current);i.current=c==="mounted"?l:"none"},[c]),ce(()=>{const l=o.current,u=r.current;if(u!==e){const h=i.current,v=Je(l);e?d("MOUNT"):v==="none"||l?.display==="none"?d("UNMOUNT"):d(u&&h!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),ce(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,f=v=>{const m=Je(o.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(d("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=v=>{v.target===t&&(i.current=Je(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function Je(e){return e?.animationName||"none"}function Ma(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function je(e){const t=_a(e),n=s.forwardRef((o,r)=>{const{children:i,...a}=o,c=s.Children.toArray(i),d=c.find(ka);if(d){const l=d.props.children,u=c.map(f=>f===d?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:f);return p.jsx(t,{...a,ref:r,children:s.isValidElement(l)?s.cloneElement(l,void 0,u):null})}return p.jsx(t,{...a,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}function _a(e){const t=s.forwardRef((n,o)=>{const{children:r,...i}=n;if(s.isValidElement(r)){const a=Da(r),c=Oa(i,r.props);return r.type!==s.Fragment&&(c.ref=o?xt(o,a):a),s.cloneElement(r,c)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $o=Symbol("radix.slottable");function Aa(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=$o,t}function ka(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$o}function Oa(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...c)=>{const d=i(...c);return r(...c),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function Da(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Na=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],I=Na.reduce((e,t)=>{const n=je(`Primitive.${t}`),o=s.forwardRef((r,i)=>{const{asChild:a,...c}=r,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(d,{...c,ref:i})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function un(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}var yt="Checkbox",[Ia]=de(yt),[La,dn]=Ia(yt);function ja(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:i,form:a,name:c,onCheckedChange:d,required:l,value:u="on",internal_do_not_use_render:f}=e,[h,v]=ke({prop:n,defaultProp:r??!1,onChange:d,caller:yt}),[w,m]=s.useState(null),[g,x]=s.useState(null),y=s.useRef(!1),b=w?!!a||!!w.closest("form"):!0,C={checked:h,disabled:i,setChecked:v,control:w,setControl:m,name:c,form:a,value:u,hasConsumerStoppedPropagationRef:y,required:l,defaultChecked:me(r)?!1:r,isFormControl:b,bubbleInput:g,setBubbleInput:x};return p.jsx(La,{scope:t,...C,children:Fa(f)?f(C):o})}var Bo="CheckboxTrigger",Wo=s.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:i,value:a,disabled:c,checked:d,required:l,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:w}=dn(Bo,e),m=H(r,u),g=s.useRef(d);return s.useEffect(()=>{const x=i?.form;if(x){const y=()=>f(g.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[i,f]),p.jsx(I.button,{type:"button",role:"checkbox","aria-checked":me(d)?"mixed":d,"aria-required":l,"data-state":zo(d),"data-disabled":c?"":void 0,disabled:c,value:a,...o,ref:m,onKeyDown:M(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:M(n,x=>{f(y=>me(y)?!0:!y),w&&v&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})})});Wo.displayName=Bo;var Ho=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:i,required:a,disabled:c,value:d,onCheckedChange:l,form:u,...f}=e;return p.jsx(ja,{__scopeCheckbox:n,checked:r,defaultChecked:i,disabled:c,required:a,onCheckedChange:l,name:o,form:u,value:d,internal_do_not_use_render:({isFormControl:h})=>p.jsxs(p.Fragment,{children:[p.jsx(Wo,{...f,ref:t,__scopeCheckbox:n}),h&&p.jsx(Go,{__scopeCheckbox:n})]})})});Ho.displayName=yt;var Vo="CheckboxIndicator",Ko=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,i=dn(Vo,n);return p.jsx(Z,{present:o||me(i.checked)||i.checked===!0,children:p.jsx(I.span,{"data-state":zo(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});Ko.displayName=Vo;var Uo="CheckboxBubbleInput",Go=s.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:i,defaultChecked:a,required:c,disabled:d,name:l,value:u,form:f,bubbleInput:h,setBubbleInput:v}=dn(Uo,e),w=H(n,v),m=Sa(i),g=Fo(o);s.useEffect(()=>{const y=h;if(!y)return;const b=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(b,"checked").set,S=!r.current;if(m!==i&&E){const R=new Event("click",{bubbles:S});y.indeterminate=me(i),E.call(y,me(i)?!1:i),y.dispatchEvent(R)}},[h,m,i,r]);const x=s.useRef(me(i)?!1:i);return p.jsx(I.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??x.current,required:c,disabled:d,name:l,value:u,form:f,...t,tabIndex:-1,ref:w,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Go.displayName=Uo;function Fa(e){return typeof e=="function"}function me(e){return e==="indeterminate"}function zo(e){return me(e)?"indeterminate":e?"checked":"unchecked"}const $a="_checkboxRow_aw0oa_1",Ba="_checkboxRoot_aw0oa_7",Wa="_checkboxIndicator_aw0oa_19",Ha="_checkboxCheckmarkIcon_aw0oa_29",Va="_checkboxLabel_aw0oa_35",Ie={checkboxRow:$a,checkboxRoot:Ba,checkboxIndicator:Wa,checkboxCheckmarkIcon:Ha,checkboxLabel:Va},Ka=({id:e,labelContent:t,checked:n,onClick:o})=>p.jsxs("div",{className:Ie.checkboxRow,children:[p.jsx(Ho,{checked:n,onCheckedChange:r=>{o(r===!0)},className:Ie.checkboxRoot,defaultChecked:!0,id:e,children:p.jsx(Ko,{className:Ie.checkboxIndicator,children:p.jsx(an,{className:Ie.checkboxCheckmarkIcon})})}),p.jsx("label",{className:Ie.checkboxLabel,htmlFor:e,children:t})]});var Ua=s[" useId ".trim().toString()]||(()=>{}),Ga=0;function we(e){const[t,n]=s.useState(Ua());return ce(()=>{n(o=>o??String(Ga++))},[e]),e||(t?`radix-${t}`:"")}function Y(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function za(e,t=globalThis?.document){const n=Y(e);s.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Ya="DismissableLayer",Gt="dismissableLayer.update",Xa="dismissableLayer.pointerDownOutside",qa="dismissableLayer.focusOutside",Wn,Yo=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ve=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:a,onDismiss:c,...d}=e,l=s.useContext(Yo),[u,f]=s.useState(null),h=u?.ownerDocument??globalThis?.document,[,v]=s.useState({}),w=H(t,R=>f(R)),m=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(g),y=u?m.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,C=y>=x,E=Qa(R=>{const _=R.target,N=[...l.branches].some(D=>D.contains(_));!C||N||(r?.(R),a?.(R),R.defaultPrevented||c?.())},h),S=Ja(R=>{const _=R.target;[...l.branches].some(D=>D.contains(_))||(i?.(R),a?.(R),R.defaultPrevented||c?.())},h);return za(R=>{y===l.layers.size-1&&(o?.(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},h),s.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Wn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Hn(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Wn)}},[u,h,n,l]),s.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Hn())},[u,l]),s.useEffect(()=>{const R=()=>v({});return document.addEventListener(Gt,R),()=>document.removeEventListener(Gt,R)},[]),p.jsx(I.div,{...d,ref:w,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,S.onFocusCapture),onBlurCapture:M(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,E.onPointerDownCapture)})});Ve.displayName=Ya;var Za="DismissableLayerBranch",Xo=s.forwardRef((e,t)=>{const n=s.useContext(Yo),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const i=o.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(I.div,{...e,ref:r})});Xo.displayName=Za;function Qa(e,t=globalThis?.document){const n=Y(e),o=s.useRef(!1),r=s.useRef(()=>{});return s.useEffect(()=>{const i=c=>{if(c.target&&!o.current){let d=function(){qo(Xa,n,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=d,t.addEventListener("click",r.current,{once:!0})):d()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Ja(e,t=globalThis?.document){const n=Y(e),o=s.useRef(!1);return s.useEffect(()=>{const r=i=>{i.target&&!o.current&&qo(qa,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Hn(){const e=new CustomEvent(Gt);document.dispatchEvent(e)}function qo(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,i):r.dispatchEvent(i)}var ec=Ve,tc=Xo,It="focusScope.autoFocusOnMount",Lt="focusScope.autoFocusOnUnmount",Vn={bubbles:!1,cancelable:!0},nc="FocusScope",fn=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:i,...a}=e,[c,d]=s.useState(null),l=Y(r),u=Y(i),f=s.useRef(null),h=H(t,m=>d(m)),v=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let m=function(b){if(v.paused||!c)return;const C=b.target;c.contains(C)?f.current=C:pe(f.current,{select:!0})},g=function(b){if(v.paused||!c)return;const C=b.relatedTarget;C!==null&&(c.contains(C)||pe(f.current,{select:!0}))},x=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&pe(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const y=new MutationObserver(x);return c&&y.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),y.disconnect()}}},[o,c,v.paused]),s.useEffect(()=>{if(c){Un.add(v);const m=document.activeElement;if(!c.contains(m)){const x=new CustomEvent(It,Vn);c.addEventListener(It,l),c.dispatchEvent(x),x.defaultPrevented||(oc(cc(Zo(c)),{select:!0}),document.activeElement===m&&pe(c))}return()=>{c.removeEventListener(It,l),setTimeout(()=>{const x=new CustomEvent(Lt,Vn);c.addEventListener(Lt,u),c.dispatchEvent(x),x.defaultPrevented||pe(m??document.body,{select:!0}),c.removeEventListener(Lt,u),Un.remove(v)},0)}}},[c,l,u,v]);const w=s.useCallback(m=>{if(!n&&!o||v.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(g&&x){const y=m.currentTarget,[b,C]=rc(y);b&&C?!m.shiftKey&&x===C?(m.preventDefault(),n&&pe(b,{select:!0})):m.shiftKey&&x===b&&(m.preventDefault(),n&&pe(C,{select:!0})):x===y&&m.preventDefault()}},[n,o,v.paused]);return p.jsx(I.div,{tabIndex:-1,...a,ref:h,onKeyDown:w})});fn.displayName=nc;function oc(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(pe(o,{select:t}),document.activeElement!==n)return}function rc(e){const t=Zo(e),n=Kn(t,e),o=Kn(t.reverse(),e);return[n,o]}function Zo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kn(e,t){for(const n of e)if(!sc(n,{upTo:t}))return n}function sc(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 ic(e){return e instanceof HTMLInputElement&&"select"in e}function pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ic(e)&&t&&e.select()}}var Un=ac();function ac(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Gn(e,t),e.unshift(t)},remove(t){e=Gn(e,t),e[0]?.resume()}}}function Gn(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function cc(e){return e.filter(t=>t.tagName!=="A")}var lc="Portal",Ke=s.forwardRef((e,t)=>{const{container:n,...o}=e,[r,i]=s.useState(!1);ce(()=>i(!0),[]);const a=n||r&&globalThis?.document?.body;return a?mo.createPortal(p.jsx(I.div,{...o,ref:t}),a):null});Ke.displayName=lc;var jt=0;function Qo(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zn()),document.body.insertAdjacentElement("beforeend",e[1]??zn()),jt++,()=>{jt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jt--}},[])}function zn(){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 oe=function(){return oe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},oe.apply(this,arguments)};function Jo(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function uc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,i;o<r;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}var at="right-scroll-bar-position",ct="width-before-scroll-bar",dc="with-scroll-bars-hidden",fc="--removed-body-scroll-bar-size";function Ft(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pc(e,t){var n=k.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var mc=typeof window<"u"?s.useLayoutEffect:s.useEffect,Yn=new WeakMap;function hc(e,t){var n=pc(null,function(o){return e.forEach(function(r){return Ft(r,o)})});return mc(function(){var o=Yn.get(n);if(o){var r=new Set(o),i=new Set(e),a=n.current;r.forEach(function(c){i.has(c)||Ft(c,null)}),i.forEach(function(c){r.has(c)||Ft(c,a)})}Yn.set(n,e)},[e]),n}function vc(e){return e}function gc(e,t){t===void 0&&(t=vc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(i){for(o=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(i),a=n}var d=function(){var u=a;a=[],u.forEach(i)},l=function(){return Promise.resolve().then(d)};l(),n={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),n}}}};return r}function wc(e){e===void 0&&(e={});var t=gc(null);return t.options=oe({async:!0,ssr:!1},e),t}var er=function(e){var t=e.sideCar,n=Jo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,oe({},n))};er.isSideCarExport=!0;function xc(e,t){return e.useMedium(t),er}var tr=wc(),$t=function(){},bt=s.forwardRef(function(e,t){var n=s.useRef(null),o=s.useState({onScrollCapture:$t,onWheelCapture:$t,onTouchMoveCapture:$t}),r=o[0],i=o[1],a=e.forwardProps,c=e.children,d=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,h=e.sideCar,v=e.noRelative,w=e.noIsolation,m=e.inert,g=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,b=e.gapMode,C=Jo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,S=hc([n,t]),R=oe(oe({},C),r);return s.createElement(s.Fragment,null,u&&s.createElement(E,{sideCar:tr,removeScrollBar:l,shards:f,noRelative:v,noIsolation:w,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?s.cloneElement(s.Children.only(c),oe(oe({},R),{ref:S})):s.createElement(y,oe({},R,{className:d,ref:S}),c))});bt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bt.classNames={fullWidth:ct,zeroRight:at};var yc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yc();return t&&e.setAttribute("nonce",t),e}function Cc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ec(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=bc())&&(Cc(t,n),Ec(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sc=function(){var e=Rc();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},nr=function(){var e=Sc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Tc={left:0,top:0,right:0,gap:0},Bt=function(e){return parseInt(e||"",10)||0},Pc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Bt(n),Bt(o),Bt(r)]},Mc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Tc;var t=Pc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},_c=nr(),Pe="data-scroll-locked",Ac=function(e,t,n,o){var r=e.left,i=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(dc,` {
|
|
3
3
|
overflow: hidden `).concat(o,`;
|
|
4
4
|
padding-right: `).concat(c,"px ").concat(o,`;
|
|
5
5
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
overscroll-behavior: contain;
|
|
9
9
|
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
10
10
|
padding-left: `.concat(r,`px;
|
|
11
|
-
padding-top: `).concat(
|
|
11
|
+
padding-top: `).concat(i,`px;
|
|
12
12
|
padding-right: `).concat(a,`px;
|
|
13
13
|
margin-left:0;
|
|
14
14
|
margin-top:0;
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
body[`).concat(Pe,`] {
|
|
36
|
-
`).concat(
|
|
36
|
+
`).concat(fc,": ").concat(c,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},Xn=function(){var e=parseInt(document.body.getAttribute(Pe)||"0",10);return isFinite(e)?e:0},
|
|
38
|
+
`)},Xn=function(){var e=parseInt(document.body.getAttribute(Pe)||"0",10);return isFinite(e)?e:0},kc=function(){s.useEffect(function(){return document.body.setAttribute(Pe,(Xn()+1).toString()),function(){var e=Xn()-1;e<=0?document.body.removeAttribute(Pe):document.body.setAttribute(Pe,e.toString())}},[])},Oc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;kc();var i=s.useMemo(function(){return Mc(r)},[r]);return s.createElement(_c,{styles:Ac(i,!t,r,n?"":"!important")})},zt=!1;if(typeof window<"u")try{var et=Object.defineProperty({},"passive",{get:function(){return zt=!0,!0}});window.addEventListener("test",et,et),window.removeEventListener("test",et,et)}catch{zt=!1}var Ee=zt?{passive:!1}:!1,Dc=function(e){return e.tagName==="TEXTAREA"},or=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Dc(e)&&n[t]==="visible")},Nc=function(e){return or(e,"overflowY")},Ic=function(e){return or(e,"overflowX")},qn=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=rr(e,o);if(r){var i=sr(e,o),a=i[1],c=i[2];if(a>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Lc=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},jc=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},rr=function(e,t){return e==="v"?Nc(t):Ic(t)},sr=function(e,t){return e==="v"?Lc(t):jc(t)},Fc=function(e,t){return e==="h"&&t==="rtl"?-1:1},$c=function(e,t,n,o,r){var i=Fc(e,window.getComputedStyle(t).direction),a=i*o,c=n.target,d=t.contains(c),l=!1,u=a>0,f=0,h=0;do{if(!c)break;var v=sr(e,c),w=v[0],m=v[1],g=v[2],x=m-g-i*w;(w||x)&&rr(e,c)&&(f+=x,h+=w);var y=c.parentNode;c=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(u&&Math.abs(f)<1||!u&&Math.abs(h)<1)&&(l=!0),l},tt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zn=function(e){return[e.deltaX,e.deltaY]},Qn=function(e){return e&&"current"in e?e.current:e},Bc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Wc=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},
|
|
41
|
+
`)},Hc=0,Re=[];function Vc(e){var t=s.useRef([]),n=s.useRef([0,0]),o=s.useRef(),r=s.useState(Hc++)[0],i=s.useState(nr)[0],a=s.useRef(e);s.useEffect(function(){a.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=uc([e.lockRef.current],(e.shards||[]).map(Qn),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var x=tt(m),y=n.current,b="deltaX"in m?m.deltaX:y[0]-x[0],C="deltaY"in m?m.deltaY:y[1]-x[1],E,S=m.target,R=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in m&&R==="h"&&S.type==="range")return!1;var _=qn(R,S);if(!_)return!0;if(_?E=R:(E=R==="v"?"h":"v",_=qn(R,S)),!_)return!1;if(!o.current&&"changedTouches"in m&&(b||C)&&(o.current=E),!E)return!0;var N=o.current||E;return $c(N,g,m,N==="h"?b:C)},[]),d=s.useCallback(function(m){var g=m;if(!(!Re.length||Re[Re.length-1]!==i)){var x="deltaY"in g?Zn(g):tt(g),y=t.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&Bc(E.delta,x)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var b=(a.current.shards||[]).map(Qn).filter(Boolean).filter(function(E){return E.contains(g.target)}),C=b.length>0?c(g,b[0]):!a.current.noIsolation;C&&g.cancelable&&g.preventDefault()}}},[]),l=s.useCallback(function(m,g,x,y){var b={name:m,delta:g,target:x,should:y,shadowParent:Kc(x)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),u=s.useCallback(function(m){n.current=tt(m),o.current=void 0},[]),f=s.useCallback(function(m){l(m.type,Zn(m),m.target,c(m,e.lockRef.current))},[]),h=s.useCallback(function(m){l(m.type,tt(m),m.target,c(m,e.lockRef.current))},[]);s.useEffect(function(){return Re.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",d,Ee),document.addEventListener("touchmove",d,Ee),document.addEventListener("touchstart",u,Ee),function(){Re=Re.filter(function(m){return m!==i}),document.removeEventListener("wheel",d,Ee),document.removeEventListener("touchmove",d,Ee),document.removeEventListener("touchstart",u,Ee)}},[]);var v=e.removeScrollBar,w=e.inert;return s.createElement(s.Fragment,null,w?s.createElement(i,{styles:Wc(r)}):null,v?s.createElement(Oc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Kc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Uc=xc(tr,Vc);var pn=s.forwardRef(function(e,t){return s.createElement(bt,oe({},e,{ref:t,sideCar:Uc}))});pn.classNames=bt.classNames;var Gc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Se=new WeakMap,nt=new WeakMap,ot={},Wt=0,ir=function(e){return e&&(e.host||ir(e.parentNode))},zc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=ir(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Yc=function(e,t,n,o){var r=zc(t,Array.isArray(e)?e:[e]);ot[n]||(ot[n]=new WeakMap);var i=ot[n],a=[],c=new Set,d=new Set(r),l=function(f){!f||c.has(f)||(c.add(f),l(f.parentNode))};r.forEach(l);var u=function(f){!f||d.has(f)||Array.prototype.forEach.call(f.children,function(h){if(c.has(h))u(h);else try{var v=h.getAttribute(o),w=v!==null&&v!=="false",m=(Se.get(h)||0)+1,g=(i.get(h)||0)+1;Se.set(h,m),i.set(h,g),a.push(h),m===1&&w&&nt.set(h,!0),g===1&&h.setAttribute(n,"true"),w||h.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return u(t),c.clear(),Wt++,function(){a.forEach(function(f){var h=Se.get(f)-1,v=i.get(f)-1;Se.set(f,h),i.set(f,v),h||(nt.has(f)||f.removeAttribute(o),nt.delete(f)),v||f.removeAttribute(n)}),Wt--,Wt||(Se=new WeakMap,Se=new WeakMap,nt=new WeakMap,ot={})}},ar=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Gc(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),Yc(o,r,n,"aria-hidden")):function(){return null}},Ct="Dialog",[cr]=de(Ct),[Xc,te]=cr(Ct),lr=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:i,modal:a=!0}=e,c=s.useRef(null),d=s.useRef(null),[l,u]=ke({prop:o,defaultProp:r??!1,onChange:i,caller:Ct});return p.jsx(Xc,{scope:t,triggerRef:c,contentRef:d,contentId:we(),titleId:we(),descriptionId:we(),open:l,onOpenChange:u,onOpenToggle:s.useCallback(()=>u(f=>!f),[u]),modal:a,children:n})};lr.displayName=Ct;var ur="DialogTrigger",dr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(ur,n),i=H(t,r.triggerRef);return p.jsx(I.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":vn(r.open),...o,ref:i,onClick:M(e.onClick,r.onOpenToggle)})});dr.displayName=ur;var mn="DialogPortal",[qc,fr]=cr(mn,{forceMount:void 0}),pr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,i=te(mn,t);return p.jsx(qc,{scope:t,forceMount:n,children:s.Children.map(o,a=>p.jsx(Z,{present:n||i.open,children:p.jsx(Ke,{asChild:!0,container:r,children:a})}))})};pr.displayName=mn;var dt="DialogOverlay",mr=s.forwardRef((e,t)=>{const n=fr(dt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,i=te(dt,e.__scopeDialog);return i.modal?p.jsx(Z,{present:o||i.open,children:p.jsx(Qc,{...r,ref:t})}):null});mr.displayName=dt;var Zc=je("DialogOverlay.RemoveScroll"),Qc=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(dt,n);return p.jsx(pn,{as:Zc,allowPinchZoom:!0,shards:[r.contentRef],children:p.jsx(I.div,{"data-state":vn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),xe="DialogContent",hr=s.forwardRef((e,t)=>{const n=fr(xe,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,i=te(xe,e.__scopeDialog);return p.jsx(Z,{present:o||i.open,children:i.modal?p.jsx(Jc,{...r,ref:t}):p.jsx(el,{...r,ref:t})})});hr.displayName=xe;var Jc=s.forwardRef((e,t)=>{const n=te(xe,e.__scopeDialog),o=s.useRef(null),r=H(t,n.contentRef,o);return s.useEffect(()=>{const i=o.current;if(i)return ar(i)},[]),p.jsx(vr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:M(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:M(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&i.preventDefault()}),onFocusOutside:M(e.onFocusOutside,i=>i.preventDefault())})}),el=s.forwardRef((e,t)=>{const n=te(xe,e.__scopeDialog),o=s.useRef(!1),r=s.useRef(!1);return p.jsx(vr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(o.current||n.triggerRef.current?.focus(),i.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=i.target;n.triggerRef.current?.contains(a)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),vr=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:i,...a}=e,c=te(xe,n),d=s.useRef(null),l=H(t,d);return Qo(),p.jsxs(p.Fragment,{children:[p.jsx(fn,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:i,children:p.jsx(Ve,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":vn(c.open),...a,ref:l,onDismiss:()=>c.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(nl,{titleId:c.titleId}),p.jsx(rl,{contentRef:d,descriptionId:c.descriptionId})]})]})}),hn="DialogTitle",gr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(hn,n);return p.jsx(I.h2,{id:r.titleId,...o,ref:t})});gr.displayName=hn;var wr="DialogDescription",tl=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(wr,n);return p.jsx(I.p,{id:r.descriptionId,...o,ref:t})});tl.displayName=wr;var xr="DialogClose",yr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(xr,n);return p.jsx(I.button,{type:"button",...o,ref:t,onClick:M(e.onClick,()=>r.onOpenChange(!1))})});yr.displayName=xr;function vn(e){return e?"open":"closed"}var br="DialogTitleWarning",[Ep,Cr]=ya(br,{contentName:xe,titleName:hn,docsSlug:"dialog"}),nl=({titleId:e})=>{const t=Cr(br),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
42
|
|
|
43
43
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
44
|
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},wc="DialogDescriptionWarning",xc=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pr(wc).contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},yc=er,bc=nr,Cc=rr,Ec=sr,Rc=ir,Tc=cr,Sc=dr;const Pc="_dialogOverlay_lcauq_1",_c="_dialogContent_lcauq_20",Mc="_dialogCloseButton_lcauq_65",Ac="_dialogTitle_lcauq_72",rt={dialogOverlay:Pc,dialogContent:_c,dialogCloseButton:Mc,dialogTitle:Ac},Oc=({trigger:e,children:t,title:n,...o})=>p.jsxs(yc,{...o,children:[p.jsx(bc,{asChild:!0,children:e}),p.jsxs(Cc,{children:[p.jsx(Ec,{className:`${rt.dialogOverlay}`}),p.jsxs(Rc,{className:rt.dialogContent,onPointerDownOutside:r=>{r?.preventDefault()},"data-size":"md",children:[p.jsx(Sc,{asChild:!0,children:p.jsx(gt,{className:`${rt.dialogCloseButton}`,variant:"tertiary",iconOnly:!0,children:p.jsx(cn,{})})}),p.jsx(Tc,{className:rt.dialogTitle,children:n}),t]})]})]});function gn(e){const t=e+"CollectionProvider",[n,o]=de(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:g,children:x}=m,y=k.useRef(null),b=k.useRef(new Map).current;return p.jsx(r,{scope:g,itemMap:b,collectionRef:y,children:x})};a.displayName=t;const c=e+"CollectionSlot",d=je(c),l=k.forwardRef((m,g)=>{const{scope:x,children:y}=m,b=s(c,x),C=W(g,b.collectionRef);return p.jsx(d,{ref:C,children:y})});l.displayName=c;const u=e+"CollectionItemSlot",f="data-radix-collection-item",h=je(u),v=k.forwardRef((m,g)=>{const{scope:x,children:y,...b}=m,C=k.useRef(null),E=W(g,C),T=s(u,x);return k.useEffect(()=>(T.itemMap.set(C,{ref:C,...b}),()=>void T.itemMap.delete(C))),p.jsx(h,{[f]:"",ref:E,children:y})});v.displayName=u;function w(m){const g=s(e+"CollectionConsumer",m);return k.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((T,R)=>b.indexOf(T.ref.current)-b.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},w,o]}var Dc=i.createContext(void 0);function mr(e){const t=i.useContext(Dc);return e||t||"ltr"}const Nc=["top","right","bottom","left"],he=Math.min,G=Math.max,dt=Math.round,st=Math.floor,se=e=>({x:e,y:e}),Ic={left:"right",right:"left",bottom:"top",top:"bottom"},kc={start:"end",end:"start"};function Yt(e,t,n){return G(e,he(t,n))}function le(e,t){return typeof e=="function"?e(t):e}function ue(e){return e.split("-")[0]}function De(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function xn(e){return e==="y"?"height":"width"}const Lc=new Set(["top","bottom"]);function re(e){return Lc.has(ue(e))?"y":"x"}function yn(e){return wn(re(e))}function jc(e,t,n){n===void 0&&(n=!1);const o=De(e),r=yn(e),s=xn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=ft(a)),[a,ft(a)]}function Fc(e){const t=ft(e);return[Xt(e),t,Xt(t)]}function Xt(e){return e.replace(/start|end/g,t=>kc[t])}const Jn=["left","right"],eo=["right","left"],$c=["top","bottom"],Bc=["bottom","top"];function Wc(e,t,n){switch(e){case"top":case"bottom":return n?t?eo:Jn:t?Jn:eo;case"left":case"right":return t?$c:Bc;default:return[]}}function Hc(e,t,n,o){const r=De(e);let s=Wc(ue(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Xt)))),s}function ft(e){return e.replace(/left|right|bottom|top/g,t=>Ic[t])}function Vc(e){return{top:0,right:0,bottom:0,left:0,...e}}function hr(e){return typeof e!="number"?Vc(e):{top:e,right:e,bottom:e,left:e}}function pt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function to(e,t,n){let{reference:o,floating:r}=e;const s=re(t),a=yn(t),c=xn(a),d=ue(t),l=s==="y",u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let v;switch(d){case"top":v={x:u,y:o.y-r.height};break;case"bottom":v={x:u,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:f};break;case"left":v={x:o.x-r.width,y:f};break;default:v={x:o.x,y:o.y}}switch(De(t)){case"start":v[a]-=h*(n&&l?-1:1);break;case"end":v[a]+=h*(n&&l?-1:1);break}return v}const Kc=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,c=s.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:f}=to(l,o,d),h=o,v={},w=0;for(let m=0;m<c.length;m++){const{name:g,fn:x}=c[m],{x:y,y:b,data:C,reset:E}=await x({x:u,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});u=y??u,f=b??f,v={...v,[g]:{...v[g],...C}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(l=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:u,y:f}=to(l,h,d)),m=-1)}return{x:u,y:f,placement:h,strategy:r,middlewareData:v}};async function Fe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:c,strategy:d}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:v=0}=le(t,e),w=hr(v),g=c[h?f==="floating"?"reference":"floating":f],x=pt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:u,strategy:d})),y=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},E=pt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:b,strategy:d}):y);return{top:(x.top-E.top+w.top)/C.y,bottom:(E.bottom-x.bottom+w.bottom)/C.y,left:(x.left-E.left+w.left)/C.x,right:(E.right-x.right+w.right)/C.x}}const Uc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:c,middlewareData:d}=t,{element:l,padding:u=0}=le(e,t)||{};if(l==null)return{};const f=hr(u),h={x:n,y:o},v=yn(r),w=xn(v),m=await a.getDimensions(l),g=v==="y",x=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",C=s.reference[w]+s.reference[v]-h[v]-s.floating[w],E=h[v]-s.reference[v],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let R=T?T[b]:0;(!R||!await(a.isElement==null?void 0:a.isElement(T)))&&(R=c.floating[b]||s.floating[w]);const M=C/2-E/2,N=R/2-m[w]/2-1,D=he(f[x],N),L=he(f[y],N),B=D,j=R-m[w]-L,P=R/2-m[w]/2+M,F=Yt(B,P,j),O=!d.arrow&&De(r)!=null&&P!==F&&s.reference[w]/2-(P<B?D:L)-m[w]/2<0,$=O?P<B?P-B:P-j:0;return{[v]:h[v]+$,data:{[v]:F,centerOffset:P-F-$,...O&&{alignmentOffset:$}},reset:O}}}),Gc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:c,platform:d,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...g}=le(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=ue(r),y=re(c),b=ue(c)===c,C=await(d.isRTL==null?void 0:d.isRTL(l.floating)),E=h||(b||!m?[ft(c)]:Fc(c)),T=w!=="none";!h&&T&&E.push(...Hc(c,m,w,C));const R=[c,...E],M=await Fe(t,g),N=[];let D=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&N.push(M[x]),f){const P=jc(r,a,C);N.push(M[P[0]],M[P[1]])}if(D=[...D,{placement:r,overflows:N}],!N.every(P=>P<=0)){var L,B;const P=(((L=s.flip)==null?void 0:L.index)||0)+1,F=R[P];if(F&&(!(f==="alignment"?y!==re(F):!1)||D.every(A=>re(A.placement)===y?A.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:F}};let O=(B=D.filter($=>$.overflows[0]<=0).sort(($,A)=>$.overflows[1]-A.overflows[1])[0])==null?void 0:B.placement;if(!O)switch(v){case"bestFit":{var j;const $=(j=D.filter(A=>{if(T){const S=re(A.placement);return S===y||S==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(S=>S>0).reduce((S,H)=>S+H,0)]).sort((A,S)=>A[1]-S[1])[0])==null?void 0:j[0];$&&(O=$);break}case"initialPlacement":O=c;break}if(r!==O)return{reset:{placement:O}}}return{}}}};function no(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oo(e){return Nc.some(t=>e[t]>=0)}const zc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=le(e,t);switch(o){case"referenceHidden":{const s=await Fe(t,{...r,elementContext:"reference"}),a=no(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:oo(a)}}}case"escaped":{const s=await Fe(t,{...r,altBoundary:!0}),a=no(s,n.floating);return{data:{escapedOffsets:a,escaped:oo(a)}}}default:return{}}}}},vr=new Set(["left","top"]);async function Yc(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=ue(n),c=De(n),d=re(n)==="y",l=vr.has(a)?-1:1,u=s&&d?-1:1,f=le(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof w=="number"&&(v=c==="end"?w*-1:w),d?{x:v*u,y:h*l}:{x:h*l,y:v*u}}const Xc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:c}=t,d=await Yc(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+d.x,y:s+d.y,data:{...d,placement:a}}}}},qc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:g=>{let{x,y}=g;return{x,y}}},...d}=le(e,t),l={x:n,y:o},u=await Fe(t,d),f=re(ue(r)),h=wn(f);let v=l[h],w=l[f];if(s){const g=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=v+u[g],b=v-u[x];v=Yt(y,v,b)}if(a){const g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=w+u[g],b=w-u[x];w=Yt(y,w,b)}const m=c.fn({...t,[h]:v,[f]:w});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:s,[f]:a}}}}}},Zc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:c=0,mainAxis:d=!0,crossAxis:l=!0}=le(e,t),u={x:n,y:o},f=re(r),h=wn(f);let v=u[h],w=u[f];const m=le(c,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(d){const b=h==="y"?"height":"width",C=s.reference[h]-s.floating[b]+g.mainAxis,E=s.reference[h]+s.reference[b]-g.mainAxis;v<C?v=C:v>E&&(v=E)}if(l){var x,y;const b=h==="y"?"width":"height",C=vr.has(ue(r)),E=s.reference[f]-s.floating[b]+(C&&((x=a.offset)==null?void 0:x[f])||0)+(C?0:g.crossAxis),T=s.reference[f]+s.reference[b]+(C?0:((y=a.offset)==null?void 0:y[f])||0)-(C?g.crossAxis:0);w<E?w=E:w>T&&(w=T)}return{[h]:v,[f]:w}}}},Qc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:c}=t,{apply:d=()=>{},...l}=le(e,t),u=await Fe(t,l),f=ue(r),h=De(r),v=re(r)==="y",{width:w,height:m}=s.floating;let g,x;f==="top"||f==="bottom"?(g=f,x=h===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,g=h==="end"?"top":"bottom");const y=m-u.top-u.bottom,b=w-u.left-u.right,C=he(m-u[g],y),E=he(w-u[x],b),T=!t.middlewareData.shift;let R=C,M=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(R=y),T&&!h){const D=G(u.left,0),L=G(u.right,0),B=G(u.top,0),j=G(u.bottom,0);v?M=w-2*(D!==0||L!==0?D+L:G(u.left,u.right)):R=m-2*(B!==0||j!==0?B+j:G(u.top,u.bottom))}await d({...t,availableWidth:M,availableHeight:R});const N=await a.getDimensions(c.floating);return w!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function Ct(){return typeof window<"u"}function Ne(e){return gr(e)?(e.nodeName||"").toLowerCase():"#document"}function z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(gr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gr(e){return Ct()?e instanceof Node||e instanceof z(e).Node:!1}function J(e){return Ct()?e instanceof Element||e instanceof z(e).Element:!1}function ie(e){return Ct()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function ro(e){return!Ct()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}const Jc=new Set(["inline","contents"]);function Ue(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Jc.has(r)}const el=new Set(["table","td","th"]);function tl(e){return el.has(Ne(e))}const nl=[":popover-open",":modal"];function Et(e){return nl.some(t=>{try{return e.matches(t)}catch{return!1}})}const ol=["transform","translate","scale","rotate","perspective"],rl=["transform","translate","scale","rotate","perspective","filter"],sl=["paint","layout","strict","content"];function bn(e){const t=Cn(),n=J(e)?ee(e):e;return ol.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||rl.some(o=>(n.willChange||"").includes(o))||sl.some(o=>(n.contain||"").includes(o))}function il(e){let t=ve(e);for(;ie(t)&&!Me(t);){if(bn(t))return t;if(Et(t))return null;t=ve(t)}return null}function Cn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const al=new Set(["html","body","#document"]);function Me(e){return al.has(Ne(e))}function ee(e){return z(e).getComputedStyle(e)}function Rt(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ve(e){if(Ne(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ro(e)&&e.host||ae(e);return ro(t)?t.host:t}function wr(e){const t=ve(e);return Me(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Ue(t)?t:wr(t)}function $e(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=wr(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=z(r);if(s){const c=qt(a);return t.concat(a,a.visualViewport||[],Ue(r)?r:[],c&&n?$e(c):[])}return t.concat(r,$e(r,[],n))}function qt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xr(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ie(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,c=dt(n)!==s||dt(o)!==a;return c&&(n=s,o=a),{width:n,height:o,$:c}}function En(e){return J(e)?e:e.contextElement}function _e(e){const t=En(e);if(!ie(t))return se(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=xr(t);let a=(s?dt(n.width):n.width)/o,c=(s?dt(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const cl=se(0);function yr(e){const t=z(e);return!Cn()||!t.visualViewport?cl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ll(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==z(e)?!1:t}function ye(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=En(e);let a=se(1);t&&(o?J(o)&&(a=_e(o)):a=_e(e));const c=ll(s,n,o)?yr(s):se(0);let d=(r.left+c.x)/a.x,l=(r.top+c.y)/a.y,u=r.width/a.x,f=r.height/a.y;if(s){const h=z(s),v=o&&J(o)?z(o):o;let w=h,m=qt(w);for(;m&&o&&v!==w;){const g=_e(m),x=m.getBoundingClientRect(),y=ee(m),b=x.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,C=x.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;d*=g.x,l*=g.y,u*=g.x,f*=g.y,d+=b,l+=C,w=z(m),m=qt(w)}}return pt({width:u,height:f,x:d,y:l})}function Tt(e,t){const n=Rt(e).scrollLeft;return t?t.left+n:ye(ae(e)).left+n}function br(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Tt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function ul(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=ae(o),c=t?Et(t.floating):!1;if(o===a||c&&s)return n;let d={scrollLeft:0,scrollTop:0},l=se(1);const u=se(0),f=ie(o);if((f||!f&&!s)&&((Ne(o)!=="body"||Ue(a))&&(d=Rt(o)),ie(o))){const v=ye(o);l=_e(o),u.x=v.x+o.clientLeft,u.y=v.y+o.clientTop}const h=a&&!f&&!s?br(a,d):se(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-d.scrollLeft*l.x+u.x+h.x,y:n.y*l.y-d.scrollTop*l.y+u.y+h.y}}function dl(e){return Array.from(e.getClientRects())}function fl(e){const t=ae(e),n=Rt(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=G(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Tt(e);const c=-n.scrollTop;return ee(o).direction==="rtl"&&(a+=G(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:c}}const so=25;function pl(e,t){const n=z(e),o=ae(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,c=0,d=0;if(r){s=r.width,a=r.height;const u=Cn();(!u||u&&t==="fixed")&&(c=r.offsetLeft,d=r.offsetTop)}const l=Tt(o);if(l<=0){const u=o.ownerDocument,f=u.body,h=getComputedStyle(f),v=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-f.clientWidth-v);w<=so&&(s-=w)}else l<=so&&(s+=l);return{width:s,height:a,x:c,y:d}}const ml=new Set(["absolute","fixed"]);function hl(e,t){const n=ye(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=ie(e)?_e(e):se(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,d=r*s.x,l=o*s.y;return{width:a,height:c,x:d,y:l}}function io(e,t,n){let o;if(t==="viewport")o=pl(e,n);else if(t==="document")o=fl(ae(e));else if(J(t))o=hl(t,n);else{const r=yr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return pt(o)}function Cr(e,t){const n=ve(e);return n===t||!J(n)||Me(n)?!1:ee(n).position==="fixed"||Cr(n,t)}function vl(e,t){const n=t.get(e);if(n)return n;let o=$e(e,[],!1).filter(c=>J(c)&&Ne(c)!=="body"),r=null;const s=ee(e).position==="fixed";let a=s?ve(e):e;for(;J(a)&&!Me(a);){const c=ee(a),d=bn(a);!d&&c.position==="fixed"&&(r=null),(s?!d&&!r:!d&&c.position==="static"&&!!r&&ml.has(r.position)||Ue(a)&&!d&&Cr(e,a))?o=o.filter(u=>u!==a):r=c,a=ve(a)}return t.set(e,o),o}function gl(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Et(t)?[]:vl(t,this._c):[].concat(n),o],c=a[0],d=a.reduce((l,u)=>{const f=io(t,u,r);return l.top=G(f.top,l.top),l.right=he(f.right,l.right),l.bottom=he(f.bottom,l.bottom),l.left=G(f.left,l.left),l},io(t,c,r));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function wl(e){const{width:t,height:n}=xr(e);return{width:t,height:n}}function xl(e,t,n){const o=ie(t),r=ae(t),s=n==="fixed",a=ye(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=se(0);function l(){d.x=Tt(r)}if(o||!o&&!s)if((Ne(t)!=="body"||Ue(r))&&(c=Rt(t)),o){const v=ye(t,!0,s,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else r&&l();s&&!o&&r&&l();const u=r&&!o&&!s?br(r,c):se(0),f=a.left+c.scrollLeft-d.x-u.x,h=a.top+c.scrollTop-d.y-u.y;return{x:f,y:h,width:a.width,height:a.height}}function Wt(e){return ee(e).position==="static"}function ao(e,t){if(!ie(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ae(e)===n&&(n=n.ownerDocument.body),n}function Er(e,t){const n=z(e);if(Et(e))return n;if(!ie(e)){let r=ve(e);for(;r&&!Me(r);){if(J(r)&&!Wt(r))return r;r=ve(r)}return n}let o=ao(e,t);for(;o&&tl(o)&&Wt(o);)o=ao(o,t);return o&&Me(o)&&Wt(o)&&!bn(o)?n:o||il(e)||n}const yl=async function(e){const t=this.getOffsetParent||Er,n=this.getDimensions,o=await n(e.floating);return{reference:xl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function bl(e){return ee(e).direction==="rtl"}const Cl={convertOffsetParentRelativeRectToViewportRelativeRect:ul,getDocumentElement:ae,getClippingRect:gl,getOffsetParent:Er,getElementRects:yl,getClientRects:dl,getDimensions:wl,getScale:_e,isElement:J,isRTL:bl};function Rr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function El(e,t){let n=null,o;const r=ae(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function a(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();const l=e.getBoundingClientRect(),{left:u,top:f,width:h,height:v}=l;if(c||t(),!h||!v)return;const w=st(f),m=st(r.clientWidth-(u+h)),g=st(r.clientHeight-(f+v)),x=st(u),b={rootMargin:-w+"px "+-m+"px "+-g+"px "+-x+"px",threshold:G(0,he(1,d))||1};let C=!0;function E(T){const R=T[0].intersectionRatio;if(R!==d){if(!C)return a();R?a(!1,R):o=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!Rr(l,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(E,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return a(!0),s}function Rl(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,l=En(e),u=r||s?[...l?$e(l):[],...$e(t)]:[];u.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=l&&c?El(l,n):null;let h=-1,v=null;a&&(v=new ResizeObserver(x=>{let[y]=x;y&&y.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),n()}),l&&!d&&v.observe(l),v.observe(t));let w,m=d?ye(e):null;d&&g();function g(){const x=ye(e);m&&!Rr(m,x)&&n(),m=x,w=requestAnimationFrame(g)}return n(),()=>{var x;u.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f?.(),(x=v)==null||x.disconnect(),v=null,d&&cancelAnimationFrame(w)}}const Tl=Xc,Sl=qc,Pl=Gc,_l=Qc,Ml=zc,co=Uc,Al=Zc,Ol=(e,t,n)=>{const o=new Map,r={platform:Cl,...n},s={...r.platform,_c:o};return Kc(e,t,{...r,platform:s})};var Dl=typeof document<"u",Nl=function(){},lt=Dl?k.useLayoutEffect:Nl;function mt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!mt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!mt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Tr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lo(e,t){const n=Tr(e);return Math.round(t*n)/n}function Ht(e){const t=i.useRef(e);return lt(()=>{t.current=e}),t}function Il(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:d,open:l}=e,[u,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=i.useState(o);mt(h,o)||v(o);const[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useCallback(A=>{A!==T.current&&(T.current=A,m(A))},[]),b=i.useCallback(A=>{A!==R.current&&(R.current=A,x(A))},[]),C=s||w,E=a||g,T=i.useRef(null),R=i.useRef(null),M=i.useRef(u),N=d!=null,D=Ht(d),L=Ht(r),B=Ht(l),j=i.useCallback(()=>{if(!T.current||!R.current)return;const A={placement:t,strategy:n,middleware:h};L.current&&(A.platform=L.current),Ol(T.current,R.current,A).then(S=>{const H={...S,isPositioned:B.current!==!1};P.current&&!mt(M.current,H)&&(M.current=H,sn.flushSync(()=>{f(H)}))})},[h,t,n,L,B]);lt(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[l]);const P=i.useRef(!1);lt(()=>(P.current=!0,()=>{P.current=!1}),[]),lt(()=>{if(C&&(T.current=C),E&&(R.current=E),C&&E){if(D.current)return D.current(C,E,j);j()}},[C,E,j,D,N]);const F=i.useMemo(()=>({reference:T,floating:R,setReference:y,setFloating:b}),[y,b]),O=i.useMemo(()=>({reference:C,floating:E}),[C,E]),$=i.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const S=lo(O.floating,u.x),H=lo(O.floating,u.y);return c?{...A,transform:"translate("+S+"px, "+H+"px)",...Tr(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:S,top:H}},[n,c,O.floating,u.x,u.y]);return i.useMemo(()=>({...u,update:j,refs:F,elements:O,floatingStyles:$}),[u,j,F,O,$])}const kl=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?co({element:o.current,padding:r}).fn(n):{}:o?co({element:o,padding:r}).fn(n):{}}}},Ll=(e,t)=>({...Tl(e),options:[e,t]}),jl=(e,t)=>({...Sl(e),options:[e,t]}),Fl=(e,t)=>({...Al(e),options:[e,t]}),$l=(e,t)=>({...Pl(e),options:[e,t]}),Bl=(e,t)=>({..._l(e),options:[e,t]}),Wl=(e,t)=>({...Ml(e),options:[e,t]}),Hl=(e,t)=>({...kl(e),options:[e,t]});var Vl="Arrow",Sr=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return p.jsx(I.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Sr.displayName=Vl;var Kl=Sr,Rn="Popper",[Pr,St]=de(Rn),[Ul,_r]=Pr(Rn),Mr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return p.jsx(Ul,{scope:t,anchor:o,onAnchorChange:r,children:n})};Mr.displayName=Rn;var Ar="PopperAnchor",Or=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=_r(Ar,n),a=i.useRef(null),c=W(t,a),d=i.useRef(null);return i.useEffect(()=>{const l=d.current;d.current=o?.current||a.current,l!==d.current&&s.onAnchorChange(d.current)}),o?null:p.jsx(I.div,{...r,ref:c})});Or.displayName=Ar;var Tn="PopperContent",[Gl,zl]=Pr(Tn),Dr=i.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:w,...m}=e,g=_r(Tn,n),[x,y]=i.useState(null),b=W(t,V=>y(V)),[C,E]=i.useState(null),T=Mo(C),R=T?.width??0,M=T?.height??0,N=o+(s!=="center"?"-"+s:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},L=Array.isArray(l)?l:[l],B=L.length>0,j={padding:D,boundary:L.filter(Xl),altBoundary:B},{refs:P,floatingStyles:F,placement:O,isPositioned:$,middlewareData:A}=Il({strategy:"fixed",placement:N,whileElementsMounted:(...V)=>Rl(...V,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Ll({mainAxis:r+M,alignmentAxis:a}),d&&jl({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Fl():void 0,...j}),d&&$l({...j}),Bl({...j,apply:({elements:V,rects:Ie,availableWidth:Ys,availableHeight:Xs})=>{const{width:qs,height:Zs}=Ie.reference,Qe=V.floating.style;Qe.setProperty("--radix-popper-available-width",`${Ys}px`),Qe.setProperty("--radix-popper-available-height",`${Xs}px`),Qe.setProperty("--radix-popper-anchor-width",`${qs}px`),Qe.setProperty("--radix-popper-anchor-height",`${Zs}px`)}}),C&&Hl({element:C,padding:c}),ql({arrowWidth:R,arrowHeight:M}),h&&Wl({strategy:"referenceHidden",...j})]}),[S,H]=kr(O),X=Y(w);ce(()=>{$&&X?.()},[$,X]);const Q=A.arrow?.x,ne=A.arrow?.y,fe=A.arrow?.centerOffset!==0,[Ze,ge]=i.useState();return ce(()=>{x&&ge(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:$?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ze,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Gl,{scope:n,placedSide:S,onArrowChange:E,arrowX:Q,arrowY:ne,shouldHideArrow:fe,children:p.jsx(I.div,{"data-side":S,"data-align":H,...m,ref:b,style:{...m.style,animation:$?void 0:"none"}})})})});Dr.displayName=Tn;var Nr="PopperArrow",Yl={top:"bottom",right:"left",bottom:"top",left:"right"},Ir=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=zl(Nr,o),a=Yl[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Kl,{...r,ref:n,style:{...r.style,display:"block"}})})});Ir.displayName=Nr;function Xl(e){return e!==null}var ql=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,d=a?0:e.arrowHeight,[l,u]=kr(n),f={start:"0%",center:"50%",end:"100%"}[u],h=(r.arrow?.x??0)+c/2,v=(r.arrow?.y??0)+d/2;let w="",m="";return l==="bottom"?(w=a?f:`${h}px`,m=`${-d}px`):l==="top"?(w=a?f:`${h}px`,m=`${o.floating.height+d}px`):l==="right"?(w=`${-d}px`,m=a?f:`${v}px`):l==="left"&&(w=`${o.floating.width+d}px`,m=a?f:`${v}px`),{data:{x:w,y:m}}}});function kr(e){const[t,n="center"]=e.split("-");return[t,n]}var Lr=Mr,jr=Or,Fr=Dr,$r=Ir,Vt="rovingFocusGroup.onEntryFocus",Zl={bubbles:!1,cancelable:!0},Ge="RovingFocusGroup",[Zt,Br,Ql]=gn(Ge),[Jl,Wr]=de(Ge,[Ql]),[eu,tu]=Jl(Ge),Hr=i.forwardRef((e,t)=>p.jsx(Zt.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Zt.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(nu,{...e,ref:t})})}));Hr.displayName=Ge;var nu=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=e,h=i.useRef(null),v=W(t,h),w=mr(s),[m,g]=Oe({prop:a,defaultProp:c??null,onChange:d,caller:Ge}),[x,y]=i.useState(!1),b=Y(l),C=Br(n),E=i.useRef(!1),[T,R]=i.useState(0);return i.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(Vt,b),()=>M.removeEventListener(Vt,b)},[b]),p.jsx(eu,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:i.useCallback(M=>g(M),[g]),onItemShiftTab:i.useCallback(()=>y(!0),[]),onFocusableItemAdd:i.useCallback(()=>R(M=>M+1),[]),onFocusableItemRemove:i.useCallback(()=>R(M=>M-1),[]),children:p.jsx(I.div,{tabIndex:x||T===0?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:_(e.onMouseDown,()=>{E.current=!0}),onFocus:_(e.onFocus,M=>{const N=!E.current;if(M.target===M.currentTarget&&N&&!x){const D=new CustomEvent(Vt,Zl);if(M.currentTarget.dispatchEvent(D),!D.defaultPrevented){const L=C().filter(O=>O.focusable),B=L.find(O=>O.active),j=L.find(O=>O.id===m),F=[B,j,...L].filter(Boolean).map(O=>O.ref.current);Ur(F,u)}}E.current=!1}),onBlur:_(e.onBlur,()=>y(!1))})})}),Vr="RovingFocusGroupItem",Kr=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...c}=e,d=we(),l=s||d,u=tu(Vr,n),f=u.currentTabStopId===l,h=Br(n),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:m}=u;return i.useEffect(()=>{if(o)return v(),()=>w()},[o,v,w]),p.jsx(Zt.ItemSlot,{scope:n,id:l,focusable:o,active:r,children:p.jsx(I.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...c,ref:t,onMouseDown:_(e.onMouseDown,g=>{o?u.onItemFocus(l):g.preventDefault()}),onFocus:_(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:_(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const x=su(g,u.orientation,u.dir);if(x!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=h().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")b.reverse();else if(x==="prev"||x==="next"){x==="prev"&&b.reverse();const C=b.indexOf(g.currentTarget);b=u.loop?iu(b,C+1):b.slice(C+1)}setTimeout(()=>Ur(b))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:m!=null}):a})})});Kr.displayName=Vr;var ou={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ru(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function su(e,t,n){const o=ru(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return ou[o]}function Ur(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function iu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var au=Hr,cu=Kr,Qt=["Enter"," "],lu=["ArrowDown","PageUp","Home"],Gr=["ArrowUp","PageDown","End"],uu=[...lu,...Gr],du={ltr:[...Qt,"ArrowRight"],rtl:[...Qt,"ArrowLeft"]},fu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ze="Menu",[Be,pu,mu]=gn(ze),[be,zr]=de(ze,[mu,St,Wr]),Pt=St(),Yr=Wr(),[hu,Ce]=be(ze),[vu,Ye]=be(ze),Xr=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,c=Pt(t),[d,l]=i.useState(null),u=i.useRef(!1),f=Y(s),h=mr(r);return i.useEffect(()=>{const v=()=>{u.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>u.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),p.jsx(Lr,{...c,children:p.jsx(hu,{scope:t,open:n,onOpenChange:f,content:d,onContentChange:l,children:p.jsx(vu,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:a,children:o})})})};Xr.displayName=ze;var gu="MenuAnchor",Sn=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return p.jsx(jr,{...r,...o,ref:t})});Sn.displayName=gu;var Pn="MenuPortal",[wu,qr]=be(Pn,{forceMount:void 0}),Zr=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=Ce(Pn,t);return p.jsx(wu,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||s.open,children:p.jsx(Ke,{asChild:!0,container:r,children:o})})})};Zr.displayName=Pn;var q="MenuContent",[xu,_n]=be(q),Qr=i.forwardRef((e,t)=>{const n=qr(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ce(q,e.__scopeMenu),a=Ye(q,e.__scopeMenu);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||s.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(yu,{...r,ref:t}):p.jsx(bu,{...r,ref:t})})})})}),yu=i.forwardRef((e,t)=>{const n=Ce(q,e.__scopeMenu),o=i.useRef(null),r=W(t,o);return i.useEffect(()=>{const s=o.current;if(s)return Qo(s)},[]),p.jsx(Mn,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),bu=i.forwardRef((e,t)=>{const n=Ce(q,e.__scopeMenu);return p.jsx(Mn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Cu=je("MenuContent.ScrollLock"),Mn=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:v,disableOutsideScroll:w,...m}=e,g=Ce(q,n),x=Ye(q,n),y=Pt(n),b=Yr(n),C=pu(n),[E,T]=i.useState(null),R=i.useRef(null),M=W(t,R,g.onContentChange),N=i.useRef(0),D=i.useRef(""),L=i.useRef(0),B=i.useRef(null),j=i.useRef("right"),P=i.useRef(0),F=w?pn:i.Fragment,O=w?{as:Cu,allowPinchZoom:!0}:void 0,$=S=>{const H=D.current+S,X=C().filter(V=>!V.disabled),Q=document.activeElement,ne=X.find(V=>V.ref.current===Q)?.textValue,fe=X.map(V=>V.textValue),Ze=Iu(fe,H,ne),ge=X.find(V=>V.textValue===Ze)?.ref.current;(function V(Ie){D.current=Ie,window.clearTimeout(N.current),Ie!==""&&(N.current=window.setTimeout(()=>V(""),1e3))})(H),ge&&setTimeout(()=>ge.focus())};i.useEffect(()=>()=>window.clearTimeout(N.current),[]),Vo();const A=i.useCallback(S=>j.current===B.current?.side&&Lu(S,B.current?.area),[]);return p.jsx(xu,{scope:n,searchRef:D,onItemEnter:i.useCallback(S=>{A(S)&&S.preventDefault()},[A]),onItemLeave:i.useCallback(S=>{A(S)||(R.current?.focus(),T(null))},[A]),onTriggerLeave:i.useCallback(S=>{A(S)&&S.preventDefault()},[A]),pointerGraceTimerRef:L,onPointerGraceIntentChange:i.useCallback(S=>{B.current=S},[]),children:p.jsx(F,{...O,children:p.jsx(fn,{asChild:!0,trapped:r,onMountAutoFocus:_(s,S=>{S.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p.jsx(Ve,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:v,children:p.jsx(au,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:T,onEntryFocus:_(d,S=>{x.isUsingKeyboardRef.current||S.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Fr,{role:"menu","aria-orientation":"vertical","data-state":ms(g.open),"data-radix-menu-content":"",dir:x.dir,...y,...m,ref:M,style:{outline:"none",...m.style},onKeyDown:_(m.onKeyDown,S=>{const X=S.target.closest("[data-radix-menu-content]")===S.currentTarget,Q=S.ctrlKey||S.altKey||S.metaKey,ne=S.key.length===1;X&&(S.key==="Tab"&&S.preventDefault(),!Q&&ne&&$(S.key));const fe=R.current;if(S.target!==fe||!uu.includes(S.key))return;S.preventDefault();const ge=C().filter(V=>!V.disabled).map(V=>V.ref.current);Gr.includes(S.key)&&ge.reverse(),Du(ge)}),onBlur:_(e.onBlur,S=>{S.currentTarget.contains(S.target)||(window.clearTimeout(N.current),D.current="")}),onPointerMove:_(e.onPointerMove,We(S=>{const H=S.target,X=P.current!==S.clientX;if(S.currentTarget.contains(H)&&X){const Q=S.clientX>P.current?"right":"left";j.current=Q,P.current=S.clientX}}))})})})})})})});Qr.displayName=q;var Eu="MenuGroup",An=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"group",...o,ref:t})});An.displayName=Eu;var Ru="MenuLabel",Jr=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Jr.displayName=Ru;var ht="MenuItem",uo="menu.itemSelect",_t=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),a=Ye(ht,e.__scopeMenu),c=_n(ht,e.__scopeMenu),d=W(t,s),l=i.useRef(!1),u=()=>{const f=s.current;if(!n&&f){const h=new CustomEvent(uo,{bubbles:!0,cancelable:!0});f.addEventListener(uo,v=>o?.(v),{once:!0}),un(f,h),h.defaultPrevented?l.current=!1:a.onClose()}};return p.jsx(es,{...r,ref:d,disabled:n,onClick:_(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:_(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:_(e.onKeyDown,f=>{const h=c.searchRef.current!=="";n||h&&f.key===" "||Qt.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});_t.displayName=ht;var es=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=_n(ht,n),c=Yr(n),d=i.useRef(null),l=W(t,d),[u,f]=i.useState(!1),[h,v]=i.useState("");return i.useEffect(()=>{const w=d.current;w&&v((w.textContent??"").trim())},[s.children]),p.jsx(Be.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:p.jsx(cu,{asChild:!0,...c,focusable:!o,children:p.jsx(I.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:l,onPointerMove:_(e.onPointerMove,We(w=>{o?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_(e.onPointerLeave,We(w=>a.onItemLeave(w))),onFocus:_(e.onFocus,()=>f(!0)),onBlur:_(e.onBlur,()=>f(!1))})})})}),Tu="MenuCheckboxItem",ts=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return p.jsx(is,{scope:e.__scopeMenu,checked:n,children:p.jsx(_t,{role:"menuitemcheckbox","aria-checked":vt(n)?"mixed":n,...r,ref:t,"data-state":Dn(n),onSelect:_(r.onSelect,()=>o?.(vt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ts.displayName=Tu;var ns="MenuRadioGroup",[Su,Pu]=be(ns,{value:void 0,onValueChange:()=>{}}),os=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=Y(o);return p.jsx(Su,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(An,{...r,ref:t})})});os.displayName=ns;var rs="MenuRadioItem",ss=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=Pu(rs,e.__scopeMenu),s=n===r.value;return p.jsx(is,{scope:e.__scopeMenu,checked:s,children:p.jsx(_t,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":Dn(s),onSelect:_(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ss.displayName=rs;var On="MenuItemIndicator",[is,_u]=be(On,{checked:!1}),as=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=_u(On,n);return p.jsx(Z,{present:o||vt(s.checked)||s.checked===!0,children:p.jsx(I.span,{...r,ref:t,"data-state":Dn(s.checked)})})});as.displayName=On;var Mu="MenuSeparator",cs=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});cs.displayName=Mu;var Au="MenuArrow",ls=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return p.jsx($r,{...r,...o,ref:t})});ls.displayName=Au;var Ou="MenuSub",[Ff,us]=be(Ou),Le="MenuSubTrigger",ds=i.forwardRef((e,t)=>{const n=Ce(Le,e.__scopeMenu),o=Ye(Le,e.__scopeMenu),r=us(Le,e.__scopeMenu),s=_n(Le,e.__scopeMenu),a=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,l={__scopeMenu:e.__scopeMenu},u=i.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return i.useEffect(()=>u,[u]),i.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),d(null)}},[c,d]),p.jsx(Sn,{asChild:!0,...l,children:p.jsx(es,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ms(n.open),...e,ref:wt(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_(e.onPointerMove,We(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:_(e.onPointerLeave,We(f=>{u();const h=n.content?.getBoundingClientRect();if(h){const v=n.content?.dataset.side,w=v==="right",m=w?-5:5,g=h[w?"left":"right"],x=h[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x:g,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:g,y:h.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:_(e.onKeyDown,f=>{const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||du[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ds.displayName=Le;var fs="MenuSubContent",ps=i.forwardRef((e,t)=>{const n=qr(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ce(q,e.__scopeMenu),a=Ye(q,e.__scopeMenu),c=us(fs,e.__scopeMenu),d=i.useRef(null),l=W(t,d);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||s.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:p.jsx(Mn,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{a.isUsingKeyboardRef.current&&d.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:_(e.onFocusOutside,u=>{u.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:_(e.onEscapeKeyDown,u=>{a.onClose(),u.preventDefault()}),onKeyDown:_(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),h=fu[a.dir].includes(u.key);f&&h&&(s.onOpenChange(!1),c.trigger?.focus(),u.preventDefault())})})})})})});ps.displayName=fs;function ms(e){return e?"open":"closed"}function vt(e){return e==="indeterminate"}function Dn(e){return vt(e)?"indeterminate":e?"checked":"unchecked"}function Du(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Nu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Iu(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Nu(e,Math.max(s,0));r.length===1&&(a=a.filter(l=>l!==n));const d=a.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return d!==n?d:void 0}function ku(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],d=t[a],l=c.x,u=c.y,f=d.x,h=d.y;u>o!=h>o&&n<(f-l)*(o-u)/(h-u)+l&&(r=!r)}return r}function Lu(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ku(n,t)}function We(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ju=Xr,Fu=Sn,$u=Zr,Bu=Qr,Wu=An,Hu=Jr,Vu=_t,Ku=ts,Uu=os,Gu=ss,zu=as,Yu=cs,Xu=ls,qu=ds,Zu=ps,Mt="DropdownMenu",[Qu]=de(Mt,[zr]),U=zr(),[Ju,hs]=Qu(Mt),vs=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,d=U(t),l=i.useRef(null),[u,f]=Oe({prop:r,defaultProp:s??!1,onChange:a,caller:Mt});return p.jsx(Ju,{scope:t,triggerId:we(),triggerRef:l,contentId:we(),open:u,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:c,children:p.jsx(ju,{...d,open:u,onOpenChange:f,dir:o,modal:c,children:n})})};vs.displayName=Mt;var gs="DropdownMenuTrigger",ws=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=hs(gs,n),a=U(n);return p.jsx(Fu,{asChild:!0,...a,children:p.jsx(I.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:wt(t,s.triggerRef),onPointerDown:_(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:_(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});ws.displayName=gs;var ed="DropdownMenuPortal",xs=e=>{const{__scopeDropdownMenu:t,...n}=e,o=U(t);return p.jsx($u,{...o,...n})};xs.displayName=ed;var ys="DropdownMenuContent",bs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=hs(ys,n),s=U(n),a=i.useRef(!1);return p.jsx(Bu,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:_(e.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:_(e.onInteractOutside,c=>{const d=c.detail.originalEvent,l=d.button===0&&d.ctrlKey===!0,u=d.button===2||l;(!r.modal||u)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});bs.displayName=ys;var td="DropdownMenuGroup",nd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Wu,{...r,...o,ref:t})});nd.displayName=td;var od="DropdownMenuLabel",rd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Hu,{...r,...o,ref:t})});rd.displayName=od;var sd="DropdownMenuItem",Cs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Vu,{...r,...o,ref:t})});Cs.displayName=sd;var id="DropdownMenuCheckboxItem",ad=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Ku,{...r,...o,ref:t})});ad.displayName=id;var cd="DropdownMenuRadioGroup",ld=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Uu,{...r,...o,ref:t})});ld.displayName=cd;var ud="DropdownMenuRadioItem",dd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Gu,{...r,...o,ref:t})});dd.displayName=ud;var fd="DropdownMenuItemIndicator",pd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(zu,{...r,...o,ref:t})});pd.displayName=fd;var md="DropdownMenuSeparator",hd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Yu,{...r,...o,ref:t})});hd.displayName=md;var vd="DropdownMenuArrow",Es=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Xu,{...r,...o,ref:t})});Es.displayName=vd;var gd="DropdownMenuSubTrigger",wd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(qu,{...r,...o,ref:t})});wd.displayName=gd;var xd="DropdownMenuSubContent",yd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Zu,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});yd.displayName=xd;var bd=vs,Cd=ws,Ed=xs,Rd=bs,Td=Cs,Sd=Es;const Pd="_menuButtonContent_1e6yl_1",_d="_menuButtonItem_1e6yl_10",Md="_menuButtonArrow_1e6yl_42",Jt={menuButtonContent:Pd,menuButtonItem:_d,menuButtonArrow:Md},Ad=({children:e,trigger:t,...n})=>p.jsxs(bd,{modal:!1,...n,children:[p.jsx(Cd,{asChild:!0,children:t}),p.jsx(Ed,{children:p.jsxs(Rd,{align:"end",className:Jt.menuButtonContent,sideOffset:5,children:[e,p.jsx(Sd,{className:Jt.menuButtonArrow})]})})]}),Od=({children:e,...t})=>p.jsx(Td,{className:Jt.menuButtonItem,...t,children:e});var Dd=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"}),Nd="VisuallyHidden",At=i.forwardRef((e,t)=>p.jsx(I.span,{...e,ref:t,style:{...Dd,...e.style}}));At.displayName=Nd;var Id=At,Nn="ToastProvider",[In,kd,Ld]=gn("Toast"),[Rs]=de("Toast",[Ld]),[jd,Ot]=Rs(Nn),Ts=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:a}=e,[c,d]=i.useState(null),[l,u]=i.useState(0),f=i.useRef(!1),h=i.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Nn}\`. Expected non-empty \`string\`.`),p.jsx(In.Provider,{scope:t,children:p.jsx(jd,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:l,viewport:c,onViewportChange:d,onToastAdd:i.useCallback(()=>u(v=>v+1),[]),onToastRemove:i.useCallback(()=>u(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:a})})};Ts.displayName=Nn;var Ss="ToastViewport",Fd=["F8"],en="toast.viewportPause",tn="toast.viewportResume",Ps=i.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=Fd,label:r="Notifications ({hotkey})",...s}=e,a=Ot(Ss,n),c=kd(n),d=i.useRef(null),l=i.useRef(null),u=i.useRef(null),f=i.useRef(null),h=W(t,f,a.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=a.toastCount>0;i.useEffect(()=>{const g=x=>{o.length!==0&&o.every(b=>x[b]||x.code===b)&&f.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[o]),i.useEffect(()=>{const g=d.current,x=f.current;if(w&&g&&x){const y=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(en);x.dispatchEvent(T),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(tn);x.dispatchEvent(T),a.isClosePausedRef.current=!1}},C=T=>{!g.contains(T.relatedTarget)&&b()},E=()=>{g.contains(document.activeElement)||b()};return g.addEventListener("focusin",y),g.addEventListener("focusout",C),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",E),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",C),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",E),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[w,a.isClosePausedRef]);const m=i.useCallback(({tabbingDirection:g})=>{const y=c().map(b=>{const C=b.ref.current,E=[C,...Zd(C)];return g==="forwards"?E:E.reverse()});return(g==="forwards"?y.reverse():y).flat()},[c]);return i.useEffect(()=>{const g=f.current;if(g){const x=y=>{const b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){const E=document.activeElement,T=y.shiftKey;if(y.target===g&&T){l.current?.focus();return}const N=m({tabbingDirection:T?"backwards":"forwards"}),D=N.findIndex(L=>L===E);Kt(N.slice(D+1))?y.preventDefault():T?l.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",x),()=>g.removeEventListener("keydown",x)}},[c,m]),p.jsxs(va,{ref:d,role:"region","aria-label":r.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&p.jsx(nn,{ref:l,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});Kt(g)}}),p.jsx(In.Slot,{scope:n,children:p.jsx(I.ol,{tabIndex:-1,...s,ref:h})}),w&&p.jsx(nn,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Kt(g)}})]})});Ps.displayName=Ss;var _s="ToastFocusProxy",nn=i.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=Ot(_s,n);return p.jsx(At,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:a=>{const c=a.relatedTarget;!s.viewport?.contains(c)&&o()}})});nn.displayName=_s;var Xe="Toast",$d="toast.swipeStart",Bd="toast.swipeMove",Wd="toast.swipeCancel",Hd="toast.swipeEnd",Ms=i.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...a}=e,[c,d]=Oe({prop:o,defaultProp:r??!0,onChange:s,caller:Xe});return p.jsx(Z,{present:n||c,children:p.jsx(Ud,{open:c,...a,ref:t,onClose:()=>d(!1),onPause:Y(e.onPause),onResume:Y(e.onResume),onSwipeStart:_(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:_(e.onSwipeMove,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:_(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:_(e.onSwipeEnd,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),d(!1)})})})});Ms.displayName=Xe;var[Vd,Kd]=Rs(Xe,{onClose(){}}),Ud=i.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:a,onEscapeKeyDown:c,onPause:d,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:v,...w}=e,m=Ot(Xe,n),[g,x]=i.useState(null),y=W(t,P=>x(P)),b=i.useRef(null),C=i.useRef(null),E=r||m.duration,T=i.useRef(0),R=i.useRef(E),M=i.useRef(0),{onToastAdd:N,onToastRemove:D}=m,L=Y(()=>{g?.contains(document.activeElement)&&m.viewport?.focus(),a()}),B=i.useCallback(P=>{!P||P===1/0||(window.clearTimeout(M.current),T.current=new Date().getTime(),M.current=window.setTimeout(L,P))},[L]);i.useEffect(()=>{const P=m.viewport;if(P){const F=()=>{B(R.current),l?.()},O=()=>{const $=new Date().getTime()-T.current;R.current=R.current-$,window.clearTimeout(M.current),d?.()};return P.addEventListener(en,O),P.addEventListener(tn,F),()=>{P.removeEventListener(en,O),P.removeEventListener(tn,F)}}},[m.viewport,E,d,l,B]),i.useEffect(()=>{s&&!m.isClosePausedRef.current&&B(E)},[s,E,m.isClosePausedRef,B]),i.useEffect(()=>(N(),()=>D()),[N,D]);const j=i.useMemo(()=>g?Ls(g):null,[g]);return m.viewport?p.jsxs(p.Fragment,{children:[j&&p.jsx(Gd,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:j}),p.jsx(Vd,{scope:n,onClose:L,children:sn.createPortal(p.jsx(In.ItemSlot,{scope:n,children:p.jsx(ha,{asChild:!0,onEscapeKeyDown:_(c,()=>{m.isFocusedToastEscapeKeyDownRef.current||L(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(I.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:_(e.onKeyDown,P=>{P.key==="Escape"&&(c?.(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:_(e.onPointerDown,P=>{P.button===0&&(b.current={x:P.clientX,y:P.clientY})}),onPointerMove:_(e.onPointerMove,P=>{if(!b.current)return;const F=P.clientX-b.current.x,O=P.clientY-b.current.y,$=!!C.current,A=["left","right"].includes(m.swipeDirection),S=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,H=A?S(0,F):0,X=A?0:S(0,O),Q=P.pointerType==="touch"?10:2,ne={x:H,y:X},fe={originalEvent:P,delta:ne};$?(C.current=ne,it(Bd,f,fe,{discrete:!1})):fo(ne,m.swipeDirection,Q)?(C.current=ne,it($d,u,fe,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(F)>Q||Math.abs(O)>Q)&&(b.current=null)}),onPointerUp:_(e.onPointerUp,P=>{const F=C.current,O=P.target;if(O.hasPointerCapture(P.pointerId)&&O.releasePointerCapture(P.pointerId),C.current=null,b.current=null,F){const $=P.currentTarget,A={originalEvent:P,delta:F};fo(F,m.swipeDirection,m.swipeThreshold)?it(Hd,v,A,{discrete:!0}):it(Wd,h,A,{discrete:!0}),$.addEventListener("click",S=>S.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Gd=e=>{const{__scopeToast:t,children:n,...o}=e,r=Ot(Xe,t),[s,a]=i.useState(!1),[c,d]=i.useState(!1);return Xd(()=>a(!0)),i.useEffect(()=>{const l=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(l)},[]),c?null:p.jsx(Ke,{asChild:!0,children:p.jsx(At,{...o,children:s&&p.jsxs(p.Fragment,{children:[r.label," ",n]})})})},zd="ToastTitle",As=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});As.displayName=zd;var Yd="ToastDescription",Os=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Os.displayName=Yd;var Ds="ToastAction",Ns=i.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?p.jsx(ks,{altText:n,asChild:!0,children:p.jsx(kn,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ds}\`. Expected non-empty \`string\`.`),null)});Ns.displayName=Ds;var Is="ToastClose",kn=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=Kd(Is,n);return p.jsx(ks,{asChild:!0,children:p.jsx(I.button,{type:"button",...o,ref:t,onClick:_(e.onClick,r.onClose)})})});kn.displayName=Is;var ks=i.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return p.jsx(I.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function Ls(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),qd(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const a=o.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Ls(o))}}),t}function it(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,s):r.dispatchEvent(s)}var fo=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),s=o>r;return t==="left"||t==="right"?s&&o>n:!s&&r>n};function Xd(e=()=>{}){const t=Y(e);ce(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function qd(e){return e.nodeType===e.ELEMENT_NODE}function Zd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kt(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Qd=Ts,Jd=Ps,ef=Ms,tf=As,nf=Os,of=Ns,rf=kn;const sf="_toast_1ga0s_1",af="_toastContent_1ga0s_12",cf="_toastViewport_1ga0s_70",lf="_toastTitle_1ga0s_89",uf="_toastDescription_1ga0s_95",Se={toast:sf,toastContent:af,toastViewport:cf,toastTitle:lf,toastDescription:uf},df=({...e})=>p.jsx(Qd,{...e}),js=k.forwardRef(({...e},t)=>p.jsx(Jd,{className:Se.toastViewport,ref:t,...e}));js.displayName="ToastViewport";const Fs=k.forwardRef(({toastTitle:e,toastDescription:t,toastAction:n,...o},r)=>p.jsxs(ef,{className:Se.toast,ref:r,...o,children:[p.jsxs("div",{className:Se.toastContent,children:[p.jsx(tf,{className:Se.toastTitle,children:e}),t&&p.jsx(nf,{className:Se.toastDescription,children:t})]}),n&&p.jsx(of,{className:Se.toastAction,asChild:!0,altText:"Toast action",children:n}),p.jsx(rf,{asChild:!0,children:p.jsx(gt,{variant:"tertiary",iconOnly:!0,icon:"Close"})})]}));Fs.displayName="Toast";var[Dt]=de("Tooltip",[St]),Nt=St(),$s="TooltipProvider",ff=700,on="tooltip.open",[pf,Ln]=Dt($s),Bs=e=>{const{__scopeTooltip:t,delayDuration:n=ff,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,a=i.useRef(!0),c=i.useRef(!1),d=i.useRef(0);return i.useEffect(()=>{const l=d.current;return()=>window.clearTimeout(l)},[]),p.jsx(pf,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(d.current),a.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>a.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(l=>{c.current=l},[]),disableHoverableContent:r,children:s})};Bs.displayName=$s;var He="Tooltip",[mf,qe]=Dt(He),Ws=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:a,delayDuration:c}=e,d=Ln(He,e.__scopeTooltip),l=Nt(t),[u,f]=i.useState(null),h=we(),v=i.useRef(0),w=a??d.disableHoverableContent,m=c??d.delayDuration,g=i.useRef(!1),[x,y]=Oe({prop:o,defaultProp:r??!1,onChange:R=>{R?(d.onOpen(),document.dispatchEvent(new CustomEvent(on))):d.onClose(),s?.(R)},caller:He}),b=i.useMemo(()=>x?g.current?"delayed-open":"instant-open":"closed",[x]),C=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,y(!0)},[y]),E=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),T=i.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,y(!0),v.current=0},m)},[m,y]);return i.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),p.jsx(Lr,{...l,children:p.jsx(mf,{scope:t,contentId:h,open:x,stateAttribute:b,trigger:u,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{d.isOpenDelayedRef.current?T():C()},[d.isOpenDelayedRef,T,C]),onTriggerLeave:i.useCallback(()=>{w?E():(window.clearTimeout(v.current),v.current=0)},[E,w]),onOpen:C,onClose:E,disableHoverableContent:w,children:n})})};Ws.displayName=He;var rn="TooltipTrigger",Hs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=qe(rn,n),s=Ln(rn,n),a=Nt(n),c=i.useRef(null),d=W(t,c,r.onTriggerChange),l=i.useRef(!1),u=i.useRef(!1),f=i.useCallback(()=>l.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(jr,{asChild:!0,...a,children:p.jsx(I.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:d,onPointerMove:_(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:_(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:_(e.onPointerDown,()=>{r.open&&r.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:_(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:_(e.onBlur,r.onClose),onClick:_(e.onClick,r.onClose)})})});Hs.displayName=rn;var jn="TooltipPortal",[hf,vf]=Dt(jn,{forceMount:void 0}),Vs=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=qe(jn,t);return p.jsx(hf,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||s.open,children:p.jsx(Ke,{asChild:!0,container:r,children:o})})})};Vs.displayName=jn;var Ae="TooltipContent",Ks=i.forwardRef((e,t)=>{const n=vf(Ae,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,a=qe(Ae,e.__scopeTooltip);return p.jsx(Z,{present:o||a.open,children:a.disableHoverableContent?p.jsx(Us,{side:r,...s,ref:t}):p.jsx(gf,{side:r,...s,ref:t})})}),gf=i.forwardRef((e,t)=>{const n=qe(Ae,e.__scopeTooltip),o=Ln(Ae,e.__scopeTooltip),r=i.useRef(null),s=W(t,r),[a,c]=i.useState(null),{trigger:d,onClose:l}=n,u=r.current,{onPointerInTransitChange:f}=o,h=i.useCallback(()=>{c(null),f(!1)},[f]),v=i.useCallback((w,m)=>{const g=w.currentTarget,x={x:w.clientX,y:w.clientY},y=bf(x,g.getBoundingClientRect()),b=Cf(x,y),C=Ef(m.getBoundingClientRect()),E=Tf([...b,...C]);c(E),f(!0)},[f]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(d&&u){const w=g=>v(g,u),m=g=>v(g,d);return d.addEventListener("pointerleave",w),u.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",m)}}},[d,u,v,h]),i.useEffect(()=>{if(a){const w=m=>{const g=m.target,x={x:m.clientX,y:m.clientY},y=d?.contains(g)||u?.contains(g),b=!Rf(x,a);y?h():b&&(h(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,u,a,l,h]),p.jsx(Us,{...e,ref:s})}),[wf,xf]=Dt(He,{isInside:!1}),yf=Ui("TooltipContent"),Us=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:a,...c}=e,d=qe(Ae,n),l=Nt(n),{onClose:u}=d;return i.useEffect(()=>(document.addEventListener(on,u),()=>document.removeEventListener(on,u)),[u]),i.useEffect(()=>{if(d.trigger){const f=h=>{h.target?.contains(d.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[d.trigger,u]),p.jsx(Ve,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:p.jsxs(Fr,{"data-state":d.stateAttribute,...l,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(yf,{children:o}),p.jsx(wf,{scope:n,isInside:!0,children:p.jsx(Id,{id:d.contentId,role:"tooltip",children:r||o})})]})})});Ks.displayName=Ae;var Gs="TooltipArrow",zs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Nt(n);return xf(Gs,n).isInside?null:p.jsx($r,{...r,...o,ref:t})});zs.displayName=Gs;function bf(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Cf(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Ef(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Rf(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],d=t[a],l=c.x,u=c.y,f=d.x,h=d.y;u>o!=h>o&&n<(f-l)*(o-u)/(h-u)+l&&(r=!r)}return r}function Tf(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),Sf(t)}function Sf(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Pf=Bs,_f=Ws,Mf=Hs,Af=Vs,Of=Ks,Df=zs;const Nf="_tooltipContent_17t5h_1",If="_tooltipArrow_17t5h_12",po={tooltipContent:Nf,tooltipArrow:If},kf=({...e})=>p.jsx(Pf,{...e});function Lf({children:e,content:t,open:n,defaultOpen:o,onOpenChange:r,...s}){return t===void 0?p.jsx(p.Fragment,{children:e}):p.jsxs(_f,{open:n,defaultOpen:o,onOpenChange:a=>{r?.(a)},disableHoverableContent:!0,delayDuration:200,children:[p.jsx(Mf,{asChild:!0,children:e}),p.jsx(Af,{children:p.jsxs(Of,{className:po.tooltipContent,...s,sideOffset:4,children:[t,p.jsx(Df,{className:po.tooltipArrow})]})})]})}exports.ArrowLeft=vo;exports.ArrowRight=go;exports.Button=gt;exports.Check=an;exports.Checkbox=sa;exports.Circle=wo;exports.Close=cn;exports.Dialog=Oc;exports.ExternalLink=xo;exports.Gear=yo;exports.Hammer=bo;exports.Heart=Co;exports.IconMap=Ut;exports.Kebab=Eo;exports.Lightning=Ro;exports.Mail=To;exports.Menu=So;exports.MenuButton=Ad;exports.MenuButtonItem=Od;exports.NoMobile=Po;exports.Pencil=_o;exports.Spinner=ln;exports.Toast=Fs;exports.ToastProvider=df;exports.ToastViewport=js;exports.Tooltip=Lf;exports.TooltipProvider=kf;exports.createIcon=K;exports.iconSizes=Di;
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ol="DialogDescriptionWarning",rl=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Cr(ol).contentName}}.`;return s.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},sl=lr,il=dr,al=pr,cl=mr,ll=hr,ul=gr,dl=yr;const fl="_dialogOverlay_1qzfk_1",pl="_dialogContent_1qzfk_20",ml="_dialogCloseButton_1qzfk_65",hl="_dialogTitle_1qzfk_72",rt={dialogOverlay:fl,dialogContent:pl,dialogCloseButton:ml,dialogTitle:hl},vl=["sm","md","lg"],gl=({trigger:e,children:t,title:n,size:o="md",...r})=>p.jsxs(sl,{...r,children:[p.jsx(il,{asChild:!0,children:e}),p.jsxs(al,{children:[p.jsx(cl,{className:`${rt.dialogOverlay}`}),p.jsxs(ll,{className:rt.dialogContent,"data-size":o,onPointerDownOutside:i=>{i?.preventDefault()},children:[p.jsx(dl,{asChild:!0,children:p.jsx(wt,{className:`${rt.dialogCloseButton}`,variant:"tertiary",iconOnly:!0,children:p.jsx(cn,{})})}),p.jsx(ul,{className:rt.dialogTitle,children:n}),t]})]})]});function gn(e){const t=e+"CollectionProvider",[n,o]=de(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:g,children:x}=m,y=k.useRef(null),b=k.useRef(new Map).current;return p.jsx(r,{scope:g,itemMap:b,collectionRef:y,children:x})};a.displayName=t;const c=e+"CollectionSlot",d=je(c),l=k.forwardRef((m,g)=>{const{scope:x,children:y}=m,b=i(c,x),C=H(g,b.collectionRef);return p.jsx(d,{ref:C,children:y})});l.displayName=c;const u=e+"CollectionItemSlot",f="data-radix-collection-item",h=je(u),v=k.forwardRef((m,g)=>{const{scope:x,children:y,...b}=m,C=k.useRef(null),E=H(g,C),S=i(u,x);return k.useEffect(()=>(S.itemMap.set(C,{ref:C,...b}),()=>void S.itemMap.delete(C))),p.jsx(h,{[f]:"",ref:E,children:y})});v.displayName=u;function w(m){const g=i(e+"CollectionConsumer",m);return k.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((S,R)=>b.indexOf(S.ref.current)-b.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},w,o]}var wl=s.createContext(void 0);function Er(e){const t=s.useContext(wl);return e||t||"ltr"}const xl=["top","right","bottom","left"],he=Math.min,G=Math.max,ft=Math.round,st=Math.floor,se=e=>({x:e,y:e}),yl={left:"right",right:"left",bottom:"top",top:"bottom"},bl={start:"end",end:"start"};function Yt(e,t,n){return G(e,he(t,n))}function le(e,t){return typeof e=="function"?e(t):e}function ue(e){return e.split("-")[0]}function Oe(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function xn(e){return e==="y"?"height":"width"}const Cl=new Set(["top","bottom"]);function re(e){return Cl.has(ue(e))?"y":"x"}function yn(e){return wn(re(e))}function El(e,t,n){n===void 0&&(n=!1);const o=Oe(e),r=yn(e),i=xn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=pt(a)),[a,pt(a)]}function Rl(e){const t=pt(e);return[Xt(e),t,Xt(t)]}function Xt(e){return e.replace(/start|end/g,t=>bl[t])}const Jn=["left","right"],eo=["right","left"],Sl=["top","bottom"],Tl=["bottom","top"];function Pl(e,t,n){switch(e){case"top":case"bottom":return n?t?eo:Jn:t?Jn:eo;case"left":case"right":return t?Sl:Tl;default:return[]}}function Ml(e,t,n,o){const r=Oe(e);let i=Pl(ue(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(Xt)))),i}function pt(e){return e.replace(/left|right|bottom|top/g,t=>yl[t])}function _l(e){return{top:0,right:0,bottom:0,left:0,...e}}function Rr(e){return typeof e!="number"?_l(e):{top:e,right:e,bottom:e,left:e}}function mt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function to(e,t,n){let{reference:o,floating:r}=e;const i=re(t),a=yn(t),c=xn(a),d=ue(t),l=i==="y",u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let v;switch(d){case"top":v={x:u,y:o.y-r.height};break;case"bottom":v={x:u,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:f};break;case"left":v={x:o.x-r.width,y:f};break;default:v={x:o.x,y:o.y}}switch(Oe(t)){case"start":v[a]-=h*(n&&l?-1:1);break;case"end":v[a]+=h*(n&&l?-1:1);break}return v}const Al=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:f}=to(l,o,d),h=o,v={},w=0;for(let m=0;m<c.length;m++){const{name:g,fn:x}=c[m],{x:y,y:b,data:C,reset:E}=await x({x:u,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});u=y??u,f=b??f,v={...v,[g]:{...v[g],...C}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(l=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:u,y:f}=to(l,h,d)),m=-1)}return{x:u,y:f,placement:h,strategy:r,middlewareData:v}};async function Fe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:c,strategy:d}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:v=0}=le(t,e),w=Rr(v),g=c[h?f==="floating"?"reference":"floating":f],x=mt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:u,strategy:d})),y=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),C=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=mt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:b,strategy:d}):y);return{top:(x.top-E.top+w.top)/C.y,bottom:(E.bottom-x.bottom+w.bottom)/C.y,left:(x.left-E.left+w.left)/C.x,right:(E.right-x.right+w.right)/C.x}}const kl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:c,middlewareData:d}=t,{element:l,padding:u=0}=le(e,t)||{};if(l==null)return{};const f=Rr(u),h={x:n,y:o},v=yn(r),w=xn(v),m=await a.getDimensions(l),g=v==="y",x=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",C=i.reference[w]+i.reference[v]-h[v]-i.floating[w],E=h[v]-i.reference[v],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let R=S?S[b]:0;(!R||!await(a.isElement==null?void 0:a.isElement(S)))&&(R=c.floating[b]||i.floating[w]);const _=C/2-E/2,N=R/2-m[w]/2-1,D=he(f[x],N),L=he(f[y],N),W=D,F=R-m[w]-L,P=R/2-m[w]/2+_,$=Yt(W,P,F),O=!d.arrow&&Oe(r)!=null&&P!==$&&i.reference[w]/2-(P<W?D:L)-m[w]/2<0,B=O?P<W?P-W:P-F:0;return{[v]:h[v]+B,data:{[v]:$,centerOffset:P-$-B,...O&&{alignmentOffset:B}},reset:O}}}),Ol=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:c,platform:d,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...g}=le(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=ue(r),y=re(c),b=ue(c)===c,C=await(d.isRTL==null?void 0:d.isRTL(l.floating)),E=h||(b||!m?[pt(c)]:Rl(c)),S=w!=="none";!h&&S&&E.push(...Ml(c,m,w,C));const R=[c,...E],_=await Fe(t,g),N=[];let D=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&N.push(_[x]),f){const P=El(r,a,C);N.push(_[P[0]],_[P[1]])}if(D=[...D,{placement:r,overflows:N}],!N.every(P=>P<=0)){var L,W;const P=(((L=i.flip)==null?void 0:L.index)||0)+1,$=R[P];if($&&(!(f==="alignment"?y!==re($):!1)||D.every(A=>re(A.placement)===y?A.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:$}};let O=(W=D.filter(B=>B.overflows[0]<=0).sort((B,A)=>B.overflows[1]-A.overflows[1])[0])==null?void 0:W.placement;if(!O)switch(v){case"bestFit":{var F;const B=(F=D.filter(A=>{if(S){const T=re(A.placement);return T===y||T==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(T=>T>0).reduce((T,V)=>T+V,0)]).sort((A,T)=>A[1]-T[1])[0])==null?void 0:F[0];B&&(O=B);break}case"initialPlacement":O=c;break}if(r!==O)return{reset:{placement:O}}}return{}}}};function no(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oo(e){return xl.some(t=>e[t]>=0)}const Dl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=le(e,t);switch(o){case"referenceHidden":{const i=await Fe(t,{...r,elementContext:"reference"}),a=no(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:oo(a)}}}case"escaped":{const i=await Fe(t,{...r,altBoundary:!0}),a=no(i,n.floating);return{data:{escapedOffsets:a,escaped:oo(a)}}}default:return{}}}}},Sr=new Set(["left","top"]);async function Nl(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=ue(n),c=Oe(n),d=re(n)==="y",l=Sr.has(a)?-1:1,u=i&&d?-1:1,f=le(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof w=="number"&&(v=c==="end"?w*-1:w),d?{x:v*u,y:h*l}:{x:h*l,y:v*u}}const Il=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:c}=t,d=await Nl(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+d.x,y:i+d.y,data:{...d,placement:a}}}}},Ll=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:g=>{let{x,y}=g;return{x,y}}},...d}=le(e,t),l={x:n,y:o},u=await Fe(t,d),f=re(ue(r)),h=wn(f);let v=l[h],w=l[f];if(i){const g=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=v+u[g],b=v-u[x];v=Yt(y,v,b)}if(a){const g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=w+u[g],b=w-u[x];w=Yt(y,w,b)}const m=c.fn({...t,[h]:v,[f]:w});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:i,[f]:a}}}}}},jl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:d=!0,crossAxis:l=!0}=le(e,t),u={x:n,y:o},f=re(r),h=wn(f);let v=u[h],w=u[f];const m=le(c,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(d){const b=h==="y"?"height":"width",C=i.reference[h]-i.floating[b]+g.mainAxis,E=i.reference[h]+i.reference[b]-g.mainAxis;v<C?v=C:v>E&&(v=E)}if(l){var x,y;const b=h==="y"?"width":"height",C=Sr.has(ue(r)),E=i.reference[f]-i.floating[b]+(C&&((x=a.offset)==null?void 0:x[f])||0)+(C?0:g.crossAxis),S=i.reference[f]+i.reference[b]+(C?0:((y=a.offset)==null?void 0:y[f])||0)-(C?g.crossAxis:0);w<E?w=E:w>S&&(w=S)}return{[h]:v,[f]:w}}}},Fl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:a,elements:c}=t,{apply:d=()=>{},...l}=le(e,t),u=await Fe(t,l),f=ue(r),h=Oe(r),v=re(r)==="y",{width:w,height:m}=i.floating;let g,x;f==="top"||f==="bottom"?(g=f,x=h===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,g=h==="end"?"top":"bottom");const y=m-u.top-u.bottom,b=w-u.left-u.right,C=he(m-u[g],y),E=he(w-u[x],b),S=!t.middlewareData.shift;let R=C,_=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(R=y),S&&!h){const D=G(u.left,0),L=G(u.right,0),W=G(u.top,0),F=G(u.bottom,0);v?_=w-2*(D!==0||L!==0?D+L:G(u.left,u.right)):R=m-2*(W!==0||F!==0?W+F:G(u.top,u.bottom))}await d({...t,availableWidth:_,availableHeight:R});const N=await a.getDimensions(c.floating);return w!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function Et(){return typeof window<"u"}function De(e){return Tr(e)?(e.nodeName||"").toLowerCase():"#document"}function z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(Tr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Tr(e){return Et()?e instanceof Node||e instanceof z(e).Node:!1}function J(e){return Et()?e instanceof Element||e instanceof z(e).Element:!1}function ie(e){return Et()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function ro(e){return!Et()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}const $l=new Set(["inline","contents"]);function Ue(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!$l.has(r)}const Bl=new Set(["table","td","th"]);function Wl(e){return Bl.has(De(e))}const Hl=[":popover-open",":modal"];function Rt(e){return Hl.some(t=>{try{return e.matches(t)}catch{return!1}})}const Vl=["transform","translate","scale","rotate","perspective"],Kl=["transform","translate","scale","rotate","perspective","filter"],Ul=["paint","layout","strict","content"];function bn(e){const t=Cn(),n=J(e)?ee(e):e;return Vl.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Kl.some(o=>(n.willChange||"").includes(o))||Ul.some(o=>(n.contain||"").includes(o))}function Gl(e){let t=ve(e);for(;ie(t)&&!_e(t);){if(bn(t))return t;if(Rt(t))return null;t=ve(t)}return null}function Cn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const zl=new Set(["html","body","#document"]);function _e(e){return zl.has(De(e))}function ee(e){return z(e).getComputedStyle(e)}function St(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ve(e){if(De(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ro(e)&&e.host||ae(e);return ro(t)?t.host:t}function Pr(e){const t=ve(e);return _e(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Ue(t)?t:Pr(t)}function $e(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Pr(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),a=z(r);if(i){const c=qt(a);return t.concat(a,a.visualViewport||[],Ue(r)?r:[],c&&n?$e(c):[])}return t.concat(r,$e(r,[],n))}function qt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Mr(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ie(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,c=ft(n)!==i||ft(o)!==a;return c&&(n=i,o=a),{width:n,height:o,$:c}}function En(e){return J(e)?e:e.contextElement}function Me(e){const t=En(e);if(!ie(t))return se(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Mr(t);let a=(i?ft(n.width):n.width)/o,c=(i?ft(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const Yl=se(0);function _r(e){const t=z(e);return!Cn()||!t.visualViewport?Yl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==z(e)?!1:t}function ye(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=En(e);let a=se(1);t&&(o?J(o)&&(a=Me(o)):a=Me(e));const c=Xl(i,n,o)?_r(i):se(0);let d=(r.left+c.x)/a.x,l=(r.top+c.y)/a.y,u=r.width/a.x,f=r.height/a.y;if(i){const h=z(i),v=o&&J(o)?z(o):o;let w=h,m=qt(w);for(;m&&o&&v!==w;){const g=Me(m),x=m.getBoundingClientRect(),y=ee(m),b=x.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,C=x.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;d*=g.x,l*=g.y,u*=g.x,f*=g.y,d+=b,l+=C,w=z(m),m=qt(w)}}return mt({width:u,height:f,x:d,y:l})}function Tt(e,t){const n=St(e).scrollLeft;return t?t.left+n:ye(ae(e)).left+n}function Ar(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Tt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function ql(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",a=ae(o),c=t?Rt(t.floating):!1;if(o===a||c&&i)return n;let d={scrollLeft:0,scrollTop:0},l=se(1);const u=se(0),f=ie(o);if((f||!f&&!i)&&((De(o)!=="body"||Ue(a))&&(d=St(o)),ie(o))){const v=ye(o);l=Me(o),u.x=v.x+o.clientLeft,u.y=v.y+o.clientTop}const h=a&&!f&&!i?Ar(a,d):se(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-d.scrollLeft*l.x+u.x+h.x,y:n.y*l.y-d.scrollTop*l.y+u.y+h.y}}function Zl(e){return Array.from(e.getClientRects())}function Ql(e){const t=ae(e),n=St(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=G(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Tt(e);const c=-n.scrollTop;return ee(o).direction==="rtl"&&(a+=G(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:c}}const so=25;function Jl(e,t){const n=z(e),o=ae(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,c=0,d=0;if(r){i=r.width,a=r.height;const u=Cn();(!u||u&&t==="fixed")&&(c=r.offsetLeft,d=r.offsetTop)}const l=Tt(o);if(l<=0){const u=o.ownerDocument,f=u.body,h=getComputedStyle(f),v=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-f.clientWidth-v);w<=so&&(i-=w)}else l<=so&&(i+=l);return{width:i,height:a,x:c,y:d}}const eu=new Set(["absolute","fixed"]);function tu(e,t){const n=ye(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=ie(e)?Me(e):se(1),a=e.clientWidth*i.x,c=e.clientHeight*i.y,d=r*i.x,l=o*i.y;return{width:a,height:c,x:d,y:l}}function io(e,t,n){let o;if(t==="viewport")o=Jl(e,n);else if(t==="document")o=Ql(ae(e));else if(J(t))o=tu(t,n);else{const r=_r(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return mt(o)}function kr(e,t){const n=ve(e);return n===t||!J(n)||_e(n)?!1:ee(n).position==="fixed"||kr(n,t)}function nu(e,t){const n=t.get(e);if(n)return n;let o=$e(e,[],!1).filter(c=>J(c)&&De(c)!=="body"),r=null;const i=ee(e).position==="fixed";let a=i?ve(e):e;for(;J(a)&&!_e(a);){const c=ee(a),d=bn(a);!d&&c.position==="fixed"&&(r=null),(i?!d&&!r:!d&&c.position==="static"&&!!r&&eu.has(r.position)||Ue(a)&&!d&&kr(e,a))?o=o.filter(u=>u!==a):r=c,a=ve(a)}return t.set(e,o),o}function ou(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Rt(t)?[]:nu(t,this._c):[].concat(n),o],c=a[0],d=a.reduce((l,u)=>{const f=io(t,u,r);return l.top=G(f.top,l.top),l.right=he(f.right,l.right),l.bottom=he(f.bottom,l.bottom),l.left=G(f.left,l.left),l},io(t,c,r));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ru(e){const{width:t,height:n}=Mr(e);return{width:t,height:n}}function su(e,t,n){const o=ie(t),r=ae(t),i=n==="fixed",a=ye(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const d=se(0);function l(){d.x=Tt(r)}if(o||!o&&!i)if((De(t)!=="body"||Ue(r))&&(c=St(t)),o){const v=ye(t,!0,i,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else r&&l();i&&!o&&r&&l();const u=r&&!o&&!i?Ar(r,c):se(0),f=a.left+c.scrollLeft-d.x-u.x,h=a.top+c.scrollTop-d.y-u.y;return{x:f,y:h,width:a.width,height:a.height}}function Ht(e){return ee(e).position==="static"}function ao(e,t){if(!ie(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ae(e)===n&&(n=n.ownerDocument.body),n}function Or(e,t){const n=z(e);if(Rt(e))return n;if(!ie(e)){let r=ve(e);for(;r&&!_e(r);){if(J(r)&&!Ht(r))return r;r=ve(r)}return n}let o=ao(e,t);for(;o&&Wl(o)&&Ht(o);)o=ao(o,t);return o&&_e(o)&&Ht(o)&&!bn(o)?n:o||Gl(e)||n}const iu=async function(e){const t=this.getOffsetParent||Or,n=this.getDimensions,o=await n(e.floating);return{reference:su(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function au(e){return ee(e).direction==="rtl"}const cu={convertOffsetParentRelativeRectToViewportRelativeRect:ql,getDocumentElement:ae,getClippingRect:ou,getOffsetParent:Or,getElementRects:iu,getClientRects:Zl,getDimensions:ru,getScale:Me,isElement:J,isRTL:au};function Dr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lu(e,t){let n=null,o;const r=ae(e);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function a(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),i();const l=e.getBoundingClientRect(),{left:u,top:f,width:h,height:v}=l;if(c||t(),!h||!v)return;const w=st(f),m=st(r.clientWidth-(u+h)),g=st(r.clientHeight-(f+v)),x=st(u),b={rootMargin:-w+"px "+-m+"px "+-g+"px "+-x+"px",threshold:G(0,he(1,d))||1};let C=!0;function E(S){const R=S[0].intersectionRatio;if(R!==d){if(!C)return a();R?a(!1,R):o=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!Dr(l,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(E,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return a(!0),i}function uu(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,l=En(e),u=r||i?[...l?$e(l):[],...$e(t)]:[];u.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=l&&c?lu(l,n):null;let h=-1,v=null;a&&(v=new ResizeObserver(x=>{let[y]=x;y&&y.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),n()}),l&&!d&&v.observe(l),v.observe(t));let w,m=d?ye(e):null;d&&g();function g(){const x=ye(e);m&&!Dr(m,x)&&n(),m=x,w=requestAnimationFrame(g)}return n(),()=>{var x;u.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(x=v)==null||x.disconnect(),v=null,d&&cancelAnimationFrame(w)}}const du=Il,fu=Ll,pu=Ol,mu=Fl,hu=Dl,co=kl,vu=jl,gu=(e,t,n)=>{const o=new Map,r={platform:cu,...n},i={...r.platform,_c:o};return Al(e,t,{...r,platform:i})};var wu=typeof document<"u",xu=function(){},lt=wu?k.useLayoutEffect:xu;function ht(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!ht(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!ht(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Nr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lo(e,t){const n=Nr(e);return Math.round(t*n)/n}function Vt(e){const t=s.useRef(e);return lt(()=>{t.current=e}),t}function yu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:a}={},transform:c=!0,whileElementsMounted:d,open:l}=e,[u,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=s.useState(o);ht(h,o)||v(o);const[w,m]=s.useState(null),[g,x]=s.useState(null),y=s.useCallback(A=>{A!==S.current&&(S.current=A,m(A))},[]),b=s.useCallback(A=>{A!==R.current&&(R.current=A,x(A))},[]),C=i||w,E=a||g,S=s.useRef(null),R=s.useRef(null),_=s.useRef(u),N=d!=null,D=Vt(d),L=Vt(r),W=Vt(l),F=s.useCallback(()=>{if(!S.current||!R.current)return;const A={placement:t,strategy:n,middleware:h};L.current&&(A.platform=L.current),gu(S.current,R.current,A).then(T=>{const V={...T,isPositioned:W.current!==!1};P.current&&!ht(_.current,V)&&(_.current=V,sn.flushSync(()=>{f(V)}))})},[h,t,n,L,W]);lt(()=>{l===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[l]);const P=s.useRef(!1);lt(()=>(P.current=!0,()=>{P.current=!1}),[]),lt(()=>{if(C&&(S.current=C),E&&(R.current=E),C&&E){if(D.current)return D.current(C,E,F);F()}},[C,E,F,D,N]);const $=s.useMemo(()=>({reference:S,floating:R,setReference:y,setFloating:b}),[y,b]),O=s.useMemo(()=>({reference:C,floating:E}),[C,E]),B=s.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const T=lo(O.floating,u.x),V=lo(O.floating,u.y);return c?{...A,transform:"translate("+T+"px, "+V+"px)",...Nr(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:V}},[n,c,O.floating,u.x,u.y]);return s.useMemo(()=>({...u,update:F,refs:$,elements:O,floatingStyles:B}),[u,F,$,O,B])}const bu=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?co({element:o.current,padding:r}).fn(n):{}:o?co({element:o,padding:r}).fn(n):{}}}},Cu=(e,t)=>({...du(e),options:[e,t]}),Eu=(e,t)=>({...fu(e),options:[e,t]}),Ru=(e,t)=>({...vu(e),options:[e,t]}),Su=(e,t)=>({...pu(e),options:[e,t]}),Tu=(e,t)=>({...mu(e),options:[e,t]}),Pu=(e,t)=>({...hu(e),options:[e,t]}),Mu=(e,t)=>({...bu(e),options:[e,t]});var _u="Arrow",Ir=s.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...i}=e;return p.jsx(I.svg,{...i,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ir.displayName=_u;var Au=Ir,Rn="Popper",[Lr,Pt]=de(Rn),[ku,jr]=Lr(Rn),Fr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=s.useState(null);return p.jsx(ku,{scope:t,anchor:o,onAnchorChange:r,children:n})};Fr.displayName=Rn;var $r="PopperAnchor",Br=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=jr($r,n),a=s.useRef(null),c=H(t,a),d=s.useRef(null);return s.useEffect(()=>{const l=d.current;d.current=o?.current||a.current,l!==d.current&&i.onAnchorChange(d.current)}),o?null:p.jsx(I.div,{...r,ref:c})});Br.displayName=$r;var Sn="PopperContent",[Ou,Du]=Lr(Sn),Wr=s.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:w,...m}=e,g=jr(Sn,n),[x,y]=s.useState(null),b=H(t,K=>y(K)),[C,E]=s.useState(null),S=Fo(C),R=S?.width??0,_=S?.height??0,N=o+(i!=="center"?"-"+i:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},L=Array.isArray(l)?l:[l],W=L.length>0,F={padding:D,boundary:L.filter(Iu),altBoundary:W},{refs:P,floatingStyles:$,placement:O,isPositioned:B,middlewareData:A}=yu({strategy:"fixed",placement:N,whileElementsMounted:(...K)=>uu(...K,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Cu({mainAxis:r+_,alignmentAxis:a}),d&&Eu({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Ru():void 0,...F}),d&&Su({...F}),Tu({...F,apply:({elements:K,rects:Ne,availableWidth:oi,availableHeight:ri})=>{const{width:si,height:ii}=Ne.reference,Qe=K.floating.style;Qe.setProperty("--radix-popper-available-width",`${oi}px`),Qe.setProperty("--radix-popper-available-height",`${ri}px`),Qe.setProperty("--radix-popper-anchor-width",`${si}px`),Qe.setProperty("--radix-popper-anchor-height",`${ii}px`)}}),C&&Mu({element:C,padding:c}),Lu({arrowWidth:R,arrowHeight:_}),h&&Pu({strategy:"referenceHidden",...F})]}),[T,V]=Kr(O),X=Y(w);ce(()=>{B&&X?.()},[B,X]);const Q=A.arrow?.x,ne=A.arrow?.y,fe=A.arrow?.centerOffset!==0,[Ze,ge]=s.useState();return ce(()=>{x&&ge(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:B?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ze,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Ou,{scope:n,placedSide:T,onArrowChange:E,arrowX:Q,arrowY:ne,shouldHideArrow:fe,children:p.jsx(I.div,{"data-side":T,"data-align":V,...m,ref:b,style:{...m.style,animation:B?void 0:"none"}})})})});Wr.displayName=Sn;var Hr="PopperArrow",Nu={top:"bottom",right:"left",bottom:"top",left:"right"},Vr=s.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,i=Du(Hr,o),a=Nu[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(Au,{...r,ref:n,style:{...r.style,display:"block"}})})});Vr.displayName=Hr;function Iu(e){return e!==null}var Lu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,d=a?0:e.arrowHeight,[l,u]=Kr(n),f={start:"0%",center:"50%",end:"100%"}[u],h=(r.arrow?.x??0)+c/2,v=(r.arrow?.y??0)+d/2;let w="",m="";return l==="bottom"?(w=a?f:`${h}px`,m=`${-d}px`):l==="top"?(w=a?f:`${h}px`,m=`${o.floating.height+d}px`):l==="right"?(w=`${-d}px`,m=a?f:`${v}px`):l==="left"&&(w=`${o.floating.width+d}px`,m=a?f:`${v}px`),{data:{x:w,y:m}}}});function Kr(e){const[t,n="center"]=e.split("-");return[t,n]}var Ur=Fr,Gr=Br,zr=Wr,Yr=Vr,Kt="rovingFocusGroup.onEntryFocus",ju={bubbles:!1,cancelable:!0},Ge="RovingFocusGroup",[Zt,Xr,Fu]=gn(Ge),[$u,qr]=de(Ge,[Fu]),[Bu,Wu]=$u(Ge),Zr=s.forwardRef((e,t)=>p.jsx(Zt.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Zt.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Hu,{...e,ref:t})})}));Zr.displayName=Ge;var Hu=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=e,h=s.useRef(null),v=H(t,h),w=Er(i),[m,g]=ke({prop:a,defaultProp:c??null,onChange:d,caller:Ge}),[x,y]=s.useState(!1),b=Y(l),C=Xr(n),E=s.useRef(!1),[S,R]=s.useState(0);return s.useEffect(()=>{const _=h.current;if(_)return _.addEventListener(Kt,b),()=>_.removeEventListener(Kt,b)},[b]),p.jsx(Bu,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:s.useCallback(_=>g(_),[g]),onItemShiftTab:s.useCallback(()=>y(!0),[]),onFocusableItemAdd:s.useCallback(()=>R(_=>_+1),[]),onFocusableItemRemove:s.useCallback(()=>R(_=>_-1),[]),children:p.jsx(I.div,{tabIndex:x||S===0?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:M(e.onMouseDown,()=>{E.current=!0}),onFocus:M(e.onFocus,_=>{const N=!E.current;if(_.target===_.currentTarget&&N&&!x){const D=new CustomEvent(Kt,ju);if(_.currentTarget.dispatchEvent(D),!D.defaultPrevented){const L=C().filter(O=>O.focusable),W=L.find(O=>O.active),F=L.find(O=>O.id===m),$=[W,F,...L].filter(Boolean).map(O=>O.ref.current);es($,u)}}E.current=!1}),onBlur:M(e.onBlur,()=>y(!1))})})}),Qr="RovingFocusGroupItem",Jr=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:i,children:a,...c}=e,d=we(),l=i||d,u=Wu(Qr,n),f=u.currentTabStopId===l,h=Xr(n),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:m}=u;return s.useEffect(()=>{if(o)return v(),()=>w()},[o,v,w]),p.jsx(Zt.ItemSlot,{scope:n,id:l,focusable:o,active:r,children:p.jsx(I.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...c,ref:t,onMouseDown:M(e.onMouseDown,g=>{o?u.onItemFocus(l):g.preventDefault()}),onFocus:M(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:M(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const x=Uu(g,u.orientation,u.dir);if(x!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=h().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")b.reverse();else if(x==="prev"||x==="next"){x==="prev"&&b.reverse();const C=b.indexOf(g.currentTarget);b=u.loop?Gu(b,C+1):b.slice(C+1)}setTimeout(()=>es(b))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:m!=null}):a})})});Jr.displayName=Qr;var Vu={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ku(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Uu(e,t,n){const o=Ku(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Vu[o]}function es(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Gu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var zu=Zr,Yu=Jr,Qt=["Enter"," "],Xu=["ArrowDown","PageUp","Home"],ts=["ArrowUp","PageDown","End"],qu=[...Xu,...ts],Zu={ltr:[...Qt,"ArrowRight"],rtl:[...Qt,"ArrowLeft"]},Qu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ze="Menu",[Be,Ju,ed]=gn(ze),[be,ns]=de(ze,[ed,Pt,qr]),Mt=Pt(),os=qr(),[td,Ce]=be(ze),[nd,Ye]=be(ze),rs=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:i,modal:a=!0}=e,c=Mt(t),[d,l]=s.useState(null),u=s.useRef(!1),f=Y(i),h=Er(r);return s.useEffect(()=>{const v=()=>{u.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>u.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),p.jsx(Ur,{...c,children:p.jsx(td,{scope:t,open:n,onOpenChange:f,content:d,onContentChange:l,children:p.jsx(nd,{scope:t,onClose:s.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:a,children:o})})})};rs.displayName=ze;var od="MenuAnchor",Tn=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Mt(n);return p.jsx(Gr,{...r,...o,ref:t})});Tn.displayName=od;var Pn="MenuPortal",[rd,ss]=be(Pn,{forceMount:void 0}),is=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,i=Ce(Pn,t);return p.jsx(rd,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||i.open,children:p.jsx(Ke,{asChild:!0,container:r,children:o})})})};is.displayName=Pn;var q="MenuContent",[sd,Mn]=be(q),as=s.forwardRef((e,t)=>{const n=ss(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,i=Ce(q,e.__scopeMenu),a=Ye(q,e.__scopeMenu);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||i.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(id,{...r,ref:t}):p.jsx(ad,{...r,ref:t})})})})}),id=s.forwardRef((e,t)=>{const n=Ce(q,e.__scopeMenu),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const i=o.current;if(i)return ar(i)},[]),p.jsx(_n,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ad=s.forwardRef((e,t)=>{const n=Ce(q,e.__scopeMenu);return p.jsx(_n,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),cd=je("MenuContent.ScrollLock"),_n=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:v,disableOutsideScroll:w,...m}=e,g=Ce(q,n),x=Ye(q,n),y=Mt(n),b=os(n),C=Ju(n),[E,S]=s.useState(null),R=s.useRef(null),_=H(t,R,g.onContentChange),N=s.useRef(0),D=s.useRef(""),L=s.useRef(0),W=s.useRef(null),F=s.useRef("right"),P=s.useRef(0),$=w?pn:s.Fragment,O=w?{as:cd,allowPinchZoom:!0}:void 0,B=T=>{const V=D.current+T,X=C().filter(K=>!K.disabled),Q=document.activeElement,ne=X.find(K=>K.ref.current===Q)?.textValue,fe=X.map(K=>K.textValue),Ze=yd(fe,V,ne),ge=X.find(K=>K.textValue===Ze)?.ref.current;(function K(Ne){D.current=Ne,window.clearTimeout(N.current),Ne!==""&&(N.current=window.setTimeout(()=>K(""),1e3))})(V),ge&&setTimeout(()=>ge.focus())};s.useEffect(()=>()=>window.clearTimeout(N.current),[]),Qo();const A=s.useCallback(T=>F.current===W.current?.side&&Cd(T,W.current?.area),[]);return p.jsx(sd,{scope:n,searchRef:D,onItemEnter:s.useCallback(T=>{A(T)&&T.preventDefault()},[A]),onItemLeave:s.useCallback(T=>{A(T)||(R.current?.focus(),S(null))},[A]),onTriggerLeave:s.useCallback(T=>{A(T)&&T.preventDefault()},[A]),pointerGraceTimerRef:L,onPointerGraceIntentChange:s.useCallback(T=>{W.current=T},[]),children:p.jsx($,{...O,children:p.jsx(fn,{asChild:!0,trapped:r,onMountAutoFocus:M(i,T=>{T.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p.jsx(Ve,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:v,children:p.jsx(zu,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:S,onEntryFocus:M(d,T=>{x.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(zr,{role:"menu","aria-orientation":"vertical","data-state":Es(g.open),"data-radix-menu-content":"",dir:x.dir,...y,...m,ref:_,style:{outline:"none",...m.style},onKeyDown:M(m.onKeyDown,T=>{const X=T.target.closest("[data-radix-menu-content]")===T.currentTarget,Q=T.ctrlKey||T.altKey||T.metaKey,ne=T.key.length===1;X&&(T.key==="Tab"&&T.preventDefault(),!Q&&ne&&B(T.key));const fe=R.current;if(T.target!==fe||!qu.includes(T.key))return;T.preventDefault();const ge=C().filter(K=>!K.disabled).map(K=>K.ref.current);ts.includes(T.key)&&ge.reverse(),wd(ge)}),onBlur:M(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(N.current),D.current="")}),onPointerMove:M(e.onPointerMove,We(T=>{const V=T.target,X=P.current!==T.clientX;if(T.currentTarget.contains(V)&&X){const Q=T.clientX>P.current?"right":"left";F.current=Q,P.current=T.clientX}}))})})})})})})});as.displayName=q;var ld="MenuGroup",An=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"group",...o,ref:t})});An.displayName=ld;var ud="MenuLabel",cs=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});cs.displayName=ud;var vt="MenuItem",uo="menu.itemSelect",_t=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,i=s.useRef(null),a=Ye(vt,e.__scopeMenu),c=Mn(vt,e.__scopeMenu),d=H(t,i),l=s.useRef(!1),u=()=>{const f=i.current;if(!n&&f){const h=new CustomEvent(uo,{bubbles:!0,cancelable:!0});f.addEventListener(uo,v=>o?.(v),{once:!0}),un(f,h),h.defaultPrevented?l.current=!1:a.onClose()}};return p.jsx(ls,{...r,ref:d,disabled:n,onClick:M(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:M(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:M(e.onKeyDown,f=>{const h=c.searchRef.current!=="";n||h&&f.key===" "||Qt.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});_t.displayName=vt;var ls=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...i}=e,a=Mn(vt,n),c=os(n),d=s.useRef(null),l=H(t,d),[u,f]=s.useState(!1),[h,v]=s.useState("");return s.useEffect(()=>{const w=d.current;w&&v((w.textContent??"").trim())},[i.children]),p.jsx(Be.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:p.jsx(Yu,{asChild:!0,...c,focusable:!o,children:p.jsx(I.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...i,ref:l,onPointerMove:M(e.onPointerMove,We(w=>{o?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,We(w=>a.onItemLeave(w))),onFocus:M(e.onFocus,()=>f(!0)),onBlur:M(e.onBlur,()=>f(!1))})})})}),dd="MenuCheckboxItem",us=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return p.jsx(hs,{scope:e.__scopeMenu,checked:n,children:p.jsx(_t,{role:"menuitemcheckbox","aria-checked":gt(n)?"mixed":n,...r,ref:t,"data-state":On(n),onSelect:M(r.onSelect,()=>o?.(gt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});us.displayName=dd;var ds="MenuRadioGroup",[fd,pd]=be(ds,{value:void 0,onValueChange:()=>{}}),fs=s.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,i=Y(o);return p.jsx(fd,{scope:e.__scopeMenu,value:n,onValueChange:i,children:p.jsx(An,{...r,ref:t})})});fs.displayName=ds;var ps="MenuRadioItem",ms=s.forwardRef((e,t)=>{const{value:n,...o}=e,r=pd(ps,e.__scopeMenu),i=n===r.value;return p.jsx(hs,{scope:e.__scopeMenu,checked:i,children:p.jsx(_t,{role:"menuitemradio","aria-checked":i,...o,ref:t,"data-state":On(i),onSelect:M(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ms.displayName=ps;var kn="MenuItemIndicator",[hs,md]=be(kn,{checked:!1}),vs=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,i=md(kn,n);return p.jsx(Z,{present:o||gt(i.checked)||i.checked===!0,children:p.jsx(I.span,{...r,ref:t,"data-state":On(i.checked)})})});vs.displayName=kn;var hd="MenuSeparator",gs=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});gs.displayName=hd;var vd="MenuArrow",ws=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Mt(n);return p.jsx(Yr,{...r,...o,ref:t})});ws.displayName=vd;var gd="MenuSub",[Rp,xs]=be(gd),Le="MenuSubTrigger",ys=s.forwardRef((e,t)=>{const n=Ce(Le,e.__scopeMenu),o=Ye(Le,e.__scopeMenu),r=xs(Le,e.__scopeMenu),i=Mn(Le,e.__scopeMenu),a=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=i,l={__scopeMenu:e.__scopeMenu},u=s.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return s.useEffect(()=>u,[u]),s.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),d(null)}},[c,d]),p.jsx(Tn,{asChild:!0,...l,children:p.jsx(ls,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Es(n.open),...e,ref:xt(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,We(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:M(e.onPointerLeave,We(f=>{u();const h=n.content?.getBoundingClientRect();if(h){const v=n.content?.dataset.side,w=v==="right",m=w?-5:5,g=h[w?"left":"right"],x=h[w?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x:g,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:g,y:h.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,f=>{const h=i.searchRef.current!=="";e.disabled||h&&f.key===" "||Zu[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ys.displayName=Le;var bs="MenuSubContent",Cs=s.forwardRef((e,t)=>{const n=ss(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,i=Ce(q,e.__scopeMenu),a=Ye(q,e.__scopeMenu),c=xs(bs,e.__scopeMenu),d=s.useRef(null),l=H(t,d);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||i.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:p.jsx(_n,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{a.isUsingKeyboardRef.current&&d.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:M(e.onFocusOutside,u=>{u.target!==c.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,u=>{a.onClose(),u.preventDefault()}),onKeyDown:M(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),h=Qu[a.dir].includes(u.key);f&&h&&(i.onOpenChange(!1),c.trigger?.focus(),u.preventDefault())})})})})})});Cs.displayName=bs;function Es(e){return e?"open":"closed"}function gt(e){return e==="indeterminate"}function On(e){return gt(e)?"indeterminate":e?"checked":"unchecked"}function wd(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xd(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function yd(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=xd(e,Math.max(i,0));r.length===1&&(a=a.filter(l=>l!==n));const d=a.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return d!==n?d:void 0}function bd(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const c=t[i],d=t[a],l=c.x,u=c.y,f=d.x,h=d.y;u>o!=h>o&&n<(f-l)*(o-u)/(h-u)+l&&(r=!r)}return r}function Cd(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return bd(n,t)}function We(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ed=rs,Rd=Tn,Sd=is,Td=as,Pd=An,Md=cs,_d=_t,Ad=us,kd=fs,Od=ms,Dd=vs,Nd=gs,Id=ws,Ld=ys,jd=Cs,At="DropdownMenu",[Fd]=de(At,[ns]),U=ns(),[$d,Rs]=Fd(At),Ss=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:i,onOpenChange:a,modal:c=!0}=e,d=U(t),l=s.useRef(null),[u,f]=ke({prop:r,defaultProp:i??!1,onChange:a,caller:At});return p.jsx($d,{scope:t,triggerId:we(),triggerRef:l,contentId:we(),open:u,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(h=>!h),[f]),modal:c,children:p.jsx(Ed,{...d,open:u,onOpenChange:f,dir:o,modal:c,children:n})})};Ss.displayName=At;var Ts="DropdownMenuTrigger",Ps=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,i=Rs(Ts,n),a=U(n);return p.jsx(Rd,{asChild:!0,...a,children:p.jsx(I.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:xt(t,i.triggerRef),onPointerDown:M(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(i.onOpenToggle(),i.open||c.preventDefault())}),onKeyDown:M(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&i.onOpenToggle(),c.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Ps.displayName=Ts;var Bd="DropdownMenuPortal",Ms=e=>{const{__scopeDropdownMenu:t,...n}=e,o=U(t);return p.jsx(Sd,{...o,...n})};Ms.displayName=Bd;var _s="DropdownMenuContent",As=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Rs(_s,n),i=U(n),a=s.useRef(!1);return p.jsx(Td,{id:r.contentId,"aria-labelledby":r.triggerId,...i,...o,ref:t,onCloseAutoFocus:M(e.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:M(e.onInteractOutside,c=>{const d=c.detail.originalEvent,l=d.button===0&&d.ctrlKey===!0,u=d.button===2||l;(!r.modal||u)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});As.displayName=_s;var Wd="DropdownMenuGroup",Hd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Pd,{...r,...o,ref:t})});Hd.displayName=Wd;var Vd="DropdownMenuLabel",Kd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Md,{...r,...o,ref:t})});Kd.displayName=Vd;var Ud="DropdownMenuItem",ks=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(_d,{...r,...o,ref:t})});ks.displayName=Ud;var Gd="DropdownMenuCheckboxItem",zd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Ad,{...r,...o,ref:t})});zd.displayName=Gd;var Yd="DropdownMenuRadioGroup",Xd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(kd,{...r,...o,ref:t})});Xd.displayName=Yd;var qd="DropdownMenuRadioItem",Zd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Od,{...r,...o,ref:t})});Zd.displayName=qd;var Qd="DropdownMenuItemIndicator",Jd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Dd,{...r,...o,ref:t})});Jd.displayName=Qd;var ef="DropdownMenuSeparator",tf=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Nd,{...r,...o,ref:t})});tf.displayName=ef;var nf="DropdownMenuArrow",Os=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Id,{...r,...o,ref:t})});Os.displayName=nf;var of="DropdownMenuSubTrigger",rf=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Ld,{...r,...o,ref:t})});rf.displayName=of;var sf="DropdownMenuSubContent",af=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(jd,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});af.displayName=sf;var cf=Ss,lf=Ps,uf=Ms,df=As,ff=ks,pf=Os;const mf="_menuButtonContent_zvwim_1",hf="_menuButtonItem_zvwim_13",vf="_menuButtonArrow_zvwim_41",Jt={menuButtonContent:mf,menuButtonItem:hf,menuButtonArrow:vf},gf=({children:e,trigger:t,...n})=>p.jsxs(cf,{modal:!1,...n,children:[p.jsx(lf,{asChild:!0,children:t}),p.jsx(uf,{children:p.jsxs(df,{align:"end",className:Jt.menuButtonContent,sideOffset:5,children:[e,p.jsx(pf,{className:Jt.menuButtonArrow})]})})]}),wf=({children:e,icon:t,...n})=>{const o=t?ut[t]:void 0;return p.jsxs(ff,{className:Jt.menuButtonItem,...n,children:[o&&p.jsx(o,{size:"md",className:"text-color-secondary"}),p.jsx("label",{className:"label-3 text-color-secondary",children:e})]})};var xf=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"}),yf="VisuallyHidden",kt=s.forwardRef((e,t)=>p.jsx(I.span,{...e,ref:t,style:{...xf,...e.style}}));kt.displayName=yf;var bf=kt,Dn="ToastProvider",[Nn,Cf,Ef]=gn("Toast"),[Ds]=de("Toast",[Ef]),[Rf,Ot]=Ds(Dn),Ns=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:i=50,children:a}=e,[c,d]=s.useState(null),[l,u]=s.useState(0),f=s.useRef(!1),h=s.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Dn}\`. Expected non-empty \`string\`.`),p.jsx(Nn.Provider,{scope:t,children:p.jsx(Rf,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:i,toastCount:l,viewport:c,onViewportChange:d,onToastAdd:s.useCallback(()=>u(v=>v+1),[]),onToastRemove:s.useCallback(()=>u(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:a})})};Ns.displayName=Dn;var Is="ToastViewport",Sf=["F8"],en="toast.viewportPause",tn="toast.viewportResume",Ls=s.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=Sf,label:r="Notifications ({hotkey})",...i}=e,a=Ot(Is,n),c=Cf(n),d=s.useRef(null),l=s.useRef(null),u=s.useRef(null),f=s.useRef(null),h=H(t,f,a.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=a.toastCount>0;s.useEffect(()=>{const g=x=>{o.length!==0&&o.every(b=>x[b]||x.code===b)&&f.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[o]),s.useEffect(()=>{const g=d.current,x=f.current;if(w&&g&&x){const y=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(en);x.dispatchEvent(S),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(tn);x.dispatchEvent(S),a.isClosePausedRef.current=!1}},C=S=>{!g.contains(S.relatedTarget)&&b()},E=()=>{g.contains(document.activeElement)||b()};return g.addEventListener("focusin",y),g.addEventListener("focusout",C),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",E),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",C),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",E),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[w,a.isClosePausedRef]);const m=s.useCallback(({tabbingDirection:g})=>{const y=c().map(b=>{const C=b.ref.current,E=[C,...Ff(C)];return g==="forwards"?E:E.reverse()});return(g==="forwards"?y.reverse():y).flat()},[c]);return s.useEffect(()=>{const g=f.current;if(g){const x=y=>{const b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){const E=document.activeElement,S=y.shiftKey;if(y.target===g&&S){l.current?.focus();return}const N=m({tabbingDirection:S?"backwards":"forwards"}),D=N.findIndex(L=>L===E);Ut(N.slice(D+1))?y.preventDefault():S?l.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",x),()=>g.removeEventListener("keydown",x)}},[c,m]),p.jsxs(tc,{ref:d,role:"region","aria-label":r.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&p.jsx(nn,{ref:l,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});Ut(g)}}),p.jsx(Nn.Slot,{scope:n,children:p.jsx(I.ol,{tabIndex:-1,...i,ref:h})}),w&&p.jsx(nn,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Ut(g)}})]})});Ls.displayName=Is;var js="ToastFocusProxy",nn=s.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,i=Ot(js,n);return p.jsx(kt,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:a=>{const c=a.relatedTarget;!i.viewport?.contains(c)&&o()}})});nn.displayName=js;var Xe="Toast",Tf="toast.swipeStart",Pf="toast.swipeMove",Mf="toast.swipeCancel",_f="toast.swipeEnd",Fs=s.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:i,...a}=e,[c,d]=ke({prop:o,defaultProp:r??!0,onChange:i,caller:Xe});return p.jsx(Z,{present:n||c,children:p.jsx(Of,{open:c,...a,ref:t,onClose:()=>d(!1),onPause:Y(e.onPause),onResume:Y(e.onResume),onSwipeStart:M(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:M(e.onSwipeMove,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:M(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:M(e.onSwipeEnd,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),d(!1)})})})});Fs.displayName=Xe;var[Af,kf]=Ds(Xe,{onClose(){}}),Of=s.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:i,onClose:a,onEscapeKeyDown:c,onPause:d,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:v,...w}=e,m=Ot(Xe,n),[g,x]=s.useState(null),y=H(t,P=>x(P)),b=s.useRef(null),C=s.useRef(null),E=r||m.duration,S=s.useRef(0),R=s.useRef(E),_=s.useRef(0),{onToastAdd:N,onToastRemove:D}=m,L=Y(()=>{g?.contains(document.activeElement)&&m.viewport?.focus(),a()}),W=s.useCallback(P=>{!P||P===1/0||(window.clearTimeout(_.current),S.current=new Date().getTime(),_.current=window.setTimeout(L,P))},[L]);s.useEffect(()=>{const P=m.viewport;if(P){const $=()=>{W(R.current),l?.()},O=()=>{const B=new Date().getTime()-S.current;R.current=R.current-B,window.clearTimeout(_.current),d?.()};return P.addEventListener(en,O),P.addEventListener(tn,$),()=>{P.removeEventListener(en,O),P.removeEventListener(tn,$)}}},[m.viewport,E,d,l,W]),s.useEffect(()=>{i&&!m.isClosePausedRef.current&&W(E)},[i,E,m.isClosePausedRef,W]),s.useEffect(()=>(N(),()=>D()),[N,D]);const F=s.useMemo(()=>g?Us(g):null,[g]);return m.viewport?p.jsxs(p.Fragment,{children:[F&&p.jsx(Df,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:F}),p.jsx(Af,{scope:n,onClose:L,children:sn.createPortal(p.jsx(Nn.ItemSlot,{scope:n,children:p.jsx(ec,{asChild:!0,onEscapeKeyDown:M(c,()=>{m.isFocusedToastEscapeKeyDownRef.current||L(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(I.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:M(e.onKeyDown,P=>{P.key==="Escape"&&(c?.(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:M(e.onPointerDown,P=>{P.button===0&&(b.current={x:P.clientX,y:P.clientY})}),onPointerMove:M(e.onPointerMove,P=>{if(!b.current)return;const $=P.clientX-b.current.x,O=P.clientY-b.current.y,B=!!C.current,A=["left","right"].includes(m.swipeDirection),T=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,V=A?T(0,$):0,X=A?0:T(0,O),Q=P.pointerType==="touch"?10:2,ne={x:V,y:X},fe={originalEvent:P,delta:ne};B?(C.current=ne,it(Pf,f,fe,{discrete:!1})):fo(ne,m.swipeDirection,Q)?(C.current=ne,it(Tf,u,fe,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs($)>Q||Math.abs(O)>Q)&&(b.current=null)}),onPointerUp:M(e.onPointerUp,P=>{const $=C.current,O=P.target;if(O.hasPointerCapture(P.pointerId)&&O.releasePointerCapture(P.pointerId),C.current=null,b.current=null,$){const B=P.currentTarget,A={originalEvent:P,delta:$};fo($,m.swipeDirection,m.swipeThreshold)?it(_f,v,A,{discrete:!0}):it(Mf,h,A,{discrete:!0}),B.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Df=e=>{const{__scopeToast:t,children:n,...o}=e,r=Ot(Xe,t),[i,a]=s.useState(!1),[c,d]=s.useState(!1);return Lf(()=>a(!0)),s.useEffect(()=>{const l=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(l)},[]),c?null:p.jsx(Ke,{asChild:!0,children:p.jsx(kt,{...o,children:i&&p.jsxs(p.Fragment,{children:[r.label," ",n]})})})},Nf="ToastTitle",$s=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});$s.displayName=Nf;var If="ToastDescription",Bs=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Bs.displayName=If;var Ws="ToastAction",Hs=s.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?p.jsx(Ks,{altText:n,asChild:!0,children:p.jsx(In,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ws}\`. Expected non-empty \`string\`.`),null)});Hs.displayName=Ws;var Vs="ToastClose",In=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=kf(Vs,n);return p.jsx(Ks,{asChild:!0,children:p.jsx(I.button,{type:"button",...o,ref:t,onClick:M(e.onClick,r.onClose)})})});In.displayName=Vs;var Ks=s.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return p.jsx(I.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function Us(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),jf(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",i=o.dataset.radixToastAnnounceExclude==="";if(!r)if(i){const a=o.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Us(o))}}),t}function it(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,i):r.dispatchEvent(i)}var fo=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),i=o>r;return t==="left"||t==="right"?i&&o>n:!i&&r>n};function Lf(e=()=>{}){const t=Y(e);ce(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function jf(e){return e.nodeType===e.ELEMENT_NODE}function Ff(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ut(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var $f=Ns,Bf=Ls,Wf=Fs,Hf=$s,Vf=Bs,Kf=Hs,Uf=In;const Gf="_toast_1ga0s_1",zf="_toastContent_1ga0s_12",Yf="_toastViewport_1ga0s_70",Xf="_toastTitle_1ga0s_89",qf="_toastDescription_1ga0s_95",Te={toast:Gf,toastContent:zf,toastViewport:Yf,toastTitle:Xf,toastDescription:qf},Zf=({...e})=>p.jsx($f,{...e}),Gs=k.forwardRef(({...e},t)=>p.jsx(Bf,{className:Te.toastViewport,ref:t,...e}));Gs.displayName="ToastViewport";const zs=k.forwardRef(({toastTitle:e,toastDescription:t,toastAction:n,...o},r)=>p.jsxs(Wf,{className:Te.toast,ref:r,...o,children:[p.jsxs("div",{className:Te.toastContent,children:[p.jsx(Hf,{className:Te.toastTitle,children:e}),t&&p.jsx(Vf,{className:Te.toastDescription,children:t})]}),n&&p.jsx(Kf,{className:Te.toastAction,asChild:!0,altText:"Toast action",children:n}),p.jsx(Uf,{asChild:!0,children:p.jsx(wt,{variant:"tertiary",iconOnly:!0,icon:"Close"})})]}));zs.displayName="Toast";var[Dt]=de("Tooltip",[Pt]),Nt=Pt(),Ys="TooltipProvider",Qf=700,on="tooltip.open",[Jf,Ln]=Dt(Ys),Xs=e=>{const{__scopeTooltip:t,delayDuration:n=Qf,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:i}=e,a=s.useRef(!0),c=s.useRef(!1),d=s.useRef(0);return s.useEffect(()=>{const l=d.current;return()=>window.clearTimeout(l)},[]),p.jsx(Jf,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(d.current),a.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>a.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(l=>{c.current=l},[]),disableHoverableContent:r,children:i})};Xs.displayName=Ys;var He="Tooltip",[ep,qe]=Dt(He),qs=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:i,disableHoverableContent:a,delayDuration:c}=e,d=Ln(He,e.__scopeTooltip),l=Nt(t),[u,f]=s.useState(null),h=we(),v=s.useRef(0),w=a??d.disableHoverableContent,m=c??d.delayDuration,g=s.useRef(!1),[x,y]=ke({prop:o,defaultProp:r??!1,onChange:R=>{R?(d.onOpen(),document.dispatchEvent(new CustomEvent(on))):d.onClose(),i?.(R)},caller:He}),b=s.useMemo(()=>x?g.current?"delayed-open":"instant-open":"closed",[x]),C=s.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,y(!0)},[y]),E=s.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),S=s.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,y(!0),v.current=0},m)},[m,y]);return s.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),p.jsx(Ur,{...l,children:p.jsx(ep,{scope:t,contentId:h,open:x,stateAttribute:b,trigger:u,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{d.isOpenDelayedRef.current?S():C()},[d.isOpenDelayedRef,S,C]),onTriggerLeave:s.useCallback(()=>{w?E():(window.clearTimeout(v.current),v.current=0)},[E,w]),onOpen:C,onClose:E,disableHoverableContent:w,children:n})})};qs.displayName=He;var rn="TooltipTrigger",Zs=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=qe(rn,n),i=Ln(rn,n),a=Nt(n),c=s.useRef(null),d=H(t,c,r.onTriggerChange),l=s.useRef(!1),u=s.useRef(!1),f=s.useCallback(()=>l.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(Gr,{asChild:!0,...a,children:p.jsx(I.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:d,onPointerMove:M(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:M(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:M(e.onPointerDown,()=>{r.open&&r.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:M(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:M(e.onBlur,r.onClose),onClick:M(e.onClick,r.onClose)})})});Zs.displayName=rn;var jn="TooltipPortal",[tp,np]=Dt(jn,{forceMount:void 0}),Qs=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,i=qe(jn,t);return p.jsx(tp,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||i.open,children:p.jsx(Ke,{asChild:!0,container:r,children:o})})})};Qs.displayName=jn;var Ae="TooltipContent",Js=s.forwardRef((e,t)=>{const n=np(Ae,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=e,a=qe(Ae,e.__scopeTooltip);return p.jsx(Z,{present:o||a.open,children:a.disableHoverableContent?p.jsx(ei,{side:r,...i,ref:t}):p.jsx(op,{side:r,...i,ref:t})})}),op=s.forwardRef((e,t)=>{const n=qe(Ae,e.__scopeTooltip),o=Ln(Ae,e.__scopeTooltip),r=s.useRef(null),i=H(t,r),[a,c]=s.useState(null),{trigger:d,onClose:l}=n,u=r.current,{onPointerInTransitChange:f}=o,h=s.useCallback(()=>{c(null),f(!1)},[f]),v=s.useCallback((w,m)=>{const g=w.currentTarget,x={x:w.clientX,y:w.clientY},y=ap(x,g.getBoundingClientRect()),b=cp(x,y),C=lp(m.getBoundingClientRect()),E=dp([...b,...C]);c(E),f(!0)},[f]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(d&&u){const w=g=>v(g,u),m=g=>v(g,d);return d.addEventListener("pointerleave",w),u.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",m)}}},[d,u,v,h]),s.useEffect(()=>{if(a){const w=m=>{const g=m.target,x={x:m.clientX,y:m.clientY},y=d?.contains(g)||u?.contains(g),b=!up(x,a);y?h():b&&(h(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,u,a,l,h]),p.jsx(ei,{...e,ref:i})}),[rp,sp]=Dt(He,{isInside:!1}),ip=Aa("TooltipContent"),ei=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:a,...c}=e,d=qe(Ae,n),l=Nt(n),{onClose:u}=d;return s.useEffect(()=>(document.addEventListener(on,u),()=>document.removeEventListener(on,u)),[u]),s.useEffect(()=>{if(d.trigger){const f=h=>{h.target?.contains(d.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[d.trigger,u]),p.jsx(Ve,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:p.jsxs(zr,{"data-state":d.stateAttribute,...l,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(ip,{children:o}),p.jsx(rp,{scope:n,isInside:!0,children:p.jsx(bf,{id:d.contentId,role:"tooltip",children:r||o})})]})})});Js.displayName=Ae;var ti="TooltipArrow",ni=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Nt(n);return sp(ti,n).isInside?null:p.jsx(Yr,{...r,...o,ref:t})});ni.displayName=ti;function ap(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function cp(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function lp(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function up(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const c=t[i],d=t[a],l=c.x,u=c.y,f=d.x,h=d.y;u>o!=h>o&&n<(f-l)*(o-u)/(h-u)+l&&(r=!r)}return r}function dp(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),fp(t)}function fp(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(r.y-a.y)>=(i.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(r.y-a.y)>=(i.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var pp=Xs,mp=qs,hp=Zs,vp=Qs,gp=Js,wp=ni;const xp="_tooltipContent_17t5h_1",yp="_tooltipArrow_17t5h_12",po={tooltipContent:xp,tooltipArrow:yp},bp=({...e})=>p.jsx(pp,{...e});function Cp({children:e,content:t,open:n,defaultOpen:o,onOpenChange:r,...i}){return t===void 0?p.jsx(p.Fragment,{children:e}):p.jsxs(mp,{open:n,defaultOpen:o,onOpenChange:a=>{r?.(a)},disableHoverableContent:!0,delayDuration:200,children:[p.jsx(hp,{asChild:!0,children:e}),p.jsx(vp,{children:p.jsxs(gp,{className:po.tooltipContent,...i,sideOffset:4,children:[t,p.jsx(wp,{className:po.tooltipArrow})]})})]})}exports.ArrowLeft=vo;exports.ArrowRight=go;exports.Button=wt;exports.Calendar=wo;exports.Check=an;exports.Checkbox=Ka;exports.ChevronDown=ma;exports.ChevronLeft=ha;exports.ChevronRight=va;exports.ChevronUp=ga;exports.Circle=xo;exports.Close=cn;exports.Coffee=yo;exports.Dialog=gl;exports.ExternalLink=bo;exports.Gear=Co;exports.Hammer=Eo;exports.Heart=Ro;exports.IconMap=ut;exports.Inbox=So;exports.Kebab=Po;exports.Lamp=To;exports.Lightning=Mo;exports.LogIn=_o;exports.LogOut=Ao;exports.Mail=ko;exports.Menu=Oo;exports.MenuButton=gf;exports.MenuButtonItem=wf;exports.NoMobile=Do;exports.Pencil=No;exports.Plus=Io;exports.Signpost=Lo;exports.Spinner=ln;exports.SunMoon=jo;exports.Toast=zs;exports.ToastProvider=Zf;exports.ToastViewport=Gs;exports.Tooltip=Cp;exports.TooltipProvider=bp;exports.createIcon=j;exports.dialogSizes=vl;exports.iconSizes=pa;
|