randmarcomps 1.76.0 → 1.77.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.
- package/dist/randmarcomps.js +812 -801
- package/dist/randmarcomps.umd.cjs +30 -30
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(E,o){typeof exports=="object"&&typeof module<"u"?o(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"],o):(E=typeof globalThis<"u"?globalThis:E||self,o(E.randmarcomps={},E.jsxRuntime,E.React,E.ReactDOM,E["react-router-dom"]))})(this,function(E,o,U,zn,fr){"use strict";function Bn(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 l=Bn(U),pr=Bn(zn);var
|
|
1
|
+
(function(E,o){typeof exports=="object"&&typeof module<"u"?o(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"],o):(E=typeof globalThis<"u"?globalThis:E||self,o(E.randmarcomps={},E.jsxRuntime,E.React,E.ReactDOM,E["react-router-dom"]))})(this,function(E,o,U,zn,fr){"use strict";function Bn(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 l=Bn(U),pr=Bn(zn);var ti=Object.defineProperty,ri=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,Wn=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,jn=(e,t,r)=>t in e?ti(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oi=(e,t)=>{for(var r in t||(t={}))Wn.call(t,r)&&jn(e,r,t[r]);if(Ct)for(var r of Ct(t))Vn.call(t,r)&&jn(e,r,t[r]);return e},ai=(e,t)=>ri(e,ni(t)),si=(e,t)=>{var r={};for(var n in e)Wn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ct)for(var n of Ct(e))t.indexOf(n)<0&&Vn.call(e,n)&&(r[n]=e[n]);return r};function ii(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function li(e){let t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var ci=18,Hn=40,di=`${Hn}px`,ui=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function fi({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[a,s]=l.useState(!1),[i,c]=l.useState(!1),[u,d]=l.useState(!1),p=l.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&a&&i,[a,i,r]),h=l.useCallback(()=>{let m=e.current,v=t.current;if(!m||!v||u||r==="none")return;let y=m,f=y.getBoundingClientRect().left+y.offsetWidth,g=y.getBoundingClientRect().top+y.offsetHeight/2,b=f-ci,w=g;document.querySelectorAll(ui).length===0&&document.elementFromPoint(b,w)===m||(s(!0),d(!0))},[e,t,u,r]);return l.useEffect(()=>{let m=e.current;if(!m||r==="none")return;function v(){let f=window.innerWidth-m.getBoundingClientRect().right;c(f>=Hn)}v();let y=setInterval(v,1e3);return()=>{clearInterval(y)}},[e,r]),l.useEffect(()=>{let m=n||document.activeElement===t.current;if(r==="none"||!m)return;let v=setTimeout(h,0),y=setTimeout(h,2e3),f=setTimeout(h,5e3),g=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(v),clearTimeout(y),clearTimeout(f),clearTimeout(g)}},[t,n,r,h]),{hasPWMBadge:a,willPushPWMBadge:p,PWM_BADGE_SPACE_WIDTH:di}}var Un=l.createContext({}),Gn=l.forwardRef((e,t)=>{var r=e,{value:n,onChange:a,maxLength:s,textAlign:i="left",pattern:c,placeholder:u,inputMode:d="numeric",onComplete:p,pushPasswordManagerStrategy:h="increase-width",pasteTransformer:m,containerClassName:v,noScriptCSSFallback:y=pi,render:f,children:g}=r,b=si(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),w,x,N,S,C;let[T,z]=l.useState(typeof b.defaultValue=="string"?b.defaultValue:""),_=n??T,V=li(_),G=l.useCallback(L=>{a==null||a(L),z(L)},[a]),j=l.useMemo(()=>c?typeof c=="string"?new RegExp(c):c:null,[c]),I=l.useRef(null),P=l.useRef(null),B=l.useRef({value:_,onChange:G,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"))}),k=l.useRef({prev:[(N=I.current)==null?void 0:N.selectionStart,(S=I.current)==null?void 0:S.selectionEnd,(C=I.current)==null?void 0:C.selectionDirection]});l.useImperativeHandle(t,()=>I.current,[]),l.useEffect(()=>{let L=I.current,W=P.current;if(!L||!W)return;B.current.value!==L.value&&B.current.onChange(L.value),k.current.prev=[L.selectionStart,L.selectionEnd,L.selectionDirection];function se(){if(document.activeElement!==L){ae(null),ne(null);return}let q=L.selectionStart,ge=L.selectionEnd,ur=L.selectionDirection,Ce=L.maxLength,Ye=L.value,ke=k.current.prev,ze=-1,Be=-1,Qe;if(Ye.length!==0&&q!==null&&ge!==null){let hf=q===ge,gf=q===Ye.length&&Ye.length<Ce;if(hf&&!gf){let Xe=q;if(Xe===0)ze=0,Be=1,Qe="forward";else if(Xe===Ce)ze=Xe-1,Be=Xe,Qe="backward";else if(Ce>1&&Ye.length>1){let Fn=0;if(ke[0]!==null&&ke[1]!==null){Qe=Xe<ke[1]?"backward":"forward";let vf=ke[0]===ke[1]&&ke[0]<Ce;Qe==="backward"&&!vf&&(Fn=-1)}ze=Fn+Xe,Be=Fn+Xe+1}}ze!==-1&&Be!==-1&&ze!==Be&&I.current.setSelectionRange(ze,Be,Qe)}let Rs=ze!==-1?ze:q,ei=Be!==-1?Be:ge,pf=Qe??ur;ae(Rs),ne(ei),k.current.prev=[Rs,ei,pf]}if(document.addEventListener("selectionchange",se,{capture:!0}),se(),document.activeElement===L&&Z(!0),!document.getElementById("input-otp-style")){let q=document.createElement("style");if(q.id="input-otp-style",document.head.appendChild(q),q.sheet){let ge="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;";ft(q.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),ft(q.sheet,`[data-input-otp]:autofill { ${ge} }`),ft(q.sheet,`[data-input-otp]:-webkit-autofill { ${ge} }`),ft(q.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; } }"),ft(q.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ce=()=>{W&&W.style.setProperty("--root-height",`${L.clientHeight}px`)};ce();let de=new ResizeObserver(ce);return de.observe(L),()=>{document.removeEventListener("selectionchange",se,{capture:!0}),de.disconnect()}},[]);let[K,D]=l.useState(!1),[$,Z]=l.useState(!1),[ee,ae]=l.useState(null),[te,ne]=l.useState(null);l.useEffect(()=>{ii(()=>{var L,W,se,ce;(L=I.current)==null||L.dispatchEvent(new Event("input"));let de=(W=I.current)==null?void 0:W.selectionStart,q=(se=I.current)==null?void 0:se.selectionEnd,ge=(ce=I.current)==null?void 0:ce.selectionDirection;de!==null&&q!==null&&(ae(de),ne(q),k.current.prev=[de,q,ge])})},[_,$]),l.useEffect(()=>{V!==void 0&&_!==V&&V.length<s&&_.length===s&&(p==null||p(_))},[s,p,V,_]);let ie=fi({containerRef:P,inputRef:I,pushPasswordManagerStrategy:h,isFocused:$}),Ne=l.useCallback(L=>{let W=L.currentTarget.value.slice(0,s);if(W.length>0&&j&&!j.test(W)){L.preventDefault();return}typeof V=="string"&&W.length<V.length&&document.dispatchEvent(new Event("selectionchange")),G(W)},[s,G,V,j]),pe=l.useCallback(()=>{var L;if(I.current){let W=Math.min(I.current.value.length,s-1),se=I.current.value.length;(L=I.current)==null||L.setSelectionRange(W,se),ae(W),ne(se)}Z(!0)},[s]),Fe=l.useCallback(L=>{var W,se;let ce=I.current;if(!m&&(!B.current.isIOS||!L.clipboardData||!ce))return;let de=L.clipboardData.getData("text/plain"),q=m?m(de):de;L.preventDefault();let ge=(W=I.current)==null?void 0:W.selectionStart,ur=(se=I.current)==null?void 0:se.selectionEnd,Ce=(ge!==ur?_.slice(0,ge)+q+_.slice(ur):_.slice(0,ge)+q+_.slice(ge)).slice(0,s);if(Ce.length>0&&j&&!j.test(Ce))return;ce.value=Ce,G(Ce);let Ye=Math.min(Ce.length,s-1),ke=Ce.length;ce.setSelectionRange(Ye,ke),ae(Ye),ne(ke)},[s,G,j,_]),Ke=l.useMemo(()=>({position:"relative",cursor:b.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[b.disabled]),F=l.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:i,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,i]),Q=l.useMemo(()=>l.createElement("input",ai(oi({autoComplete:b.autoComplete||"one-time-code"},b),{"data-input-otp":!0,"data-input-otp-placeholder-shown":_.length===0||void 0,"data-input-otp-mss":ee,"data-input-otp-mse":te,inputMode:d,pattern:j==null?void 0:j.source,"aria-placeholder":u,style:F,maxLength:s,value:_,ref:I,onPaste:L=>{var W;Fe(L),(W=b.onPaste)==null||W.call(b,L)},onChange:Ne,onMouseOver:L=>{var W;D(!0),(W=b.onMouseOver)==null||W.call(b,L)},onMouseLeave:L=>{var W;D(!1),(W=b.onMouseLeave)==null||W.call(b,L)},onFocus:L=>{var W;pe(),(W=b.onFocus)==null||W.call(b,L)},onBlur:L=>{var W;Z(!1),(W=b.onBlur)==null||W.call(b,L)}})),[Ne,pe,Fe,d,F,s,te,ee,b,j==null?void 0:j.source,_]),he=l.useMemo(()=>({slots:Array.from({length:s}).map((L,W)=>{var se;let ce=$&&ee!==null&&te!==null&&(ee===te&&W===ee||W>=ee&&W<te),de=_[W]!==void 0?_[W]:null,q=_[0]!==void 0?null:(se=u==null?void 0:u[W])!=null?se:null;return{char:de,placeholderChar:q,isActive:ce,hasFakeCaret:ce&&de===null}}),isFocused:$,isHovering:!b.disabled&&K}),[$,K,s,te,ee,b.disabled,_]),qe=l.useMemo(()=>f?f(he):l.createElement(Un.Provider,{value:he},g),[g,he,f]);return l.createElement(l.Fragment,null,y!==null&&l.createElement("noscript",null,l.createElement("style",null,y)),l.createElement("div",{ref:P,"data-input-otp-container":!0,style:Ke,className:v},qe,l.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Q)))});Gn.displayName="Input";function ft(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var pi=`
|
|
2
2
|
[data-input-otp] {
|
|
3
3
|
--nojs-bg: white !important;
|
|
4
4
|
--nojs-fg: black !important;
|
|
@@ -22,22 +22,22 @@
|
|
|
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
|
|
25
|
+
*/const hi=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kn=(...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.
|
|
29
29
|
* See the LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/var
|
|
30
|
+
*/var gi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
31
31
|
* @license lucide-react v0.479.0 - ISC
|
|
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
|
|
35
|
+
*/const vi=U.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:s,iconNode:i,...c},u)=>U.createElement("svg",{ref:u,...gi,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Kn("lucide",a),...c},[...i.map(([d,p])=>U.createElement(d,p)),...Array.isArray(s)?s:[s]]));/**
|
|
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 R=(e,t)=>{const r=U.forwardRef(({className:n,...a},s)=>U.createElement(
|
|
40
|
+
*/const R=(e,t)=>{const r=U.forwardRef(({className:n,...a},s)=>U.createElement(vi,{ref:s,iconNode:t,className:Kn(`lucide-${hi(e)}`,n),...a}));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.
|
|
@@ -47,22 +47,22 @@
|
|
|
47
47
|
*
|
|
48
48
|
* This source code is licensed under the ISC license.
|
|
49
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/const
|
|
50
|
+
*/const mi=R("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/**
|
|
51
51
|
* @license lucide-react v0.479.0 - ISC
|
|
52
52
|
*
|
|
53
53
|
* This source code is licensed under the ISC license.
|
|
54
54
|
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const
|
|
55
|
+
*/const bi=R("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
56
56
|
* @license lucide-react v0.479.0 - ISC
|
|
57
57
|
*
|
|
58
58
|
* This source code is licensed under the ISC license.
|
|
59
59
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/const
|
|
60
|
+
*/const yi=R("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
61
61
|
* @license lucide-react v0.479.0 - ISC
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the ISC license.
|
|
64
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const
|
|
65
|
+
*/const wi=R("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
66
66
|
* @license lucide-react v0.479.0 - ISC
|
|
67
67
|
*
|
|
68
68
|
* This source code is licensed under the ISC license.
|
|
@@ -72,47 +72,47 @@
|
|
|
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
|
|
75
|
+
*/const xi=R("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
|
|
76
76
|
* @license lucide-react v0.479.0 - ISC
|
|
77
77
|
*
|
|
78
78
|
* This source code is licensed under the ISC license.
|
|
79
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const
|
|
80
|
+
*/const Ni=R("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
81
81
|
* @license lucide-react v0.479.0 - ISC
|
|
82
82
|
*
|
|
83
83
|
* This source code is licensed under the ISC license.
|
|
84
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const
|
|
85
|
+
*/const Ci=R("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
86
86
|
* @license lucide-react v0.479.0 - ISC
|
|
87
87
|
*
|
|
88
88
|
* This source code is licensed under the ISC license.
|
|
89
89
|
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const
|
|
90
|
+
*/const Si=R("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
91
91
|
* @license lucide-react v0.479.0 - ISC
|
|
92
92
|
*
|
|
93
93
|
* This source code is licensed under the ISC license.
|
|
94
94
|
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const
|
|
95
|
+
*/const Ei=R("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
96
96
|
* @license lucide-react v0.479.0 - ISC
|
|
97
97
|
*
|
|
98
98
|
* This source code is licensed under the ISC license.
|
|
99
99
|
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const
|
|
100
|
+
*/const Ti=R("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
|
|
101
101
|
* @license lucide-react v0.479.0 - ISC
|
|
102
102
|
*
|
|
103
103
|
* This source code is licensed under the ISC license.
|
|
104
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const
|
|
105
|
+
*/const Pi=R("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
106
106
|
* @license lucide-react v0.479.0 - ISC
|
|
107
107
|
*
|
|
108
108
|
* This source code is licensed under the ISC license.
|
|
109
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const
|
|
110
|
+
*/const Ai=R("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
111
111
|
* @license lucide-react v0.479.0 - ISC
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the ISC license.
|
|
114
114
|
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const
|
|
115
|
+
*/const Qn=R("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
116
116
|
* @license lucide-react v0.479.0 - ISC
|
|
117
117
|
*
|
|
118
118
|
* This source code is licensed under the ISC license.
|
|
@@ -132,17 +132,17 @@
|
|
|
132
132
|
*
|
|
133
133
|
* This source code is licensed under the ISC license.
|
|
134
134
|
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const
|
|
135
|
+
*/const Zn=R("Warehouse",[["path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z",key:"gksnxg"}],["path",{d:"M6 18h12",key:"9pbo8z"}],["path",{d:"M6 14h12",key:"4cwo0f"}],["rect",{width:"12",height:"12",x:"6",y:"10",key:"apd30q"}]]);/**
|
|
136
136
|
* @license lucide-react v0.479.0 - ISC
|
|
137
137
|
*
|
|
138
138
|
* This source code is licensed under the ISC license.
|
|
139
139
|
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const hr=R("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Zn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Zn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Jn(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Zn(e))&&(n&&(n+=" "),n+=t);return n}const gr="-",Oi=e=>{const t=_i(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const c=i.split(gr);return c[0]===""&&c.length!==1&&c.shift(),Rn(c,t)||Di(i)},getConflictingClassGroupIds:(i,c)=>{const u=r[i]||[];return c&&n[i]?[...u,...n[i]]:u}}},Rn=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?Rn(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(gr);return(i=t.validators.find(({validator:c})=>c(s)))==null?void 0:i.classGroupId},eo=/^\[(.+)\]$/,Di=e=>{if(eo.test(e)){const t=eo.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},_i=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const a in r)vr(r[a],n,a,t);return n},vr=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:to(t,a);s.classGroupId=r;return}if(typeof a=="function"){if(Ii(a)){vr(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([s,i])=>{vr(i,to(t,s),r,n)})})},to=(e,t)=>{let r=e;return t.split(gr).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Ii=e=>e.isThemeGetter,Li=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(s,i)=>{r.set(s,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let i=r.get(s);if(i!==void 0)return i;if((i=n.get(s))!==void 0)return a(s,i),i},set(s,i){r.has(s)?r.set(s,i):a(s,i)}}},mr="!",br=":",$i=br.length,Fi=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a=>{const s=[];let i=0,c=0,u=0,d;for(let y=0;y<a.length;y++){let f=a[y];if(i===0&&c===0){if(f===br){s.push(a.slice(u,y)),u=y+$i;continue}if(f==="/"){d=y;continue}}f==="["?i++:f==="]"?i--:f==="("?c++:f===")"&&c--}const p=s.length===0?a:a.substring(u),h=zi(p),m=h!==p,v=d&&d>u?d-u:void 0;return{modifiers:s,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:v}};if(t){const a=t+br,s=n;n=i=>i.startsWith(a)?s(i.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const a=n;n=s=>r({className:s,parseClassName:a})}return n},zi=e=>e.endsWith(mr)?e.substring(0,e.length-1):e.startsWith(mr)?e.substring(1):e,Bi=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const a=[];let s=[];return n.forEach(i=>{i[0]==="["||t[i]?(a.push(...s.sort(),i),s=[]):s.push(i)}),a.push(...s.sort()),a}},Wi=e=>({cache:Li(e.cacheSize),parseClassName:Fi(e),sortModifiers:Bi(e),...Oi(e)}),Vi=/\s+/,ji=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=t,i=[],c=e.trim().split(Vi);let u="";for(let d=c.length-1;d>=0;d-=1){const p=c[d],{isExternal:h,modifiers:m,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:f}=r(p);if(h){u=p+(u.length>0?" "+u:u);continue}let g=!!f,b=n(g?y.substring(0,f):y);if(!b){if(!g){u=p+(u.length>0?" "+u:u);continue}if(b=n(y),!b){u=p+(u.length>0?" "+u:u);continue}g=!1}const w=s(m).join(":"),x=v?w+mr:w,N=x+b;if(i.includes(N))continue;i.push(N);const S=a(b,g);for(let C=0;C<S.length;++C){const T=S[C];i.push(x+T)}u=p+(u.length>0?" "+u:u)}return u};function Hi(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ro(t))&&(n&&(n+=" "),n+=r);return n}const ro=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=ro(e[n]))&&(r&&(r+=" "),r+=t);return r};function Ui(e,...t){let r,n,a,s=i;function i(u){const d=t.reduce((p,h)=>h(p),e());return r=Wi(d),n=r.cache.get,a=r.cache.set,s=c,c(u)}function c(u){const d=n(u);if(d)return d;const p=ji(u,r);return a(u,p),p}return function(){return s(Hi.apply(null,arguments))}}const re=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},no=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,oo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Gi=/^\d+\/\d+$/,Ki=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qi=/\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$/,Yi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Xi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xe=e=>Gi.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),Be=e=>!!e&&Number.isInteger(Number(e)),ao=e=>e.endsWith("%")&&H(e.slice(0,-1)),Oe=e=>Ki.test(e),Zi=()=>!0,Ji=e=>qi.test(e)&&!Yi.test(e),yr=()=>!1,Ri=e=>Xi.test(e),el=e=>Qi.test(e),tl=e=>!A(e)&&!M(e),rl=e=>Qe(e,lo,yr),A=e=>no.test(e),We=e=>Qe(e,co,Ji),wr=e=>Qe(e,pl,H),nl=e=>Qe(e,so,yr),ol=e=>Qe(e,io,el),al=e=>Qe(e,yr,Ri),M=e=>oo.test(e),Ct=e=>Ze(e,co),sl=e=>Ze(e,hl),il=e=>Ze(e,so),ll=e=>Ze(e,lo),cl=e=>Ze(e,io),dl=e=>Ze(e,gl,!0),Qe=(e,t,r)=>{const n=no.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ze=(e,t,r=!1)=>{const n=oo.exec(e);return n?n[1]?t(n[1]):r:!1},so=e=>e==="position",ul=new Set(["image","url"]),io=e=>ul.has(e),fl=new Set(["length","size","percentage"]),lo=e=>fl.has(e),co=e=>e==="length",pl=e=>e==="number",hl=e=>e==="family-name",gl=e=>e==="shadow",vl=Ui(()=>{const e=re("color"),t=re("font"),r=re("text"),n=re("font-weight"),a=re("tracking"),s=re("leading"),i=re("breakpoint"),c=re("container"),u=re("spacing"),d=re("radius"),p=re("shadow"),h=re("inset-shadow"),m=re("drop-shadow"),v=re("blur"),y=re("perspective"),f=re("aspect"),g=re("ease"),b=re("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"],N=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],C=()=>[M,A,u],T=()=>[Xe,"full","auto",...C()],z=()=>[Be,"none","subgrid",M,A],_=()=>["auto",{span:["full",Be,M,A]},M,A],V=()=>[Be,"auto",M,A],G=()=>["auto","min","max","fr",M,A],j=()=>["start","end","center","between","around","evenly","stretch","baseline"],I=()=>["start","end","center","stretch"],P=()=>["auto",...C()],B=()=>[Xe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],k=()=>[e,M,A],K=()=>[ao,We],D=()=>["","none","full",d,M,A],$=()=>["",H,Ct,We],Z=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>["","none",v,M,A],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",M,A],ne=()=>["none",H,M,A],ie=()=>["none",H,M,A],xe=()=>[H,M,A],pe=()=>[Xe,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Oe],breakpoint:[Oe],color:[Zi],container:[Oe],"drop-shadow":[Oe],ease:["in","out","in-out"],font:[tl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Oe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Oe],shadow:[Oe],spacing:["px",H],text:[Oe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xe,A,M,f]}],container:["container"],columns:[{columns:[H,A,M,c]}],"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,M]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[Be,"auto",M,A]}],basis:[{basis:[Xe,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,Xe,"auto","initial","none",A]}],grow:[{grow:["",H,M,A]}],shrink:[{shrink:["",H,M,A]}],order:[{order:[Be,"first","last","none",M,A]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...I(),"baseline"]}],"align-self":[{self:["auto",...I(),"baseline"]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],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":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[c,"screen",...B()]}],"min-w":[{"min-w":[c,"screen","none",...B()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...B()]}],h:[{h:["screen",...B()]}],"min-h":[{"min-h":["screen","none",...B()]}],"max-h":[{"max-h":["screen",...B()]}],"font-size":[{text:["base",r,Ct,We]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,M,wr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ao,A]}],"font-family":[{font:[sl,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:[a,M,A]}],"line-clamp":[{"line-clamp":[H,"none",M,wr]}],leading:[{leading:[s,...C()]}],"list-image":[{"list-image":["none",M,A]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",M,A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",M,We]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[H,"auto",M,A]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",M,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",M,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(),il,nl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",ll,rl]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Be,M,A],radial:["",M,A],conic:[Be,M,A]},cl,ol]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[H,M,A]}],"outline-w":[{outline:["",H,Ct,We]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",p,dl,al]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",M,A,h]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[H,We]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":k()}],opacity:[{opacity:[H,M,A]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none",M,A]}],blur:[{blur:ae()}],brightness:[{brightness:[H,M,A]}],contrast:[{contrast:[H,M,A]}],"drop-shadow":[{"drop-shadow":["","none",m,M,A]}],grayscale:[{grayscale:["",H,M,A]}],"hue-rotate":[{"hue-rotate":[H,M,A]}],invert:[{invert:["",H,M,A]}],saturate:[{saturate:[H,M,A]}],sepia:[{sepia:["",H,M,A]}],"backdrop-filter":[{"backdrop-filter":["","none",M,A]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[H,M,A]}],"backdrop-contrast":[{"backdrop-contrast":[H,M,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,M,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,M,A]}],"backdrop-invert":[{"backdrop-invert":["",H,M,A]}],"backdrop-opacity":[{"backdrop-opacity":[H,M,A]}],"backdrop-saturate":[{"backdrop-saturate":[H,M,A]}],"backdrop-sepia":[{"backdrop-sepia":["",H,M,A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",M,A]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",M,A]}],ease:[{ease:["linear","initial",g,M,A]}],delay:[{delay:[H,M,A]}],animate:[{animate:["none",b,M,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,M,A]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[M,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",M,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":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",M,A]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[H,Ct,We,wr]}],stroke:[{stroke:["none",...k()]}],"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 O(...e){return vl(Jn(e))}function ml({className:e,containerClassName:t,...r}){return o.jsx(Gn,{"data-slot":"input-otp",containerClassName:O("flex items-center gap-2 has-disabled:opacity-50",t),className:O("disabled:cursor-not-allowed",e),...r})}function bl({className:e,...t}){return o.jsx("div",{"data-slot":"input-otp-group",className:O("flex items-center",e),...t})}function yl({index:e,className:t,...r}){const n=l.useContext(Un),{char:a,hasFakeCaret:s,isActive:i}=(n==null?void 0:n.slots[e])??{};return o.jsxs("div",{"data-slot":"input-otp-slot","data-active":i,className:O("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:[a,s&&o.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:o.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function wl({...e}){return o.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:o.jsx(Ni,{})})}function Q(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function uo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fo(...e){return t=>{let r=!1;const n=e.map(a=>{const s=uo(a,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let a=0;a<n.length;a++){const s=n[a];typeof s=="function"?s():uo(e[a],null)}}}}function le(...e){return l.useCallback(fo(...e),e)}function xl(e,t){const r=l.createContext(t),n=s=>{const{children:i,...c}=s,u=l.useMemo(()=>c,Object.values(c));return o.jsx(r.Provider,{value:u,children:i})};n.displayName=e+"Provider";function a(s){const i=l.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,a]}function ft(e,t=[]){let r=[];function n(s,i){const c=l.createContext(i),u=r.length;r=[...r,i];const d=h=>{var b;const{scope:m,children:v,...y}=h,f=((b=m==null?void 0:m[e])==null?void 0:b[u])||c,g=l.useMemo(()=>y,Object.values(y));return o.jsx(f.Provider,{value:g,children:v})};d.displayName=s+"Provider";function p(h,m){var f;const v=((f=m==null?void 0:m[e])==null?void 0:f[u])||c,y=l.useContext(v);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[d,p]}const a=()=>{const s=r.map(i=>l.createContext(i));return function(c){const u=(c==null?void 0:c[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return a.scopeName=e,[n,Nl(a,...t)]}function Nl(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const i=n.reduce((c,{useScope:u,scopeName:d})=>{const h=u(s)[`__scope${d}`];return{...c,...h}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var De=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Cl=l.useId||(()=>{}),Sl=0;function St(e){const[t,r]=l.useState(Cl());return De(()=>{r(n=>n??String(Sl++))},[e]),e||(t?`radix-${t}`:"")}function ge(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function xr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,a]=El({defaultProp:t,onChange:r}),s=e!==void 0,i=s?e:n,c=ge(r),u=l.useCallback(d=>{if(s){const h=typeof d=="function"?d(e):d;h!==e&&c(h)}else a(d)},[s,e,a,c]);return[i,u]}function El({defaultProp:e,onChange:t}){const r=l.useState(e),[n]=r,a=l.useRef(n),s=ge(t);return l.useEffect(()=>{a.current!==n&&(s(n),a.current=n)},[n,a,s]),r}var me=l.forwardRef((e,t)=>{const{children:r,...n}=e,a=l.Children.toArray(r),s=a.find(Tl);if(s){const i=s.props.children,c=a.map(u=>u===s?l.Children.count(i)>1?l.Children.only(null):l.isValidElement(i)?i.props.children:null:u);return o.jsx(Nr,{...n,ref:t,children:l.isValidElement(i)?l.cloneElement(i,void 0,c):null})}return o.jsx(Nr,{...n,ref:t,children:r})});me.displayName="Slot";var Nr=l.forwardRef((e,t)=>{const{children:r,...n}=e;if(l.isValidElement(r)){const a=Al(r),s=Pl(n,r.props);return r.type!==l.Fragment&&(s.ref=t?fo(t,a):a),l.cloneElement(r,s)}return l.Children.count(r)>1?l.Children.only(null):null});Nr.displayName="SlotClone";var po=({children:e})=>o.jsx(o.Fragment,{children:e});function Tl(e){return l.isValidElement(e)&&e.type===po}function Pl(e,t){const r={...t};for(const n in t){const a=e[n],s=t[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...c)=>{s(...c),a(...c)}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...e,...r}}function Al(e){var n,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ml=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],J=Ml.reduce((e,t)=>{const r=l.forwardRef((n,a)=>{const{asChild:s,...i}=n,c=s?me:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ho(e,t){e&&pr.flushSync(()=>e.dispatchEvent(t))}function kl(e,t=globalThis==null?void 0:globalThis.document){const r=ge(e);l.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Ol="DismissableLayer",Cr="dismissableLayer.update",Dl="dismissableLayer.pointerDownOutside",_l="dismissableLayer.focusOutside",go,vo=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Et=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...u}=e,d=l.useContext(vo),[p,h]=l.useState(null),m=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=l.useState({}),y=le(t,T=>h(T)),f=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=f.indexOf(g),w=p?f.indexOf(p):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,N=w>=b,S=Ll(T=>{const z=T.target,_=[...d.branches].some(V=>V.contains(z));!N||_||(a==null||a(T),i==null||i(T),T.defaultPrevented||c==null||c())},m),C=$l(T=>{const z=T.target;[...d.branches].some(V=>V.contains(z))||(s==null||s(T),i==null||i(T),T.defaultPrevented||c==null||c())},m);return kl(T=>{w===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&c&&(T.preventDefault(),c()))},m),l.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(go=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),bo(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=go)}},[p,m,r,d]),l.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),bo())},[p,d]),l.useEffect(()=>{const T=()=>v({});return document.addEventListener(Cr,T),()=>document.removeEventListener(Cr,T)},[]),o.jsx(J.div,{...u,ref:y,style:{pointerEvents:x?N?"auto":"none":void 0,...e.style},onFocusCapture:Q(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Q(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Q(e.onPointerDownCapture,S.onPointerDownCapture)})});Et.displayName=Ol;var Il="DismissableLayerBranch",mo=l.forwardRef((e,t)=>{const r=l.useContext(vo),n=l.useRef(null),a=le(t,n);return l.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),o.jsx(J.div,{...e,ref:a})});mo.displayName=Il;function Ll(e,t=globalThis==null?void 0:globalThis.document){const r=ge(e),n=l.useRef(!1),a=l.useRef(()=>{});return l.useEffect(()=>{const s=c=>{if(c.target&&!n.current){let u=function(){yo(Dl,r,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function $l(e,t=globalThis==null?void 0:globalThis.document){const r=ge(e),n=l.useRef(!1);return l.useEffect(()=>{const a=s=>{s.target&&!n.current&&yo(_l,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function bo(){const e=new CustomEvent(Cr);document.dispatchEvent(e)}function yo(e,t,r,{discrete:n}){const a=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?ho(a,s):a.dispatchEvent(s)}var Fl=Et,zl=mo,Sr="focusScope.autoFocusOnMount",Er="focusScope.autoFocusOnUnmount",wo={bubbles:!1,cancelable:!0},Bl="FocusScope",xo=l.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...i}=e,[c,u]=l.useState(null),d=ge(a),p=ge(s),h=l.useRef(null),m=le(t,f=>u(f)),v=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(n){let f=function(x){if(v.paused||!c)return;const N=x.target;c.contains(N)?h.current=N:_e(h.current,{select:!0})},g=function(x){if(v.paused||!c)return;const N=x.relatedTarget;N!==null&&(c.contains(N)||_e(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&_e(c)};document.addEventListener("focusin",f),document.addEventListener("focusout",g);const w=new MutationObserver(b);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",g),w.disconnect()}}},[n,c,v.paused]),l.useEffect(()=>{if(c){So.add(v);const f=document.activeElement;if(!c.contains(f)){const b=new CustomEvent(Sr,wo);c.addEventListener(Sr,d),c.dispatchEvent(b),b.defaultPrevented||(Wl(Gl(No(c)),{select:!0}),document.activeElement===f&&_e(c))}return()=>{c.removeEventListener(Sr,d),setTimeout(()=>{const b=new CustomEvent(Er,wo);c.addEventListener(Er,p),c.dispatchEvent(b),b.defaultPrevented||_e(f??document.body,{select:!0}),c.removeEventListener(Er,p),So.remove(v)},0)}}},[c,d,p,v]);const y=l.useCallback(f=>{if(!r&&!n||v.paused)return;const g=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,b=document.activeElement;if(g&&b){const w=f.currentTarget,[x,N]=Vl(w);x&&N?!f.shiftKey&&b===N?(f.preventDefault(),r&&_e(x,{select:!0})):f.shiftKey&&b===x&&(f.preventDefault(),r&&_e(N,{select:!0})):b===w&&f.preventDefault()}},[r,n,v.paused]);return o.jsx(J.div,{tabIndex:-1,...i,ref:m,onKeyDown:y})});xo.displayName=Bl;function Wl(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(_e(n,{select:t}),document.activeElement!==r)return}function Vl(e){const t=No(e),r=Co(t,e),n=Co(t.reverse(),e);return[r,n]}function No(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?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(!jl(r,{upTo:t}))return r}function jl(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 Hl(e){return e instanceof HTMLInputElement&&"select"in e}function _e(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Hl(e)&&t&&e.select()}}var So=Ul();function Ul(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Eo(e,t),e.unshift(t)},remove(t){var r;e=Eo(e,t),(r=e[0])==null||r.resume()}}}function Eo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Gl(e){return e.filter(t=>t.tagName!=="A")}var Kl="Portal",Tt=l.forwardRef((e,t)=>{var c;const{container:r,...n}=e,[a,s]=l.useState(!1);De(()=>s(!0),[]);const i=r||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?zn.createPortal(o.jsx(J.div,{...n,ref:t}),i):null});Tt.displayName=Kl;function ql(e,t){return l.useReducer((r,n)=>t[r][n]??r,e)}var Ve=e=>{const{present:t,children:r}=e,n=Yl(t),a=typeof r=="function"?r({present:n.isPresent}):l.Children.only(r),s=le(n.ref,Xl(a));return typeof r=="function"||n.isPresent?l.cloneElement(a,{ref:s}):null};Ve.displayName="Presence";function Yl(e){const[t,r]=l.useState(),n=l.useRef({}),a=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[c,u]=ql(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=Pt(n.current);s.current=c==="mounted"?d:"none"},[c]),De(()=>{const d=n.current,p=a.current;if(p!==e){const m=s.current,v=Pt(d);e?u("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(p&&m!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),De(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,h=v=>{const f=Pt(n.current).includes(v.animationName);if(v.target===t&&f&&(u("ANIMATION_END"),!a.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=Pt(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function Pt(e){return(e==null?void 0:e.animationName)||"none"}function Xl(e){var n,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Tr=0;function Ql(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??To()),document.body.insertAdjacentElement("beforeend",e[1]??To()),Tr++,()=>{Tr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Tr--}},[])}function To(){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 Ce=function(){return Ce=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Ce.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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function Zl(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,s;n<a;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var At="right-scroll-bar-position",Mt="width-before-scroll-bar",Jl="with-scroll-bars-hidden",Rl="--removed-body-scroll-bar-size";function Pr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ec(e,t){var r=U.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var tc=typeof window<"u"?l.useLayoutEffect:l.useEffect,Ao=new WeakMap;function rc(e,t){var r=ec(null,function(n){return e.forEach(function(a){return Pr(a,n)})});return tc(function(){var n=Ao.get(r);if(n){var a=new Set(n),s=new Set(e),i=r.current;a.forEach(function(c){s.has(c)||Pr(c,null)}),s.forEach(function(c){a.has(c)||Pr(c,i)})}Ao.set(r,e)},[e]),r}function nc(e){return e}function oc(e,t){t===void 0&&(t=nc);var r=[],n=!1,a={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(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(c){return c!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(c){return s(c)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var c=r;r=[],c.forEach(s),i=r}var u=function(){var p=i;i=[],p.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(p){i.push(p),d()},filter:function(p){return i=i.filter(p),r}}}};return a}function ac(e){e===void 0&&(e={});var t=oc(null);return t.options=Ce({async:!0,ssr:!1},e),t}var Mo=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 l.createElement(n,Ce({},r))};Mo.isSideCarExport=!0;function sc(e,t){return e.useMedium(t),Mo}var ko=ac(),Ar=function(){},kt=l.forwardRef(function(e,t){var r=l.useRef(null),n=l.useState({onScrollCapture:Ar,onWheelCapture:Ar,onTouchMoveCapture:Ar}),a=n[0],s=n[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,h=e.shards,m=e.sideCar,v=e.noIsolation,y=e.inert,f=e.allowPinchZoom,g=e.as,b=g===void 0?"div":g,w=e.gapMode,x=Po(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=m,S=rc([r,t]),C=Ce(Ce({},x),a);return l.createElement(l.Fragment,null,p&&l.createElement(N,{sideCar:ko,removeScrollBar:d,shards:h,noIsolation:v,inert:y,setCallbacks:s,allowPinchZoom:!!f,lockRef:r,gapMode:w}),i?l.cloneElement(l.Children.only(c),Ce(Ce({},C),{ref:S})):l.createElement(b,Ce({},C,{className:u,ref:S}),c))});kt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},kt.classNames={fullWidth:Mt,zeroRight:At};var ic=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ic();return t&&e.setAttribute("nonce",t),e}function cc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uc=function(){var e=0,t=null;return{add:function(r){e==0&&(t=lc())&&(cc(t,r),dc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fc=function(){var e=uc();return function(t,r){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Oo=function(){var e=fc(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},pc={left:0,top:0,right:0,gap:0},Mr=function(e){return parseInt(e||"",10)||0},hc=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Mr(r),Mr(n),Mr(a)]},gc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pc;var t=hc(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])}},vc=Oo(),Je="data-scroll-locked",mc=function(e,t,r,n){var a=e.left,s=e.top,i=e.right,c=e.gap;return r===void 0&&(r="margin"),`
|
|
140
|
+
*/const hr=R("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Jn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Jn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Rn(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Jn(e))&&(n&&(n+=" "),n+=t);return n}const gr="-",Oi=e=>{const t=_i(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const c=i.split(gr);return c[0]===""&&c.length!==1&&c.shift(),eo(c,t)||Di(i)},getConflictingClassGroupIds:(i,c)=>{const u=r[i]||[];return c&&n[i]?[...u,...n[i]]:u}}},eo=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?eo(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(gr);return(i=t.validators.find(({validator:c})=>c(s)))==null?void 0:i.classGroupId},to=/^\[(.+)\]$/,Di=e=>{if(to.test(e)){const t=to.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},_i=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const a in r)vr(r[a],n,a,t);return n},vr=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:ro(t,a);s.classGroupId=r;return}if(typeof a=="function"){if(Ii(a)){vr(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([s,i])=>{vr(i,ro(t,s),r,n)})})},ro=(e,t)=>{let r=e;return t.split(gr).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Ii=e=>e.isThemeGetter,Li=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(s,i)=>{r.set(s,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let i=r.get(s);if(i!==void 0)return i;if((i=n.get(s))!==void 0)return a(s,i),i},set(s,i){r.has(s)?r.set(s,i):a(s,i)}}},mr="!",br=":",$i=br.length,Fi=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a=>{const s=[];let i=0,c=0,u=0,d;for(let y=0;y<a.length;y++){let f=a[y];if(i===0&&c===0){if(f===br){s.push(a.slice(u,y)),u=y+$i;continue}if(f==="/"){d=y;continue}}f==="["?i++:f==="]"?i--:f==="("?c++:f===")"&&c--}const p=s.length===0?a:a.substring(u),h=zi(p),m=h!==p,v=d&&d>u?d-u:void 0;return{modifiers:s,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:v}};if(t){const a=t+br,s=n;n=i=>i.startsWith(a)?s(i.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const a=n;n=s=>r({className:s,parseClassName:a})}return n},zi=e=>e.endsWith(mr)?e.substring(0,e.length-1):e.startsWith(mr)?e.substring(1):e,Bi=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const a=[];let s=[];return n.forEach(i=>{i[0]==="["||t[i]?(a.push(...s.sort(),i),s=[]):s.push(i)}),a.push(...s.sort()),a}},Wi=e=>({cache:Li(e.cacheSize),parseClassName:Fi(e),sortModifiers:Bi(e),...Oi(e)}),Vi=/\s+/,ji=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=t,i=[],c=e.trim().split(Vi);let u="";for(let d=c.length-1;d>=0;d-=1){const p=c[d],{isExternal:h,modifiers:m,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:f}=r(p);if(h){u=p+(u.length>0?" "+u:u);continue}let g=!!f,b=n(g?y.substring(0,f):y);if(!b){if(!g){u=p+(u.length>0?" "+u:u);continue}if(b=n(y),!b){u=p+(u.length>0?" "+u:u);continue}g=!1}const w=s(m).join(":"),x=v?w+mr:w,N=x+b;if(i.includes(N))continue;i.push(N);const S=a(b,g);for(let C=0;C<S.length;++C){const T=S[C];i.push(x+T)}u=p+(u.length>0?" "+u:u)}return u};function Hi(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=no(t))&&(n&&(n+=" "),n+=r);return n}const no=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=no(e[n]))&&(r&&(r+=" "),r+=t);return r};function Ui(e,...t){let r,n,a,s=i;function i(u){const d=t.reduce((p,h)=>h(p),e());return r=Wi(d),n=r.cache.get,a=r.cache.set,s=c,c(u)}function c(u){const d=n(u);if(d)return d;const p=ji(u,r);return a(u,p),p}return function(){return s(Hi.apply(null,arguments))}}const re=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},oo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ao=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Gi=/^\d+\/\d+$/,Ki=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qi=/\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$/,Yi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Qi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ze=e=>Gi.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),We=e=>!!e&&Number.isInteger(Number(e)),so=e=>e.endsWith("%")&&H(e.slice(0,-1)),Oe=e=>Ki.test(e),Zi=()=>!0,Ji=e=>qi.test(e)&&!Yi.test(e),yr=()=>!1,Ri=e=>Qi.test(e),el=e=>Xi.test(e),tl=e=>!A(e)&&!M(e),rl=e=>Je(e,co,yr),A=e=>oo.test(e),Ve=e=>Je(e,uo,Ji),wr=e=>Je(e,pl,H),nl=e=>Je(e,io,yr),ol=e=>Je(e,lo,el),al=e=>Je(e,yr,Ri),M=e=>ao.test(e),St=e=>Re(e,uo),sl=e=>Re(e,hl),il=e=>Re(e,io),ll=e=>Re(e,co),cl=e=>Re(e,lo),dl=e=>Re(e,gl,!0),Je=(e,t,r)=>{const n=oo.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Re=(e,t,r=!1)=>{const n=ao.exec(e);return n?n[1]?t(n[1]):r:!1},io=e=>e==="position",ul=new Set(["image","url"]),lo=e=>ul.has(e),fl=new Set(["length","size","percentage"]),co=e=>fl.has(e),uo=e=>e==="length",pl=e=>e==="number",hl=e=>e==="family-name",gl=e=>e==="shadow",vl=Ui(()=>{const e=re("color"),t=re("font"),r=re("text"),n=re("font-weight"),a=re("tracking"),s=re("leading"),i=re("breakpoint"),c=re("container"),u=re("spacing"),d=re("radius"),p=re("shadow"),h=re("inset-shadow"),m=re("drop-shadow"),v=re("blur"),y=re("perspective"),f=re("aspect"),g=re("ease"),b=re("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"],N=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],C=()=>[M,A,u],T=()=>[Ze,"full","auto",...C()],z=()=>[We,"none","subgrid",M,A],_=()=>["auto",{span:["full",We,M,A]},M,A],V=()=>[We,"auto",M,A],G=()=>["auto","min","max","fr",M,A],j=()=>["start","end","center","between","around","evenly","stretch","baseline"],I=()=>["start","end","center","stretch"],P=()=>["auto",...C()],B=()=>[Ze,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],k=()=>[e,M,A],K=()=>[so,Ve],D=()=>["","none","full",d,M,A],$=()=>["",H,St,Ve],Z=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>["","none",v,M,A],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",M,A],ne=()=>["none",H,M,A],ie=()=>["none",H,M,A],Ne=()=>[H,M,A],pe=()=>[Ze,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Oe],breakpoint:[Oe],color:[Zi],container:[Oe],"drop-shadow":[Oe],ease:["in","out","in-out"],font:[tl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Oe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Oe],shadow:[Oe],spacing:["px",H],text:[Oe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ze,A,M,f]}],container:["container"],columns:[{columns:[H,A,M,c]}],"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,M]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[We,"auto",M,A]}],basis:[{basis:[Ze,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,Ze,"auto","initial","none",A]}],grow:[{grow:["",H,M,A]}],shrink:[{shrink:["",H,M,A]}],order:[{order:[We,"first","last","none",M,A]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...I(),"baseline"]}],"align-self":[{self:["auto",...I(),"baseline"]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],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":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[c,"screen",...B()]}],"min-w":[{"min-w":[c,"screen","none",...B()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...B()]}],h:[{h:["screen",...B()]}],"min-h":[{"min-h":["screen","none",...B()]}],"max-h":[{"max-h":["screen",...B()]}],"font-size":[{text:["base",r,St,Ve]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,M,wr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",so,A]}],"font-family":[{font:[sl,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:[a,M,A]}],"line-clamp":[{"line-clamp":[H,"none",M,wr]}],leading:[{leading:[s,...C()]}],"list-image":[{"list-image":["none",M,A]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",M,A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",M,Ve]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[H,"auto",M,A]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",M,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",M,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(),il,nl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",ll,rl]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},We,M,A],radial:["",M,A],conic:[We,M,A]},cl,ol]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[H,M,A]}],"outline-w":[{outline:["",H,St,Ve]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",p,dl,al]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",M,A,h]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[H,Ve]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":k()}],opacity:[{opacity:[H,M,A]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none",M,A]}],blur:[{blur:ae()}],brightness:[{brightness:[H,M,A]}],contrast:[{contrast:[H,M,A]}],"drop-shadow":[{"drop-shadow":["","none",m,M,A]}],grayscale:[{grayscale:["",H,M,A]}],"hue-rotate":[{"hue-rotate":[H,M,A]}],invert:[{invert:["",H,M,A]}],saturate:[{saturate:[H,M,A]}],sepia:[{sepia:["",H,M,A]}],"backdrop-filter":[{"backdrop-filter":["","none",M,A]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[H,M,A]}],"backdrop-contrast":[{"backdrop-contrast":[H,M,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,M,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,M,A]}],"backdrop-invert":[{"backdrop-invert":["",H,M,A]}],"backdrop-opacity":[{"backdrop-opacity":[H,M,A]}],"backdrop-saturate":[{"backdrop-saturate":[H,M,A]}],"backdrop-sepia":[{"backdrop-sepia":["",H,M,A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",M,A]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",M,A]}],ease:[{ease:["linear","initial",g,M,A]}],delay:[{delay:[H,M,A]}],animate:[{animate:["none",b,M,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,M,A]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[M,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",M,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":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",M,A]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[H,St,Ve,wr]}],stroke:[{stroke:["none",...k()]}],"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 O(...e){return vl(Rn(e))}function ml({className:e,containerClassName:t,...r}){return o.jsx(Gn,{"data-slot":"input-otp",containerClassName:O("flex items-center gap-2 has-disabled:opacity-50",t),className:O("disabled:cursor-not-allowed",e),...r})}function bl({className:e,...t}){return o.jsx("div",{"data-slot":"input-otp-group",className:O("flex items-center",e),...t})}function yl({index:e,className:t,...r}){const n=l.useContext(Un),{char:a,hasFakeCaret:s,isActive:i}=(n==null?void 0:n.slots[e])??{};return o.jsxs("div",{"data-slot":"input-otp-slot","data-active":i,className:O("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:[a,s&&o.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:o.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function wl({...e}){return o.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:o.jsx(Ci,{})})}function X(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function fo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function po(...e){return t=>{let r=!1;const n=e.map(a=>{const s=fo(a,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let a=0;a<n.length;a++){const s=n[a];typeof s=="function"?s():fo(e[a],null)}}}}function le(...e){return l.useCallback(po(...e),e)}function xl(e,t){const r=l.createContext(t),n=s=>{const{children:i,...c}=s,u=l.useMemo(()=>c,Object.values(c));return o.jsx(r.Provider,{value:u,children:i})};n.displayName=e+"Provider";function a(s){const i=l.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,a]}function pt(e,t=[]){let r=[];function n(s,i){const c=l.createContext(i),u=r.length;r=[...r,i];const d=h=>{var b;const{scope:m,children:v,...y}=h,f=((b=m==null?void 0:m[e])==null?void 0:b[u])||c,g=l.useMemo(()=>y,Object.values(y));return o.jsx(f.Provider,{value:g,children:v})};d.displayName=s+"Provider";function p(h,m){var f;const v=((f=m==null?void 0:m[e])==null?void 0:f[u])||c,y=l.useContext(v);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[d,p]}const a=()=>{const s=r.map(i=>l.createContext(i));return function(c){const u=(c==null?void 0:c[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return a.scopeName=e,[n,Nl(a,...t)]}function Nl(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const i=n.reduce((c,{useScope:u,scopeName:d})=>{const h=u(s)[`__scope${d}`];return{...c,...h}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var De=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Cl=l.useId||(()=>{}),Sl=0;function Et(e){const[t,r]=l.useState(Cl());return De(()=>{r(n=>n??String(Sl++))},[e]),e||(t?`radix-${t}`:"")}function ve(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function xr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,a]=El({defaultProp:t,onChange:r}),s=e!==void 0,i=s?e:n,c=ve(r),u=l.useCallback(d=>{if(s){const h=typeof d=="function"?d(e):d;h!==e&&c(h)}else a(d)},[s,e,a,c]);return[i,u]}function El({defaultProp:e,onChange:t}){const r=l.useState(e),[n]=r,a=l.useRef(n),s=ve(t);return l.useEffect(()=>{a.current!==n&&(s(n),a.current=n)},[n,a,s]),r}var me=l.forwardRef((e,t)=>{const{children:r,...n}=e,a=l.Children.toArray(r),s=a.find(Tl);if(s){const i=s.props.children,c=a.map(u=>u===s?l.Children.count(i)>1?l.Children.only(null):l.isValidElement(i)?i.props.children:null:u);return o.jsx(Nr,{...n,ref:t,children:l.isValidElement(i)?l.cloneElement(i,void 0,c):null})}return o.jsx(Nr,{...n,ref:t,children:r})});me.displayName="Slot";var Nr=l.forwardRef((e,t)=>{const{children:r,...n}=e;if(l.isValidElement(r)){const a=Al(r),s=Pl(n,r.props);return r.type!==l.Fragment&&(s.ref=t?po(t,a):a),l.cloneElement(r,s)}return l.Children.count(r)>1?l.Children.only(null):null});Nr.displayName="SlotClone";var ho=({children:e})=>o.jsx(o.Fragment,{children:e});function Tl(e){return l.isValidElement(e)&&e.type===ho}function Pl(e,t){const r={...t};for(const n in t){const a=e[n],s=t[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...c)=>{s(...c),a(...c)}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...e,...r}}function Al(e){var n,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ml=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],J=Ml.reduce((e,t)=>{const r=l.forwardRef((n,a)=>{const{asChild:s,...i}=n,c=s?me:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function go(e,t){e&&pr.flushSync(()=>e.dispatchEvent(t))}function kl(e,t=globalThis==null?void 0:globalThis.document){const r=ve(e);l.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Ol="DismissableLayer",Cr="dismissableLayer.update",Dl="dismissableLayer.pointerDownOutside",_l="dismissableLayer.focusOutside",vo,mo=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tt=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...u}=e,d=l.useContext(mo),[p,h]=l.useState(null),m=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=l.useState({}),y=le(t,T=>h(T)),f=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=f.indexOf(g),w=p?f.indexOf(p):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,N=w>=b,S=Ll(T=>{const z=T.target,_=[...d.branches].some(V=>V.contains(z));!N||_||(a==null||a(T),i==null||i(T),T.defaultPrevented||c==null||c())},m),C=$l(T=>{const z=T.target;[...d.branches].some(V=>V.contains(z))||(s==null||s(T),i==null||i(T),T.defaultPrevented||c==null||c())},m);return kl(T=>{w===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&c&&(T.preventDefault(),c()))},m),l.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(vo=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),yo(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=vo)}},[p,m,r,d]),l.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),yo())},[p,d]),l.useEffect(()=>{const T=()=>v({});return document.addEventListener(Cr,T),()=>document.removeEventListener(Cr,T)},[]),o.jsx(J.div,{...u,ref:y,style:{pointerEvents:x?N?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,C.onFocusCapture),onBlurCapture:X(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,S.onPointerDownCapture)})});Tt.displayName=Ol;var Il="DismissableLayerBranch",bo=l.forwardRef((e,t)=>{const r=l.useContext(mo),n=l.useRef(null),a=le(t,n);return l.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),o.jsx(J.div,{...e,ref:a})});bo.displayName=Il;function Ll(e,t=globalThis==null?void 0:globalThis.document){const r=ve(e),n=l.useRef(!1),a=l.useRef(()=>{});return l.useEffect(()=>{const s=c=>{if(c.target&&!n.current){let u=function(){wo(Dl,r,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function $l(e,t=globalThis==null?void 0:globalThis.document){const r=ve(e),n=l.useRef(!1);return l.useEffect(()=>{const a=s=>{s.target&&!n.current&&wo(_l,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function yo(){const e=new CustomEvent(Cr);document.dispatchEvent(e)}function wo(e,t,r,{discrete:n}){const a=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?go(a,s):a.dispatchEvent(s)}var Fl=Tt,zl=bo,Sr="focusScope.autoFocusOnMount",Er="focusScope.autoFocusOnUnmount",xo={bubbles:!1,cancelable:!0},Bl="FocusScope",No=l.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...i}=e,[c,u]=l.useState(null),d=ve(a),p=ve(s),h=l.useRef(null),m=le(t,f=>u(f)),v=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(n){let f=function(x){if(v.paused||!c)return;const N=x.target;c.contains(N)?h.current=N:_e(h.current,{select:!0})},g=function(x){if(v.paused||!c)return;const N=x.relatedTarget;N!==null&&(c.contains(N)||_e(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&_e(c)};document.addEventListener("focusin",f),document.addEventListener("focusout",g);const w=new MutationObserver(b);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",g),w.disconnect()}}},[n,c,v.paused]),l.useEffect(()=>{if(c){Eo.add(v);const f=document.activeElement;if(!c.contains(f)){const b=new CustomEvent(Sr,xo);c.addEventListener(Sr,d),c.dispatchEvent(b),b.defaultPrevented||(Wl(Gl(Co(c)),{select:!0}),document.activeElement===f&&_e(c))}return()=>{c.removeEventListener(Sr,d),setTimeout(()=>{const b=new CustomEvent(Er,xo);c.addEventListener(Er,p),c.dispatchEvent(b),b.defaultPrevented||_e(f??document.body,{select:!0}),c.removeEventListener(Er,p),Eo.remove(v)},0)}}},[c,d,p,v]);const y=l.useCallback(f=>{if(!r&&!n||v.paused)return;const g=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,b=document.activeElement;if(g&&b){const w=f.currentTarget,[x,N]=Vl(w);x&&N?!f.shiftKey&&b===N?(f.preventDefault(),r&&_e(x,{select:!0})):f.shiftKey&&b===x&&(f.preventDefault(),r&&_e(N,{select:!0})):b===w&&f.preventDefault()}},[r,n,v.paused]);return o.jsx(J.div,{tabIndex:-1,...i,ref:m,onKeyDown:y})});No.displayName=Bl;function Wl(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(_e(n,{select:t}),document.activeElement!==r)return}function Vl(e){const t=Co(e),r=So(t,e),n=So(t.reverse(),e);return[r,n]}function Co(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function So(e,t){for(const r of e)if(!jl(r,{upTo:t}))return r}function jl(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 Hl(e){return e instanceof HTMLInputElement&&"select"in e}function _e(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Hl(e)&&t&&e.select()}}var Eo=Ul();function Ul(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=To(e,t),e.unshift(t)},remove(t){var r;e=To(e,t),(r=e[0])==null||r.resume()}}}function To(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Gl(e){return e.filter(t=>t.tagName!=="A")}var Kl="Portal",Pt=l.forwardRef((e,t)=>{var c;const{container:r,...n}=e,[a,s]=l.useState(!1);De(()=>s(!0),[]);const i=r||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?zn.createPortal(o.jsx(J.div,{...n,ref:t}),i):null});Pt.displayName=Kl;function ql(e,t){return l.useReducer((r,n)=>t[r][n]??r,e)}var je=e=>{const{present:t,children:r}=e,n=Yl(t),a=typeof r=="function"?r({present:n.isPresent}):l.Children.only(r),s=le(n.ref,Ql(a));return typeof r=="function"||n.isPresent?l.cloneElement(a,{ref:s}):null};je.displayName="Presence";function Yl(e){const[t,r]=l.useState(),n=l.useRef({}),a=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[c,u]=ql(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=At(n.current);s.current=c==="mounted"?d:"none"},[c]),De(()=>{const d=n.current,p=a.current;if(p!==e){const m=s.current,v=At(d);e?u("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(p&&m!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),De(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,h=v=>{const f=At(n.current).includes(v.animationName);if(v.target===t&&f&&(u("ANIMATION_END"),!a.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=At(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function At(e){return(e==null?void 0:e.animationName)||"none"}function Ql(e){var n,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Tr=0;function Xl(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Po()),document.body.insertAdjacentElement("beforeend",e[1]??Po()),Tr++,()=>{Tr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Tr--}},[])}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 Se=function(){return Se=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Se.apply(this,arguments)};function Ao(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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function Zl(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,s;n<a;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Mt="right-scroll-bar-position",kt="width-before-scroll-bar",Jl="with-scroll-bars-hidden",Rl="--removed-body-scroll-bar-size";function Pr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ec(e,t){var r=U.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var tc=typeof window<"u"?l.useLayoutEffect:l.useEffect,Mo=new WeakMap;function rc(e,t){var r=ec(null,function(n){return e.forEach(function(a){return Pr(a,n)})});return tc(function(){var n=Mo.get(r);if(n){var a=new Set(n),s=new Set(e),i=r.current;a.forEach(function(c){s.has(c)||Pr(c,null)}),s.forEach(function(c){a.has(c)||Pr(c,i)})}Mo.set(r,e)},[e]),r}function nc(e){return e}function oc(e,t){t===void 0&&(t=nc);var r=[],n=!1,a={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(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(c){return c!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(c){return s(c)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var c=r;r=[],c.forEach(s),i=r}var u=function(){var p=i;i=[],p.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(p){i.push(p),d()},filter:function(p){return i=i.filter(p),r}}}};return a}function ac(e){e===void 0&&(e={});var t=oc(null);return t.options=Se({async:!0,ssr:!1},e),t}var ko=function(e){var t=e.sideCar,r=Ao(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 l.createElement(n,Se({},r))};ko.isSideCarExport=!0;function sc(e,t){return e.useMedium(t),ko}var Oo=ac(),Ar=function(){},Ot=l.forwardRef(function(e,t){var r=l.useRef(null),n=l.useState({onScrollCapture:Ar,onWheelCapture:Ar,onTouchMoveCapture:Ar}),a=n[0],s=n[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,h=e.shards,m=e.sideCar,v=e.noIsolation,y=e.inert,f=e.allowPinchZoom,g=e.as,b=g===void 0?"div":g,w=e.gapMode,x=Ao(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=m,S=rc([r,t]),C=Se(Se({},x),a);return l.createElement(l.Fragment,null,p&&l.createElement(N,{sideCar:Oo,removeScrollBar:d,shards:h,noIsolation:v,inert:y,setCallbacks:s,allowPinchZoom:!!f,lockRef:r,gapMode:w}),i?l.cloneElement(l.Children.only(c),Se(Se({},C),{ref:S})):l.createElement(b,Se({},C,{className:u,ref:S}),c))});Ot.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ot.classNames={fullWidth:kt,zeroRight:Mt};var ic=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ic();return t&&e.setAttribute("nonce",t),e}function cc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uc=function(){var e=0,t=null;return{add:function(r){e==0&&(t=lc())&&(cc(t,r),dc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fc=function(){var e=uc();return function(t,r){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Do=function(){var e=fc(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},pc={left:0,top:0,right:0,gap:0},Mr=function(e){return parseInt(e||"",10)||0},hc=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Mr(r),Mr(n),Mr(a)]},gc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pc;var t=hc(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])}},vc=Do(),et="data-scroll-locked",mc=function(e,t,r,n){var a=e.left,s=e.top,i=e.right,c=e.gap;return r===void 0&&(r="margin"),`
|
|
141
141
|
.`.concat(Jl,` {
|
|
142
142
|
overflow: hidden `).concat(n,`;
|
|
143
143
|
padding-right: `).concat(c,"px ").concat(n,`;
|
|
144
144
|
}
|
|
145
|
-
body[`).concat(
|
|
145
|
+
body[`).concat(et,`] {
|
|
146
146
|
overflow: hidden `).concat(n,`;
|
|
147
147
|
overscroll-behavior: contain;
|
|
148
148
|
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
@@ -155,32 +155,32 @@
|
|
|
155
155
|
`),r==="padding"&&"padding-right: ".concat(c,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
.`).concat(
|
|
158
|
+
.`).concat(Mt,` {
|
|
159
159
|
right: `).concat(c,"px ").concat(n,`;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
.`).concat(
|
|
162
|
+
.`).concat(kt,` {
|
|
163
163
|
margin-right: `).concat(c,"px ").concat(n,`;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
.`).concat(
|
|
166
|
+
.`).concat(Mt," .").concat(Mt,` {
|
|
167
167
|
right: 0 `).concat(n,`;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
.`).concat(
|
|
170
|
+
.`).concat(kt," .").concat(kt,` {
|
|
171
171
|
margin-right: 0 `).concat(n,`;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
body[`).concat(
|
|
174
|
+
body[`).concat(et,`] {
|
|
175
175
|
`).concat(Rl,": ").concat(c,`px;
|
|
176
176
|
}
|
|
177
|
-
`)},
|
|
177
|
+
`)},_o=function(){var e=parseInt(document.body.getAttribute(et)||"0",10);return isFinite(e)?e:0},bc=function(){l.useEffect(function(){return document.body.setAttribute(et,(_o()+1).toString()),function(){var e=_o()-1;e<=0?document.body.removeAttribute(et):document.body.setAttribute(et,e.toString())}},[])},yc=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;bc();var s=l.useMemo(function(){return gc(a)},[a]);return l.createElement(vc,{styles:mc(s,!t,a,r?"":"!important")})},kr=!1;if(typeof window<"u")try{var Dt=Object.defineProperty({},"passive",{get:function(){return kr=!0,!0}});window.addEventListener("test",Dt,Dt),window.removeEventListener("test",Dt,Dt)}catch{kr=!1}var tt=kr?{passive:!1}:!1,wc=function(e){return e.tagName==="TEXTAREA"},Io=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!wc(e)&&r[t]==="visible")},xc=function(e){return Io(e,"overflowY")},Nc=function(e){return Io(e,"overflowX")},Lo=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=$o(e,n);if(a){var s=Fo(e,n),i=s[1],c=s[2];if(i>c)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Cc=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Sc=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},$o=function(e,t){return e==="v"?xc(t):Nc(t)},Fo=function(e,t){return e==="v"?Cc(t):Sc(t)},Ec=function(e,t){return e==="h"&&t==="rtl"?-1:1},Tc=function(e,t,r,n,a){var s=Ec(e,window.getComputedStyle(t).direction),i=s*n,c=r.target,u=t.contains(c),d=!1,p=i>0,h=0,m=0;do{var v=Fo(e,c),y=v[0],f=v[1],g=v[2],b=f-g-s*y;(y||b)&&$o(e,c)&&(h+=b,m+=y),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(p&&Math.abs(h)<1||!p&&Math.abs(m)<1)&&(d=!0),d},_t=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zo=function(e){return[e.deltaX,e.deltaY]},Bo=function(e){return e&&"current"in e?e.current:e},Pc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ac=function(e){return`
|
|
178
178
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
179
179
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
180
|
-
`)},Mc=0,
|
|
180
|
+
`)},Mc=0,rt=[];function kc(e){var t=l.useRef([]),r=l.useRef([0,0]),n=l.useRef(),a=l.useState(Mc++)[0],s=l.useState(Do)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var f=Zl([e.lockRef.current],(e.shards||[]).map(Bo),!0).filter(Boolean);return f.forEach(function(g){return g.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),f.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=l.useCallback(function(f,g){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!i.current.allowPinchZoom;var b=_t(f),w=r.current,x="deltaX"in f?f.deltaX:w[0]-b[0],N="deltaY"in f?f.deltaY:w[1]-b[1],S,C=f.target,T=Math.abs(x)>Math.abs(N)?"h":"v";if("touches"in f&&T==="h"&&C.type==="range")return!1;var z=Lo(T,C);if(!z)return!0;if(z?S=T:(S=T==="v"?"h":"v",z=Lo(T,C)),!z)return!1;if(!n.current&&"changedTouches"in f&&(x||N)&&(n.current=S),!S)return!0;var _=n.current||S;return Tc(_,g,f,_==="h"?x:N)},[]),u=l.useCallback(function(f){var g=f;if(!(!rt.length||rt[rt.length-1]!==s)){var b="deltaY"in g?zo(g):_t(g),w=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&Pc(S.delta,b)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var x=(i.current.shards||[]).map(Bo).filter(Boolean).filter(function(S){return S.contains(g.target)}),N=x.length>0?c(g,x[0]):!i.current.noIsolation;N&&g.cancelable&&g.preventDefault()}}},[]),d=l.useCallback(function(f,g,b,w){var x={name:f,delta:g,target:b,should:w,shadowParent:Oc(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(N){return N!==x})},1)},[]),p=l.useCallback(function(f){r.current=_t(f),n.current=void 0},[]),h=l.useCallback(function(f){d(f.type,zo(f),f.target,c(f,e.lockRef.current))},[]),m=l.useCallback(function(f){d(f.type,_t(f),f.target,c(f,e.lockRef.current))},[]);l.useEffect(function(){return rt.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",u,tt),document.addEventListener("touchmove",u,tt),document.addEventListener("touchstart",p,tt),function(){rt=rt.filter(function(f){return f!==s}),document.removeEventListener("wheel",u,tt),document.removeEventListener("touchmove",u,tt),document.removeEventListener("touchstart",p,tt)}},[]);var v=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(s,{styles:Ac(a)}):null,v?l.createElement(yc,{gapMode:e.gapMode}):null)}function Oc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Dc=sc(Oo,kc);var Wo=l.forwardRef(function(e,t){return l.createElement(Ot,Se({},e,{ref:t,sideCar:Dc}))});Wo.classNames=Ot.classNames;var _c=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},nt=new WeakMap,It=new WeakMap,Lt={},Or=0,Vo=function(e){return e&&(e.host||Vo(e.parentNode))},Ic=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Vo(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})},Lc=function(e,t,r,n){var a=Ic(t,Array.isArray(e)?e:[e]);Lt[r]||(Lt[r]=new WeakMap);var s=Lt[r],i=[],c=new Set,u=new Set(a),d=function(h){!h||c.has(h)||(c.add(h),d(h.parentNode))};a.forEach(d);var p=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(m){if(c.has(m))p(m);else try{var v=m.getAttribute(n),y=v!==null&&v!=="false",f=(nt.get(m)||0)+1,g=(s.get(m)||0)+1;nt.set(m,f),s.set(m,g),i.push(m),f===1&&y&&It.set(m,!0),g===1&&m.setAttribute(r,"true"),y||m.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return p(t),c.clear(),Or++,function(){i.forEach(function(h){var m=nt.get(h)-1,v=s.get(h)-1;nt.set(h,m),s.set(h,v),m||(It.has(h)||h.removeAttribute(n),It.delete(h)),v||h.removeAttribute(r)}),Or--,Or||(nt=new WeakMap,nt=new WeakMap,It=new WeakMap,Lt={})}},$c=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=_c(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),Lc(n,a,r,"aria-hidden")):function(){return null}},Dr="Dialog",[jo,zf]=pt(Dr),[Fc,be]=jo(Dr),Ho=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,c=l.useRef(null),u=l.useRef(null),[d=!1,p]=xr({prop:n,defaultProp:a,onChange:s});return o.jsx(Fc,{scope:t,triggerRef:c,contentRef:u,contentId:Et(),titleId:Et(),descriptionId:Et(),open:d,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(h=>!h),[p]),modal:i,children:r})};Ho.displayName=Dr;var Uo="DialogTrigger",Go=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=be(Uo,r),s=le(t,a.triggerRef);return o.jsx(J.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Lr(a.open),...n,ref:s,onClick:X(e.onClick,a.onOpenToggle)})});Go.displayName=Uo;var _r="DialogPortal",[zc,Ko]=jo(_r,{forceMount:void 0}),qo=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,s=be(_r,t);return o.jsx(zc,{scope:t,forceMount:r,children:l.Children.map(n,i=>o.jsx(je,{present:r||s.open,children:o.jsx(Pt,{asChild:!0,container:a,children:i})}))})};qo.displayName=_r;var $t="DialogOverlay",Yo=l.forwardRef((e,t)=>{const r=Ko($t,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,s=be($t,e.__scopeDialog);return s.modal?o.jsx(je,{present:n||s.open,children:o.jsx(Bc,{...a,ref:t})}):null});Yo.displayName=$t;var Bc=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=be($t,r);return o.jsx(Wo,{as:me,allowPinchZoom:!0,shards:[a.contentRef],children:o.jsx(J.div,{"data-state":Lr(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),He="DialogContent",Qo=l.forwardRef((e,t)=>{const r=Ko(He,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,s=be(He,e.__scopeDialog);return o.jsx(je,{present:n||s.open,children:s.modal?o.jsx(Wc,{...a,ref:t}):o.jsx(Vc,{...a,ref:t})})});Qo.displayName=He;var Wc=l.forwardRef((e,t)=>{const r=be(He,e.__scopeDialog),n=l.useRef(null),a=le(t,r.contentRef,n);return l.useEffect(()=>{const s=n.current;if(s)return $c(s)},[]),o.jsx(Xo,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&s.preventDefault()}),onFocusOutside:X(e.onFocusOutside,s=>s.preventDefault())})}),Vc=l.forwardRef((e,t)=>{const r=be(He,e.__scopeDialog),n=l.useRef(!1),a=l.useRef(!1);return o.jsx(Xo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(n.current||(c=r.triggerRef.current)==null||c.focus(),s.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:s=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=s.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),Xo=l.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:s,...i}=e,c=be(He,r),u=l.useRef(null),d=le(t,u);return Xl(),o.jsxs(o.Fragment,{children:[o.jsx(No,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:s,children:o.jsx(Tt,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Lr(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),o.jsxs(o.Fragment,{children:[o.jsx(jc,{titleId:c.titleId}),o.jsx(Uc,{contentRef:u,descriptionId:c.descriptionId})]})]})}),Ir="DialogTitle",Zo=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=be(Ir,r);return o.jsx(J.h2,{id:a.titleId,...n,ref:t})});Zo.displayName=Ir;var Jo="DialogDescription",Ro=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=be(Jo,r);return o.jsx(J.p,{id:a.descriptionId,...n,ref:t})});Ro.displayName=Jo;var ea="DialogClose",ta=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=be(ea,r);return o.jsx(J.button,{type:"button",...n,ref:t,onClick:X(e.onClick,()=>a.onOpenChange(!1))})});ta.displayName=ea;function Lr(e){return e?"open":"closed"}var ra="DialogTitleWarning",[Bf,na]=xl(ra,{contentName:He,titleName:Ir,docsSlug:"dialog"}),jc=({titleId:e})=>{const t=na(ra),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
181
181
|
|
|
182
182
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
183
183
|
|
|
184
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Hc="DialogDescriptionWarning",Uc=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ra(Hc).contentName}}.`;return l.useEffect(()=>{var s;const a=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},$r=jo,na=Uo,oa=Ko,$t=qo,Ft=Yo,zt=Qo,Bt=Jo,Wt=ea;const pt=({modal:e=!1,...t})=>o.jsx($r,{modal:e,...t});pt.displayName=$r.displayName;const Fr=na,aa=oa,zr=Wt,Br=l.forwardRef(({className:e,...t},r)=>o.jsx($t,{ref:r,className:O("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}));Br.displayName=$t.displayName;const ht=l.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(aa,{children:[o.jsx(Br,{}),o.jsxs(Ft,{ref:n,className:O("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,o.jsxs(Wt,{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:[o.jsx(hr,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ht.displayName=Ft.displayName;const Vt=({className:e,...t})=>o.jsx("div",{className:O("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Vt.displayName="DialogHeader";const Wr=({className:e,...t})=>o.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wr.displayName="DialogFooter";const jt=l.forwardRef(({className:e,...t},r)=>o.jsx(zt,{ref:r,className:O("text-lg font-semibold leading-none tracking-tight",e),...t}));jt.displayName=zt.displayName;const Vr=l.forwardRef(({className:e,...t},r)=>o.jsx(Bt,{ref:r,className:O("text-sm text-muted-foreground",e),...t}));Vr.displayName=Bt.displayName;const sa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ia=Jn,gt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ia(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:s}=t,i=Object.keys(a).map(d=>{const p=r==null?void 0:r[d],h=s==null?void 0:s[d];if(p===null)return null;const m=sa(p)||sa(h);return a[d][m]}),c=r&&Object.entries(r).reduce((d,p)=>{let[h,m]=p;return m===void 0||(d[h]=m),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,p)=>{let{class:h,className:m,...v}=p;return Object.entries(v).every(y=>{let[f,g]=y;return Array.isArray(g)?g.includes({...s,...c}[f]):{...s,...c}[f]===g})?[...d,h,m]:d},[]);return ia(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},jr=gt("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 cursor-pointer",{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"}}),oe=l.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,confirmationDialog:a,onClick:s,...i},c)=>{const u=n?me:"button";if(!a)return o.jsx(u,{className:O(jr({variant:t,size:r,className:e})),ref:c,onClick:s,...i});s&&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:p,onConfirm:h,confirmText:m="Confirm",cancelText:v="Cancel"}=a,y=()=>{h()};return o.jsxs(pt,{children:[o.jsx(Fr,{asChild:!0,children:o.jsx(u,{className:O(jr({variant:t,size:r,className:e})),ref:c,...i})}),o.jsxs(ht,{children:[o.jsxs(Vt,{children:[o.jsx(jt,{children:d}),o.jsx(Vr,{children:p})]}),o.jsxs(Wr,{className:"flex justify-end gap-2 pt-4",children:[o.jsx(zr,{asChild:!0,children:o.jsx(oe,{variant:"outline",children:v})}),o.jsx(zr,{asChild:!0,children:o.jsx(oe,{onClick:y,children:m})})]})]})]})});oe.displayName="Button";const Gc=["top","right","bottom","left"],Ie=Math.min,ue=Math.max,Ht=Math.round,Ut=Math.floor,Se=e=>({x:e,y:e}),Kc={left:"right",right:"left",bottom:"top",top:"bottom"},qc={start:"end",end:"start"};function Hr(e,t,r){return ue(e,Ie(t,r))}function Ae(e,t){return typeof e=="function"?e(t):e}function Me(e){return e.split("-")[0]}function rt(e){return e.split("-")[1]}function Ur(e){return e==="x"?"y":"x"}function Gr(e){return e==="y"?"height":"width"}function Le(e){return["top","bottom"].includes(Me(e))?"y":"x"}function Kr(e){return Ur(Le(e))}function Yc(e,t,r){r===void 0&&(r=!1);const n=rt(e),a=Kr(e),s=Gr(a);let i=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Gt(i)),[i,Gt(i)]}function Xc(e){const t=Gt(e);return[qr(e),t,qr(t)]}function qr(e){return e.replace(/start|end/g,t=>qc[t])}function Qc(e,t,r){const n=["left","right"],a=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?s:i;default:return[]}}function Zc(e,t,r,n){const a=rt(e);let s=Qc(Me(e),r==="start",n);return a&&(s=s.map(i=>i+"-"+a),t&&(s=s.concat(s.map(qr)))),s}function Gt(e){return e.replace(/left|right|bottom|top/g,t=>Kc[t])}function Jc(e){return{top:0,right:0,bottom:0,left:0,...e}}function la(e){return typeof e!="number"?Jc(e):{top:e,right:e,bottom:e,left:e}}function Kt(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function ca(e,t,r){let{reference:n,floating:a}=e;const s=Le(t),i=Kr(t),c=Gr(i),u=Me(t),d=s==="y",p=n.x+n.width/2-a.width/2,h=n.y+n.height/2-a.height/2,m=n[c]/2-a[c]/2;let v;switch(u){case"top":v={x:p,y:n.y-a.height};break;case"bottom":v={x:p,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:h};break;case"left":v={x:n.x-a.width,y:h};break;default:v={x:n.x,y:n.y}}switch(rt(t)){case"start":v[i]-=m*(r&&d?-1:1);break;case"end":v[i]+=m*(r&&d?-1:1);break}return v}const Rc=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:s=[],platform:i}=r,c=s.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:h}=ca(d,n,u),m=n,v={},y=0;for(let f=0;f<c.length;f++){const{name:g,fn:b}=c[f],{x:w,y:x,data:N,reset:S}=await b({x:p,y:h,initialPlacement:n,placement:m,strategy:a,middlewareData:v,rects:d,platform:i,elements:{reference:e,floating:t}});p=w??p,h=x??h,v={...v,[g]:{...v[g],...N}},S&&y<=50&&(y++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(d=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:a}):S.rects),{x:p,y:h}=ca(d,m,u)),f=-1)}return{x:p,y:h,placement:m,strategy:a,middlewareData:v}};async function vt(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:s,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:m=!1,padding:v=0}=Ae(t,e),y=la(v),g=c[m?h==="floating"?"reference":"floating":h],b=Kt(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(g)))==null||r?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:d,rootBoundary:p,strategy:u})),w=h==="floating"?{x:n,y:a,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),N=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},S=Kt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:x,strategy:u}):w);return{top:(b.top-S.top+y.top)/N.y,bottom:(S.bottom-b.bottom+y.bottom)/N.y,left:(b.left-S.left+y.left)/N.x,right:(S.right-b.right+y.right)/N.x}}const ed=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:s,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:p=0}=Ae(e,t)||{};if(d==null)return{};const h=la(p),m={x:r,y:n},v=Kr(a),y=Gr(v),f=await i.getDimensions(d),g=v==="y",b=g?"top":"left",w=g?"bottom":"right",x=g?"clientHeight":"clientWidth",N=s.reference[y]+s.reference[v]-m[v]-s.floating[y],S=m[v]-s.reference[v],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let T=C?C[x]:0;(!T||!await(i.isElement==null?void 0:i.isElement(C)))&&(T=c.floating[x]||s.floating[y]);const z=N/2-S/2,_=T/2-f[y]/2-1,V=Ie(h[b],_),G=Ie(h[w],_),j=V,I=T-f[y]-G,P=T/2-f[y]/2+z,B=Hr(j,P,I),k=!u.arrow&&rt(a)!=null&&P!==B&&s.reference[y]/2-(P<j?V:G)-f[y]/2<0,K=k?P<j?P-j:P-I:0;return{[v]:m[v]+K,data:{[v]:B,centerOffset:P-B-K,...k&&{alignmentOffset:K}},reset:k}}}),td=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:f=!0,...g}=Ae(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const b=Me(a),w=Le(c),x=Me(c)===c,N=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=m||(x||!f?[Gt(c)]:Xc(c)),C=y!=="none";!m&&C&&S.push(...Zc(c,f,y,N));const T=[c,...S],z=await vt(t,g),_=[];let V=((n=s.flip)==null?void 0:n.overflows)||[];if(p&&_.push(z[b]),h){const P=Yc(a,i,N);_.push(z[P[0]],z[P[1]])}if(V=[...V,{placement:a,overflows:_}],!_.every(P=>P<=0)){var G,j;const P=(((G=s.flip)==null?void 0:G.index)||0)+1,B=T[P];if(B)return{data:{index:P,overflows:V},reset:{placement:B}};let k=(j=V.filter(K=>K.overflows[0]<=0).sort((K,D)=>K.overflows[1]-D.overflows[1])[0])==null?void 0:j.placement;if(!k)switch(v){case"bestFit":{var I;const K=(I=V.filter(D=>{if(C){const $=Le(D.placement);return $===w||$==="y"}return!0}).map(D=>[D.placement,D.overflows.filter($=>$>0).reduce(($,Z)=>$+Z,0)]).sort((D,$)=>D[1]-$[1])[0])==null?void 0:I[0];K&&(k=K);break}case"initialPlacement":k=c;break}if(a!==k)return{reset:{placement:k}}}return{}}}};function da(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ua(e){return Gc.some(t=>e[t]>=0)}const rd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=Ae(e,t);switch(n){case"referenceHidden":{const s=await vt(t,{...a,elementContext:"reference"}),i=da(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ua(i)}}}case"escaped":{const s=await vt(t,{...a,altBoundary:!0}),i=da(s,r.floating);return{data:{escapedOffsets:i,escaped:ua(i)}}}default:return{}}}}};async function nd(e,t){const{placement:r,platform:n,elements:a}=e,s=await(n.isRTL==null?void 0:n.isRTL(a.floating)),i=Me(r),c=rt(r),u=Le(r)==="y",d=["left","top"].includes(i)?-1:1,p=s&&u?-1:1,h=Ae(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof y=="number"&&(v=c==="end"?y*-1:y),u?{x:v*p,y:m*d}:{x:m*d,y:v*p}}const od=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:s,placement:i,middlewareData:c}=t,u=await nd(t,e);return i===((r=c.offset)==null?void 0:r.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:a+u.x,y:s+u.y,data:{...u,placement:i}}}}},ad=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...u}=Ae(e,t),d={x:r,y:n},p=await vt(t,u),h=Le(Me(a)),m=Ur(h);let v=d[m],y=d[h];if(s){const g=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=v+p[g],x=v-p[b];v=Hr(w,v,x)}if(i){const g=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=y+p[g],x=y-p[b];y=Hr(w,y,x)}const f=c.fn({...t,[m]:v,[h]:y});return{...f,data:{x:f.x-r,y:f.y-n,enabled:{[m]:s,[h]:i}}}}}},sd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Ae(e,t),p={x:r,y:n},h=Le(a),m=Ur(h);let v=p[m],y=p[h];const f=Ae(c,t),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(u){const x=m==="y"?"height":"width",N=s.reference[m]-s.floating[x]+g.mainAxis,S=s.reference[m]+s.reference[x]-g.mainAxis;v<N?v=N:v>S&&(v=S)}if(d){var b,w;const x=m==="y"?"width":"height",N=["top","left"].includes(Me(a)),S=s.reference[h]-s.floating[x]+(N&&((b=i.offset)==null?void 0:b[h])||0)+(N?0:g.crossAxis),C=s.reference[h]+s.reference[x]+(N?0:((w=i.offset)==null?void 0:w[h])||0)-(N?g.crossAxis:0);y<S?y=S:y>C&&(y=C)}return{[m]:v,[h]:y}}}},id=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:s,platform:i,elements:c}=t,{apply:u=()=>{},...d}=Ae(e,t),p=await vt(t,d),h=Me(a),m=rt(a),v=Le(a)==="y",{width:y,height:f}=s.floating;let g,b;h==="top"||h==="bottom"?(g=h,b=m===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(b=h,g=m==="end"?"top":"bottom");const w=f-p.top-p.bottom,x=y-p.left-p.right,N=Ie(f-p[g],w),S=Ie(y-p[b],x),C=!t.middlewareData.shift;let T=N,z=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(z=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),C&&!m){const V=ue(p.left,0),G=ue(p.right,0),j=ue(p.top,0),I=ue(p.bottom,0);v?z=y-2*(V!==0||G!==0?V+G:ue(p.left,p.right)):T=f-2*(j!==0||I!==0?j+I:ue(p.top,p.bottom))}await u({...t,availableWidth:z,availableHeight:T});const _=await i.getDimensions(c.floating);return y!==_.width||f!==_.height?{reset:{rects:!0}}:{}}}};function qt(){return typeof window<"u"}function nt(e){return fa(e)?(e.nodeName||"").toLowerCase():"#document"}function fe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ee(e){var t;return(t=(fa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fa(e){return qt()?e instanceof Node||e instanceof fe(e).Node:!1}function ye(e){return qt()?e instanceof Element||e instanceof fe(e).Element:!1}function Te(e){return qt()?e instanceof HTMLElement||e instanceof fe(e).HTMLElement:!1}function pa(e){return!qt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fe(e).ShadowRoot}function mt(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=we(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function ld(e){return["table","td","th"].includes(nt(e))}function Yt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yr(e){const t=Xr(),r=ye(e)?we(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 cd(e){let t=$e(e);for(;Te(t)&&!ot(t);){if(Yr(t))return t;if(Yt(t))return null;t=$e(t)}return null}function Xr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ot(e){return["html","body","#document"].includes(nt(e))}function we(e){return fe(e).getComputedStyle(e)}function Xt(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $e(e){if(nt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pa(e)&&e.host||Ee(e);return pa(t)?t.host:t}function ha(e){const t=$e(e);return ot(t)?e.ownerDocument?e.ownerDocument.body:e.body:Te(t)&&mt(t)?t:ha(t)}function bt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=ha(e),s=a===((n=e.ownerDocument)==null?void 0:n.body),i=fe(a);if(s){const c=Qr(i);return t.concat(i,i.visualViewport||[],mt(a)?a:[],c&&r?bt(c):[])}return t.concat(a,bt(a,[],r))}function Qr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ga(e){const t=we(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Te(e),s=a?e.offsetWidth:r,i=a?e.offsetHeight:n,c=Ht(r)!==s||Ht(n)!==i;return c&&(r=s,n=i),{width:r,height:n,$:c}}function Zr(e){return ye(e)?e:e.contextElement}function at(e){const t=Zr(e);if(!Te(t))return Se(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:s}=ga(t);let i=(s?Ht(r.width):r.width)/n,c=(s?Ht(r.height):r.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const dd=Se(0);function va(e){const t=fe(e);return!Xr()||!t.visualViewport?dd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ud(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==fe(e)?!1:t}function He(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),s=Zr(e);let i=Se(1);t&&(n?ye(n)&&(i=at(n)):i=at(e));const c=ud(s,r,n)?va(s):Se(0);let u=(a.left+c.x)/i.x,d=(a.top+c.y)/i.y,p=a.width/i.x,h=a.height/i.y;if(s){const m=fe(s),v=n&&ye(n)?fe(n):n;let y=m,f=Qr(y);for(;f&&n&&v!==y;){const g=at(f),b=f.getBoundingClientRect(),w=we(f),x=b.left+(f.clientLeft+parseFloat(w.paddingLeft))*g.x,N=b.top+(f.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,d*=g.y,p*=g.x,h*=g.y,u+=x,d+=N,y=fe(f),f=Qr(y)}}return Kt({width:p,height:h,x:u,y:d})}function Jr(e,t){const r=Xt(e).scrollLeft;return t?t.left+r:He(Ee(e)).left+r}function ma(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-(r?0:Jr(e,n)),s=n.top+t.scrollTop;return{x:a,y:s}}function fd(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const s=a==="fixed",i=Ee(n),c=t?Yt(t.floating):!1;if(n===i||c&&s)return r;let u={scrollLeft:0,scrollTop:0},d=Se(1);const p=Se(0),h=Te(n);if((h||!h&&!s)&&((nt(n)!=="body"||mt(i))&&(u=Xt(n)),Te(n))){const v=He(n);d=at(n),p.x=v.x+n.clientLeft,p.y=v.y+n.clientTop}const m=i&&!h&&!s?ma(i,u,!0):Se(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+p.x+m.x,y:r.y*d.y-u.scrollTop*d.y+p.y+m.y}}function pd(e){return Array.from(e.getClientRects())}function hd(e){const t=Ee(e),r=Xt(e),n=e.ownerDocument.body,a=ue(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=ue(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Jr(e);const c=-r.scrollTop;return we(n).direction==="rtl"&&(i+=ue(t.clientWidth,n.clientWidth)-a),{width:a,height:s,x:i,y:c}}function gd(e,t){const r=fe(e),n=Ee(e),a=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,c=0,u=0;if(a){s=a.width,i=a.height;const d=Xr();(!d||d&&t==="fixed")&&(c=a.offsetLeft,u=a.offsetTop)}return{width:s,height:i,x:c,y:u}}function vd(e,t){const r=He(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,s=Te(e)?at(e):Se(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,u=a*s.x,d=n*s.y;return{width:i,height:c,x:u,y:d}}function ba(e,t,r){let n;if(t==="viewport")n=gd(e,r);else if(t==="document")n=hd(Ee(e));else if(ye(t))n=vd(t,r);else{const a=va(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Kt(n)}function ya(e,t){const r=$e(e);return r===t||!ye(r)||ot(r)?!1:we(r).position==="fixed"||ya(r,t)}function md(e,t){const r=t.get(e);if(r)return r;let n=bt(e,[],!1).filter(c=>ye(c)&&nt(c)!=="body"),a=null;const s=we(e).position==="fixed";let i=s?$e(e):e;for(;ye(i)&&!ot(i);){const c=we(i),u=Yr(i);!u&&c.position==="fixed"&&(a=null),(s?!u&&!a:!u&&c.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||mt(i)&&!u&&ya(e,i))?n=n.filter(p=>p!==i):a=c,i=$e(i)}return t.set(e,n),n}function bd(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const i=[...r==="clippingAncestors"?Yt(t)?[]:md(t,this._c):[].concat(r),n],c=i[0],u=i.reduce((d,p)=>{const h=ba(t,p,a);return d.top=ue(h.top,d.top),d.right=Ie(h.right,d.right),d.bottom=Ie(h.bottom,d.bottom),d.left=ue(h.left,d.left),d},ba(t,c,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function yd(e){const{width:t,height:r}=ga(e);return{width:t,height:r}}function wd(e,t,r){const n=Te(t),a=Ee(t),s=r==="fixed",i=He(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=Se(0);if(n||!n&&!s)if((nt(t)!=="body"||mt(a))&&(c=Xt(t)),n){const m=He(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else a&&(u.x=Jr(a));const d=a&&!n&&!s?ma(a,c):Se(0),p=i.left+c.scrollLeft-u.x-d.x,h=i.top+c.scrollTop-u.y-d.y;return{x:p,y:h,width:i.width,height:i.height}}function Rr(e){return we(e).position==="static"}function wa(e,t){if(!Te(e)||we(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ee(e)===r&&(r=r.ownerDocument.body),r}function xa(e,t){const r=fe(e);if(Yt(e))return r;if(!Te(e)){let a=$e(e);for(;a&&!ot(a);){if(ye(a)&&!Rr(a))return a;a=$e(a)}return r}let n=wa(e,t);for(;n&&ld(n)&&Rr(n);)n=wa(n,t);return n&&ot(n)&&Rr(n)&&!Yr(n)?r:n||cd(e)||r}const xd=async function(e){const t=this.getOffsetParent||xa,r=this.getDimensions,n=await r(e.floating);return{reference:wd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Nd(e){return we(e).direction==="rtl"}const Cd={convertOffsetParentRelativeRectToViewportRelativeRect:fd,getDocumentElement:Ee,getClippingRect:bd,getOffsetParent:xa,getElementRects:xd,getClientRects:pd,getDimensions:yd,getScale:at,isElement:ye,isRTL:Nd};function Na(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 a=Ee(e);function s(){var c;clearTimeout(n),(c=r)==null||c.disconnect(),r=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:p,top:h,width:m,height:v}=d;if(c||t(),!m||!v)return;const y=Ut(h),f=Ut(a.clientWidth-(p+m)),g=Ut(a.clientHeight-(h+v)),b=Ut(p),x={rootMargin:-y+"px "+-f+"px "+-g+"px "+-b+"px",threshold:ue(0,Ie(1,u))||1};let N=!0;function S(C){const T=C[0].intersectionRatio;if(T!==u){if(!N)return i();T?i(!1,T):n=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!Na(d,e.getBoundingClientRect())&&i(),N=!1}try{r=new IntersectionObserver(S,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(S,x)}r.observe(e)}return i(!0),s}function Ed(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,d=Zr(e),p=a||s?[...d?bt(d):[],...bt(t)]:[];p.forEach(b=>{a&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const h=d&&c?Sd(d,r):null;let m=-1,v=null;i&&(v=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=v)==null||x.observe(t)})),r()}),d&&!u&&v.observe(d),v.observe(t));let y,f=u?He(e):null;u&&g();function g(){const b=He(e);f&&!Na(f,b)&&r(),f=b,y=requestAnimationFrame(g)}return r(),()=>{var b;p.forEach(w=>{a&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),h==null||h(),(b=v)==null||b.disconnect(),v=null,u&&cancelAnimationFrame(y)}}const Td=od,Pd=ad,Ad=td,Md=id,kd=rd,Ca=ed,Od=sd,Dd=(e,t,r)=>{const n=new Map,a={platform:Cd,...r},s={...a.platform,_c:n};return Rc(e,t,{...a,platform:s})};var Qt=typeof document<"u"?U.useLayoutEffect:U.useEffect;function Zt(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,a;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(!Zt(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const s=a[n];if(!(s==="_owner"&&e.$$typeof)&&!Zt(e[s],t[s]))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 en(e){const t=l.useRef(e);return Qt(()=>{t.current=e}),t}function _d(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[p,h]=l.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=l.useState(n);Zt(m,n)||v(n);const[y,f]=l.useState(null),[g,b]=l.useState(null),w=l.useCallback(D=>{D!==C.current&&(C.current=D,f(D))},[]),x=l.useCallback(D=>{D!==T.current&&(T.current=D,b(D))},[]),N=s||y,S=i||g,C=l.useRef(null),T=l.useRef(null),z=l.useRef(p),_=u!=null,V=en(u),G=en(a),j=en(d),I=l.useCallback(()=>{if(!C.current||!T.current)return;const D={placement:t,strategy:r,middleware:m};G.current&&(D.platform=G.current),Dd(C.current,T.current,D).then($=>{const Z={...$,isPositioned:j.current!==!1};P.current&&!Zt(z.current,Z)&&(z.current=Z,pr.flushSync(()=>{h(Z)}))})},[m,t,r,G,j]);Qt(()=>{d===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,h(D=>({...D,isPositioned:!1})))},[d]);const P=l.useRef(!1);Qt(()=>(P.current=!0,()=>{P.current=!1}),[]),Qt(()=>{if(N&&(C.current=N),S&&(T.current=S),N&&S){if(V.current)return V.current(N,S,I);I()}},[N,S,I,V,_]);const B=l.useMemo(()=>({reference:C,floating:T,setReference:w,setFloating:x}),[w,x]),k=l.useMemo(()=>({reference:N,floating:S}),[N,S]),K=l.useMemo(()=>{const D={position:r,left:0,top:0};if(!k.floating)return D;const $=Ea(k.floating,p.x),Z=Ea(k.floating,p.y);return c?{...D,transform:"translate("+$+"px, "+Z+"px)",...Sa(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:$,top:Z}},[r,c,k.floating,p.x,p.y]);return l.useMemo(()=>({...p,update:I,refs:B,elements:k,floatingStyles:K}),[p,I,B,k,K])}const Id=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Ca({element:n.current,padding:a}).fn(r):{}:n?Ca({element:n,padding:a}).fn(r):{}}}},Ld=(e,t)=>({...Td(e),options:[e,t]}),$d=(e,t)=>({...Pd(e),options:[e,t]}),Fd=(e,t)=>({...Od(e),options:[e,t]}),zd=(e,t)=>({...Ad(e),options:[e,t]}),Bd=(e,t)=>({...Md(e),options:[e,t]}),Wd=(e,t)=>({...kd(e),options:[e,t]}),Vd=(e,t)=>({...Id(e),options:[e,t]});var jd="Arrow",Ta=l.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...s}=e;return o.jsx(J.svg,{...s,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ta.displayName=jd;var Hd=Ta;function Ud(e){const[t,r]=l.useState(void 0);return De(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let i,c;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;r({width:i,height:c})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var tn="Popper",[Pa,Aa]=ft(tn),[Gd,Ma]=Pa(tn),ka=e=>{const{__scopePopper:t,children:r}=e,[n,a]=l.useState(null);return o.jsx(Gd,{scope:t,anchor:n,onAnchorChange:a,children:r})};ka.displayName=tn;var Oa="PopperAnchor",Da=l.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,s=Ma(Oa,r),i=l.useRef(null),c=le(t,i);return l.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:o.jsx(J.div,{...a,ref:c})});Da.displayName=Oa;var rn="PopperContent",[Kd,qd]=Pa(rn),_a=l.forwardRef((e,t)=>{var pe,F,X,ve,dr,dt;const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:y,...f}=e,g=Ma(rn,r),[b,w]=l.useState(null),x=le(t,Ge=>w(Ge)),[N,S]=l.useState(null),C=Ud(N),T=(C==null?void 0:C.width)??0,z=(C==null?void 0:C.height)??0,_=n+(s!=="center"?"-"+s:""),V=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},G=Array.isArray(d)?d:[d],j=G.length>0,I={padding:V,boundary:G.filter(Xd),altBoundary:j},{refs:P,floatingStyles:B,placement:k,isPositioned:K,middlewareData:D}=_d({strategy:"fixed",placement:_,whileElementsMounted:(...Ge)=>Ed(...Ge,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Ld({mainAxis:a+z,alignmentAxis:i}),u&&$d({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Fd():void 0,...I}),u&&zd({...I}),Bd({...I,apply:({elements:Ge,rects:L,availableWidth:W,availableHeight:se})=>{const{width:ce,height:de}=L.reference,q=Ge.floating.style;q.setProperty("--radix-popper-available-width",`${W}px`),q.setProperty("--radix-popper-available-height",`${se}px`),q.setProperty("--radix-popper-anchor-width",`${ce}px`),q.setProperty("--radix-popper-anchor-height",`${de}px`)}}),N&&Vd({element:N,padding:c}),Qd({arrowWidth:T,arrowHeight:z}),m&&Wd({strategy:"referenceHidden",...I})]}),[$,Z]=$a(k),ee=ge(y);De(()=>{K&&(ee==null||ee())},[K,ee]);const ae=(pe=D.arrow)==null?void 0:pe.x,te=(F=D.arrow)==null?void 0:F.y,ne=((X=D.arrow)==null?void 0:X.centerOffset)!==0,[ie,xe]=l.useState();return De(()=>{b&&xe(window.getComputedStyle(b).zIndex)},[b]),o.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:K?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(ve=D.transformOrigin)==null?void 0:ve.x,(dr=D.transformOrigin)==null?void 0:dr.y].join(" "),...((dt=D.hide)==null?void 0:dt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(Kd,{scope:r,placedSide:$,onArrowChange:S,arrowX:ae,arrowY:te,shouldHideArrow:ne,children:o.jsx(J.div,{"data-side":$,"data-align":Z,...f,ref:x,style:{...f.style,animation:K?void 0:"none"}})})})});_a.displayName=rn;var Ia="PopperArrow",Yd={top:"bottom",right:"left",bottom:"top",left:"right"},La=l.forwardRef(function(t,r){const{__scopePopper:n,...a}=t,s=qd(Ia,n),i=Yd[s.placedSide];return o.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:o.jsx(Hd,{...a,ref:r,style:{...a.style,display:"block"}})})});La.displayName=Ia;function Xd(e){return e!==null}var Qd=e=>({name:"transformOrigin",options:e,fn(t){var g,b,w;const{placement:r,rects:n,middlewareData:a}=t,i=((g=a.arrow)==null?void 0:g.centerOffset)!==0,c=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,p]=$a(r),h={start:"0%",center:"50%",end:"100%"}[p],m=(((b=a.arrow)==null?void 0:b.x)??0)+c/2,v=(((w=a.arrow)==null?void 0:w.y)??0)+u/2;let y="",f="";return d==="bottom"?(y=i?h:`${m}px`,f=`${-u}px`):d==="top"?(y=i?h:`${m}px`,f=`${n.floating.height+u}px`):d==="right"?(y=`${-u}px`,f=i?h:`${v}px`):d==="left"&&(y=`${n.floating.width+u}px`,f=i?h:`${v}px`),{data:{x:y,y:f}}}});function $a(e){const[t,r="center"]=e.split("-");return[t,r]}var Zd=ka,Jd=Da,Rd=_a,eu=La,tu="VisuallyHidden",Jt=l.forwardRef((e,t)=>o.jsx(J.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}}));Jt.displayName=tu;var ru=Jt,[Rt,Wf]=ft("Tooltip",[Aa]),er=Aa(),Fa="TooltipProvider",nu=700,nn="tooltip.open",[ou,on]=Rt(Fa),za=e=>{const{__scopeTooltip:t,delayDuration:r=nu,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:s}=e,[i,c]=l.useState(!0),u=l.useRef(!1),d=l.useRef(0);return l.useEffect(()=>{const p=d.current;return()=>window.clearTimeout(p)},[]),o.jsx(ou,{scope:t,isOpenDelayed:i,delayDuration:r,onOpen:l.useCallback(()=>{window.clearTimeout(d.current),c(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c(!0),n)},[n]),isPointerInTransitRef:u,onPointerInTransitChange:l.useCallback(p=>{u.current=p},[]),disableHoverableContent:a,children:s})};za.displayName=Fa;var tr="Tooltip",[au,yt]=Rt(tr),Ba=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:c}=e,u=on(tr,e.__scopeTooltip),d=er(t),[p,h]=l.useState(null),m=St(),v=l.useRef(0),y=i??u.disableHoverableContent,f=c??u.delayDuration,g=l.useRef(!1),[b=!1,w]=xr({prop:n,defaultProp:a,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(nn))):u.onClose(),s==null||s(T)}}),x=l.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),N=l.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,w(!0)},[w]),S=l.useCallback(()=>{window.clearTimeout(v.current),v.current=0,w(!1)},[w]),C=l.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,w(!0),v.current=0},f)},[f,w]);return l.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),o.jsx(Zd,{...d,children:o.jsx(au,{scope:t,contentId:m,open:b,stateAttribute:x,trigger:p,onTriggerChange:h,onTriggerEnter:l.useCallback(()=>{u.isOpenDelayed?C():N()},[u.isOpenDelayed,C,N]),onTriggerLeave:l.useCallback(()=>{y?S():(window.clearTimeout(v.current),v.current=0)},[S,y]),onOpen:N,onClose:S,disableHoverableContent:y,children:r})})};Ba.displayName=tr;var an="TooltipTrigger",Wa=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=yt(an,r),s=on(an,r),i=er(r),c=l.useRef(null),u=le(t,c,a.onTriggerChange),d=l.useRef(!1),p=l.useRef(!1),h=l.useCallback(()=>d.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),o.jsx(Jd,{asChild:!0,...i,children:o.jsx(J.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:u,onPointerMove:Q(e.onPointerMove,m=>{m.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(a.onTriggerEnter(),p.current=!0)}),onPointerLeave:Q(e.onPointerLeave,()=>{a.onTriggerLeave(),p.current=!1}),onPointerDown:Q(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Q(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:Q(e.onBlur,a.onClose),onClick:Q(e.onClick,a.onClose)})})});Wa.displayName=an;var sn="TooltipPortal",[su,iu]=Rt(sn,{forceMount:void 0}),Va=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:a}=e,s=yt(sn,t);return o.jsx(su,{scope:t,forceMount:r,children:o.jsx(Ve,{present:r||s.open,children:o.jsx(Tt,{asChild:!0,container:a,children:n})})})};Va.displayName=sn;var st="TooltipContent",ja=l.forwardRef((e,t)=>{const r=iu(st,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...s}=e,i=yt(st,e.__scopeTooltip);return o.jsx(Ve,{present:n||i.open,children:i.disableHoverableContent?o.jsx(Ha,{side:a,...s,ref:t}):o.jsx(lu,{side:a,...s,ref:t})})}),lu=l.forwardRef((e,t)=>{const r=yt(st,e.__scopeTooltip),n=on(st,e.__scopeTooltip),a=l.useRef(null),s=le(t,a),[i,c]=l.useState(null),{trigger:u,onClose:d}=r,p=a.current,{onPointerInTransitChange:h}=n,m=l.useCallback(()=>{c(null),h(!1)},[h]),v=l.useCallback((y,f)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},w=fu(b,g.getBoundingClientRect()),x=pu(b,w),N=hu(f.getBoundingClientRect()),S=vu([...x,...N]);c(S),h(!0)},[h]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(u&&p){const y=g=>v(g,p),f=g=>v(g,u);return u.addEventListener("pointerleave",y),p.addEventListener("pointerleave",f),()=>{u.removeEventListener("pointerleave",y),p.removeEventListener("pointerleave",f)}}},[u,p,v,m]),l.useEffect(()=>{if(i){const y=f=>{const g=f.target,b={x:f.clientX,y:f.clientY},w=(u==null?void 0:u.contains(g))||(p==null?void 0:p.contains(g)),x=!gu(b,i);w?m():x&&(m(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,p,i,d,m]),o.jsx(Ha,{...e,ref:s})}),[cu,du]=Rt(tr,{isInside:!1}),Ha=l.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:i,...c}=e,u=yt(st,r),d=er(r),{onClose:p}=u;return l.useEffect(()=>(document.addEventListener(nn,p),()=>document.removeEventListener(nn,p)),[p]),l.useEffect(()=>{if(u.trigger){const h=m=>{const v=m.target;v!=null&&v.contains(u.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,p]),o.jsx(Et,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:o.jsxs(Rd,{"data-state":u.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsx(po,{children:n}),o.jsx(cu,{scope:r,isInside:!0,children:o.jsx(ru,{id:u.contentId,role:"tooltip",children:a||n})})]})})});ja.displayName=st;var Ua="TooltipArrow",uu=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=er(r);return du(Ua,r).isInside?null:o.jsx(eu,{...a,...n,ref:t})});uu.displayName=Ua;function fu(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,a,s)){case s:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function pu(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 hu(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function gu(e,t){const{x:r,y:n}=e;let a=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s].x,u=t[s].y,d=t[i].x,p=t[i].y;u>n!=p>n&&r<(d-c)*(n-u)/(p-u)+c&&(a=!a)}return a}function vu(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),mu(t)}function mu(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const a=e[n];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(a.y-i.y)>=(s.y-i.y)*(a.x-i.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const s=r[r.length-1],i=r[r.length-2];if((s.x-i.x)*(a.y-i.y)>=(s.y-i.y)*(a.x-i.x))r.pop();else break}r.push(a)}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 bu=za,yu=Ba,wu=Wa,xu=Va,Ga=ja;const it=bu,lt=yu,ct=wu,Ue=l.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(xu,{children:o.jsx(Ga,{ref:n,sideOffset:t,className:O("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})}));Ue.displayName=Ga.displayName;const rr=l.forwardRef(({className:e,type:t,mask:r,onChange:n,placeholder:a,...s},i)=>{const[c,u]=l.useState(!1),d=l.useRef(null),h=a||(r==="phone"?"(999) 999-9999":r==="postal-code-ca"?"A9A 9A9":r==="zip-code-us"?"99999":""),m=()=>r==="phone"?"Only enter numbers. Formatting will be added automatically.":r==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":r==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",v=()=>{u(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{u(!1)},3e3)};l.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const y=f=>{if(r){const g=f.target.value;let b=g;if(g.length>0){const w=g[g.length-1];/[^a-zA-Z0-9]/.test(w)&&(console.log("Non-alphanumeric detected:",w),v())}if(r==="phone"){const w=g.replace(/\D/g,"");w.length<=3?b=w:w.length<=6?b=`(${w.slice(0,3)}) ${w.slice(3)}`:b=`(${w.slice(0,3)}) ${w.slice(3,6)}-${w.slice(6,10)}`}else if(r==="postal-code-ca"){const w=g.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let x="";for(let N=0;N<Math.min(w.length,6);N++){const S=w[N];N===0||N===2||N===4?/[A-Z]/.test(S)&&(x+=S):(N===1||N===3||N===5)&&/[0-9]/.test(S)&&(x+=S)}x.length<=3?b=x:b=`${x.slice(0,3)} ${x.slice(3,6)}`}else if(r==="zip-code-us"){const w=g.replace(/\D/g,"");w.length<=5?b=w:b=`${w.slice(0,5)}-${w.slice(5,9)}`}f.target.value=b}n==null||n(f)};return o.jsx(it,{children:o.jsxs(lt,{open:c&&!!r,children:[o.jsx(ct,{asChild:!0,children:o.jsx("input",{type:t,className:O("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),onChange:y,placeholder:h,ref:i,...s})}),o.jsx(Ue,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:m()})]})})});rr.displayName="Input";var Nu="Separator",Ka="horizontal",Cu=["horizontal","vertical"],qa=l.forwardRef((e,t)=>{const{decorative:r,orientation:n=Ka,...a}=e,s=Su(n)?n:Ka,c=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return o.jsx(J.div,{"data-orientation":s,...c,...a,ref:t})});qa.displayName=Nu;function Su(e){return Cu.includes(e)}var Ya=qa;const ln=l.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>o.jsx(Ya,{ref:a,decorative:r,orientation:t,className:O("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));ln.displayName=Ya.displayName;const Xa=$r,Eu=na,Tu=Wt,Qa=oa,cn=l.forwardRef(({className:e,...t},r)=>o.jsx($t,{className:O("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}));cn.displayName=$t.displayName;const Pu=gt("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"}}),dn=l.forwardRef(({side:e="right",className:t,children:r,...n},a)=>o.jsxs(Qa,{children:[o.jsx(cn,{}),o.jsxs(Ft,{ref:a,className:O(Pu({side:e}),t),...n,children:[o.jsxs(Wt,{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:[o.jsx(hr,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));dn.displayName=Ft.displayName;const Za=({className:e,...t})=>o.jsx("div",{className:O("flex flex-col space-y-2 text-center sm:text-left",e),...t});Za.displayName="SheetHeader";const Ja=({className:e,...t})=>o.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ja.displayName="SheetFooter";const Ra=l.forwardRef(({className:e,...t},r)=>o.jsx(zt,{ref:r,className:O("text-lg font-semibold text-foreground",e),...t}));Ra.displayName=zt.displayName;const es=l.forwardRef(({className:e,...t},r)=>o.jsx(Bt,{ref:r,className:O("text-sm text-muted-foreground",e),...t}));es.displayName=Bt.displayName;function Au({onClick:e,publicName:t,applicationName:r,partnerId:n}){const a=`https://api.randmar.io/v4/Partner/${n}/Account/Logo?height=72&width=72`,[s,i]=U.useState(!1),c=()=>{i(!0)};return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:s?o.jsx(oe,{asChild:!0,size:"icon",onClick:e,children:o.jsx(ki,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):o.jsx(oe,{asChild:!0,size:"icon",onClick:e,children:o.jsx("img",{src:a,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:c})})}),o.jsxs("div",{className:"flex flex-1 flex-col",children:[o.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),o.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}var Mu="Label",ts=l.forwardRef((e,t)=>o.jsx(J.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));ts.displayName=Mu;var ku=ts;function Ou({className:e,...t}){return o.jsx(ku,{"data-slot":"label",className:O("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const un=1024;function rs(){const[e,t]=l.useState(void 0);return l.useEffect(()=>{const r=window.matchMedia(`(max-width: ${un-1}px)`),n=()=>{t(window.innerWidth<un)};return r.addEventListener("change",n),t(window.innerWidth<un),()=>r.removeEventListener("change",n)},[]),!!e}function Y({className:e,...t}){return o.jsx("div",{className:O("animate-pulse rounded-md bg-primary/20",e),...t})}const Du="sidebar:state",_u=60*60*24*7,Iu="16rem",Lu="18rem",$u="3rem",Fu="b",ns=l.createContext(null);function wt(){const e=l.useContext(ns);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const fn=l.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:a,children:s,...i},c)=>{const u=rs(),[d,p]=l.useState(!1),[h,m]=l.useState(e),v=t??h,y=l.useCallback(w=>{const x=typeof w=="function"?w(v):w;r?r(x):m(x),document.cookie=`${Du}=${x}; path=/; max-age=${_u}`},[r,v]),f=l.useCallback(()=>u?p(w=>!w):y(w=>!w),[u,y,p]);l.useEffect(()=>{const w=x=>{x.key===Fu&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),f())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[f]);const g=v?"expanded":"collapsed",b=l.useMemo(()=>({state:g,open:v,setOpen:y,isMobile:u,openMobile:d,setOpenMobile:p,toggleSidebar:f}),[g,v,y,u,d,p,f]);return o.jsx(ns.Provider,{value:b,children:o.jsx(it,{delayDuration:0,children:o.jsx("div",{style:{"--sidebar-width":Iu,"--sidebar-width-icon":$u,...a},className:O("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",n),ref:c,...i,children:s})})})});fn.displayName="SidebarProvider";const pn=l.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:a,...s},i)=>{const{isMobile:c,state:u,openMobile:d,setOpenMobile:p}=wt();return r==="none"?o.jsx("div",{className:O("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:i,...s,children:a}):c?o.jsx(Xa,{open:d,onOpenChange:p,...s,children:o.jsx(dn,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Lu},side:e,children:o.jsx("div",{className:"flex h-full w-full flex-col",children:a})})}):o.jsxs("div",{ref:i,className:"group peer hidden md:block text-sidebar-foreground","data-state":u,"data-collapsible":u==="collapsed"?r:"","data-variant":t,"data-side":e,children:[o.jsx("div",{className:O("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)")}),o.jsx("div",{className:O("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),...s,children:o.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:a})})]})});pn.displayName="Sidebar";const hn=l.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:a}=wt();return o.jsxs(oe,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:O("h-7 w-7 text-sidebar-foreground",e),onClick:s=>{t==null||t(s),a()},...r,children:[o.jsx(Ci,{}),o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});hn.displayName="SidebarTrigger";const os=l.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=wt();return o.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:O("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})});os.displayName="SidebarRail";const as=l.forwardRef(({className:e,...t},r)=>o.jsx("main",{ref:r,className:O("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}));as.displayName="SidebarInset";const ss=l.forwardRef(({className:e,...t},r)=>o.jsx(rr,{ref:r,"data-sidebar":"input",className:O("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));ss.displayName="SidebarInput";const gn=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"header",className:O("flex flex-col gap-2 p-2",e),...t}));gn.displayName="SidebarHeader";const vn=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"footer",className:O("flex flex-col gap-2 p-2",e),...t}));vn.displayName="SidebarFooter";const is=l.forwardRef(({className:e,...t},r)=>o.jsx(ln,{ref:r,"data-sidebar":"separator",className:O("mx-2 w-auto bg-sidebar-border",e),...t}));is.displayName="SidebarSeparator";const mn=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"content",className:O("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));mn.displayName="SidebarContent";const ls=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group",className:O("relative flex w-full min-w-0 flex-col p-2",e),...t}));ls.displayName="SidebarGroup";const cs=l.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?me:"div";return o.jsx(a,{ref:n,"data-sidebar":"group-label",className:O("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})});cs.displayName="SidebarGroupLabel";const ds=l.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?me:"button";return o.jsx(a,{ref:n,"data-sidebar":"group-action",className:O("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})});ds.displayName="SidebarGroupAction";const us=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group-content",className:O("w-full text-sm",e),...t}));us.displayName="SidebarGroupContent";const bn=l.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu",className:O("flex w-full min-w-0 flex-col gap-1",e),...t}));bn.displayName="SidebarMenu";const yn=l.forwardRef(({className:e,...t},r)=>o.jsx("li",{ref:r,"data-sidebar":"menu-item",className:O("group/menu-item relative",e),...t}));yn.displayName="SidebarMenuItem";const zu=gt("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"}}),wn=l.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:a,className:s,...i},c)=>{const u=e?me:"button",{isMobile:d,state:p}=wt(),h=o.jsx(u,{ref:c,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:O(zu({variant:r,size:n}),s),...i});return a?(typeof a=="string"&&(a={children:a}),o.jsxs(lt,{children:[o.jsx(ct,{asChild:!0,children:h}),o.jsx(Ue,{side:"right",align:"center",hidden:p!=="collapsed"||d,...a})]})):h});wn.displayName="SidebarMenuButton";const fs=l.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},a)=>{const s=t?me:"button";return o.jsx(s,{ref:a,"data-sidebar":"menu-action",className:O("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})});fs.displayName="SidebarMenuAction";const ps=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:O("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}));ps.displayName="SidebarMenuBadge";const hs=l.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const a=l.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return o.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:O("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&o.jsx(Y,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),o.jsx(Y,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});hs.displayName="SidebarMenuSkeleton";const gs=l.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:O("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}));gs.displayName="SidebarMenuSub";const vs=l.forwardRef(({...e},t)=>o.jsx("li",{ref:t,...e}));vs.displayName="SidebarMenuSubItem";const ms=l.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...a},s)=>{const i=e?me:"a";return o.jsx(i,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:O("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),...a})});ms.displayName="SidebarMenuSubButton";function Bu(e){const t=e+"CollectionProvider",[r,n]=ft(t),[a,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:y,children:f}=v,g=U.useRef(null),b=U.useRef(new Map).current;return o.jsx(a,{scope:y,itemMap:b,collectionRef:g,children:f})};i.displayName=t;const c=e+"CollectionSlot",u=U.forwardRef((v,y)=>{const{scope:f,children:g}=v,b=s(c,f),w=le(y,b.collectionRef);return o.jsx(me,{ref:w,children:g})});u.displayName=c;const d=e+"CollectionItemSlot",p="data-radix-collection-item",h=U.forwardRef((v,y)=>{const{scope:f,children:g,...b}=v,w=U.useRef(null),x=le(y,w),N=s(d,f);return U.useEffect(()=>(N.itemMap.set(w,{ref:w,...b}),()=>void N.itemMap.delete(w))),o.jsx(me,{[p]:"",ref:x,children:g})});h.displayName=d;function m(v){const y=s(e+"CollectionConsumer",v);return U.useCallback(()=>{const g=y.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${p}]`));return Array.from(y.itemMap.values()).sort((N,S)=>b.indexOf(N.ref.current)-b.indexOf(S.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},m,n]}var xn="ToastProvider",[Nn,Wu,Vu]=Bu("Toast"),[bs,Vf]=ft("Toast",[Vu]),[ju,nr]=bs(xn),ys=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:a="right",swipeThreshold:s=50,children:i}=e,[c,u]=l.useState(null),[d,p]=l.useState(0),h=l.useRef(!1),m=l.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${xn}\`. Expected non-empty \`string\`.`),o.jsx(Nn.Provider,{scope:t,children:o.jsx(ju,{scope:t,label:r,duration:n,swipeDirection:a,swipeThreshold:s,toastCount:d,viewport:c,onViewportChange:u,onToastAdd:l.useCallback(()=>p(v=>v+1),[]),onToastRemove:l.useCallback(()=>p(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:m,children:i})})};ys.displayName=xn;var ws="ToastViewport",Hu=["F8"],Cn="toast.viewportPause",Sn="toast.viewportResume",xs=l.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Hu,label:a="Notifications ({hotkey})",...s}=e,i=nr(ws,r),c=Wu(r),u=l.useRef(null),d=l.useRef(null),p=l.useRef(null),h=l.useRef(null),m=le(t,h,i.onViewportChange),v=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=i.toastCount>0;l.useEffect(()=>{const g=b=>{var x;n.length!==0&&n.every(N=>b[N]||b.code===N)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),l.useEffect(()=>{const g=u.current,b=h.current;if(y&&g&&b){const w=()=>{if(!i.isClosePausedRef.current){const C=new CustomEvent(Cn);b.dispatchEvent(C),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){const C=new CustomEvent(Sn);b.dispatchEvent(C),i.isClosePausedRef.current=!1}},N=C=>{!g.contains(C.relatedTarget)&&x()},S=()=>{g.contains(document.activeElement)||x()};return g.addEventListener("focusin",w),g.addEventListener("focusout",N),g.addEventListener("pointermove",w),g.addEventListener("pointerleave",S),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{g.removeEventListener("focusin",w),g.removeEventListener("focusout",N),g.removeEventListener("pointermove",w),g.removeEventListener("pointerleave",S),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[y,i.isClosePausedRef]);const f=l.useCallback(({tabbingDirection:g})=>{const w=c().map(x=>{const N=x.ref.current,S=[N,...rf(N)];return g==="forwards"?S:S.reverse()});return(g==="forwards"?w.reverse():w).flat()},[c]);return l.useEffect(()=>{const g=h.current;if(g){const b=w=>{var S,C,T;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const z=document.activeElement,_=w.shiftKey;if(w.target===g&&_){(S=d.current)==null||S.focus();return}const j=f({tabbingDirection:_?"backwards":"forwards"}),I=j.findIndex(P=>P===z);Pn(j.slice(I+1))?w.preventDefault():_?(C=d.current)==null||C.focus():(T=p.current)==null||T.focus()}};return g.addEventListener("keydown",b),()=>g.removeEventListener("keydown",b)}},[c,f]),o.jsxs(zl,{ref:u,role:"region","aria-label":a.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&o.jsx(En,{ref:d,onFocusFromOutsideViewport:()=>{const g=f({tabbingDirection:"forwards"});Pn(g)}}),o.jsx(Nn.Slot,{scope:r,children:o.jsx(J.ol,{tabIndex:-1,...s,ref:m})}),y&&o.jsx(En,{ref:p,onFocusFromOutsideViewport:()=>{const g=f({tabbingDirection:"backwards"});Pn(g)}})]})});xs.displayName=ws;var Ns="ToastFocusProxy",En=l.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...a}=e,s=nr(Ns,r);return o.jsx(Jt,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:i=>{var d;const c=i.relatedTarget;!((d=s.viewport)!=null&&d.contains(c))&&n()}})});En.displayName=Ns;var or="Toast",Uu="toast.swipeStart",Gu="toast.swipeMove",Ku="toast.swipeCancel",qu="toast.swipeEnd",Cs=l.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:a,onOpenChange:s,...i}=e,[c=!0,u]=xr({prop:n,defaultProp:a,onChange:s});return o.jsx(Ve,{present:r||c,children:o.jsx(Qu,{open:c,...i,ref:t,onClose:()=>u(!1),onPause:ge(e.onPause),onResume:ge(e.onResume),onSwipeStart:Q(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Q(e.onSwipeMove,d=>{const{x:p,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:Q(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:Q(e.onSwipeEnd,d=>{const{x:p,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",`${p}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),u(!1)})})})});Cs.displayName=or;var[Yu,Xu]=bs(or,{onClose(){}}),Qu=l.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:a,open:s,onClose:i,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:p,onSwipeMove:h,onSwipeCancel:m,onSwipeEnd:v,...y}=e,f=nr(or,r),[g,b]=l.useState(null),w=le(t,P=>b(P)),x=l.useRef(null),N=l.useRef(null),S=a||f.duration,C=l.useRef(0),T=l.useRef(S),z=l.useRef(0),{onToastAdd:_,onToastRemove:V}=f,G=ge(()=>{var B;(g==null?void 0:g.contains(document.activeElement))&&((B=f.viewport)==null||B.focus()),i()}),j=l.useCallback(P=>{!P||P===1/0||(window.clearTimeout(z.current),C.current=new Date().getTime(),z.current=window.setTimeout(G,P))},[G]);l.useEffect(()=>{const P=f.viewport;if(P){const B=()=>{j(T.current),d==null||d()},k=()=>{const K=new Date().getTime()-C.current;T.current=T.current-K,window.clearTimeout(z.current),u==null||u()};return P.addEventListener(Cn,k),P.addEventListener(Sn,B),()=>{P.removeEventListener(Cn,k),P.removeEventListener(Sn,B)}}},[f.viewport,S,u,d,j]),l.useEffect(()=>{s&&!f.isClosePausedRef.current&&j(S)},[s,S,f.isClosePausedRef,j]),l.useEffect(()=>(_(),()=>V()),[_,V]);const I=l.useMemo(()=>g?ks(g):null,[g]);return f.viewport?o.jsxs(o.Fragment,{children:[I&&o.jsx(Zu,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:I}),o.jsx(Yu,{scope:r,onClose:G,children:pr.createPortal(o.jsx(Nn.ItemSlot,{scope:r,children:o.jsx(Fl,{asChild:!0,onEscapeKeyDown:Q(c,()=>{f.isFocusedToastEscapeKeyDownRef.current||G(),f.isFocusedToastEscapeKeyDownRef.current=!1}),children:o.jsx(J.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":f.swipeDirection,...y,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Q(e.onKeyDown,P=>{P.key==="Escape"&&(c==null||c(P.nativeEvent),P.nativeEvent.defaultPrevented||(f.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:Q(e.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:Q(e.onPointerMove,P=>{if(!x.current)return;const B=P.clientX-x.current.x,k=P.clientY-x.current.y,K=!!N.current,D=["left","right"].includes(f.swipeDirection),$=["left","up"].includes(f.swipeDirection)?Math.min:Math.max,Z=D?$(0,B):0,ee=D?0:$(0,k),ae=P.pointerType==="touch"?10:2,te={x:Z,y:ee},ne={originalEvent:P,delta:te};K?(N.current=te,ar(Gu,h,ne,{discrete:!1})):Os(te,f.swipeDirection,ae)?(N.current=te,ar(Uu,p,ne,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(B)>ae||Math.abs(k)>ae)&&(x.current=null)}),onPointerUp:Q(e.onPointerUp,P=>{const B=N.current,k=P.target;if(k.hasPointerCapture(P.pointerId)&&k.releasePointerCapture(P.pointerId),N.current=null,x.current=null,B){const K=P.currentTarget,D={originalEvent:P,delta:B};Os(B,f.swipeDirection,f.swipeThreshold)?ar(qu,v,D,{discrete:!0}):ar(Ku,m,D,{discrete:!0}),K.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),f.viewport)})]}):null}),Zu=e=>{const{__scopeToast:t,children:r,...n}=e,a=nr(or,t),[s,i]=l.useState(!1),[c,u]=l.useState(!1);return ef(()=>i(!0)),l.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:o.jsx(Tt,{asChild:!0,children:o.jsx(Jt,{...n,children:s&&o.jsxs(o.Fragment,{children:[a.label," ",r]})})})},Ju="ToastTitle",Ss=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(J.div,{...n,ref:t})});Ss.displayName=Ju;var Ru="ToastDescription",Es=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(J.div,{...n,ref:t})});Es.displayName=Ru;var Ts="ToastAction",Ps=l.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?o.jsx(Ms,{altText:r,asChild:!0,children:o.jsx(Tn,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ts}\`. Expected non-empty \`string\`.`),null)});Ps.displayName=Ts;var As="ToastClose",Tn=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,a=Xu(As,r);return o.jsx(Ms,{asChild:!0,children:o.jsx(J.button,{type:"button",...n,ref:t,onClick:Q(e.onClick,a.onClose)})})});Tn.displayName=As;var Ms=l.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...a}=e;return o.jsx(J.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...a,ref:t})});function ks(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),tf(n)){const a=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!a)if(s){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...ks(n))}}),t}function ar(e,t,r,{discrete:n}){const a=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?ho(a,s):a.dispatchEvent(s)}var Os=(e,t,r=0)=>{const n=Math.abs(e.x),a=Math.abs(e.y),s=n>a;return t==="left"||t==="right"?s&&n>r:!s&&a>r};function ef(e=()=>{}){const t=ge(e);De(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function tf(e){return e.nodeType===e.ELEMENT_NODE}function rf(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Pn(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var nf=ys,Ds=xs,_s=Cs,Is=Ss,Ls=Es,$s=Ps,Fs=Tn;const zs=nf,An=l.forwardRef(({className:e,...t},r)=>o.jsx(Ds,{ref:r,className:O("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}));An.displayName=Ds.displayName;const of=gt("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"}}),Mn=l.forwardRef(({className:e,variant:t,...r},n)=>o.jsx(_s,{ref:n,className:O(of({variant:t}),e),...r}));Mn.displayName=_s.displayName;const Bs=l.forwardRef(({className:e,...t},r)=>o.jsx($s,{ref:r,className:O("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}));Bs.displayName=$s.displayName;const kn=l.forwardRef(({className:e,...t},r)=>o.jsx(Fs,{ref:r,className:O("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:o.jsx(hr,{className:"h-4 w-4"})}));kn.displayName=Fs.displayName;const On=l.forwardRef(({className:e,...t},r)=>o.jsx(Is,{ref:r,className:O("text-sm font-semibold [&+div]:text-xs",e),...t}));On.displayName=Is.displayName;const Dn=l.forwardRef(({className:e,...t},r)=>o.jsx(Ls,{ref:r,className:O("text-sm opacity-90",e),...t}));Dn.displayName=Ls.displayName;const af=1,sf=1e6;let _n=0;function lf(){return _n=(_n+1)%Number.MAX_SAFE_INTEGER,_n.toString()}const In=new Map,Ws=e=>{if(In.has(e))return;const t=setTimeout(()=>{In.delete(e),xt({type:"REMOVE_TOAST",toastId:e})},sf);In.set(e,t)},cf=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,af)};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?Ws(r):e.toasts.forEach(n=>Ws(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):[]}}},sr=[];let ir={toasts:[]};function xt(e){ir=cf(ir,e),sr.forEach(t=>t(ir))}function Vs({...e}){const t=lf(),r=a=>xt({type:"UPDATE_TOAST",toast:{...a,id:t}}),n=()=>xt({type:"DISMISS_TOAST",toastId:t});return xt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||n()}}}),{id:t,dismiss:n,update:r}}function Ln(){const[e,t]=l.useState(ir);return l.useEffect(()=>(sr.push(t),()=>{const r=sr.indexOf(t);r>-1&&sr.splice(r,1)}),[]),{...e,toast:Vs,dismiss:r=>xt({type:"DISMISS_TOAST",toastId:r})}}function js(){const{toasts:e}=Ln();return o.jsxs(zs,{children:[e.map(function({id:t,title:r,description:n,action:a,...s}){return o.jsxs(Mn,{...s,children:[o.jsxs("div",{className:"grid gap-1",children:[r&&o.jsx(On,{children:r}),n&&o.jsx(Dn,{children:n})]}),a,o.jsx(kn,{})]},t)}),o.jsx(An,{})]})}const $n=U.forwardRef(({onSignOut:e,handleValidSearch:t,rightMenu:r,searchPlaceholder:n},a)=>{const[s,i]=U.useState(""),c=fr.useLocation(),{toast:u}=Ln();U.useEffect(()=>{const m=new URLSearchParams(c.search).get("q");m&&i(m)},[c.search]);const d=()=>{const h=s.trim();if(!h||h.length<2){u({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}t(h)},p=h=>{h.key==="Enter"&&d()};return o.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:[o.jsx(hn,{className:"lg:hidden",children:o.jsx(xi,{className:"h-6 w-6"})}),o.jsx("div",{className:"flex flex-1 items-center gap-4",children:o.jsx("div",{className:"relative w-full max-w-sm",children:o.jsxs("div",{children:[o.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:d,"aria-label":"Search",children:o.jsx(Pi,{className:"h-4 w-4 text-muted-foreground"})}),o.jsx(rr,{placeholder:n??"Search...",className:"w-full pl-8 bg-white text-black",value:s,onChange:h=>i(h.target.value),onKeyDown:p,ref:a},"topbar-search")]})})}),r||o.jsx(o.Fragment,{}),e&&o.jsx("div",{className:"flex items-center gap-4",children:o.jsxs(oe,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[o.jsx(wi,{className:"h-4 w-4 text-sidebar-foreground"}),o.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})});$n.displayName="Topbar";const Hs=gt("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border border-input hover:bg-accent hover:text-accent-foreground",success:"bg-green-600 text-white hover:bg-green-700",warning:"bg-yellow-500 text-white hover:bg-yellow-600",info:"bg-blue-500 text-white hover:bg-blue-600",ghost:"bg-background hover:bg-accent hover:text-accent-foreground",randmarRed:"bg-randmar-red text-white hover:bg-randmar-red/80",randmarBlue:"bg-randmar-blue text-white hover:bg-randmar-blue/80",randmarPurple:"bg-randmar-purple text-white hover:bg-randmar-purple/80",randmarGreen:"bg-randmar-green text-black hover:bg-randmar-green/80",randmarBlack:"bg-randmar-black text-white hover:bg-randmar-black/80",randmarYellow:"bg-randmar-yellow text-black hover:bg-randmar-yellow/80"},size:{default:"h-6",sm:"h-5 text-[10px]",lg:"h-7 px-3"}},defaultVariants:{variant:"default",size:"default"}}),Pe=l.forwardRef(({className:e,variant:t,size:r,icon:n,children:a,...s},i)=>o.jsxs("div",{ref:i,className:O(Hs({variant:t,size:r}),e),...s,children:[n&&o.jsx("span",{className:"mr-1",children:n}),a]}));Pe.displayName="Badge";const lr=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("rounded-md border bg-card text-card-foreground shadow-sm",e),...t}));lr.displayName="Card";const Us=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("flex flex-col space-y-1.5 p-6",e),...t}));Us.displayName="CardHeader";const Gs=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("font-semibold leading-none tracking-tight",e),...t}));Gs.displayName="CardTitle";const Ks=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("text-sm text-muted-foreground",e),...t}));Ks.displayName="CardDescription";const cr=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("p-6 pt-0",e),...t}));cr.displayName="CardContent";const qs=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("flex items-center p-6 pt-0",e),...t}));qs.displayName="CardFooter";const Ys=({countryCode:e,className:t=""})=>{const[r,n]=U.useState(null),[a,s]=U.useState(!1);return U.useEffect(()=>{if(!e)return;const c=`https://purecatamphetamine.github.io/country-flag-icons/3x2/${e.toUpperCase()}.svg`;fetch(c,{method:"HEAD"}).then(u=>{u.ok?(n(c),s(!1)):s(!0)}).catch(()=>{s(!0)})},[e]),a||!r?o.jsx("span",{className:t,children:e}):o.jsx("img",{src:r,alt:`${e} flag`,className:`inline-block ${t}`,style:{width:"24px",height:"auto"}})};function Xs({routes:e,footer:t,dashboardTitle:r}){const{appID:n}=fr.useParams(),a=e.filter(s=>s.showInNav);return o.jsxs(pn,{className:"border-r border-sidebar-border",children:[o.jsx(gn,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex items-center justify-center",children:o.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),o.jsx("span",{className:"font-semibold text-lg",children:r})]})}),o.jsx(mn,{className:"py-4 bg-sidebar text-sidebar-foreground",children:o.jsx(bn,{children:a.map(s=>{const i=s.icon,c=`/${s.path.replace(":appID",n)}`;return o.jsx(yn,{children:o.jsx(wn,{asChild:!0,children:o.jsxs(fr.Link,{to:c,className:"transition-colors hover:bg-muted px-6",children:[i&&o.jsx(i,{className:"h-4 w-4"}),o.jsx("span",{children:s.label})]})})},s.key)})})}),o.jsx(vn,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:t})]})}const Qs=U.forwardRef(({children:e,rightMenu:t,routes:r,footer:n,handleValidSearch:a,dashboardTitle:s,onSignOut:i,searchPlaceholder:c},u)=>o.jsx(o.Fragment,{children:o.jsx(fn,{children:o.jsxs("div",{className:"flex grow",children:[o.jsx(Xs,{routes:r,footer:n,dashboardTitle:s}),o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[o.jsx($n,{ref:u,onSignOut:i,rightMenu:t,handleValidSearch:a,searchPlaceholder:c}),o.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),o.jsx(js,{})]})]})})}));Qs.displayName="Layout";const df={sm:100,md:200,lg:300,xl:400};function Zs({randmarSKU:e,size:t="md",alt:r,secondaryContent:n}){const[a,s]=l.useState(!1),[i,c]=l.useState(!1),[u,d]=l.useState(!1),[p,h]=l.useState(!1),m=`https://api.randmar.io/Product/${e}/Video`;l.useEffect(()=>{(async()=>{try{const x=await(await fetch(m+"/Exists")).json();c(x)}catch(w){console.error("Error checking for video:",w),c(!1)}})()},[e,m]);async function v(){if(i){h(!0);try{const w=await(await fetch(m)).blob(),x=window.URL.createObjectURL(w),N=document.createElement("a");N.href=x,N.download=`${e||"product"}-video.mp4`,document.body.appendChild(N),N.click(),document.body.removeChild(N),window.URL.revokeObjectURL(x)}catch(b){console.error("Error downloading video:",b)}finally{h(!1)}}}function y(){navigator.clipboard.writeText(m),d(!0),setTimeout(()=>{d(!1)},2e3)}function f(){s(!0)}const g=df[t||"xl"];return o.jsxs(o.Fragment,{children:[o.jsx(pt,{open:a,onOpenChange:s,children:o.jsx(ht,{className:"max-w-4xl p-0 overflow-hidden",children:n?o.jsxs("div",{className:"flex flex-row",children:[o.jsxs("video",{className:"w-full rounded-l-lg max-h-[720px] object-contain",controls:!0,autoPlay:!0,muted:!0,loop:!0,children:[o.jsx("source",{src:m,type:"video/mp4"}),"Your browser does not support the video tag."]}),o.jsx("div",{className:"flex-grow min-w-[400px] h-[70vh] p-6",children:n})]}):o.jsxs("div",{className:"w-full relative",children:[o.jsxs("video",{className:"w-full max-h-[720px] object-contain",controls:!0,autoPlay:!0,children:[o.jsx("source",{src:m,type:"video/mp4"}),"Your browser does not support the video tag."]}),o.jsxs("div",{className:"absolute top-2 right-12 flex gap-1",children:[o.jsx(it,{children:o.jsxs(lt,{children:[o.jsx(ct,{asChild:!0,children:o.jsx(oe,{variant:"secondary",size:"icon",onClick:y,children:u?o.jsx(qn,{className:"h-4 w-4"}):o.jsx(mi,{className:"h-4 w-4"})})}),o.jsx(Ue,{children:o.jsx("p",{children:"Copy video link"})})]})}),o.jsx(it,{children:o.jsxs(lt,{children:[o.jsx(ct,{asChild:!0,children:o.jsx(oe,{variant:"secondary",size:"icon",onClick:v,disabled:p,children:o.jsx(bi,{className:"h-4 w-4"})})}),o.jsx(Ue,{children:o.jsx("p",{children:"Download video"})})]})})]})]})})}),o.jsxs("div",{className:"relative w-max h-max",children:[o.jsx("img",{alt:r||`Product ${e}`,className:`rounded-md ${i?"cursor-pointer":""}`,onClick:i?f:void 0,src:`https://api.randmar.io/Product/${e}/Image?width=${g*1.5}&height=${g*1.5}`,width:g,height:g}),i&&o.jsx(it,{children:o.jsxs(lt,{children:[o.jsx(ct,{asChild:!0,children:o.jsx(oe,{variant:"secondary",size:"icon",className:"absolute top-2 right-2",onClick:f,children:o.jsx(Si,{className:"h-4 w-4"})})}),o.jsx(Ue,{children:o.jsx("p",{children:"Play video"})})]})})]})]})}function uf({inventory:e}){const t=["MTL","TOR"],r=["VAN","EDM"],n=[...e].sort((f,g)=>(f.Name||"").localeCompare(g.Name||"")),a=n.filter(f=>f.Country==="US"),s=n.filter(f=>f.Country==="CA"),i=n.filter(f=>r.includes(f.WarehouseId||"")),c=n.filter(f=>t.includes(f.WarehouseId||"")),u=s.filter(f=>!t.includes(f.WarehouseId||"")&&!r.includes(f.WarehouseId||"")),d=f=>f.reduce((g,b)=>g+(b.AvailableQuantity||0),0),p=d(s),h=d(c),m=d(i),v=d(a),y=p+v;return o.jsxs("div",{className:"border rounded-md overflow-hidden",children:[s.length>0&&a.length>0&&o.jsxs("div",{className:"grid grid-cols-2 border-b",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"Total"}),o.jsx("span",{children:y})]}),o.jsx("div",{className:"p-3"})]}),s.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"Canada"}),o.jsx("span",{children:p})]}),o.jsx("div",{className:"p-3"})]}),o.jsxs("div",{className:"grid grid-cols-2",children:[o.jsxs("div",{className:"border-r",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"West"}),o.jsx("span",{children:m})]}),i.map((f,g)=>o.jsxs("div",{className:`p-3 text-sm ${g>0?"border-t":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:f.Name}),o.jsx("span",{children:f.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`west-${g}`))]}),o.jsxs("div",{children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"East"}),o.jsx("span",{children:h})]}),c.map((f,g)=>o.jsxs("div",{className:`p-3 text-sm ${g>0?"border-t":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:f.Name}),o.jsx("span",{children:f.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`east-${g}`))]})]}),u.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:o.jsx("span",{children:"Other"})}),o.jsx("div",{className:"grid grid-cols-2",children:u.map((f,g)=>o.jsxs("div",{className:`p-3 text-sm border-t ${g%2===0?"border-r":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:f.Name}),o.jsx("span",{children:f.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`other-${g}`))})]})]}),a.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"United States"}),o.jsx("span",{children:v})]}),o.jsx("div",{className:"p-3"})]}),o.jsx("div",{className:"grid grid-cols-2",children:a.map((f,g)=>o.jsxs("div",{className:`p-3 text-sm border-t ${g%2===0?"border-r":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:f.Name}),o.jsx("span",{children:f.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`usa-${g}`))})]}),e.length===0&&o.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}function ff({item:e,addToCart:t=!1,syncToShopify:r=!1,defaultOpportunityNumber:n="",viewProductAction:a,addToCartAction:s,isAddToCartActionLoading:i=!1,syncToShopifyAction:c,isSyncToShopifyActionLoading:u=!1}){var D,$,Z,ee,ae,te,ne,ie,xe,pe;const[d,p]=U.useState(1),[h,m]=U.useState(null),[v,y]=U.useState(0),[f,g]=U.useState(!1),b=((D=e==null?void 0:e.Distribution)==null?void 0:D.Cost)||0,w=(($=e==null?void 0:e.Distribution)==null?void 0:$.RegularPrice)||0,x=((Z=e==null?void 0:e.Distribution)==null?void 0:Z.Price)||0,[N,S]=U.useState(null),[C,T]=U.useState(!1);U.useEffect(()=>{const F=async()=>{if(e!=null&&e.ManufacturerId){T(!0);try{const X=await fetch(`https://api.randmar.io/V4/Partner/${e.ManufacturerId}/Account/Logo?width=60&height=40`);if(X.ok){const ve=await X.blob();S(URL.createObjectURL(ve))}}catch(X){console.error("Failed to load logo:",X)}finally{T(!1)}}};e!=null&&e.ManufacturerId&&F()},[e==null?void 0:e.ManufacturerId]),U.useEffect(()=>{var F;if(e&&n){const X=(F=e.Opportunities)==null?void 0:F.find(ve=>ve.BidNumber==n);X&&m(X)}},[e,n]),U.useEffect(()=>{if(!e)return;const F=h!=null&&h.Price?h.Price:x;y(w>0?Math.round((w-F)/w*100):0)},[e,h,x,w]),U.useEffect(()=>{i||p(1)},[i]);const z=F=>{if(F.Active!==!0)return!1;const X=new Date().toISOString().split("T")[0];return!(F.EndDate&&F.EndDate<X||F.StartDate&&F.StartDate>X)};if(!e)return o.jsx(lr,{className:"hover:shadow-lg transition-shadow",children:o.jsxs(cr,{className:"p-6",children:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsx(Y,{className:"h-7 w-3/4"}),o.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:o.jsx(Y,{className:"h-10 w-24 rounded-md"})})]}),o.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[o.jsx(Y,{className:"h-6 w-20 rounded-full"}),o.jsx(Y,{className:"h-6 w-24 rounded-full"}),o.jsx(Y,{className:"h-6 w-28 rounded-full"})]}),o.jsxs("div",{className:"flex gap-6",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-6 flex-1",children:[o.jsxs("div",{children:[o.jsx(Y,{className:"h-4 w-12 mb-1"}),o.jsx(Y,{className:"h-5 w-20"})]}),o.jsxs("div",{children:[o.jsx(Y,{className:"h-4 w-12 mb-1"}),o.jsx(Y,{className:"h-5 w-24"})]}),o.jsxs("div",{children:[o.jsx(Y,{className:"h-4 w-20 mb-1"}),o.jsx(Y,{className:"h-5 w-16"})]}),o.jsxs("div",{children:[o.jsx(Y,{className:"h-4 w-12 mb-1"}),o.jsx(Y,{className:"h-5 w-20"})]})]}),o.jsx("div",{className:"flex flex-col",children:o.jsx("div",{className:"w-60 h-40",children:o.jsx(Y,{className:"w-full h-full rounded-lg"})})})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsx("div",{className:"flex flex-1",children:o.jsxs("div",{className:"w-full",children:[o.jsx(Y,{className:"h-4 w-24 mb-3"}),o.jsx(Y,{className:"h-16 w-full rounded-md"})]})}),o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx(Y,{className:"h-10 w-32 rounded-md"}),o.jsx(Y,{className:"h-5 w-24 mt-4"})]})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsxs("div",{className:"flex flex-col items-start gap-1 mb-2",children:[o.jsx(Y,{className:"h-8 w-32"}),o.jsx(Y,{className:"h-6 w-24"})]}),o.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[o.jsx(Y,{className:"h-10 w-24 rounded-md"}),o.jsx(Y,{className:"h-10 flex-1 rounded-md"})]})]})]})});const _=(e==null?void 0:e.Opportunities)||[],V=_.length>0,G=()=>{if(d==null){p(1);return}d>1&&p(d-1)},j=()=>{if(d==null){p(1);return}p(d+1)},I=F=>{const X=parseInt(F.target.value,10);if(!isNaN(X)&&X>0){p(X);return}p(void 0)},P=()=>{(d==null||d<1)&&p(1)},B=((ae=(ee=e.Distribution)==null?void 0:ee.Inventory)==null?void 0:ae.reduce((F,X)=>F+(X.AvailableQuantity||0),0))||0,k=F=>{try{return new Date(F).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch(X){return console.error(X),F.split("T")[0]||"N/A"}},K=()=>{s&&s({quantity:d??1,bidNumber:(h==null?void 0:h.BidNumber)??null})};return o.jsx(lr,{className:"hover:shadow-lg transition-shadow",children:o.jsxs(cr,{className:"p-6",children:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsx("h3",{className:"font-semibold text-xl",children:e.Title||e.RandmarTitle}),o.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:C?o.jsx(Y,{className:"h-10 w-24 rounded-md"}):N&&o.jsx("img",{src:N||"/placeholder.svg",alt:e.ManufacturerName,className:"max-h-10 max-w-24 object-contain"})})]}),o.jsxs("div",{className:"flex gap-6",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.State&&o.jsxs(Pe,{variant:"outline",className:`rounded-full px-3 ${e.State==="Active"?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(qn,{size:"12",className:"mr-1.5"})," ",e.State]}),o.jsxs(Pe,{variant:"outline",className:`rounded-full px-3 ${e.SerialNumber?"bg-green-50 text-green-700 hover:bg-green-50":"bg-yellow-50 text-yellow-700 hover:bg-yellow-50"}`,children:[o.jsx(Ei,{size:"12",className:"mr-1.5"})," ",e.SerialNumber?"Serialized":"Unserialized"]}),e.TransparencyCode&&o.jsxs(Pe,{variant:"outline",className:"rounded-full px-3 bg-green-50 text-green-700 hover:bg-green-50",children:[o.jsx(vi,{size:"12",className:"mr-1.5"})," Transparency Code"]}),o.jsxs(Pe,{variant:"outline",className:`rounded-full px-3 ${e.AvailableToBuy?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Ai,{size:"12",className:"mr-1.5"})," ",(te=e.ManufacturerCategory)!=null&&te.QualificationRequired?e.AvailableToBuy?"Qualified":"Not Qualified":"No Qualification Required"]}),e.ManufacturerId&&o.jsxs(Pe,{variant:"outline",className:`rounded-full px-3 ${e.AutoUpdate?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Ti,{size:"12",className:"mr-1.5"})," ",e.AutoUpdate?`Automatic Reorder (${e.MasterCarton})`:"Manually Reorders"]}),o.jsxs(Pe,{variant:"outline",className:`rounded-full px-3 ${e.BodyHTML&&e.Title&&e.MAP?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Mi,{size:"12",className:"mr-1.5"})," ",e.BodyHTML&&e.Title&&e.MAP?"Shopify Ready":"Not Shopify Ready"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4 flex-1",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"MPN"}),o.jsx("div",{className:"font-medium",children:e.MPN||"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"UPC"}),o.jsx("div",{className:"font-medium",children:e.UPC||"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Unit Weight"}),o.jsx("div",{className:"font-medium",children:e.UnitWeight?`${e.UnitWeight} lbs`:"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"MAP"}),o.jsx("div",{className:"font-medium",children:e.MAP?"$"+e.MAP.toFixed(2):"N/A"})]}),e.CountryCodeOfOrigin&&o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Origin"}),o.jsxs("div",{className:"font-medium flex items-center",children:[o.jsx(Ys,{countryCode:e.CountryCodeOfOrigin,className:"mr-2"}),e.CountryCodeOfOrigin]})]})]})]}),o.jsx("div",{className:"flex flex-col",children:o.jsx(Zs,{randmarSKU:e.RandmarSKU||"",alt:e.RandmarTitle||""})})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsx("div",{className:"flex flex-1",children:V&&e.Distribution&&o.jsxs("div",{className:"w-full",children:[o.jsx("div",{className:"flex items-center",children:"You have "+_.length+(_.length>1?" opportunities":" opportunity")+" for this product:"}),o.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto p-2 mt-1",children:_.map((F,X)=>{var ve;return o.jsxs("div",{className:`flex justify-between items-center rounded-lg transition-colors py-2 px-4 bg-purple-100 border border-muted
|
|
184
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Hc="DialogDescriptionWarning",Uc=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${na(Hc).contentName}}.`;return l.useEffect(()=>{var s;const a=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},$r=Ho,oa=Go,aa=qo,Ft=Yo,zt=Qo,Bt=Zo,Wt=Ro,Vt=ta;const ht=({modal:e=!1,...t})=>o.jsx($r,{modal:e,...t});ht.displayName=$r.displayName;const Fr=oa,sa=aa,zr=Vt,Br=l.forwardRef(({className:e,...t},r)=>o.jsx(Ft,{ref:r,className:O("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}));Br.displayName=Ft.displayName;const gt=l.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(sa,{children:[o.jsx(Br,{}),o.jsxs(zt,{ref:n,className:O("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,o.jsxs(Vt,{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:[o.jsx(hr,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));gt.displayName=zt.displayName;const jt=({className:e,...t})=>o.jsx("div",{className:O("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});jt.displayName="DialogHeader";const Wr=({className:e,...t})=>o.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wr.displayName="DialogFooter";const Ht=l.forwardRef(({className:e,...t},r)=>o.jsx(Bt,{ref:r,className:O("text-lg font-semibold leading-none tracking-tight",e),...t}));Ht.displayName=Bt.displayName;const Vr=l.forwardRef(({className:e,...t},r)=>o.jsx(Wt,{ref:r,className:O("text-sm text-muted-foreground",e),...t}));Vr.displayName=Wt.displayName;const ia=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,la=Rn,vt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return la(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:s}=t,i=Object.keys(a).map(d=>{const p=r==null?void 0:r[d],h=s==null?void 0:s[d];if(p===null)return null;const m=ia(p)||ia(h);return a[d][m]}),c=r&&Object.entries(r).reduce((d,p)=>{let[h,m]=p;return m===void 0||(d[h]=m),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,p)=>{let{class:h,className:m,...v}=p;return Object.entries(v).every(y=>{let[f,g]=y;return Array.isArray(g)?g.includes({...s,...c}[f]):{...s,...c}[f]===g})?[...d,h,m]:d},[]);return la(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},jr=vt("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 cursor-pointer",{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"}}),oe=l.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,confirmationDialog:a,onClick:s,...i},c)=>{const u=n?me:"button";if(!a)return o.jsx(u,{className:O(jr({variant:t,size:r,className:e})),ref:c,onClick:s,...i});s&&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:p,onConfirm:h,confirmText:m="Confirm",cancelText:v="Cancel"}=a,y=()=>{h()};return o.jsxs(ht,{children:[o.jsx(Fr,{asChild:!0,children:o.jsx(u,{className:O(jr({variant:t,size:r,className:e})),ref:c,...i})}),o.jsxs(gt,{children:[o.jsxs(jt,{children:[o.jsx(Ht,{children:d}),o.jsx(Vr,{children:p})]}),o.jsxs(Wr,{className:"flex justify-end gap-2 pt-4",children:[o.jsx(zr,{asChild:!0,children:o.jsx(oe,{variant:"outline",children:v})}),o.jsx(zr,{asChild:!0,children:o.jsx(oe,{onClick:y,children:m})})]})]})]})});oe.displayName="Button";const Gc=["top","right","bottom","left"],Ie=Math.min,ue=Math.max,Ut=Math.round,Gt=Math.floor,Ee=e=>({x:e,y:e}),Kc={left:"right",right:"left",bottom:"top",top:"bottom"},qc={start:"end",end:"start"};function Hr(e,t,r){return ue(e,Ie(t,r))}function Ae(e,t){return typeof e=="function"?e(t):e}function Me(e){return e.split("-")[0]}function ot(e){return e.split("-")[1]}function Ur(e){return e==="x"?"y":"x"}function Gr(e){return e==="y"?"height":"width"}function Le(e){return["top","bottom"].includes(Me(e))?"y":"x"}function Kr(e){return Ur(Le(e))}function Yc(e,t,r){r===void 0&&(r=!1);const n=ot(e),a=Kr(e),s=Gr(a);let i=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Kt(i)),[i,Kt(i)]}function Qc(e){const t=Kt(e);return[qr(e),t,qr(t)]}function qr(e){return e.replace(/start|end/g,t=>qc[t])}function Xc(e,t,r){const n=["left","right"],a=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?s:i;default:return[]}}function Zc(e,t,r,n){const a=ot(e);let s=Xc(Me(e),r==="start",n);return a&&(s=s.map(i=>i+"-"+a),t&&(s=s.concat(s.map(qr)))),s}function Kt(e){return e.replace(/left|right|bottom|top/g,t=>Kc[t])}function Jc(e){return{top:0,right:0,bottom:0,left:0,...e}}function ca(e){return typeof e!="number"?Jc(e):{top:e,right:e,bottom:e,left:e}}function qt(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function da(e,t,r){let{reference:n,floating:a}=e;const s=Le(t),i=Kr(t),c=Gr(i),u=Me(t),d=s==="y",p=n.x+n.width/2-a.width/2,h=n.y+n.height/2-a.height/2,m=n[c]/2-a[c]/2;let v;switch(u){case"top":v={x:p,y:n.y-a.height};break;case"bottom":v={x:p,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:h};break;case"left":v={x:n.x-a.width,y:h};break;default:v={x:n.x,y:n.y}}switch(ot(t)){case"start":v[i]-=m*(r&&d?-1:1);break;case"end":v[i]+=m*(r&&d?-1:1);break}return v}const Rc=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:s=[],platform:i}=r,c=s.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:h}=da(d,n,u),m=n,v={},y=0;for(let f=0;f<c.length;f++){const{name:g,fn:b}=c[f],{x:w,y:x,data:N,reset:S}=await b({x:p,y:h,initialPlacement:n,placement:m,strategy:a,middlewareData:v,rects:d,platform:i,elements:{reference:e,floating:t}});p=w??p,h=x??h,v={...v,[g]:{...v[g],...N}},S&&y<=50&&(y++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(d=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:a}):S.rects),{x:p,y:h}=da(d,m,u)),f=-1)}return{x:p,y:h,placement:m,strategy:a,middlewareData:v}};async function mt(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:s,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:m=!1,padding:v=0}=Ae(t,e),y=ca(v),g=c[m?h==="floating"?"reference":"floating":h],b=qt(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(g)))==null||r?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:d,rootBoundary:p,strategy:u})),w=h==="floating"?{x:n,y:a,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),N=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},S=qt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:x,strategy:u}):w);return{top:(b.top-S.top+y.top)/N.y,bottom:(S.bottom-b.bottom+y.bottom)/N.y,left:(b.left-S.left+y.left)/N.x,right:(S.right-b.right+y.right)/N.x}}const ed=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:s,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:p=0}=Ae(e,t)||{};if(d==null)return{};const h=ca(p),m={x:r,y:n},v=Kr(a),y=Gr(v),f=await i.getDimensions(d),g=v==="y",b=g?"top":"left",w=g?"bottom":"right",x=g?"clientHeight":"clientWidth",N=s.reference[y]+s.reference[v]-m[v]-s.floating[y],S=m[v]-s.reference[v],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let T=C?C[x]:0;(!T||!await(i.isElement==null?void 0:i.isElement(C)))&&(T=c.floating[x]||s.floating[y]);const z=N/2-S/2,_=T/2-f[y]/2-1,V=Ie(h[b],_),G=Ie(h[w],_),j=V,I=T-f[y]-G,P=T/2-f[y]/2+z,B=Hr(j,P,I),k=!u.arrow&&ot(a)!=null&&P!==B&&s.reference[y]/2-(P<j?V:G)-f[y]/2<0,K=k?P<j?P-j:P-I:0;return{[v]:m[v]+K,data:{[v]:B,centerOffset:P-B-K,...k&&{alignmentOffset:K}},reset:k}}}),td=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:f=!0,...g}=Ae(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const b=Me(a),w=Le(c),x=Me(c)===c,N=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=m||(x||!f?[Kt(c)]:Qc(c)),C=y!=="none";!m&&C&&S.push(...Zc(c,f,y,N));const T=[c,...S],z=await mt(t,g),_=[];let V=((n=s.flip)==null?void 0:n.overflows)||[];if(p&&_.push(z[b]),h){const P=Yc(a,i,N);_.push(z[P[0]],z[P[1]])}if(V=[...V,{placement:a,overflows:_}],!_.every(P=>P<=0)){var G,j;const P=(((G=s.flip)==null?void 0:G.index)||0)+1,B=T[P];if(B)return{data:{index:P,overflows:V},reset:{placement:B}};let k=(j=V.filter(K=>K.overflows[0]<=0).sort((K,D)=>K.overflows[1]-D.overflows[1])[0])==null?void 0:j.placement;if(!k)switch(v){case"bestFit":{var I;const K=(I=V.filter(D=>{if(C){const $=Le(D.placement);return $===w||$==="y"}return!0}).map(D=>[D.placement,D.overflows.filter($=>$>0).reduce(($,Z)=>$+Z,0)]).sort((D,$)=>D[1]-$[1])[0])==null?void 0:I[0];K&&(k=K);break}case"initialPlacement":k=c;break}if(a!==k)return{reset:{placement:k}}}return{}}}};function ua(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fa(e){return Gc.some(t=>e[t]>=0)}const rd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=Ae(e,t);switch(n){case"referenceHidden":{const s=await mt(t,{...a,elementContext:"reference"}),i=ua(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:fa(i)}}}case"escaped":{const s=await mt(t,{...a,altBoundary:!0}),i=ua(s,r.floating);return{data:{escapedOffsets:i,escaped:fa(i)}}}default:return{}}}}};async function nd(e,t){const{placement:r,platform:n,elements:a}=e,s=await(n.isRTL==null?void 0:n.isRTL(a.floating)),i=Me(r),c=ot(r),u=Le(r)==="y",d=["left","top"].includes(i)?-1:1,p=s&&u?-1:1,h=Ae(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof y=="number"&&(v=c==="end"?y*-1:y),u?{x:v*p,y:m*d}:{x:m*d,y:v*p}}const od=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:s,placement:i,middlewareData:c}=t,u=await nd(t,e);return i===((r=c.offset)==null?void 0:r.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:a+u.x,y:s+u.y,data:{...u,placement:i}}}}},ad=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...u}=Ae(e,t),d={x:r,y:n},p=await mt(t,u),h=Le(Me(a)),m=Ur(h);let v=d[m],y=d[h];if(s){const g=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=v+p[g],x=v-p[b];v=Hr(w,v,x)}if(i){const g=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=y+p[g],x=y-p[b];y=Hr(w,y,x)}const f=c.fn({...t,[m]:v,[h]:y});return{...f,data:{x:f.x-r,y:f.y-n,enabled:{[m]:s,[h]:i}}}}}},sd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Ae(e,t),p={x:r,y:n},h=Le(a),m=Ur(h);let v=p[m],y=p[h];const f=Ae(c,t),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(u){const x=m==="y"?"height":"width",N=s.reference[m]-s.floating[x]+g.mainAxis,S=s.reference[m]+s.reference[x]-g.mainAxis;v<N?v=N:v>S&&(v=S)}if(d){var b,w;const x=m==="y"?"width":"height",N=["top","left"].includes(Me(a)),S=s.reference[h]-s.floating[x]+(N&&((b=i.offset)==null?void 0:b[h])||0)+(N?0:g.crossAxis),C=s.reference[h]+s.reference[x]+(N?0:((w=i.offset)==null?void 0:w[h])||0)-(N?g.crossAxis:0);y<S?y=S:y>C&&(y=C)}return{[m]:v,[h]:y}}}},id=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:s,platform:i,elements:c}=t,{apply:u=()=>{},...d}=Ae(e,t),p=await mt(t,d),h=Me(a),m=ot(a),v=Le(a)==="y",{width:y,height:f}=s.floating;let g,b;h==="top"||h==="bottom"?(g=h,b=m===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(b=h,g=m==="end"?"top":"bottom");const w=f-p.top-p.bottom,x=y-p.left-p.right,N=Ie(f-p[g],w),S=Ie(y-p[b],x),C=!t.middlewareData.shift;let T=N,z=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(z=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),C&&!m){const V=ue(p.left,0),G=ue(p.right,0),j=ue(p.top,0),I=ue(p.bottom,0);v?z=y-2*(V!==0||G!==0?V+G:ue(p.left,p.right)):T=f-2*(j!==0||I!==0?j+I:ue(p.top,p.bottom))}await u({...t,availableWidth:z,availableHeight:T});const _=await i.getDimensions(c.floating);return y!==_.width||f!==_.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function at(e){return pa(e)?(e.nodeName||"").toLowerCase():"#document"}function fe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Te(e){var t;return(t=(pa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pa(e){return Yt()?e instanceof Node||e instanceof fe(e).Node:!1}function ye(e){return Yt()?e instanceof Element||e instanceof fe(e).Element:!1}function Pe(e){return Yt()?e instanceof HTMLElement||e instanceof fe(e).HTMLElement:!1}function ha(e){return!Yt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fe(e).ShadowRoot}function bt(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=we(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function ld(e){return["table","td","th"].includes(at(e))}function Qt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yr(e){const t=Qr(),r=ye(e)?we(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 cd(e){let t=$e(e);for(;Pe(t)&&!st(t);){if(Yr(t))return t;if(Qt(t))return null;t=$e(t)}return null}function Qr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function st(e){return["html","body","#document"].includes(at(e))}function we(e){return fe(e).getComputedStyle(e)}function Xt(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $e(e){if(at(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ha(e)&&e.host||Te(e);return ha(t)?t.host:t}function ga(e){const t=$e(e);return st(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pe(t)&&bt(t)?t:ga(t)}function yt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=ga(e),s=a===((n=e.ownerDocument)==null?void 0:n.body),i=fe(a);if(s){const c=Xr(i);return t.concat(i,i.visualViewport||[],bt(a)?a:[],c&&r?yt(c):[])}return t.concat(a,yt(a,[],r))}function Xr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function va(e){const t=we(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Pe(e),s=a?e.offsetWidth:r,i=a?e.offsetHeight:n,c=Ut(r)!==s||Ut(n)!==i;return c&&(r=s,n=i),{width:r,height:n,$:c}}function Zr(e){return ye(e)?e:e.contextElement}function it(e){const t=Zr(e);if(!Pe(t))return Ee(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:s}=va(t);let i=(s?Ut(r.width):r.width)/n,c=(s?Ut(r.height):r.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const dd=Ee(0);function ma(e){const t=fe(e);return!Qr()||!t.visualViewport?dd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ud(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==fe(e)?!1:t}function Ue(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),s=Zr(e);let i=Ee(1);t&&(n?ye(n)&&(i=it(n)):i=it(e));const c=ud(s,r,n)?ma(s):Ee(0);let u=(a.left+c.x)/i.x,d=(a.top+c.y)/i.y,p=a.width/i.x,h=a.height/i.y;if(s){const m=fe(s),v=n&&ye(n)?fe(n):n;let y=m,f=Xr(y);for(;f&&n&&v!==y;){const g=it(f),b=f.getBoundingClientRect(),w=we(f),x=b.left+(f.clientLeft+parseFloat(w.paddingLeft))*g.x,N=b.top+(f.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,d*=g.y,p*=g.x,h*=g.y,u+=x,d+=N,y=fe(f),f=Xr(y)}}return qt({width:p,height:h,x:u,y:d})}function Jr(e,t){const r=Xt(e).scrollLeft;return t?t.left+r:Ue(Te(e)).left+r}function ba(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-(r?0:Jr(e,n)),s=n.top+t.scrollTop;return{x:a,y:s}}function fd(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const s=a==="fixed",i=Te(n),c=t?Qt(t.floating):!1;if(n===i||c&&s)return r;let u={scrollLeft:0,scrollTop:0},d=Ee(1);const p=Ee(0),h=Pe(n);if((h||!h&&!s)&&((at(n)!=="body"||bt(i))&&(u=Xt(n)),Pe(n))){const v=Ue(n);d=it(n),p.x=v.x+n.clientLeft,p.y=v.y+n.clientTop}const m=i&&!h&&!s?ba(i,u,!0):Ee(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+p.x+m.x,y:r.y*d.y-u.scrollTop*d.y+p.y+m.y}}function pd(e){return Array.from(e.getClientRects())}function hd(e){const t=Te(e),r=Xt(e),n=e.ownerDocument.body,a=ue(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=ue(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Jr(e);const c=-r.scrollTop;return we(n).direction==="rtl"&&(i+=ue(t.clientWidth,n.clientWidth)-a),{width:a,height:s,x:i,y:c}}function gd(e,t){const r=fe(e),n=Te(e),a=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,c=0,u=0;if(a){s=a.width,i=a.height;const d=Qr();(!d||d&&t==="fixed")&&(c=a.offsetLeft,u=a.offsetTop)}return{width:s,height:i,x:c,y:u}}function vd(e,t){const r=Ue(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,s=Pe(e)?it(e):Ee(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,u=a*s.x,d=n*s.y;return{width:i,height:c,x:u,y:d}}function ya(e,t,r){let n;if(t==="viewport")n=gd(e,r);else if(t==="document")n=hd(Te(e));else if(ye(t))n=vd(t,r);else{const a=ma(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return qt(n)}function wa(e,t){const r=$e(e);return r===t||!ye(r)||st(r)?!1:we(r).position==="fixed"||wa(r,t)}function md(e,t){const r=t.get(e);if(r)return r;let n=yt(e,[],!1).filter(c=>ye(c)&&at(c)!=="body"),a=null;const s=we(e).position==="fixed";let i=s?$e(e):e;for(;ye(i)&&!st(i);){const c=we(i),u=Yr(i);!u&&c.position==="fixed"&&(a=null),(s?!u&&!a:!u&&c.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||bt(i)&&!u&&wa(e,i))?n=n.filter(p=>p!==i):a=c,i=$e(i)}return t.set(e,n),n}function bd(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const i=[...r==="clippingAncestors"?Qt(t)?[]:md(t,this._c):[].concat(r),n],c=i[0],u=i.reduce((d,p)=>{const h=ya(t,p,a);return d.top=ue(h.top,d.top),d.right=Ie(h.right,d.right),d.bottom=Ie(h.bottom,d.bottom),d.left=ue(h.left,d.left),d},ya(t,c,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function yd(e){const{width:t,height:r}=va(e);return{width:t,height:r}}function wd(e,t,r){const n=Pe(t),a=Te(t),s=r==="fixed",i=Ue(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=Ee(0);if(n||!n&&!s)if((at(t)!=="body"||bt(a))&&(c=Xt(t)),n){const m=Ue(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else a&&(u.x=Jr(a));const d=a&&!n&&!s?ba(a,c):Ee(0),p=i.left+c.scrollLeft-u.x-d.x,h=i.top+c.scrollTop-u.y-d.y;return{x:p,y:h,width:i.width,height:i.height}}function Rr(e){return we(e).position==="static"}function xa(e,t){if(!Pe(e)||we(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Te(e)===r&&(r=r.ownerDocument.body),r}function Na(e,t){const r=fe(e);if(Qt(e))return r;if(!Pe(e)){let a=$e(e);for(;a&&!st(a);){if(ye(a)&&!Rr(a))return a;a=$e(a)}return r}let n=xa(e,t);for(;n&&ld(n)&&Rr(n);)n=xa(n,t);return n&&st(n)&&Rr(n)&&!Yr(n)?r:n||cd(e)||r}const xd=async function(e){const t=this.getOffsetParent||Na,r=this.getDimensions,n=await r(e.floating);return{reference:wd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Nd(e){return we(e).direction==="rtl"}const Cd={convertOffsetParentRelativeRectToViewportRelativeRect:fd,getDocumentElement:Te,getClippingRect:bd,getOffsetParent:Na,getElementRects:xd,getClientRects:pd,getDimensions:yd,getScale:it,isElement:ye,isRTL:Nd};function Ca(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 a=Te(e);function s(){var c;clearTimeout(n),(c=r)==null||c.disconnect(),r=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:p,top:h,width:m,height:v}=d;if(c||t(),!m||!v)return;const y=Gt(h),f=Gt(a.clientWidth-(p+m)),g=Gt(a.clientHeight-(h+v)),b=Gt(p),x={rootMargin:-y+"px "+-f+"px "+-g+"px "+-b+"px",threshold:ue(0,Ie(1,u))||1};let N=!0;function S(C){const T=C[0].intersectionRatio;if(T!==u){if(!N)return i();T?i(!1,T):n=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!Ca(d,e.getBoundingClientRect())&&i(),N=!1}try{r=new IntersectionObserver(S,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(S,x)}r.observe(e)}return i(!0),s}function Ed(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,d=Zr(e),p=a||s?[...d?yt(d):[],...yt(t)]:[];p.forEach(b=>{a&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const h=d&&c?Sd(d,r):null;let m=-1,v=null;i&&(v=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=v)==null||x.observe(t)})),r()}),d&&!u&&v.observe(d),v.observe(t));let y,f=u?Ue(e):null;u&&g();function g(){const b=Ue(e);f&&!Ca(f,b)&&r(),f=b,y=requestAnimationFrame(g)}return r(),()=>{var b;p.forEach(w=>{a&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),h==null||h(),(b=v)==null||b.disconnect(),v=null,u&&cancelAnimationFrame(y)}}const Td=od,Pd=ad,Ad=td,Md=id,kd=rd,Sa=ed,Od=sd,Dd=(e,t,r)=>{const n=new Map,a={platform:Cd,...r},s={...a.platform,_c:n};return Rc(e,t,{...a,platform:s})};var Zt=typeof document<"u"?U.useLayoutEffect:U.useEffect;function Jt(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,a;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(!Jt(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const s=a[n];if(!(s==="_owner"&&e.$$typeof)&&!Jt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ea(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ta(e,t){const r=Ea(e);return Math.round(t*r)/r}function en(e){const t=l.useRef(e);return Zt(()=>{t.current=e}),t}function _d(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[p,h]=l.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=l.useState(n);Jt(m,n)||v(n);const[y,f]=l.useState(null),[g,b]=l.useState(null),w=l.useCallback(D=>{D!==C.current&&(C.current=D,f(D))},[]),x=l.useCallback(D=>{D!==T.current&&(T.current=D,b(D))},[]),N=s||y,S=i||g,C=l.useRef(null),T=l.useRef(null),z=l.useRef(p),_=u!=null,V=en(u),G=en(a),j=en(d),I=l.useCallback(()=>{if(!C.current||!T.current)return;const D={placement:t,strategy:r,middleware:m};G.current&&(D.platform=G.current),Dd(C.current,T.current,D).then($=>{const Z={...$,isPositioned:j.current!==!1};P.current&&!Jt(z.current,Z)&&(z.current=Z,pr.flushSync(()=>{h(Z)}))})},[m,t,r,G,j]);Zt(()=>{d===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,h(D=>({...D,isPositioned:!1})))},[d]);const P=l.useRef(!1);Zt(()=>(P.current=!0,()=>{P.current=!1}),[]),Zt(()=>{if(N&&(C.current=N),S&&(T.current=S),N&&S){if(V.current)return V.current(N,S,I);I()}},[N,S,I,V,_]);const B=l.useMemo(()=>({reference:C,floating:T,setReference:w,setFloating:x}),[w,x]),k=l.useMemo(()=>({reference:N,floating:S}),[N,S]),K=l.useMemo(()=>{const D={position:r,left:0,top:0};if(!k.floating)return D;const $=Ta(k.floating,p.x),Z=Ta(k.floating,p.y);return c?{...D,transform:"translate("+$+"px, "+Z+"px)",...Ea(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:$,top:Z}},[r,c,k.floating,p.x,p.y]);return l.useMemo(()=>({...p,update:I,refs:B,elements:k,floatingStyles:K}),[p,I,B,k,K])}const Id=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Sa({element:n.current,padding:a}).fn(r):{}:n?Sa({element:n,padding:a}).fn(r):{}}}},Ld=(e,t)=>({...Td(e),options:[e,t]}),$d=(e,t)=>({...Pd(e),options:[e,t]}),Fd=(e,t)=>({...Od(e),options:[e,t]}),zd=(e,t)=>({...Ad(e),options:[e,t]}),Bd=(e,t)=>({...Md(e),options:[e,t]}),Wd=(e,t)=>({...kd(e),options:[e,t]}),Vd=(e,t)=>({...Id(e),options:[e,t]});var jd="Arrow",Pa=l.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...s}=e;return o.jsx(J.svg,{...s,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pa.displayName=jd;var Hd=Pa;function Ud(e){const[t,r]=l.useState(void 0);return De(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let i,c;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;r({width:i,height:c})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var tn="Popper",[Aa,Ma]=pt(tn),[Gd,ka]=Aa(tn),Oa=e=>{const{__scopePopper:t,children:r}=e,[n,a]=l.useState(null);return o.jsx(Gd,{scope:t,anchor:n,onAnchorChange:a,children:r})};Oa.displayName=tn;var Da="PopperAnchor",_a=l.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,s=ka(Da,r),i=l.useRef(null),c=le(t,i);return l.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:o.jsx(J.div,{...a,ref:c})});_a.displayName=Da;var rn="PopperContent",[Kd,qd]=Aa(rn),Ia=l.forwardRef((e,t)=>{var pe,Fe,Ke,F,Q,he;const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:y,...f}=e,g=ka(rn,r),[b,w]=l.useState(null),x=le(t,qe=>w(qe)),[N,S]=l.useState(null),C=Ud(N),T=(C==null?void 0:C.width)??0,z=(C==null?void 0:C.height)??0,_=n+(s!=="center"?"-"+s:""),V=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},G=Array.isArray(d)?d:[d],j=G.length>0,I={padding:V,boundary:G.filter(Qd),altBoundary:j},{refs:P,floatingStyles:B,placement:k,isPositioned:K,middlewareData:D}=_d({strategy:"fixed",placement:_,whileElementsMounted:(...qe)=>Ed(...qe,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Ld({mainAxis:a+z,alignmentAxis:i}),u&&$d({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Fd():void 0,...I}),u&&zd({...I}),Bd({...I,apply:({elements:qe,rects:L,availableWidth:W,availableHeight:se})=>{const{width:ce,height:de}=L.reference,q=qe.floating.style;q.setProperty("--radix-popper-available-width",`${W}px`),q.setProperty("--radix-popper-available-height",`${se}px`),q.setProperty("--radix-popper-anchor-width",`${ce}px`),q.setProperty("--radix-popper-anchor-height",`${de}px`)}}),N&&Vd({element:N,padding:c}),Xd({arrowWidth:T,arrowHeight:z}),m&&Wd({strategy:"referenceHidden",...I})]}),[$,Z]=Fa(k),ee=ve(y);De(()=>{K&&(ee==null||ee())},[K,ee]);const ae=(pe=D.arrow)==null?void 0:pe.x,te=(Fe=D.arrow)==null?void 0:Fe.y,ne=((Ke=D.arrow)==null?void 0:Ke.centerOffset)!==0,[ie,Ne]=l.useState();return De(()=>{b&&Ne(window.getComputedStyle(b).zIndex)},[b]),o.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:K?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(F=D.transformOrigin)==null?void 0:F.x,(Q=D.transformOrigin)==null?void 0:Q.y].join(" "),...((he=D.hide)==null?void 0:he.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(Kd,{scope:r,placedSide:$,onArrowChange:S,arrowX:ae,arrowY:te,shouldHideArrow:ne,children:o.jsx(J.div,{"data-side":$,"data-align":Z,...f,ref:x,style:{...f.style,animation:K?void 0:"none"}})})})});Ia.displayName=rn;var La="PopperArrow",Yd={top:"bottom",right:"left",bottom:"top",left:"right"},$a=l.forwardRef(function(t,r){const{__scopePopper:n,...a}=t,s=qd(La,n),i=Yd[s.placedSide];return o.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:o.jsx(Hd,{...a,ref:r,style:{...a.style,display:"block"}})})});$a.displayName=La;function Qd(e){return e!==null}var Xd=e=>({name:"transformOrigin",options:e,fn(t){var g,b,w;const{placement:r,rects:n,middlewareData:a}=t,i=((g=a.arrow)==null?void 0:g.centerOffset)!==0,c=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,p]=Fa(r),h={start:"0%",center:"50%",end:"100%"}[p],m=(((b=a.arrow)==null?void 0:b.x)??0)+c/2,v=(((w=a.arrow)==null?void 0:w.y)??0)+u/2;let y="",f="";return d==="bottom"?(y=i?h:`${m}px`,f=`${-u}px`):d==="top"?(y=i?h:`${m}px`,f=`${n.floating.height+u}px`):d==="right"?(y=`${-u}px`,f=i?h:`${v}px`):d==="left"&&(y=`${n.floating.width+u}px`,f=i?h:`${v}px`),{data:{x:y,y:f}}}});function Fa(e){const[t,r="center"]=e.split("-");return[t,r]}var Zd=Oa,Jd=_a,Rd=Ia,eu=$a,tu="VisuallyHidden",Rt=l.forwardRef((e,t)=>o.jsx(J.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}}));Rt.displayName=tu;var ru=Rt,[er,Wf]=pt("Tooltip",[Ma]),tr=Ma(),za="TooltipProvider",nu=700,nn="tooltip.open",[ou,on]=er(za),Ba=e=>{const{__scopeTooltip:t,delayDuration:r=nu,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:s}=e,[i,c]=l.useState(!0),u=l.useRef(!1),d=l.useRef(0);return l.useEffect(()=>{const p=d.current;return()=>window.clearTimeout(p)},[]),o.jsx(ou,{scope:t,isOpenDelayed:i,delayDuration:r,onOpen:l.useCallback(()=>{window.clearTimeout(d.current),c(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c(!0),n)},[n]),isPointerInTransitRef:u,onPointerInTransitChange:l.useCallback(p=>{u.current=p},[]),disableHoverableContent:a,children:s})};Ba.displayName=za;var rr="Tooltip",[au,wt]=er(rr),Wa=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:c}=e,u=on(rr,e.__scopeTooltip),d=tr(t),[p,h]=l.useState(null),m=Et(),v=l.useRef(0),y=i??u.disableHoverableContent,f=c??u.delayDuration,g=l.useRef(!1),[b=!1,w]=xr({prop:n,defaultProp:a,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(nn))):u.onClose(),s==null||s(T)}}),x=l.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),N=l.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,w(!0)},[w]),S=l.useCallback(()=>{window.clearTimeout(v.current),v.current=0,w(!1)},[w]),C=l.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,w(!0),v.current=0},f)},[f,w]);return l.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),o.jsx(Zd,{...d,children:o.jsx(au,{scope:t,contentId:m,open:b,stateAttribute:x,trigger:p,onTriggerChange:h,onTriggerEnter:l.useCallback(()=>{u.isOpenDelayed?C():N()},[u.isOpenDelayed,C,N]),onTriggerLeave:l.useCallback(()=>{y?S():(window.clearTimeout(v.current),v.current=0)},[S,y]),onOpen:N,onClose:S,disableHoverableContent:y,children:r})})};Wa.displayName=rr;var an="TooltipTrigger",Va=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=wt(an,r),s=on(an,r),i=tr(r),c=l.useRef(null),u=le(t,c,a.onTriggerChange),d=l.useRef(!1),p=l.useRef(!1),h=l.useCallback(()=>d.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),o.jsx(Jd,{asChild:!0,...i,children:o.jsx(J.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:u,onPointerMove:X(e.onPointerMove,m=>{m.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(a.onTriggerEnter(),p.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{a.onTriggerLeave(),p.current=!1}),onPointerDown:X(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:X(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:X(e.onBlur,a.onClose),onClick:X(e.onClick,a.onClose)})})});Va.displayName=an;var sn="TooltipPortal",[su,iu]=er(sn,{forceMount:void 0}),ja=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:a}=e,s=wt(sn,t);return o.jsx(su,{scope:t,forceMount:r,children:o.jsx(je,{present:r||s.open,children:o.jsx(Pt,{asChild:!0,container:a,children:n})})})};ja.displayName=sn;var lt="TooltipContent",Ha=l.forwardRef((e,t)=>{const r=iu(lt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...s}=e,i=wt(lt,e.__scopeTooltip);return o.jsx(je,{present:n||i.open,children:i.disableHoverableContent?o.jsx(Ua,{side:a,...s,ref:t}):o.jsx(lu,{side:a,...s,ref:t})})}),lu=l.forwardRef((e,t)=>{const r=wt(lt,e.__scopeTooltip),n=on(lt,e.__scopeTooltip),a=l.useRef(null),s=le(t,a),[i,c]=l.useState(null),{trigger:u,onClose:d}=r,p=a.current,{onPointerInTransitChange:h}=n,m=l.useCallback(()=>{c(null),h(!1)},[h]),v=l.useCallback((y,f)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},w=fu(b,g.getBoundingClientRect()),x=pu(b,w),N=hu(f.getBoundingClientRect()),S=vu([...x,...N]);c(S),h(!0)},[h]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(u&&p){const y=g=>v(g,p),f=g=>v(g,u);return u.addEventListener("pointerleave",y),p.addEventListener("pointerleave",f),()=>{u.removeEventListener("pointerleave",y),p.removeEventListener("pointerleave",f)}}},[u,p,v,m]),l.useEffect(()=>{if(i){const y=f=>{const g=f.target,b={x:f.clientX,y:f.clientY},w=(u==null?void 0:u.contains(g))||(p==null?void 0:p.contains(g)),x=!gu(b,i);w?m():x&&(m(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,p,i,d,m]),o.jsx(Ua,{...e,ref:s})}),[cu,du]=er(rr,{isInside:!1}),Ua=l.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:i,...c}=e,u=wt(lt,r),d=tr(r),{onClose:p}=u;return l.useEffect(()=>(document.addEventListener(nn,p),()=>document.removeEventListener(nn,p)),[p]),l.useEffect(()=>{if(u.trigger){const h=m=>{const v=m.target;v!=null&&v.contains(u.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,p]),o.jsx(Tt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:o.jsxs(Rd,{"data-state":u.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsx(ho,{children:n}),o.jsx(cu,{scope:r,isInside:!0,children:o.jsx(ru,{id:u.contentId,role:"tooltip",children:a||n})})]})})});Ha.displayName=lt;var Ga="TooltipArrow",uu=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=tr(r);return du(Ga,r).isInside?null:o.jsx(eu,{...a,...n,ref:t})});uu.displayName=Ga;function fu(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,a,s)){case s:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function pu(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 hu(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function gu(e,t){const{x:r,y:n}=e;let a=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s].x,u=t[s].y,d=t[i].x,p=t[i].y;u>n!=p>n&&r<(d-c)*(n-u)/(p-u)+c&&(a=!a)}return a}function vu(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),mu(t)}function mu(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const a=e[n];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(a.y-i.y)>=(s.y-i.y)*(a.x-i.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const s=r[r.length-1],i=r[r.length-2];if((s.x-i.x)*(a.y-i.y)>=(s.y-i.y)*(a.x-i.x))r.pop();else break}r.push(a)}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 bu=Ba,yu=Wa,wu=Va,xu=ja,Ka=Ha;const ct=bu,dt=yu,ut=wu,Ge=l.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(xu,{children:o.jsx(Ka,{ref:n,sideOffset:t,className:O("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})}));Ge.displayName=Ka.displayName;const nr=l.forwardRef(({className:e,type:t,mask:r,onChange:n,placeholder:a,...s},i)=>{const[c,u]=l.useState(!1),d=l.useRef(null),h=a||(r==="phone"?"(999) 999-9999":r==="postal-code-ca"?"A9A 9A9":r==="zip-code-us"?"99999":""),m=()=>r==="phone"?"Only enter numbers. Formatting will be added automatically.":r==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":r==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",v=()=>{u(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{u(!1)},3e3)};l.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const y=f=>{if(r){const g=f.target.value;let b=g;if(g.length>0){const w=g[g.length-1];/[^a-zA-Z0-9]/.test(w)&&(console.log("Non-alphanumeric detected:",w),v())}if(r==="phone"){const w=g.replace(/\D/g,"");w.length<=3?b=w:w.length<=6?b=`(${w.slice(0,3)}) ${w.slice(3)}`:b=`(${w.slice(0,3)}) ${w.slice(3,6)}-${w.slice(6,10)}`}else if(r==="postal-code-ca"){const w=g.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let x="";for(let N=0;N<Math.min(w.length,6);N++){const S=w[N];N===0||N===2||N===4?/[A-Z]/.test(S)&&(x+=S):(N===1||N===3||N===5)&&/[0-9]/.test(S)&&(x+=S)}x.length<=3?b=x:b=`${x.slice(0,3)} ${x.slice(3,6)}`}else if(r==="zip-code-us"){const w=g.replace(/\D/g,"");w.length<=5?b=w:b=`${w.slice(0,5)}-${w.slice(5,9)}`}f.target.value=b}n==null||n(f)};return o.jsx(ct,{children:o.jsxs(dt,{open:c&&!!r,children:[o.jsx(ut,{asChild:!0,children:o.jsx("input",{type:t,className:O("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),onChange:y,placeholder:h,ref:i,...s})}),o.jsx(Ge,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:m()})]})})});nr.displayName="Input";var Nu="Separator",qa="horizontal",Cu=["horizontal","vertical"],Ya=l.forwardRef((e,t)=>{const{decorative:r,orientation:n=qa,...a}=e,s=Su(n)?n:qa,c=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return o.jsx(J.div,{"data-orientation":s,...c,...a,ref:t})});Ya.displayName=Nu;function Su(e){return Cu.includes(e)}var Qa=Ya;const ln=l.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>o.jsx(Qa,{ref:a,decorative:r,orientation:t,className:O("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));ln.displayName=Qa.displayName;const Xa=$r,Eu=oa,Tu=Vt,Za=aa,cn=l.forwardRef(({className:e,...t},r)=>o.jsx(Ft,{className:O("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}));cn.displayName=Ft.displayName;const Pu=vt("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"}}),dn=l.forwardRef(({side:e="right",className:t,children:r,...n},a)=>o.jsxs(Za,{children:[o.jsx(cn,{}),o.jsxs(zt,{ref:a,className:O(Pu({side:e}),t),...n,children:[o.jsxs(Vt,{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:[o.jsx(hr,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));dn.displayName=zt.displayName;const Ja=({className:e,...t})=>o.jsx("div",{className:O("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ja.displayName="SheetHeader";const Ra=({className:e,...t})=>o.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ra.displayName="SheetFooter";const es=l.forwardRef(({className:e,...t},r)=>o.jsx(Bt,{ref:r,className:O("text-lg font-semibold text-foreground",e),...t}));es.displayName=Bt.displayName;const ts=l.forwardRef(({className:e,...t},r)=>o.jsx(Wt,{ref:r,className:O("text-sm text-muted-foreground",e),...t}));ts.displayName=Wt.displayName;function Au({onClick:e,publicName:t,applicationName:r,partnerId:n}){const a=`https://api.randmar.io/v4/Partner/${n}/Account/Logo?height=72&width=72`,[s,i]=U.useState(!1),c=()=>{i(!0)};return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:s?o.jsx(oe,{asChild:!0,size:"icon",onClick:e,children:o.jsx(ki,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):o.jsx(oe,{asChild:!0,size:"icon",onClick:e,children:o.jsx("img",{src:a,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:c})})}),o.jsxs("div",{className:"flex flex-1 flex-col",children:[o.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),o.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}var Mu="Label",rs=l.forwardRef((e,t)=>o.jsx(J.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));rs.displayName=Mu;var ku=rs;function Ou({className:e,...t}){return o.jsx(ku,{"data-slot":"label",className:O("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const un=1024;function ns(){const[e,t]=l.useState(void 0);return l.useEffect(()=>{const r=window.matchMedia(`(max-width: ${un-1}px)`),n=()=>{t(window.innerWidth<un)};return r.addEventListener("change",n),t(window.innerWidth<un),()=>r.removeEventListener("change",n)},[]),!!e}function Y({className:e,...t}){return o.jsx("div",{className:O("animate-pulse rounded-md bg-primary/20",e),...t})}const Du="sidebar:state",_u=60*60*24*7,Iu="16rem",Lu="18rem",$u="3rem",Fu="b",os=l.createContext(null);function xt(){const e=l.useContext(os);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const fn=l.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:a,children:s,...i},c)=>{const u=ns(),[d,p]=l.useState(!1),[h,m]=l.useState(e),v=t??h,y=l.useCallback(w=>{const x=typeof w=="function"?w(v):w;r?r(x):m(x),document.cookie=`${Du}=${x}; path=/; max-age=${_u}`},[r,v]),f=l.useCallback(()=>u?p(w=>!w):y(w=>!w),[u,y,p]);l.useEffect(()=>{const w=x=>{x.key===Fu&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),f())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[f]);const g=v?"expanded":"collapsed",b=l.useMemo(()=>({state:g,open:v,setOpen:y,isMobile:u,openMobile:d,setOpenMobile:p,toggleSidebar:f}),[g,v,y,u,d,p,f]);return o.jsx(os.Provider,{value:b,children:o.jsx(ct,{delayDuration:0,children:o.jsx("div",{style:{"--sidebar-width":Iu,"--sidebar-width-icon":$u,...a},className:O("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",n),ref:c,...i,children:s})})})});fn.displayName="SidebarProvider";const pn=l.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:a,...s},i)=>{const{isMobile:c,state:u,openMobile:d,setOpenMobile:p}=xt();return r==="none"?o.jsx("div",{className:O("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:i,...s,children:a}):c?o.jsx(Xa,{open:d,onOpenChange:p,...s,children:o.jsx(dn,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Lu},side:e,children:o.jsx("div",{className:"flex h-full w-full flex-col",children:a})})}):o.jsxs("div",{ref:i,className:"group peer hidden md:block text-sidebar-foreground","data-state":u,"data-collapsible":u==="collapsed"?r:"","data-variant":t,"data-side":e,children:[o.jsx("div",{className:O("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)")}),o.jsx("div",{className:O("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),...s,children:o.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:a})})]})});pn.displayName="Sidebar";const hn=l.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:a}=xt();return o.jsxs(oe,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:O("h-7 w-7 text-sidebar-foreground",e),onClick:s=>{t==null||t(s),a()},...r,children:[o.jsx(Si,{}),o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});hn.displayName="SidebarTrigger";const as=l.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=xt();return o.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:O("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})});as.displayName="SidebarRail";const ss=l.forwardRef(({className:e,...t},r)=>o.jsx("main",{ref:r,className:O("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}));ss.displayName="SidebarInset";const is=l.forwardRef(({className:e,...t},r)=>o.jsx(nr,{ref:r,"data-sidebar":"input",className:O("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));is.displayName="SidebarInput";const gn=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"header",className:O("flex flex-col gap-2 p-2",e),...t}));gn.displayName="SidebarHeader";const vn=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"footer",className:O("flex flex-col gap-2 p-2",e),...t}));vn.displayName="SidebarFooter";const ls=l.forwardRef(({className:e,...t},r)=>o.jsx(ln,{ref:r,"data-sidebar":"separator",className:O("mx-2 w-auto bg-sidebar-border",e),...t}));ls.displayName="SidebarSeparator";const mn=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"content",className:O("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));mn.displayName="SidebarContent";const cs=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group",className:O("relative flex w-full min-w-0 flex-col p-2",e),...t}));cs.displayName="SidebarGroup";const ds=l.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?me:"div";return o.jsx(a,{ref:n,"data-sidebar":"group-label",className:O("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})});ds.displayName="SidebarGroupLabel";const us=l.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?me:"button";return o.jsx(a,{ref:n,"data-sidebar":"group-action",className:O("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})});us.displayName="SidebarGroupAction";const fs=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group-content",className:O("w-full text-sm",e),...t}));fs.displayName="SidebarGroupContent";const bn=l.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu",className:O("flex w-full min-w-0 flex-col gap-1",e),...t}));bn.displayName="SidebarMenu";const yn=l.forwardRef(({className:e,...t},r)=>o.jsx("li",{ref:r,"data-sidebar":"menu-item",className:O("group/menu-item relative",e),...t}));yn.displayName="SidebarMenuItem";const zu=vt("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"}}),wn=l.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:a,className:s,...i},c)=>{const u=e?me:"button",{isMobile:d,state:p}=xt(),h=o.jsx(u,{ref:c,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:O(zu({variant:r,size:n}),s),...i});return a?(typeof a=="string"&&(a={children:a}),o.jsxs(dt,{children:[o.jsx(ut,{asChild:!0,children:h}),o.jsx(Ge,{side:"right",align:"center",hidden:p!=="collapsed"||d,...a})]})):h});wn.displayName="SidebarMenuButton";const ps=l.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},a)=>{const s=t?me:"button";return o.jsx(s,{ref:a,"data-sidebar":"menu-action",className:O("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})});ps.displayName="SidebarMenuAction";const hs=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:O("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}));hs.displayName="SidebarMenuBadge";const gs=l.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const a=l.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return o.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:O("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&o.jsx(Y,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),o.jsx(Y,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});gs.displayName="SidebarMenuSkeleton";const vs=l.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:O("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}));vs.displayName="SidebarMenuSub";const ms=l.forwardRef(({...e},t)=>o.jsx("li",{ref:t,...e}));ms.displayName="SidebarMenuSubItem";const bs=l.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...a},s)=>{const i=e?me:"a";return o.jsx(i,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:O("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),...a})});bs.displayName="SidebarMenuSubButton";function Bu(e){const t=e+"CollectionProvider",[r,n]=pt(t),[a,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:y,children:f}=v,g=U.useRef(null),b=U.useRef(new Map).current;return o.jsx(a,{scope:y,itemMap:b,collectionRef:g,children:f})};i.displayName=t;const c=e+"CollectionSlot",u=U.forwardRef((v,y)=>{const{scope:f,children:g}=v,b=s(c,f),w=le(y,b.collectionRef);return o.jsx(me,{ref:w,children:g})});u.displayName=c;const d=e+"CollectionItemSlot",p="data-radix-collection-item",h=U.forwardRef((v,y)=>{const{scope:f,children:g,...b}=v,w=U.useRef(null),x=le(y,w),N=s(d,f);return U.useEffect(()=>(N.itemMap.set(w,{ref:w,...b}),()=>void N.itemMap.delete(w))),o.jsx(me,{[p]:"",ref:x,children:g})});h.displayName=d;function m(v){const y=s(e+"CollectionConsumer",v);return U.useCallback(()=>{const g=y.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${p}]`));return Array.from(y.itemMap.values()).sort((N,S)=>b.indexOf(N.ref.current)-b.indexOf(S.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},m,n]}var xn="ToastProvider",[Nn,Wu,Vu]=Bu("Toast"),[ys,Vf]=pt("Toast",[Vu]),[ju,or]=ys(xn),ws=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:a="right",swipeThreshold:s=50,children:i}=e,[c,u]=l.useState(null),[d,p]=l.useState(0),h=l.useRef(!1),m=l.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${xn}\`. Expected non-empty \`string\`.`),o.jsx(Nn.Provider,{scope:t,children:o.jsx(ju,{scope:t,label:r,duration:n,swipeDirection:a,swipeThreshold:s,toastCount:d,viewport:c,onViewportChange:u,onToastAdd:l.useCallback(()=>p(v=>v+1),[]),onToastRemove:l.useCallback(()=>p(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:m,children:i})})};ws.displayName=xn;var xs="ToastViewport",Hu=["F8"],Cn="toast.viewportPause",Sn="toast.viewportResume",Ns=l.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Hu,label:a="Notifications ({hotkey})",...s}=e,i=or(xs,r),c=Wu(r),u=l.useRef(null),d=l.useRef(null),p=l.useRef(null),h=l.useRef(null),m=le(t,h,i.onViewportChange),v=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=i.toastCount>0;l.useEffect(()=>{const g=b=>{var x;n.length!==0&&n.every(N=>b[N]||b.code===N)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),l.useEffect(()=>{const g=u.current,b=h.current;if(y&&g&&b){const w=()=>{if(!i.isClosePausedRef.current){const C=new CustomEvent(Cn);b.dispatchEvent(C),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){const C=new CustomEvent(Sn);b.dispatchEvent(C),i.isClosePausedRef.current=!1}},N=C=>{!g.contains(C.relatedTarget)&&x()},S=()=>{g.contains(document.activeElement)||x()};return g.addEventListener("focusin",w),g.addEventListener("focusout",N),g.addEventListener("pointermove",w),g.addEventListener("pointerleave",S),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{g.removeEventListener("focusin",w),g.removeEventListener("focusout",N),g.removeEventListener("pointermove",w),g.removeEventListener("pointerleave",S),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[y,i.isClosePausedRef]);const f=l.useCallback(({tabbingDirection:g})=>{const w=c().map(x=>{const N=x.ref.current,S=[N,...rf(N)];return g==="forwards"?S:S.reverse()});return(g==="forwards"?w.reverse():w).flat()},[c]);return l.useEffect(()=>{const g=h.current;if(g){const b=w=>{var S,C,T;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const z=document.activeElement,_=w.shiftKey;if(w.target===g&&_){(S=d.current)==null||S.focus();return}const j=f({tabbingDirection:_?"backwards":"forwards"}),I=j.findIndex(P=>P===z);Pn(j.slice(I+1))?w.preventDefault():_?(C=d.current)==null||C.focus():(T=p.current)==null||T.focus()}};return g.addEventListener("keydown",b),()=>g.removeEventListener("keydown",b)}},[c,f]),o.jsxs(zl,{ref:u,role:"region","aria-label":a.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&o.jsx(En,{ref:d,onFocusFromOutsideViewport:()=>{const g=f({tabbingDirection:"forwards"});Pn(g)}}),o.jsx(Nn.Slot,{scope:r,children:o.jsx(J.ol,{tabIndex:-1,...s,ref:m})}),y&&o.jsx(En,{ref:p,onFocusFromOutsideViewport:()=>{const g=f({tabbingDirection:"backwards"});Pn(g)}})]})});Ns.displayName=xs;var Cs="ToastFocusProxy",En=l.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...a}=e,s=or(Cs,r);return o.jsx(Rt,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:i=>{var d;const c=i.relatedTarget;!((d=s.viewport)!=null&&d.contains(c))&&n()}})});En.displayName=Cs;var ar="Toast",Uu="toast.swipeStart",Gu="toast.swipeMove",Ku="toast.swipeCancel",qu="toast.swipeEnd",Ss=l.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:a,onOpenChange:s,...i}=e,[c=!0,u]=xr({prop:n,defaultProp:a,onChange:s});return o.jsx(je,{present:r||c,children:o.jsx(Xu,{open:c,...i,ref:t,onClose:()=>u(!1),onPause:ve(e.onPause),onResume:ve(e.onResume),onSwipeStart:X(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:X(e.onSwipeMove,d=>{const{x:p,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:X(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:X(e.onSwipeEnd,d=>{const{x:p,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",`${p}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),u(!1)})})})});Ss.displayName=ar;var[Yu,Qu]=ys(ar,{onClose(){}}),Xu=l.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:a,open:s,onClose:i,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:p,onSwipeMove:h,onSwipeCancel:m,onSwipeEnd:v,...y}=e,f=or(ar,r),[g,b]=l.useState(null),w=le(t,P=>b(P)),x=l.useRef(null),N=l.useRef(null),S=a||f.duration,C=l.useRef(0),T=l.useRef(S),z=l.useRef(0),{onToastAdd:_,onToastRemove:V}=f,G=ve(()=>{var B;(g==null?void 0:g.contains(document.activeElement))&&((B=f.viewport)==null||B.focus()),i()}),j=l.useCallback(P=>{!P||P===1/0||(window.clearTimeout(z.current),C.current=new Date().getTime(),z.current=window.setTimeout(G,P))},[G]);l.useEffect(()=>{const P=f.viewport;if(P){const B=()=>{j(T.current),d==null||d()},k=()=>{const K=new Date().getTime()-C.current;T.current=T.current-K,window.clearTimeout(z.current),u==null||u()};return P.addEventListener(Cn,k),P.addEventListener(Sn,B),()=>{P.removeEventListener(Cn,k),P.removeEventListener(Sn,B)}}},[f.viewport,S,u,d,j]),l.useEffect(()=>{s&&!f.isClosePausedRef.current&&j(S)},[s,S,f.isClosePausedRef,j]),l.useEffect(()=>(_(),()=>V()),[_,V]);const I=l.useMemo(()=>g?Os(g):null,[g]);return f.viewport?o.jsxs(o.Fragment,{children:[I&&o.jsx(Zu,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:I}),o.jsx(Yu,{scope:r,onClose:G,children:pr.createPortal(o.jsx(Nn.ItemSlot,{scope:r,children:o.jsx(Fl,{asChild:!0,onEscapeKeyDown:X(c,()=>{f.isFocusedToastEscapeKeyDownRef.current||G(),f.isFocusedToastEscapeKeyDownRef.current=!1}),children:o.jsx(J.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":f.swipeDirection,...y,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:X(e.onKeyDown,P=>{P.key==="Escape"&&(c==null||c(P.nativeEvent),P.nativeEvent.defaultPrevented||(f.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:X(e.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:X(e.onPointerMove,P=>{if(!x.current)return;const B=P.clientX-x.current.x,k=P.clientY-x.current.y,K=!!N.current,D=["left","right"].includes(f.swipeDirection),$=["left","up"].includes(f.swipeDirection)?Math.min:Math.max,Z=D?$(0,B):0,ee=D?0:$(0,k),ae=P.pointerType==="touch"?10:2,te={x:Z,y:ee},ne={originalEvent:P,delta:te};K?(N.current=te,sr(Gu,h,ne,{discrete:!1})):Ds(te,f.swipeDirection,ae)?(N.current=te,sr(Uu,p,ne,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(B)>ae||Math.abs(k)>ae)&&(x.current=null)}),onPointerUp:X(e.onPointerUp,P=>{const B=N.current,k=P.target;if(k.hasPointerCapture(P.pointerId)&&k.releasePointerCapture(P.pointerId),N.current=null,x.current=null,B){const K=P.currentTarget,D={originalEvent:P,delta:B};Ds(B,f.swipeDirection,f.swipeThreshold)?sr(qu,v,D,{discrete:!0}):sr(Ku,m,D,{discrete:!0}),K.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),f.viewport)})]}):null}),Zu=e=>{const{__scopeToast:t,children:r,...n}=e,a=or(ar,t),[s,i]=l.useState(!1),[c,u]=l.useState(!1);return ef(()=>i(!0)),l.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:o.jsx(Pt,{asChild:!0,children:o.jsx(Rt,{...n,children:s&&o.jsxs(o.Fragment,{children:[a.label," ",r]})})})},Ju="ToastTitle",Es=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(J.div,{...n,ref:t})});Es.displayName=Ju;var Ru="ToastDescription",Ts=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(J.div,{...n,ref:t})});Ts.displayName=Ru;var Ps="ToastAction",As=l.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?o.jsx(ks,{altText:r,asChild:!0,children:o.jsx(Tn,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ps}\`. Expected non-empty \`string\`.`),null)});As.displayName=Ps;var Ms="ToastClose",Tn=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,a=Qu(Ms,r);return o.jsx(ks,{asChild:!0,children:o.jsx(J.button,{type:"button",...n,ref:t,onClick:X(e.onClick,a.onClose)})})});Tn.displayName=Ms;var ks=l.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...a}=e;return o.jsx(J.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...a,ref:t})});function Os(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),tf(n)){const a=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!a)if(s){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Os(n))}}),t}function sr(e,t,r,{discrete:n}){const a=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?go(a,s):a.dispatchEvent(s)}var Ds=(e,t,r=0)=>{const n=Math.abs(e.x),a=Math.abs(e.y),s=n>a;return t==="left"||t==="right"?s&&n>r:!s&&a>r};function ef(e=()=>{}){const t=ve(e);De(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function tf(e){return e.nodeType===e.ELEMENT_NODE}function rf(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Pn(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var nf=ws,_s=Ns,Is=Ss,Ls=Es,$s=Ts,Fs=As,zs=Tn;const Bs=nf,An=l.forwardRef(({className:e,...t},r)=>o.jsx(_s,{ref:r,className:O("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}));An.displayName=_s.displayName;const of=vt("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"}}),Mn=l.forwardRef(({className:e,variant:t,...r},n)=>o.jsx(Is,{ref:n,className:O(of({variant:t}),e),...r}));Mn.displayName=Is.displayName;const Ws=l.forwardRef(({className:e,...t},r)=>o.jsx(Fs,{ref:r,className:O("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}));Ws.displayName=Fs.displayName;const kn=l.forwardRef(({className:e,...t},r)=>o.jsx(zs,{ref:r,className:O("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:o.jsx(hr,{className:"h-4 w-4"})}));kn.displayName=zs.displayName;const On=l.forwardRef(({className:e,...t},r)=>o.jsx(Ls,{ref:r,className:O("text-sm font-semibold [&+div]:text-xs",e),...t}));On.displayName=Ls.displayName;const Dn=l.forwardRef(({className:e,...t},r)=>o.jsx($s,{ref:r,className:O("text-sm opacity-90",e),...t}));Dn.displayName=$s.displayName;const af=1,sf=1e6;let _n=0;function lf(){return _n=(_n+1)%Number.MAX_SAFE_INTEGER,_n.toString()}const In=new Map,Vs=e=>{if(In.has(e))return;const t=setTimeout(()=>{In.delete(e),Nt({type:"REMOVE_TOAST",toastId:e})},sf);In.set(e,t)},cf=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,af)};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?Vs(r):e.toasts.forEach(n=>Vs(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):[]}}},ir=[];let lr={toasts:[]};function Nt(e){lr=cf(lr,e),ir.forEach(t=>t(lr))}function js({...e}){const t=lf(),r=a=>Nt({type:"UPDATE_TOAST",toast:{...a,id:t}}),n=()=>Nt({type:"DISMISS_TOAST",toastId:t});return Nt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||n()}}}),{id:t,dismiss:n,update:r}}function Ln(){const[e,t]=l.useState(lr);return l.useEffect(()=>(ir.push(t),()=>{const r=ir.indexOf(t);r>-1&&ir.splice(r,1)}),[]),{...e,toast:js,dismiss:r=>Nt({type:"DISMISS_TOAST",toastId:r})}}function Hs(){const{toasts:e}=Ln();return o.jsxs(Bs,{children:[e.map(function({id:t,title:r,description:n,action:a,...s}){return o.jsxs(Mn,{...s,children:[o.jsxs("div",{className:"grid gap-1",children:[r&&o.jsx(On,{children:r}),n&&o.jsx(Dn,{children:n})]}),a,o.jsx(kn,{})]},t)}),o.jsx(An,{})]})}const $n=U.forwardRef(({onSignOut:e,handleValidSearch:t,rightMenu:r,searchPlaceholder:n},a)=>{const[s,i]=U.useState(""),c=fr.useLocation(),{toast:u}=Ln();U.useEffect(()=>{const m=new URLSearchParams(c.search).get("q");m&&i(m)},[c.search]);const d=()=>{const h=s.trim();if(!h||h.length<2){u({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}t(h)},p=h=>{h.key==="Enter"&&d()};return o.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:[o.jsx(hn,{className:"lg:hidden",children:o.jsx(Ni,{className:"h-6 w-6"})}),o.jsx("div",{className:"flex flex-1 items-center gap-4",children:o.jsx("div",{className:"relative w-full max-w-sm",children:o.jsxs("div",{children:[o.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:d,"aria-label":"Search",children:o.jsx(Ai,{className:"h-4 w-4 text-muted-foreground"})}),o.jsx(nr,{placeholder:n??"Search...",className:"w-full pl-8 bg-white text-black",value:s,onChange:h=>i(h.target.value),onKeyDown:p,ref:a},"topbar-search")]})})}),r||o.jsx(o.Fragment,{}),e&&o.jsx("div",{className:"flex items-center gap-4",children:o.jsxs(oe,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[o.jsx(xi,{className:"h-4 w-4 text-sidebar-foreground"}),o.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})});$n.displayName="Topbar";const Us=vt("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border border-input hover:bg-accent hover:text-accent-foreground",success:"bg-green-600 text-white hover:bg-green-700",warning:"bg-yellow-500 text-white hover:bg-yellow-600",info:"bg-blue-500 text-white hover:bg-blue-600",ghost:"bg-background hover:bg-accent hover:text-accent-foreground",randmarRed:"bg-randmar-red text-white hover:bg-randmar-red/80",randmarBlue:"bg-randmar-blue text-white hover:bg-randmar-blue/80",randmarPurple:"bg-randmar-purple text-white hover:bg-randmar-purple/80",randmarGreen:"bg-randmar-green text-black hover:bg-randmar-green/80",randmarBlack:"bg-randmar-black text-white hover:bg-randmar-black/80",randmarYellow:"bg-randmar-yellow text-black hover:bg-randmar-yellow/80"},size:{default:"h-6",sm:"h-5 text-[10px]",lg:"h-7 px-3"}},defaultVariants:{variant:"default",size:"default"}}),xe=l.forwardRef(({className:e,variant:t,size:r,icon:n,children:a,...s},i)=>o.jsxs("div",{ref:i,className:O(Us({variant:t,size:r}),e),...s,children:[n&&o.jsx("span",{className:"mr-1",children:n}),a]}));xe.displayName="Badge";const cr=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("rounded-md border bg-card text-card-foreground shadow-sm",e),...t}));cr.displayName="Card";const Gs=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("flex flex-col space-y-1.5 p-6",e),...t}));Gs.displayName="CardHeader";const Ks=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("font-semibold leading-none tracking-tight",e),...t}));Ks.displayName="CardTitle";const qs=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("text-sm text-muted-foreground",e),...t}));qs.displayName="CardDescription";const dr=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("p-6 pt-0",e),...t}));dr.displayName="CardContent";const Ys=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("flex items-center p-6 pt-0",e),...t}));Ys.displayName="CardFooter";const Qs=({countryCode:e,className:t=""})=>{const[r,n]=U.useState(null),[a,s]=U.useState(!1);return U.useEffect(()=>{if(!e)return;const c=`https://purecatamphetamine.github.io/country-flag-icons/3x2/${e.toUpperCase()}.svg`;fetch(c,{method:"HEAD"}).then(u=>{u.ok?(n(c),s(!1)):s(!0)}).catch(()=>{s(!0)})},[e]),a||!r?o.jsx("span",{className:t,children:e}):o.jsx("img",{src:r,alt:`${e} flag`,className:`inline-block ${t}`,style:{width:"24px",height:"auto"}})};function Xs({routes:e,footer:t,dashboardTitle:r}){const{appID:n}=fr.useParams(),a=e.filter(s=>s.showInNav);return o.jsxs(pn,{className:"border-r border-sidebar-border",children:[o.jsx(gn,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex items-center justify-center",children:o.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),o.jsx("span",{className:"font-semibold text-lg",children:r})]})}),o.jsx(mn,{className:"py-4 bg-sidebar text-sidebar-foreground",children:o.jsx(bn,{children:a.map(s=>{const i=s.icon,c=`/${s.path.replace(":appID",n)}`;return o.jsx(yn,{children:o.jsx(wn,{asChild:!0,children:o.jsxs(fr.Link,{to:c,className:"transition-colors hover:bg-muted px-6",children:[i&&o.jsx(i,{className:"h-4 w-4"}),o.jsx("span",{children:s.label})]})})},s.key)})})}),o.jsx(vn,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:t})]})}const Zs=U.forwardRef(({children:e,rightMenu:t,routes:r,footer:n,handleValidSearch:a,dashboardTitle:s,onSignOut:i,searchPlaceholder:c},u)=>o.jsx(o.Fragment,{children:o.jsx(fn,{children:o.jsxs("div",{className:"flex grow",children:[o.jsx(Xs,{routes:r,footer:n,dashboardTitle:s}),o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[o.jsx($n,{ref:u,onSignOut:i,rightMenu:t,handleValidSearch:a,searchPlaceholder:c}),o.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),o.jsx(Hs,{})]})]})})}));Zs.displayName="Layout";const df={sm:100,md:200,lg:300,xl:400};function Js({randmarSKU:e,size:t="md",alt:r,secondaryContent:n}){const[a,s]=l.useState(!1),[i,c]=l.useState(!1),[u,d]=l.useState(!1),[p,h]=l.useState(!1),m=`https://api.randmar.io/Product/${e}/Video`;l.useEffect(()=>{(async()=>{try{const x=await(await fetch(m+"/Exists")).json();c(x)}catch(w){console.error("Error checking for video:",w),c(!1)}})()},[e,m]);async function v(){if(i){h(!0);try{const w=await(await fetch(m)).blob(),x=window.URL.createObjectURL(w),N=document.createElement("a");N.href=x,N.download=`${e||"product"}-video.mp4`,document.body.appendChild(N),N.click(),document.body.removeChild(N),window.URL.revokeObjectURL(x)}catch(b){console.error("Error downloading video:",b)}finally{h(!1)}}}function y(){navigator.clipboard.writeText(m),d(!0),setTimeout(()=>{d(!1)},2e3)}function f(){s(!0)}const g=df[t||"xl"];return o.jsxs(o.Fragment,{children:[o.jsx(ht,{open:a,onOpenChange:s,children:o.jsx(gt,{className:"max-w-4xl p-0 overflow-hidden",children:n?o.jsxs("div",{className:"flex flex-row",children:[o.jsxs("video",{className:"w-full rounded-l-lg max-h-[720px] object-contain",controls:!0,autoPlay:!0,muted:!0,loop:!0,children:[o.jsx("source",{src:m,type:"video/mp4"}),"Your browser does not support the video tag."]}),o.jsx("div",{className:"flex-grow min-w-[400px] h-[70vh] p-6",children:n})]}):o.jsxs("div",{className:"w-full relative",children:[o.jsxs("video",{className:"w-full max-h-[720px] object-contain",controls:!0,autoPlay:!0,children:[o.jsx("source",{src:m,type:"video/mp4"}),"Your browser does not support the video tag."]}),o.jsxs("div",{className:"absolute top-2 right-12 flex gap-1",children:[o.jsx(ct,{children:o.jsxs(dt,{children:[o.jsx(ut,{asChild:!0,children:o.jsx(oe,{variant:"secondary",size:"icon",onClick:y,children:u?o.jsx(qn,{className:"h-4 w-4"}):o.jsx(bi,{className:"h-4 w-4"})})}),o.jsx(Ge,{children:o.jsx("p",{children:"Copy video link"})})]})}),o.jsx(ct,{children:o.jsxs(dt,{children:[o.jsx(ut,{asChild:!0,children:o.jsx(oe,{variant:"secondary",size:"icon",onClick:v,disabled:p,children:o.jsx(yi,{className:"h-4 w-4"})})}),o.jsx(Ge,{children:o.jsx("p",{children:"Download video"})})]})})]})]})})}),o.jsxs("div",{className:"relative w-max h-max",children:[o.jsx("img",{alt:r||`Product ${e}`,className:`rounded-md ${i?"cursor-pointer":""}`,onClick:i?f:void 0,src:`https://api.randmar.io/Product/${e}/Image?width=${g*1.5}&height=${g*1.5}`,width:g,height:g}),i&&o.jsx(ct,{children:o.jsxs(dt,{children:[o.jsx(ut,{asChild:!0,children:o.jsx(oe,{variant:"secondary",size:"icon",className:"absolute top-2 right-2",onClick:f,children:o.jsx(Ei,{className:"h-4 w-4"})})}),o.jsx(Ge,{children:o.jsx("p",{children:"Play video"})})]})})]})]})}function uf({inventory:e}){const t=["MTL","TOR"],r=["VAN","EDM"],n=[...e].sort((f,g)=>(f.Name||"").localeCompare(g.Name||"")),a=n.filter(f=>f.Country==="US"),s=n.filter(f=>f.Country==="CA"),i=n.filter(f=>r.includes(f.WarehouseId||"")),c=n.filter(f=>t.includes(f.WarehouseId||"")),u=s.filter(f=>!t.includes(f.WarehouseId||"")&&!r.includes(f.WarehouseId||"")),d=f=>f.reduce((g,b)=>g+(b.AvailableQuantity||0),0),p=d(s),h=d(c),m=d(i),v=d(a),y=p+v;return o.jsxs("div",{className:"border rounded-md overflow-hidden",children:[s.length>0&&a.length>0&&o.jsxs("div",{className:"grid grid-cols-2 border-b",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"Total"}),o.jsx("span",{children:y})]}),o.jsx("div",{className:"p-3"})]}),s.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"Canada"}),o.jsx("span",{children:p})]}),o.jsx("div",{className:"p-3"})]}),o.jsxs("div",{className:"grid grid-cols-2",children:[o.jsxs("div",{className:"border-r",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"West"}),o.jsx("span",{children:m})]}),i.map((f,g)=>o.jsxs("div",{className:`p-3 text-sm ${g>0?"border-t":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:f.Name}),o.jsx("span",{children:f.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`west-${g}`))]}),o.jsxs("div",{children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"East"}),o.jsx("span",{children:h})]}),c.map((f,g)=>o.jsxs("div",{className:`p-3 text-sm ${g>0?"border-t":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:f.Name}),o.jsx("span",{children:f.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`east-${g}`))]})]}),u.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:o.jsx("span",{children:"Other"})}),o.jsx("div",{className:"grid grid-cols-2",children:u.map((f,g)=>o.jsxs("div",{className:`p-3 text-sm border-t ${g%2===0?"border-r":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:f.Name}),o.jsx("span",{children:f.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`other-${g}`))})]})]}),a.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"United States"}),o.jsx("span",{children:v})]}),o.jsx("div",{className:"p-3"})]}),o.jsx("div",{className:"grid grid-cols-2",children:a.map((f,g)=>o.jsxs("div",{className:`p-3 text-sm border-t ${g%2===0?"border-r":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:f.Name}),o.jsx("span",{children:f.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`usa-${g}`))})]}),e.length===0&&o.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}function ff({item:e,addToCart:t=!1,syncToShopify:r=!1,defaultOpportunityNumber:n="",viewProductAction:a,addToCartAction:s,isAddToCartActionLoading:i=!1,syncToShopifyAction:c,isSyncToShopifyActionLoading:u=!1}){var D,$,Z,ee,ae,te,ne,ie,Ne,pe,Fe,Ke;const[d,p]=U.useState(1),[h,m]=U.useState(null),[v,y]=U.useState(0),[f,g]=U.useState(!1),b=((D=e==null?void 0:e.Distribution)==null?void 0:D.Cost)||0,w=(($=e==null?void 0:e.Distribution)==null?void 0:$.RegularPrice)||0,x=((Z=e==null?void 0:e.Distribution)==null?void 0:Z.Price)||0,[N,S]=U.useState(null),[C,T]=U.useState(!1);U.useEffect(()=>{const F=async()=>{if(e!=null&&e.ManufacturerId){T(!0);try{const Q=await fetch(`https://api.randmar.io/V4/Partner/${e.ManufacturerId}/Account/Logo?width=60&height=40`);if(Q.ok){const he=await Q.blob();S(URL.createObjectURL(he))}}catch(Q){console.error("Failed to load logo:",Q)}finally{T(!1)}}};e!=null&&e.ManufacturerId&&F()},[e==null?void 0:e.ManufacturerId]),U.useEffect(()=>{var F;if(e&&n){const Q=(F=e.Opportunities)==null?void 0:F.find(he=>he.BidNumber==n);Q&&m(Q)}},[e,n]),U.useEffect(()=>{if(!e)return;const F=h!=null&&h.Price?h.Price:x;y(w>0?Math.round((w-F)/w*100):0)},[e,h,x,w]),U.useEffect(()=>{i||p(1)},[i]);const z=F=>{if(F.Active!==!0)return!1;const Q=new Date().toISOString().split("T")[0];return!(F.EndDate&&F.EndDate<Q||F.StartDate&&F.StartDate>Q)};if(!e)return o.jsx(cr,{className:"hover:shadow-lg transition-shadow",children:o.jsxs(dr,{className:"p-6",children:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsx(Y,{className:"h-7 w-3/4"}),o.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:o.jsx(Y,{className:"h-10 w-24 rounded-md"})})]}),o.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[o.jsx(Y,{className:"h-6 w-20 rounded-full"}),o.jsx(Y,{className:"h-6 w-24 rounded-full"}),o.jsx(Y,{className:"h-6 w-28 rounded-full"})]}),o.jsxs("div",{className:"flex gap-6",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-6 flex-1",children:[o.jsxs("div",{children:[o.jsx(Y,{className:"h-4 w-12 mb-1"}),o.jsx(Y,{className:"h-5 w-20"})]}),o.jsxs("div",{children:[o.jsx(Y,{className:"h-4 w-12 mb-1"}),o.jsx(Y,{className:"h-5 w-24"})]}),o.jsxs("div",{children:[o.jsx(Y,{className:"h-4 w-20 mb-1"}),o.jsx(Y,{className:"h-5 w-16"})]}),o.jsxs("div",{children:[o.jsx(Y,{className:"h-4 w-12 mb-1"}),o.jsx(Y,{className:"h-5 w-20"})]})]}),o.jsx("div",{className:"flex flex-col",children:o.jsx("div",{className:"w-60 h-40",children:o.jsx(Y,{className:"w-full h-full rounded-lg"})})})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsx("div",{className:"flex flex-1",children:o.jsxs("div",{className:"w-full",children:[o.jsx(Y,{className:"h-4 w-24 mb-3"}),o.jsx(Y,{className:"h-16 w-full rounded-md"})]})}),o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx(Y,{className:"h-10 w-32 rounded-md"}),o.jsx(Y,{className:"h-5 w-24 mt-4"})]})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsxs("div",{className:"flex flex-col items-start gap-1 mb-2",children:[o.jsx(Y,{className:"h-8 w-32"}),o.jsx(Y,{className:"h-6 w-24"})]}),o.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[o.jsx(Y,{className:"h-10 w-24 rounded-md"}),o.jsx(Y,{className:"h-10 flex-1 rounded-md"})]})]})]})});const _=(e==null?void 0:e.Opportunities)||[],V=_.length>0,G=()=>{if(d==null){p(1);return}d>1&&p(d-1)},j=()=>{if(d==null){p(1);return}p(d+1)},I=F=>{const Q=parseInt(F.target.value,10);if(!isNaN(Q)&&Q>0){p(Q);return}p(void 0)},P=()=>{(d==null||d<1)&&p(1)},B=((ae=(ee=e.Distribution)==null?void 0:ee.Inventory)==null?void 0:ae.reduce((F,Q)=>F+(Q.AvailableQuantity||0),0))||0,k=F=>{try{return new Date(F).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch(Q){return console.error(Q),F.split("T")[0]||"N/A"}},K=()=>{s&&s({quantity:d??1,bidNumber:(h==null?void 0:h.BidNumber)??null})};return o.jsx(cr,{className:"hover:shadow-lg transition-shadow",children:o.jsxs(dr,{className:"p-6",children:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsx("h3",{className:"font-semibold text-xl",children:e.Title||e.RandmarTitle}),o.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:C?o.jsx(Y,{className:"h-10 w-24 rounded-md"}):N&&o.jsx("img",{src:N||"/placeholder.svg",alt:e.ManufacturerName,className:"max-h-10 max-w-24 object-contain"})})]}),o.jsxs("div",{className:"flex gap-6",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.State&&o.jsxs(xe,{variant:"outline",className:`rounded-full px-3 ${e.State==="Active"?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(qn,{size:"12",className:"mr-1.5"})," ",e.State]}),o.jsxs(xe,{variant:"outline",className:`rounded-full px-3 ${e.SerialNumber?"bg-green-50 text-green-700 hover:bg-green-50":"bg-yellow-50 text-yellow-700 hover:bg-yellow-50"}`,children:[o.jsx(Ti,{size:"12",className:"mr-1.5"})," ",e.SerialNumber?"Serialized":"Unserialized"]}),e.TransparencyCode&&o.jsxs(xe,{variant:"outline",className:"rounded-full px-3 bg-green-50 text-green-700 hover:bg-green-50",children:[o.jsx(mi,{size:"12",className:"mr-1.5"})," Transparency Code"]}),e.AvailableToBuy===void 0?o.jsxs(xe,{variant:"outline",className:`rounded-full px-3 ${(te=e.ManufacturerCategory)!=null&&te.QualificationRequired?"bg-blue-50 text-blue-700 hover:bg-blue-50":"bg-neutral-50 text-neutral-700 hover:bg-neutral-50"}`,children:[o.jsx(Qn,{size:"12",className:"mr-1.5"})," ",(ne=e.ManufacturerCategory)!=null&&ne.QualificationRequired?"Qualification Enforced":"No Qualification Needed"]}):o.jsxs(xe,{variant:"outline",className:`rounded-full px-3 ${e.AvailableToBuy?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Qn,{size:"12",className:"mr-1.5"})," ",(ie=e.ManufacturerCategory)!=null&&ie.QualificationRequired?e.AvailableToBuy?"Qualified":"Not Qualified":"No Qualification Required"]}),e.ManufacturerId&&o.jsxs(xe,{variant:"outline",className:`rounded-full px-3 ${e.AutoUpdate?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Pi,{size:"12",className:"mr-1.5"})," ",e.AutoUpdate?`Automatic Reorder (${e.MasterCarton})`:"Manually Reorders"]}),o.jsxs(xe,{variant:"outline",className:`rounded-full px-3 ${e.BodyHTML&&e.Title&&e.MAP?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Mi,{size:"12",className:"mr-1.5"})," ",e.BodyHTML&&e.Title&&e.MAP?"Shopify Ready":"Not Shopify Ready"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4 flex-1",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"MPN"}),o.jsx("div",{className:"font-medium",children:e.MPN||"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"UPC"}),o.jsx("div",{className:"font-medium",children:e.UPC||"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Unit Weight"}),o.jsx("div",{className:"font-medium",children:e.UnitWeight?`${e.UnitWeight} lbs`:"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"MAP"}),o.jsx("div",{className:"font-medium",children:e.MAP?"$"+e.MAP.toFixed(2):"N/A"})]}),e.CountryCodeOfOrigin&&o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Origin"}),o.jsxs("div",{className:"font-medium flex items-center",children:[o.jsx(Qs,{countryCode:e.CountryCodeOfOrigin,className:"mr-2"}),e.CountryCodeOfOrigin]})]})]})]}),o.jsx("div",{className:"flex flex-col",children:o.jsx(Js,{randmarSKU:e.RandmarSKU||"",alt:e.RandmarTitle||""})})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsx("div",{className:"flex flex-1",children:V&&e.Distribution&&o.jsxs("div",{className:"w-full",children:[o.jsx("div",{className:"flex items-center",children:"You have "+_.length+(_.length>1?" opportunities":" opportunity")+" for this product:"}),o.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto p-2 mt-1",children:_.map((F,Q)=>{var he;return o.jsxs("div",{className:`flex justify-between items-center rounded-lg transition-colors py-2 px-4 bg-purple-100 border border-muted
|
|
185
185
|
${F.BidNumber==(h==null?void 0:h.BidNumber)?"cursor-pointer border-2 border-purple-900":z(F)?"hover:bg-purple-200 cursor-pointer":"!bg-neutral-50"}
|
|
186
|
-
`,onClick:()=>{z(F)&&m(F.BidNumber!=(h==null?void 0:h.BidNumber)?F:null)},children:[o.jsx("div",{className:"flex items-center",children:o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{className:"font-medium text-sm",children:F.Opportunity}),o.jsxs("span",{className:"text-xs text-neutral-900",children:[F.BidNumber," ",!z(F)&&o.jsx(
|
|
186
|
+
`,onClick:()=>{z(F)&&m(F.BidNumber!=(h==null?void 0:h.BidNumber)?F:null)},children:[o.jsx("div",{className:"flex items-center",children:o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{className:"font-medium text-sm",children:F.Opportunity}),o.jsxs("span",{className:"text-xs text-neutral-900",children:[F.BidNumber," ",!z(F)&&o.jsx(xe,{variant:"outline",className:"text-xs mx-1 h-5 bg-gray-100",children:"Currently unavailable"})]})]})}),o.jsxs("div",{className:"flex flex-col items-end",children:[o.jsxs("span",{className:"font-semibold",children:["$",(he=F.Price)==null?void 0:he.toFixed(2)]}),F.Rebate&&F.Rebate>0&&o.jsxs("span",{className:"text-xs text-green-600",children:["Rebate: $",F.Rebate.toFixed(2)]}),F.EndDate&&o.jsxs("span",{className:"text-xs text-neutral-600",children:["Ends: ",k(F.EndDate)]})]})]},Q)})})]})}),o.jsxs("div",{className:"flex flex-col items-center",children:[a&&o.jsxs(oe,{variant:"secondary",onClick:a,children:[o.jsx(wi,{className:"mr-2"}),"View Product"]}),((Ne=e.Distribution)==null?void 0:Ne.Inventory)&&o.jsx("div",{className:"mt-4",children:o.jsxs(ht,{open:f,onOpenChange:g,children:[o.jsx(Fr,{asChild:!0,children:o.jsxs(oe,{variant:"ghost",className:`flex items-center text-sm ${B>0?"text-green-700":"text-red-700"}`,children:[o.jsx(Zn,{size:"16",className:"mr-2"}),B>0?o.jsxs(o.Fragment,{children:[B," in stock"]}):o.jsx(o.Fragment,{children:"Out of stock"})]})}),o.jsxs(gt,{className:"max-w-4xl",children:[o.jsx(jt,{children:o.jsxs(Ht,{className:"flex items-center",children:[o.jsx(Zn,{className:"mr-2",size:18}),"Inventory Information"]})}),o.jsx(uf,{inventory:e.Distribution.Inventory})]})]})})]})]}),e.Distribution&&o.jsxs("div",{className:"flex justify-between items-end mt-4",children:[o.jsx("div",{className:"flex-shrink-1 flex flex-col items-start gap-1",children:b>0?o.jsx("div",{className:"flex items-center",children:o.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[o.jsx("span",{children:"Cost: $"}),b.toFixed(2),o.jsx("span",{children:" CAD"})]})}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center flex-wrap",children:[o.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[o.jsx("span",{children:"$"}),h?(Fe=(pe=e.Opportunities)==null?void 0:pe.find(F=>F.BidNumber==h.BidNumber))==null?void 0:Fe.Price:x.toFixed(2),o.jsx("span",{children:" CAD"})]}),v>0&&o.jsxs("span",{className:"text-muted-foreground line-through ml-2 whitespace-nowrap",children:["$",w.toFixed(2)]})]}),v>0&&o.jsx("div",{className:"flex items-center",children:o.jsxs(xe,{variant:"outline",className:"bg-red-50 text-red-700 rounded-full px-3 whitespace-nowrap",children:[o.jsxs("span",{children:[v,"% OFF"]}),((Ke=e.InstantRebate)==null?void 0:Ke.EndDate)&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",e.InstantRebate.EndDate.split("T")[0]]}),(h==null?void 0:h.EndDate)&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",h.EndDate.split("T")[0]]})]})})]})}),o.jsxs("div",{className:"flex flex-shrink-0 gap-2 ml-4",children:[typeof t<"u"&&t&&o.jsxs("div",{className:"flex items-center border rounded-md",children:[o.jsx(oe,{variant:"ghost",size:"icon",className:"rounded-r-none",onClick:G,disabled:typeof d<"u"&&(d<=1||!e.AvailableToBuy||i||!s),children:"-"}),o.jsx("input",{value:d,onChange:I,onBlur:P,onClick:F=>F.currentTarget.select(),className:`w-12 text-center border-0 focus:ring-0 focus:outline-none ${!e.AvailableToBuy||i||!s?"text-gray-400":""}`,disabled:!e.AvailableToBuy||i||!s}),o.jsx(oe,{variant:"ghost",size:"icon",className:"rounded-l-none",onClick:j,disabled:!e.AvailableToBuy||i||!s,children:"+"})]}),typeof t<"u"&&t&&o.jsx(oe,{className:"gap-2 whitespace-nowrap",onClick:K,disabled:!e.AvailableToBuy||i||!s,children:i?o.jsxs(o.Fragment,{children:[o.jsx(Yn,{className:"h-4 w-4 animate-spin"}),"Adding..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Xn,{className:"mr-2"}),"Add to Cart"]})}),r&&o.jsx(oe,{className:"gap-2 whitespace-nowrap bg-green-600 hover:bg-green-700",onClick:c,disabled:u||!c,children:u?o.jsxs(o.Fragment,{children:[o.jsx(Yn,{className:"h-4 w-4 animate-spin"}),"Syncing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Xn,{className:"mr-2"}),"Sync to Shopify"]})})]})]})]})})}E.AvatarFooter=Au,E.Badge=xe,E.Button=oe,E.Card=cr,E.CardContent=dr,E.CardDescription=qs,E.CardFooter=Ys,E.CardHeader=Gs,E.CardTitle=Ks,E.CountryFlag=Qs,E.Dialog=ht,E.DialogClose=zr,E.DialogContent=gt,E.DialogDescription=Vr,E.DialogFooter=Wr,E.DialogHeader=jt,E.DialogOverlay=Br,E.DialogPortal=sa,E.DialogTitle=Ht,E.DialogTrigger=Fr,E.Input=nr,E.InputOTP=ml,E.InputOTPGroup=bl,E.InputOTPSeparator=wl,E.InputOTPSlot=yl,E.Label=Ou,E.Layout=Zs,E.Navbar=Xs,E.ProductCard=ff,E.ProductImage=Js,E.Separator=ln,E.Sheet=Xa,E.SheetClose=Tu,E.SheetContent=dn,E.SheetDescription=ts,E.SheetFooter=Ra,E.SheetHeader=Ja,E.SheetOverlay=cn,E.SheetPortal=Za,E.SheetTitle=es,E.SheetTrigger=Eu,E.Sidebar=pn,E.SidebarContent=mn,E.SidebarFooter=vn,E.SidebarGroup=cs,E.SidebarGroupAction=us,E.SidebarGroupContent=fs,E.SidebarGroupLabel=ds,E.SidebarHeader=gn,E.SidebarInput=is,E.SidebarInset=ss,E.SidebarMenu=bn,E.SidebarMenuAction=ps,E.SidebarMenuBadge=hs,E.SidebarMenuButton=wn,E.SidebarMenuItem=yn,E.SidebarMenuSkeleton=gs,E.SidebarMenuSub=vs,E.SidebarMenuSubButton=bs,E.SidebarMenuSubItem=ms,E.SidebarProvider=fn,E.SidebarRail=as,E.SidebarSeparator=ls,E.SidebarTrigger=hn,E.Skeleton=Y,E.Toast=Mn,E.ToastAction=Ws,E.ToastClose=kn,E.ToastDescription=Dn,E.ToastProvider=Bs,E.ToastTitle=On,E.ToastViewport=An,E.Toaster=Hs,E.Tooltip=dt,E.TooltipContent=Ge,E.TooltipProvider=ct,E.TooltipTrigger=ut,E.Topbar=$n,E.badgeVariants=Us,E.buttonVariants=jr,E.toast=js,E.useIsMobile=ns,E.useSidebar=xt,E.useToast=Ln,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
|