randmarcomps 1.39.0 → 1.40.0

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.
@@ -43,6 +43,8 @@ export declare const Dialog: {
43
43
  displayName: string | undefined;
44
44
  };
45
45
 
46
+ export declare const DialogClose: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React_2.RefAttributes<HTMLButtonElement>>;
47
+
46
48
  export declare const DialogContent: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
47
49
 
48
50
  export declare const DialogDescription: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React_2.RefAttributes<HTMLParagraphElement>, "ref"> & React_2.RefAttributes<HTMLParagraphElement>>;
@@ -7624,6 +7624,7 @@ export {
7624
7624
  af as AvatarFooter,
7625
7625
  it as Button,
7626
7626
  zo as Dialog,
7627
+ Er as DialogClose,
7627
7628
  Bo as DialogContent,
7628
7629
  Go as DialogDescription,
7629
7630
  Ho as DialogFooter,
@@ -1,4 +1,4 @@
1
- (function(T,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","react-router-dom"],u):(T=typeof globalThis<"u"?globalThis:T||self,u(T.randmarcomps={},T.jsxRuntime,T.React,T.ReactDOM,T["react-router-dom"]))})(this,function(T,u,X,An,rt){"use strict";function On(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const i=On(X),tr=On(An);var Fs=Object.defineProperty,$s=Object.defineProperties,zs=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,Mn=Object.prototype.hasOwnProperty,kn=Object.prototype.propertyIsEnumerable,Dn=(e,t,r)=>t in e?Fs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ws=(e,t)=>{for(var r in t||(t={}))Mn.call(t,r)&&Dn(e,r,t[r]);if(pt)for(var r of pt(t))kn.call(t,r)&&Dn(e,r,t[r]);return e},Bs=(e,t)=>$s(e,zs(t)),Vs=(e,t)=>{var r={};for(var n in e)Mn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pt)for(var n of pt(e))t.indexOf(n)<0&&kn.call(e,n)&&(r[n]=e[n]);return r};function Hs(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function js(e){let t=i.useRef();return i.useEffect(()=>{t.current=e}),t.current}var Gs=18,_n=40,Us=`${_n}px`,Ks=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Ys({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[o,a]=i.useState(!1),[s,l]=i.useState(!1),[c,d]=i.useState(!1),f=i.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&o&&s,[o,s,r]),h=i.useCallback(()=>{let v=e.current,g=t.current;if(!v||!g||c||r==="none")return;let b=v,p=b.getBoundingClientRect().left+b.offsetWidth,m=b.getBoundingClientRect().top+b.offsetHeight/2,y=p-Gs,w=m;document.querySelectorAll(Ks).length===0&&document.elementFromPoint(y,w)===v||(a(!0),d(!0))},[e,t,c,r]);return i.useEffect(()=>{let v=e.current;if(!v||r==="none")return;function g(){let p=window.innerWidth-v.getBoundingClientRect().right;l(p>=_n)}g();let b=setInterval(g,1e3);return()=>{clearInterval(b)}},[e,r]),i.useEffect(()=>{let v=n||document.activeElement===t.current;if(r==="none"||!v)return;let g=setTimeout(h,0),b=setTimeout(h,2e3),p=setTimeout(h,5e3),m=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(g),clearTimeout(b),clearTimeout(p),clearTimeout(m)}},[t,n,r,h]),{hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:Us}}var In=i.createContext({}),Ln=i.forwardRef((e,t)=>{var r=e,{value:n,onChange:o,maxLength:a,textAlign:s="left",pattern:l,placeholder:c,inputMode:d="numeric",onComplete:f,pushPasswordManagerStrategy:h="increase-width",pasteTransformer:v,containerClassName:g,noScriptCSSFallback:b=Xs,render:p,children:m}=r,y=Vs(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),w,x,E,C,S;let[N,$]=i.useState(typeof y.defaultValue=="string"?y.defaultValue:""),I=n??N,z=js(I),H=i.useCallback(L=>{o==null||o(L),$(L)},[o]),W=i.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),_=i.useRef(null),P=i.useRef(null),B=i.useRef({value:I,onChange:H,isIOS:typeof window<"u"&&((x=(w=window==null?void 0:window.CSS)==null?void 0:w.supports)==null?void 0:x.call(w,"-webkit-touch-callout","none"))}),M=i.useRef({prev:[(E=_.current)==null?void 0:E.selectionStart,(C=_.current)==null?void 0:C.selectionEnd,(S=_.current)==null?void 0:S.selectionDirection]});i.useImperativeHandle(t,()=>_.current,[]),i.useEffect(()=>{let L=_.current,F=P.current;if(!L||!F)return;B.current.value!==L.value&&B.current.onChange(L.value),M.current.prev=[L.selectionStart,L.selectionEnd,L.selectionDirection];function Q(){if(document.activeElement!==L){re(null),te(null);return}let G=L.selectionStart,le=L.selectionEnd,er=L.selectionDirection,he=L.maxLength,ze=L.value,Se=M.current.prev,Me=-1,ke=-1,We;if(ze.length!==0&&G!==null&&le!==null){let Fu=G===le,$u=G===ze.length&&ze.length<he;if(Fu&&!$u){let Be=G;if(Be===0)Me=0,ke=1,We="forward";else if(Be===he)Me=Be-1,ke=Be,We="backward";else if(he>1&&ze.length>1){let Pn=0;if(Se[0]!==null&&Se[1]!==null){We=Be<Se[1]?"backward":"forward";let zu=Se[0]===Se[1]&&Se[0]<he;We==="backward"&&!zu&&(Pn=-1)}Me=Pn+Be,ke=Pn+Be+1}}Me!==-1&&ke!==-1&&Me!==ke&&_.current.setSelectionRange(Me,ke,We)}let Ls=Me!==-1?Me:G,Rs=ke!==-1?ke:le,Ru=We??er;re(Ls),te(Rs),M.current.prev=[Ls,Rs,Ru]}if(document.addEventListener("selectionchange",Q,{capture:!0}),Q(),document.activeElement===L&&Y(!0),!document.getElementById("input-otp-style")){let G=document.createElement("style");if(G.id="input-otp-style",document.head.appendChild(G),G.sheet){let le="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";nt(G.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),nt(G.sheet,`[data-input-otp]:autofill { ${le} }`),nt(G.sheet,`[data-input-otp]:-webkit-autofill { ${le} }`),nt(G.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),nt(G.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ne=()=>{F&&F.style.setProperty("--root-height",`${L.clientHeight}px`)};ne();let oe=new ResizeObserver(ne);return oe.observe(L),()=>{document.removeEventListener("selectionchange",Q,{capture:!0}),oe.disconnect()}},[]);let[j,k]=i.useState(!1),[R,Y]=i.useState(!1),[Z,re]=i.useState(null),[J,te]=i.useState(null);i.useEffect(()=>{Hs(()=>{var L,F,Q,ne;(L=_.current)==null||L.dispatchEvent(new Event("input"));let oe=(F=_.current)==null?void 0:F.selectionStart,G=(Q=_.current)==null?void 0:Q.selectionEnd,le=(ne=_.current)==null?void 0:ne.selectionDirection;oe!==null&&G!==null&&(re(oe),te(G),M.current.prev=[oe,G,le])})},[I,R]),i.useEffect(()=>{z!==void 0&&I!==z&&z.length<a&&I.length===a&&(f==null||f(I))},[a,f,z,I]);let ie=Ys({containerRef:P,inputRef:_,pushPasswordManagerStrategy:h,isFocused:R}),Oe=i.useCallback(L=>{let F=L.currentTarget.value.slice(0,a);if(F.length>0&&W&&!W.test(F)){L.preventDefault();return}typeof z=="string"&&F.length<z.length&&document.dispatchEvent(new Event("selectionchange")),H(F)},[a,H,z,W]),ye=i.useCallback(()=>{var L;if(_.current){let F=Math.min(_.current.value.length,a-1),Q=_.current.value.length;(L=_.current)==null||L.setSelectionRange(F,Q),re(F),te(Q)}Y(!0)},[a]),ut=i.useCallback(L=>{var F,Q;let ne=_.current;if(!v&&(!B.current.isIOS||!L.clipboardData||!ne))return;let oe=L.clipboardData.getData("text/plain"),G=v?v(oe):oe;L.preventDefault();let le=(F=_.current)==null?void 0:F.selectionStart,er=(Q=_.current)==null?void 0:Q.selectionEnd,he=(le!==er?I.slice(0,le)+G+I.slice(er):I.slice(0,le)+G+I.slice(le)).slice(0,a);if(he.length>0&&W&&!W.test(he))return;ne.value=he,H(he);let ze=Math.min(he.length,a-1),Se=he.length;ne.setSelectionRange(ze,Se),re(ze),te(Se)},[a,H,W,I]),Qt=i.useMemo(()=>({position:"relative",cursor:y.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[y.disabled]),ft=i.useMemo(()=>({position:"absolute",inset:0,width:ie.willPushPWMBadge?`calc(100% + ${ie.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:ie.willPushPWMBadge?`inset(0 ${ie.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:s,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[ie.PWM_BADGE_SPACE_WIDTH,ie.willPushPWMBadge,s]),Jt=i.useMemo(()=>i.createElement("input",Bs(Ws({autoComplete:y.autoComplete||"one-time-code"},y),{"data-input-otp":!0,"data-input-otp-placeholder-shown":I.length===0||void 0,"data-input-otp-mss":Z,"data-input-otp-mse":J,inputMode:d,pattern:W==null?void 0:W.source,"aria-placeholder":c,style:ft,maxLength:a,value:I,ref:_,onPaste:L=>{var F;ut(L),(F=y.onPaste)==null||F.call(y,L)},onChange:Oe,onMouseOver:L=>{var F;k(!0),(F=y.onMouseOver)==null||F.call(y,L)},onMouseLeave:L=>{var F;k(!1),(F=y.onMouseLeave)==null||F.call(y,L)},onFocus:L=>{var F;ye(),(F=y.onFocus)==null||F.call(y,L)},onBlur:L=>{var F;Y(!1),(F=y.onBlur)==null||F.call(y,L)}})),[Oe,ye,ut,d,ft,a,J,Z,y,W==null?void 0:W.source,I]),tt=i.useMemo(()=>({slots:Array.from({length:a}).map((L,F)=>{var Q;let ne=R&&Z!==null&&J!==null&&(Z===J&&F===Z||F>=Z&&F<J),oe=I[F]!==void 0?I[F]:null,G=I[0]!==void 0?null:(Q=c==null?void 0:c[F])!=null?Q:null;return{char:oe,placeholderChar:G,isActive:ne,hasFakeCaret:ne&&oe===null}}),isFocused:R,isHovering:!y.disabled&&j}),[R,j,a,J,Z,y.disabled,I]),$e=i.useMemo(()=>p?p(tt):i.createElement(In.Provider,{value:tt},m),[m,tt,p]);return i.createElement(i.Fragment,null,b!==null&&i.createElement("noscript",null,i.createElement("style",null,b)),i.createElement("div",{ref:P,"data-input-otp-container":!0,style:Qt,className:g},$e,i.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Jt)))});Ln.displayName="Input";function nt(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var Xs=`
1
+ (function(T,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","react-router-dom"],u):(T=typeof globalThis<"u"?globalThis:T||self,u(T.randmarcomps={},T.jsxRuntime,T.React,T.ReactDOM,T["react-router-dom"]))})(this,function(T,u,X,On,rt){"use strict";function Mn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const i=Mn(X),tr=Mn(On);var Fs=Object.defineProperty,$s=Object.defineProperties,zs=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,kn=Object.prototype.hasOwnProperty,Dn=Object.prototype.propertyIsEnumerable,_n=(e,t,r)=>t in e?Fs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ws=(e,t)=>{for(var r in t||(t={}))kn.call(t,r)&&_n(e,r,t[r]);if(pt)for(var r of pt(t))Dn.call(t,r)&&_n(e,r,t[r]);return e},Bs=(e,t)=>$s(e,zs(t)),Vs=(e,t)=>{var r={};for(var n in e)kn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pt)for(var n of pt(e))t.indexOf(n)<0&&Dn.call(e,n)&&(r[n]=e[n]);return r};function Hs(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function js(e){let t=i.useRef();return i.useEffect(()=>{t.current=e}),t.current}var Gs=18,In=40,Us=`${In}px`,Ks=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Ys({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[o,a]=i.useState(!1),[s,l]=i.useState(!1),[c,d]=i.useState(!1),f=i.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&o&&s,[o,s,r]),h=i.useCallback(()=>{let v=e.current,g=t.current;if(!v||!g||c||r==="none")return;let b=v,p=b.getBoundingClientRect().left+b.offsetWidth,m=b.getBoundingClientRect().top+b.offsetHeight/2,y=p-Gs,w=m;document.querySelectorAll(Ks).length===0&&document.elementFromPoint(y,w)===v||(a(!0),d(!0))},[e,t,c,r]);return i.useEffect(()=>{let v=e.current;if(!v||r==="none")return;function g(){let p=window.innerWidth-v.getBoundingClientRect().right;l(p>=In)}g();let b=setInterval(g,1e3);return()=>{clearInterval(b)}},[e,r]),i.useEffect(()=>{let v=n||document.activeElement===t.current;if(r==="none"||!v)return;let g=setTimeout(h,0),b=setTimeout(h,2e3),p=setTimeout(h,5e3),m=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(g),clearTimeout(b),clearTimeout(p),clearTimeout(m)}},[t,n,r,h]),{hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:Us}}var Ln=i.createContext({}),Rn=i.forwardRef((e,t)=>{var r=e,{value:n,onChange:o,maxLength:a,textAlign:s="left",pattern:l,placeholder:c,inputMode:d="numeric",onComplete:f,pushPasswordManagerStrategy:h="increase-width",pasteTransformer:v,containerClassName:g,noScriptCSSFallback:b=Xs,render:p,children:m}=r,y=Vs(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),w,x,E,C,S;let[N,$]=i.useState(typeof y.defaultValue=="string"?y.defaultValue:""),I=n??N,z=js(I),H=i.useCallback(L=>{o==null||o(L),$(L)},[o]),W=i.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),_=i.useRef(null),P=i.useRef(null),B=i.useRef({value:I,onChange:H,isIOS:typeof window<"u"&&((x=(w=window==null?void 0:window.CSS)==null?void 0:w.supports)==null?void 0:x.call(w,"-webkit-touch-callout","none"))}),M=i.useRef({prev:[(E=_.current)==null?void 0:E.selectionStart,(C=_.current)==null?void 0:C.selectionEnd,(S=_.current)==null?void 0:S.selectionDirection]});i.useImperativeHandle(t,()=>_.current,[]),i.useEffect(()=>{let L=_.current,F=P.current;if(!L||!F)return;B.current.value!==L.value&&B.current.onChange(L.value),M.current.prev=[L.selectionStart,L.selectionEnd,L.selectionDirection];function Q(){if(document.activeElement!==L){re(null),te(null);return}let G=L.selectionStart,le=L.selectionEnd,er=L.selectionDirection,he=L.maxLength,ze=L.value,Se=M.current.prev,Me=-1,ke=-1,We;if(ze.length!==0&&G!==null&&le!==null){let Fu=G===le,$u=G===ze.length&&ze.length<he;if(Fu&&!$u){let Be=G;if(Be===0)Me=0,ke=1,We="forward";else if(Be===he)Me=Be-1,ke=Be,We="backward";else if(he>1&&ze.length>1){let An=0;if(Se[0]!==null&&Se[1]!==null){We=Be<Se[1]?"backward":"forward";let zu=Se[0]===Se[1]&&Se[0]<he;We==="backward"&&!zu&&(An=-1)}Me=An+Be,ke=An+Be+1}}Me!==-1&&ke!==-1&&Me!==ke&&_.current.setSelectionRange(Me,ke,We)}let Ls=Me!==-1?Me:G,Rs=ke!==-1?ke:le,Ru=We??er;re(Ls),te(Rs),M.current.prev=[Ls,Rs,Ru]}if(document.addEventListener("selectionchange",Q,{capture:!0}),Q(),document.activeElement===L&&Y(!0),!document.getElementById("input-otp-style")){let G=document.createElement("style");if(G.id="input-otp-style",document.head.appendChild(G),G.sheet){let le="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";nt(G.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),nt(G.sheet,`[data-input-otp]:autofill { ${le} }`),nt(G.sheet,`[data-input-otp]:-webkit-autofill { ${le} }`),nt(G.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),nt(G.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ne=()=>{F&&F.style.setProperty("--root-height",`${L.clientHeight}px`)};ne();let oe=new ResizeObserver(ne);return oe.observe(L),()=>{document.removeEventListener("selectionchange",Q,{capture:!0}),oe.disconnect()}},[]);let[j,k]=i.useState(!1),[R,Y]=i.useState(!1),[Z,re]=i.useState(null),[J,te]=i.useState(null);i.useEffect(()=>{Hs(()=>{var L,F,Q,ne;(L=_.current)==null||L.dispatchEvent(new Event("input"));let oe=(F=_.current)==null?void 0:F.selectionStart,G=(Q=_.current)==null?void 0:Q.selectionEnd,le=(ne=_.current)==null?void 0:ne.selectionDirection;oe!==null&&G!==null&&(re(oe),te(G),M.current.prev=[oe,G,le])})},[I,R]),i.useEffect(()=>{z!==void 0&&I!==z&&z.length<a&&I.length===a&&(f==null||f(I))},[a,f,z,I]);let ie=Ys({containerRef:P,inputRef:_,pushPasswordManagerStrategy:h,isFocused:R}),Oe=i.useCallback(L=>{let F=L.currentTarget.value.slice(0,a);if(F.length>0&&W&&!W.test(F)){L.preventDefault();return}typeof z=="string"&&F.length<z.length&&document.dispatchEvent(new Event("selectionchange")),H(F)},[a,H,z,W]),ye=i.useCallback(()=>{var L;if(_.current){let F=Math.min(_.current.value.length,a-1),Q=_.current.value.length;(L=_.current)==null||L.setSelectionRange(F,Q),re(F),te(Q)}Y(!0)},[a]),ut=i.useCallback(L=>{var F,Q;let ne=_.current;if(!v&&(!B.current.isIOS||!L.clipboardData||!ne))return;let oe=L.clipboardData.getData("text/plain"),G=v?v(oe):oe;L.preventDefault();let le=(F=_.current)==null?void 0:F.selectionStart,er=(Q=_.current)==null?void 0:Q.selectionEnd,he=(le!==er?I.slice(0,le)+G+I.slice(er):I.slice(0,le)+G+I.slice(le)).slice(0,a);if(he.length>0&&W&&!W.test(he))return;ne.value=he,H(he);let ze=Math.min(he.length,a-1),Se=he.length;ne.setSelectionRange(ze,Se),re(ze),te(Se)},[a,H,W,I]),Qt=i.useMemo(()=>({position:"relative",cursor:y.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[y.disabled]),ft=i.useMemo(()=>({position:"absolute",inset:0,width:ie.willPushPWMBadge?`calc(100% + ${ie.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:ie.willPushPWMBadge?`inset(0 ${ie.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:s,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[ie.PWM_BADGE_SPACE_WIDTH,ie.willPushPWMBadge,s]),Jt=i.useMemo(()=>i.createElement("input",Bs(Ws({autoComplete:y.autoComplete||"one-time-code"},y),{"data-input-otp":!0,"data-input-otp-placeholder-shown":I.length===0||void 0,"data-input-otp-mss":Z,"data-input-otp-mse":J,inputMode:d,pattern:W==null?void 0:W.source,"aria-placeholder":c,style:ft,maxLength:a,value:I,ref:_,onPaste:L=>{var F;ut(L),(F=y.onPaste)==null||F.call(y,L)},onChange:Oe,onMouseOver:L=>{var F;k(!0),(F=y.onMouseOver)==null||F.call(y,L)},onMouseLeave:L=>{var F;k(!1),(F=y.onMouseLeave)==null||F.call(y,L)},onFocus:L=>{var F;ye(),(F=y.onFocus)==null||F.call(y,L)},onBlur:L=>{var F;Y(!1),(F=y.onBlur)==null||F.call(y,L)}})),[Oe,ye,ut,d,ft,a,J,Z,y,W==null?void 0:W.source,I]),tt=i.useMemo(()=>({slots:Array.from({length:a}).map((L,F)=>{var Q;let ne=R&&Z!==null&&J!==null&&(Z===J&&F===Z||F>=Z&&F<J),oe=I[F]!==void 0?I[F]:null,G=I[0]!==void 0?null:(Q=c==null?void 0:c[F])!=null?Q:null;return{char:oe,placeholderChar:G,isActive:ne,hasFakeCaret:ne&&oe===null}}),isFocused:R,isHovering:!y.disabled&&j}),[R,j,a,J,Z,y.disabled,I]),$e=i.useMemo(()=>p?p(tt):i.createElement(Ln.Provider,{value:tt},m),[m,tt,p]);return i.createElement(i.Fragment,null,b!==null&&i.createElement("noscript",null,i.createElement("style",null,b)),i.createElement("div",{ref:P,"data-input-otp-container":!0,style:Qt,className:g},$e,i.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Jt)))});Rn.displayName="Input";function nt(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var Xs=`
2
2
  [data-input-otp] {
3
3
  --nojs-bg: white !important;
4
4
  --nojs-fg: black !important;
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * This source code is licensed under the ISC license.
24
24
  * See the LICENSE file in the root directory of this source tree.
25
- */const qs=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rn=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
25
+ */const qs=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fn=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
26
26
  * @license lucide-react v0.479.0 - ISC
27
27
  *
28
28
  * This source code is licensed under the ISC license.
@@ -32,12 +32,12 @@
32
32
  *
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
- */const Qs=X.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:s,...l},c)=>X.createElement("svg",{ref:c,...Zs,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Rn("lucide",o),...l},[...s.map(([d,f])=>X.createElement(d,f)),...Array.isArray(a)?a:[a]]));/**
35
+ */const Qs=X.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:s,...l},c)=>X.createElement("svg",{ref:c,...Zs,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Fn("lucide",o),...l},[...s.map(([d,f])=>X.createElement(d,f)),...Array.isArray(a)?a:[a]]));/**
36
36
  * @license lucide-react v0.479.0 - ISC
37
37
  *
38
38
  * This source code is licensed under the ISC license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
- */const De=(e,t)=>{const r=X.forwardRef(({className:n,...o},a)=>X.createElement(Qs,{ref:a,iconNode:t,className:Rn(`lucide-${qs(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
40
+ */const De=(e,t)=>{const r=X.forwardRef(({className:n,...o},a)=>X.createElement(Qs,{ref:a,iconNode:t,className:Fn(`lucide-${qs(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
41
41
  * @license lucide-react v0.479.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
@@ -72,7 +72,7 @@
72
72
  *
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
- */const rr=De("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Fn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Fn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function $n(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Fn(e))&&(n&&(n+=" "),n+=t);return n}const nr="-",ai=e=>{const t=ii(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const l=s.split(nr);return l[0]===""&&l.length!==1&&l.shift(),zn(l,t)||si(s)},getConflictingClassGroupIds:(s,l)=>{const c=r[s]||[];return l&&n[s]?[...c,...n[s]]:c}}},zn=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?zn(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(nr);return(s=t.validators.find(({validator:l})=>l(a)))==null?void 0:s.classGroupId},Wn=/^\[(.+)\]$/,si=e=>{if(Wn.test(e)){const t=Wn.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ii=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)or(r[o],n,o,t);return n},or=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Bn(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(li(o)){or(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,s])=>{or(s,Bn(t,a),r,n)})})},Bn=(e,t)=>{let r=e;return t.split(nr).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},li=e=>e.isThemeGetter,ci=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(a,s)=>{r.set(a,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set(a,s){r.has(a)?r.set(a,s):o(a,s)}}},ar="!",sr=":",di=sr.length,ui=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const a=[];let s=0,l=0,c=0,d;for(let b=0;b<o.length;b++){let p=o[b];if(s===0&&l===0){if(p===sr){a.push(o.slice(c,b)),c=b+di;continue}if(p==="/"){d=b;continue}}p==="["?s++:p==="]"?s--:p==="("?l++:p===")"&&l--}const f=a.length===0?o:o.substring(c),h=fi(f),v=h!==f,g=d&&d>c?d-c:void 0;return{modifiers:a,hasImportantModifier:v,baseClassName:h,maybePostfixModifierPosition:g}};if(t){const o=t+sr,a=n;n=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=a=>r({className:a,parseClassName:o})}return n},fi=e=>e.endsWith(ar)?e.substring(0,e.length-1):e.startsWith(ar)?e.substring(1):e,pi=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let a=[];return n.forEach(s=>{s[0]==="["||t[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},hi=e=>({cache:ci(e.cacheSize),parseClassName:ui(e),sortModifiers:pi(e),...ai(e)}),gi=/\s+/,mi=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],l=e.trim().split(gi);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:h,modifiers:v,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:p}=r(f);if(h){c=f+(c.length>0?" "+c:c);continue}let m=!!p,y=n(m?b.substring(0,p):b);if(!y){if(!m){c=f+(c.length>0?" "+c:c);continue}if(y=n(b),!y){c=f+(c.length>0?" "+c:c);continue}m=!1}const w=a(v).join(":"),x=g?w+ar:w,E=x+y;if(s.includes(E))continue;s.push(E);const C=o(y,m);for(let S=0;S<C.length;++S){const N=C[S];s.push(x+N)}c=f+(c.length>0?" "+c:c)}return c};function vi(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Vn(t))&&(n&&(n+=" "),n+=r);return n}const Vn=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Vn(e[n]))&&(r&&(r+=" "),r+=t);return r};function bi(e,...t){let r,n,o,a=s;function s(c){const d=t.reduce((f,h)=>h(f),e());return r=hi(d),n=r.cache.get,o=r.cache.set,a=l,l(c)}function l(c){const d=n(c);if(d)return d;const f=mi(c,r);return o(c,f),f}return function(){return a(vi.apply(null,arguments))}}const q=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Hn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yi=/^\d+\/\d+$/,wi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Si=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ei=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ci=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ve=e=>yi.test(e),V=e=>!!e&&!Number.isNaN(Number(e)),_e=e=>!!e&&Number.isInteger(Number(e)),Gn=e=>e.endsWith("%")&&V(e.slice(0,-1)),Ee=e=>wi.test(e),Ti=()=>!0,Ni=e=>xi.test(e)&&!Si.test(e),ir=()=>!1,Pi=e=>Ei.test(e),Ai=e=>Ci.test(e),Oi=e=>!A(e)&&!O(e),Mi=e=>He(e,Yn,ir),A=e=>Hn.test(e),Ie=e=>He(e,Xn,Ni),lr=e=>He(e,Bi,V),ki=e=>He(e,Un,ir),Di=e=>He(e,Kn,Ai),_i=e=>He(e,ir,Pi),O=e=>jn.test(e),ht=e=>je(e,Xn),Ii=e=>je(e,Vi),Li=e=>je(e,Un),Ri=e=>je(e,Yn),Fi=e=>je(e,Kn),$i=e=>je(e,Hi,!0),He=(e,t,r)=>{const n=Hn.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},je=(e,t,r=!1)=>{const n=jn.exec(e);return n?n[1]?t(n[1]):r:!1},Un=e=>e==="position",zi=new Set(["image","url"]),Kn=e=>zi.has(e),Wi=new Set(["length","size","percentage"]),Yn=e=>Wi.has(e),Xn=e=>e==="length",Bi=e=>e==="number",Vi=e=>e==="family-name",Hi=e=>e==="shadow",ji=bi(()=>{const e=q("color"),t=q("font"),r=q("text"),n=q("font-weight"),o=q("tracking"),a=q("leading"),s=q("breakpoint"),l=q("container"),c=q("spacing"),d=q("radius"),f=q("shadow"),h=q("inset-shadow"),v=q("drop-shadow"),g=q("blur"),b=q("perspective"),p=q("aspect"),m=q("ease"),y=q("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],E=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],S=()=>[O,A,c],N=()=>[Ve,"full","auto",...S()],$=()=>[_e,"none","subgrid",O,A],I=()=>["auto",{span:["full",_e,O,A]},O,A],z=()=>[_e,"auto",O,A],H=()=>["auto","min","max","fr",O,A],W=()=>["start","end","center","between","around","evenly","stretch","baseline"],_=()=>["start","end","center","stretch"],P=()=>["auto",...S()],B=()=>[Ve,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],M=()=>[e,O,A],j=()=>[Gn,Ie],k=()=>["","none","full",d,O,A],R=()=>["",V,ht,Ie],Y=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>["","none",g,O,A],J=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",O,A],te=()=>["none",V,O,A],ie=()=>["none",V,O,A],Oe=()=>[V,O,A],ye=()=>[Ve,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ee],breakpoint:[Ee],color:[Ti],container:[Ee],"drop-shadow":[Ee],ease:["in","out","in-out"],font:[Oi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ee],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ee],shadow:[Ee],spacing:["px",V],text:[Ee],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ve,A,O,p]}],container:["container"],columns:[{columns:[V,A,O,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...x(),A,O]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[_e,"auto",O,A]}],basis:[{basis:[Ve,"full","auto",l,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[V,Ve,"auto","initial","none",A]}],grow:[{grow:["",V,O,A]}],shrink:[{shrink:["",V,O,A]}],order:[{order:[_e,"first","last","none",O,A]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[..._(),"baseline"]}],"align-self":[{self:["auto",..._(),"baseline"]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[l,"screen",...B()]}],"min-w":[{"min-w":[l,"screen","none",...B()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...B()]}],h:[{h:["screen",...B()]}],"min-h":[{"min-h":["screen","none",...B()]}],"max-h":[{"max-h":["screen",...B()]}],"font-size":[{text:["base",r,ht,Ie]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,O,lr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gn,A]}],"font-family":[{font:[Ii,A,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,O,A]}],"line-clamp":[{"line-clamp":[V,"none",O,lr]}],leading:[{leading:[a,...S()]}],"list-image":[{"list-image":["none",O,A]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[V,"from-font","auto",O,Ie]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[V,"auto",O,A]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,A]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O,A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),Li,ki]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Ri,Mi]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_e,O,A],radial:["",O,A],conic:[_e,O,A]},Fi,Di]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:k()}],"rounded-s":[{"rounded-s":k()}],"rounded-e":[{"rounded-e":k()}],"rounded-t":[{"rounded-t":k()}],"rounded-r":[{"rounded-r":k()}],"rounded-b":[{"rounded-b":k()}],"rounded-l":[{"rounded-l":k()}],"rounded-ss":[{"rounded-ss":k()}],"rounded-se":[{"rounded-se":k()}],"rounded-ee":[{"rounded-ee":k()}],"rounded-es":[{"rounded-es":k()}],"rounded-tl":[{"rounded-tl":k()}],"rounded-tr":[{"rounded-tr":k()}],"rounded-br":[{"rounded-br":k()}],"rounded-bl":[{"rounded-bl":k()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":R()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[V,O,A]}],"outline-w":[{outline:["",V,ht,Ie]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",f,$i,_i]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",O,A,h]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[V,Ie]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":M()}],opacity:[{opacity:[V,O,A]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none",O,A]}],blur:[{blur:re()}],brightness:[{brightness:[V,O,A]}],contrast:[{contrast:[V,O,A]}],"drop-shadow":[{"drop-shadow":["","none",v,O,A]}],grayscale:[{grayscale:["",V,O,A]}],"hue-rotate":[{"hue-rotate":[V,O,A]}],invert:[{invert:["",V,O,A]}],saturate:[{saturate:[V,O,A]}],sepia:[{sepia:["",V,O,A]}],"backdrop-filter":[{"backdrop-filter":["","none",O,A]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[V,O,A]}],"backdrop-contrast":[{"backdrop-contrast":[V,O,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",V,O,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V,O,A]}],"backdrop-invert":[{"backdrop-invert":["",V,O,A]}],"backdrop-opacity":[{"backdrop-opacity":[V,O,A]}],"backdrop-saturate":[{"backdrop-saturate":[V,O,A]}],"backdrop-sepia":[{"backdrop-sepia":["",V,O,A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,A]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[V,"initial",O,A]}],ease:[{ease:["linear","initial",m,O,A]}],delay:[{delay:[V,O,A]}],animate:[{animate:["none",y,O,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,O,A]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:Oe()}],"skew-x":[{"skew-x":Oe()}],"skew-y":[{"skew-y":Oe()}],transform:[{transform:[O,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O,A]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",O,A]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[V,ht,Ie,lr]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}});function D(...e){return ji($n(e))}function Gi({className:e,containerClassName:t,...r}){return u.jsx(Ln,{"data-slot":"input-otp",containerClassName:D("flex items-center gap-2 has-disabled:opacity-50",t),className:D("disabled:cursor-not-allowed",e),...r})}function Ui({className:e,...t}){return u.jsx("div",{"data-slot":"input-otp-group",className:D("flex items-center",e),...t})}function Ki({index:e,className:t,...r}){const n=i.useContext(In),{char:o,hasFakeCaret:a,isActive:s}=(n==null?void 0:n.slots[e])??{};return u.jsxs("div",{"data-slot":"input-otp-slot","data-active":s,className:D("border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...r,children:[o,a&&u.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:u.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function Yi({...e}){return u.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:u.jsx(ti,{})})}function U(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function qn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zn(...e){return t=>{let r=!1;const n=e.map(o=>{const a=qn(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():qn(e[o],null)}}}}function ee(...e){return i.useCallback(Zn(...e),e)}function Xi(e,t){const r=i.createContext(t),n=a=>{const{children:s,...l}=a,c=i.useMemo(()=>l,Object.values(l));return u.jsx(r.Provider,{value:c,children:s})};n.displayName=e+"Provider";function o(a){const s=i.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function ot(e,t=[]){let r=[];function n(a,s){const l=i.createContext(s),c=r.length;r=[...r,s];const d=h=>{var y;const{scope:v,children:g,...b}=h,p=((y=v==null?void 0:v[e])==null?void 0:y[c])||l,m=i.useMemo(()=>b,Object.values(b));return u.jsx(p.Provider,{value:m,children:g})};d.displayName=a+"Provider";function f(h,v){var p;const g=((p=v==null?void 0:v[e])==null?void 0:p[c])||l,b=i.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=r.map(s=>i.createContext(s));return function(l){const c=(l==null?void 0:l[e])||a;return i.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[n,qi(o,...t)]}function qi(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((l,{useScope:c,scopeName:d})=>{const h=c(a)[`__scope${d}`];return{...l,...h}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var Ce=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},Zi=i.useId||(()=>{}),Qi=0;function gt(e){const[t,r]=i.useState(Zi());return Ce(()=>{r(n=>n??String(Qi++))},[e]),e||(t?`radix-${t}`:"")}function ce(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function cr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Ji({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,l=ce(r),c=i.useCallback(d=>{if(a){const h=typeof d=="function"?d(e):d;h!==e&&l(h)}else o(d)},[a,e,o,l]);return[s,c]}function Ji({defaultProp:e,onChange:t}){const r=i.useState(e),[n]=r,o=i.useRef(n),a=ce(t);return i.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}var de=i.forwardRef((e,t)=>{const{children:r,...n}=e,o=i.Children.toArray(r),a=o.find(el);if(a){const s=a.props.children,l=o.map(c=>c===a?i.Children.count(s)>1?i.Children.only(null):i.isValidElement(s)?s.props.children:null:c);return u.jsx(dr,{...n,ref:t,children:i.isValidElement(s)?i.cloneElement(s,void 0,l):null})}return u.jsx(dr,{...n,ref:t,children:r})});de.displayName="Slot";var dr=i.forwardRef((e,t)=>{const{children:r,...n}=e;if(i.isValidElement(r)){const o=rl(r),a=tl(n,r.props);return r.type!==i.Fragment&&(a.ref=t?Zn(t,o):o),i.cloneElement(r,a)}return i.Children.count(r)>1?i.Children.only(null):null});dr.displayName="SlotClone";var Qn=({children:e})=>u.jsx(u.Fragment,{children:e});function el(e){return i.isValidElement(e)&&e.type===Qn}function tl(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{a(...l),o(...l)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function rl(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var nl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],K=nl.reduce((e,t)=>{const r=i.forwardRef((n,o)=>{const{asChild:a,...s}=n,l=a?de:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Jn(e,t){e&&tr.flushSync(()=>e.dispatchEvent(t))}function ol(e,t=globalThis==null?void 0:globalThis.document){const r=ce(e);i.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var al="DismissableLayer",ur="dismissableLayer.update",sl="dismissableLayer.pointerDownOutside",il="dismissableLayer.focusOutside",eo,to=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mt=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,d=i.useContext(to),[f,h]=i.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=i.useState({}),b=ee(t,N=>h(N)),p=Array.from(d.layers),[m]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(m),w=f?p.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,E=w>=y,C=cl(N=>{const $=N.target,I=[...d.branches].some(z=>z.contains($));!E||I||(o==null||o(N),s==null||s(N),N.defaultPrevented||l==null||l())},v),S=dl(N=>{const $=N.target;[...d.branches].some(z=>z.contains($))||(a==null||a(N),s==null||s(N),N.defaultPrevented||l==null||l())},v);return ol(N=>{w===d.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},v),i.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(eo=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),no(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=eo)}},[f,v,r,d]),i.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),no())},[f,d]),i.useEffect(()=>{const N=()=>g({});return document.addEventListener(ur,N),()=>document.removeEventListener(ur,N)},[]),u.jsx(K.div,{...c,ref:b,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,S.onFocusCapture),onBlurCapture:U(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,C.onPointerDownCapture)})});mt.displayName=al;var ll="DismissableLayerBranch",ro=i.forwardRef((e,t)=>{const r=i.useContext(to),n=i.useRef(null),o=ee(t,n);return i.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),u.jsx(K.div,{...e,ref:o})});ro.displayName=ll;function cl(e,t=globalThis==null?void 0:globalThis.document){const r=ce(e),n=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let c=function(){oo(sl,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function dl(e,t=globalThis==null?void 0:globalThis.document){const r=ce(e),n=i.useRef(!1);return i.useEffect(()=>{const o=a=>{a.target&&!n.current&&oo(il,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function no(){const e=new CustomEvent(ur);document.dispatchEvent(e)}function oo(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Jn(o,a):o.dispatchEvent(a)}var ul=mt,fl=ro,fr="focusScope.autoFocusOnMount",pr="focusScope.autoFocusOnUnmount",ao={bubbles:!1,cancelable:!0},pl="FocusScope",so=i.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[l,c]=i.useState(null),d=ce(o),f=ce(a),h=i.useRef(null),v=ee(t,p=>c(p)),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(n){let p=function(x){if(g.paused||!l)return;const E=x.target;l.contains(E)?h.current=E:Te(h.current,{select:!0})},m=function(x){if(g.paused||!l)return;const E=x.relatedTarget;E!==null&&(l.contains(E)||Te(h.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&Te(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",m);const w=new MutationObserver(y);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",m),w.disconnect()}}},[n,l,g.paused]),i.useEffect(()=>{if(l){co.add(g);const p=document.activeElement;if(!l.contains(p)){const y=new CustomEvent(fr,ao);l.addEventListener(fr,d),l.dispatchEvent(y),y.defaultPrevented||(hl(yl(io(l)),{select:!0}),document.activeElement===p&&Te(l))}return()=>{l.removeEventListener(fr,d),setTimeout(()=>{const y=new CustomEvent(pr,ao);l.addEventListener(pr,f),l.dispatchEvent(y),y.defaultPrevented||Te(p??document.body,{select:!0}),l.removeEventListener(pr,f),co.remove(g)},0)}}},[l,d,f,g]);const b=i.useCallback(p=>{if(!r&&!n||g.paused)return;const m=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(m&&y){const w=p.currentTarget,[x,E]=gl(w);x&&E?!p.shiftKey&&y===E?(p.preventDefault(),r&&Te(x,{select:!0})):p.shiftKey&&y===x&&(p.preventDefault(),r&&Te(E,{select:!0})):y===w&&p.preventDefault()}},[r,n,g.paused]);return u.jsx(K.div,{tabIndex:-1,...s,ref:v,onKeyDown:b})});so.displayName=pl;function hl(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Te(n,{select:t}),document.activeElement!==r)return}function gl(e){const t=io(e),r=lo(t,e),n=lo(t.reverse(),e);return[r,n]}function io(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function lo(e,t){for(const r of e)if(!ml(r,{upTo:t}))return r}function ml(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 vl(e){return e instanceof HTMLInputElement&&"select"in e}function Te(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&vl(e)&&t&&e.select()}}var co=bl();function bl(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=uo(e,t),e.unshift(t)},remove(t){var r;e=uo(e,t),(r=e[0])==null||r.resume()}}}function uo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function yl(e){return e.filter(t=>t.tagName!=="A")}var wl="Portal",vt=i.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=i.useState(!1);Ce(()=>a(!0),[]);const s=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?An.createPortal(u.jsx(K.div,{...n,ref:t}),s):null});vt.displayName=wl;function xl(e,t){return i.useReducer((r,n)=>t[r][n]??r,e)}var Le=e=>{const{present:t,children:r}=e,n=Sl(t),o=typeof r=="function"?r({present:n.isPresent}):i.Children.only(r),a=ee(n.ref,El(o));return typeof r=="function"||n.isPresent?i.cloneElement(o,{ref:a}):null};Le.displayName="Presence";function Sl(e){const[t,r]=i.useState(),n=i.useRef({}),o=i.useRef(e),a=i.useRef("none"),s=e?"mounted":"unmounted",[l,c]=xl(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const d=bt(n.current);a.current=l==="mounted"?d:"none"},[l]),Ce(()=>{const d=n.current,f=o.current;if(f!==e){const v=a.current,g=bt(d);e?c("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&v!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ce(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=g=>{const p=bt(n.current).includes(g.animationName);if(g.target===t&&p&&(c("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},v=g=>{g.target===t&&(a.current=bt(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function bt(e){return(e==null?void 0:e.animationName)||"none"}function El(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var hr=0;function Cl(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??fo()),document.body.insertAdjacentElement("beforeend",e[1]??fo()),hr++,()=>{hr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),hr--}},[])}function fo(){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 ge=function(){return ge=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ge.apply(this,arguments)};function po(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Tl(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var yt="right-scroll-bar-position",wt="width-before-scroll-bar",Nl="with-scroll-bars-hidden",Pl="--removed-body-scroll-bar-size";function gr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Al(e,t){var r=X.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Ol=typeof window<"u"?i.useLayoutEffect:i.useEffect,ho=new WeakMap;function Ml(e,t){var r=Al(null,function(n){return e.forEach(function(o){return gr(o,n)})});return Ol(function(){var n=ho.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(l){a.has(l)||gr(l,null)}),a.forEach(function(l){o.has(l)||gr(l,s)})}ho.set(r,e)},[e]),r}function kl(e){return e}function Dl(e,t){t===void 0&&(t=kl);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(l){return l!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var l=r;r=[],l.forEach(a),s=r}var c=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),r={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),r}}}};return o}function _l(e){e===void 0&&(e={});var t=Dl(null);return t.options=ge({async:!0,ssr:!1},e),t}var go=function(e){var t=e.sideCar,r=po(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return i.createElement(n,ge({},r))};go.isSideCarExport=!0;function Il(e,t){return e.useMedium(t),go}var mo=_l(),mr=function(){},xt=i.forwardRef(function(e,t){var r=i.useRef(null),n=i.useState({onScrollCapture:mr,onWheelCapture:mr,onTouchMoveCapture:mr}),o=n[0],a=n[1],s=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,f=e.enabled,h=e.shards,v=e.sideCar,g=e.noIsolation,b=e.inert,p=e.allowPinchZoom,m=e.as,y=m===void 0?"div":m,w=e.gapMode,x=po(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,C=Ml([r,t]),S=ge(ge({},x),o);return i.createElement(i.Fragment,null,f&&i.createElement(E,{sideCar:mo,removeScrollBar:d,shards:h,noIsolation:g,inert:b,setCallbacks:a,allowPinchZoom:!!p,lockRef:r,gapMode:w}),s?i.cloneElement(i.Children.only(l),ge(ge({},S),{ref:C})):i.createElement(y,ge({},S,{className:c,ref:C}),l))});xt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},xt.classNames={fullWidth:wt,zeroRight:yt};var Ll=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ll();return t&&e.setAttribute("nonce",t),e}function Fl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $l(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var zl=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Rl())&&(Fl(t,r),$l(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wl=function(){var e=zl();return function(t,r){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},vo=function(){var e=Wl(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Bl={left:0,top:0,right:0,gap:0},vr=function(e){return parseInt(e||"",10)||0},Vl=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[vr(r),vr(n),vr(o)]},Hl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Bl;var t=Vl(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},jl=vo(),Ge="data-scroll-locked",Gl=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,l=e.gap;return r===void 0&&(r="margin"),`
75
+ */const rr=De("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function $n(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=$n(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function zn(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=$n(e))&&(n&&(n+=" "),n+=t);return n}const nr="-",ai=e=>{const t=ii(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const l=s.split(nr);return l[0]===""&&l.length!==1&&l.shift(),Wn(l,t)||si(s)},getConflictingClassGroupIds:(s,l)=>{const c=r[s]||[];return l&&n[s]?[...c,...n[s]]:c}}},Wn=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Wn(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(nr);return(s=t.validators.find(({validator:l})=>l(a)))==null?void 0:s.classGroupId},Bn=/^\[(.+)\]$/,si=e=>{if(Bn.test(e)){const t=Bn.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ii=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)or(r[o],n,o,t);return n},or=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Vn(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(li(o)){or(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,s])=>{or(s,Vn(t,a),r,n)})})},Vn=(e,t)=>{let r=e;return t.split(nr).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},li=e=>e.isThemeGetter,ci=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(a,s)=>{r.set(a,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set(a,s){r.has(a)?r.set(a,s):o(a,s)}}},ar="!",sr=":",di=sr.length,ui=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const a=[];let s=0,l=0,c=0,d;for(let b=0;b<o.length;b++){let p=o[b];if(s===0&&l===0){if(p===sr){a.push(o.slice(c,b)),c=b+di;continue}if(p==="/"){d=b;continue}}p==="["?s++:p==="]"?s--:p==="("?l++:p===")"&&l--}const f=a.length===0?o:o.substring(c),h=fi(f),v=h!==f,g=d&&d>c?d-c:void 0;return{modifiers:a,hasImportantModifier:v,baseClassName:h,maybePostfixModifierPosition:g}};if(t){const o=t+sr,a=n;n=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=a=>r({className:a,parseClassName:o})}return n},fi=e=>e.endsWith(ar)?e.substring(0,e.length-1):e.startsWith(ar)?e.substring(1):e,pi=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let a=[];return n.forEach(s=>{s[0]==="["||t[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},hi=e=>({cache:ci(e.cacheSize),parseClassName:ui(e),sortModifiers:pi(e),...ai(e)}),gi=/\s+/,mi=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],l=e.trim().split(gi);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:h,modifiers:v,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:p}=r(f);if(h){c=f+(c.length>0?" "+c:c);continue}let m=!!p,y=n(m?b.substring(0,p):b);if(!y){if(!m){c=f+(c.length>0?" "+c:c);continue}if(y=n(b),!y){c=f+(c.length>0?" "+c:c);continue}m=!1}const w=a(v).join(":"),x=g?w+ar:w,E=x+y;if(s.includes(E))continue;s.push(E);const C=o(y,m);for(let S=0;S<C.length;++S){const N=C[S];s.push(x+N)}c=f+(c.length>0?" "+c:c)}return c};function vi(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Hn(t))&&(n&&(n+=" "),n+=r);return n}const Hn=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Hn(e[n]))&&(r&&(r+=" "),r+=t);return r};function bi(e,...t){let r,n,o,a=s;function s(c){const d=t.reduce((f,h)=>h(f),e());return r=hi(d),n=r.cache.get,o=r.cache.set,a=l,l(c)}function l(c){const d=n(c);if(d)return d;const f=mi(c,r);return o(c,f),f}return function(){return a(vi.apply(null,arguments))}}const q=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},jn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Gn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yi=/^\d+\/\d+$/,wi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Si=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ei=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ci=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ve=e=>yi.test(e),V=e=>!!e&&!Number.isNaN(Number(e)),_e=e=>!!e&&Number.isInteger(Number(e)),Un=e=>e.endsWith("%")&&V(e.slice(0,-1)),Ee=e=>wi.test(e),Ti=()=>!0,Ni=e=>xi.test(e)&&!Si.test(e),ir=()=>!1,Pi=e=>Ei.test(e),Ai=e=>Ci.test(e),Oi=e=>!A(e)&&!O(e),Mi=e=>He(e,Xn,ir),A=e=>jn.test(e),Ie=e=>He(e,qn,Ni),lr=e=>He(e,Bi,V),ki=e=>He(e,Kn,ir),Di=e=>He(e,Yn,Ai),_i=e=>He(e,ir,Pi),O=e=>Gn.test(e),ht=e=>je(e,qn),Ii=e=>je(e,Vi),Li=e=>je(e,Kn),Ri=e=>je(e,Xn),Fi=e=>je(e,Yn),$i=e=>je(e,Hi,!0),He=(e,t,r)=>{const n=jn.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},je=(e,t,r=!1)=>{const n=Gn.exec(e);return n?n[1]?t(n[1]):r:!1},Kn=e=>e==="position",zi=new Set(["image","url"]),Yn=e=>zi.has(e),Wi=new Set(["length","size","percentage"]),Xn=e=>Wi.has(e),qn=e=>e==="length",Bi=e=>e==="number",Vi=e=>e==="family-name",Hi=e=>e==="shadow",ji=bi(()=>{const e=q("color"),t=q("font"),r=q("text"),n=q("font-weight"),o=q("tracking"),a=q("leading"),s=q("breakpoint"),l=q("container"),c=q("spacing"),d=q("radius"),f=q("shadow"),h=q("inset-shadow"),v=q("drop-shadow"),g=q("blur"),b=q("perspective"),p=q("aspect"),m=q("ease"),y=q("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],E=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],S=()=>[O,A,c],N=()=>[Ve,"full","auto",...S()],$=()=>[_e,"none","subgrid",O,A],I=()=>["auto",{span:["full",_e,O,A]},O,A],z=()=>[_e,"auto",O,A],H=()=>["auto","min","max","fr",O,A],W=()=>["start","end","center","between","around","evenly","stretch","baseline"],_=()=>["start","end","center","stretch"],P=()=>["auto",...S()],B=()=>[Ve,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],M=()=>[e,O,A],j=()=>[Un,Ie],k=()=>["","none","full",d,O,A],R=()=>["",V,ht,Ie],Y=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>["","none",g,O,A],J=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",O,A],te=()=>["none",V,O,A],ie=()=>["none",V,O,A],Oe=()=>[V,O,A],ye=()=>[Ve,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ee],breakpoint:[Ee],color:[Ti],container:[Ee],"drop-shadow":[Ee],ease:["in","out","in-out"],font:[Oi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ee],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ee],shadow:[Ee],spacing:["px",V],text:[Ee],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ve,A,O,p]}],container:["container"],columns:[{columns:[V,A,O,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...x(),A,O]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[_e,"auto",O,A]}],basis:[{basis:[Ve,"full","auto",l,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[V,Ve,"auto","initial","none",A]}],grow:[{grow:["",V,O,A]}],shrink:[{shrink:["",V,O,A]}],order:[{order:[_e,"first","last","none",O,A]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[..._(),"baseline"]}],"align-self":[{self:["auto",..._(),"baseline"]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[l,"screen",...B()]}],"min-w":[{"min-w":[l,"screen","none",...B()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...B()]}],h:[{h:["screen",...B()]}],"min-h":[{"min-h":["screen","none",...B()]}],"max-h":[{"max-h":["screen",...B()]}],"font-size":[{text:["base",r,ht,Ie]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,O,lr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Un,A]}],"font-family":[{font:[Ii,A,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,O,A]}],"line-clamp":[{"line-clamp":[V,"none",O,lr]}],leading:[{leading:[a,...S()]}],"list-image":[{"list-image":["none",O,A]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[V,"from-font","auto",O,Ie]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[V,"auto",O,A]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,A]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O,A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),Li,ki]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Ri,Mi]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_e,O,A],radial:["",O,A],conic:[_e,O,A]},Fi,Di]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:k()}],"rounded-s":[{"rounded-s":k()}],"rounded-e":[{"rounded-e":k()}],"rounded-t":[{"rounded-t":k()}],"rounded-r":[{"rounded-r":k()}],"rounded-b":[{"rounded-b":k()}],"rounded-l":[{"rounded-l":k()}],"rounded-ss":[{"rounded-ss":k()}],"rounded-se":[{"rounded-se":k()}],"rounded-ee":[{"rounded-ee":k()}],"rounded-es":[{"rounded-es":k()}],"rounded-tl":[{"rounded-tl":k()}],"rounded-tr":[{"rounded-tr":k()}],"rounded-br":[{"rounded-br":k()}],"rounded-bl":[{"rounded-bl":k()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":R()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[V,O,A]}],"outline-w":[{outline:["",V,ht,Ie]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",f,$i,_i]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",O,A,h]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[V,Ie]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":M()}],opacity:[{opacity:[V,O,A]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none",O,A]}],blur:[{blur:re()}],brightness:[{brightness:[V,O,A]}],contrast:[{contrast:[V,O,A]}],"drop-shadow":[{"drop-shadow":["","none",v,O,A]}],grayscale:[{grayscale:["",V,O,A]}],"hue-rotate":[{"hue-rotate":[V,O,A]}],invert:[{invert:["",V,O,A]}],saturate:[{saturate:[V,O,A]}],sepia:[{sepia:["",V,O,A]}],"backdrop-filter":[{"backdrop-filter":["","none",O,A]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[V,O,A]}],"backdrop-contrast":[{"backdrop-contrast":[V,O,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",V,O,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V,O,A]}],"backdrop-invert":[{"backdrop-invert":["",V,O,A]}],"backdrop-opacity":[{"backdrop-opacity":[V,O,A]}],"backdrop-saturate":[{"backdrop-saturate":[V,O,A]}],"backdrop-sepia":[{"backdrop-sepia":["",V,O,A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,A]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[V,"initial",O,A]}],ease:[{ease:["linear","initial",m,O,A]}],delay:[{delay:[V,O,A]}],animate:[{animate:["none",y,O,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,O,A]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:Oe()}],"skew-x":[{"skew-x":Oe()}],"skew-y":[{"skew-y":Oe()}],transform:[{transform:[O,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O,A]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",O,A]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[V,ht,Ie,lr]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}});function D(...e){return ji(zn(e))}function Gi({className:e,containerClassName:t,...r}){return u.jsx(Rn,{"data-slot":"input-otp",containerClassName:D("flex items-center gap-2 has-disabled:opacity-50",t),className:D("disabled:cursor-not-allowed",e),...r})}function Ui({className:e,...t}){return u.jsx("div",{"data-slot":"input-otp-group",className:D("flex items-center",e),...t})}function Ki({index:e,className:t,...r}){const n=i.useContext(Ln),{char:o,hasFakeCaret:a,isActive:s}=(n==null?void 0:n.slots[e])??{};return u.jsxs("div",{"data-slot":"input-otp-slot","data-active":s,className:D("border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...r,children:[o,a&&u.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:u.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function Yi({...e}){return u.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:u.jsx(ti,{})})}function U(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Zn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qn(...e){return t=>{let r=!1;const n=e.map(o=>{const a=Zn(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():Zn(e[o],null)}}}}function ee(...e){return i.useCallback(Qn(...e),e)}function Xi(e,t){const r=i.createContext(t),n=a=>{const{children:s,...l}=a,c=i.useMemo(()=>l,Object.values(l));return u.jsx(r.Provider,{value:c,children:s})};n.displayName=e+"Provider";function o(a){const s=i.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function ot(e,t=[]){let r=[];function n(a,s){const l=i.createContext(s),c=r.length;r=[...r,s];const d=h=>{var y;const{scope:v,children:g,...b}=h,p=((y=v==null?void 0:v[e])==null?void 0:y[c])||l,m=i.useMemo(()=>b,Object.values(b));return u.jsx(p.Provider,{value:m,children:g})};d.displayName=a+"Provider";function f(h,v){var p;const g=((p=v==null?void 0:v[e])==null?void 0:p[c])||l,b=i.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=r.map(s=>i.createContext(s));return function(l){const c=(l==null?void 0:l[e])||a;return i.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[n,qi(o,...t)]}function qi(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((l,{useScope:c,scopeName:d})=>{const h=c(a)[`__scope${d}`];return{...l,...h}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var Ce=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},Zi=i.useId||(()=>{}),Qi=0;function gt(e){const[t,r]=i.useState(Zi());return Ce(()=>{r(n=>n??String(Qi++))},[e]),e||(t?`radix-${t}`:"")}function ce(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function cr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Ji({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,l=ce(r),c=i.useCallback(d=>{if(a){const h=typeof d=="function"?d(e):d;h!==e&&l(h)}else o(d)},[a,e,o,l]);return[s,c]}function Ji({defaultProp:e,onChange:t}){const r=i.useState(e),[n]=r,o=i.useRef(n),a=ce(t);return i.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}var de=i.forwardRef((e,t)=>{const{children:r,...n}=e,o=i.Children.toArray(r),a=o.find(el);if(a){const s=a.props.children,l=o.map(c=>c===a?i.Children.count(s)>1?i.Children.only(null):i.isValidElement(s)?s.props.children:null:c);return u.jsx(dr,{...n,ref:t,children:i.isValidElement(s)?i.cloneElement(s,void 0,l):null})}return u.jsx(dr,{...n,ref:t,children:r})});de.displayName="Slot";var dr=i.forwardRef((e,t)=>{const{children:r,...n}=e;if(i.isValidElement(r)){const o=rl(r),a=tl(n,r.props);return r.type!==i.Fragment&&(a.ref=t?Qn(t,o):o),i.cloneElement(r,a)}return i.Children.count(r)>1?i.Children.only(null):null});dr.displayName="SlotClone";var Jn=({children:e})=>u.jsx(u.Fragment,{children:e});function el(e){return i.isValidElement(e)&&e.type===Jn}function tl(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{a(...l),o(...l)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function rl(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var nl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],K=nl.reduce((e,t)=>{const r=i.forwardRef((n,o)=>{const{asChild:a,...s}=n,l=a?de:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function eo(e,t){e&&tr.flushSync(()=>e.dispatchEvent(t))}function ol(e,t=globalThis==null?void 0:globalThis.document){const r=ce(e);i.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var al="DismissableLayer",ur="dismissableLayer.update",sl="dismissableLayer.pointerDownOutside",il="dismissableLayer.focusOutside",to,ro=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mt=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,d=i.useContext(ro),[f,h]=i.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=i.useState({}),b=ee(t,N=>h(N)),p=Array.from(d.layers),[m]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(m),w=f?p.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,E=w>=y,C=cl(N=>{const $=N.target,I=[...d.branches].some(z=>z.contains($));!E||I||(o==null||o(N),s==null||s(N),N.defaultPrevented||l==null||l())},v),S=dl(N=>{const $=N.target;[...d.branches].some(z=>z.contains($))||(a==null||a(N),s==null||s(N),N.defaultPrevented||l==null||l())},v);return ol(N=>{w===d.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},v),i.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(to=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),oo(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=to)}},[f,v,r,d]),i.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),oo())},[f,d]),i.useEffect(()=>{const N=()=>g({});return document.addEventListener(ur,N),()=>document.removeEventListener(ur,N)},[]),u.jsx(K.div,{...c,ref:b,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,S.onFocusCapture),onBlurCapture:U(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,C.onPointerDownCapture)})});mt.displayName=al;var ll="DismissableLayerBranch",no=i.forwardRef((e,t)=>{const r=i.useContext(ro),n=i.useRef(null),o=ee(t,n);return i.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),u.jsx(K.div,{...e,ref:o})});no.displayName=ll;function cl(e,t=globalThis==null?void 0:globalThis.document){const r=ce(e),n=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let c=function(){ao(sl,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function dl(e,t=globalThis==null?void 0:globalThis.document){const r=ce(e),n=i.useRef(!1);return i.useEffect(()=>{const o=a=>{a.target&&!n.current&&ao(il,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function oo(){const e=new CustomEvent(ur);document.dispatchEvent(e)}function ao(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?eo(o,a):o.dispatchEvent(a)}var ul=mt,fl=no,fr="focusScope.autoFocusOnMount",pr="focusScope.autoFocusOnUnmount",so={bubbles:!1,cancelable:!0},pl="FocusScope",io=i.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[l,c]=i.useState(null),d=ce(o),f=ce(a),h=i.useRef(null),v=ee(t,p=>c(p)),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(n){let p=function(x){if(g.paused||!l)return;const E=x.target;l.contains(E)?h.current=E:Te(h.current,{select:!0})},m=function(x){if(g.paused||!l)return;const E=x.relatedTarget;E!==null&&(l.contains(E)||Te(h.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&Te(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",m);const w=new MutationObserver(y);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",m),w.disconnect()}}},[n,l,g.paused]),i.useEffect(()=>{if(l){uo.add(g);const p=document.activeElement;if(!l.contains(p)){const y=new CustomEvent(fr,so);l.addEventListener(fr,d),l.dispatchEvent(y),y.defaultPrevented||(hl(yl(lo(l)),{select:!0}),document.activeElement===p&&Te(l))}return()=>{l.removeEventListener(fr,d),setTimeout(()=>{const y=new CustomEvent(pr,so);l.addEventListener(pr,f),l.dispatchEvent(y),y.defaultPrevented||Te(p??document.body,{select:!0}),l.removeEventListener(pr,f),uo.remove(g)},0)}}},[l,d,f,g]);const b=i.useCallback(p=>{if(!r&&!n||g.paused)return;const m=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(m&&y){const w=p.currentTarget,[x,E]=gl(w);x&&E?!p.shiftKey&&y===E?(p.preventDefault(),r&&Te(x,{select:!0})):p.shiftKey&&y===x&&(p.preventDefault(),r&&Te(E,{select:!0})):y===w&&p.preventDefault()}},[r,n,g.paused]);return u.jsx(K.div,{tabIndex:-1,...s,ref:v,onKeyDown:b})});io.displayName=pl;function hl(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Te(n,{select:t}),document.activeElement!==r)return}function gl(e){const t=lo(e),r=co(t,e),n=co(t.reverse(),e);return[r,n]}function lo(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function co(e,t){for(const r of e)if(!ml(r,{upTo:t}))return r}function ml(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 vl(e){return e instanceof HTMLInputElement&&"select"in e}function Te(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&vl(e)&&t&&e.select()}}var uo=bl();function bl(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=fo(e,t),e.unshift(t)},remove(t){var r;e=fo(e,t),(r=e[0])==null||r.resume()}}}function fo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function yl(e){return e.filter(t=>t.tagName!=="A")}var wl="Portal",vt=i.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=i.useState(!1);Ce(()=>a(!0),[]);const s=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?On.createPortal(u.jsx(K.div,{...n,ref:t}),s):null});vt.displayName=wl;function xl(e,t){return i.useReducer((r,n)=>t[r][n]??r,e)}var Le=e=>{const{present:t,children:r}=e,n=Sl(t),o=typeof r=="function"?r({present:n.isPresent}):i.Children.only(r),a=ee(n.ref,El(o));return typeof r=="function"||n.isPresent?i.cloneElement(o,{ref:a}):null};Le.displayName="Presence";function Sl(e){const[t,r]=i.useState(),n=i.useRef({}),o=i.useRef(e),a=i.useRef("none"),s=e?"mounted":"unmounted",[l,c]=xl(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const d=bt(n.current);a.current=l==="mounted"?d:"none"},[l]),Ce(()=>{const d=n.current,f=o.current;if(f!==e){const v=a.current,g=bt(d);e?c("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&v!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ce(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=g=>{const p=bt(n.current).includes(g.animationName);if(g.target===t&&p&&(c("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},v=g=>{g.target===t&&(a.current=bt(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function bt(e){return(e==null?void 0:e.animationName)||"none"}function El(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var hr=0;function Cl(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??po()),document.body.insertAdjacentElement("beforeend",e[1]??po()),hr++,()=>{hr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),hr--}},[])}function po(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ge=function(){return ge=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ge.apply(this,arguments)};function ho(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Tl(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var yt="right-scroll-bar-position",wt="width-before-scroll-bar",Nl="with-scroll-bars-hidden",Pl="--removed-body-scroll-bar-size";function gr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Al(e,t){var r=X.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Ol=typeof window<"u"?i.useLayoutEffect:i.useEffect,go=new WeakMap;function Ml(e,t){var r=Al(null,function(n){return e.forEach(function(o){return gr(o,n)})});return Ol(function(){var n=go.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(l){a.has(l)||gr(l,null)}),a.forEach(function(l){o.has(l)||gr(l,s)})}go.set(r,e)},[e]),r}function kl(e){return e}function Dl(e,t){t===void 0&&(t=kl);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(l){return l!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var l=r;r=[],l.forEach(a),s=r}var c=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),r={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),r}}}};return o}function _l(e){e===void 0&&(e={});var t=Dl(null);return t.options=ge({async:!0,ssr:!1},e),t}var mo=function(e){var t=e.sideCar,r=ho(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return i.createElement(n,ge({},r))};mo.isSideCarExport=!0;function Il(e,t){return e.useMedium(t),mo}var vo=_l(),mr=function(){},xt=i.forwardRef(function(e,t){var r=i.useRef(null),n=i.useState({onScrollCapture:mr,onWheelCapture:mr,onTouchMoveCapture:mr}),o=n[0],a=n[1],s=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,f=e.enabled,h=e.shards,v=e.sideCar,g=e.noIsolation,b=e.inert,p=e.allowPinchZoom,m=e.as,y=m===void 0?"div":m,w=e.gapMode,x=ho(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,C=Ml([r,t]),S=ge(ge({},x),o);return i.createElement(i.Fragment,null,f&&i.createElement(E,{sideCar:vo,removeScrollBar:d,shards:h,noIsolation:g,inert:b,setCallbacks:a,allowPinchZoom:!!p,lockRef:r,gapMode:w}),s?i.cloneElement(i.Children.only(l),ge(ge({},S),{ref:C})):i.createElement(y,ge({},S,{className:c,ref:C}),l))});xt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},xt.classNames={fullWidth:wt,zeroRight:yt};var Ll=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ll();return t&&e.setAttribute("nonce",t),e}function Fl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $l(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var zl=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Rl())&&(Fl(t,r),$l(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wl=function(){var e=zl();return function(t,r){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},bo=function(){var e=Wl(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Bl={left:0,top:0,right:0,gap:0},vr=function(e){return parseInt(e||"",10)||0},Vl=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[vr(r),vr(n),vr(o)]},Hl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Bl;var t=Vl(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},jl=bo(),Ge="data-scroll-locked",Gl=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,l=e.gap;return r===void 0&&(r="margin"),`
76
76
  .`.concat(Nl,` {
77
77
  overflow: hidden `).concat(n,`;
78
78
  padding-right: `).concat(l,"px ").concat(n,`;
@@ -109,11 +109,11 @@
109
109
  body[`).concat(Ge,`] {
110
110
  `).concat(Pl,": ").concat(l,`px;
111
111
  }
112
- `)},bo=function(){var e=parseInt(document.body.getAttribute(Ge)||"0",10);return isFinite(e)?e:0},Ul=function(){i.useEffect(function(){return document.body.setAttribute(Ge,(bo()+1).toString()),function(){var e=bo()-1;e<=0?document.body.removeAttribute(Ge):document.body.setAttribute(Ge,e.toString())}},[])},Kl=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Ul();var a=i.useMemo(function(){return Hl(o)},[o]);return i.createElement(jl,{styles:Gl(a,!t,o,r?"":"!important")})},br=!1;if(typeof window<"u")try{var St=Object.defineProperty({},"passive",{get:function(){return br=!0,!0}});window.addEventListener("test",St,St),window.removeEventListener("test",St,St)}catch{br=!1}var Ue=br?{passive:!1}:!1,Yl=function(e){return e.tagName==="TEXTAREA"},yo=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Yl(e)&&r[t]==="visible")},Xl=function(e){return yo(e,"overflowY")},ql=function(e){return yo(e,"overflowX")},wo=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=xo(e,n);if(o){var a=So(e,n),s=a[1],l=a[2];if(s>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Zl=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Ql=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},xo=function(e,t){return e==="v"?Xl(t):ql(t)},So=function(e,t){return e==="v"?Zl(t):Ql(t)},Jl=function(e,t){return e==="h"&&t==="rtl"?-1:1},ec=function(e,t,r,n,o){var a=Jl(e,window.getComputedStyle(t).direction),s=a*n,l=r.target,c=t.contains(l),d=!1,f=s>0,h=0,v=0;do{var g=So(e,l),b=g[0],p=g[1],m=g[2],y=p-m-a*b;(b||y)&&xo(e,l)&&(h+=y,v+=b),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(f&&Math.abs(h)<1||!f&&Math.abs(v)<1)&&(d=!0),d},Et=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Eo=function(e){return[e.deltaX,e.deltaY]},Co=function(e){return e&&"current"in e?e.current:e},tc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rc=function(e){return`
112
+ `)},yo=function(){var e=parseInt(document.body.getAttribute(Ge)||"0",10);return isFinite(e)?e:0},Ul=function(){i.useEffect(function(){return document.body.setAttribute(Ge,(yo()+1).toString()),function(){var e=yo()-1;e<=0?document.body.removeAttribute(Ge):document.body.setAttribute(Ge,e.toString())}},[])},Kl=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Ul();var a=i.useMemo(function(){return Hl(o)},[o]);return i.createElement(jl,{styles:Gl(a,!t,o,r?"":"!important")})},br=!1;if(typeof window<"u")try{var St=Object.defineProperty({},"passive",{get:function(){return br=!0,!0}});window.addEventListener("test",St,St),window.removeEventListener("test",St,St)}catch{br=!1}var Ue=br?{passive:!1}:!1,Yl=function(e){return e.tagName==="TEXTAREA"},wo=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Yl(e)&&r[t]==="visible")},Xl=function(e){return wo(e,"overflowY")},ql=function(e){return wo(e,"overflowX")},xo=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=So(e,n);if(o){var a=Eo(e,n),s=a[1],l=a[2];if(s>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Zl=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Ql=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},So=function(e,t){return e==="v"?Xl(t):ql(t)},Eo=function(e,t){return e==="v"?Zl(t):Ql(t)},Jl=function(e,t){return e==="h"&&t==="rtl"?-1:1},ec=function(e,t,r,n,o){var a=Jl(e,window.getComputedStyle(t).direction),s=a*n,l=r.target,c=t.contains(l),d=!1,f=s>0,h=0,v=0;do{var g=Eo(e,l),b=g[0],p=g[1],m=g[2],y=p-m-a*b;(b||y)&&So(e,l)&&(h+=y,v+=b),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(f&&Math.abs(h)<1||!f&&Math.abs(v)<1)&&(d=!0),d},Et=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Co=function(e){return[e.deltaX,e.deltaY]},To=function(e){return e&&"current"in e?e.current:e},tc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rc=function(e){return`
113
113
  .block-interactivity-`.concat(e,` {pointer-events: none;}
114
114
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
115
- `)},nc=0,Ke=[];function oc(e){var t=i.useRef([]),r=i.useRef([0,0]),n=i.useRef(),o=i.useState(nc++)[0],a=i.useState(vo)[0],s=i.useRef(e);i.useEffect(function(){s.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Tl([e.lockRef.current],(e.shards||[]).map(Co),!0).filter(Boolean);return p.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback(function(p,m){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var y=Et(p),w=r.current,x="deltaX"in p?p.deltaX:w[0]-y[0],E="deltaY"in p?p.deltaY:w[1]-y[1],C,S=p.target,N=Math.abs(x)>Math.abs(E)?"h":"v";if("touches"in p&&N==="h"&&S.type==="range")return!1;var $=wo(N,S);if(!$)return!0;if($?C=N:(C=N==="v"?"h":"v",$=wo(N,S)),!$)return!1;if(!n.current&&"changedTouches"in p&&(x||E)&&(n.current=C),!C)return!0;var I=n.current||C;return ec(I,m,p,I==="h"?x:E)},[]),c=i.useCallback(function(p){var m=p;if(!(!Ke.length||Ke[Ke.length-1]!==a)){var y="deltaY"in m?Eo(m):Et(m),w=t.current.filter(function(C){return C.name===m.type&&(C.target===m.target||m.target===C.shadowParent)&&tc(C.delta,y)})[0];if(w&&w.should){m.cancelable&&m.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(Co).filter(Boolean).filter(function(C){return C.contains(m.target)}),E=x.length>0?l(m,x[0]):!s.current.noIsolation;E&&m.cancelable&&m.preventDefault()}}},[]),d=i.useCallback(function(p,m,y,w){var x={name:p,delta:m,target:y,should:w,shadowParent:ac(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(E){return E!==x})},1)},[]),f=i.useCallback(function(p){r.current=Et(p),n.current=void 0},[]),h=i.useCallback(function(p){d(p.type,Eo(p),p.target,l(p,e.lockRef.current))},[]),v=i.useCallback(function(p){d(p.type,Et(p),p.target,l(p,e.lockRef.current))},[]);i.useEffect(function(){return Ke.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",c,Ue),document.addEventListener("touchmove",c,Ue),document.addEventListener("touchstart",f,Ue),function(){Ke=Ke.filter(function(p){return p!==a}),document.removeEventListener("wheel",c,Ue),document.removeEventListener("touchmove",c,Ue),document.removeEventListener("touchstart",f,Ue)}},[]);var g=e.removeScrollBar,b=e.inert;return i.createElement(i.Fragment,null,b?i.createElement(a,{styles:rc(o)}):null,g?i.createElement(Kl,{gapMode:e.gapMode}):null)}function ac(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const sc=Il(mo,oc);var To=i.forwardRef(function(e,t){return i.createElement(xt,ge({},e,{ref:t,sideCar:sc}))});To.classNames=xt.classNames;var ic=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ye=new WeakMap,Ct=new WeakMap,Tt={},yr=0,No=function(e){return e&&(e.host||No(e.parentNode))},lc=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=No(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},cc=function(e,t,r,n){var o=lc(t,Array.isArray(e)?e:[e]);Tt[r]||(Tt[r]=new WeakMap);var a=Tt[r],s=[],l=new Set,c=new Set(o),d=function(h){!h||l.has(h)||(l.add(h),d(h.parentNode))};o.forEach(d);var f=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(v){if(l.has(v))f(v);else try{var g=v.getAttribute(n),b=g!==null&&g!=="false",p=(Ye.get(v)||0)+1,m=(a.get(v)||0)+1;Ye.set(v,p),a.set(v,m),s.push(v),p===1&&b&&Ct.set(v,!0),m===1&&v.setAttribute(r,"true"),b||v.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return f(t),l.clear(),yr++,function(){s.forEach(function(h){var v=Ye.get(h)-1,g=a.get(h)-1;Ye.set(h,v),a.set(h,g),v||(Ct.has(h)||h.removeAttribute(n),Ct.delete(h)),g||h.removeAttribute(r)}),yr--,yr||(Ye=new WeakMap,Ye=new WeakMap,Ct=new WeakMap,Tt={})}},dc=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=ic(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),cc(n,o,r,"aria-hidden")):function(){return null}},wr="Dialog",[Po,Yu]=ot(wr),[uc,ue]=Po(wr),Ao=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,l=i.useRef(null),c=i.useRef(null),[d=!1,f]=cr({prop:n,defaultProp:o,onChange:a});return u.jsx(uc,{scope:t,triggerRef:l,contentRef:c,contentId:gt(),titleId:gt(),descriptionId:gt(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:s,children:r})};Ao.displayName=wr;var Oo="DialogTrigger",Mo=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ue(Oo,r),a=ee(t,o.triggerRef);return u.jsx(K.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Er(o.open),...n,ref:a,onClick:U(e.onClick,o.onOpenToggle)})});Mo.displayName=Oo;var xr="DialogPortal",[fc,ko]=Po(xr,{forceMount:void 0}),Do=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=ue(xr,t);return u.jsx(fc,{scope:t,forceMount:r,children:i.Children.map(n,s=>u.jsx(Le,{present:r||a.open,children:u.jsx(vt,{asChild:!0,container:o,children:s})}))})};Do.displayName=xr;var Nt="DialogOverlay",_o=i.forwardRef((e,t)=>{const r=ko(Nt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=ue(Nt,e.__scopeDialog);return a.modal?u.jsx(Le,{present:n||a.open,children:u.jsx(pc,{...o,ref:t})}):null});_o.displayName=Nt;var pc=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ue(Nt,r);return u.jsx(To,{as:de,allowPinchZoom:!0,shards:[o.contentRef],children:u.jsx(K.div,{"data-state":Er(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Re="DialogContent",Io=i.forwardRef((e,t)=>{const r=ko(Re,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=ue(Re,e.__scopeDialog);return u.jsx(Le,{present:n||a.open,children:a.modal?u.jsx(hc,{...o,ref:t}):u.jsx(gc,{...o,ref:t})})});Io.displayName=Re;var hc=i.forwardRef((e,t)=>{const r=ue(Re,e.__scopeDialog),n=i.useRef(null),o=ee(t,r.contentRef,n);return i.useEffect(()=>{const a=n.current;if(a)return dc(a)},[]),u.jsx(Lo,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:U(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:U(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&a.preventDefault()}),onFocusOutside:U(e.onFocusOutside,a=>a.preventDefault())})}),gc=i.forwardRef((e,t)=>{const r=ue(Re,e.__scopeDialog),n=i.useRef(!1),o=i.useRef(!1);return u.jsx(Lo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Lo=i.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,l=ue(Re,r),c=i.useRef(null),d=ee(t,c);return Cl(),u.jsxs(u.Fragment,{children:[u.jsx(so,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:u.jsx(mt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Er(l.open),...s,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(mc,{titleId:l.titleId}),u.jsx(bc,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Sr="DialogTitle",Ro=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ue(Sr,r);return u.jsx(K.h2,{id:o.titleId,...n,ref:t})});Ro.displayName=Sr;var Fo="DialogDescription",$o=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ue(Fo,r);return u.jsx(K.p,{id:o.descriptionId,...n,ref:t})});$o.displayName=Fo;var zo="DialogClose",Wo=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ue(zo,r);return u.jsx(K.button,{type:"button",...n,ref:t,onClick:U(e.onClick,()=>o.onOpenChange(!1))})});Wo.displayName=zo;function Er(e){return e?"open":"closed"}var Bo="DialogTitleWarning",[Xu,Vo]=Xi(Bo,{contentName:Re,titleName:Sr,docsSlug:"dialog"}),mc=({titleId:e})=>{const t=Vo(Bo),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
115
+ `)},nc=0,Ke=[];function oc(e){var t=i.useRef([]),r=i.useRef([0,0]),n=i.useRef(),o=i.useState(nc++)[0],a=i.useState(bo)[0],s=i.useRef(e);i.useEffect(function(){s.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Tl([e.lockRef.current],(e.shards||[]).map(To),!0).filter(Boolean);return p.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback(function(p,m){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var y=Et(p),w=r.current,x="deltaX"in p?p.deltaX:w[0]-y[0],E="deltaY"in p?p.deltaY:w[1]-y[1],C,S=p.target,N=Math.abs(x)>Math.abs(E)?"h":"v";if("touches"in p&&N==="h"&&S.type==="range")return!1;var $=xo(N,S);if(!$)return!0;if($?C=N:(C=N==="v"?"h":"v",$=xo(N,S)),!$)return!1;if(!n.current&&"changedTouches"in p&&(x||E)&&(n.current=C),!C)return!0;var I=n.current||C;return ec(I,m,p,I==="h"?x:E)},[]),c=i.useCallback(function(p){var m=p;if(!(!Ke.length||Ke[Ke.length-1]!==a)){var y="deltaY"in m?Co(m):Et(m),w=t.current.filter(function(C){return C.name===m.type&&(C.target===m.target||m.target===C.shadowParent)&&tc(C.delta,y)})[0];if(w&&w.should){m.cancelable&&m.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(To).filter(Boolean).filter(function(C){return C.contains(m.target)}),E=x.length>0?l(m,x[0]):!s.current.noIsolation;E&&m.cancelable&&m.preventDefault()}}},[]),d=i.useCallback(function(p,m,y,w){var x={name:p,delta:m,target:y,should:w,shadowParent:ac(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(E){return E!==x})},1)},[]),f=i.useCallback(function(p){r.current=Et(p),n.current=void 0},[]),h=i.useCallback(function(p){d(p.type,Co(p),p.target,l(p,e.lockRef.current))},[]),v=i.useCallback(function(p){d(p.type,Et(p),p.target,l(p,e.lockRef.current))},[]);i.useEffect(function(){return Ke.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",c,Ue),document.addEventListener("touchmove",c,Ue),document.addEventListener("touchstart",f,Ue),function(){Ke=Ke.filter(function(p){return p!==a}),document.removeEventListener("wheel",c,Ue),document.removeEventListener("touchmove",c,Ue),document.removeEventListener("touchstart",f,Ue)}},[]);var g=e.removeScrollBar,b=e.inert;return i.createElement(i.Fragment,null,b?i.createElement(a,{styles:rc(o)}):null,g?i.createElement(Kl,{gapMode:e.gapMode}):null)}function ac(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const sc=Il(vo,oc);var No=i.forwardRef(function(e,t){return i.createElement(xt,ge({},e,{ref:t,sideCar:sc}))});No.classNames=xt.classNames;var ic=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ye=new WeakMap,Ct=new WeakMap,Tt={},yr=0,Po=function(e){return e&&(e.host||Po(e.parentNode))},lc=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Po(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},cc=function(e,t,r,n){var o=lc(t,Array.isArray(e)?e:[e]);Tt[r]||(Tt[r]=new WeakMap);var a=Tt[r],s=[],l=new Set,c=new Set(o),d=function(h){!h||l.has(h)||(l.add(h),d(h.parentNode))};o.forEach(d);var f=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(v){if(l.has(v))f(v);else try{var g=v.getAttribute(n),b=g!==null&&g!=="false",p=(Ye.get(v)||0)+1,m=(a.get(v)||0)+1;Ye.set(v,p),a.set(v,m),s.push(v),p===1&&b&&Ct.set(v,!0),m===1&&v.setAttribute(r,"true"),b||v.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return f(t),l.clear(),yr++,function(){s.forEach(function(h){var v=Ye.get(h)-1,g=a.get(h)-1;Ye.set(h,v),a.set(h,g),v||(Ct.has(h)||h.removeAttribute(n),Ct.delete(h)),g||h.removeAttribute(r)}),yr--,yr||(Ye=new WeakMap,Ye=new WeakMap,Ct=new WeakMap,Tt={})}},dc=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=ic(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),cc(n,o,r,"aria-hidden")):function(){return null}},wr="Dialog",[Ao,Yu]=ot(wr),[uc,ue]=Ao(wr),Oo=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,l=i.useRef(null),c=i.useRef(null),[d=!1,f]=cr({prop:n,defaultProp:o,onChange:a});return u.jsx(uc,{scope:t,triggerRef:l,contentRef:c,contentId:gt(),titleId:gt(),descriptionId:gt(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:s,children:r})};Oo.displayName=wr;var Mo="DialogTrigger",ko=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ue(Mo,r),a=ee(t,o.triggerRef);return u.jsx(K.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Er(o.open),...n,ref:a,onClick:U(e.onClick,o.onOpenToggle)})});ko.displayName=Mo;var xr="DialogPortal",[fc,Do]=Ao(xr,{forceMount:void 0}),_o=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=ue(xr,t);return u.jsx(fc,{scope:t,forceMount:r,children:i.Children.map(n,s=>u.jsx(Le,{present:r||a.open,children:u.jsx(vt,{asChild:!0,container:o,children:s})}))})};_o.displayName=xr;var Nt="DialogOverlay",Io=i.forwardRef((e,t)=>{const r=Do(Nt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=ue(Nt,e.__scopeDialog);return a.modal?u.jsx(Le,{present:n||a.open,children:u.jsx(pc,{...o,ref:t})}):null});Io.displayName=Nt;var pc=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ue(Nt,r);return u.jsx(No,{as:de,allowPinchZoom:!0,shards:[o.contentRef],children:u.jsx(K.div,{"data-state":Er(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Re="DialogContent",Lo=i.forwardRef((e,t)=>{const r=Do(Re,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=ue(Re,e.__scopeDialog);return u.jsx(Le,{present:n||a.open,children:a.modal?u.jsx(hc,{...o,ref:t}):u.jsx(gc,{...o,ref:t})})});Lo.displayName=Re;var hc=i.forwardRef((e,t)=>{const r=ue(Re,e.__scopeDialog),n=i.useRef(null),o=ee(t,r.contentRef,n);return i.useEffect(()=>{const a=n.current;if(a)return dc(a)},[]),u.jsx(Ro,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:U(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:U(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&a.preventDefault()}),onFocusOutside:U(e.onFocusOutside,a=>a.preventDefault())})}),gc=i.forwardRef((e,t)=>{const r=ue(Re,e.__scopeDialog),n=i.useRef(!1),o=i.useRef(!1);return u.jsx(Ro,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Ro=i.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,l=ue(Re,r),c=i.useRef(null),d=ee(t,c);return Cl(),u.jsxs(u.Fragment,{children:[u.jsx(io,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:u.jsx(mt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Er(l.open),...s,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(mc,{titleId:l.titleId}),u.jsx(bc,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Sr="DialogTitle",Fo=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ue(Sr,r);return u.jsx(K.h2,{id:o.titleId,...n,ref:t})});Fo.displayName=Sr;var $o="DialogDescription",zo=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ue($o,r);return u.jsx(K.p,{id:o.descriptionId,...n,ref:t})});zo.displayName=$o;var Wo="DialogClose",Bo=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ue(Wo,r);return u.jsx(K.button,{type:"button",...n,ref:t,onClick:U(e.onClick,()=>o.onOpenChange(!1))})});Bo.displayName=Wo;function Er(e){return e?"open":"closed"}var Vo="DialogTitleWarning",[Xu,Ho]=Xi(Vo,{contentName:Re,titleName:Sr,docsSlug:"dialog"}),mc=({titleId:e})=>{const t=Ho(Vo),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
116
116
 
117
117
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
118
118
 
119
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},vc="DialogDescriptionWarning",bc=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vo(vc).contentName}}.`;return i.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Cr=Ao,Ho=Mo,jo=Do,Pt=_o,At=Io,Ot=Ro,Mt=$o,kt=Wo;const Tr=({modal:e=!1,...t})=>u.jsx(Cr,{modal:e,...t});Tr.displayName=Cr.displayName;const Go=Ho,yc=jo,Uo=kt,Ko=i.forwardRef(({className:e,...t},r)=>u.jsx(Pt,{ref:r,className:D("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ko.displayName=Pt.displayName;const Nr=i.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(yc,{children:[u.jsx(Ko,{}),u.jsxs(At,{ref:n,className:D("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,u.jsxs(kt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[u.jsx(rr,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Nr.displayName=At.displayName;const Pr=({className:e,...t})=>u.jsx("div",{className:D("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Pr.displayName="DialogHeader";const Ar=({className:e,...t})=>u.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ar.displayName="DialogFooter";const Or=i.forwardRef(({className:e,...t},r)=>u.jsx(Ot,{ref:r,className:D("text-lg font-semibold leading-none tracking-tight",e),...t}));Or.displayName=Ot.displayName;const Mr=i.forwardRef(({className:e,...t},r)=>u.jsx(Mt,{ref:r,className:D("text-sm text-muted-foreground",e),...t}));Mr.displayName=Mt.displayName;const Yo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Xo=$n,Dt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Xo(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=r==null?void 0:r[d],h=a==null?void 0:a[d];if(f===null)return null;const v=Yo(f)||Yo(h);return o[d][v]}),l=r&&Object.entries(r).reduce((d,f)=>{let[h,v]=f;return v===void 0||(d[h]=v),d},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:h,className:v,...g}=f;return Object.entries(g).every(b=>{let[p,m]=b;return Array.isArray(m)?m.includes({...a,...l}[p]):{...a,...l}[p]===m})?[...d,h,v]:d},[]);return Xo(e,s,c,r==null?void 0:r.class,r==null?void 0:r.className)},kr=Dt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Xe=i.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,confirmationDialog:o,onClick:a,...s},l)=>{const c=n?de:"button";if(!o)return u.jsx(c,{className:D(kr({variant:t,size:r,className:e})),ref:l,onClick:a,...s});a&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:d,content:f,onConfirm:h,confirmText:v="Confirm",cancelText:g="Cancel"}=o,b=()=>{h()};return u.jsxs(Tr,{children:[u.jsx(Go,{asChild:!0,children:u.jsx(c,{className:D(kr({variant:t,size:r,className:e})),ref:l,...s})}),u.jsxs(Nr,{children:[u.jsxs(Pr,{children:[u.jsx(Or,{children:d}),u.jsx(Mr,{children:f})]}),u.jsxs(Ar,{className:"flex justify-end gap-2 pt-4",children:[u.jsx(Uo,{asChild:!0,children:u.jsx(Xe,{variant:"outline",children:g})}),u.jsx(Uo,{asChild:!0,children:u.jsx(Xe,{onClick:b,children:v})})]})]})]})});Xe.displayName="Button";const _t=i.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:D("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));_t.displayName="Input";var wc="Separator",qo="horizontal",xc=["horizontal","vertical"],Zo=i.forwardRef((e,t)=>{const{decorative:r,orientation:n=qo,...o}=e,a=Sc(n)?n:qo,l=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return u.jsx(K.div,{"data-orientation":a,...l,...o,ref:t})});Zo.displayName=wc;function Sc(e){return xc.includes(e)}var Qo=Zo;const Dr=i.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},o)=>u.jsx(Qo,{ref:o,decorative:r,orientation:t,className:D("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Dr.displayName=Qo.displayName;const Jo=Cr,Ec=Ho,Cc=kt,ea=jo,_r=i.forwardRef(({className:e,...t},r)=>u.jsx(Pt,{className:D("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));_r.displayName=Pt.displayName;const Tc=Dt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ir=i.forwardRef(({side:e="right",className:t,children:r,...n},o)=>u.jsxs(ea,{children:[u.jsx(_r,{}),u.jsxs(At,{ref:o,className:D(Tc({side:e}),t),...n,children:[u.jsxs(kt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[u.jsx(rr,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));Ir.displayName=At.displayName;const ta=({className:e,...t})=>u.jsx("div",{className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t});ta.displayName="SheetHeader";const ra=({className:e,...t})=>u.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ra.displayName="SheetFooter";const na=i.forwardRef(({className:e,...t},r)=>u.jsx(Ot,{ref:r,className:D("text-lg font-semibold text-foreground",e),...t}));na.displayName=Ot.displayName;const oa=i.forwardRef(({className:e,...t},r)=>u.jsx(Mt,{ref:r,className:D("text-sm text-muted-foreground",e),...t}));oa.displayName=Mt.displayName;function Nc({getMyAccountPath:e,publicName:t,applicationName:r}){const{appID:n}=rt.useParams(),o=`https://api.randmar.io/v4/Partner/${n}/Account/Logo?height=72&width=72`,[a,s]=X.useState(!1),l=()=>{s(!0)};return u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted",children:a?u.jsx(rt.Link,{to:`${e(n)}#brand`,className:"transition-colors hover:bg-muted px-6",children:u.jsx(oi,{className:"h-5 w-5 text-muted-foreground"})}):u.jsx("img",{src:o,alt:"Partner logo",className:"h-9 w-9 object-cover bg-neutral-100",onError:l})}),u.jsxs("div",{className:"flex flex-1 flex-col",children:[u.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),u.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}const Lr=1024;function aa(){const[e,t]=i.useState(void 0);return i.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Lr-1}px)`),n=()=>{t(window.innerWidth<Lr)};return r.addEventListener("change",n),t(window.innerWidth<Lr),()=>r.removeEventListener("change",n)},[]),!!e}function Rr({className:e,...t}){return u.jsx("div",{className:D("animate-pulse rounded-md bg-primary/20",e),...t})}const Pc=["top","right","bottom","left"],Ne=Math.min,ae=Math.max,It=Math.round,Lt=Math.floor,me=e=>({x:e,y:e}),Ac={left:"right",right:"left",bottom:"top",top:"bottom"},Oc={start:"end",end:"start"};function Fr(e,t,r){return ae(e,Ne(t,r))}function we(e,t){return typeof e=="function"?e(t):e}function xe(e){return e.split("-")[0]}function qe(e){return e.split("-")[1]}function $r(e){return e==="x"?"y":"x"}function zr(e){return e==="y"?"height":"width"}function Pe(e){return["top","bottom"].includes(xe(e))?"y":"x"}function Wr(e){return $r(Pe(e))}function Mc(e,t,r){r===void 0&&(r=!1);const n=qe(e),o=Wr(e),a=zr(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Rt(s)),[s,Rt(s)]}function kc(e){const t=Rt(e);return[Br(e),t,Br(t)]}function Br(e){return e.replace(/start|end/g,t=>Oc[t])}function Dc(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function _c(e,t,r,n){const o=qe(e);let a=Dc(xe(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Br)))),a}function Rt(e){return e.replace(/left|right|bottom|top/g,t=>Ac[t])}function Ic(e){return{top:0,right:0,bottom:0,left:0,...e}}function sa(e){return typeof e!="number"?Ic(e):{top:e,right:e,bottom:e,left:e}}function Ft(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ia(e,t,r){let{reference:n,floating:o}=e;const a=Pe(t),s=Wr(t),l=zr(s),c=xe(t),d=a==="y",f=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,v=n[l]/2-o[l]/2;let g;switch(c){case"top":g={x:f,y:n.y-o.height};break;case"bottom":g={x:f,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:h};break;case"left":g={x:n.x-o.width,y:h};break;default:g={x:n.x,y:n.y}}switch(qe(t)){case"start":g[s]-=v*(r&&d?-1:1);break;case"end":g[s]+=v*(r&&d?-1:1);break}return g}const Lc=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,l=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=ia(d,n,c),v=n,g={},b=0;for(let p=0;p<l.length;p++){const{name:m,fn:y}=l[p],{x:w,y:x,data:E,reset:C}=await y({x:f,y:h,initialPlacement:n,placement:v,strategy:o,middlewareData:g,rects:d,platform:s,elements:{reference:e,floating:t}});f=w??f,h=x??h,g={...g,[m]:{...g[m],...E}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(v=C.placement),C.rects&&(d=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:h}=ia(d,v,c)),p=-1)}return{x:f,y:h,placement:v,strategy:o,middlewareData:g}};async function at(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:v=!1,padding:g=0}=we(t,e),b=sa(g),m=l[v?h==="floating"?"reference":"floating":h],y=Ft(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(m)))==null||r?m:m.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:c})),w=h==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),E=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},C=Ft(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:c}):w);return{top:(y.top-C.top+b.top)/E.y,bottom:(C.bottom-y.bottom+b.bottom)/E.y,left:(y.left-C.left+b.left)/E.x,right:(C.right-y.right+b.right)/E.x}}const Rc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:l,middlewareData:c}=t,{element:d,padding:f=0}=we(e,t)||{};if(d==null)return{};const h=sa(f),v={x:r,y:n},g=Wr(o),b=zr(g),p=await s.getDimensions(d),m=g==="y",y=m?"top":"left",w=m?"bottom":"right",x=m?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[g]-v[g]-a.floating[b],C=v[g]-a.reference[g],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let N=S?S[x]:0;(!N||!await(s.isElement==null?void 0:s.isElement(S)))&&(N=l.floating[x]||a.floating[b]);const $=E/2-C/2,I=N/2-p[b]/2-1,z=Ne(h[y],I),H=Ne(h[w],I),W=z,_=N-p[b]-H,P=N/2-p[b]/2+$,B=Fr(W,P,_),M=!c.arrow&&qe(o)!=null&&P!==B&&a.reference[b]/2-(P<W?z:H)-p[b]/2<0,j=M?P<W?P-W:P-_:0;return{[g]:v[g]+j,data:{[g]:B,centerOffset:P-B-j,...M&&{alignmentOffset:j}},reset:M}}}),Fc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...m}=we(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=xe(o),w=Pe(l),x=xe(l)===l,E=await(c.isRTL==null?void 0:c.isRTL(d.floating)),C=v||(x||!p?[Rt(l)]:kc(l)),S=b!=="none";!v&&S&&C.push(..._c(l,p,b,E));const N=[l,...C],$=await at(t,m),I=[];let z=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&I.push($[y]),h){const P=Mc(o,s,E);I.push($[P[0]],$[P[1]])}if(z=[...z,{placement:o,overflows:I}],!I.every(P=>P<=0)){var H,W;const P=(((H=a.flip)==null?void 0:H.index)||0)+1,B=N[P];if(B)return{data:{index:P,overflows:z},reset:{placement:B}};let M=(W=z.filter(j=>j.overflows[0]<=0).sort((j,k)=>j.overflows[1]-k.overflows[1])[0])==null?void 0:W.placement;if(!M)switch(g){case"bestFit":{var _;const j=(_=z.filter(k=>{if(S){const R=Pe(k.placement);return R===w||R==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(R=>R>0).reduce((R,Y)=>R+Y,0)]).sort((k,R)=>k[1]-R[1])[0])==null?void 0:_[0];j&&(M=j);break}case"initialPlacement":M=l;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function la(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ca(e){return Pc.some(t=>e[t]>=0)}const $c=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=we(e,t);switch(n){case"referenceHidden":{const a=await at(t,{...o,elementContext:"reference"}),s=la(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:ca(s)}}}case"escaped":{const a=await at(t,{...o,altBoundary:!0}),s=la(a,r.floating);return{data:{escapedOffsets:s,escaped:ca(s)}}}default:return{}}}}};async function zc(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=xe(r),l=qe(r),c=Pe(r)==="y",d=["left","top"].includes(s)?-1:1,f=a&&c?-1:1,h=we(t,e);let{mainAxis:v,crossAxis:g,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),c?{x:g*f,y:v*d}:{x:v*d,y:g*f}}const Wc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:l}=t,c=await zc(t,e);return s===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},Bc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:m=>{let{x:y,y:w}=m;return{x:y,y:w}}},...c}=we(e,t),d={x:r,y:n},f=await at(t,c),h=Pe(xe(o)),v=$r(h);let g=d[v],b=d[h];if(a){const m=v==="y"?"top":"left",y=v==="y"?"bottom":"right",w=g+f[m],x=g-f[y];g=Fr(w,g,x)}if(s){const m=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=b+f[m],x=b-f[y];b=Fr(w,b,x)}const p=l.fn({...t,[v]:g,[h]:b});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[v]:a,[h]:s}}}}}},Vc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=we(e,t),f={x:r,y:n},h=Pe(o),v=$r(h);let g=f[v],b=f[h];const p=we(l,t),m=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const x=v==="y"?"height":"width",E=a.reference[v]-a.floating[x]+m.mainAxis,C=a.reference[v]+a.reference[x]-m.mainAxis;g<E?g=E:g>C&&(g=C)}if(d){var y,w;const x=v==="y"?"width":"height",E=["top","left"].includes(xe(o)),C=a.reference[h]-a.floating[x]+(E&&((y=s.offset)==null?void 0:y[h])||0)+(E?0:m.crossAxis),S=a.reference[h]+a.reference[x]+(E?0:((w=s.offset)==null?void 0:w[h])||0)-(E?m.crossAxis:0);b<C?b=C:b>S&&(b=S)}return{[v]:g,[h]:b}}}},Hc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:l}=t,{apply:c=()=>{},...d}=we(e,t),f=await at(t,d),h=xe(o),v=qe(o),g=Pe(o)==="y",{width:b,height:p}=a.floating;let m,y;h==="top"||h==="bottom"?(m=h,y=v===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=h,m=v==="end"?"top":"bottom");const w=p-f.top-f.bottom,x=b-f.left-f.right,E=Ne(p-f[m],w),C=Ne(b-f[y],x),S=!t.middlewareData.shift;let N=E,$=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&($=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=w),S&&!v){const z=ae(f.left,0),H=ae(f.right,0),W=ae(f.top,0),_=ae(f.bottom,0);g?$=b-2*(z!==0||H!==0?z+H:ae(f.left,f.right)):N=p-2*(W!==0||_!==0?W+_:ae(f.top,f.bottom))}await c({...t,availableWidth:$,availableHeight:N});const I=await s.getDimensions(l.floating);return b!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function $t(){return typeof window<"u"}function Ze(e){return da(e)?(e.nodeName||"").toLowerCase():"#document"}function se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ve(e){var t;return(t=(da(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function da(e){return $t()?e instanceof Node||e instanceof se(e).Node:!1}function fe(e){return $t()?e instanceof Element||e instanceof se(e).Element:!1}function be(e){return $t()?e instanceof HTMLElement||e instanceof se(e).HTMLElement:!1}function ua(e){return!$t()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof se(e).ShadowRoot}function st(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function jc(e){return["table","td","th"].includes(Ze(e))}function zt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Vr(e){const t=Hr(),r=fe(e)?pe(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Gc(e){let t=Ae(e);for(;be(t)&&!Qe(t);){if(Vr(t))return t;if(zt(t))return null;t=Ae(t)}return null}function Hr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Qe(e){return["html","body","#document"].includes(Ze(e))}function pe(e){return se(e).getComputedStyle(e)}function Wt(e){return fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(Ze(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ua(e)&&e.host||ve(e);return ua(t)?t.host:t}function fa(e){const t=Ae(e);return Qe(t)?e.ownerDocument?e.ownerDocument.body:e.body:be(t)&&st(t)?t:fa(t)}function it(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=fa(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=se(o);if(a){const l=jr(s);return t.concat(s,s.visualViewport||[],st(o)?o:[],l&&r?it(l):[])}return t.concat(o,it(o,[],r))}function jr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pa(e){const t=pe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=be(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,l=It(r)!==a||It(n)!==s;return l&&(r=a,n=s),{width:r,height:n,$:l}}function Gr(e){return fe(e)?e:e.contextElement}function Je(e){const t=Gr(e);if(!be(t))return me(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=pa(t);let s=(a?It(r.width):r.width)/n,l=(a?It(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Uc=me(0);function ha(e){const t=se(e);return!Hr()||!t.visualViewport?Uc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kc(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==se(e)?!1:t}function Fe(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Gr(e);let s=me(1);t&&(n?fe(n)&&(s=Je(n)):s=Je(e));const l=Kc(a,r,n)?ha(a):me(0);let c=(o.left+l.x)/s.x,d=(o.top+l.y)/s.y,f=o.width/s.x,h=o.height/s.y;if(a){const v=se(a),g=n&&fe(n)?se(n):n;let b=v,p=jr(b);for(;p&&n&&g!==b;){const m=Je(p),y=p.getBoundingClientRect(),w=pe(p),x=y.left+(p.clientLeft+parseFloat(w.paddingLeft))*m.x,E=y.top+(p.clientTop+parseFloat(w.paddingTop))*m.y;c*=m.x,d*=m.y,f*=m.x,h*=m.y,c+=x,d+=E,b=se(p),p=jr(b)}}return Ft({width:f,height:h,x:c,y:d})}function Ur(e,t){const r=Wt(e).scrollLeft;return t?t.left+r:Fe(ve(e)).left+r}function ga(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:Ur(e,n)),a=n.top+t.scrollTop;return{x:o,y:a}}function Yc(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=ve(n),l=t?zt(t.floating):!1;if(n===s||l&&a)return r;let c={scrollLeft:0,scrollTop:0},d=me(1);const f=me(0),h=be(n);if((h||!h&&!a)&&((Ze(n)!=="body"||st(s))&&(c=Wt(n)),be(n))){const g=Fe(n);d=Je(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const v=s&&!h&&!a?ga(s,c,!0):me(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+f.x+v.x,y:r.y*d.y-c.scrollTop*d.y+f.y+v.y}}function Xc(e){return Array.from(e.getClientRects())}function qc(e){const t=ve(e),r=Wt(e),n=e.ownerDocument.body,o=ae(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=ae(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Ur(e);const l=-r.scrollTop;return pe(n).direction==="rtl"&&(s+=ae(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:l}}function Zc(e,t){const r=se(e),n=ve(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,l=0,c=0;if(o){a=o.width,s=o.height;const d=Hr();(!d||d&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:l,y:c}}function Qc(e,t){const r=Fe(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=be(e)?Je(e):me(1),s=e.clientWidth*a.x,l=e.clientHeight*a.y,c=o*a.x,d=n*a.y;return{width:s,height:l,x:c,y:d}}function ma(e,t,r){let n;if(t==="viewport")n=Zc(e,r);else if(t==="document")n=qc(ve(e));else if(fe(t))n=Qc(t,r);else{const o=ha(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ft(n)}function va(e,t){const r=Ae(e);return r===t||!fe(r)||Qe(r)?!1:pe(r).position==="fixed"||va(r,t)}function Jc(e,t){const r=t.get(e);if(r)return r;let n=it(e,[],!1).filter(l=>fe(l)&&Ze(l)!=="body"),o=null;const a=pe(e).position==="fixed";let s=a?Ae(e):e;for(;fe(s)&&!Qe(s);){const l=pe(s),c=Vr(s);!c&&l.position==="fixed"&&(o=null),(a?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||st(s)&&!c&&va(e,s))?n=n.filter(f=>f!==s):o=l,s=Ae(s)}return t.set(e,n),n}function ed(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?zt(t)?[]:Jc(t,this._c):[].concat(r),n],l=s[0],c=s.reduce((d,f)=>{const h=ma(t,f,o);return d.top=ae(h.top,d.top),d.right=Ne(h.right,d.right),d.bottom=Ne(h.bottom,d.bottom),d.left=ae(h.left,d.left),d},ma(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function td(e){const{width:t,height:r}=pa(e);return{width:t,height:r}}function rd(e,t,r){const n=be(t),o=ve(t),a=r==="fixed",s=Fe(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=me(0);if(n||!n&&!a)if((Ze(t)!=="body"||st(o))&&(l=Wt(t)),n){const v=Fe(t,!0,a,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&(c.x=Ur(o));const d=o&&!n&&!a?ga(o,l):me(0),f=s.left+l.scrollLeft-c.x-d.x,h=s.top+l.scrollTop-c.y-d.y;return{x:f,y:h,width:s.width,height:s.height}}function Kr(e){return pe(e).position==="static"}function ba(e,t){if(!be(e)||pe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ve(e)===r&&(r=r.ownerDocument.body),r}function ya(e,t){const r=se(e);if(zt(e))return r;if(!be(e)){let o=Ae(e);for(;o&&!Qe(o);){if(fe(o)&&!Kr(o))return o;o=Ae(o)}return r}let n=ba(e,t);for(;n&&jc(n)&&Kr(n);)n=ba(n,t);return n&&Qe(n)&&Kr(n)&&!Vr(n)?r:n||Gc(e)||r}const nd=async function(e){const t=this.getOffsetParent||ya,r=this.getDimensions,n=await r(e.floating);return{reference:rd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function od(e){return pe(e).direction==="rtl"}const ad={convertOffsetParentRelativeRectToViewportRelativeRect:Yc,getDocumentElement:ve,getClippingRect:ed,getOffsetParent:ya,getElementRects:nd,getClientRects:Xc,getDimensions:td,getScale:Je,isElement:fe,isRTL:od};function wa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sd(e,t){let r=null,n;const o=ve(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const d=e.getBoundingClientRect(),{left:f,top:h,width:v,height:g}=d;if(l||t(),!v||!g)return;const b=Lt(h),p=Lt(o.clientWidth-(f+v)),m=Lt(o.clientHeight-(h+g)),y=Lt(f),x={rootMargin:-b+"px "+-p+"px "+-m+"px "+-y+"px",threshold:ae(0,Ne(1,c))||1};let E=!0;function C(S){const N=S[0].intersectionRatio;if(N!==c){if(!E)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!wa(d,e.getBoundingClientRect())&&s(),E=!1}try{r=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}return s(!0),a}function id(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=Gr(e),f=o||a?[...d?it(d):[],...it(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const h=d&&l?sd(d,r):null;let v=-1,g=null;s&&(g=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),r()}),d&&!c&&g.observe(d),g.observe(t));let b,p=c?Fe(e):null;c&&m();function m(){const y=Fe(e);p&&!wa(p,y)&&r(),p=y,b=requestAnimationFrame(m)}return r(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",r),a&&w.removeEventListener("resize",r)}),h==null||h(),(y=g)==null||y.disconnect(),g=null,c&&cancelAnimationFrame(b)}}const ld=Wc,cd=Bc,dd=Fc,ud=Hc,fd=$c,xa=Rc,pd=Vc,hd=(e,t,r)=>{const n=new Map,o={platform:ad,...r},a={...o.platform,_c:n};return Lc(e,t,{...o,platform:a})};var Bt=typeof document<"u"?X.useLayoutEffect:X.useEffect;function Vt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Vt(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Vt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Sa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ea(e,t){const r=Sa(e);return Math.round(t*r)/r}function Yr(e){const t=i.useRef(e);return Bt(()=>{t.current=e}),t}function gd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[f,h]=i.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,g]=i.useState(n);Vt(v,n)||g(n);const[b,p]=i.useState(null),[m,y]=i.useState(null),w=i.useCallback(k=>{k!==S.current&&(S.current=k,p(k))},[]),x=i.useCallback(k=>{k!==N.current&&(N.current=k,y(k))},[]),E=a||b,C=s||m,S=i.useRef(null),N=i.useRef(null),$=i.useRef(f),I=c!=null,z=Yr(c),H=Yr(o),W=Yr(d),_=i.useCallback(()=>{if(!S.current||!N.current)return;const k={placement:t,strategy:r,middleware:v};H.current&&(k.platform=H.current),hd(S.current,N.current,k).then(R=>{const Y={...R,isPositioned:W.current!==!1};P.current&&!Vt($.current,Y)&&($.current=Y,tr.flushSync(()=>{h(Y)}))})},[v,t,r,H,W]);Bt(()=>{d===!1&&$.current.isPositioned&&($.current.isPositioned=!1,h(k=>({...k,isPositioned:!1})))},[d]);const P=i.useRef(!1);Bt(()=>(P.current=!0,()=>{P.current=!1}),[]),Bt(()=>{if(E&&(S.current=E),C&&(N.current=C),E&&C){if(z.current)return z.current(E,C,_);_()}},[E,C,_,z,I]);const B=i.useMemo(()=>({reference:S,floating:N,setReference:w,setFloating:x}),[w,x]),M=i.useMemo(()=>({reference:E,floating:C}),[E,C]),j=i.useMemo(()=>{const k={position:r,left:0,top:0};if(!M.floating)return k;const R=Ea(M.floating,f.x),Y=Ea(M.floating,f.y);return l?{...k,transform:"translate("+R+"px, "+Y+"px)",...Sa(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:Y}},[r,l,M.floating,f.x,f.y]);return i.useMemo(()=>({...f,update:_,refs:B,elements:M,floatingStyles:j}),[f,_,B,M,j])}const md=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?xa({element:n.current,padding:o}).fn(r):{}:n?xa({element:n,padding:o}).fn(r):{}}}},vd=(e,t)=>({...ld(e),options:[e,t]}),bd=(e,t)=>({...cd(e),options:[e,t]}),yd=(e,t)=>({...pd(e),options:[e,t]}),wd=(e,t)=>({...dd(e),options:[e,t]}),xd=(e,t)=>({...ud(e),options:[e,t]}),Sd=(e,t)=>({...fd(e),options:[e,t]}),Ed=(e,t)=>({...md(e),options:[e,t]});var Cd="Arrow",Ca=i.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return u.jsx(K.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ca.displayName=Cd;var Td=Ca;function Nd(e){const[t,r]=i.useState(void 0);return Ce(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,l;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;s=d.inlineSize,l=d.blockSize}else s=e.offsetWidth,l=e.offsetHeight;r({width:s,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Xr="Popper",[Ta,Na]=ot(Xr),[Pd,Pa]=Ta(Xr),Aa=e=>{const{__scopePopper:t,children:r}=e,[n,o]=i.useState(null);return u.jsx(Pd,{scope:t,anchor:n,onAnchorChange:o,children:r})};Aa.displayName=Xr;var Oa="PopperAnchor",Ma=i.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Pa(Oa,r),s=i.useRef(null),l=ee(t,s);return i.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:u.jsx(K.div,{...o,ref:l})});Ma.displayName=Oa;var qr="PopperContent",[Ad,Od]=Ta(qr),ka=i.forwardRef((e,t)=>{var ye,ut,Qt,ft,Jt,tt;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:g="optimized",onPlaced:b,...p}=e,m=Pa(qr,r),[y,w]=i.useState(null),x=ee(t,$e=>w($e)),[E,C]=i.useState(null),S=Nd(E),N=(S==null?void 0:S.width)??0,$=(S==null?void 0:S.height)??0,I=n+(a!=="center"?"-"+a:""),z=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},H=Array.isArray(d)?d:[d],W=H.length>0,_={padding:z,boundary:H.filter(kd),altBoundary:W},{refs:P,floatingStyles:B,placement:M,isPositioned:j,middlewareData:k}=gd({strategy:"fixed",placement:I,whileElementsMounted:(...$e)=>id(...$e,{animationFrame:g==="always"}),elements:{reference:m.anchor},middleware:[vd({mainAxis:o+$,alignmentAxis:s}),c&&bd({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?yd():void 0,..._}),c&&wd({..._}),xd({..._,apply:({elements:$e,rects:L,availableWidth:F,availableHeight:Q})=>{const{width:ne,height:oe}=L.reference,G=$e.floating.style;G.setProperty("--radix-popper-available-width",`${F}px`),G.setProperty("--radix-popper-available-height",`${Q}px`),G.setProperty("--radix-popper-anchor-width",`${ne}px`),G.setProperty("--radix-popper-anchor-height",`${oe}px`)}}),E&&Ed({element:E,padding:l}),Dd({arrowWidth:N,arrowHeight:$}),v&&Sd({strategy:"referenceHidden",..._})]}),[R,Y]=Ia(M),Z=ce(b);Ce(()=>{j&&(Z==null||Z())},[j,Z]);const re=(ye=k.arrow)==null?void 0:ye.x,J=(ut=k.arrow)==null?void 0:ut.y,te=((Qt=k.arrow)==null?void 0:Qt.centerOffset)!==0,[ie,Oe]=i.useState();return Ce(()=>{y&&Oe(window.getComputedStyle(y).zIndex)},[y]),u.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:j?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(ft=k.transformOrigin)==null?void 0:ft.x,(Jt=k.transformOrigin)==null?void 0:Jt.y].join(" "),...((tt=k.hide)==null?void 0:tt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Ad,{scope:r,placedSide:R,onArrowChange:C,arrowX:re,arrowY:J,shouldHideArrow:te,children:u.jsx(K.div,{"data-side":R,"data-align":Y,...p,ref:x,style:{...p.style,animation:j?void 0:"none"}})})})});ka.displayName=qr;var Da="PopperArrow",Md={top:"bottom",right:"left",bottom:"top",left:"right"},_a=i.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Od(Da,n),s=Md[a.placedSide];return u.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:u.jsx(Td,{...o,ref:r,style:{...o.style,display:"block"}})})});_a.displayName=Da;function kd(e){return e!==null}var Dd=e=>({name:"transformOrigin",options:e,fn(t){var m,y,w;const{placement:r,rects:n,middlewareData:o}=t,s=((m=o.arrow)==null?void 0:m.centerOffset)!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[d,f]=Ia(r),h={start:"0%",center:"50%",end:"100%"}[f],v=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,g=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let b="",p="";return d==="bottom"?(b=s?h:`${v}px`,p=`${-c}px`):d==="top"?(b=s?h:`${v}px`,p=`${n.floating.height+c}px`):d==="right"?(b=`${-c}px`,p=s?h:`${g}px`):d==="left"&&(b=`${n.floating.width+c}px`,p=s?h:`${g}px`),{data:{x:b,y:p}}}});function Ia(e){const[t,r="center"]=e.split("-");return[t,r]}var _d=Aa,Id=Ma,Ld=ka,Rd=_a,Fd="VisuallyHidden",Ht=i.forwardRef((e,t)=>u.jsx(K.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ht.displayName=Fd;var $d=Ht,[jt,qu]=ot("Tooltip",[Na]),Gt=Na(),La="TooltipProvider",zd=700,Zr="tooltip.open",[Wd,Qr]=jt(La),Ra=e=>{const{__scopeTooltip:t,delayDuration:r=zd,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,l]=i.useState(!0),c=i.useRef(!1),d=i.useRef(0);return i.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),u.jsx(Wd,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:i.useCallback(()=>{window.clearTimeout(d.current),l(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(f=>{c.current=f},[]),disableHoverableContent:o,children:a})};Ra.displayName=La;var Ut="Tooltip",[Bd,lt]=jt(Ut),Fa=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,c=Qr(Ut,e.__scopeTooltip),d=Gt(t),[f,h]=i.useState(null),v=gt(),g=i.useRef(0),b=s??c.disableHoverableContent,p=l??c.delayDuration,m=i.useRef(!1),[y=!1,w]=cr({prop:n,defaultProp:o,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(Zr))):c.onClose(),a==null||a(N)}}),x=i.useMemo(()=>y?m.current?"delayed-open":"instant-open":"closed",[y]),E=i.useCallback(()=>{window.clearTimeout(g.current),g.current=0,m.current=!1,w(!0)},[w]),C=i.useCallback(()=>{window.clearTimeout(g.current),g.current=0,w(!1)},[w]),S=i.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{m.current=!0,w(!0),g.current=0},p)},[p,w]);return i.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),u.jsx(_d,{...d,children:u.jsx(Bd,{scope:t,contentId:v,open:y,stateAttribute:x,trigger:f,onTriggerChange:h,onTriggerEnter:i.useCallback(()=>{c.isOpenDelayed?S():E()},[c.isOpenDelayed,S,E]),onTriggerLeave:i.useCallback(()=>{b?C():(window.clearTimeout(g.current),g.current=0)},[C,b]),onOpen:E,onClose:C,disableHoverableContent:b,children:r})})};Fa.displayName=Ut;var Jr="TooltipTrigger",$a=i.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=lt(Jr,r),a=Qr(Jr,r),s=Gt(r),l=i.useRef(null),c=ee(t,l,o.onTriggerChange),d=i.useRef(!1),f=i.useRef(!1),h=i.useCallback(()=>d.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),u.jsx(Id,{asChild:!0,...s,children:u.jsx(K.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:U(e.onPointerMove,v=>{v.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:U(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:U(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:U(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:U(e.onBlur,o.onClose),onClick:U(e.onClick,o.onClose)})})});$a.displayName=Jr;var en="TooltipPortal",[Vd,Hd]=jt(en,{forceMount:void 0}),za=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=lt(en,t);return u.jsx(Vd,{scope:t,forceMount:r,children:u.jsx(Le,{present:r||a.open,children:u.jsx(vt,{asChild:!0,container:o,children:n})})})};za.displayName=en;var et="TooltipContent",Wa=i.forwardRef((e,t)=>{const r=Hd(et,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=lt(et,e.__scopeTooltip);return u.jsx(Le,{present:n||s.open,children:s.disableHoverableContent?u.jsx(Ba,{side:o,...a,ref:t}):u.jsx(jd,{side:o,...a,ref:t})})}),jd=i.forwardRef((e,t)=>{const r=lt(et,e.__scopeTooltip),n=Qr(et,e.__scopeTooltip),o=i.useRef(null),a=ee(t,o),[s,l]=i.useState(null),{trigger:c,onClose:d}=r,f=o.current,{onPointerInTransitChange:h}=n,v=i.useCallback(()=>{l(null),h(!1)},[h]),g=i.useCallback((b,p)=>{const m=b.currentTarget,y={x:b.clientX,y:b.clientY},w=Yd(y,m.getBoundingClientRect()),x=Xd(y,w),E=qd(p.getBoundingClientRect()),C=Qd([...x,...E]);l(C),h(!0)},[h]);return i.useEffect(()=>()=>v(),[v]),i.useEffect(()=>{if(c&&f){const b=m=>g(m,f),p=m=>g(m,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",p)}}},[c,f,g,v]),i.useEffect(()=>{if(s){const b=p=>{const m=p.target,y={x:p.clientX,y:p.clientY},w=(c==null?void 0:c.contains(m))||(f==null?void 0:f.contains(m)),x=!Zd(y,s);w?v():x&&(v(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,s,d,v]),u.jsx(Ba,{...e,ref:a})}),[Gd,Ud]=jt(Ut,{isInside:!1}),Ba=i.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=e,c=lt(et,r),d=Gt(r),{onClose:f}=c;return i.useEffect(()=>(document.addEventListener(Zr,f),()=>document.removeEventListener(Zr,f)),[f]),i.useEffect(()=>{if(c.trigger){const h=v=>{const g=v.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,f]),u.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:u.jsxs(Ld,{"data-state":c.stateAttribute,...d,...l,ref:t,style:{...l.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:[u.jsx(Qn,{children:n}),u.jsx(Gd,{scope:r,isInside:!0,children:u.jsx($d,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Wa.displayName=et;var Va="TooltipArrow",Kd=i.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Gt(r);return Ud(Va,r).isInside?null:u.jsx(Rd,{...o,...n,ref:t})});Kd.displayName=Va;function Yd(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Xd(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function qd(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Zd(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const l=t[a].x,c=t[a].y,d=t[s].x,f=t[s].y;c>n!=f>n&&r<(d-l)*(n-c)/(f-c)+l&&(o=!o)}return o}function Qd(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Jd(t)}function Jd(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var eu=Ra,tu=Fa,ru=$a,nu=za,Ha=Wa;const ja=eu,Ga=tu,Ua=ru,tn=i.forwardRef(({className:e,sideOffset:t=4,...r},n)=>u.jsx(nu,{children:u.jsx(Ha,{ref:n,sideOffset:t,className:D("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));tn.displayName=Ha.displayName;const ou="sidebar:state",au=60*60*24*7,su="16rem",iu="18rem",lu="3rem",cu="b",Ka=i.createContext(null);function ct(){const e=i.useContext(Ka);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const rn=i.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:o,children:a,...s},l)=>{const c=aa(),[d,f]=i.useState(!1),[h,v]=i.useState(e),g=t??h,b=i.useCallback(w=>{const x=typeof w=="function"?w(g):w;r?r(x):v(x),document.cookie=`${ou}=${x}; path=/; max-age=${au}`},[r,g]),p=i.useCallback(()=>c?f(w=>!w):b(w=>!w),[c,b,f]);i.useEffect(()=>{const w=x=>{x.key===cu&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),p())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[p]);const m=g?"expanded":"collapsed",y=i.useMemo(()=>({state:m,open:g,setOpen:b,isMobile:c,openMobile:d,setOpenMobile:f,toggleSidebar:p}),[m,g,b,c,d,f,p]);return u.jsx(Ka.Provider,{value:y,children:u.jsx(ja,{delayDuration:0,children:u.jsx("div",{style:{"--sidebar-width":su,"--sidebar-width-icon":lu,...o},className:D("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",n),ref:l,...s,children:a})})})});rn.displayName="SidebarProvider";const nn=i.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:o,...a},s)=>{const{isMobile:l,state:c,openMobile:d,setOpenMobile:f}=ct();return r==="none"?u.jsx("div",{className:D("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:s,...a,children:o}):l?u.jsx(Jo,{open:d,onOpenChange:f,...a,children:u.jsx(Ir,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":iu},side:e,children:u.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):u.jsxs("div",{ref:s,className:"group peer hidden md:block text-sidebar-foreground","data-state":c,"data-collapsible":c==="collapsed"?r:"","data-variant":t,"data-side":e,children:[u.jsx("div",{className:D("duration-200 relative h-svh w-(--sidebar-width) bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),u.jsx("div",{className:D("duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...a,children:u.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:o})})]})});nn.displayName="Sidebar";const on=i.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:o}=ct();return u.jsxs(Xe,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:D("h-7 w-7 text-sidebar-foreground",e),onClick:a=>{t==null||t(a),o()},...r,children:[u.jsx(ri,{}),u.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});on.displayName="SidebarTrigger";const Ya=i.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=ct();return u.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:D("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Ya.displayName="SidebarRail";const Xa=i.forwardRef(({className:e,...t},r)=>u.jsx("main",{ref:r,className:D("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",e),...t}));Xa.displayName="SidebarInset";const qa=i.forwardRef(({className:e,...t},r)=>u.jsx(_t,{ref:r,"data-sidebar":"input",className:D("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));qa.displayName="SidebarInput";const an=i.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,"data-sidebar":"header",className:D("flex flex-col gap-2 p-2",e),...t}));an.displayName="SidebarHeader";const sn=i.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,"data-sidebar":"footer",className:D("flex flex-col gap-2 p-2",e),...t}));sn.displayName="SidebarFooter";const Za=i.forwardRef(({className:e,...t},r)=>u.jsx(Dr,{ref:r,"data-sidebar":"separator",className:D("mx-2 w-auto bg-sidebar-border",e),...t}));Za.displayName="SidebarSeparator";const ln=i.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,"data-sidebar":"content",className:D("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));ln.displayName="SidebarContent";const Qa=i.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,"data-sidebar":"group",className:D("relative flex w-full min-w-0 flex-col p-2",e),...t}));Qa.displayName="SidebarGroup";const Ja=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?de:"div";return u.jsx(o,{ref:n,"data-sidebar":"group-label",className:D("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});Ja.displayName="SidebarGroupLabel";const es=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?de:"button";return u.jsx(o,{ref:n,"data-sidebar":"group-action",className:D("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...r})});es.displayName="SidebarGroupAction";const ts=i.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,"data-sidebar":"group-content",className:D("w-full text-sm",e),...t}));ts.displayName="SidebarGroupContent";const cn=i.forwardRef(({className:e,...t},r)=>u.jsx("ul",{ref:r,"data-sidebar":"menu",className:D("flex w-full min-w-0 flex-col gap-1",e),...t}));cn.displayName="SidebarMenu";const dn=i.forwardRef(({className:e,...t},r)=>u.jsx("li",{ref:r,"data-sidebar":"menu-item",className:D("group/menu-item relative",e),...t}));dn.displayName="SidebarMenuItem";const du=Dt("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),un=i.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:o,className:a,...s},l)=>{const c=e?de:"button",{isMobile:d,state:f}=ct(),h=u.jsx(c,{ref:l,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:D(du({variant:r,size:n}),a),...s});return o?(typeof o=="string"&&(o={children:o}),u.jsxs(Ga,{children:[u.jsx(Ua,{asChild:!0,children:h}),u.jsx(tn,{side:"right",align:"center",hidden:f!=="collapsed"||d,...o})]})):h});un.displayName="SidebarMenuButton";const rs=i.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},o)=>{const a=t?de:"button";return u.jsx(a,{ref:o,"data-sidebar":"menu-action",className:D("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...n})});rs.displayName="SidebarMenuAction";const ns=i.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:D("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));ns.displayName="SidebarMenuBadge";const os=i.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const o=i.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return u.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:D("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&u.jsx(Rr,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),u.jsx(Rr,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});os.displayName="SidebarMenuSkeleton";const as=i.forwardRef(({className:e,...t},r)=>u.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:D("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));as.displayName="SidebarMenuSub";const ss=i.forwardRef(({...e},t)=>u.jsx("li",{ref:t,...e}));ss.displayName="SidebarMenuSubItem";const is=i.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...o},a)=>{const s=e?de:"a";return u.jsx(s,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:D("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...o})});is.displayName="SidebarMenuSubButton";function uu(e){const t=e+"CollectionProvider",[r,n]=ot(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:b,children:p}=g,m=X.useRef(null),y=X.useRef(new Map).current;return u.jsx(o,{scope:b,itemMap:y,collectionRef:m,children:p})};s.displayName=t;const l=e+"CollectionSlot",c=X.forwardRef((g,b)=>{const{scope:p,children:m}=g,y=a(l,p),w=ee(b,y.collectionRef);return u.jsx(de,{ref:w,children:m})});c.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=X.forwardRef((g,b)=>{const{scope:p,children:m,...y}=g,w=X.useRef(null),x=ee(b,w),E=a(d,p);return X.useEffect(()=>(E.itemMap.set(w,{ref:w,...y}),()=>void E.itemMap.delete(w))),u.jsx(de,{[f]:"",ref:x,children:m})});h.displayName=d;function v(g){const b=a(e+"CollectionConsumer",g);return X.useCallback(()=>{const m=b.collectionRef.current;if(!m)return[];const y=Array.from(m.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((E,C)=>y.indexOf(E.ref.current)-y.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:c,ItemSlot:h},v,n]}var fn="ToastProvider",[pn,fu,pu]=uu("Toast"),[ls,Zu]=ot("Toast",[pu]),[hu,Kt]=ls(fn),cs=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:s}=e,[l,c]=i.useState(null),[d,f]=i.useState(0),h=i.useRef(!1),v=i.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${fn}\`. Expected non-empty \`string\`.`),u.jsx(pn.Provider,{scope:t,children:u.jsx(hu,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:a,toastCount:d,viewport:l,onViewportChange:c,onToastAdd:i.useCallback(()=>f(g=>g+1),[]),onToastRemove:i.useCallback(()=>f(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:v,children:s})})};cs.displayName=fn;var ds="ToastViewport",gu=["F8"],hn="toast.viewportPause",gn="toast.viewportResume",us=i.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=gu,label:o="Notifications ({hotkey})",...a}=e,s=Kt(ds,r),l=fu(r),c=i.useRef(null),d=i.useRef(null),f=i.useRef(null),h=i.useRef(null),v=ee(t,h,s.onViewportChange),g=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=s.toastCount>0;i.useEffect(()=>{const m=y=>{var x;n.length!==0&&n.every(E=>y[E]||y.code===E)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[n]),i.useEffect(()=>{const m=c.current,y=h.current;if(b&&m&&y){const w=()=>{if(!s.isClosePausedRef.current){const S=new CustomEvent(hn);y.dispatchEvent(S),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const S=new CustomEvent(gn);y.dispatchEvent(S),s.isClosePausedRef.current=!1}},E=S=>{!m.contains(S.relatedTarget)&&x()},C=()=>{m.contains(document.activeElement)||x()};return m.addEventListener("focusin",w),m.addEventListener("focusout",E),m.addEventListener("pointermove",w),m.addEventListener("pointerleave",C),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{m.removeEventListener("focusin",w),m.removeEventListener("focusout",E),m.removeEventListener("pointermove",w),m.removeEventListener("pointerleave",C),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[b,s.isClosePausedRef]);const p=i.useCallback(({tabbingDirection:m})=>{const w=l().map(x=>{const E=x.ref.current,C=[E,...Au(E)];return m==="forwards"?C:C.reverse()});return(m==="forwards"?w.reverse():w).flat()},[l]);return i.useEffect(()=>{const m=h.current;if(m){const y=w=>{var C,S,N;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const $=document.activeElement,I=w.shiftKey;if(w.target===m&&I){(C=d.current)==null||C.focus();return}const W=p({tabbingDirection:I?"backwards":"forwards"}),_=W.findIndex(P=>P===$);bn(W.slice(_+1))?w.preventDefault():I?(S=d.current)==null||S.focus():(N=f.current)==null||N.focus()}};return m.addEventListener("keydown",y),()=>m.removeEventListener("keydown",y)}},[l,p]),u.jsxs(fl,{ref:c,role:"region","aria-label":o.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&u.jsx(mn,{ref:d,onFocusFromOutsideViewport:()=>{const m=p({tabbingDirection:"forwards"});bn(m)}}),u.jsx(pn.Slot,{scope:r,children:u.jsx(K.ol,{tabIndex:-1,...a,ref:v})}),b&&u.jsx(mn,{ref:f,onFocusFromOutsideViewport:()=>{const m=p({tabbingDirection:"backwards"});bn(m)}})]})});us.displayName=ds;var fs="ToastFocusProxy",mn=i.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,a=Kt(fs,r);return u.jsx(Ht,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var d;const l=s.relatedTarget;!((d=a.viewport)!=null&&d.contains(l))&&n()}})});mn.displayName=fs;var Yt="Toast",mu="toast.swipeStart",vu="toast.swipeMove",bu="toast.swipeCancel",yu="toast.swipeEnd",ps=i.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:a,...s}=e,[l=!0,c]=cr({prop:n,defaultProp:o,onChange:a});return u.jsx(Le,{present:r||l,children:u.jsx(Su,{open:l,...s,ref:t,onClose:()=>c(!1),onPause:ce(e.onPause),onResume:ce(e.onResume),onSwipeStart:U(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:U(e.onSwipeMove,d=>{const{x:f,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:U(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:U(e.onSwipeEnd,d=>{const{x:f,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});ps.displayName=Yt;var[wu,xu]=ls(Yt,{onClose(){}}),Su=i.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:o,open:a,onClose:s,onEscapeKeyDown:l,onPause:c,onResume:d,onSwipeStart:f,onSwipeMove:h,onSwipeCancel:v,onSwipeEnd:g,...b}=e,p=Kt(Yt,r),[m,y]=i.useState(null),w=ee(t,P=>y(P)),x=i.useRef(null),E=i.useRef(null),C=o||p.duration,S=i.useRef(0),N=i.useRef(C),$=i.useRef(0),{onToastAdd:I,onToastRemove:z}=p,H=ce(()=>{var B;(m==null?void 0:m.contains(document.activeElement))&&((B=p.viewport)==null||B.focus()),s()}),W=i.useCallback(P=>{!P||P===1/0||(window.clearTimeout($.current),S.current=new Date().getTime(),$.current=window.setTimeout(H,P))},[H]);i.useEffect(()=>{const P=p.viewport;if(P){const B=()=>{W(N.current),d==null||d()},M=()=>{const j=new Date().getTime()-S.current;N.current=N.current-j,window.clearTimeout($.current),c==null||c()};return P.addEventListener(hn,M),P.addEventListener(gn,B),()=>{P.removeEventListener(hn,M),P.removeEventListener(gn,B)}}},[p.viewport,C,c,d,W]),i.useEffect(()=>{a&&!p.isClosePausedRef.current&&W(C)},[a,C,p.isClosePausedRef,W]),i.useEffect(()=>(I(),()=>z()),[I,z]);const _=i.useMemo(()=>m?ws(m):null,[m]);return p.viewport?u.jsxs(u.Fragment,{children:[_&&u.jsx(Eu,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:_}),u.jsx(wu,{scope:r,onClose:H,children:tr.createPortal(u.jsx(pn.ItemSlot,{scope:r,children:u.jsx(ul,{asChild:!0,onEscapeKeyDown:U(l,()=>{p.isFocusedToastEscapeKeyDownRef.current||H(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(K.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":p.swipeDirection,...b,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:U(e.onKeyDown,P=>{P.key==="Escape"&&(l==null||l(P.nativeEvent),P.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:U(e.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:U(e.onPointerMove,P=>{if(!x.current)return;const B=P.clientX-x.current.x,M=P.clientY-x.current.y,j=!!E.current,k=["left","right"].includes(p.swipeDirection),R=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,Y=k?R(0,B):0,Z=k?0:R(0,M),re=P.pointerType==="touch"?10:2,J={x:Y,y:Z},te={originalEvent:P,delta:J};j?(E.current=J,Xt(vu,h,te,{discrete:!1})):xs(J,p.swipeDirection,re)?(E.current=J,Xt(mu,f,te,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(B)>re||Math.abs(M)>re)&&(x.current=null)}),onPointerUp:U(e.onPointerUp,P=>{const B=E.current,M=P.target;if(M.hasPointerCapture(P.pointerId)&&M.releasePointerCapture(P.pointerId),E.current=null,x.current=null,B){const j=P.currentTarget,k={originalEvent:P,delta:B};xs(B,p.swipeDirection,p.swipeThreshold)?Xt(yu,g,k,{discrete:!0}):Xt(bu,v,k,{discrete:!0}),j.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),Eu=e=>{const{__scopeToast:t,children:r,...n}=e,o=Kt(Yt,t),[a,s]=i.useState(!1),[l,c]=i.useState(!1);return Nu(()=>s(!0)),i.useEffect(()=>{const d=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:u.jsx(vt,{asChild:!0,children:u.jsx(Ht,{...n,children:a&&u.jsxs(u.Fragment,{children:[o.label," ",r]})})})},Cu="ToastTitle",hs=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(K.div,{...n,ref:t})});hs.displayName=Cu;var Tu="ToastDescription",gs=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(K.div,{...n,ref:t})});gs.displayName=Tu;var ms="ToastAction",vs=i.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?u.jsx(ys,{altText:r,asChild:!0,children:u.jsx(vn,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ms}\`. Expected non-empty \`string\`.`),null)});vs.displayName=ms;var bs="ToastClose",vn=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=xu(bs,r);return u.jsx(ys,{asChild:!0,children:u.jsx(K.button,{type:"button",...n,ref:t,onClick:U(e.onClick,o.onClose)})})});vn.displayName=bs;var ys=i.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return u.jsx(K.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function ws(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Pu(n)){const o=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const s=n.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...ws(n))}}),t}function Xt(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Jn(o,a):o.dispatchEvent(a)}var xs=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),a=n>o;return t==="left"||t==="right"?a&&n>r:!a&&o>r};function Nu(e=()=>{}){const t=ce(e);Ce(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Pu(e){return e.nodeType===e.ELEMENT_NODE}function Au(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function bn(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Ou=cs,Ss=us,Es=ps,Cs=hs,Ts=gs,Ns=vs,Ps=vn;const As=Ou,yn=i.forwardRef(({className:e,...t},r)=>u.jsx(Ss,{ref:r,className:D("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));yn.displayName=Ss.displayName;const Mu=Dt("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-600 bg-green-600 text-white",warning:"border-yellow-500 bg-yellow-500 text-white",info:"border-blue-500 bg-blue-500 text-white",secondary:"border-secondary bg-secondary text-secondary-foreground",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),wn=i.forwardRef(({className:e,variant:t,...r},n)=>u.jsx(Es,{ref:n,className:D(Mu({variant:t}),e),...r}));wn.displayName=Es.displayName;const Os=i.forwardRef(({className:e,...t},r)=>u.jsx(Ns,{ref:r,className:D("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus:group-[.destructive]:ring-destructive",e),...t}));Os.displayName=Ns.displayName;const xn=i.forwardRef(({className:e,...t},r)=>u.jsx(Ps,{ref:r,className:D("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-50 focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600",e),"toast-close":"",...t,children:u.jsx(rr,{className:"h-4 w-4"})}));xn.displayName=Ps.displayName;const Sn=i.forwardRef(({className:e,...t},r)=>u.jsx(Cs,{ref:r,className:D("text-sm font-semibold [&+div]:text-xs",e),...t}));Sn.displayName=Cs.displayName;const En=i.forwardRef(({className:e,...t},r)=>u.jsx(Ts,{ref:r,className:D("text-sm opacity-90",e),...t}));En.displayName=Ts.displayName;const ku=1,Du=1e6;let Cn=0;function _u(){return Cn=(Cn+1)%Number.MAX_SAFE_INTEGER,Cn.toString()}const Tn=new Map,Ms=e=>{if(Tn.has(e))return;const t=setTimeout(()=>{Tn.delete(e),dt({type:"REMOVE_TOAST",toastId:e})},Du);Tn.set(e,t)},Iu=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ku)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Ms(r):e.toasts.forEach(n=>Ms(n.id)),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return{...e,toasts:t.toastId?e.toasts.filter(r=>r.id!==t.toastId):[]}}},qt=[];let Zt={toasts:[]};function dt(e){Zt=Iu(Zt,e),qt.forEach(t=>t(Zt))}function ks({...e}){const t=_u(),r=o=>dt({type:"UPDATE_TOAST",toast:{...o,id:t}}),n=()=>dt({type:"DISMISS_TOAST",toastId:t});return dt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||n()}}}),{id:t,dismiss:n,update:r}}function Nn(){const[e,t]=i.useState(Zt);return i.useEffect(()=>(qt.push(t),()=>{const r=qt.indexOf(t);r>-1&&qt.splice(r,1)}),[]),{...e,toast:ks,dismiss:r=>dt({type:"DISMISS_TOAST",toastId:r})}}function Ds(){const{toasts:e}=Nn();return u.jsxs(As,{children:[e.map(function({id:t,title:r,description:n,action:o,...a}){return u.jsxs(wn,{...a,children:[u.jsxs("div",{className:"grid gap-1",children:[r&&u.jsx(Sn,{children:r}),n&&u.jsx(En,{children:n})]}),o,u.jsx(xn,{})]},t)}),u.jsx(yn,{})]})}function _s({onSignOut:e,searchResultsRouteName:t}){const[r,n]=X.useState(""),o=rt.useNavigate(),{toast:a}=Nn(),s=()=>{const c=r.trim();if(!c||c.length<2){a({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}const d=new URLSearchParams({q:c});o({pathname:t,search:d.toString()}),n("")},l=c=>{c.key==="Enter"&&s()};return u.jsxs("header",{className:"flex h-16 items-center gap-4 border-b sidebar-foreground bg-sidebar px-6 fixed top-0 right-0 z-50 lg:left-64 left-0 border-sidebar-border",children:[u.jsx(on,{className:"lg:hidden",children:u.jsx(ei,{className:"h-6 w-6"})}),u.jsx("div",{className:"flex flex-1 items-center gap-4",children:u.jsx("div",{className:"relative w-full max-w-sm",children:u.jsxs("div",{children:[u.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:s,"aria-label":"Search",children:u.jsx(ni,{className:"h-4 w-4 text-muted-foreground"})}),u.jsx(_t,{placeholder:"Search...",className:"w-full pl-8 bg-white text-black",value:r,onChange:c=>n(c.target.value),onKeyDown:l})]})})}),e&&u.jsx("div",{className:"flex items-center gap-4",children:u.jsxs(Xe,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[u.jsx(Js,{className:"h-4 w-4 text-sidebar-foreground"}),u.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})}function Is({routes:e,footer:t,dashboardTitle:r}){const{appID:n}=rt.useParams(),o=e.filter(a=>a.showInNav);return u.jsxs(nn,{className:"border-r border-sidebar-border",children:[u.jsx(an,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"flex items-center justify-center",children:u.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),u.jsx("span",{className:"font-semibold text-lg",children:r})]})}),u.jsx(ln,{className:"py-4 bg-sidebar text-sidebar-foreground",children:u.jsx(cn,{children:o.map(a=>{const s=a.icon,l=`/${a.path.replace(":appID",n)}`;return u.jsx(dn,{children:u.jsx(un,{asChild:!0,children:u.jsxs(rt.Link,{to:l,className:"transition-colors hover:bg-muted px-6",children:[s&&u.jsx(s,{className:"h-4 w-4"}),u.jsx("span",{children:a.label})]})})},a.key)})})}),u.jsx(sn,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:t})]})}function Lu({children:e,routes:t,footer:r,searchResultsRouteName:n,dashboardTitle:o,onSignOut:a}){return u.jsx(u.Fragment,{children:u.jsx(rn,{children:u.jsxs("div",{className:"flex grow",children:[u.jsx(Is,{routes:t,footer:r,dashboardTitle:o}),u.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[u.jsx(_s,{onSignOut:a,searchResultsRouteName:n}),u.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),u.jsx(Ds,{})]})]})})})}T.AvatarFooter=Nc,T.Button=Xe,T.Dialog=Tr,T.DialogContent=Nr,T.DialogDescription=Mr,T.DialogFooter=Ar,T.DialogHeader=Pr,T.DialogTitle=Or,T.DialogTrigger=Go,T.Input=_t,T.InputOTP=Gi,T.InputOTPGroup=Ui,T.InputOTPSeparator=Yi,T.InputOTPSlot=Ki,T.Layout=Lu,T.Navbar=Is,T.Separator=Dr,T.Sheet=Jo,T.SheetClose=Cc,T.SheetContent=Ir,T.SheetDescription=oa,T.SheetFooter=ra,T.SheetHeader=ta,T.SheetOverlay=_r,T.SheetPortal=ea,T.SheetTitle=na,T.SheetTrigger=Ec,T.Sidebar=nn,T.SidebarContent=ln,T.SidebarFooter=sn,T.SidebarGroup=Qa,T.SidebarGroupAction=es,T.SidebarGroupContent=ts,T.SidebarGroupLabel=Ja,T.SidebarHeader=an,T.SidebarInput=qa,T.SidebarInset=Xa,T.SidebarMenu=cn,T.SidebarMenuAction=rs,T.SidebarMenuBadge=ns,T.SidebarMenuButton=un,T.SidebarMenuItem=dn,T.SidebarMenuSkeleton=os,T.SidebarMenuSub=as,T.SidebarMenuSubButton=is,T.SidebarMenuSubItem=ss,T.SidebarProvider=rn,T.SidebarRail=Ya,T.SidebarSeparator=Za,T.SidebarTrigger=on,T.Skeleton=Rr,T.Toast=wn,T.ToastAction=Os,T.ToastClose=xn,T.ToastDescription=En,T.ToastProvider=As,T.ToastTitle=Sn,T.ToastViewport=yn,T.Toaster=Ds,T.Tooltip=Ga,T.TooltipContent=tn,T.TooltipProvider=ja,T.TooltipTrigger=Ua,T.Topbar=_s,T.buttonVariants=kr,T.toast=ks,T.useIsMobile=aa,T.useSidebar=ct,T.useToast=Nn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
119
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},vc="DialogDescriptionWarning",bc=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ho(vc).contentName}}.`;return i.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Cr=Oo,jo=ko,Go=_o,Pt=Io,At=Lo,Ot=Fo,Mt=zo,kt=Bo;const Tr=({modal:e=!1,...t})=>u.jsx(Cr,{modal:e,...t});Tr.displayName=Cr.displayName;const Uo=jo,yc=Go,Nr=kt,Ko=i.forwardRef(({className:e,...t},r)=>u.jsx(Pt,{ref:r,className:D("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ko.displayName=Pt.displayName;const Pr=i.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(yc,{children:[u.jsx(Ko,{}),u.jsxs(At,{ref:n,className:D("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,u.jsxs(kt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[u.jsx(rr,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Pr.displayName=At.displayName;const Ar=({className:e,...t})=>u.jsx("div",{className:D("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ar.displayName="DialogHeader";const Or=({className:e,...t})=>u.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Or.displayName="DialogFooter";const Mr=i.forwardRef(({className:e,...t},r)=>u.jsx(Ot,{ref:r,className:D("text-lg font-semibold leading-none tracking-tight",e),...t}));Mr.displayName=Ot.displayName;const kr=i.forwardRef(({className:e,...t},r)=>u.jsx(Mt,{ref:r,className:D("text-sm text-muted-foreground",e),...t}));kr.displayName=Mt.displayName;const Yo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Xo=zn,Dt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Xo(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=r==null?void 0:r[d],h=a==null?void 0:a[d];if(f===null)return null;const v=Yo(f)||Yo(h);return o[d][v]}),l=r&&Object.entries(r).reduce((d,f)=>{let[h,v]=f;return v===void 0||(d[h]=v),d},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:h,className:v,...g}=f;return Object.entries(g).every(b=>{let[p,m]=b;return Array.isArray(m)?m.includes({...a,...l}[p]):{...a,...l}[p]===m})?[...d,h,v]:d},[]);return Xo(e,s,c,r==null?void 0:r.class,r==null?void 0:r.className)},Dr=Dt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Xe=i.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,confirmationDialog:o,onClick:a,...s},l)=>{const c=n?de:"button";if(!o)return u.jsx(c,{className:D(Dr({variant:t,size:r,className:e})),ref:l,onClick:a,...s});a&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:d,content:f,onConfirm:h,confirmText:v="Confirm",cancelText:g="Cancel"}=o,b=()=>{h()};return u.jsxs(Tr,{children:[u.jsx(Uo,{asChild:!0,children:u.jsx(c,{className:D(Dr({variant:t,size:r,className:e})),ref:l,...s})}),u.jsxs(Pr,{children:[u.jsxs(Ar,{children:[u.jsx(Mr,{children:d}),u.jsx(kr,{children:f})]}),u.jsxs(Or,{className:"flex justify-end gap-2 pt-4",children:[u.jsx(Nr,{asChild:!0,children:u.jsx(Xe,{variant:"outline",children:g})}),u.jsx(Nr,{asChild:!0,children:u.jsx(Xe,{onClick:b,children:v})})]})]})]})});Xe.displayName="Button";const _t=i.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:D("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));_t.displayName="Input";var wc="Separator",qo="horizontal",xc=["horizontal","vertical"],Zo=i.forwardRef((e,t)=>{const{decorative:r,orientation:n=qo,...o}=e,a=Sc(n)?n:qo,l=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return u.jsx(K.div,{"data-orientation":a,...l,...o,ref:t})});Zo.displayName=wc;function Sc(e){return xc.includes(e)}var Qo=Zo;const _r=i.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},o)=>u.jsx(Qo,{ref:o,decorative:r,orientation:t,className:D("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));_r.displayName=Qo.displayName;const Jo=Cr,Ec=jo,Cc=kt,ea=Go,Ir=i.forwardRef(({className:e,...t},r)=>u.jsx(Pt,{className:D("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));Ir.displayName=Pt.displayName;const Tc=Dt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Lr=i.forwardRef(({side:e="right",className:t,children:r,...n},o)=>u.jsxs(ea,{children:[u.jsx(Ir,{}),u.jsxs(At,{ref:o,className:D(Tc({side:e}),t),...n,children:[u.jsxs(kt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[u.jsx(rr,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));Lr.displayName=At.displayName;const ta=({className:e,...t})=>u.jsx("div",{className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t});ta.displayName="SheetHeader";const ra=({className:e,...t})=>u.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ra.displayName="SheetFooter";const na=i.forwardRef(({className:e,...t},r)=>u.jsx(Ot,{ref:r,className:D("text-lg font-semibold text-foreground",e),...t}));na.displayName=Ot.displayName;const oa=i.forwardRef(({className:e,...t},r)=>u.jsx(Mt,{ref:r,className:D("text-sm text-muted-foreground",e),...t}));oa.displayName=Mt.displayName;function Nc({getMyAccountPath:e,publicName:t,applicationName:r}){const{appID:n}=rt.useParams(),o=`https://api.randmar.io/v4/Partner/${n}/Account/Logo?height=72&width=72`,[a,s]=X.useState(!1),l=()=>{s(!0)};return u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted",children:a?u.jsx(rt.Link,{to:`${e(n)}#brand`,className:"transition-colors hover:bg-muted px-6",children:u.jsx(oi,{className:"h-5 w-5 text-muted-foreground"})}):u.jsx("img",{src:o,alt:"Partner logo",className:"h-9 w-9 object-cover bg-neutral-100",onError:l})}),u.jsxs("div",{className:"flex flex-1 flex-col",children:[u.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),u.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}const Rr=1024;function aa(){const[e,t]=i.useState(void 0);return i.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Rr-1}px)`),n=()=>{t(window.innerWidth<Rr)};return r.addEventListener("change",n),t(window.innerWidth<Rr),()=>r.removeEventListener("change",n)},[]),!!e}function Fr({className:e,...t}){return u.jsx("div",{className:D("animate-pulse rounded-md bg-primary/20",e),...t})}const Pc=["top","right","bottom","left"],Ne=Math.min,ae=Math.max,It=Math.round,Lt=Math.floor,me=e=>({x:e,y:e}),Ac={left:"right",right:"left",bottom:"top",top:"bottom"},Oc={start:"end",end:"start"};function $r(e,t,r){return ae(e,Ne(t,r))}function we(e,t){return typeof e=="function"?e(t):e}function xe(e){return e.split("-")[0]}function qe(e){return e.split("-")[1]}function zr(e){return e==="x"?"y":"x"}function Wr(e){return e==="y"?"height":"width"}function Pe(e){return["top","bottom"].includes(xe(e))?"y":"x"}function Br(e){return zr(Pe(e))}function Mc(e,t,r){r===void 0&&(r=!1);const n=qe(e),o=Br(e),a=Wr(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Rt(s)),[s,Rt(s)]}function kc(e){const t=Rt(e);return[Vr(e),t,Vr(t)]}function Vr(e){return e.replace(/start|end/g,t=>Oc[t])}function Dc(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function _c(e,t,r,n){const o=qe(e);let a=Dc(xe(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Vr)))),a}function Rt(e){return e.replace(/left|right|bottom|top/g,t=>Ac[t])}function Ic(e){return{top:0,right:0,bottom:0,left:0,...e}}function sa(e){return typeof e!="number"?Ic(e):{top:e,right:e,bottom:e,left:e}}function Ft(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ia(e,t,r){let{reference:n,floating:o}=e;const a=Pe(t),s=Br(t),l=Wr(s),c=xe(t),d=a==="y",f=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,v=n[l]/2-o[l]/2;let g;switch(c){case"top":g={x:f,y:n.y-o.height};break;case"bottom":g={x:f,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:h};break;case"left":g={x:n.x-o.width,y:h};break;default:g={x:n.x,y:n.y}}switch(qe(t)){case"start":g[s]-=v*(r&&d?-1:1);break;case"end":g[s]+=v*(r&&d?-1:1);break}return g}const Lc=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,l=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=ia(d,n,c),v=n,g={},b=0;for(let p=0;p<l.length;p++){const{name:m,fn:y}=l[p],{x:w,y:x,data:E,reset:C}=await y({x:f,y:h,initialPlacement:n,placement:v,strategy:o,middlewareData:g,rects:d,platform:s,elements:{reference:e,floating:t}});f=w??f,h=x??h,g={...g,[m]:{...g[m],...E}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(v=C.placement),C.rects&&(d=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:h}=ia(d,v,c)),p=-1)}return{x:f,y:h,placement:v,strategy:o,middlewareData:g}};async function at(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:v=!1,padding:g=0}=we(t,e),b=sa(g),m=l[v?h==="floating"?"reference":"floating":h],y=Ft(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(m)))==null||r?m:m.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:c})),w=h==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),E=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},C=Ft(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:c}):w);return{top:(y.top-C.top+b.top)/E.y,bottom:(C.bottom-y.bottom+b.bottom)/E.y,left:(y.left-C.left+b.left)/E.x,right:(C.right-y.right+b.right)/E.x}}const Rc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:l,middlewareData:c}=t,{element:d,padding:f=0}=we(e,t)||{};if(d==null)return{};const h=sa(f),v={x:r,y:n},g=Br(o),b=Wr(g),p=await s.getDimensions(d),m=g==="y",y=m?"top":"left",w=m?"bottom":"right",x=m?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[g]-v[g]-a.floating[b],C=v[g]-a.reference[g],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let N=S?S[x]:0;(!N||!await(s.isElement==null?void 0:s.isElement(S)))&&(N=l.floating[x]||a.floating[b]);const $=E/2-C/2,I=N/2-p[b]/2-1,z=Ne(h[y],I),H=Ne(h[w],I),W=z,_=N-p[b]-H,P=N/2-p[b]/2+$,B=$r(W,P,_),M=!c.arrow&&qe(o)!=null&&P!==B&&a.reference[b]/2-(P<W?z:H)-p[b]/2<0,j=M?P<W?P-W:P-_:0;return{[g]:v[g]+j,data:{[g]:B,centerOffset:P-B-j,...M&&{alignmentOffset:j}},reset:M}}}),Fc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...m}=we(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=xe(o),w=Pe(l),x=xe(l)===l,E=await(c.isRTL==null?void 0:c.isRTL(d.floating)),C=v||(x||!p?[Rt(l)]:kc(l)),S=b!=="none";!v&&S&&C.push(..._c(l,p,b,E));const N=[l,...C],$=await at(t,m),I=[];let z=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&I.push($[y]),h){const P=Mc(o,s,E);I.push($[P[0]],$[P[1]])}if(z=[...z,{placement:o,overflows:I}],!I.every(P=>P<=0)){var H,W;const P=(((H=a.flip)==null?void 0:H.index)||0)+1,B=N[P];if(B)return{data:{index:P,overflows:z},reset:{placement:B}};let M=(W=z.filter(j=>j.overflows[0]<=0).sort((j,k)=>j.overflows[1]-k.overflows[1])[0])==null?void 0:W.placement;if(!M)switch(g){case"bestFit":{var _;const j=(_=z.filter(k=>{if(S){const R=Pe(k.placement);return R===w||R==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(R=>R>0).reduce((R,Y)=>R+Y,0)]).sort((k,R)=>k[1]-R[1])[0])==null?void 0:_[0];j&&(M=j);break}case"initialPlacement":M=l;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function la(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ca(e){return Pc.some(t=>e[t]>=0)}const $c=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=we(e,t);switch(n){case"referenceHidden":{const a=await at(t,{...o,elementContext:"reference"}),s=la(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:ca(s)}}}case"escaped":{const a=await at(t,{...o,altBoundary:!0}),s=la(a,r.floating);return{data:{escapedOffsets:s,escaped:ca(s)}}}default:return{}}}}};async function zc(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=xe(r),l=qe(r),c=Pe(r)==="y",d=["left","top"].includes(s)?-1:1,f=a&&c?-1:1,h=we(t,e);let{mainAxis:v,crossAxis:g,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),c?{x:g*f,y:v*d}:{x:v*d,y:g*f}}const Wc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:l}=t,c=await zc(t,e);return s===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},Bc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:m=>{let{x:y,y:w}=m;return{x:y,y:w}}},...c}=we(e,t),d={x:r,y:n},f=await at(t,c),h=Pe(xe(o)),v=zr(h);let g=d[v],b=d[h];if(a){const m=v==="y"?"top":"left",y=v==="y"?"bottom":"right",w=g+f[m],x=g-f[y];g=$r(w,g,x)}if(s){const m=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=b+f[m],x=b-f[y];b=$r(w,b,x)}const p=l.fn({...t,[v]:g,[h]:b});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[v]:a,[h]:s}}}}}},Vc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=we(e,t),f={x:r,y:n},h=Pe(o),v=zr(h);let g=f[v],b=f[h];const p=we(l,t),m=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const x=v==="y"?"height":"width",E=a.reference[v]-a.floating[x]+m.mainAxis,C=a.reference[v]+a.reference[x]-m.mainAxis;g<E?g=E:g>C&&(g=C)}if(d){var y,w;const x=v==="y"?"width":"height",E=["top","left"].includes(xe(o)),C=a.reference[h]-a.floating[x]+(E&&((y=s.offset)==null?void 0:y[h])||0)+(E?0:m.crossAxis),S=a.reference[h]+a.reference[x]+(E?0:((w=s.offset)==null?void 0:w[h])||0)-(E?m.crossAxis:0);b<C?b=C:b>S&&(b=S)}return{[v]:g,[h]:b}}}},Hc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:l}=t,{apply:c=()=>{},...d}=we(e,t),f=await at(t,d),h=xe(o),v=qe(o),g=Pe(o)==="y",{width:b,height:p}=a.floating;let m,y;h==="top"||h==="bottom"?(m=h,y=v===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=h,m=v==="end"?"top":"bottom");const w=p-f.top-f.bottom,x=b-f.left-f.right,E=Ne(p-f[m],w),C=Ne(b-f[y],x),S=!t.middlewareData.shift;let N=E,$=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&($=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=w),S&&!v){const z=ae(f.left,0),H=ae(f.right,0),W=ae(f.top,0),_=ae(f.bottom,0);g?$=b-2*(z!==0||H!==0?z+H:ae(f.left,f.right)):N=p-2*(W!==0||_!==0?W+_:ae(f.top,f.bottom))}await c({...t,availableWidth:$,availableHeight:N});const I=await s.getDimensions(l.floating);return b!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function $t(){return typeof window<"u"}function Ze(e){return da(e)?(e.nodeName||"").toLowerCase():"#document"}function se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ve(e){var t;return(t=(da(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function da(e){return $t()?e instanceof Node||e instanceof se(e).Node:!1}function fe(e){return $t()?e instanceof Element||e instanceof se(e).Element:!1}function be(e){return $t()?e instanceof HTMLElement||e instanceof se(e).HTMLElement:!1}function ua(e){return!$t()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof se(e).ShadowRoot}function st(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function jc(e){return["table","td","th"].includes(Ze(e))}function zt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Hr(e){const t=jr(),r=fe(e)?pe(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Gc(e){let t=Ae(e);for(;be(t)&&!Qe(t);){if(Hr(t))return t;if(zt(t))return null;t=Ae(t)}return null}function jr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Qe(e){return["html","body","#document"].includes(Ze(e))}function pe(e){return se(e).getComputedStyle(e)}function Wt(e){return fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(Ze(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ua(e)&&e.host||ve(e);return ua(t)?t.host:t}function fa(e){const t=Ae(e);return Qe(t)?e.ownerDocument?e.ownerDocument.body:e.body:be(t)&&st(t)?t:fa(t)}function it(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=fa(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=se(o);if(a){const l=Gr(s);return t.concat(s,s.visualViewport||[],st(o)?o:[],l&&r?it(l):[])}return t.concat(o,it(o,[],r))}function Gr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pa(e){const t=pe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=be(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,l=It(r)!==a||It(n)!==s;return l&&(r=a,n=s),{width:r,height:n,$:l}}function Ur(e){return fe(e)?e:e.contextElement}function Je(e){const t=Ur(e);if(!be(t))return me(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=pa(t);let s=(a?It(r.width):r.width)/n,l=(a?It(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Uc=me(0);function ha(e){const t=se(e);return!jr()||!t.visualViewport?Uc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kc(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==se(e)?!1:t}function Fe(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Ur(e);let s=me(1);t&&(n?fe(n)&&(s=Je(n)):s=Je(e));const l=Kc(a,r,n)?ha(a):me(0);let c=(o.left+l.x)/s.x,d=(o.top+l.y)/s.y,f=o.width/s.x,h=o.height/s.y;if(a){const v=se(a),g=n&&fe(n)?se(n):n;let b=v,p=Gr(b);for(;p&&n&&g!==b;){const m=Je(p),y=p.getBoundingClientRect(),w=pe(p),x=y.left+(p.clientLeft+parseFloat(w.paddingLeft))*m.x,E=y.top+(p.clientTop+parseFloat(w.paddingTop))*m.y;c*=m.x,d*=m.y,f*=m.x,h*=m.y,c+=x,d+=E,b=se(p),p=Gr(b)}}return Ft({width:f,height:h,x:c,y:d})}function Kr(e,t){const r=Wt(e).scrollLeft;return t?t.left+r:Fe(ve(e)).left+r}function ga(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:Kr(e,n)),a=n.top+t.scrollTop;return{x:o,y:a}}function Yc(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=ve(n),l=t?zt(t.floating):!1;if(n===s||l&&a)return r;let c={scrollLeft:0,scrollTop:0},d=me(1);const f=me(0),h=be(n);if((h||!h&&!a)&&((Ze(n)!=="body"||st(s))&&(c=Wt(n)),be(n))){const g=Fe(n);d=Je(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const v=s&&!h&&!a?ga(s,c,!0):me(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+f.x+v.x,y:r.y*d.y-c.scrollTop*d.y+f.y+v.y}}function Xc(e){return Array.from(e.getClientRects())}function qc(e){const t=ve(e),r=Wt(e),n=e.ownerDocument.body,o=ae(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=ae(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Kr(e);const l=-r.scrollTop;return pe(n).direction==="rtl"&&(s+=ae(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:l}}function Zc(e,t){const r=se(e),n=ve(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,l=0,c=0;if(o){a=o.width,s=o.height;const d=jr();(!d||d&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:l,y:c}}function Qc(e,t){const r=Fe(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=be(e)?Je(e):me(1),s=e.clientWidth*a.x,l=e.clientHeight*a.y,c=o*a.x,d=n*a.y;return{width:s,height:l,x:c,y:d}}function ma(e,t,r){let n;if(t==="viewport")n=Zc(e,r);else if(t==="document")n=qc(ve(e));else if(fe(t))n=Qc(t,r);else{const o=ha(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ft(n)}function va(e,t){const r=Ae(e);return r===t||!fe(r)||Qe(r)?!1:pe(r).position==="fixed"||va(r,t)}function Jc(e,t){const r=t.get(e);if(r)return r;let n=it(e,[],!1).filter(l=>fe(l)&&Ze(l)!=="body"),o=null;const a=pe(e).position==="fixed";let s=a?Ae(e):e;for(;fe(s)&&!Qe(s);){const l=pe(s),c=Hr(s);!c&&l.position==="fixed"&&(o=null),(a?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||st(s)&&!c&&va(e,s))?n=n.filter(f=>f!==s):o=l,s=Ae(s)}return t.set(e,n),n}function ed(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?zt(t)?[]:Jc(t,this._c):[].concat(r),n],l=s[0],c=s.reduce((d,f)=>{const h=ma(t,f,o);return d.top=ae(h.top,d.top),d.right=Ne(h.right,d.right),d.bottom=Ne(h.bottom,d.bottom),d.left=ae(h.left,d.left),d},ma(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function td(e){const{width:t,height:r}=pa(e);return{width:t,height:r}}function rd(e,t,r){const n=be(t),o=ve(t),a=r==="fixed",s=Fe(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=me(0);if(n||!n&&!a)if((Ze(t)!=="body"||st(o))&&(l=Wt(t)),n){const v=Fe(t,!0,a,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&(c.x=Kr(o));const d=o&&!n&&!a?ga(o,l):me(0),f=s.left+l.scrollLeft-c.x-d.x,h=s.top+l.scrollTop-c.y-d.y;return{x:f,y:h,width:s.width,height:s.height}}function Yr(e){return pe(e).position==="static"}function ba(e,t){if(!be(e)||pe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ve(e)===r&&(r=r.ownerDocument.body),r}function ya(e,t){const r=se(e);if(zt(e))return r;if(!be(e)){let o=Ae(e);for(;o&&!Qe(o);){if(fe(o)&&!Yr(o))return o;o=Ae(o)}return r}let n=ba(e,t);for(;n&&jc(n)&&Yr(n);)n=ba(n,t);return n&&Qe(n)&&Yr(n)&&!Hr(n)?r:n||Gc(e)||r}const nd=async function(e){const t=this.getOffsetParent||ya,r=this.getDimensions,n=await r(e.floating);return{reference:rd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function od(e){return pe(e).direction==="rtl"}const ad={convertOffsetParentRelativeRectToViewportRelativeRect:Yc,getDocumentElement:ve,getClippingRect:ed,getOffsetParent:ya,getElementRects:nd,getClientRects:Xc,getDimensions:td,getScale:Je,isElement:fe,isRTL:od};function wa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sd(e,t){let r=null,n;const o=ve(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const d=e.getBoundingClientRect(),{left:f,top:h,width:v,height:g}=d;if(l||t(),!v||!g)return;const b=Lt(h),p=Lt(o.clientWidth-(f+v)),m=Lt(o.clientHeight-(h+g)),y=Lt(f),x={rootMargin:-b+"px "+-p+"px "+-m+"px "+-y+"px",threshold:ae(0,Ne(1,c))||1};let E=!0;function C(S){const N=S[0].intersectionRatio;if(N!==c){if(!E)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!wa(d,e.getBoundingClientRect())&&s(),E=!1}try{r=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}return s(!0),a}function id(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=Ur(e),f=o||a?[...d?it(d):[],...it(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const h=d&&l?sd(d,r):null;let v=-1,g=null;s&&(g=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),r()}),d&&!c&&g.observe(d),g.observe(t));let b,p=c?Fe(e):null;c&&m();function m(){const y=Fe(e);p&&!wa(p,y)&&r(),p=y,b=requestAnimationFrame(m)}return r(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",r),a&&w.removeEventListener("resize",r)}),h==null||h(),(y=g)==null||y.disconnect(),g=null,c&&cancelAnimationFrame(b)}}const ld=Wc,cd=Bc,dd=Fc,ud=Hc,fd=$c,xa=Rc,pd=Vc,hd=(e,t,r)=>{const n=new Map,o={platform:ad,...r},a={...o.platform,_c:n};return Lc(e,t,{...o,platform:a})};var Bt=typeof document<"u"?X.useLayoutEffect:X.useEffect;function Vt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Vt(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Vt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Sa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ea(e,t){const r=Sa(e);return Math.round(t*r)/r}function Xr(e){const t=i.useRef(e);return Bt(()=>{t.current=e}),t}function gd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[f,h]=i.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,g]=i.useState(n);Vt(v,n)||g(n);const[b,p]=i.useState(null),[m,y]=i.useState(null),w=i.useCallback(k=>{k!==S.current&&(S.current=k,p(k))},[]),x=i.useCallback(k=>{k!==N.current&&(N.current=k,y(k))},[]),E=a||b,C=s||m,S=i.useRef(null),N=i.useRef(null),$=i.useRef(f),I=c!=null,z=Xr(c),H=Xr(o),W=Xr(d),_=i.useCallback(()=>{if(!S.current||!N.current)return;const k={placement:t,strategy:r,middleware:v};H.current&&(k.platform=H.current),hd(S.current,N.current,k).then(R=>{const Y={...R,isPositioned:W.current!==!1};P.current&&!Vt($.current,Y)&&($.current=Y,tr.flushSync(()=>{h(Y)}))})},[v,t,r,H,W]);Bt(()=>{d===!1&&$.current.isPositioned&&($.current.isPositioned=!1,h(k=>({...k,isPositioned:!1})))},[d]);const P=i.useRef(!1);Bt(()=>(P.current=!0,()=>{P.current=!1}),[]),Bt(()=>{if(E&&(S.current=E),C&&(N.current=C),E&&C){if(z.current)return z.current(E,C,_);_()}},[E,C,_,z,I]);const B=i.useMemo(()=>({reference:S,floating:N,setReference:w,setFloating:x}),[w,x]),M=i.useMemo(()=>({reference:E,floating:C}),[E,C]),j=i.useMemo(()=>{const k={position:r,left:0,top:0};if(!M.floating)return k;const R=Ea(M.floating,f.x),Y=Ea(M.floating,f.y);return l?{...k,transform:"translate("+R+"px, "+Y+"px)",...Sa(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:Y}},[r,l,M.floating,f.x,f.y]);return i.useMemo(()=>({...f,update:_,refs:B,elements:M,floatingStyles:j}),[f,_,B,M,j])}const md=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?xa({element:n.current,padding:o}).fn(r):{}:n?xa({element:n,padding:o}).fn(r):{}}}},vd=(e,t)=>({...ld(e),options:[e,t]}),bd=(e,t)=>({...cd(e),options:[e,t]}),yd=(e,t)=>({...pd(e),options:[e,t]}),wd=(e,t)=>({...dd(e),options:[e,t]}),xd=(e,t)=>({...ud(e),options:[e,t]}),Sd=(e,t)=>({...fd(e),options:[e,t]}),Ed=(e,t)=>({...md(e),options:[e,t]});var Cd="Arrow",Ca=i.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return u.jsx(K.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ca.displayName=Cd;var Td=Ca;function Nd(e){const[t,r]=i.useState(void 0);return Ce(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,l;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;s=d.inlineSize,l=d.blockSize}else s=e.offsetWidth,l=e.offsetHeight;r({width:s,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var qr="Popper",[Ta,Na]=ot(qr),[Pd,Pa]=Ta(qr),Aa=e=>{const{__scopePopper:t,children:r}=e,[n,o]=i.useState(null);return u.jsx(Pd,{scope:t,anchor:n,onAnchorChange:o,children:r})};Aa.displayName=qr;var Oa="PopperAnchor",Ma=i.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Pa(Oa,r),s=i.useRef(null),l=ee(t,s);return i.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:u.jsx(K.div,{...o,ref:l})});Ma.displayName=Oa;var Zr="PopperContent",[Ad,Od]=Ta(Zr),ka=i.forwardRef((e,t)=>{var ye,ut,Qt,ft,Jt,tt;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:g="optimized",onPlaced:b,...p}=e,m=Pa(Zr,r),[y,w]=i.useState(null),x=ee(t,$e=>w($e)),[E,C]=i.useState(null),S=Nd(E),N=(S==null?void 0:S.width)??0,$=(S==null?void 0:S.height)??0,I=n+(a!=="center"?"-"+a:""),z=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},H=Array.isArray(d)?d:[d],W=H.length>0,_={padding:z,boundary:H.filter(kd),altBoundary:W},{refs:P,floatingStyles:B,placement:M,isPositioned:j,middlewareData:k}=gd({strategy:"fixed",placement:I,whileElementsMounted:(...$e)=>id(...$e,{animationFrame:g==="always"}),elements:{reference:m.anchor},middleware:[vd({mainAxis:o+$,alignmentAxis:s}),c&&bd({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?yd():void 0,..._}),c&&wd({..._}),xd({..._,apply:({elements:$e,rects:L,availableWidth:F,availableHeight:Q})=>{const{width:ne,height:oe}=L.reference,G=$e.floating.style;G.setProperty("--radix-popper-available-width",`${F}px`),G.setProperty("--radix-popper-available-height",`${Q}px`),G.setProperty("--radix-popper-anchor-width",`${ne}px`),G.setProperty("--radix-popper-anchor-height",`${oe}px`)}}),E&&Ed({element:E,padding:l}),Dd({arrowWidth:N,arrowHeight:$}),v&&Sd({strategy:"referenceHidden",..._})]}),[R,Y]=Ia(M),Z=ce(b);Ce(()=>{j&&(Z==null||Z())},[j,Z]);const re=(ye=k.arrow)==null?void 0:ye.x,J=(ut=k.arrow)==null?void 0:ut.y,te=((Qt=k.arrow)==null?void 0:Qt.centerOffset)!==0,[ie,Oe]=i.useState();return Ce(()=>{y&&Oe(window.getComputedStyle(y).zIndex)},[y]),u.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:j?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(ft=k.transformOrigin)==null?void 0:ft.x,(Jt=k.transformOrigin)==null?void 0:Jt.y].join(" "),...((tt=k.hide)==null?void 0:tt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Ad,{scope:r,placedSide:R,onArrowChange:C,arrowX:re,arrowY:J,shouldHideArrow:te,children:u.jsx(K.div,{"data-side":R,"data-align":Y,...p,ref:x,style:{...p.style,animation:j?void 0:"none"}})})})});ka.displayName=Zr;var Da="PopperArrow",Md={top:"bottom",right:"left",bottom:"top",left:"right"},_a=i.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Od(Da,n),s=Md[a.placedSide];return u.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:u.jsx(Td,{...o,ref:r,style:{...o.style,display:"block"}})})});_a.displayName=Da;function kd(e){return e!==null}var Dd=e=>({name:"transformOrigin",options:e,fn(t){var m,y,w;const{placement:r,rects:n,middlewareData:o}=t,s=((m=o.arrow)==null?void 0:m.centerOffset)!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[d,f]=Ia(r),h={start:"0%",center:"50%",end:"100%"}[f],v=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,g=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let b="",p="";return d==="bottom"?(b=s?h:`${v}px`,p=`${-c}px`):d==="top"?(b=s?h:`${v}px`,p=`${n.floating.height+c}px`):d==="right"?(b=`${-c}px`,p=s?h:`${g}px`):d==="left"&&(b=`${n.floating.width+c}px`,p=s?h:`${g}px`),{data:{x:b,y:p}}}});function Ia(e){const[t,r="center"]=e.split("-");return[t,r]}var _d=Aa,Id=Ma,Ld=ka,Rd=_a,Fd="VisuallyHidden",Ht=i.forwardRef((e,t)=>u.jsx(K.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ht.displayName=Fd;var $d=Ht,[jt,qu]=ot("Tooltip",[Na]),Gt=Na(),La="TooltipProvider",zd=700,Qr="tooltip.open",[Wd,Jr]=jt(La),Ra=e=>{const{__scopeTooltip:t,delayDuration:r=zd,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,l]=i.useState(!0),c=i.useRef(!1),d=i.useRef(0);return i.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),u.jsx(Wd,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:i.useCallback(()=>{window.clearTimeout(d.current),l(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(f=>{c.current=f},[]),disableHoverableContent:o,children:a})};Ra.displayName=La;var Ut="Tooltip",[Bd,lt]=jt(Ut),Fa=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,c=Jr(Ut,e.__scopeTooltip),d=Gt(t),[f,h]=i.useState(null),v=gt(),g=i.useRef(0),b=s??c.disableHoverableContent,p=l??c.delayDuration,m=i.useRef(!1),[y=!1,w]=cr({prop:n,defaultProp:o,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(Qr))):c.onClose(),a==null||a(N)}}),x=i.useMemo(()=>y?m.current?"delayed-open":"instant-open":"closed",[y]),E=i.useCallback(()=>{window.clearTimeout(g.current),g.current=0,m.current=!1,w(!0)},[w]),C=i.useCallback(()=>{window.clearTimeout(g.current),g.current=0,w(!1)},[w]),S=i.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{m.current=!0,w(!0),g.current=0},p)},[p,w]);return i.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),u.jsx(_d,{...d,children:u.jsx(Bd,{scope:t,contentId:v,open:y,stateAttribute:x,trigger:f,onTriggerChange:h,onTriggerEnter:i.useCallback(()=>{c.isOpenDelayed?S():E()},[c.isOpenDelayed,S,E]),onTriggerLeave:i.useCallback(()=>{b?C():(window.clearTimeout(g.current),g.current=0)},[C,b]),onOpen:E,onClose:C,disableHoverableContent:b,children:r})})};Fa.displayName=Ut;var en="TooltipTrigger",$a=i.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=lt(en,r),a=Jr(en,r),s=Gt(r),l=i.useRef(null),c=ee(t,l,o.onTriggerChange),d=i.useRef(!1),f=i.useRef(!1),h=i.useCallback(()=>d.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),u.jsx(Id,{asChild:!0,...s,children:u.jsx(K.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:U(e.onPointerMove,v=>{v.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:U(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:U(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:U(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:U(e.onBlur,o.onClose),onClick:U(e.onClick,o.onClose)})})});$a.displayName=en;var tn="TooltipPortal",[Vd,Hd]=jt(tn,{forceMount:void 0}),za=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=lt(tn,t);return u.jsx(Vd,{scope:t,forceMount:r,children:u.jsx(Le,{present:r||a.open,children:u.jsx(vt,{asChild:!0,container:o,children:n})})})};za.displayName=tn;var et="TooltipContent",Wa=i.forwardRef((e,t)=>{const r=Hd(et,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=lt(et,e.__scopeTooltip);return u.jsx(Le,{present:n||s.open,children:s.disableHoverableContent?u.jsx(Ba,{side:o,...a,ref:t}):u.jsx(jd,{side:o,...a,ref:t})})}),jd=i.forwardRef((e,t)=>{const r=lt(et,e.__scopeTooltip),n=Jr(et,e.__scopeTooltip),o=i.useRef(null),a=ee(t,o),[s,l]=i.useState(null),{trigger:c,onClose:d}=r,f=o.current,{onPointerInTransitChange:h}=n,v=i.useCallback(()=>{l(null),h(!1)},[h]),g=i.useCallback((b,p)=>{const m=b.currentTarget,y={x:b.clientX,y:b.clientY},w=Yd(y,m.getBoundingClientRect()),x=Xd(y,w),E=qd(p.getBoundingClientRect()),C=Qd([...x,...E]);l(C),h(!0)},[h]);return i.useEffect(()=>()=>v(),[v]),i.useEffect(()=>{if(c&&f){const b=m=>g(m,f),p=m=>g(m,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",p)}}},[c,f,g,v]),i.useEffect(()=>{if(s){const b=p=>{const m=p.target,y={x:p.clientX,y:p.clientY},w=(c==null?void 0:c.contains(m))||(f==null?void 0:f.contains(m)),x=!Zd(y,s);w?v():x&&(v(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,s,d,v]),u.jsx(Ba,{...e,ref:a})}),[Gd,Ud]=jt(Ut,{isInside:!1}),Ba=i.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=e,c=lt(et,r),d=Gt(r),{onClose:f}=c;return i.useEffect(()=>(document.addEventListener(Qr,f),()=>document.removeEventListener(Qr,f)),[f]),i.useEffect(()=>{if(c.trigger){const h=v=>{const g=v.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,f]),u.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:u.jsxs(Ld,{"data-state":c.stateAttribute,...d,...l,ref:t,style:{...l.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:[u.jsx(Jn,{children:n}),u.jsx(Gd,{scope:r,isInside:!0,children:u.jsx($d,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Wa.displayName=et;var Va="TooltipArrow",Kd=i.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Gt(r);return Ud(Va,r).isInside?null:u.jsx(Rd,{...o,...n,ref:t})});Kd.displayName=Va;function Yd(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Xd(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function qd(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Zd(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const l=t[a].x,c=t[a].y,d=t[s].x,f=t[s].y;c>n!=f>n&&r<(d-l)*(n-c)/(f-c)+l&&(o=!o)}return o}function Qd(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Jd(t)}function Jd(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var eu=Ra,tu=Fa,ru=$a,nu=za,Ha=Wa;const ja=eu,Ga=tu,Ua=ru,rn=i.forwardRef(({className:e,sideOffset:t=4,...r},n)=>u.jsx(nu,{children:u.jsx(Ha,{ref:n,sideOffset:t,className:D("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));rn.displayName=Ha.displayName;const ou="sidebar:state",au=60*60*24*7,su="16rem",iu="18rem",lu="3rem",cu="b",Ka=i.createContext(null);function ct(){const e=i.useContext(Ka);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const nn=i.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:o,children:a,...s},l)=>{const c=aa(),[d,f]=i.useState(!1),[h,v]=i.useState(e),g=t??h,b=i.useCallback(w=>{const x=typeof w=="function"?w(g):w;r?r(x):v(x),document.cookie=`${ou}=${x}; path=/; max-age=${au}`},[r,g]),p=i.useCallback(()=>c?f(w=>!w):b(w=>!w),[c,b,f]);i.useEffect(()=>{const w=x=>{x.key===cu&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),p())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[p]);const m=g?"expanded":"collapsed",y=i.useMemo(()=>({state:m,open:g,setOpen:b,isMobile:c,openMobile:d,setOpenMobile:f,toggleSidebar:p}),[m,g,b,c,d,f,p]);return u.jsx(Ka.Provider,{value:y,children:u.jsx(ja,{delayDuration:0,children:u.jsx("div",{style:{"--sidebar-width":su,"--sidebar-width-icon":lu,...o},className:D("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",n),ref:l,...s,children:a})})})});nn.displayName="SidebarProvider";const on=i.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:o,...a},s)=>{const{isMobile:l,state:c,openMobile:d,setOpenMobile:f}=ct();return r==="none"?u.jsx("div",{className:D("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:s,...a,children:o}):l?u.jsx(Jo,{open:d,onOpenChange:f,...a,children:u.jsx(Lr,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":iu},side:e,children:u.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):u.jsxs("div",{ref:s,className:"group peer hidden md:block text-sidebar-foreground","data-state":c,"data-collapsible":c==="collapsed"?r:"","data-variant":t,"data-side":e,children:[u.jsx("div",{className:D("duration-200 relative h-svh w-(--sidebar-width) bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),u.jsx("div",{className:D("duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...a,children:u.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:o})})]})});on.displayName="Sidebar";const an=i.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:o}=ct();return u.jsxs(Xe,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:D("h-7 w-7 text-sidebar-foreground",e),onClick:a=>{t==null||t(a),o()},...r,children:[u.jsx(ri,{}),u.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});an.displayName="SidebarTrigger";const Ya=i.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=ct();return u.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:D("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Ya.displayName="SidebarRail";const Xa=i.forwardRef(({className:e,...t},r)=>u.jsx("main",{ref:r,className:D("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",e),...t}));Xa.displayName="SidebarInset";const qa=i.forwardRef(({className:e,...t},r)=>u.jsx(_t,{ref:r,"data-sidebar":"input",className:D("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));qa.displayName="SidebarInput";const sn=i.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,"data-sidebar":"header",className:D("flex flex-col gap-2 p-2",e),...t}));sn.displayName="SidebarHeader";const ln=i.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,"data-sidebar":"footer",className:D("flex flex-col gap-2 p-2",e),...t}));ln.displayName="SidebarFooter";const Za=i.forwardRef(({className:e,...t},r)=>u.jsx(_r,{ref:r,"data-sidebar":"separator",className:D("mx-2 w-auto bg-sidebar-border",e),...t}));Za.displayName="SidebarSeparator";const cn=i.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,"data-sidebar":"content",className:D("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));cn.displayName="SidebarContent";const Qa=i.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,"data-sidebar":"group",className:D("relative flex w-full min-w-0 flex-col p-2",e),...t}));Qa.displayName="SidebarGroup";const Ja=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?de:"div";return u.jsx(o,{ref:n,"data-sidebar":"group-label",className:D("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});Ja.displayName="SidebarGroupLabel";const es=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?de:"button";return u.jsx(o,{ref:n,"data-sidebar":"group-action",className:D("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...r})});es.displayName="SidebarGroupAction";const ts=i.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,"data-sidebar":"group-content",className:D("w-full text-sm",e),...t}));ts.displayName="SidebarGroupContent";const dn=i.forwardRef(({className:e,...t},r)=>u.jsx("ul",{ref:r,"data-sidebar":"menu",className:D("flex w-full min-w-0 flex-col gap-1",e),...t}));dn.displayName="SidebarMenu";const un=i.forwardRef(({className:e,...t},r)=>u.jsx("li",{ref:r,"data-sidebar":"menu-item",className:D("group/menu-item relative",e),...t}));un.displayName="SidebarMenuItem";const du=Dt("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),fn=i.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:o,className:a,...s},l)=>{const c=e?de:"button",{isMobile:d,state:f}=ct(),h=u.jsx(c,{ref:l,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:D(du({variant:r,size:n}),a),...s});return o?(typeof o=="string"&&(o={children:o}),u.jsxs(Ga,{children:[u.jsx(Ua,{asChild:!0,children:h}),u.jsx(rn,{side:"right",align:"center",hidden:f!=="collapsed"||d,...o})]})):h});fn.displayName="SidebarMenuButton";const rs=i.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},o)=>{const a=t?de:"button";return u.jsx(a,{ref:o,"data-sidebar":"menu-action",className:D("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...n})});rs.displayName="SidebarMenuAction";const ns=i.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:D("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));ns.displayName="SidebarMenuBadge";const os=i.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const o=i.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return u.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:D("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&u.jsx(Fr,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),u.jsx(Fr,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});os.displayName="SidebarMenuSkeleton";const as=i.forwardRef(({className:e,...t},r)=>u.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:D("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));as.displayName="SidebarMenuSub";const ss=i.forwardRef(({...e},t)=>u.jsx("li",{ref:t,...e}));ss.displayName="SidebarMenuSubItem";const is=i.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...o},a)=>{const s=e?de:"a";return u.jsx(s,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:D("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...o})});is.displayName="SidebarMenuSubButton";function uu(e){const t=e+"CollectionProvider",[r,n]=ot(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:b,children:p}=g,m=X.useRef(null),y=X.useRef(new Map).current;return u.jsx(o,{scope:b,itemMap:y,collectionRef:m,children:p})};s.displayName=t;const l=e+"CollectionSlot",c=X.forwardRef((g,b)=>{const{scope:p,children:m}=g,y=a(l,p),w=ee(b,y.collectionRef);return u.jsx(de,{ref:w,children:m})});c.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=X.forwardRef((g,b)=>{const{scope:p,children:m,...y}=g,w=X.useRef(null),x=ee(b,w),E=a(d,p);return X.useEffect(()=>(E.itemMap.set(w,{ref:w,...y}),()=>void E.itemMap.delete(w))),u.jsx(de,{[f]:"",ref:x,children:m})});h.displayName=d;function v(g){const b=a(e+"CollectionConsumer",g);return X.useCallback(()=>{const m=b.collectionRef.current;if(!m)return[];const y=Array.from(m.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((E,C)=>y.indexOf(E.ref.current)-y.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:c,ItemSlot:h},v,n]}var pn="ToastProvider",[hn,fu,pu]=uu("Toast"),[ls,Zu]=ot("Toast",[pu]),[hu,Kt]=ls(pn),cs=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:s}=e,[l,c]=i.useState(null),[d,f]=i.useState(0),h=i.useRef(!1),v=i.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${pn}\`. Expected non-empty \`string\`.`),u.jsx(hn.Provider,{scope:t,children:u.jsx(hu,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:a,toastCount:d,viewport:l,onViewportChange:c,onToastAdd:i.useCallback(()=>f(g=>g+1),[]),onToastRemove:i.useCallback(()=>f(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:v,children:s})})};cs.displayName=pn;var ds="ToastViewport",gu=["F8"],gn="toast.viewportPause",mn="toast.viewportResume",us=i.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=gu,label:o="Notifications ({hotkey})",...a}=e,s=Kt(ds,r),l=fu(r),c=i.useRef(null),d=i.useRef(null),f=i.useRef(null),h=i.useRef(null),v=ee(t,h,s.onViewportChange),g=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=s.toastCount>0;i.useEffect(()=>{const m=y=>{var x;n.length!==0&&n.every(E=>y[E]||y.code===E)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[n]),i.useEffect(()=>{const m=c.current,y=h.current;if(b&&m&&y){const w=()=>{if(!s.isClosePausedRef.current){const S=new CustomEvent(gn);y.dispatchEvent(S),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const S=new CustomEvent(mn);y.dispatchEvent(S),s.isClosePausedRef.current=!1}},E=S=>{!m.contains(S.relatedTarget)&&x()},C=()=>{m.contains(document.activeElement)||x()};return m.addEventListener("focusin",w),m.addEventListener("focusout",E),m.addEventListener("pointermove",w),m.addEventListener("pointerleave",C),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{m.removeEventListener("focusin",w),m.removeEventListener("focusout",E),m.removeEventListener("pointermove",w),m.removeEventListener("pointerleave",C),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[b,s.isClosePausedRef]);const p=i.useCallback(({tabbingDirection:m})=>{const w=l().map(x=>{const E=x.ref.current,C=[E,...Au(E)];return m==="forwards"?C:C.reverse()});return(m==="forwards"?w.reverse():w).flat()},[l]);return i.useEffect(()=>{const m=h.current;if(m){const y=w=>{var C,S,N;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const $=document.activeElement,I=w.shiftKey;if(w.target===m&&I){(C=d.current)==null||C.focus();return}const W=p({tabbingDirection:I?"backwards":"forwards"}),_=W.findIndex(P=>P===$);yn(W.slice(_+1))?w.preventDefault():I?(S=d.current)==null||S.focus():(N=f.current)==null||N.focus()}};return m.addEventListener("keydown",y),()=>m.removeEventListener("keydown",y)}},[l,p]),u.jsxs(fl,{ref:c,role:"region","aria-label":o.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&u.jsx(vn,{ref:d,onFocusFromOutsideViewport:()=>{const m=p({tabbingDirection:"forwards"});yn(m)}}),u.jsx(hn.Slot,{scope:r,children:u.jsx(K.ol,{tabIndex:-1,...a,ref:v})}),b&&u.jsx(vn,{ref:f,onFocusFromOutsideViewport:()=>{const m=p({tabbingDirection:"backwards"});yn(m)}})]})});us.displayName=ds;var fs="ToastFocusProxy",vn=i.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,a=Kt(fs,r);return u.jsx(Ht,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var d;const l=s.relatedTarget;!((d=a.viewport)!=null&&d.contains(l))&&n()}})});vn.displayName=fs;var Yt="Toast",mu="toast.swipeStart",vu="toast.swipeMove",bu="toast.swipeCancel",yu="toast.swipeEnd",ps=i.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:a,...s}=e,[l=!0,c]=cr({prop:n,defaultProp:o,onChange:a});return u.jsx(Le,{present:r||l,children:u.jsx(Su,{open:l,...s,ref:t,onClose:()=>c(!1),onPause:ce(e.onPause),onResume:ce(e.onResume),onSwipeStart:U(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:U(e.onSwipeMove,d=>{const{x:f,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:U(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:U(e.onSwipeEnd,d=>{const{x:f,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});ps.displayName=Yt;var[wu,xu]=ls(Yt,{onClose(){}}),Su=i.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:o,open:a,onClose:s,onEscapeKeyDown:l,onPause:c,onResume:d,onSwipeStart:f,onSwipeMove:h,onSwipeCancel:v,onSwipeEnd:g,...b}=e,p=Kt(Yt,r),[m,y]=i.useState(null),w=ee(t,P=>y(P)),x=i.useRef(null),E=i.useRef(null),C=o||p.duration,S=i.useRef(0),N=i.useRef(C),$=i.useRef(0),{onToastAdd:I,onToastRemove:z}=p,H=ce(()=>{var B;(m==null?void 0:m.contains(document.activeElement))&&((B=p.viewport)==null||B.focus()),s()}),W=i.useCallback(P=>{!P||P===1/0||(window.clearTimeout($.current),S.current=new Date().getTime(),$.current=window.setTimeout(H,P))},[H]);i.useEffect(()=>{const P=p.viewport;if(P){const B=()=>{W(N.current),d==null||d()},M=()=>{const j=new Date().getTime()-S.current;N.current=N.current-j,window.clearTimeout($.current),c==null||c()};return P.addEventListener(gn,M),P.addEventListener(mn,B),()=>{P.removeEventListener(gn,M),P.removeEventListener(mn,B)}}},[p.viewport,C,c,d,W]),i.useEffect(()=>{a&&!p.isClosePausedRef.current&&W(C)},[a,C,p.isClosePausedRef,W]),i.useEffect(()=>(I(),()=>z()),[I,z]);const _=i.useMemo(()=>m?ws(m):null,[m]);return p.viewport?u.jsxs(u.Fragment,{children:[_&&u.jsx(Eu,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:_}),u.jsx(wu,{scope:r,onClose:H,children:tr.createPortal(u.jsx(hn.ItemSlot,{scope:r,children:u.jsx(ul,{asChild:!0,onEscapeKeyDown:U(l,()=>{p.isFocusedToastEscapeKeyDownRef.current||H(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(K.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":p.swipeDirection,...b,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:U(e.onKeyDown,P=>{P.key==="Escape"&&(l==null||l(P.nativeEvent),P.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:U(e.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:U(e.onPointerMove,P=>{if(!x.current)return;const B=P.clientX-x.current.x,M=P.clientY-x.current.y,j=!!E.current,k=["left","right"].includes(p.swipeDirection),R=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,Y=k?R(0,B):0,Z=k?0:R(0,M),re=P.pointerType==="touch"?10:2,J={x:Y,y:Z},te={originalEvent:P,delta:J};j?(E.current=J,Xt(vu,h,te,{discrete:!1})):xs(J,p.swipeDirection,re)?(E.current=J,Xt(mu,f,te,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(B)>re||Math.abs(M)>re)&&(x.current=null)}),onPointerUp:U(e.onPointerUp,P=>{const B=E.current,M=P.target;if(M.hasPointerCapture(P.pointerId)&&M.releasePointerCapture(P.pointerId),E.current=null,x.current=null,B){const j=P.currentTarget,k={originalEvent:P,delta:B};xs(B,p.swipeDirection,p.swipeThreshold)?Xt(yu,g,k,{discrete:!0}):Xt(bu,v,k,{discrete:!0}),j.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),Eu=e=>{const{__scopeToast:t,children:r,...n}=e,o=Kt(Yt,t),[a,s]=i.useState(!1),[l,c]=i.useState(!1);return Nu(()=>s(!0)),i.useEffect(()=>{const d=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:u.jsx(vt,{asChild:!0,children:u.jsx(Ht,{...n,children:a&&u.jsxs(u.Fragment,{children:[o.label," ",r]})})})},Cu="ToastTitle",hs=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(K.div,{...n,ref:t})});hs.displayName=Cu;var Tu="ToastDescription",gs=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(K.div,{...n,ref:t})});gs.displayName=Tu;var ms="ToastAction",vs=i.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?u.jsx(ys,{altText:r,asChild:!0,children:u.jsx(bn,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ms}\`. Expected non-empty \`string\`.`),null)});vs.displayName=ms;var bs="ToastClose",bn=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=xu(bs,r);return u.jsx(ys,{asChild:!0,children:u.jsx(K.button,{type:"button",...n,ref:t,onClick:U(e.onClick,o.onClose)})})});bn.displayName=bs;var ys=i.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return u.jsx(K.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function ws(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Pu(n)){const o=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const s=n.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...ws(n))}}),t}function Xt(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?eo(o,a):o.dispatchEvent(a)}var xs=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),a=n>o;return t==="left"||t==="right"?a&&n>r:!a&&o>r};function Nu(e=()=>{}){const t=ce(e);Ce(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Pu(e){return e.nodeType===e.ELEMENT_NODE}function Au(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function yn(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Ou=cs,Ss=us,Es=ps,Cs=hs,Ts=gs,Ns=vs,Ps=bn;const As=Ou,wn=i.forwardRef(({className:e,...t},r)=>u.jsx(Ss,{ref:r,className:D("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));wn.displayName=Ss.displayName;const Mu=Dt("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-600 bg-green-600 text-white",warning:"border-yellow-500 bg-yellow-500 text-white",info:"border-blue-500 bg-blue-500 text-white",secondary:"border-secondary bg-secondary text-secondary-foreground",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),xn=i.forwardRef(({className:e,variant:t,...r},n)=>u.jsx(Es,{ref:n,className:D(Mu({variant:t}),e),...r}));xn.displayName=Es.displayName;const Os=i.forwardRef(({className:e,...t},r)=>u.jsx(Ns,{ref:r,className:D("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus:group-[.destructive]:ring-destructive",e),...t}));Os.displayName=Ns.displayName;const Sn=i.forwardRef(({className:e,...t},r)=>u.jsx(Ps,{ref:r,className:D("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-50 focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600",e),"toast-close":"",...t,children:u.jsx(rr,{className:"h-4 w-4"})}));Sn.displayName=Ps.displayName;const En=i.forwardRef(({className:e,...t},r)=>u.jsx(Cs,{ref:r,className:D("text-sm font-semibold [&+div]:text-xs",e),...t}));En.displayName=Cs.displayName;const Cn=i.forwardRef(({className:e,...t},r)=>u.jsx(Ts,{ref:r,className:D("text-sm opacity-90",e),...t}));Cn.displayName=Ts.displayName;const ku=1,Du=1e6;let Tn=0;function _u(){return Tn=(Tn+1)%Number.MAX_SAFE_INTEGER,Tn.toString()}const Nn=new Map,Ms=e=>{if(Nn.has(e))return;const t=setTimeout(()=>{Nn.delete(e),dt({type:"REMOVE_TOAST",toastId:e})},Du);Nn.set(e,t)},Iu=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ku)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Ms(r):e.toasts.forEach(n=>Ms(n.id)),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return{...e,toasts:t.toastId?e.toasts.filter(r=>r.id!==t.toastId):[]}}},qt=[];let Zt={toasts:[]};function dt(e){Zt=Iu(Zt,e),qt.forEach(t=>t(Zt))}function ks({...e}){const t=_u(),r=o=>dt({type:"UPDATE_TOAST",toast:{...o,id:t}}),n=()=>dt({type:"DISMISS_TOAST",toastId:t});return dt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||n()}}}),{id:t,dismiss:n,update:r}}function Pn(){const[e,t]=i.useState(Zt);return i.useEffect(()=>(qt.push(t),()=>{const r=qt.indexOf(t);r>-1&&qt.splice(r,1)}),[]),{...e,toast:ks,dismiss:r=>dt({type:"DISMISS_TOAST",toastId:r})}}function Ds(){const{toasts:e}=Pn();return u.jsxs(As,{children:[e.map(function({id:t,title:r,description:n,action:o,...a}){return u.jsxs(xn,{...a,children:[u.jsxs("div",{className:"grid gap-1",children:[r&&u.jsx(En,{children:r}),n&&u.jsx(Cn,{children:n})]}),o,u.jsx(Sn,{})]},t)}),u.jsx(wn,{})]})}function _s({onSignOut:e,searchResultsRouteName:t}){const[r,n]=X.useState(""),o=rt.useNavigate(),{toast:a}=Pn(),s=()=>{const c=r.trim();if(!c||c.length<2){a({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}const d=new URLSearchParams({q:c});o({pathname:t,search:d.toString()}),n("")},l=c=>{c.key==="Enter"&&s()};return u.jsxs("header",{className:"flex h-16 items-center gap-4 border-b sidebar-foreground bg-sidebar px-6 fixed top-0 right-0 z-50 lg:left-64 left-0 border-sidebar-border",children:[u.jsx(an,{className:"lg:hidden",children:u.jsx(ei,{className:"h-6 w-6"})}),u.jsx("div",{className:"flex flex-1 items-center gap-4",children:u.jsx("div",{className:"relative w-full max-w-sm",children:u.jsxs("div",{children:[u.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:s,"aria-label":"Search",children:u.jsx(ni,{className:"h-4 w-4 text-muted-foreground"})}),u.jsx(_t,{placeholder:"Search...",className:"w-full pl-8 bg-white text-black",value:r,onChange:c=>n(c.target.value),onKeyDown:l})]})})}),e&&u.jsx("div",{className:"flex items-center gap-4",children:u.jsxs(Xe,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[u.jsx(Js,{className:"h-4 w-4 text-sidebar-foreground"}),u.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})}function Is({routes:e,footer:t,dashboardTitle:r}){const{appID:n}=rt.useParams(),o=e.filter(a=>a.showInNav);return u.jsxs(on,{className:"border-r border-sidebar-border",children:[u.jsx(sn,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"flex items-center justify-center",children:u.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),u.jsx("span",{className:"font-semibold text-lg",children:r})]})}),u.jsx(cn,{className:"py-4 bg-sidebar text-sidebar-foreground",children:u.jsx(dn,{children:o.map(a=>{const s=a.icon,l=`/${a.path.replace(":appID",n)}`;return u.jsx(un,{children:u.jsx(fn,{asChild:!0,children:u.jsxs(rt.Link,{to:l,className:"transition-colors hover:bg-muted px-6",children:[s&&u.jsx(s,{className:"h-4 w-4"}),u.jsx("span",{children:a.label})]})})},a.key)})})}),u.jsx(ln,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:t})]})}function Lu({children:e,routes:t,footer:r,searchResultsRouteName:n,dashboardTitle:o,onSignOut:a}){return u.jsx(u.Fragment,{children:u.jsx(nn,{children:u.jsxs("div",{className:"flex grow",children:[u.jsx(Is,{routes:t,footer:r,dashboardTitle:o}),u.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[u.jsx(_s,{onSignOut:a,searchResultsRouteName:n}),u.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),u.jsx(Ds,{})]})]})})})}T.AvatarFooter=Nc,T.Button=Xe,T.Dialog=Tr,T.DialogClose=Nr,T.DialogContent=Pr,T.DialogDescription=kr,T.DialogFooter=Or,T.DialogHeader=Ar,T.DialogTitle=Mr,T.DialogTrigger=Uo,T.Input=_t,T.InputOTP=Gi,T.InputOTPGroup=Ui,T.InputOTPSeparator=Yi,T.InputOTPSlot=Ki,T.Layout=Lu,T.Navbar=Is,T.Separator=_r,T.Sheet=Jo,T.SheetClose=Cc,T.SheetContent=Lr,T.SheetDescription=oa,T.SheetFooter=ra,T.SheetHeader=ta,T.SheetOverlay=Ir,T.SheetPortal=ea,T.SheetTitle=na,T.SheetTrigger=Ec,T.Sidebar=on,T.SidebarContent=cn,T.SidebarFooter=ln,T.SidebarGroup=Qa,T.SidebarGroupAction=es,T.SidebarGroupContent=ts,T.SidebarGroupLabel=Ja,T.SidebarHeader=sn,T.SidebarInput=qa,T.SidebarInset=Xa,T.SidebarMenu=dn,T.SidebarMenuAction=rs,T.SidebarMenuBadge=ns,T.SidebarMenuButton=fn,T.SidebarMenuItem=un,T.SidebarMenuSkeleton=os,T.SidebarMenuSub=as,T.SidebarMenuSubButton=is,T.SidebarMenuSubItem=ss,T.SidebarProvider=nn,T.SidebarRail=Ya,T.SidebarSeparator=Za,T.SidebarTrigger=an,T.Skeleton=Fr,T.Toast=xn,T.ToastAction=Os,T.ToastClose=Sn,T.ToastDescription=Cn,T.ToastProvider=As,T.ToastTitle=En,T.ToastViewport=wn,T.Toaster=Ds,T.Tooltip=Ga,T.TooltipContent=rn,T.TooltipProvider=ja,T.TooltipTrigger=Ua,T.Topbar=_s,T.buttonVariants=Dr,T.toast=ks,T.useIsMobile=aa,T.useSidebar=ct,T.useToast=Pn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "randmarcomps",
3
3
  "private": false,
4
- "version": "1.39.0",
4
+ "version": "1.40.0",
5
5
  "description": "The UI library enabling speed and consistency in Randmar frontends.",
6
6
  "type": "module",
7
7
  "files": [